Thread: [Getdata-commits] SF.net SVN: getdata:[767] trunk/getdata (Page 7)
Scientific Database Format
Brought to you by:
ketiltrout
From: <ket...@us...> - 2012-08-21 00:17:52
|
Revision: 767 http://getdata.svn.sourceforge.net/getdata/?rev=767&view=rev Author: ketiltrout Date: 2012-08-21 00:17:45 +0000 (Tue, 21 Aug 2012) Log Message: ----------- GetData-0.8.1 Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/RELEASE_NOTES.in trunk/getdata/cmake/CMakeLists.txt trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-20 22:27:42 UTC (rev 766) +++ trunk/getdata/ChangeLog 2012-08-21 00:17:45 UTC (rev 767) @@ -1,3 +1,6 @@ +2012-08-20 D. V. Wiebe <ge...@ke...> svn:767 + GetData-0.8.1 released. + 2012-08-15 D. V. Wiebe <ge...@ke...> svn:760 * src/internal (_GD_IsDirSep): Added. * src/common.c (_GD_CanonicalPath): Call _GD_IsDirSep Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-08-20 22:27:42 UTC (rev 766) +++ trunk/getdata/NEWS 2012-08-21 00:17:45 UTC (rev 767) @@ -1,4 +1,4 @@ -New in version 0.8.1rc1: +New in version 0.8.1: Library Changes: Modified: trunk/getdata/RELEASE_NOTES.in =================================================================== --- trunk/getdata/RELEASE_NOTES.in 2012-08-20 22:27:42 UTC (rev 766) +++ trunk/getdata/RELEASE_NOTES.in 2012-08-21 00:17:45 UTC (rev 767) @@ -1,4 +1,4 @@ -GetData 0.8.0 is known to compile and pass the test suite on the following +GetData 0.8.1 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: @@ -22,11 +22,11 @@ --------------------------------------------------------------------------- Three packages are available: -* getdata-0.8.0.tar.bz2/.gz: the full source code to the library, with +* getdata-0.8.1.tar.bz2/.gz: the full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.) -* getdata_win-0.8.0.zip: a reduced source code package, with the CMake +* getdata_win-0.8.1.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 @@ -35,7 +35,7 @@ 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) +* idl_getdata-0.8.1.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 Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-08-20 22:27:42 UTC (rev 766) +++ trunk/getdata/cmake/CMakeLists.txt 2012-08-21 00:17:45 UTC (rev 767) @@ -26,7 +26,7 @@ #TODO add configure add_definitions( -DPACKAGE_NAME=\"GetData\" - -DPACKAGE_VERSION=\"0.8.0\" + -DPACKAGE_VERSION=\"0.8.x\" -DPACKAGE_BUGREPORT=\"get...@li...\" -DUNALIGNED_ACCESS_OK ) Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-08-20 22:27:42 UTC (rev 766) +++ trunk/getdata/m4/version.m4 2012-08-21 00:17:45 UTC (rev 767) @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 1) -m4_define(getdata_extra, [rc1]) +m4_define(getdata_extra, []) 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-10-10 23:05:04
|
Revision: 771 http://getdata.svn.sourceforge.net/getdata/?rev=771&view=rev Author: ketiltrout Date: 2012-10-10 23:04:56 +0000 (Wed, 10 Oct 2012) Log Message: ----------- BUG FIX: Trying to read data from first sample of an MPLEX no longer results in an internal error if the first sample of the index doesn't match the target value. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 trunk/getdata/src/getdata.c trunk/getdata/src/internal.h trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/test/get_mplex_bof.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-08-22 23:27:59 UTC (rev 770) +++ trunk/getdata/ChangeLog 2012-10-10 23:04:56 UTC (rev 771) @@ -1,3 +1,9 @@ +2012-10-10 D. V. Wiebe <ge...@ke...> svn:771 + * src/getdata.c (_GD_DoMplex): Check we're at the BOF before trying to do a + lookback. + + * src/internal.h: Only export gd_MakeFullPathOnly when using modules. + 2012-08-20 D. V. Wiebe <ge...@ke...> svn:767 GetData-0.8.1 released. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-08-22 23:27:59 UTC (rev 770) +++ trunk/getdata/NEWS 2012-10-10 23:04:56 UTC (rev 771) @@ -1,3 +1,13 @@ +New in version 0.8.2a: + + Library Changes: + + * BUG FIX: Trying to read data from the first sample of an MPLEX no longer + results in an internal error if the first sample of the index doesn't match + the target value. + +|==============================================================================| + New in version 0.8.1: Library Changes: Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-08-22 23:27:59 UTC (rev 770) +++ trunk/getdata/m4/version.m4 2012-10-10 23:04:56 UTC (rev 771) @@ -20,8 +20,8 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 1) -m4_define(getdata_extra, []) +m4_define(getdata_revision, 2) +m4_define(getdata_extra, [a]) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) Modified: trunk/getdata/src/getdata.c =================================================================== --- trunk/getdata/src/getdata.c 2012-08-22 23:27:59 UTC (rev 770) +++ trunk/getdata/src/getdata.c 2012-10-10 23:04:56 UTC (rev 771) @@ -1714,7 +1714,8 @@ if (lb_start < 0) lb_start = 0; - do { + /* stop if we're at the start of the lookback or we found the value */ + while (lb_sample == -1 && chunk_start > lb_start) { /* the size of the next chunk */ size_t i, n_read3, chunk_size = chunk_start - lb_start; int *tmpbuf2; @@ -1750,8 +1751,7 @@ } } while (i-- != 0); free(tmpbuf2); - /* stop if we're at the start of the lookback or we found the value */ - } while (lb_sample == -1 && chunk_start > lb_start); + } /* read the value of the start, if found */ if (lb_sample >= 0) { Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-08-22 23:27:59 UTC (rev 770) +++ trunk/getdata/src/internal.h 2012-10-10 23:04:56 UTC (rev 771) @@ -1095,7 +1095,11 @@ int _GD_ListEntry(const gd_entry_t *E, int meta, int hidden, int noalias, int special, gd_entype_t type); char *_GD_MakeFullPath(DIRFILE *restrict, int, const char *restrict, int); +#ifdef USE_MODULES #define _GD_MakeFullPathOnly gd_MakeFullPathOnly +#else +#define gd_MakeFullPathOnly _GD_MakeFullPathOnly +#endif char *_GD_MakeFullPathOnly(const DIRFILE *D, int dirfd, const char *name); int _GD_MakeTempFile(const DIRFILE*, int, char*); void *_GD_Malloc(DIRFILE *D, size_t size); 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_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 + 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_bof get_mplex_lb get_mplex_lball get_mplex_nolb get_multiply get_multiply_noin get_nonexistent get_null get_off64 get_phase get_phase_affix get_polynom get_polynom_noin get_recip get_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-22 23:27:59 UTC (rev 770) +++ trunk/getdata/test/Makefile.am 2012-10-10 23:04:56 UTC (rev 771) @@ -184,13 +184,14 @@ get_int8 get_int16 get_int32 get_int64 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 + get_linterp_notab get_linterp_sort get_mplex get_mplex_bof \ + get_mplex_lb get_mplex_lball get_mplex_nolb get_multiply \ + get_multiply_noin get_nonexistent get_null get_off64 get_phase \ + get_phase_affix get_polynom get_polynom_noin get_recip \ + get_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_TESTS=global_flags global_name global_ref global_ref_empty global_ref_set Added: trunk/getdata/test/get_mplex_bof.c =================================================================== --- trunk/getdata/test/get_mplex_bof.c (rev 0) +++ trunk/getdata/test/get_mplex_bof.c 2012-10-10 23:04:56 UTC (rev 771) @@ -0,0 +1,76 @@ +/* Copyright (C) 2012 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +#include "test.h" + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *count = "dirfile/count"; + const char *format_data = + "mplex MPLEX data count 2 3\n" + "count RAW UINT8 8\n" + "data RAW UINT8 8\n"; + unsigned char c[8]; + unsigned char data_data[256]; + int fd, n, i, error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] %= 3; + + fd = open(count, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n = gd_getdata(D, "mplex", 0, 0, 1, 0, GD_UINT8, &c); + error = gd_error(D); + + gd_close(D); + + unlink(count); + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + CHECKI(n, 8); + for (i = 0; i < 8; ++i) + CHECKIi(i, c[i], (i < 2) ? 0 : 3 * ((i + 1) / 3) - 1); + + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-11-23 15:23:35
|
Revision: 772 http://getdata.svn.sourceforge.net/getdata/?rev=772&view=rev Author: ketiltrout Date: 2012-11-23 15:23:24 +0000 (Fri, 23 Nov 2012) Log Message: ----------- Remove unnecessary DIRFILE from _GD_WriteOut. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/encoding.c trunk/getdata/src/internal.h trunk/getdata/src/mod.c trunk/getdata/src/move.c trunk/getdata/src/putdata.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/ChangeLog 2012-11-23 15:23:24 UTC (rev 772) @@ -1,3 +1,6 @@ +2012-11-22 D. V. Wiebe <ge...@ke...> svn:772 + * src/encoding.c (_GD_WriteOut): Remove unnecessary DIRFILE parameter. + 2012-10-10 D. V. Wiebe <ge...@ke...> svn:771 * src/getdata.c (_GD_DoMplex): Check we're at the BOF before trying to do a lookback. Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/src/encoding.c 2012-11-23 15:23:24 UTC (rev 772) @@ -450,14 +450,12 @@ } /* Perform a RAW field write */ -ssize_t _GD_WriteOut(DIRFILE *D gd_unused_d, const gd_entry_t *E, - const struct encoding_t *enc, const void *ptr, gd_type_t type, size_t n, - int temp) +ssize_t _GD_WriteOut(const gd_entry_t *E, const struct encoding_t *enc, + const void *ptr, gd_type_t type, size_t n, int temp) { 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, 0x%X, %" PRNsize_t ", %i", 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/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/src/internal.h 2012-11-23 15:23:24 UTC (rev 772) @@ -1140,8 +1140,8 @@ 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); -ssize_t _GD_WriteOut(DIRFILE*, const gd_entry_t*, const struct encoding_t*, - const void*, gd_type_t, size_t, int); +ssize_t _GD_WriteOut(const gd_entry_t*, const struct encoding_t*, const void*, + gd_type_t, size_t, int); /* generic I/O methods */ int _GD_GenericMove(int, struct _gd_raw_file *restrict, int, char *restrict); Modified: trunk/getdata/src/mod.c =================================================================== --- trunk/getdata/src/mod.c 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/src/mod.c 2012-11-23 15:23:24 UTC (rev 772) @@ -381,7 +381,7 @@ buffer2 = ptr; } - nwrote = _GD_WriteOut(D, E, enc, buffer1, Q.EN(raw,data_type), ns_out, + nwrote = _GD_WriteOut(E, enc, buffer1, Q.EN(raw,data_type), ns_out, 1); if (nwrote < ns_out) { Modified: trunk/getdata/src/move.c =================================================================== --- trunk/getdata/src/move.c 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/src/move.c 2012-11-23 15:23:24 UTC (rev 772) @@ -213,8 +213,7 @@ _GD_FixEndianness((char *)buffer, E->e->u.raw.size, nread); } - nwrote = _GD_WriteOut(D, E, enc_out, buffer, E->EN(raw,data_type), nread, - 1); + nwrote = _GD_WriteOut(E, enc_out, buffer, E->EN(raw,data_type), nread, 1); if (nwrote < nread) { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[1].name, errno, NULL); Modified: trunk/getdata/src/putdata.c =================================================================== --- trunk/getdata/src/putdata.c 2012-10-10 23:04:56 UTC (rev 771) +++ trunk/getdata/src/putdata.c 2012-11-23 15:23:24 UTC (rev 772) @@ -108,7 +108,7 @@ return 0; } - n_wrote = _GD_WriteOut(D, E, _gd_ef + E->e->u.raw.file[0].subenc, databuffer, + n_wrote = _GD_WriteOut(E, _gd_ef + E->e->u.raw.file[0].subenc, databuffer, E->EN(raw,data_type), ns, 0); if (n_wrote < 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-12-12 03:07:45
|
Revision: 773 http://getdata.svn.sourceforge.net/getdata/?rev=773&view=rev Author: ketiltrout Date: 2012-12-12 03:07:29 +0000 (Wed, 12 Dec 2012) Log Message: ----------- Fix two bugs involving trailing symlinks. (One reported by Steve Benton plus a bonus one found while testing the fix for the first.) Plus tests for same. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/configure.ac trunk/getdata/src/common.c trunk/getdata/test/Makefile.am trunk/getdata/test/parse_include_absolute.c trunk/getdata/test/parse_include_absrel.c trunk/getdata/test/parse_include_relabs.c trunk/getdata/test/test.h Added Paths: ----------- trunk/getdata/test/open_sym_a.c trunk/getdata/test/open_sym_al.c trunk/getdata/test/open_sym_at.c trunk/getdata/test/open_sym_c.c trunk/getdata/test/open_sym_cl.c trunk/getdata/test/open_sym_ct.c trunk/getdata/test/open_sym_p.c trunk/getdata/test/open_sym_pl.c trunk/getdata/test/open_sym_pt.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/ChangeLog 2012-12-12 03:07:29 UTC (rev 773) @@ -1,3 +1,16 @@ +2012-12-12 D. V. Wiebe <ge...@ke...> svn:773 + * src/common.c (_GD_CanonicalPath): Don't bail early when encountering a + trailing absolute symlink. + + * src/common.c (_GD_CanonicalPath): Strip DIRSEP along with a symlink name + from res when necessary. + + * test/test.h test/parse_include_absolute.c test/parse_include_absrel.c + test/parse_include_relabs.c: Abstract getcwd in the header. + * test/open_sym_a.c test/open_sym_al.c test/open_sym_at.c test/open_sym_c.c + test/open_sym_cl.c test/open_sym_ct.c test/open_sym_p.c test/open_sym_pl.c + test/open_sym_pt.c: Added. + 2012-11-22 D. V. Wiebe <ge...@ke...> svn:772 * src/encoding.c (_GD_WriteOut): Remove unnecessary DIRFILE parameter. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/NEWS 2012-12-12 03:07:29 UTC (rev 773) @@ -1,6 +1,11 @@ New in version 0.8.2a: Library Changes: + + * BUG FIX: A trailing symlink (i.e. situations where a symlink is the last + element of a path) no longer confuses GetData when the target of the + symlink: (1) is absolute, or (2) starts with "../". Reported by S. J. + Benton. * BUG FIX: Trying to read data from the first sample of an MPLEX no longer results in an internal error if the first sample of the index doesn't match @@ -86,7 +91,8 @@ * Literal integers in the format may now be specified in octal (using 0####) or hexidecimal (using 0x##### or 0X#####) in addition to - decimal. + decimal. C99-standard hexidecimal floating point literals (0x##.##p##, + &c.) are also accepted. * The /INCLUDE directive can take two additional, optional parameters which specify a prefix and/or suffix used to modify the entry names of Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/configure.ac 2012-12-12 03:07:29 UTC (rev 773) @@ -711,7 +711,7 @@ _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]) + symlink _unlink unlinkat _write]) if test "x$disable_c99" = "xno"; then AC_CHECK_FUNCS([cabs]) fi Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/src/common.c 2012-12-12 03:07:29 UTC (rev 773) @@ -1183,13 +1183,21 @@ char *rptr; for (rptr = res + res_len - 1; !_GD_IsDirSep(*rptr); --rptr) ; - *(rptr + 1) = '\0'; - res_len = (rptr - res) + 1; + + /* don't strip the root /; but do strip a previous DIRSEP */ + if ((size_t)(rptr - res) < res_root) { + *(rptr + 1) = '\0'; + res_len = (rptr - res) + 1; + } else { + *rptr = '\0'; + res_len = rptr - res; + } } /* now make a new work buffer of "target/remaining", asusming * remaining is non-null, otherwise, just use target */ if (*end == '\0') { + last_element = 0; free(work); end = work = strdup(target); if (work == NULL) { 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_bof get_mplex_lb get_mplex_lball get_mplex_nolb get_multiply get_multiply_noin get_nonexistent get_null get_off64 get_phase get_phase_affix get_polynom get_polynom_noin get_recip get_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 + 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_bof get_mplex_lb get_mplex_lball get_mplex_nolb get_multiply get_multiply_noin get_nonexistent get_null get_off64 get_phase get_phase_affix get_polynom get_polynom_noin get_recip get_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 open_sym_a open_sym_al open_sym_at open_sym_c open_sym_cl open_sym_ct open_sym_p open_sym_pl open_sym_pt 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-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/test/Makefile.am 2012-12-12 03:07:29 UTC (rev 773) @@ -248,7 +248,8 @@ OPEN_TESTS=open open_abs open_cb_abort open_cb_cont open_cb_ignore \ open_cb_invalid open_cb_rescan open_eaccess open_nonexistent \ - open_notdirfile + open_notdirfile open_sym_a open_sym_al open_sym_at open_sym_c \ + open_sym_cl open_sym_ct open_sym_p open_sym_pl open_sym_pt PARSE_TESTS=parse_alias parse_alias_code parse_alias_dup parse_alias_meta \ parse_alias_missing parse_badline parse_bit parse_bit4 \ Added: trunk/getdata/test/open_sym_a.c =================================================================== --- trunk/getdata/test/open_sym_a.c (rev 0) +++ trunk/getdata/test/open_sym_a.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,65 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK || defined GD_NO_GETCWD + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + char *targ; + int error, r = 0; + int cwd_size = 2048; + char *ptr, *cwd = NULL; + DIRFILE *D; + + gdtest_getcwd(ptr, cwd, cwd_size); + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + targ = (char*)malloc(cwd_size + 8); + sprintf(targ, "%s/dirfile", cwd); + + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + free(cwd); + return r; +#endif +} Added: trunk/getdata/test/open_sym_al.c =================================================================== --- trunk/getdata/test/open_sym_al.c (rev 0) +++ trunk/getdata/test/open_sym_al.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,65 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK || defined GD_NO_GETCWD + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + char *targ; + int error, r = 0; + int cwd_size = 2048; + char *ptr, *cwd = NULL; + DIRFILE *D; + + gdtest_getcwd(ptr, cwd, cwd_size); + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + targ = (char*)malloc(cwd_size + 8); + sprintf(targ, "%s/dirfile/", cwd); + + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + free(cwd); + return r; +#endif +} Added: trunk/getdata/test/open_sym_at.c =================================================================== --- trunk/getdata/test/open_sym_at.c (rev 0) +++ trunk/getdata/test/open_sym_at.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,65 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK || defined GD_NO_GETCWD + return 77; +#else + const char *filedir = "dirfile/link/"; + const char *format = "dirfile/format"; + char *targ; + int error, r = 0; + int cwd_size = 2048; + char *ptr, *cwd = NULL; + DIRFILE *D; + + gdtest_getcwd(ptr, cwd, cwd_size); + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + targ = (char*)malloc(cwd_size + 8); + sprintf(targ, "%s/dirfile", cwd); + + symlink(targ, "dirfile/link"); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + free(cwd); + return r; +#endif +} Added: trunk/getdata/test/open_sym_c.c =================================================================== --- trunk/getdata/test/open_sym_c.c (rev 0) +++ trunk/getdata/test/open_sym_c.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + const char *targ = "."; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Added: trunk/getdata/test/open_sym_cl.c =================================================================== --- trunk/getdata/test/open_sym_cl.c (rev 0) +++ trunk/getdata/test/open_sym_cl.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + const char *targ = "./"; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Added: trunk/getdata/test/open_sym_ct.c =================================================================== --- trunk/getdata/test/open_sym_ct.c (rev 0) +++ trunk/getdata/test/open_sym_ct.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link/"; + const char *format = "dirfile/format"; + const char *targ = "."; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, "dirfile/link"); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Added: trunk/getdata/test/open_sym_p.c =================================================================== --- trunk/getdata/test/open_sym_p.c (rev 0) +++ trunk/getdata/test/open_sym_p.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + const char *targ = "../dirfile"; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Added: trunk/getdata/test/open_sym_pl.c =================================================================== --- trunk/getdata/test/open_sym_pl.c (rev 0) +++ trunk/getdata/test/open_sym_pl.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link"; + const char *format = "dirfile/format"; + const char *targ = "../dirfile/"; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, filedir); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Added: trunk/getdata/test/open_sym_pt.c =================================================================== --- trunk/getdata/test/open_sym_pt.c (rev 0) +++ trunk/getdata/test/open_sym_pt.c 2012-12-12 03:07:29 UTC (rev 773) @@ -0,0 +1,57 @@ +/* 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> + +int main(void) +{ +#if ! defined HAVE_SYMLINK + return 77; +#else + const char *filedir = "dirfile/link/"; + const char *format = "dirfile/format"; + const char *targ = "../dirfile"; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir("dirfile", 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + /* make a symlink */ + symlink(targ, "dirfile/link"); + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +#endif +} Modified: trunk/getdata/test/parse_include_absolute.c =================================================================== --- trunk/getdata/test/parse_include_absolute.c 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/test/parse_include_absolute.c 2012-12-12 03:07:29 UTC (rev 773) @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 D. V. Wiebe +/* Copyright (C) 2011-2012 D. V. Wiebe * *************************************************************************** * @@ -31,10 +31,9 @@ int main(void) { -#if defined HAVE_GETCWD || defined HAVE__GETCWD -#ifdef HAVE__GETCWD -#define getcwd _getcwd -#endif +#if defined GD_NO_GETCWD + return 77; +#else const char *filedir = "dirfile"; const char *format = "dirfile/format"; const char *format1 = "dirfile/format1"; @@ -50,13 +49,7 @@ rmdirfile(); mkdir(filedir, 0777); - do { - ptr = (char*)realloc(cwd, cwd_size *= 2); - if (ptr == NULL) { - fprintf(stderr, "out of memory for cwd!\n"); - exit(1); - } - } while (!getcwd(cwd = ptr, cwd_size)); + gdtest_getcwd(ptr, cwd, cwd_size); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data1, strlen(format_data1)); @@ -79,7 +72,5 @@ CHECKU(spf, 11); free(cwd); return r; -#else - return 77; #endif } Modified: trunk/getdata/test/parse_include_absrel.c =================================================================== --- trunk/getdata/test/parse_include_absrel.c 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/test/parse_include_absrel.c 2012-12-12 03:07:29 UTC (rev 773) @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 D. V. Wiebe +/* Copyright (C) 2011-2012 D. V. Wiebe * *************************************************************************** * @@ -31,10 +31,9 @@ int main(void) { -#if defined HAVE_GETCWD || defined HAVE__GETCWD -#ifdef HAVE__GETCWD -#define getcwd _getcwd -#endif +#if defined GD_NO_GETCWD + return 77; +#else const char *filedir = "dirfile"; const char *format = "dirfile/format"; const char *format1 = "dirfile/format1"; @@ -52,13 +51,7 @@ rmdirfile(); mkdir(filedir, 0777); - do { - ptr = (char*)realloc(cwd, cwd_size *= 2); - if (ptr == NULL) { - fprintf(stderr, "out of memory for cwd!\n"); - exit(1); - } - } while (!getcwd(cwd = ptr, cwd_size)); + gdtest_getcwd(ptr, cwd, cwd_size); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data1, strlen(format_data1)); @@ -86,7 +79,5 @@ CHECKU(spf, 11); free(cwd); return r; -#else - return 77; #endif } Modified: trunk/getdata/test/parse_include_relabs.c =================================================================== --- trunk/getdata/test/parse_include_relabs.c 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/test/parse_include_relabs.c 2012-12-12 03:07:29 UTC (rev 773) @@ -1,4 +1,4 @@ -/* Copyright (C) 2011 D. V. Wiebe +/* Copyright (C) 2011-2012 D. V. Wiebe * *************************************************************************** * @@ -31,10 +31,9 @@ int main(void) { -#if defined HAVE_GETCWD || defined HAVE__GETCWD -#ifdef HAVE__GETCWD -#define getcwd _getcwd -#endif +#if defined GD_NO_GETCWD + return 77; +#else const char *filedir = "dirfile"; const char *subdir = "dirfile/sub"; const char *format = "dirfile/format"; @@ -54,13 +53,7 @@ mkdir(filedir, 0777); mkdir(subdir, 0777); - do { - ptr = (char*)realloc(cwd, cwd_size *= 2); - if (ptr == NULL) { - fprintf(stderr, "out of memory for cwd!\n"); - exit(1); - } - } while (!getcwd(cwd = ptr, cwd_size)); + gdtest_getcwd(ptr, cwd, cwd_size); fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); write(fd, format_data, strlen(format_data)); @@ -89,7 +82,5 @@ CHECKU(spf, 11); free(cwd); return r; -#else - return 77; #endif } Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-11-23 15:23:24 UTC (rev 772) +++ trunk/getdata/test/test.h 2012-12-12 03:07:29 UTC (rev 773) @@ -84,6 +84,24 @@ #define gd_pathwrite(x,y) write(x,y,strlen(y)) #endif +/* getcwd abstraction */ +#if defined HAVE_GETCWD || defined HAVE__GETCWD +# ifdef HAVE__GETCWD +# define getcwd _getcwd +# endif +# define gdtest_getcwd(ptr,cwd,cwd_size) \ + do { \ + ptr = (char*)realloc(cwd, cwd_size *= 2); \ + if (ptr == NULL) { \ + fprintf(stderr, "out of memory for cwd!\n"); \ + exit(1); \ + } \ + } while (!getcwd(cwd = ptr, cwd_size)); +#else +# define GD_NO_GETCWD +#endif + + #define CHECK(e,n,nf,vf,...) \ do { if (e) { r = 1; \ fprintf(stderr, #n " = " nf " (expected " vf ")\n", __VA_ARGS__); } \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-12-13 00:57:45
|
Revision: 775 http://getdata.svn.sourceforge.net/getdata/?rev=775&view=rev Author: ketiltrout Date: 2012-12-13 00:57:39 +0000 (Thu, 13 Dec 2012) Log Message: ----------- GetData-0.8.2 released. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/RELEASE_NOTES.in trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-12-12 22:16:46 UTC (rev 774) +++ trunk/getdata/ChangeLog 2012-12-13 00:57:39 UTC (rev 775) @@ -1,3 +1,6 @@ +2012-12-13 D. V. Wiebe <ge...@ke...> svn:775 + GetData-0.8.2 released. + 2012-12-12 D. V. Wiebe <ge...@ke...> svn:773 * src/common.c (_GD_CanonicalPath): Don't bail early when encountering a trailing absolute symlink. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-12-12 22:16:46 UTC (rev 774) +++ trunk/getdata/NEWS 2012-12-13 00:57:39 UTC (rev 775) @@ -1,4 +1,4 @@ -New in version 0.8.2a: +New in version 0.8.2: Library Changes: Modified: trunk/getdata/RELEASE_NOTES.in =================================================================== --- trunk/getdata/RELEASE_NOTES.in 2012-12-12 22:16:46 UTC (rev 774) +++ trunk/getdata/RELEASE_NOTES.in 2012-12-13 00:57:39 UTC (rev 775) @@ -1,4 +1,4 @@ -GetData 0.8.1 is known to compile and pass the test suite on the following +GetData 0.8.2 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: @@ -22,11 +22,11 @@ --------------------------------------------------------------------------- Three packages are available: -* getdata-0.8.1.tar.bz2/.gz: the full source code to the library, with +* getdata-0.8.2.tar.bz2/.gz: the full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.) -* getdata_win-0.8.1.zip: a reduced source code package, with the CMake +* getdata_win-0.8.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 @@ -35,7 +35,7 @@ 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.1.tar.bz2/.gz: the Interactive Data Language (IDL) +* idl_getdata-0.8.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 Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-12-12 22:16:46 UTC (rev 774) +++ trunk/getdata/m4/version.m4 2012-12-13 00:57:39 UTC (rev 775) @@ -21,14 +21,14 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 2) -m4_define(getdata_extra, [a]) +m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) dnl libgetdata current interface version m4_define(getdata_iface_version, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 0) +m4_define(getdata_impl_revision, 1) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-02-14 04:06:06
|
Revision: 794 http://sourceforge.net/p/getdata/code/794 Author: ketiltrout Date: 2013-02-14 04:06:02 +0000 (Thu, 14 Feb 2013) Log Message: ----------- Test gd_mcarrays in bindings; fix underscores in the rest of the encodings. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/perl/Makefile.am trunk/getdata/bindings/perl/t/big_test.t trunk/getdata/bindings/python/test/big_test.py trunk/getdata/doc/list.tests trunk/getdata/src/lzma.c trunk/getdata/src/slim.c trunk/getdata/src/zzip.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/ChangeLog 2013-02-14 04:06:02 UTC (rev 794) @@ -1,3 +1,7 @@ +2012-02-02 D. V. Wiebe <ge...@ke...> svn:794 + * bindings/cxx/test/big_test.cpp bindings/perl/t/big_test.t + bindings/python/test/big_test.py: Add test 243. + 2012-02-02 D. V. Wiebe <ge...@ke...> svn:793 * src/parse.c (_GD_Tokenise): Don't falsely report an unterminated token when stopping a partial tokenisation on top of a " or \. Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2013-02-14 04:06:02 UTC (rev 794) @@ -144,6 +144,7 @@ "lincom LINCOM data 1.1 2.2 INDEX 2.2 3.3;4.4 linterp const const\n" "/META data mstr STRING \"This is a string constant.\"\n" "/META data mconst CONST COMPLEX128 3.3;4.4\n" + "/META data mcarray CARRAY FLOAT64 1.9 2.8 3.7 4.6 5.5\n" "/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" @@ -192,6 +193,7 @@ MplexEntry xent, *xep; Fragment *frag; gd_triplet_t thresh; + const gd_carray_t *carrays; char* fields[nfields + 9] = {(char*)"INDEX", (char*)"alias", (char*)"bit", (char*)"carray", (char*)"const", (char*)"data", (char*)"div", @@ -201,6 +203,13 @@ NULL, NULL}; char *strings[3]; + unlink(data); + unlink(new1); + unlink(format); + unlink(format1); + unlink(form2); + rmdir(filedir); + // Write the test dirfile mkdir(filedir, 0777); @@ -253,12 +262,13 @@ // 9: Dirfile::NFields check n = d->NMFields("data"); CHECK_OK(9); - CHECK_INT(9,n,3); + CHECK_INT(9,n,4); // 10: Dirfile::MFieldList check fields[0] = (char*)"mstr"; fields[1] = (char*)"mconst"; - fields[2] = (char*)"mlut"; + fields[2] = (char*)"mcarray"; + fields[3] = (char*)"mlut"; list = d->MFieldList("data"); CHECK_OK(10); CHECK_STRING_ARRAY(10,n,list[i],fields[i]); @@ -1281,7 +1291,7 @@ CHECK_DOUBLE_ARRAY(159,1,2,p[i],1.1 * (i + 3)); // 167 gd_carrays - const gd_carray_t *carrays = d->Carrays(Float64); + carrays = d->Carrays(Float64); CHECK_OK(167); CHECK_NONNULL(167,carrays); CHECK_INT2(167,1,carrays[0].n,6); @@ -1343,6 +1353,23 @@ CHECK_INT2(179,4,ent->ArrayLen(),4); delete ent; + // 180: gd_madd_carray + aent.Dissociate(); + aent.SetName("mnew17"); + aent.SetFragmentIndex(0); + aent.SetType(Float64); + aent.SetArrayLen(2); + d->MAdd(aent, "data"); + CHECK_OK2(180,1); + + ent = d->Entry("data/mnew17"); + CHECK_OK2(180,2); + CHECK_INT2(180,1,ent->Type(),CarrayEntryType); + CHECK_INT2(180,2,ent->FragmentIndex(),0); + CHECK_INT2(180,3,ent->ConstType(),Float64); + CHECK_INT2(180,4,ent->ArrayLen(),2); + delete ent; + // 181 gd_alter_carray aep = reinterpret_cast<CarrayEntry*>(d->Entry("new17")); CHECK_OK2(181,1); @@ -1685,7 +1712,7 @@ n = d->NEntries("data", GD_SCALAR_ENTRIES, GD_ENTRIES_HIDDEN | GD_ENTRIES_NOALIAS); CHECK_OK2(237, 1); - CHECK_INT2(237, 1, n, 2); + CHECK_INT2(237, 1, n, 4); n = d->NEntries(NULL, GD_VECTOR_ENTRIES, GD_ENTRIES_HIDDEN | GD_ENTRIES_NOALIAS); CHECK_OK2(237, 2); @@ -1734,12 +1761,22 @@ CHECK_EOSTRING(241,tok,buf); free(tok); + // 242: gd_carrays + carrays = d->MCarrays("data", Float64); + CHECK_OK(242); + CHECK_NONNULL(242,carrays); + CHECK_INT2(242,1,carrays[0].n,5); + CHECK_DOUBLE_ARRAY(242,2,5,((double*)carrays[0].d)[i],(1.9 + i * 0.9)); + CHECK_INT2(242,3,carrays[1].n,2); + CHECK_DOUBLE_ARRAY(242,4,2,((double*)carrays[1].d)[i],0); + CHECK_INT2(242,5,carrays[2].n,0); + // =================================================================== d->Discard(); delete d; Modified: trunk/getdata/bindings/perl/Makefile.am =================================================================== --- trunk/getdata/bindings/perl/Makefile.am 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/bindings/perl/Makefile.am 2013-02-14 04:06:02 UTC (rev 794) @@ -87,7 +87,7 @@ $(PERL) Build clean; \ fi rm -f $(BUILT_SOURCES) make_parameters.sed MYMETA.yml MYMETA.json GetData.pm - rm -rf Build _build MANIFEST build.stamp + rm -rf Build _build MANIFEST build.stamp t/*~ uninstall-hook: rmdir $(DESTDIR)${perlautogetdatadir} Modified: trunk/getdata/bindings/perl/t/big_test.t =================================================================== --- trunk/getdata/bindings/perl/t/big_test.t 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/bindings/perl/t/big_test.t 2013-02-14 04:06:02 UTC (rev 794) @@ -22,7 +22,7 @@ use GetData; use Math::Complex; use strict; -use Test::More tests => 1305; +use Test::More tests => 1317; my $ne = 0; my ($s, @a, %h); @@ -162,6 +162,7 @@ lincom LINCOM data 1.1 2.2 INDEX 2.2 3.3;4.4 linterp const const /META data mstr STRING "This is a string constant." /META data mconst CONST COMPLEX128 3.3;4.4 +/META data mcarray CARRAY FLOAT64 1.9 2.8 3.7 4.6 5.5 /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 @@ -230,12 +231,12 @@ # 9: nmfields check $s = $_->mfield_list("data"); CheckOK(9); -CheckNum(9, $s, 3); +CheckNum(9, $s, 4); # 10: mfield_list check @a = $_->mfield_list("data"); CheckOK(10); -CheckSArray(10, \@a, qw(mstr mconst mlut)); +CheckSArray(10, \@a, qw(mstr mconst mcarray mlut)); # 11: nframes check $s = $_->nframes; @@ -1686,7 +1687,7 @@ $s = $_->entry_list("data", $GetData::SCALAR_ENTRIES, $GetData::ENTRIES_HIDDEN | $GetData::ENTRIES_NOALIAS); CheckOK2(237, 1); -CheckNum2(237, 1, $s, 5); +CheckNum2(237, 1, $s, 6); $s = $_->entry_list(undef, $GetData::VECTOR_ENTRIES, $GetData::ENTRIES_HIDDEN | $GetData::ENTRIES_NOALIAS); CheckOK2(237, 2); @@ -1709,6 +1710,12 @@ CheckOK(241); CheckEOString(241, $s, "dirfile/lut"); +# 242: mcarrays +@a = $_->mcarrays("data", $GetData::FLOAT64); +CheckOK2(242, 1); +CheckNum2(242, 2, $#a, 1); +CheckArray2(242, 3, $a[0], 1.9, 2.8, 3.7, 4.6, 5.5 ); +CheckArray2(242, 4, $a[1], 1.8, 18 ); @@ -1716,5 +1723,6 @@ + $d = $_ = undef; system "rm -rf dirfile"; Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/bindings/python/test/big_test.py 2013-02-14 04:06:02 UTC (rev 794) @@ -101,6 +101,7 @@ "lincom LINCOM data 1.1 2.2 INDEX 2.2 3.3;4.4 linterp const const\n" "/META data mstr STRING \"This is a string constant.\"\n" "/META data mconst CONST COMPLEX128 3.3;4.4\n" + "/META data mcarray CARRAY FLOAT64 1.9 2.8 3.7 4.6 5.5\n" "/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" @@ -226,14 +227,14 @@ n = d.nmfields("data") except: CheckOK(9) -CheckSimple(9,n,3) +CheckSimple(9,n,4) # 10: mfield_list check try: n = d.mfield_list("data") except: CheckOK(10) -CheckSimple(10,n,["mstr", "mconst", "mlut"]) +CheckSimple(10,n,["mstr", "mconst", "mcarray", "mlut"]) # 11: nframes check try: @@ -1391,7 +1392,7 @@ CheckSimple2(167,1,len(n),1) if (pygetdata.__numpy_supported__): CheckSimple2(167,2,n[0][0],"carray") - CheckNumpy2(167,2,n[0][1],numpy.arange(1,7)) + CheckNumpy2(167,3,n[0][1],numpy.arange(1,7)) else: CheckSimple(167,n,[("carray", [1,2,3,4,5,6])]) @@ -1958,7 +1959,7 @@ pygetdata.ENTRIES_HIDDEN | pygetdata.ENTRIES_NOALIAS) except: CheckOK2(237, 1) -CheckSimple2(237, 1, n, 4) +CheckSimple2(237, 1, n, 5) try: n = d.nentries(type = pygetdata.VECTOR_ENTRIES, flags = pygetdata.ENTRIES_HIDDEN | pygetdata.ENTRIES_NOALIAS) @@ -1995,7 +1996,20 @@ CheckOK(241) CheckEOS(241,n,"dirfile/lut") +# 242: mcarrays +try: + n = d.mcarrays("data", pygetdata.FLOAT) +except: + CheckOK(242) +CheckSimple2(242,1,len(n),2) +if (pygetdata.__numpy_supported__): + CheckSimple2(242,2,n[0][0],"mcarray") + CheckNumpy2(242,3,n[0][1],1.9 + 0.9 * numpy.arange(0,5)) + CheckSimple2(242,4,n[1][0],"mnew17") + CheckNumpy2(242,5,n[1][1],[0,0]) +else: + CheckSimple(242,n,[("mcarray", [1.9, 2.8, 3.7, 4.6, 5.5]), ("mnew17", [0,0])]) @@ -2007,6 +2021,7 @@ + # ========================================================================== d.discard() Modified: trunk/getdata/doc/list.tests =================================================================== --- trunk/getdata/doc/list.tests 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/doc/list.tests 2013-02-14 04:06:02 UTC (rev 794) @@ -192,7 +192,7 @@ 177 F9CIpPm gd_carray_len 178 F9CIpPm gd_entry (CARRAY) 179 F9CIpPm gd_add_carray -180 F9.IpPm gd_madd_carray +180 F9CIpPm gd_madd_carray 181 F9CI.Pm gd_alter_carray (test 182 is placed after test 40) 183 F9CIpPm gd_constants (INT8) @@ -254,3 +254,4 @@ 239 F9CIpPm gd_entry_list 240 F9CIpPm gd_mplex_lookback 241 F9CIpPm gd_linterp_tablename +242 ..C-pP- gd_mcarrays Modified: trunk/getdata/src/lzma.c =================================================================== --- trunk/getdata/src/lzma.c 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/src/lzma.c 2013-02-14 04:06:02 UTC (rev 794) @@ -57,7 +57,7 @@ /* The bzip encoding scheme uses edata as a gd_lzmadata pointer. If a file is * open, idata = 0 otherwise idata = -1. */ -static struct gd_lzmadata *_GD_LzmaDoOpen(int dirfd, struct _gd_raw_file* file) +static struct gd_lzmadata *_GD_LzmaDoOpen(int dirfd, struct gd_raw_file_* file) { struct gd_lzmadata *ptr; int fd; @@ -107,8 +107,8 @@ return ptr; } -int _GD_LzmaOpen(int dirfd, struct _gd_raw_file* file, int swap __gd_unused, - unsigned int mode __gd_unused) +int _GD_LzmaOpen(int dirfd, struct gd_raw_file_* file, int swap gd_unused_, + unsigned int mode gd_unused_) { struct gd_lzmadata *ptr; @@ -179,8 +179,8 @@ return 0; } -off64_t _GD_LzmaSeek(struct _gd_raw_file* file, off64_t count, - gd_type_t data_type, unsigned int mode __gd_unused) +off64_t _GD_LzmaSeek(struct gd_raw_file_* file, off64_t count, + gd_type_t data_type, unsigned int mode gd_unused_) { struct gd_lzmadata *ptr = (struct gd_lzmadata *)file->edata; @@ -233,7 +233,7 @@ return file->pos; } -ssize_t _GD_LzmaRead(struct _gd_raw_file *file, void *data, gd_type_t data_type, +ssize_t _GD_LzmaRead(struct gd_raw_file_ *file, void *data, gd_type_t data_type, size_t nmemb) { char* output = (char *)data; @@ -283,7 +283,7 @@ return nmemb - nbytes / GD_SIZE(data_type); } -int _GD_LzmaClose(struct _gd_raw_file *file) +int _GD_LzmaClose(struct gd_raw_file_ *file) { struct gd_lzmadata *ptr = (struct gd_lzmadata *)file->edata; @@ -303,8 +303,8 @@ return 0; } -off64_t _GD_LzmaSize(int dirfd, struct _gd_raw_file *file, gd_type_t data_type, - int swap __gd_unused) +off64_t _GD_LzmaSize(int dirfd, struct gd_raw_file_ *file, gd_type_t data_type, + int swap gd_unused_) { struct gd_lzmadata *ptr; off_t n; Modified: trunk/getdata/src/slim.c =================================================================== --- trunk/getdata/src/slim.c 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/src/slim.c 2013-02-14 04:06:02 UTC (rev 794) @@ -35,8 +35,8 @@ /* The slim encoding scheme uses edata as a slimfile pointer. If a file is * open, idata = 0 otherwise idata = -1. */ -int _GD_SlimOpen(int dirfd, struct _gd_raw_file* file, int swap __gd_unused, - unsigned int mode __gd_unused) +int _GD_SlimOpen(int dirfd, struct gd_raw_file_* file, int swap gd_unused_, + unsigned int mode gd_unused_) { char *filepath; @@ -63,8 +63,8 @@ return 0; } -off64_t _GD_SlimSeek(struct _gd_raw_file* file, off64_t count, - gd_type_t data_type, unsigned int mode __gd_unused) +off64_t _GD_SlimSeek(struct gd_raw_file_* file, off64_t count, + gd_type_t data_type, unsigned int mode gd_unused_) { off64_t n; @@ -82,7 +82,7 @@ return n; } -ssize_t _GD_SlimRead(struct _gd_raw_file *restrict file, void *restrict ptr, +ssize_t _GD_SlimRead(struct gd_raw_file_ *restrict file, void *restrict ptr, gd_type_t data_type, size_t nmemb) { ssize_t n; @@ -95,7 +95,7 @@ return n; } -int _GD_SlimClose(struct _gd_raw_file *file) +int _GD_SlimClose(struct gd_raw_file_ *file) { int ret; @@ -112,8 +112,8 @@ return ret; } -off64_t _GD_SlimSize(int dirfd, struct _gd_raw_file *file, gd_type_t data_type, - int swap __gd_unused) +off64_t _GD_SlimSize(int dirfd, struct gd_raw_file_ *file, gd_type_t data_type, + int swap gd_unused_) { char *filepath; off64_t size; Modified: trunk/getdata/src/zzip.c =================================================================== --- trunk/getdata/src/zzip.c 2013-02-06 22:47:39 UTC (rev 793) +++ trunk/getdata/src/zzip.c 2013-02-14 04:06:02 UTC (rev 794) @@ -36,8 +36,8 @@ /* The zzip encoding scheme looks just like the regular ol' C IO. */ int _GD_ZzipName(DIRFILE *restrict D, const char *restrict enc_data, - struct _gd_raw_file *restrict file, const char *restrict base, - int temp __gd_unused, int resolv) + struct gd_raw_file_ *restrict file, const char *restrict base, + int temp gd_unused_, int resolv) { size_t enc_len; @@ -82,8 +82,8 @@ return 0; } -int _GD_ZzipOpen(int dirfd, struct _gd_raw_file* file, int swap __gd_unused, - unsigned int mode __gd_unused) +int _GD_ZzipOpen(int dirfd, struct gd_raw_file_* file, int swap gd_unused_, + unsigned int mode gd_unused_) { char *ptr1, *ptr2; size_t len; @@ -122,8 +122,8 @@ return 0; } -off64_t _GD_ZzipSeek(struct _gd_raw_file* file, off64_t count, - gd_type_t data_type, unsigned int mode __gd_unused) +off64_t _GD_ZzipSeek(struct gd_raw_file_* file, off64_t count, + gd_type_t data_type, unsigned int mode gd_unused_) { off64_t n; @@ -139,7 +139,7 @@ return n; } -ssize_t _GD_ZzipRead(struct _gd_raw_file *restrict file, void *restrict data, +ssize_t _GD_ZzipRead(struct gd_raw_file_ *restrict file, void *restrict data, gd_type_t data_type, size_t nmemb) { ssize_t n; @@ -155,7 +155,7 @@ return n; } -int _GD_ZzipClose(struct _gd_raw_file *file) +int _GD_ZzipClose(struct gd_raw_file_ *file) { int ret; @@ -172,8 +172,8 @@ return ret; } -off64_t _GD_ZzipSize(int dirfd, struct _gd_raw_file *file, gd_type_t data_type, - int swap __gd_unused) +off64_t _GD_ZzipSize(int dirfd, struct gd_raw_file_ *file, gd_type_t data_type, + int swap gd_unused_) { ssize_t len; char *ptr1, *ptr2; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-02-15 03:13:17
|
Revision: 795 http://sourceforge.net/p/getdata/code/795 Author: ketiltrout Date: 2013-02-15 03:13:09 +0000 (Fri, 15 Feb 2013) Log Message: ----------- Matlab docs, standalone Matlab package, &c. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/Makefile.am trunk/getdata/bindings/idl/Makefile.am trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/idl/makedlm.sh.in trunk/getdata/bindings/idl/package/configure.ac trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/matlab/Makefile.am trunk/getdata/bindings/matlab/gd_add.c trunk/getdata/bindings/matlab/gd_add_alias.c trunk/getdata/bindings/matlab/gd_add_bit.m trunk/getdata/bindings/matlab/gd_add_carray.c trunk/getdata/bindings/matlab/gd_add_const.c trunk/getdata/bindings/matlab/gd_add_divide.m trunk/getdata/bindings/matlab/gd_add_lincom.m trunk/getdata/bindings/matlab/gd_add_linterp.m trunk/getdata/bindings/matlab/gd_add_mplex.m trunk/getdata/bindings/matlab/gd_add_multiply.m trunk/getdata/bindings/matlab/gd_add_phase.m trunk/getdata/bindings/matlab/gd_add_polynom.m trunk/getdata/bindings/matlab/gd_add_raw.m trunk/getdata/bindings/matlab/gd_add_recip.m trunk/getdata/bindings/matlab/gd_add_sbit.m trunk/getdata/bindings/matlab/gd_add_spec.c trunk/getdata/bindings/matlab/gd_add_string.c trunk/getdata/bindings/matlab/gd_add_window.m trunk/getdata/bindings/matlab/gd_alias_target.c trunk/getdata/bindings/matlab/gd_aliases.c trunk/getdata/bindings/matlab/gd_alter_affixes.c trunk/getdata/bindings/matlab/gd_alter_bit.m trunk/getdata/bindings/matlab/gd_alter_carray.m trunk/getdata/bindings/matlab/gd_alter_const.m trunk/getdata/bindings/matlab/gd_alter_divide.m trunk/getdata/bindings/matlab/gd_alter_encoding.c trunk/getdata/bindings/matlab/gd_alter_endianness.c trunk/getdata/bindings/matlab/gd_alter_entry.c trunk/getdata/bindings/matlab/gd_alter_frameoffset.c trunk/getdata/bindings/matlab/gd_alter_lincom.m trunk/getdata/bindings/matlab/gd_alter_linterp.m trunk/getdata/bindings/matlab/gd_alter_mplex.m trunk/getdata/bindings/matlab/gd_alter_multiply.m trunk/getdata/bindings/matlab/gd_alter_phase.m trunk/getdata/bindings/matlab/gd_alter_polynom.m trunk/getdata/bindings/matlab/gd_alter_protection.c trunk/getdata/bindings/matlab/gd_alter_raw.m trunk/getdata/bindings/matlab/gd_alter_recip.m trunk/getdata/bindings/matlab/gd_alter_sbit.m trunk/getdata/bindings/matlab/gd_alter_spec.c trunk/getdata/bindings/matlab/gd_alter_window.m trunk/getdata/bindings/matlab/gd_bof.c trunk/getdata/bindings/matlab/gd_carray_len.c trunk/getdata/bindings/matlab/gd_carrays.c trunk/getdata/bindings/matlab/gd_close.c trunk/getdata/bindings/matlab/gd_constants.c trunk/getdata/bindings/matlab/gd_delete.c trunk/getdata/bindings/matlab/gd_delete_alias.c trunk/getdata/bindings/matlab/gd_desync.c trunk/getdata/bindings/matlab/gd_dirfile_standards.c trunk/getdata/bindings/matlab/gd_dirfilename.c trunk/getdata/bindings/matlab/gd_discard.c trunk/getdata/bindings/matlab/gd_encoding.c trunk/getdata/bindings/matlab/gd_endianness.c trunk/getdata/bindings/matlab/gd_entry.c trunk/getdata/bindings/matlab/gd_entry_list.c trunk/getdata/bindings/matlab/gd_entry_type.c trunk/getdata/bindings/matlab/gd_eof.c trunk/getdata/bindings/matlab/gd_error.c trunk/getdata/bindings/matlab/gd_error_string.c trunk/getdata/bindings/matlab/gd_field_list.m trunk/getdata/bindings/matlab/gd_field_list_by_type.m trunk/getdata/bindings/matlab/gd_flags.c trunk/getdata/bindings/matlab/gd_flush.c trunk/getdata/bindings/matlab/gd_fragment_affixes.c trunk/getdata/bindings/matlab/gd_fragment_index.c trunk/getdata/bindings/matlab/gd_fragmentname.c trunk/getdata/bindings/matlab/gd_framenum.c trunk/getdata/bindings/matlab/gd_frameoffset.c trunk/getdata/bindings/matlab/gd_get_carray.c trunk/getdata/bindings/matlab/gd_get_carray_slice.c trunk/getdata/bindings/matlab/gd_get_constant.m trunk/getdata/bindings/matlab/gd_get_string.c trunk/getdata/bindings/matlab/gd_getdata.c trunk/getdata/bindings/matlab/gd_hidden.c trunk/getdata/bindings/matlab/gd_hide.c trunk/getdata/bindings/matlab/gd_invalid_dirfile.c trunk/getdata/bindings/matlab/gd_linterp_tablename.c trunk/getdata/bindings/matlab/gd_madd.c trunk/getdata/bindings/matlab/gd_madd_alias.c trunk/getdata/bindings/matlab/gd_madd_bit.m trunk/getdata/bindings/matlab/gd_madd_carray.c trunk/getdata/bindings/matlab/gd_madd_const.c trunk/getdata/bindings/matlab/gd_madd_divide.m trunk/getdata/bindings/matlab/gd_madd_lincom.m trunk/getdata/bindings/matlab/gd_madd_linterp.m trunk/getdata/bindings/matlab/gd_madd_mplex.m trunk/getdata/bindings/matlab/gd_madd_multiply.m trunk/getdata/bindings/matlab/gd_madd_phase.m trunk/getdata/bindings/matlab/gd_madd_polynom.m trunk/getdata/bindings/matlab/gd_madd_recip.m trunk/getdata/bindings/matlab/gd_madd_sbit.m trunk/getdata/bindings/matlab/gd_madd_spec.c trunk/getdata/bindings/matlab/gd_madd_string.c trunk/getdata/bindings/matlab/gd_madd_window.m trunk/getdata/bindings/matlab/gd_malter_spec.c trunk/getdata/bindings/matlab/gd_matlab.h trunk/getdata/bindings/matlab/gd_mconstants.c trunk/getdata/bindings/matlab/gd_metaflush.c trunk/getdata/bindings/matlab/gd_mfield_list.m trunk/getdata/bindings/matlab/gd_mfield_list_by_type.m trunk/getdata/bindings/matlab/gd_move.c trunk/getdata/bindings/matlab/gd_move_alias.c trunk/getdata/bindings/matlab/gd_mplex_lookback.c trunk/getdata/bindings/matlab/gd_mstrings.c trunk/getdata/bindings/matlab/gd_mvector_list.m trunk/getdata/bindings/matlab/gd_naliases.c trunk/getdata/bindings/matlab/gd_native_type.c trunk/getdata/bindings/matlab/gd_nentries.c trunk/getdata/bindings/matlab/gd_nfields.m trunk/getdata/bindings/matlab/gd_nfields_by_type.m trunk/getdata/bindings/matlab/gd_nfragments.c trunk/getdata/bindings/matlab/gd_nframes.c trunk/getdata/bindings/matlab/gd_nmfields.m trunk/getdata/bindings/matlab/gd_nmfields_by_type.m trunk/getdata/bindings/matlab/gd_nmvectors.m trunk/getdata/bindings/matlab/gd_nvectors.m trunk/getdata/bindings/matlab/gd_open.c trunk/getdata/bindings/matlab/gd_parent_fragment.c trunk/getdata/bindings/matlab/gd_protection.c trunk/getdata/bindings/matlab/gd_put_carray.m trunk/getdata/bindings/matlab/gd_put_carray_slice.c trunk/getdata/bindings/matlab/gd_put_constant.m trunk/getdata/bindings/matlab/gd_put_string.c trunk/getdata/bindings/matlab/gd_putdata.c trunk/getdata/bindings/matlab/gd_raw_close.c trunk/getdata/bindings/matlab/gd_raw_filename.c trunk/getdata/bindings/matlab/gd_reference.c trunk/getdata/bindings/matlab/gd_rename.c trunk/getdata/bindings/matlab/gd_rewrite_fragment.c trunk/getdata/bindings/matlab/gd_seek.c trunk/getdata/bindings/matlab/gd_spf.c trunk/getdata/bindings/matlab/gd_strings.c trunk/getdata/bindings/matlab/gd_strtok.c trunk/getdata/bindings/matlab/gd_sync.c trunk/getdata/bindings/matlab/gd_tell.c trunk/getdata/bindings/matlab/gd_unhide.c trunk/getdata/bindings/matlab/gd_uninclude.c trunk/getdata/bindings/matlab/gd_validate.c trunk/getdata/bindings/matlab/gd_vector_list.m trunk/getdata/bindings/matlab/gd_verbose_prefix.c trunk/getdata/bindings/matlab/getdata_constants.m trunk/getdata/bindings/matlab/matlab.c trunk/getdata/bindings/matlab/test/Makefile.am trunk/getdata/bindings/matlab/test/big_test.m trunk/getdata/configure.ac trunk/getdata/doc/Makefile.am trunk/getdata/m4/matlab.m4 trunk/getdata/m4/python.m4 trunk/getdata/m4/version.m4 Added Paths: ----------- trunk/getdata/bindings/matlab/Contents.m.head trunk/getdata/bindings/matlab/doc.tail trunk/getdata/bindings/matlab/gd_include.c trunk/getdata/bindings/matlab/gd_mcarrays.c trunk/getdata/bindings/matlab/make_contents.sh.in trunk/getdata/bindings/matlab/package/ trunk/getdata/bindings/matlab/package/Makefile.am trunk/getdata/bindings/matlab/package/README trunk/getdata/bindings/matlab/package/configure.ac trunk/getdata/doc/README.matlab Removed Paths: ------------- trunk/getdata/bindings/matlab/gd_include.m trunk/getdata/bindings/matlab/gd_include_affix.c Property Changed: ---------------- trunk/getdata/bindings/matlab/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/ChangeLog 2013-02-15 03:13:09 UTC (rev 795) @@ -1,8 +1,22 @@ -2012-02-02 D. V. Wiebe <ge...@ke...> svn:794 +2012-02-15 D. V. Wiebe <ge...@ke...> svn:795 + * bindings/matlab/package: Added. + * Makefile.am: Add matlabdist and matlabdistcheck + + * doc/README.matlab bindings/matlab/make_contents.sh.in + bindings/matlab/Contents.m.head bindings/matlab/doc.tail: Added. + + * bindinag/matlab/matlab.c (gdmx_from_carrays): Added. + * bindings/matlab/gd_mcarrays.c: Added. + * bindings/matlab/test/big_test.m: Add test 243. + + * bindings/matlab/gd_include.c: Renamed from gd_include_affix.c + * bindings/matlab/gd_include.m: Deleted. + +2012-02-13 D. V. Wiebe <ge...@ke...> svn:794 * bindings/cxx/test/big_test.cpp bindings/perl/t/big_test.t bindings/python/test/big_test.py: Add test 243. -2012-02-02 D. V. Wiebe <ge...@ke...> svn:793 +2012-02-06 D. V. Wiebe <ge...@ke...> svn:793 * src/parse.c (_GD_Tokenise): Don't falsely report an unterminated token when stopping a partial tokenisation on top of a " or \. * test/tok_arg.c test/tok_escape.c test/tok_quote.c: Added. Modified: trunk/getdata/Makefile.am =================================================================== --- trunk/getdata/Makefile.am 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/Makefile.am 2013-02-15 03:13:09 UTC (rev 795) @@ -38,10 +38,45 @@ --with-perl-dir="$$dc_install_base/perl" \ --with-python-module-dir="$$dc_install_base/python" +# matlab-only package +matlabdist: $(DISTFILES) + rm -rf svn_export + svn export $(top_srcdir) svn_export + ( cd svn_export && \ + mkdir matlab_getdata && \ + mkdir matlab_getdata/m4 && \ + mkdir matlab_getdata/src && \ + cp bindings/matlab/package/* matlab_getdata && \ + cp -r bindings/matlab/Makefile.am bindings/matlab/gd_*.[cm] \ + bindings/matlab/matlab.c bindings/matlab/gd_matlab.h bindings/matlab/test \ + bindings/matlab/doc.tail bindings/matlab/Contents.m.head \ + bindings/matlab/make_contents.sh.in \ + matlab_getdata/src && \ + cp -r bindings/make_parameters.c matlab_getdata && \ + cp -r m4/matlab.m4 m4/compiler.m4 m4/version.m4 matlab_getdata/m4 && \ + cp -r doc/README.matlab COPYING AUTHORS ChangeLog INSTALL NEWS \ + matlab_getdata && \ + ( cd matlab_getdata && \ + aclocal -I m4 && \ + libtoolize && \ + autoconf && \ + autoheader && \ + automake --add-missing --force-missing && \ + ./configure && \ + make dist && \ + cp matlab_${distdir}* ../.. \ + ) ) + rm -rf svn_export + +matlabdistcheck: matlab_$(distdir).tar.gz + tar -zxvf $< + cd matlab_$(distdir) && ./configure && make dist && make distcheck + rm -rf matlab_$(distdir) + # idl-only package idldist: $(DISTFILES) rm -rf svn_export - svn export . svn_export + svn export $(top_srcdir) svn_export ( cd svn_export && \ mkdir idl_getdata && \ mkdir idl_getdata/m4 && \ @@ -74,7 +109,7 @@ windist: $(DISTFILES) rm -rf crlf_export cd man && $(MAKE) htmlman - svn --native-eol CRLF export . crlf_export + svn --native-eol CRLF export $(top_srcdir) crlf_export ( cd crlf_export && \ mkdir $(distdir) && \ mkdir $(distdir)/bindings && \ Modified: trunk/getdata/bindings/idl/Makefile.am =================================================================== --- trunk/getdata/bindings/idl/Makefile.am 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/idl/Makefile.am 2013-02-15 03:13:09 UTC (rev 795) @@ -26,7 +26,7 @@ SUBDIRS=test -if GDIDL_EXTERNAL +if GD_EXTERNAL GDIDL_GETDATA_LIBS=$(GETDATA_LIBS) else GDIDL_GETDATA_LIBS=../../src/libgetdata.la Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/idl/getdata.c 2013-02-15 03:13:09 UTC (rev 795) @@ -32,7 +32,7 @@ # include "gd_config.h" #endif -#ifdef GDIDL_EXTERNAL +#ifdef GD_EXTERNAL # include <complex.h> # include <getdata.h> # define dtracevoid() Modified: trunk/getdata/bindings/idl/makedlm.sh.in =================================================================== --- trunk/getdata/bindings/idl/makedlm.sh.in 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/idl/makedlm.sh.in 2013-02-15 03:13:09 UTC (rev 795) @@ -21,11 +21,17 @@ # # @configure_input@ -sed=@SED@ -grep=@GREP@ +GREP=@GREP@ +DATE=@DATE@ opt=$1 in=$2 +if test "x$DATE" == "xnot found"; then + BUILD_DATE="unspecified" +else + BUILD_DATE=`date` +fi + if test "$opt" = "-c"; then cat <<EOF /* This code is automatically generated. Changes made here will be lost. */ @@ -38,13 +44,13 @@ MODULE GETDATA DESCRIPTION IDL GetData bindings VERSION @VERSION@ -BUILD_DATE @BUILD_DATE@ +BUILD_DATE $BUILD_DATE SOURCE The GetData Project <@PACKAGE_BUGREPORT@> STRUCTURE GD_ENTRY EOF fi -grep @@DLM $in | sort -k 5 | { +$GREP @@DLM $in | sort -k 5 | { nfunc=0 nproc=0 while read sc magic type func idl min max key extra; do if test "$opt" = "-c"; then Modified: trunk/getdata/bindings/idl/package/configure.ac =================================================================== --- trunk/getdata/bindings/idl/package/configure.ac 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/idl/package/configure.ac 2013-02-15 03:13:09 UTC (rev 795) @@ -115,7 +115,7 @@ GD_PROG_CC_WALL dnl Declare a few feature test macros -AC_DEFINE([GDIDL_EXTERNAL], [1], [ Define to 1 if building the GetData IDL bindings outside the GetData source tree ]) +AC_DEFINE([GD_EXTERNAL], [1], [ Define to 1 if building the GetData bindings outside the GetData source tree ]) AC_DEFINE([_BSD_SOURCE], [], [ Expose BSD-derived definitions ]) AC_DEFINE([_SVID_SOURCE], [], [ Expose System V-derived definitions ]) AC_DEFINE([_POSIX_SOURCE], [], [ Expose POSIX.1-1990 conforming definitions ]) @@ -204,7 +204,7 @@ AM_CONDITIONAL(LFS_TRANSITIONAL_API, [test "x$gd_cv_type_off64_t" = "xyes"]) AM_CONDITIONAL(TEST_IDL, [test "x$NO_DLOPEN_TESTS" = "x0"]) AM_CONDITIONAL(HAVE_DIFF, [test "x$DIFF" != "x"]) -AM_CONDITIONAL(GDIDL_EXTERNAL, [true]) +AM_CONDITIONAL(GD_EXTERNAL, [true]) dnl we do this here to avoid screwing up other tests LDFLAGS="${LDFLAGS}${NO_UNDEFINED}" Modified: trunk/getdata/bindings/make_parameters.c =================================================================== --- trunk/getdata/bindings/make_parameters.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/make_parameters.c 2013-02-15 03:13:09 UTC (rev 795) @@ -465,8 +465,57 @@ { int i; - fputs("% Copyright (C) 2013 D. V. Wiebe\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" - "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n" + fputs("function GD = getdata_constants()\n", stdout); + + fputs("% GETDATA_CONSTANTS Define GetData symbolic constants\n" + "%\n" + "% GETDATA_CONSTANTS produces a structure containing the symbolic " + "constants\n" + "% used by the GetData bindings. Member names of the structure " + "correspond to\n" + "% names of symbolic constants used in the GetData C API.\n" + "%\n" + "% Although it can be used in immediate context by doing something " + "like\n" + "%\n" + "% >> GETDATA_CONSTANTS.FLOAT64\n" + "%\n" + "% ans =\n" + "%\n" + "% 136\n" + "%\n" + "% it is usually assigned to a variable, which prevents having to " + "evaluate this\n" + "% function more than once. We recommend calling this variable GD:\n" + "%\n" + "% >> GD = GETDATA_CONSTANTS;\n" + "% >> GD.FLOAT64\n" + "%\n" + "% ans =\n" + "%\n" + "% 136\n" + "%\n" + "% providing more succinct symbol names which closely resemble the " + "cor-\n" + "% respondng C API symbol names (e.g. GD_FLOAT64). In the " + "documentation for\n" + "% these bindings, we assume such a GD variable has been defined, and " + "refer to\n" + "% symbolic constants as GD.<...> when necessary.\n" + "%\n" + "% See also GETDATA\n\n", stdout); + + fputs(" GD = struct(...\n" + " 'VERSION', '" VERSION "'", stdout); + + for (i = 0; constant_list[i].lname != NULL; ++i) + printf(", ...\n '%s', int32(%li)", constant_list[i].sname, + constant_list[i].value); + + printf(" ...\n );\nend\n"); + + fputs("\n% Copyright (C) 2013 D. V. Wiebe\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%" + "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n" "% This file is part of the GetData project.\n%\n" "% GetData is free software; you can redistribute it and/or modify it " "under\n" @@ -485,32 +534,7 @@ "License\n" "% along with GetData; if not, write to the Free Software Foundation, " "Inc.,\n" - "% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\n", stdout); - - fputs("% getdata_constants:\n" - "% ------------------\n" - "% This function defines a structure containing various constants used " - "by\n" - "% the GetData MATLAB bindings. Typically it is called by doing " - "something\n" - "% like:\n%\n" - "% >> GD = getdata_constants()\n%\n" - "% which then allows you to use constants like 'GD.RDWR' when required " - "by\n" - "% the bindings.\n%\n" - "% For details on the GetData MATLAB bindings see the file " - "README.matlab\n" - "% distributed with the GetData source.\n", stdout); - - fputs("function GD = getdata_constants()\n" - " GD = struct(...\n" - " 'VERSION', '" VERSION "'", stdout); - - for (i = 0; constant_list[i].lname != NULL; ++i) - printf(", ...\n '%s', int32(%li)", constant_list[i].sname, - constant_list[i].value); - - printf(" ...\n );\nend\n"); + "% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n", stdout); } int main(int argc, char* argv[]) Index: trunk/getdata/bindings/matlab =================================================================== --- trunk/getdata/bindings/matlab 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab 2013-02-15 03:13:09 UTC (rev 795) Property changes on: trunk/getdata/bindings/matlab ___________________________________________________________________ Modified: svn:ignore ## -1,6 +1,98 ## *~ .deps .libs +Contents.m Makefile Makefile.in +make_contents.sh *.mex* +gd_add_alias.m +gd_add.m +gd_add_carray.m +gd_add_const.m +gd_add_spec.m +gd_add_string.m +gd_aliases.m +gd_alias_target.m +gd_alter_affixes.m +gd_alter_encoding.m +gd_alter_endianness.m +gd_alter_entry.m +gd_alter_frameoffset.m +gd_alter_protection.m +gd_alter_spec.m +gd_bof.m +gd_carray_len.m +gd_carrays.m +gd_close.m +gd_constants.m +gd_delete_alias.m +gd_delete.m +gd_desync.m +gd_dirfilename.m +gd_dirfile_standards.m +gd_discard.m +gd_encoding.m +gd_endianness.m +gd_entry.m +gd_entry_list.m +gd_entry_type.m +gd_eof.m +gd_error.m +gd_error_string.m +gd_flags.m +gd_flush.m +gd_fragment_affixes.m +gd_fragment_index.m +gd_fragmentname.m +gd_framenum.m +gd_frameoffset.m +gd_get_carray.m +gd_get_carray_slice.m +gd_getdata.m +gd_get_string.m +gd_hidden.m +gd_hide.m +gd_include_affix.m +gd_invalid_dirfile.m +gd_linterp_tablename.m +gd_madd_alias.m +gd_madd.m +gd_madd_carray.m +gd_madd_const.m +gd_madd_spec.m +gd_madd_string.m +gd_malter_spec.m +gd_mcarrays.m +gd_mconstants.m +gd_metaflush.m +gd_move_alias.m +gd_move.m +gd_mplex_lookback.m +gd_mstrings.m +gd_naliases.m +gd_native_type.m +gd_nentries.m +gd_nfragments.m +gd_nframes.m +gd_open.m +gd_parent_fragment.m +gd_protection.m +gd_put_carray_slice.m +gd_putdata.m +gd_put_string.m +gd_raw_close.m +gd_raw_filename.m +gd_reference.m +gd_rename.m +gd_rewrite_fragment.m +gd_seek.m +gd_spf.m +gd_strings.m +gd_strtok.m +gd_sync.m +gd_tell.m +gd_unhide.m +gd_uninclude.m +gd_validate.m +gd_verbose_prefix.m Added: trunk/getdata/bindings/matlab/Contents.m.head =================================================================== --- trunk/getdata/bindings/matlab/Contents.m.head (rev 0) +++ trunk/getdata/bindings/matlab/Contents.m.head 2013-02-15 03:13:09 UTC (rev 795) @@ -0,0 +1,95 @@ +% These bindings provide light-weight bindings to the GetData C library for +% use withing MATLAB. In general, there is a one-to-one mapping between C API +% functions and matlab functions. Differences in behaviour, where notable, are +% provided in the corresponing function help. +% +% The Dirifle object: +% Dirfile objects returned from GD_OPEN and similar should be treated as +% opaque objects. They should not be used other than when passing to a +% function in these bindings. +% +% GetData symbolic constants: +% Like the underlying C API, the GetData bindings make use of a large number +% of special numbers. For convenience, a struct containing all these numbers +% is provided by the GETDATA_CONSTANTS function, which is typically used by +% doing something like: +% +% >> GD = GETDATA_CONSTANTS; +% +% This then allows the use of these constants as GD.UINT8, GD.RAW_ENTRY, &c., +% which is both shorter than using the function directly, i.e., +% GETDATA_CONSTANTS.UINT8, and also only requires evaluating the +% GETDATA_CONSTANTS function once. +% +% In this documentation, when a reference is made to a GetData symbolic +% constant, it is done so as if the GD variable had been created as above. +% The reader should understand, e.g., GD.UINT8 as referring to the same +% special number as the similarly-named C API's symbolic constant, e.g., +% GD_UINT8. +% +% Input and Output: +% Functions in these GetData bindings produce either one or zero scalar or +% vector outputs, as explained in the corresponding function documentation. +% +% In general, where the C API would allow a NULL string pointer, these +% bindings accept a numeric zero (0) instead of a string input in place of a +% NULL. +% +% Unlike the C Library, real and complex data may be used interchangeably in +% function calls. +% +% Error reporting: +% GetData C Library errors are represented in MATLAB as standard exceptions +% (see MEXCEPTION). In general, GetData functions should be evaluated in a +% TRY ... CATCH ... END block. GetData-specific exceptions can be identified +% through their MEXCEPTION.identifier. The component part of a GetData +% MEXCPETION.identifier will always start with 'GetData:'. +% +% Exceptions representing a GetData C Library error will have the component +% identifier 'GetData:Lib'. Exceptions generated by the bindings themselves +% (almost all of which are failures in data conversion between MATLAB and C +% API data types) will have the component identifier 'GetData:GDMX'. For C +% Library errors, the mnemonic part of the MEXCEPTION.identifier corresponds +% to the C library error code (e.g. 'GetData:Lib:BadCode'). For C Library +% errors, numeric error codes can be obtained using the GD_ERROR function, as +% in the C Library. The return value of GD_ERROR is unspecified after an +% exception in the MATLAB bindings (i.e. a 'GetData:GDMX' exception). +% +% The Entry structure: +% Functions which deal with generic field metadata (GD_ADD, GD_ALTER_ENTRY, +% GD_ENTRY, &c.) use structures mirroring the C API's gd_entry_t object with +% the following exceptions: +% +% * In entries with multiple input fields, .IN_FIELDS is a cell array of +% strings of the appropriate length. For entries with a single input field, +% .IN_FIELDS may be either a simple string or else a cell array of length +% one. +% +% * A distinction is not made between real and complex data. As a result, +% the entry struct for, say, a POLYNOM, stores co-efficients in the .A +% member, regardless of whether they are complex or purely real. As a side +% effect, the structure does not contain a .COMP_SCAL member. +% +% * LINCOM entries don't provide a .N_FIELDS member, nor do POLYNOM entries +% provide a .POLY_ORD member; these values should be determined by +% determining the length of .IN_FIELDS, .M, or .B for LINCOMs or of .A for +% POLYNOMs. +% +% * The .SCALAR and .SCALAR_IND members are provided for field types which +% allow non-literal parameters. Where the C API would have NULL pointers +% in .SCALAR to indicate a literal, the bindings will have a numeric 0 in +% the corresponding .SCALAR cell array element. As with .IN_FIELDS, a +% length-one .SCALAR cell array may be replaced by a scalar. +% +% See gd_entry(3) in section 3 of the UNIX manual for details on the C API's +% gd_entry_t object. +% +% Function list: +% NOTE: accompanying documentation for the functions below in general only +% point out differences in behaviour between these MATLAB bindings and +% the underlying C API function which the MATLAB function wraps. Users +% should also consult the C API documentation, which can be found in +% section 3 of the UNIX manual, e.g. +% +% $ man 3 gd_open +% Modified: trunk/getdata/bindings/matlab/Makefile.am =================================================================== --- trunk/getdata/bindings/matlab/Makefile.am 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/Makefile.am 2013-02-15 03:13:09 UTC (rev 795) @@ -20,22 +20,14 @@ # AUTOMAKE_OPTIONS = foreign -if CXX_WALL -WALL=-Wall -endif - -if CXX_WEXTRA -WEXTRA=-Wextra -endif - -INCLUDES = ${WALL} $(WEXTRA) -I$(top_srcdir)/src - if GETDATA_DEBUG DEBUG_C = ../../src/debug.c endif SUBDIRS=test +matlabdir=$(matlabbasedir)/getdata + matlabfiles=gd_add_bit.m gd_add_divide.m gd_add_lincom.m gd_add_linterp.m \ gd_add_mplex.m gd_add_multiply.m gd_add_phase.m gd_add_polynom.m \ gd_add_raw.m gd_add_recip.m gd_add_sbit.m gd_add_window.m \ @@ -44,7 +36,7 @@ gd_alter_mplex.m gd_alter_multiply.m gd_alter_phase.m \ gd_alter_polynom.m gd_alter_raw.m gd_alter_recip.m gd_alter_sbit.m \ gd_alter_window.m gd_field_list_by_type.m gd_field_list.m \ - gd_get_constant.m gd_include.m gd_madd_bit.m gd_madd_divide.m \ + gd_get_constant.m gd_madd_bit.m gd_madd_divide.m \ gd_madd_lincom.m gd_madd_linterp.m gd_madd_mplex.m \ gd_madd_multiply.m gd_madd_phase.m gd_madd_polynom.m \ gd_madd_recip.m gd_madd_sbit.m gd_madd_window.m \ @@ -66,10 +58,11 @@ gd_fragment_index gd_fragmentname \ gd_framenum gd_frameoffset gd_get_carray gd_get_carray_slice \ gd_getdata gd_get_string \ - gd_hidden gd_hide gd_include_affix gd_invalid_dirfile \ + gd_hidden gd_hide gd_include gd_invalid_dirfile \ gd_linterp_tablename gd_madd gd_madd_alias \ gd_madd_carray gd_madd_const gd_madd_spec gd_madd_string \ - gd_malter_spec gd_mconstants gd_metaflush gd_move gd_move_alias gd_mplex_lookback \ + gd_malter_spec gd_mcarrays \ + gd_mconstants gd_metaflush gd_move gd_move_alias gd_mplex_lookback \ gd_mstrings gd_naliases gd_native_type gd_nentries gd_nfragments \ gd_nframes gd_open gd_parent_fragment gd_protection \ gd_put_carray_slice \ @@ -78,21 +71,45 @@ gd_seek gd_spf gd_strings gd_strtok \ gd_sync gd_tell gd_unhide gd_uninclude gd_validate gd_verbose_prefix -EXTRA_DIST=$(addsuffix .c,${mexfiles}) +matlabcfiles=$(addsuffix .c,${mexfiles}) +matlabmexfiles=$(addsuffix .@mexext@,${mexfiles}) +matlabdocfiles=$(addsuffix .m,${mexfiles}) -matlab_SCRIPTS=$(matlabfiles) -nodist_matlab_SCRIPTS=getdata_constants.m $(addsuffix .@mexext@,${mexfiles}) +EXTRA_DIST=$(matlabcfiles) doc.tail Contents.m.head +dist_matlab_SCRIPTS=$(matlabfiles) +nodist_matlab_SCRIPTS=Contents.m getdata_constants.m $(matlabmexfiles) \ + $(matlabdocfiles) + lib_LTLIBRARIES=libgetdata-matlab.la -libgetdata_matlab_la_SOURCES=matlab.c $(DEBUG_C) gd_matlab.h -libgetdata_matlab_la_LIBADD=../../src/libgetdata.la +libgetdata_matlab_la_SOURCES=matlab.c gd_matlab.h +nodist_libgetdata_matlab_la_SOURCES=$(DEBUG_C) libgetdata_matlab_la_CPPFLAGS=${MATLAB_CPPFLAGS} +libgetdata_matlab_la_LDFLAGS=-version-info @MATLABGETDATA_VERSION@ +if GD_EXTERNAL +libgetdata_matlab_la_LIBADD=$(GETDATA_LIBS) +INCLUDES=$(GETDATA_CFLAGS) +GDMX_LIBS=$(GETDATA_LIBS) +else +libgetdata_matlab_la_LIBADD=../../src/libgetdata.la +INCLUDES=-I${top_srcdir}/src -I../../src +GDMX_LIBS=-L../../src/.libs -lgetdata +endif + +%.m: %.c ${srcdir}/doc.tail + ${GREP} '^ %' $< | ${SED} -e 's/^ //' > $@ + cat ${srcdir}/doc.tail >> $@ + %.@mexext@: %.c libgetdata-matlab.la - ${MEX} -I${top_srcdir}/src -I../../src -L.libs -L../../src/.libs \ - -lgetdata-matlab -lgetdata $< + ${MEX} ${INCLUDES} -L.libs -lgetdata-matlab $(GDMX_LIBS) $< +Contents.m: ${srcdir}/Contents.m.head make_contents.sh $(matlabfiles) \ + $(matlabdocfiles) ${srcdir}/doc.tail + ${SHELL} ./make_contents.sh ${srcdir} > $@ + cat ${srcdir}/doc.tail >> $@ + getdata_constants.m: ../make_parameters ../make_parameters m > $@ @@ -100,4 +117,4 @@ cd .. && ${MAKE} make_parameters clean-local: - rm -rf *.${mexext} + rm -rf $(nodist_matlab_SCRIPTS) Added: trunk/getdata/bindings/matlab/doc.tail =================================================================== --- trunk/getdata/bindings/matlab/doc.tail (rev 0) +++ trunk/getdata/bindings/matlab/doc.tail 2013-02-15 03:13:09 UTC (rev 795) @@ -0,0 +1,20 @@ + +% Copyright (C) 2013 D. V. Wiebe +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% This file is part of the GetData project. +% +% GetData is free software; you can redistribute it and/or modify it under +% the terms of the GNU Lesser General Public License as published by the +% Free Software Foundation; either version 2.1 of the License, or (at your +% option) any later version. +% +% GetData is distributed in the hope that it will be useful, but WITHOUT +% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +% License for more details. +% +% You should have received a copy of the GNU Lesser General Public License +% along with GetData; if not, write to the Free Software Foundation, Inc., +% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Modified: trunk/getdata/bindings/matlab/gd_add.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,23 @@ */ #include "gd_matlab.h" +/* + % GD_ADD Add a field + % + % GD_ADD(DIRFILE,ENTRY) + % adds a field described by ENTRY to the dirfile DIRFILE. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % The ENTRY object should be an entry struct; see GETDATA and gd_entry(3) in + % the UNIX manual for details. + % + % See the documentation on the C API function gd_add(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_MADD, GD_OPEN, GETDATA + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_alias.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add_alias.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_alias.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,21 @@ */ #include "gd_matlab.h" +/* + % GD_ADD_ALIAS Add a field alias + % + % GD_ADD_ALIAS(DIRFILE,NAME,TARGET,FRAGMENT) + % adds a field alias called NAME pointing to TARGET in the metadata + % fragment indexed by FRAGMENT of the dirfile DIRFILE. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_add_alias(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_MADD_ALIAS, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_bit.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_bit.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_bit.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,25 @@ +function gd_add_bit(D, field_code, in_fields, bitnum, numbits, fragment_index) +% GD_ADD_BIT Add a BIT field +% +% GD_ADD_BIT(DIRFILE,NAME,INPUT,BITNUM,NUMBITS,FRAGMENT) +% adds a BIT field called NAME to the dirfile specified by DIRFILE. +% The input field is INPUT, the first bit is BITNUM and the length +% is NUMBITS. The field is added to the fragment indexed by +% FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_bit(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_BIT, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.BIT_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_fields}, ... + 'bitnum', bitnum, 'numbits', numbits)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,10 +39,3 @@ % 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 - -function gd_add_bit(D, field_code, in_fields, bitnum, numbits, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.BIT_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, ... - 'bitnum', bitnum, 'numbits', numbits)); -end Modified: trunk/getdata/bindings/matlab/gd_add_carray.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add_carray.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_carray.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,23 @@ */ #include "gd_matlab.h" +/* + % GD_ADD_CARRAY Add a CARRAY field + % + % GD_ADD_CARRAY(DIRFILE,NAME,TYPE,VALUES,FRAGMENT) + % adds a CARRAY field called NAME to the dirfile specified by + % DIRFILE. The storage type is TYPE, and the values of the field + % are in VALUES. The field is added to the fragment indexed by + % FRAGMENT. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_add_carray(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_ADD, GD_MADD_CARRAY, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_const.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add_const.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_const.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,23 @@ */ #include "gd_matlab.h" +/* + % GD_ADD_CONST Add a CONST field + % + % GD_ADD_CONST(DIRFILE,NAME,TYPE,VALUE,FRAGMENT) + % adds a CONST field called NAME to the dirfile specified by + % DIRFILE. The storage type is TYPE, and the value of the field + % is VALUE. The field is added to the fragment indexed by + % FRAGMENT. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_add_const(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_ADD, GD_MADD_CONST, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_divide.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_divide.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_divide.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,23 @@ +function gd_add_divide(D, field_code, in1, in2, fragment_index) +% GD_ADD_DIVIDE Add a DIVIDE field +% +% GD_ADD_DIVIDE(DIRFILE,NAME,INPUT1,INPUT2,FRAGMENT) +% adds a DIVIDE field called NAME to the dirfile specified by +% DIRFILE. The input fields are INPUT1 and INPUT2 and the field +% is added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_divide(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_DIVIDE, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.DIVIDE_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {{in1; in2}})); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +37,3 @@ % 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 - -function gd_add_divide(D, field_code, in1, in2, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.DIVIDE_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {{in1; in2}})); -end Modified: trunk/getdata/bindings/matlab/gd_add_lincom.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_lincom.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_lincom.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,25 @@ +function gd_add_lincom(D, field_code, in_fields, m, b, fragment_index); +% GD_ADD_LINCOM Add a LINCOM field +% +% GD_ADD_LINCOM(DIRFILE,NAME,INPUTS,M,B,FRAGMENT) +% adds a LINCOM field called NAME to the dirfile specified by +% DIRFILE. The input fields are provided in the cell array INPUTS +% and the slopes and offsets given by the numeric arrays M and B, +% which may be complex valued. The field is added to the fragment +% indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_lincom(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_LINCOM, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.LINCOM_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'm', m, 'b', b)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +39,3 @@ % 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 - -function gd_add_lincom(D, field_code, in_fields, m, b, fragment_index); - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.LINCOM_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'm', m, 'b', b)); -end Modified: trunk/getdata/bindings/matlab/gd_add_linterp.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_linterp.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_linterp.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,24 @@ +function gd_add_linterp(D, field_code, in_field, table, fragment_index); +% GD_ADD_LINTERP Add a LINTERP field +% +% GD_ADD_LINTERP(DIRFILE,NAME,INPUT,TABLE,FRAGMENT) +% adds a LINTERP field called NAME to the dirfile specified by +% DIRFILE. The input field is INPUT and the associated look-up +% table is given by the path TABLE. The field is added to the +% fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_linterp(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_LINTERP, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.LINTERP_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', in_field, 'table', table)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +38,3 @@ % 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 - -function gd_add_linterp(D, field_code, in_fields, table, fragment_index); - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.LINTERP_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', in_fields, 'table', table)); -end Modified: trunk/getdata/bindings/matlab/gd_add_mplex.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,27 @@ +function gd_add_mplex(D, field_code, in_field1, in_field2, count_val, ... +count_max, fragment_index) +% GD_ADD_MPLEX Add a MPLEX field +% +% GD_ADD_MPLEX(DIRFILE,NAME,INPUT1,INPUT2,COUNT_VAL,COUNT_MAX,FRAGMENT) +% adds a MPLEX field called NAME to the dirfile specified by +% DIRFILE. The input data field is INPUT1, the index field is +% INPUT2. The target value is COUNT_VAL and the maximum value of +% INPUT2 is COUNT_MAX. The field is added to the fragment +% indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_mplex(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_MPLEX, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ... + 'count_val', count_val, 'count_max', count_max)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,11 +41,3 @@ % 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 - -function gd_add_mplex(D, field_code, in_field1, in_field2, count_val, ... -count_max, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ... - 'count_val', count_val, 'count_max', count_max)); -end Modified: trunk/getdata/bindings/matlab/gd_add_multiply.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_multiply.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_multiply.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,23 @@ +function gd_add_multiply(D, field_code, in1, in2, fragment_index) +% GD_ADD_MULTIPLY Add a MULTIPLY field +% +% GD_ADD_MULTIPLY(DIRFILE,NAME,INPUT1,INPUT2,FRAGMENT) +% adds a MULTIPLY field called NAME to the dirfile specified by +% DIRFILE. The input fields are INPUT1 and INPUT2 and the field +% is added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_multiply(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_MULTIPLY, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.MULTIPLY_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {{in1; in2}})); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +37,3 @@ % 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 - -function gd_add_multiply(D, field_code, in1, in2, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.MULTIPLY_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {{in1; in2}})); -end Modified: trunk/getdata/bindings/matlab/gd_add_phase.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_phase.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_phase.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,23 @@ +function gd_add_phase(D, field_code, in_fields, shift, fragment_index) +% GD_ADD_PHASE Add a PHASE field +% +% GD_ADD_PHASE(DIRFILE,NAME,INPUT,SHIFT,FRAGMENT) +% adds a PHASE field called NAME to the dirfile specified by +% DIRFILE. The input field is INPUT and the phase shift is SHIFT. +% The field is added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_phase(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_PHASE, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.PHASE_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'shift', shift)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +37,3 @@ % 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 - -function gd_add_phase(D, field_code, in_fields, shift, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.PHASE_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'shift', shift)); -end Modified: trunk/getdata/bindings/matlab/gd_add_polynom.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_polynom.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_polynom.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,24 @@ +function gd_add_polynom(D, field_code, in_field, a, fragment_index); +% GD_ADD_POLYNOM Add a POLYNOM field +% +% GD_ADD_POLYNOM(DIRFILE,NAME,INPUT,A,FRAGMENT) +% adds a POLYNOM field called NAME to the dirfile specified by +% DIRFILE. The input field is INPUT and the co-efficients are +% given in the numerical array A, which may be complex valued. +% The field is added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_polynom(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_POLYNOM, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.POLYNOM_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_field}, 'a', a)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +38,3 @@ % 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 - -function gd_add_polynom(D, field_code, in_fields, a, fragment_index); - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.POLYNOM_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'a', a)); -end Modified: trunk/getdata/bindings/matlab/gd_add_raw.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_raw.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_raw.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,25 @@ +function gd_add_raw(D, field_code, data_type, spf, fragment_index) +% GD_ADD_RAW Add a RAW field +% +% GD_ADD_RAW(DIRFILE,NAME,TYPE,SPF,FRAGMENT) +% adds a RAW field called NAME to the dirfile specified by +% DIRFILE. The type of the raw data is given by TYPE, which should +% be one of the data types provided by GETDATA_CONSTANTS(). The +% samples-per-frame of the field is given by SPF. The field is +% added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_raw(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.RAW_ENTRY, ... + 'fragment_index', fragment_index, 'data_type', data_type, 'spf', spf)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,9 +39,3 @@ % 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 - -function gd_add_raw(D, field_code, data_type, spf, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.RAW_ENTRY, ... - 'fragment_index', fragment_index, 'data_type', data_type, 'spf', spf)); -end Modified: trunk/getdata/bindings/matlab/gd_add_recip.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_recip.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_recip.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,24 @@ +function gd_add_recip(D, field_code, in_field, dividend, fragment_index) +% GD_ADD_RECIP Add a RECIP field +% +% GD_ADD_RECIP(DIRFILE,NAME,INPUT,DIVIDEND,FRAGMENT) +% adds a RECIP field called NAME to the dirfile specified by +% DIRFILE. The scalar dividend is DIVIDEND, which may be complex +% valued. The field is added to the fragment indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_recip(3) in section 3 of +% the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_RECIP, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.RECIP_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_field}, ... + 'dividend', dividend)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,10 +38,3 @@ % 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 - -function gd_add_recip(D, field_code, in_fields, dividend, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.RECIP_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, ... - 'dividend', dividend)); -end Modified: trunk/getdata/bindings/matlab/gd_add_sbit.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_sbit.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_sbit.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,25 @@ +function gd_add_sbit(D, field_code, in_fields, bitnum, numbits, fragment_index) +% GD_ADD_SBIT Add a SBIT field +% +% GD_ADD_SBIT(DIRFILE,NAME,INPUT,BITNUM,NUMBITS,FRAGMENT) +% adds a SBIT field called NAME to the dirfile specified by DIRFILE. +% The input field is INPUT, the first bit is BITNUM and the length +% is NUMBITS. The field is added to the fragment indexed by +% FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_sbit(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_SBIT, GD_OPEN + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.SBIT_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {in_fields}, ... + 'bitnum', bitnum, 'numbits', numbits)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,10 +39,3 @@ % 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 - -function gd_add_sbit(D, field_code, in_fields, bitnum, numbits, fragment_index) - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.SBIT_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {in_fields}, ... - 'bitnum', bitnum, 'numbits', numbits)); -end Modified: trunk/getdata/bindings/matlab/gd_add_spec.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add_spec.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_spec.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,22 @@ */ #include "gd_matlab.h" +/* + % GD_ADD_SPEC Add a field + % + % GD_ADD_SPEC(DIRFILE,SPEC,FRAGMENT) + % adds a field described by the field specification line SPEC to + % the dirfile DIRFILE. The field is added to the fragment indexed + % by FRAGMENT. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_add_spec(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_ADD, GD_MADD_SPEC, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_string.c =================================================================== --- trunk/getdata/bindings/matlab/gd_add_string.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_string.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,22 @@ */ #include "gd_matlab.h" +/* + % GD_ADD_STRING Add a STRING field + % + % GD_ADD_STRING(DIRFILE,NAME,VALUE,FRAGMENT) + % adds a STRING field called NAME to the dirfile specified by + % DIRFILE. The value of the field is set to VALUE. The field is + % added to the fragment indexed by FRAGMENT. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_add_string(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_ADD, GD_MADD_STRING, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_add_window.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_window.m 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_add_window.m 2013-02-15 03:13:09 UTC (rev 795) @@ -1,3 +1,28 @@ +function gd_add_window(D, field_code, in_field1, in_field2, windop, ... +threshold, fragment_index); +% GD_ADD_WINDOW Add a WINDOW field +% +% GD_ADD_WINDOW(DIRFILE,NAME,INPUT1,INPUT2,WINDOP,THRESHOLD,FRAGMENT) +% adds a WINDOW field called NAME to the dirfile specified by +% DIRFILE. The data input field is INPUT1, and the mask field is +% INPUT2. The operator is specified by WINDOP, which should be one +% of the GD.WINDOP_... members provided by GETDATA_CONSTANTS, and +% the threshold is THRESHOLD. The field is added to the fragment +% indexed by FRAGMENT. +% +% The DIRFILE object should have previously been created with GD_OPEN. +% +% See the documentation on the C API function gd_add_window(3) in section 3 +% of the UNIX manual for more details. +% +% See also GD_ADD, GD_MADD_WINDOW, GD_OPEN, GETDATA_CONSTANTS + + GD = getdata_constants(); + gd_add(D, struct('field', field_code, 'field_type', GD.WINDOW_ENTRY, ... + 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ... + 'windop', windop, 'threshold', threshold)); +end + % Copyright (C) 2013 D. V. Wiebe % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -17,11 +42,3 @@ % 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 - -function gd_add_window(D, field_code, in_field1, in_field2, windop, ... -threshold, fragment_index); - GD = getdata_constants(); - gd_add(D, struct('field', field_code, 'field_type', GD.WINDOW_ENTRY, ... - 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ... - 'windop', windop, 'threshold', threshold)); -end Modified: trunk/getdata/bindings/matlab/gd_alias_target.c =================================================================== --- trunk/getdata/bindings/matlab/gd_alias_target.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_alias_target.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,20 @@ */ #include "gd_matlab.h" +/* + % GD_ALIAS_TARGET Report the target of an /ALIAS + % + % T = GD_ALIAS_TARGET(DIRFILE,NAME) + % returns the target, T, of the alias named NAME. + % + % The DIRFILE object should have previously been created with GD_OPEN. + % + % See the documentation on the C API function gd_alias_target(3) in section 3 + % of the UNIX manual for more details. + % + % See also GD_ALIASES, GD_OPEN + */ + void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]) { DIRFILE *D; Modified: trunk/getdata/bindings/matlab/gd_aliases.c =================================================================== --- trunk/getdata/bindings/matlab/gd_aliases.c 2013-02-14 04:06:02 UTC (rev 794) +++ trunk/getdata/bindings/matlab/gd_aliases.c 2013-02-15 03:13:09 UTC (rev 795) @@ -20,6 +20,21 @@ */ #include "gd_matlab.h" +/* + % GD_ALIASES Retrieve a list of aliases for a field + % + % A = GD_ALIASES(DIRFILE,NAME) + % returns a cell array of strings, A, comprising all the aliases of + % ... [truncated message content] |
From: <ket...@us...> - 2013-03-08 01:38:10
|
Revision: 802 http://sourceforge.net/p/getdata/code/802 Author: ketiltrout Date: 2013-03-08 01:38:05 +0000 (Fri, 08 Mar 2013) Log Message: ----------- Enable fast unaligned access on ARMv6 and later (reported by Dinar Valeev). Also, add a configure option to override the check for same. Minor bugfixes, doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/configure.ac trunk/getdata/m4/encoding.m4 trunk/getdata/m4/idl.m4 trunk/getdata/m4/matlab.m4 trunk/getdata/m4/perl.m4 trunk/getdata/m4/python.m4 trunk/getdata/man/Makefile.am trunk/getdata/man/gd_getdata.3 trunk/getdata/man/gd_putdata.3 trunk/getdata/src/encoding.c trunk/getdata/src/getdata.h.in trunk/getdata/src/internal.h trunk/getdata/test/gzip_move_to.c Added Paths: ----------- trunk/getdata/man/GD_SIZE.3 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/ChangeLog 2013-03-08 01:38:05 UTC (rev 802) @@ -1,3 +1,14 @@ +2012-03-08 D. V. Wiebe <ge...@ke...> svn:803 + * src/internal.h (gd_put_unalinged64): Fix spelling. + + * src/encoding.c (_GD_FiniRawIO): Don't pass NULL to gd_UnlinkAt. + + * man/GD_SIZE.3: Added. + + * configure.ac: Turn on fast unaligned access for armv[6789] per Dinar + Valeev. Also add add --enable-fast-unaligned to allow users to override the + check. + 2012-02-15 D. V. Wiebe <ge...@ke...> svn:795 * bindings/matlab/package: Added. * Makefile.am: Add matlabdist and matlabdistcheck Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/configure.ac 2013-03-08 01:38:05 UTC (rev 802) @@ -21,7 +21,8 @@ m4_include([m4/version.m4]) -AC_INIT([GetData],[getdata_version],[get...@li...]) +AC_INIT([GetData],[getdata_version],[get...@li...],, + [http://getdata.sourceforge.net/]) AC_COPYRIGHT( [Parts of this program are copyright (C) 2008-2013 D. V. Wiebe. @@ -297,7 +298,7 @@ dnl LTDL AC_ARG_WITH([ltdl], AS_HELP_STRING([--with-ltdl=PREFIX], [if building modules, use the GNU ltdl library located in - PREFIX [autodetect]]), + PREFIX [default: autodetect]]), [ case "${withval}" in no) ltdl_prefix= ;; @@ -348,15 +349,40 @@ echo echo "*** Checking host environment" echo + +dnl unaligned memory access +dnl user knows best +AC_ARG_ENABLE([fast-unaligned], AS_HELP_STRING([--enable-fast-unaligned], + [use fast loads and stores with non-aligned data. WARNING: Enabling this on ] + [a platform which does not support fast unaligned memory access may cause ] + [the library to silently corrupt data. [default: autodetect]]), + [ + case "${enableval}" in + yes) gd_unaligned_override="yes" ;; + no) gd_unaligned_override="no" ;; + *) gd_unaligned_override="check" ;; + esac + ], [gd_unaligned_override="check"]) + AC_MSG_CHECKING([whether ${host} supports fast unaligned memory access]) -case "${host}" in - i?86-*-*|powerpc*-*-*|x86_64-*-*) gd_unaligned_ok=yes; +if test "x$gd_unaligned_override" = "xyes"; then + gd_unaligned_ok=yes + AC_MSG_RESULT([yes (forced)]) +elif test "x$gd_unaligned_override" = "xno"; then + gd_unaligned_ok=no + AC_MSG_RESULT([no (forced)]) +else + case "${host}" in + i?86-*-*|powerpc*-*-*|x86_64-*-*|armv[6789]*-*-*) gd_unaligned_ok=yes ;; + *) gd_unaligned_ok=no ;; + esac + AC_MSG_RESULT([$gd_unaligned_ok]) +fi + +if test "x$gd_unaligned_ok" = "xyes"; then AC_DEFINE([UNALIGNED_ACCESS_OK], [1], [Define to 1 if the platform supports fast unaligned memory access]) - ;; - *) gd_unaligned_ok=no ;; -esac -AC_MSG_RESULT([$gd_unaligned_ok]) +fi dnl FDIRSEP is used in Fortran, where '\' should not be escaped. AC_MSG_CHECKING([the directory separator]) @@ -367,7 +393,7 @@ AC_SUBST([GD_FDIRSEP]) AC_SUBST([GD_DIRSEP]) AC_DEFINE_UNQUOTED([GD_DIRSEP], ['$GD_DIRSEP'], - [ The separator between directory elements ]) + [ The directory separator between path elements ]) AC_MSG_RESULT([$GD_FDIRSEP]) case "${host}" in @@ -482,6 +508,16 @@ AC_CHECK_HEADERS(ltdl.h) LIBLTDL="-lltdl" fi + + dnl pthread + AC_SEARCH_LIBS([pthread_mutex_lock],[pthread], + [use_pthread=yes + AC_DEFINE([USE_PTHREAD], [], + [Define if you have a POSIX compliant thread ] + [library]) + ], + [use_pthread=no]) + AC_CHECK_HEADERS(pthread.h) fi AC_SUBST([LIBLTDL]) AC_SUBST([LTDLINCL]) @@ -569,17 +605,6 @@ echo AC_SEARCH_LIBS([ceil],[m]) -dnl pthread -if test "x${use_modules}" != "xno"; then - AC_SEARCH_LIBS([pthread_mutex_lock],[pthread], - [use_pthread=yes - AC_DEFINE([USE_PTHREAD], [], - [Define if you have a POSIX compliant thread library]) - ], - [use_pthread=no]) - AC_CHECK_HEADERS(pthread.h) -fi - dnl headers echo echo "*** Looking for additional header files" @@ -734,8 +759,8 @@ 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 \ - symlink _unlink unlinkat _write]) + _snprintf stat64 _stat64 _strtoi64 strtoll strtoq _strtoui64 \ + strtoull strtouq symlink _unlink unlinkat _write]) if test "x$disable_c99" = "xno"; then AC_CHECK_FUNCS([cabs]) fi @@ -1133,6 +1158,7 @@ echo " ANSI C compatibility mode: ${disable_c99}" echo " Legacy API: ${include_legacy_api}" echo " Verbose debugging: ${enable_debug}" +echo " Fast unaligned memory access: ${gd_unaligned_ok}" echo " Use modules: ${use_modules}" if test "x${use_modules}" != "xno"; then echo " Thread-safe dynamic loading: ${use_pthread}" Modified: trunk/getdata/m4/encoding.m4 =================================================================== --- trunk/getdata/m4/encoding.m4 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/m4/encoding.m4 2013-03-08 01:38:05 UTC (rev 802) @@ -28,7 +28,7 @@ have_this_lib= m4_define([gd_encoding], [$1]) AC_ARG_WITH([lib$2], AS_HELP_STRING([--with-lib$2=PREFIX], - [use the lib$2 installed in PREFIX [autodetect]]), + [use the lib$2 installed in PREFIX [default: autodetect]]), [ case "${withval}" in no) use_[]gd_encoding="no" ;; Modified: trunk/getdata/m4/idl.m4 =================================================================== --- trunk/getdata/m4/idl.m4 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/m4/idl.m4 2013-03-08 01:38:05 UTC (rev 802) @@ -46,7 +46,7 @@ [ idl_min_version=$1 AC_ARG_WITH([idl], AS_HELP_STRING([--with-idl=PATH], - [use the IDL interpreter located in PATH [autodetect]]), + [use the IDL interpreter located in PATH [default: autodetect]]), [ case "${withval}" in no) have_idl="no" ;; @@ -57,7 +57,7 @@ AC_ARG_WITH([idl-dlm-dir], AS_HELP_STRING([--with-idl-dlm-dir=PATH], - [install the IDL bindings into PATH [autodetect]]), + [install the IDL bindings into PATH [default: autodetect]]), [ case "${withval}" in no) local_idl_dlm_path= ;; Modified: trunk/getdata/m4/matlab.m4 =================================================================== --- trunk/getdata/m4/matlab.m4 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/m4/matlab.m4 2013-03-08 01:38:05 UTC (rev 802) @@ -25,12 +25,13 @@ [ dnl --without-mex basically does the same as --disable-matlab AC_ARG_WITH([mex], AS_HELP_STRING([--with-mex=PATH], - [use the MATLAB MEX compiler located at PATH. [autodetect]]), + [use the MATLAB MEX compiler located at PATH. ] + [[default: autodetect]]), [ case "${withval}" in - (no) have_matlab="no" ;; - (yes) user_mex= ;; - (*) user_mex="${withval}";; + no) have_matlab="no" ;; + yes) user_mex= ;; + *) user_mex="${withval}";; esac ], [ user_mex= ]) @@ -88,12 +89,13 @@ [ dnl --without-matlab basically does the same as --disable-matlab AC_ARG_WITH([matlab], AS_HELP_STRING([--with-matlab=PATH], - [use the MATLAB interpreter located at PATH. [autodetect]]), + [use the MATLAB interpreter located at PATH. ] + [[default: autodetect]]), [ case "${withval}" in - (no) have_matlab="no" ;; - (yes) user_matlab= ; have_matlab= ;; - (*) user_matlab="${withval}"; have_matlab= ;; + no) have_matlab="no" ;; + yes) user_matlab= ; have_matlab= ;; + *) user_matlab="${withval}"; have_matlab= ;; esac ], [ user_matlab=; have_matlab= ]) @@ -131,11 +133,12 @@ dnl installdir default_matlabbasedir=$libdir/getdata/matlab AC_ARG_WITH([matlab-dir], AS_HELP_STRING([--with-matlab-dir=PATH], - [ Install Matlab bindings in PATH/getdata. [LIBDIR/getdata/matlab] ]), + [ Install Matlab bindings in PATH/getdata. ] + [[default: LIBDIR/getdata/matlab]]), [ case "${withval}" in - (no) matlabbasedir=$default_matlabbasedir ;; - (*) matlabbasedir="${withval}" + no) matlabbasedir=$default_matlabbasedir ;; + *) matlabbasedir="${withval}" ;; esac ], [ matlabbasedir=$default_matlabbasedir ]) AC_MSG_CHECKING([matlab install directory]) Modified: trunk/getdata/m4/perl.m4 =================================================================== --- trunk/getdata/m4/perl.m4 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/m4/perl.m4 2013-03-08 01:38:05 UTC (rev 802) @@ -87,12 +87,12 @@ dnl --without-perl basically does the same as --disable-perl AC_ARG_WITH([perl], AS_HELP_STRING([--with-perl=PATH], - [use the Perl interpreter located in PATH. [autodetect]]), + [use the Perl interpreter located in PATH. [default: autodetect]]), [ case "${withval}" in - (no) have_perl="no" ;; - (yes) user_perl= ; have_perl= ;; - (*) user_perl="${withval}"; have_perl= ;; + no) have_perl="no" ;; + yes) user_perl= ; have_perl= ;; + *) user_perl="${withval}"; have_perl= ;; esac ], [ user_perl=; have_perl= ]) @@ -141,12 +141,12 @@ [ Install Perl bindings in PATH. If PATH is the special word `vendor', install Perl bindings into the default vendor-specific module directory (if present). If PATH is the special word `site', install Perl bindings into the default -site-specific module directory. [site] ]), +site-specific module directory. [default: site] ]), [ case "${withval}" in - (vendor|site) perl_inst_type="${withval}" ;; - (no) perl_inst_type="site" ;; - (*) perl_inst_type="local"; local_perl_path="${withval}" + vendor|site) perl_inst_type="${withval}" ;; + no) perl_inst_type="site" ;; + *) perl_inst_type="local"; local_perl_path="${withval}" ;; esac ], [ perl_inst_type="site" ]) Modified: trunk/getdata/m4/python.m4 =================================================================== --- trunk/getdata/m4/python.m4 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/m4/python.m4 2013-03-08 01:38:05 UTC (rev 802) @@ -40,7 +40,7 @@ dnl --without-python basically does the same as --disable-python AC_ARG_WITH([python], AS_HELP_STRING([--with-python=PATH], - [use the Python interpreter located in PATH [autodetect]]), + [use the Python interpreter located in PATH [default: autodetect]]), [ case "${withval}" in no) have_python="no" ;; @@ -50,7 +50,7 @@ ], [ user_python=; have_python= ]) AC_ARG_WITH([python-module-dir], AS_HELP_STRING([--with-python-module-dir=PATH], - [install the Python bindings into PATH [autodetect]]), + [install the Python bindings into PATH [default: autodetect]]), [ case "${withval}" in no) local_python_modpath= ;; Added: trunk/getdata/man/GD_SIZE.3 =================================================================== --- trunk/getdata/man/GD_SIZE.3 (rev 0) +++ trunk/getdata/man/GD_SIZE.3 2013-03-08 01:38:05 UTC (rev 802) @@ -0,0 +1,59 @@ +.\" GD_SIZE.3. The GD_SIZE man page. +.\" +.\" Copyright (C) 2013 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_SIZE 3 "20 February 2013" "Version 0.8.3" "GETDATA" +.SH NAME +GD_SIZE \(em report the size of a GetData data sample +.SH SYNOPSIS +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "int GD_SIZE(gd_type_t " type ); +.hy +.ad n +.SH DESCRIPTION +The +.BR GD_SIZE () +preprocessor macro returns the size (in bytes) of a single sample of data of the type +specified by +.IR type , +which should be one of the symbols +.IP +.nh +.ad l +.BR GD_NULL ", " GD_UINT8 ", " GD_INT8 ", " GD_UINT16 ", " GD_INT16 , +.BR GD_UINT32 ", " GD_INT32 ", " GD_FLOAT32 ", " GD_FLOAT64 ", " GD_COMPLEX64 , +.BR GD_COMPLEX128 ", " GD_UNKNOWN . +.ad n +.hy +.PP +Passing +.B GD_NULL +or +.B GD_UNKNOWN +to this macro will return zero. For the other types, the value returned is simply the bit-size encoded +in the type symbol divided by eight, so, e.g., +.B GD_SIZE(GD_COMPLEX64) +will return 8. +.PP +No error checking is performed on +.IR type : +behaviour resulting from passing something other than the symbols listed above to this macro is unspecified. +See +.BR gd_getdata (3) +for the meaning of the above symbols. +.SH SEE ALSO +.BR gd_getdata (3) Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/man/Makefile.am 2013-03-08 01:38:05 UTC (rev 802) @@ -46,7 +46,7 @@ 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 \ gd_tell64.3 gd_uninclude.3 gd_validate.3 gd_verbose_prefix.3 \ - dirfile.5 dirfile-encoding.5 dirfile-format.5 + GD_SIZE.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_getdata.3 =================================================================== --- trunk/getdata/man/gd_getdata.3 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/man/gd_getdata.3 2013-03-08 01:38:05 UTC (rev 802) @@ -371,4 +371,5 @@ .BR gd_raw_close (3), .BR gd_seek (3), .BR gd_spf (3), -.BR gd_putdata (3) +.BR gd_putdata (3), +.BR GD_SIZE (3) Modified: trunk/getdata/man/gd_putdata.3 =================================================================== --- trunk/getdata/man/gd_putdata.3 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/man/gd_putdata.3 2013-03-08 01:38:05 UTC (rev 802) @@ -263,4 +263,5 @@ .BR gd_put_carray (3), .BR gd_put_constant (3), .BR gd_seek (3), -.BR gd_spf (3) +.BR gd_spf (3), +.BR GD_SIZE (3) Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/src/encoding.c 2013-03-08 01:38:05 UTC (rev 802) @@ -425,7 +425,8 @@ if (oop_write || clotemp) { if (flags & GD_FINIRAW_DISCARD) { /* Throw away the temporary file */ - if (gd_UnlinkAt(D, D->fragment[fragment].dirfd, E->e->u.raw.file[1].name, + if (E->e->u.raw.file[1].name != NULL && + gd_UnlinkAt(D, D->fragment[fragment].dirfd, E->e->u.raw.file[1].name, 0)) { if (D->error == GD_E_OK) Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/src/getdata.h.in 2013-03-08 01:38:05 UTC (rev 802) @@ -295,7 +295,7 @@ #define GD_SIZE32 0x004 #define GD_SIZE64 0x008 #define GD_SIZE128 0x010 -#define GD_SIZE(x) (x & 0x01f) +#define GD_SIZE(x) ((x) & 0x01f) #define GD_SIGNED 0x020 #define GD_IEEE754 0x080 Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/src/internal.h 2013-03-08 01:38:05 UTC (rev 802) @@ -313,7 +313,7 @@ #if defined HAVE_DECL_PUT_UNALIGNED && HAVE_DECL_PUT_UNALIGNED == 1 #define gd_put_unaligned64 put_unaligned #else -gd_static_inline_ int64_t gd_put_unalinged64(int64_t v, void *p) +gd_static_inline_ int64_t gd_put_unaligned64(int64_t v, void *p) { memcpy(p, &v, 8); return v; @@ -338,12 +338,12 @@ /* Internal type conventions: * * - samples per frame is always unsigned int - * - variables holding offsets or file sizes should be of type off64_t (which - * may be simply off_t, depending on local LFS support) + * - variables holding offsets or file sizes should be of type gd_off64_t + * (which may be simply off_t, if it's the right size) * - variables holding object sizes or counts of items read or written should * be of type size_t * - public functions taking or returning types of off64_t should have both - * a off_t prototype and an off64_t type prototype. + * a off_t prototype and a gd_off64_t type prototype. */ #ifndef __attribute_malloc__ @@ -464,6 +464,8 @@ # define gd_strtoll _strtoi64 #elif defined(HAVE_STRTOLL) # define gd_strtoll strtoll +#elif defined(HAVE_STRTOQ) +# define gd_strtoll strtoq #else # define gd_strtoll strtol #endif @@ -472,6 +474,8 @@ # define gd_strtoull _strtoi64 #elif defined(HAVE_STRTOULL) # define gd_strtoull strtoull +#elif defined(HAVE_STRTOUQ) +# define gd_strtoll strtouq #else # define gd_strtoull strtoul #endif Modified: trunk/getdata/test/gzip_move_to.c =================================================================== --- trunk/getdata/test/gzip_move_to.c 2013-03-07 04:37:18 UTC (rev 801) +++ trunk/getdata/test/gzip_move_to.c 2013-03-08 01:38:05 UTC (rev 802) @@ -85,6 +85,7 @@ /* uncompress */ snprintf(command, 4096, "%s -f %s > /dev/null", GUNZIP, data_gz); if (gd_system(command)) { + fprintf(stderr, "command failed: %s\n", command); r = 1; } else { fd = open(data_raw, O_RDONLY | O_BINARY); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-03-08 03:45:26
|
Revision: 806 http://sourceforge.net/p/getdata/code/806 Author: ketiltrout Date: 2013-03-08 03:45:23 +0000 (Fri, 08 Mar 2013) Log Message: ----------- GetData-0.8.3rc1. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/RELEASE_NOTES.in trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-08 03:38:17 UTC (rev 805) +++ trunk/getdata/ChangeLog 2013-03-08 03:45:23 UTC (rev 806) @@ -1,3 +1,6 @@ +2012-03-08 D. V. Wiebe <ge...@ke...> svn:806 + GetData-0.8.3rc1. + 2012-03-08 D. V. Wiebe <ge...@ke...> svn:803 * src/internal.h (gd_put_unalinged64): Fix spelling. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-03-08 03:38:17 UTC (rev 805) +++ trunk/getdata/NEWS 2013-03-08 03:45:23 UTC (rev 806) @@ -1,4 +1,4 @@ -New in version 0.8.3a: +New in version 0.8.3rc1: Library Changes: @@ -16,6 +16,8 @@ Bindings Changes: * Bindings for MATLAB have been added. + * The IDL, Perl, and Python bindings no longer require a C99 compiler to be + built. |==============================================================================| Modified: trunk/getdata/RELEASE_NOTES.in =================================================================== --- trunk/getdata/RELEASE_NOTES.in 2013-03-08 03:38:17 UTC (rev 805) +++ trunk/getdata/RELEASE_NOTES.in 2013-03-08 03:45:23 UTC (rev 806) @@ -1,8 +1,8 @@ -GetData 0.8.2 is known to compile and pass the test suite on the following +GetData 0.8.3 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: -* x86, x86_64, ARM under (variously) Debian, Slackware, Ubuntu +* x86, x86_64, ARM under (variously) Debian, Slackware, Ubuntu, RHEL MacOS X: * x86 and x86_64, using Xcode 3.2/gcc 4.2, under MacOS X Snow Leopard Cygwin: @@ -14,19 +14,18 @@ * 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 and IDL 7.1. +The Perl bindings have been tested with Perl 5.8 through Perl 5.16. +The MATLAB bindings have been tested with MATLAB R2009b and MATLAB R2012a. -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.8.2.tar.bz2/.gz: the full source code to the library, with +Four packages are available: +* getdata-0.8.3.tar.bz2/.gz: the full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.) -* getdata_win-0.8.2.zip: a reduced source code package, with the CMake +* getdata_win-0.8.3.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 @@ -35,11 +34,16 @@ 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.2.tar.bz2/.gz: the Interactive Data Language (IDL) +* idl_getdata-0.8.3.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. +* matlab_getdata-0.8.3.tar.bz2/.gz: the MATLAB bindings, packaged separately + with an autotools build system, designed to be built against an already + installed version of GetData. Due to licensing restrictions, pre-built + packages rarely come with these bindings, and this package allows end-users + to add support for MATLAB without having to recompile the whole GetData + package. --------------------------------------------------------------------------- Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-03-08 03:38:17 UTC (rev 805) +++ trunk/getdata/m4/version.m4 2013-03-08 03:45:23 UTC (rev 806) @@ -21,14 +21,14 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 3) -m4_define(getdata_extra, [a]) +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, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 1) +m4_define(getdata_impl_revision, 2) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-03-09 01:55:16
|
Revision: 807 http://sourceforge.net/p/getdata/code/807 Author: ketiltrout Date: 2013-03-09 01:55:11 +0000 (Sat, 09 Mar 2013) Log Message: ----------- C89-ify the GD_VERS_... constants. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/flush.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-08 03:45:23 UTC (rev 806) +++ trunk/getdata/ChangeLog 2013-03-09 01:55:11 UTC (rev 807) @@ -1,3 +1,6 @@ +2012-03-09 D. V. Wiebe <ge...@ke...> svn:807 + * src/flush.c: C89-ify the GD_VERS_... constants. + 2012-03-08 D. V. Wiebe <ge...@ke...> svn:806 GetData-0.8.3rc1. Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2013-03-08 03:45:23 UTC (rev 806) +++ trunk/getdata/src/flush.c 2013-03-09 01:55:11 UTC (rev 807) @@ -966,26 +966,26 @@ return ret; } -#define GD_VERS_GE_1 0xFFFFFFFFFFFFFFFELLU -#define GD_VERS_GE_2 0xFFFFFFFFFFFFFFFCLLU -#define GD_VERS_GE_3 0xFFFFFFFFFFFFFFF8LLU -#define GD_VERS_GE_4 0xFFFFFFFFFFFFFFF0LLU -#define GD_VERS_GE_5 0xFFFFFFFFFFFFFFE0LLU -#define GD_VERS_GE_6 0xFFFFFFFFFFFFFFC0LLU -#define GD_VERS_GE_7 0xFFFFFFFFFFFFFF80LLU -#define GD_VERS_GE_8 0xFFFFFFFFFFFFFF00LLU -#define GD_VERS_GE_9 0xFFFFFFFFFFFFFE00LLU +#define GD_VERS_GE_1 0xFFFFFFFEUL +#define GD_VERS_GE_2 0xFFFFFFFCUL +#define GD_VERS_GE_3 0xFFFFFFF8UL +#define GD_VERS_GE_4 0xFFFFFFF0UL +#define GD_VERS_GE_5 0xFFFFFFE0UL +#define GD_VERS_GE_6 0xFFFFFFC0UL +#define GD_VERS_GE_7 0xFFFFFF80UL +#define GD_VERS_GE_8 0xFFFFFF00UL +#define GD_VERS_GE_9 0xFFFFFE00UL -#define GD_VERS_LE_0 0x0000000000000001LLU -#define GD_VERS_LE_1 0x0000000000000003LLU -#define GD_VERS_LE_2 0x0000000000000007LLU -#define GD_VERS_LE_3 0x000000000000000fLLU -#define GD_VERS_LE_4 0x000000000000001fLLU -#define GD_VERS_LE_5 0x000000000000003fLLU -#define GD_VERS_LE_6 0x000000000000007fLLU -#define GD_VERS_LE_7 0x00000000000000ffLLU -#define GD_VERS_LE_8 0x00000000000001ffLLU -#define GD_VERS_LE_9 0x00000000000003ffLLU +#define GD_VERS_LE_0 0x00000001UL +#define GD_VERS_LE_1 0x00000003UL +#define GD_VERS_LE_2 0x00000007UL +#define GD_VERS_LE_3 0x0000000fUL +#define GD_VERS_LE_4 0x0000001fUL +#define GD_VERS_LE_5 0x0000003fUL +#define GD_VERS_LE_6 0x0000007fUL +#define GD_VERS_LE_7 0x000000ffUL +#define GD_VERS_LE_8 0x000001ffUL +#define GD_VERS_LE_9 0x000003ffUL uint64_t _GD_FindVersion(DIRFILE *D) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-03-12 21:24:49
|
Revision: 818 http://sourceforge.net/p/getdata/code/818 Author: ketiltrout Date: 2013-03-12 21:24:44 +0000 (Tue, 12 Mar 2013) Log Message: ----------- Not even out a day... (bugfixes) Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/python/pydirfile.c trunk/getdata/m4/version.m4 trunk/getdata/man/gd_seek.3 trunk/getdata/src/fpos.c trunk/getdata/src/gzip.c trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/test/gzip_get_get2.c trunk/getdata/test/seek_neg.c trunk/getdata/test/tell_multidiv.c Property Changed: ---------------- trunk/getdata/ trunk/getdata/test/ Index: trunk/getdata =================================================================== --- trunk/getdata 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata 2013-03-12 21:24:44 UTC (rev 818) Property changes on: trunk/getdata ___________________________________________________________________ Modified: svn:ignore ## -19,6 +19,9 ## install-sh libtool ltmain.sh +matlab_getdata-*.tar.gz +matlab_getdata-*.tar.bz2 +matlab_getdata-*.sig missing *.swp libltdl Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/ChangeLog 2013-03-12 21:24:44 UTC (rev 818) @@ -1,3 +1,22 @@ +2012-03-12 D. V. Wiebe <ge...@ke...> svn:818 + * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Resize the ndarray + before returning it, if necessary. Also, don't try to read past the EOF in + read-to-end mode. + + * src/fpos.c (_GD_GetFilePos): Fix computation of two input field derived + types to properly return MULTIPOS when necessary. + * test/tell_multidiv.c: Added. + + * src/fpos.c (_GD_Seek): Return error if trying to place the I/O pointer + before sample zero. + * test/seek_neg.c: Added. + + * src/gzip.c (_GD_GzipSeek): Allow seeking to sample zero. + * test/gzip_get_get2.c: Added. + +2012-03-12 D. V. Wiebe <ge...@ke...> svn:815 + GetData-0.8.3 released. + 2012-03-09 D. V. Wiebe <ge...@ke...> svn:807 * src/flush.c: C89-ify the GD_VERS_... constants. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/NEWS 2013-03-12 21:24:44 UTC (rev 818) @@ -1,3 +1,29 @@ +New in version 0.8.4a: + + Library Changes: + + * BUG FIX: Trying to position an I/O pointer to before sample zero with + gd_seek() now properly fails. Previously it would allow it, causing bizarre + things to happen later. + + * BUG FIX: Using gd_tell to get the I/O pointer position of a derived field + with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly + reports an error in the "multiposition" case (ie. when the two inputs are + ultimately reading from different locations in the same RAW field). + + * BUG FIX: Trying to read sample zero of a gzipped RAW field the second time + now works as expected. Previously, the request to reposition the I/O pointer + back to zero would be ignored by the gzip framework. + + Bindings Changes: + + * PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the + correct length. Previously they would always be the length requested (or the + length of the dirfile, if no length was explicitly given) even if fewer + samples were returned. Extra elements would contain uninitialised memory. + +|==============================================================================| + New in version 0.8.3: Library Changes: Modified: trunk/getdata/bindings/python/pydirfile.c =================================================================== --- trunk/getdata/bindings/python/pydirfile.c 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/bindings/python/pydirfile.c 2013-03-12 21:24:44 UTC (rev 818) @@ -589,7 +589,7 @@ PyObject *return_type_obj = NULL; long int num_frames = 0, num_samples = 0; size_t ns; - int as_list = 0; + int as_list = 0, read_to_end = 0; gd_type_t return_type; unsigned int spf = 1; PyObject *pyobj = NULL; @@ -620,12 +620,6 @@ PYGD_CHECK_ERROR(self->D, NULL); } - /* get num frames/samples */ - if (num_frames_obj == NULL && num_samples_obj == NULL) { - num_frames = gd_nframes(self->D); - PYGD_CHECK_ERROR(self->D, NULL); - } - if (num_frames_obj) { num_frames = PyInt_AsLong(num_frames_obj); if (num_frames == -1 && PyErr_Occurred()) { @@ -652,19 +646,32 @@ } } + /* read to end mode */ + if (num_frames_obj == NULL && num_samples_obj == NULL) + read_to_end = 1; + /* we need the SPF to know how many samples we have to allocate */ - if (num_frames) { + if (read_to_end || num_frames) { spf = gd_spf(self->D, field_code); PYGD_CHECK_ERROR(self->D, NULL); + + if (read_to_end) { + num_samples = gd_nframes(self->D) * spf; + PYGD_CHECK_ERROR(self->D, NULL); + + /* don't read past the frame indicated by nframes */ + num_samples -= first_frame * spf - first_sample; + if (num_samples < 0) + num_samples = 0; + } else + num_samples += num_frames * spf; } - ns = num_samples + num_frames * spf; - - if (ns == 0) { + if (num_samples == 0) { #ifdef USE_NUMPY if (!as_list) - pyobj = PyArray_ZEROS(1, dims, NPY_INT, 0); + pyobj = PyArray_ZEROS(1, dims, gdpy_npytype_from_type(return_type), 0); else #endif pyobj = Py_BuildValue("[]"); @@ -672,21 +679,36 @@ void *data; #ifdef USE_NUMPY if (!as_list) { - dims[0] = (npy_intp)ns; + dims[0] = (npy_intp)num_samples; pyobj = PyArray_SimpleNew(1, dims, gdpy_npytype_from_type(return_type)); data = PyArray_DATA(pyobj); } else #endif - data = malloc(ns * GD_SIZE(return_type)); + data = malloc(num_samples * GD_SIZE(return_type)); - ns = gd_getdata(self->D, field_code, first_frame, first_sample, - (size_t)num_frames, (size_t)num_samples, return_type, data); + ns = gd_getdata(self->D, field_code, first_frame, first_sample, 0, (size_t)num_samples, + return_type, data); + fprintf(stderr, "%zu/%zu\n", ns, (size_t)num_samples); - #ifdef USE_NUMPY - if (!as_list) + if (!as_list) { PYGD_CHECK_ERROR(self->D, NULL); - else + /* resize, if necessary */ + if (ns < num_samples) { + PyObject *check; + PyArray_Dims new_dims; + + new_dims.ptr = dims; + new_dims.len = 1; + dims[0] = (npy_intp)ns; + check = PyArray_Resize((PyArrayObject*)pyobj, &new_dims, 0, NPY_ANYORDER); + + if (check == NULL) /* error -- exception already raised */ + return NULL; + Py_DECREF(check); /* Despite the docs, PyArray_Resize returns an INCREF'd Py_None on + success */ + } + } else #endif { PYGD_CHECK_ERROR2(self->D, NULL, free(data)); Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/m4/version.m4 2013-03-12 21:24:44 UTC (rev 818) @@ -20,8 +20,8 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 3) -m4_define(getdata_extra, []) +m4_define(getdata_revision, 4) +m4_define(getdata_extra, [a]) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) Modified: trunk/getdata/man/gd_seek.3 =================================================================== --- trunk/getdata/man/gd_seek.3 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/man/gd_seek.3 2013-03-12 21:24:44 UTC (rev 818) @@ -1,6 +1,6 @@ .\" gd_getdata.3. The gd_getdata man page. .\" -.\" Copyright (C) 2011, 2012 D. V. Wiebe +.\" Copyright (C) 2011, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_seek 3 "21 March 2012" "Version 0.8.0" "GETDATA" +.TH gd_seek 3 "12 March 2013" "Version 0.8.4" "GETDATA" .SH NAME gd_seek \(em reposition a dirfile field pointer .SH SYNOPSIS @@ -28,13 +28,13 @@ .SH DESCRIPTION The .BR gd_seek () -function changes the field position of the field +function changes the position of the I/O pointer associated with the field .I field_code in the dirfile(5) database specified by .IR dirfile . In normal operation, .BR gd_seek () -advances the field pointer +advances the field I/O pointer .I frame_num frames plus .I sample_num @@ -44,7 +44,7 @@ .BR GD_SEEK_SET ", " GD_SEEK_CUR , or .BR GD_SEEK_END , -indicating, respectively, origins of sample zero, the current position of the +indicating, respectively, sample zero, the current position of the field pointer, and the location of the end-of-field marker (see .BR gd_eof (3)). @@ -118,11 +118,11 @@ .B RAW fields (and the implicit .I INDEX -field) have field pointers associated with them. Calling +field) have field I/O pointers associated with them. Calling .BR gd_seek () on a derived field will move the field pointers of all of the field's inputs. It is possible to create derived fields which simultaneously read from different -places of the same field. Calling +places of the same input field. Calling .BR gd_seek () on such a field will result in an error. @@ -180,6 +180,10 @@ An error occurred while trying to open or read from a file on disk containing a raw field. .TP +.B GD_E_RANGE +The request resulted an attempt to move the I/O pointer of the specified field +or one of its inputs to a negative sample number. +.TP .B GD_E_RECURSE_LEVEL Too many levels of recursion were encountered while trying to resolve .IR field_code . Modified: trunk/getdata/src/fpos.c =================================================================== --- trunk/getdata/src/fpos.c 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/src/fpos.c 2013-03-12 21:24:44 UTC (rev 818) @@ -77,8 +77,10 @@ case GD_MPLEX_ENTRY: if (_GD_BadInput(D, E, 0, 1) || _GD_BadInput(D, E, 1, 1)) break; - pos = _GD_GetFilePos(D, E->e->entry[0], 0); - pos2 = _GD_GetFilePos(D, E->e->entry[0], pos); + pos = _GD_GetFilePos(D, E->e->entry[0], -1); + if (D->error) + break; + pos2 = _GD_GetFilePos(D, E->e->entry[1], pos); if (!D->error && pos != pos2) { _GD_SetError(D, GD_E_DOMAIN, GD_E_DOMAIN_MULTIPOS, NULL, 0, NULL); pos = -1; @@ -239,6 +241,12 @@ return 1; } + if (offset < 0) { + _GD_SetError(D, GD_E_RANGE, GD_E_OUT_OF_RANGE, NULL, 0, NULL); + dreturn("%i", 1); + return 1; + } + switch (E->field_type) { case GD_RAW_ENTRY: /* open/create the file, if necessary */ @@ -333,7 +341,7 @@ 1); if (D->error) { - dreturn("%u", -1); + dreturn("%i", -1); return -1; } @@ -341,7 +349,7 @@ _GD_SetError(D, GD_E_DIMENSION, GD_E_DIM_CALLER, NULL, 0, field_code); if (field_code != field_code_in) free(field_code); - dreturn("%u", -1); + dreturn("%i", -1); return -1; } @@ -351,7 +359,7 @@ if (D->error) { if (field_code != field_code_in) free(field_code); - dreturn("%u", -1); + dreturn("%i", -1); return -1; } } Modified: trunk/getdata/src/gzip.c =================================================================== --- trunk/getdata/src/gzip.c 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/src/gzip.c 2013-03-12 21:24:44 UTC (rev 818) @@ -74,7 +74,7 @@ { off64_t n = 0; - dtrace("%p, %lli, 0x%X, 0x%X", file, (long long)count, mode, data_type); + dtrace("%p, %lli, 0x%X, 0x%X", file, (long long)count, data_type, mode); if (file->pos == count) { dreturn("%lli", (long long)count); @@ -83,7 +83,7 @@ count *= GD_SIZE(data_type); - if (count > 0) { + if (count >= 0) { n = (off64_t)gzseek((gzFile)file[(mode == GD_FILE_WRITE) ? 1 : 0].edata, (off_t)count, SEEK_SET); Index: trunk/getdata/test =================================================================== --- trunk/getdata/test 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/test 2013-03-12 21:24:44 UTC (rev 818) Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore ## -474,6 +474,7 ## gzip_add gzip_get gzip_get_get +gzip_get_get2 gzip_get_put gzip_move_from gzip_move_to ## -846,6 +847,7 ## seek_cur seek_end seek_foffs +seek_neg seek_set sie_get_big sie_get_little ## -879,6 +881,7 ## table_type tell tell64 +tell_multidiv tok_arg tok_escape tok_quote Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2013-03-12 00:57:21 UTC (rev 817) +++ trunk/getdata/test/Makefile.am 2013-03-12 21:24:44 UTC (rev 818) @@ -196,8 +196,8 @@ GLOBAL_TESTS=global_flags global_name global_ref global_ref_empty global_ref_set -GZIP_TESTS=gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from \ - gzip_move_to gzip_nframes gzip_put gzip_put_get +GZIP_TESTS=gzip_add gzip_get gzip_get_get gzip_get_get2 gzip_get_put \ + gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get HEADER_TESTS=header_complex @@ -319,7 +319,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_neg 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 @@ -335,7 +335,7 @@ TABLE_TESTS=table table_code table_type -TELL_TESTS=tell tell64 +TELL_TESTS=tell tell64 tell_multidiv TOK_TESTS=tok_arg tok_escape tok_quote Added: trunk/getdata/test/gzip_get_get2.c =================================================================== --- trunk/getdata/test/gzip_get_get2.c (rev 0) +++ trunk/getdata/test/gzip_get_get2.c 2013-03-12 21:24:44 UTC (rev 818) @@ -0,0 +1,92 @@ +/* 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 + */ +/* Attempt to read UINT8 */ +#include "test.h" + +#include <inttypes.h> +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <stdio.h> +#include <errno.h> + +int main(void) +{ +#if !defined USE_GZIP || !defined TEST_GZIP + return 77; /* skip test */ +#else + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *gzipdata = "dirfile/data.gz"; + const char *format_data = "data RAW UINT16 8\n"; + uint16_t c1[8], c2[8]; + char command[4096]; + uint16_t data_data[256]; + int fd, i, n1, error1, n2, error2, r = 0; + DIRFILE *D; + + memset(c1, 0, 16); + memset(c2, 0, 16); + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256 * sizeof(uint16_t)); + close(fd); + + /* compress */ + snprintf(command, 4096, "%s -f %s > /dev/null", GZIP, data); + if (gd_system(command)) + return 1; + + D = gd_open(filedir, GD_RDONLY | GD_VERBOSE); + n1 = gd_getdata(D, "data", 0, 0, 1, 0, GD_UINT16, c1); + error1 = gd_error(D); + n2 = gd_getdata(D, "data", 0, 0, 1, 0, GD_UINT16, c2); + error2 = gd_error(D); + gd_close(D); + + unlink(gzipdata); + unlink(format); + rmdir(filedir); + + CHECKI(error1, 0); + CHECKI(error2, 0); + CHECKI(n1, 8); + CHECKI(n2, 8); + for (i = 0; i < 8; ++i) { + CHECKUi(i,c1[i], i); + CHECKUi(i,c2[i], i); + } + + return r; +#endif +} Added: trunk/getdata/test/seek_neg.c =================================================================== --- trunk/getdata/test/seek_neg.c (rev 0) +++ trunk/getdata/test/seek_neg.c 2013-03-12 21:24:44 UTC (rev 818) @@ -0,0 +1,70 @@ +/* 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 + */ +/* gd_seek() */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "data RAW UINT8 8\n"; + unsigned char data_data[256]; + int fd, e1, e2, r = 0; + off_t m, n; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY); + m = gd_seek(D, "data", -3, 0, GD_SEEK_CUR); + e1 = gd_error(D); + + gd_close(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(e1, GD_E_RANGE); + CHECKI(m, -1); + + return r; +} Added: trunk/getdata/test/tell_multidiv.c =================================================================== --- trunk/getdata/test/tell_multidiv.c (rev 0) +++ trunk/getdata/test/tell_multidiv.c 2013-03-12 21:24:44 UTC (rev 818) @@ -0,0 +1,70 @@ +/* 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 + */ +/* gd_seek() */ +#include "test.h" + +#include <stdlib.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <string.h> +#include <errno.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + const char *data = "dirfile/data"; + const char *format_data = "data RAW UINT8 8\nphase PHASE data 1\ndiv DIVIDE phase data"; + unsigned char data_data[256]; + int fd, error, r = 0; + off_t n; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + + for (fd = 0; fd < 256; ++fd) + data_data[fd] = (unsigned char)fd; + + fd = open(format, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format_data, strlen(format_data)); + close(fd); + + fd = open(data, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, 0666); + write(fd, data_data, 256); + close(fd); + + D = gd_open(filedir, GD_RDONLY); + n = gd_tell(D, "div"); + error = gd_error(D); + + gd_close(D); + + unlink(data); + unlink(format); + rmdir(filedir); + + CHECKI(error, GD_E_DOMAIN); + CHECKI(n, -1); + + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-03-14 00:10:52
|
Revision: 819 http://sourceforge.net/p/getdata/code/819 Author: ketiltrout Date: 2013-03-14 00:10:49 +0000 (Thu, 14 Mar 2013) Log Message: ----------- Don't let affixes mangle /REFERENCE directives. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/src/flush.c trunk/getdata/test/Makefile.am Added Paths: ----------- trunk/getdata/test/flush_ref.c trunk/getdata/test/parse_include_affix_ref.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-12 21:24:44 UTC (rev 818) +++ trunk/getdata/ChangeLog 2013-03-14 00:10:49 UTC (rev 819) @@ -1,3 +1,8 @@ +2012-03-13 D. V. Wiebe <ge...@ke...> svn:819 + * src/flush.c (_GD_FlushFragment): Strip affixes from field codes in + /REFERENCE directives. + * test/flush_ref.c test/parse_include_affix_ref.c: Added. + 2012-03-12 D. V. Wiebe <ge...@ke...> svn:818 * bindings/python/pydirfile.c (gdpy_dirfile_getdata): Resize the ndarray before returning it, if necessary. Also, don't try to read past the EOF in Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-03-12 21:24:44 UTC (rev 818) +++ trunk/getdata/NEWS 2013-03-14 00:10:49 UTC (rev 819) @@ -13,8 +13,13 @@ * BUG FIX: Trying to read sample zero of a gzipped RAW field the second time now works as expected. Previously, the request to reposition the I/O pointer - back to zero would be ignored by the gzip framework. + back to zero would be ignored by the gzip framework. Reported by Alexandra + Rahlin. + * BUG FIX: The field code of a reference field declared in a subfragment + included with affixes is no longer corrupted by spurious application of the + affixes when the subfragment's metadata are (re-)written. Reported by Seth. + Bindings Changes: * PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2013-03-12 21:24:44 UTC (rev 818) +++ trunk/getdata/src/flush.c 2013-03-14 00:10:49 UTC (rev 819) @@ -792,7 +792,7 @@ if (permissive || D->standards >= 6) if (D->fragment[i].ref_name != NULL) { fputs("/REFERENCE ", stream); - _GD_StringEscapeise(stream, D->fragment[i].ref_name, 0, permissive, + _GD_WriteFieldCode(D, stream, i, D->fragment[i].ref_name, permissive, D->standards); fputc('\n', stream); } Index: trunk/getdata/test =================================================================== --- trunk/getdata/test 2013-03-12 21:24:44 UTC (rev 818) +++ trunk/getdata/test 2013-03-14 00:10:49 UTC (rev 819) Property changes on: trunk/getdata/test ___________________________________________________________________ Modified: svn:ignore ## -362,6 +362,7 ## flush_bad_code flush_invalid flush_meta +flush_ref flush_spec foffs_alter foffs_get ## -655,6 +656,7 ## parse_include parse_include_absolute parse_include_absrel +parse_include_affix_ref parse_include_dir parse_include_loop parse_include_nonexistent Modified: trunk/getdata/test/Makefile.am =================================================================== --- trunk/getdata/test/Makefile.am 2013-03-12 21:24:44 UTC (rev 818) +++ trunk/getdata/test/Makefile.am 2013-03-14 00:10:49 UTC (rev 819) @@ -163,7 +163,8 @@ flist_meta_invalid flist_type flist_type_hidden flist_type_invalid \ flist_type_meta flist_type_meta_hidden flist_type_meta_invalid -FLUSH_TESTS=flush flush_all flush_bad_code flush_invalid flush_meta flush_spec +FLUSH_TESTS=flush flush_all flush_bad_code flush_invalid flush_meta flush_ref \ + flush_spec FOFFS_TESTS=foffs_alter foffs_get foffs_move @@ -262,8 +263,9 @@ 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_absolute parse_include_absrel \ + parse_include_affix_ref 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 \ Added: trunk/getdata/test/flush_ref.c =================================================================== --- trunk/getdata/test/flush_ref.c (rev 0) +++ trunk/getdata/test/flush_ref.c 2013-03-14 00:10:49 UTC (rev 819) @@ -0,0 +1,74 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* 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> +#include <stdio.h> + +int main(void) +{ + const char *filedir = "dirfile"; + const char *subdir = "dirfile/sub"; + const char *format = "dirfile/format"; + const char *format1 = "dirfile/sub/format"; + const char *format_data = "data RAW UINT8 1\nREFERENCE data\n"; + const char *format1_data = "mata RAW UINT8 11\nREFERENCE mata\n"; + int fd, e1, r = 0; + const char *r1; + unsigned int spf; + 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); + + fd = open(format1, O_CREAT | O_EXCL | O_WRONLY, 0666); + write(fd, format1_data, strlen(format1_data)); + close(fd); + + D = gd_open(filedir, GD_RDWR | GD_VERBOSE); + gd_include_affix(D, "sub/format", 0, "prefix_", NULL, GD_IGNORE_REFS); + gd_rewrite_fragment(D, GD_ALL_FRAGMENTS); + gd_close(D); + D = gd_open(subdir, GD_RDONLY | GD_VERBOSE); + r1 = gd_reference(D, NULL); + CHECKS(r1, "mata"); + e1 = gd_error(D); + gd_discard(D); + + unlink(format1); + unlink(format); + rmdir(filedir); + + CHECKI(e1, 0); + + return r; +} Added: trunk/getdata/test/parse_include_affix_ref.c =================================================================== --- trunk/getdata/test/parse_include_affix_ref.c (rev 0) +++ trunk/getdata/test/parse_include_affix_ref.c 2013-03-14 00:10:49 UTC (rev 819) @@ -0,0 +1,65 @@ +/* Copyright (C) 2013 D. V. Wiebe + * + *************************************************************************** + * + * This file is part of the GetData project. + * + * GetData is free software; you can redistribute it and/or modify it under + * the terms of the GNU Lesser General Public License as published by the + * Free Software Foundation; either version 2.1 of the License, or (at your + * option) any later version. + * + * GetData is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + * License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with GetData; if not, write to the Free Software Foundation, Inc., + * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ +/* 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" + "INCLUDE format1 A B\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, "AzataB"); + 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...> - 2013-04-05 01:08:23
|
Revision: 825 http://sourceforge.net/p/getdata/code/825 Author: ketiltrout Date: 2013-04-05 01:08:18 +0000 (Fri, 05 Apr 2013) Log Message: ----------- Fix various MPLEX bugs/inconsistencies. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/getdata/entry.h trunk/getdata/bindings/cxx/getdata/mplexentry.h trunk/getdata/bindings/cxx/mplexentry.cpp trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/f77/getdata.f90.in 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/matlab/gd_add_mplex.m trunk/getdata/bindings/matlab/gd_alter_mplex.m trunk/getdata/bindings/matlab/gd_madd_mplex.m trunk/getdata/bindings/matlab/matlab.c trunk/getdata/bindings/matlab/test/big_test.m trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/t/big_test.t trunk/getdata/bindings/python/pyentry.c trunk/getdata/bindings/python/test/big_test.py trunk/getdata/man/dirfile-format.5 trunk/getdata/man/gd_add_bit.3 trunk/getdata/man/gd_alter_bit.3 trunk/getdata/man/gd_cbopen.3 trunk/getdata/man/gd_entry.3 trunk/getdata/man/gd_madd_bit.3 trunk/getdata/man/gd_mplex_lookback.3 trunk/getdata/src/add.c trunk/getdata/src/del.c trunk/getdata/src/entry.c trunk/getdata/src/errors.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/legacy.c trunk/getdata/src/mod.c trunk/getdata/src/parse.c trunk/getdata/test/add_mplex.c trunk/getdata/test/add_mplex_val.c trunk/getdata/test/entry_mplex.c trunk/getdata/test/entry_mplex_scalar.c trunk/getdata/test/madd_mplex.c trunk/getdata/test/parse_mplex_nomax.c trunk/getdata/test/seek_neg.c trunk/getdata/test/tok_arg.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/ChangeLog 2013-04-05 01:08:18 UTC (rev 825) @@ -1,3 +1,40 @@ +2013-03-13 D. V. Wiebe <ge...@ke...> svn:825 + * src/getdata.h.in: Renamed gd_entry_t.count_max to gd_entry_t.period. + + * bindings/cxx/getdata/entry.h (Entry::Period) + bindings/cxx/getdata/mplexentry.h (NplexEntry::Period): Renamed from CountMax. + * bindings/cxx/mplexentry.cpp (MplexEntry::SetPeriod): Renamed from + SetCountMax. + * bindings/cxx/mplexentry.cpp (MplexEntry::MplexEntry) + bindings/f77/fgetdata.c (GDGEMX) bindings/f77/getdata.f90.in (fgd_entry + fgd_add fgd_madd fgd_alter_entry fgd_add_mplex fgd_madd_mplex + fgd_alter_mplex) bindings/idl/getdata.c (gdidl_make_idl_entry + gdidl_alter_mplex) bindings/matlab/gd_add_mplex.m + bindings/matlab/gd_alter_mplex.m bindings/matlab/gd_madd_mplex.m + bindings/matlab/matlab.c (gdmx_from_entry gdmx_to_entry) + bindings/perl/GetData.xs (gdp_to_entry entry) bindings/python/pyentry.c + (gdpy_set_entry_from_tuple gdpy_entry_getperiod gdpy_entry_setperiod + gdpy_entry_getparms): Rename count_max to period. + + * src/add.c (_GD_Add): Fix range checks on MPLEX parameters. + + * src/getdata.c (_GD_DoMplex): The default period is 2n+1, not 2n. + + * src/internal.h: Rename GD_E_ENTRY_CNTMAX to GD_E_ENTRY_PERIOD. + * src/errors.c: Update GD_E_ENTRY_PERIOD and GD_E_FORMAT_MPLEXVAL messages. + + * src/mod.c (_GD_Change): mplex.count_val = -1 is not a magic value. + + * src/parse.c (_GD_ParseMplex): Remove incorrect restrictions count_val <= + period and count_val >= 0. + + * bindings/idl/getdata.c (gdidl_read_idl_entry): Properly convert an IDL + MPLEX entry object. + + * bindings/idl/getdata.c (gdidl_alter_mplex): Handle missing COUNT_VAL. + + * man/dirfile-format.5: Fix and clarify MPLEX specification. + 2013-03-13 D. V. Wiebe <ge...@ke...> svn:819 * src/flush.c (_GD_FlushFragment): Strip affixes from field codes in /REFERENCE directives. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/NEWS 2013-04-05 01:08:18 UTC (rev 825) @@ -2,6 +2,27 @@ Library Changes: + * BUG FIX: Inconsistant behaviour in the library, coupled with contradictory + statements in the Dirfile Standards, has resulted in confusion over the + meaning of the final, optional, parameter in a MPLEX definition. To be clear: + this parameter is simply the expected period between successive occurances of + the mplex value in the index vector. It is used by GetData only to figure out + a resonable length of the MPLEX lookback. To help reduce confusion, this + parameter has been renamed from "count_max" to "period". The Standards have + also been clarified. See also the following related bug fixes. + + * BUG FIX: The count_val MPLEX parameter is not restricted to non-negative + numbers. + + * BUG FIX: The optional period (formerly count_max) MPLEX parameter does not + restrict allowed values of the count_val parameter. + + * BUG FIX: The default MPLEX period, if none is specified, is 2*count_val + 1, + not simply 2 * count_val, when count_val is greater than 5. + + * BUG FIX: A count_val of -1 in gd_alter_entry or gd_[m]alter_mplex calls is + not a special value: it just sets the count_val to -1. + * BUG FIX: Trying to position an I/O pointer to before sample zero with gd_seek() now properly fails. Previously it would allow it, causing bizarre things to happen later. @@ -22,6 +43,10 @@ Bindings Changes: + * IDL BUG FIX: Entry structs representing MPLEX fields are now properly + interpreted. Previously, the underlying gd_entry_t object was being + incorrectly initialised. + * PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the correct length. Previously they would always be the length requested (or the length of the dirfile, if no length was explicitly given) even if fewer Modified: trunk/getdata/bindings/cxx/getdata/entry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/entry.h 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/cxx/getdata/entry.h 2013-04-05 01:08:18 UTC (rev 825) @@ -224,8 +224,8 @@ return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.count_val : 0; } - virtual int CountMax() const { - return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.count_max : 0; + virtual int Period() const { + return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.period : 0; } /* Set methods */ Modified: trunk/getdata/bindings/cxx/getdata/mplexentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-04-05 01:08:18 UTC (rev 825) @@ -35,7 +35,7 @@ MplexEntry() : Entry() { E.field_type = GD_MPLEX_ENTRY; }; MplexEntry(const char* field_code, const char* in_field, - const char *check_Field, int count_val, int count_max, + const char *check_field, int count_val, int period, int fragment_index = 0); virtual const char *Input(int index = 0) const { @@ -48,13 +48,13 @@ virtual int CountVal() const { return E.u.mplex.count_val; }; - virtual int CountMax() const { return E.u.mplex.count_max; }; + virtual int Period() const { return E.u.mplex.period; }; int SetInput(const char* field, int index); virtual int SetCountVal(int count_val); virtual int SetCountVal(const char* count_val); - virtual int SetCountMax(int count_max); - virtual int SetCountMax(const char* count_max); + virtual int SetPeriod(int period); + virtual int SetPeriod(const char* period); private: MplexEntry(const GetData::Dirfile *dirfile, const char* field_code) : Modified: trunk/getdata/bindings/cxx/mplexentry.cpp =================================================================== --- trunk/getdata/bindings/cxx/mplexentry.cpp 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/cxx/mplexentry.cpp 2013-04-05 01:08:18 UTC (rev 825) @@ -21,11 +21,10 @@ #include "internal.h" MplexEntry::MplexEntry(const char* field_code, const char* in_field, - const char* count, int count_val, int count_max, - int fragment_index) : Entry() + const char* count, int count_val, int period, int fragment_index) : Entry() { dtrace("\"%s\", \"%s\", \"%s\", %i, %i, %i", field_code, - in_field, count, count_val, count_max, fragment_index); + in_field, count, count_val, period, fragment_index); E.field = strdup(field_code); E.field_type = GD_MPLEX_ENTRY; @@ -33,7 +32,7 @@ E.in_fields[1] = strdup(count); E.scalar[0] = E.scalar[1] = 0; E.u.mplex.count_val = count_val; - E.u.mplex.count_max = count_max; + E.u.mplex.period = period; E.fragment_index = fragment_index; dreturnvoid(); @@ -73,13 +72,13 @@ return ret; } -int MplexEntry::SetCountMax(int count_max) +int MplexEntry::SetPeriod(int period) { int ret = 0; - dtrace("%u", count_max); + dtrace("%u", period); - E.u.mplex.count_max = count_max; + E.u.mplex.period = period; if (D != NULL) ret = gd_alter_entry(D->D, E.field, &E, 0); @@ -107,19 +106,19 @@ return r; } -int MplexEntry::SetCountMax(const char *count_max) +int MplexEntry::SetPeriod(const char *period) { int r = 0; - dtrace("\"%s\"", count_max); + dtrace("\"%s\"", period); - SetScalar(1, count_max); + SetScalar(1, period); if (D != NULL) { r = gd_alter_entry(D->D, E.field, &E, 0); if (!r) - r = gd_get_constant(D->D, count_max, GD_UINT16, &E.u.mplex.count_max); + r = gd_get_constant(D->D, period, GD_UINT16, &E.u.mplex.period); } dreturn("%i", r); Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2013-04-05 01:08:18 UTC (rev 825) @@ -1617,7 +1617,7 @@ CHECK_INT2(228, 3, ent->CountVal(), 1); CHECK_STRING2(228, 4, ent->Input(0), "data"); CHECK_STRING2(228, 5, ent->Input(1), "sbit"); - CHECK_INT2(228, 6, ent->CountMax(), 10); + CHECK_INT2(228, 6, ent->Period(), 10); delete ent; // 229: Dirfile::Add / MplexEntry check @@ -1626,7 +1626,7 @@ xent.SetInput("in1", 0); xent.SetInput("in2", 1); xent.SetCountVal(5); - xent.SetCountMax(6); + xent.SetPeriod(6); d->Add(xent); CHECK_OK2(229, 1); @@ -1637,7 +1637,7 @@ CHECK_INT2(229, 3, ent->CountVal(), 5); CHECK_STRING2(229, 4, ent->Input(0), "in1"); CHECK_STRING2(229, 5, ent->Input(1), "in2"); - CHECK_INT2(229, 6, ent->CountMax(), 6); + CHECK_INT2(229, 6, ent->Period(), 6); delete ent; // 230: gd_madd_mplex check @@ -1646,7 +1646,7 @@ xent.SetInput("in2", 0); xent.SetInput("in3", 1); xent.SetCountVal(0); - xent.SetCountMax(12); + xent.SetPeriod(12); d->MAdd(xent, "data"); CHECK_OK2(230, 1); @@ -1657,7 +1657,7 @@ CHECK_INT2(230, 3, ent->CountVal(), 0); CHECK_STRING2(230, 4, ent->Input(0), "in2"); CHECK_STRING2(230, 5, ent->Input(1), "in3"); - CHECK_INT2(230, 6, ent->CountMax(), 12); + CHECK_INT2(230, 6, ent->Period(), 12); delete ent; // 231: gd_alter_mplex check @@ -1665,7 +1665,7 @@ xep->SetInput("in3", 0); xep->SetInput("in4", 1); xep->SetCountVal(3); - xep->SetCountMax(7); + xep->SetPeriod(7); CHECK_OK2(231, 1); delete xep; @@ -1676,7 +1676,7 @@ CHECK_INT2(231, 3, ent->CountVal(), 3); CHECK_STRING2(231, 4, ent->Input(0), "in3"); CHECK_STRING2(231, 5, ent->Input(1), "in4"); - CHECK_INT2(231, 6, ent->CountMax(), 7); + CHECK_INT2(231, 6, ent->Period(), 7); delete ent; // 232: gd_tokenise Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/f77/fgetdata.c 2013-04-05 01:08:18 UTC (rev 825) @@ -886,7 +886,7 @@ /* gd_entry wrapper for MPLEX */ 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, + char *count_field, int32_t *count_field_l, int32_t *val, int32_t *period, int32_t *fragment_index, const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { @@ -894,7 +894,7 @@ gd_entry_t E; dtrace("%p, %i, %p, %i, %p, %p, %p, %i, %p, %i", in_field, *in_field_l, - count_field, *count_field_l, val, max, fragment_index, *dirfile, + count_field, *count_field_l, val, period, fragment_index, *dirfile, field_code, *field_code_l); if (gd_entry(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, @@ -904,7 +904,7 @@ _GDF_FString(in_field, in_field_l, E.in_fields[0]); _GDF_FString(count_field, count_field_l, E.in_fields[1]); *val = E.EN(mplex,count_val); - *max = E.EN(mplex,count_max); + *period = E.EN(mplex,period); *fragment_index = E.fragment_index; gd_free_entry_strings(&E); } Modified: trunk/getdata/bindings/f77/getdata.f90.in =================================================================== --- trunk/getdata/bindings/f77/getdata.f90.in 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/f77/getdata.f90.in 2013-04-05 01:08:18 UTC (rev 825) @@ -30,7 +30,7 @@ type gd_entry integer :: field_type, n_fields, spf, data_type, bitnum, numbits, shift integer :: fragment_index, comp_scal, poly_ord, array_len, windop, ithreshold - integer :: count_val, count_max + integer :: count_val, period character (len=GD_FIELD_LEN), dimension(3) :: field character (len=GD_FIELD_LEN), dimension(6) :: scalar integer, dimension(6) :: scalar_ind @@ -906,7 +906,7 @@ else if (fgd_entry .EQ. GD_MPLEX_ENTRY) then ! mplex call gdgemx(ent%field(1), len1, ent%field(2), len2, ent%count_val, & - ent%count_max, ent%fragment_index, dirfile, TRIM(field_code), & + ent%period, ent%fragment_index, dirfile, TRIM(field_code), & LEN_TRIM(field_code)) len1 = GD_FIELD_LEN @@ -1035,7 +1035,7 @@ else if (ent%field_type .EQ. GD_MPLEX_ENTRY) then call gdadmx(dirfile, TRIM(field_code), LEN_TRIM(field_code), & TRIM(ent%field(1)), LEN_TRIM(ent%field(1)), TRIM(ent%field(2)), & - LEN_TRIM(ent%field(2)), ent%count_val, ent%count_max, ent%fragment_index) + LEN_TRIM(ent%field(2)), ent%count_val, ent%period, ent%fragment_index) else if (ent%field_type .EQ. GD_CONST_ENTRY) then call gdadco(dirfile, TRIM(field_code), LEN_TRIM(field_code), & ent%data_type, GD_INT32, zero, ent%fragment_index) @@ -1279,7 +1279,7 @@ else if (ent%field_type .EQ. GD_MPLEX_ENTRY) then call gdmdmx(dirfile, TRIM(parent), LEN_TRIM(parent), TRIM(field_code), & LEN_TRIM(field_code), TRIM(ent%field(1)), LEN_TRIM(ent%field(1)), & - TRIM(ent%field(2)), LEN_TRIM(ent%field(2)), ent%count_val, ent%count_max) + TRIM(ent%field(2)), LEN_TRIM(ent%field(2)), ent%count_val, ent%period) else if (ent%field_type .EQ. GD_CONST_ENTRY) then call gdmdco(dirfile, TRIM(parent), LEN_TRIM(parent), TRIM(field_code), & LEN_TRIM(field_code), ent%data_type, GD_INT32, zero) @@ -1664,7 +1664,7 @@ else if (ent%field_type .EQ. GD_CONST_ENTRY) then call gdalmx(dirfile, TRIM(field_code), LEN_TRIM(field_code), & TRIM(ent%field(1)), LEN_TRIM(ent%field(1)), TRIM(ent%field(2)), & - LEN_TRIM(ent%field(2)), ent%count_val, ent%count_max, ent%fragment_index) + LEN_TRIM(ent%field(2)), ent%count_val, ent%period, ent%fragment_index) else if (ent%field_type .EQ. GD_CONST_ENTRY) then call gdalco(dirfile, TRIM(field_code), LEN_TRIM(field_code), ent%data_type) else if (ent%field_type .EQ. GD_CARRAY_ENTRY) then @@ -2751,33 +2751,33 @@ end subroutine subroutine fgd_add_mplex (dirfile, field_code, in_field, count_field, & - count_val, count_max, fragment_index) + count_val, period, fragment_index) character(len=*), intent(in) :: field_code, in_field, count_field - integer, intent(in) :: dirfile, count_val, count_max, fragment_index + integer, intent(in) :: dirfile, count_val, period, fragment_index call gdadmx(dirfile, TRIM(field_code), LEN_TRIM(field_code), TRIM(in_field), & LEN_TRIM(in_field), TRIM(count_field), LEN_TRIM(count_field), count_val, & - count_max, fragment_index) + period, fragment_index) end subroutine subroutine fgd_madd_mplex (dirfile, parent, field_code, in_field, count_field, & - count_val, count_max) + count_val, period) character(len=*), intent(in) :: parent, field_code, in_field, count_field - integer, intent(in) :: dirfile, count_val, count_max + integer, intent(in) :: dirfile, count_val, period call gdmdmx(dirfile, TRIM(parent), LEN_TRIM(parent), TRIM(field_code), & LEN_TRIM(field_code), TRIM(in_field), LEN_TRIM(in_field), TRIM(count_field), & - LEN_TRIM(count_field), count_val, count_max) + LEN_TRIM(count_field), count_val, period) end subroutine subroutine fgd_alter_mplex (dirfile, field_name, in_field, count_field, & - count_val, count_max) - integer, intent(in) :: dirfile, count_val, count_max + count_val, period) + integer, intent(in) :: dirfile, count_val, period character (len=*), intent(in) :: field_name, in_field, count_field call gdalmx(dirfile, TRIM(field_name), LEN_TRIM(field_name), TRIM(in_field), & LEN_TRIM(in_field), TRIM(count_field), LEN_TRIM(count_field), count_val, & - count_max) + period) end subroutine subroutine fgd_strtok (token, l, dirfile, string) Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2013-04-05 01:08:18 UTC (rev 825) @@ -2451,7 +2451,7 @@ call check_int2(ne, 228, 3, ent%count_val, 1) call check_str2(ne, 228, 4, ent%field(1), 'data') call check_str2(ne, 228, 5, ent%field(2), 'sbit') - call check_int2(ne, 228, 6, ent%count_max, 10) + call check_int2(ne, 228, 6, ent%period, 10) ! 229: fgd_add_mplex check call fgd_add_mplex(d, 'new21', 'in1', 'in2', 5, 6, 0) @@ -2464,7 +2464,7 @@ call check_int2(ne, 229, 3, ent%count_val, 5) call check_str2(ne, 229, 4, ent%field(1), 'in1') call check_str2(ne, 229, 5, ent%field(2), 'in2') - call check_int2(ne, 229, 6, ent%count_max, 6) + call check_int2(ne, 229, 6, ent%period, 6) ! 230: fgd_madd_mplex check call fgd_madd_mplex(d, 'data', 'mnew21', 'in2', 'in3', 0, 12) @@ -2477,7 +2477,7 @@ call check_int2(ne, 230, 3, ent%count_val, 0) call check_str2(ne, 230, 4, ent%field(1), 'in2') call check_str2(ne, 230, 5, ent%field(2), 'in3') - call check_int2(ne, 230, 6, ent%count_max, 12) + call check_int2(ne, 230, 6, ent%period, 12) ! 231: fgd_alter_mplex check call fgd_alter_mplex(d, 'new21', 'in3', 'in4', -1, 7) @@ -2490,7 +2490,7 @@ call check_int2(ne, 231, 3, ent%count_val, 5) call check_str2(ne, 231, 4, ent%field(1), 'in3') call check_str2(ne, 231, 5, ent%field(2), 'in4') - call check_int2(ne, 231, 6, ent%count_max, 7) + call check_int2(ne, 231, 6, ent%period, 7) ! 232: fgd_strtok check l = slen Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/idl/getdata.c 2013-04-05 01:08:18 UTC (rev 825) @@ -593,7 +593,7 @@ *(IDL_INT*)(data + IDL_StructTagInfoByName(gdidl_entry_def, "COUNT_VAL", IDL_MSG_LONGJMP, NULL)) = E->count_val; *(IDL_INT*)(data + IDL_StructTagInfoByName(gdidl_entry_def, - "COUNT_MAX", IDL_MSG_LONGJMP, NULL)) = E->count_max; + "PERIOD", IDL_MSG_LONGJMP, NULL)) = E->period; IDL_StrStore((IDL_STRING*)(data + IDL_StructTagInfoByName(gdidl_entry_def, "SCALAR", IDL_MSG_LONGJMP, NULL)), E->scalar[0]); @@ -668,7 +668,8 @@ if (E->field_type == GD_BIT_ENTRY || E->field_type == GD_LINTERP_ENTRY || E->field_type == GD_MULTIPLY_ENTRY || E->field_type == GD_PHASE_ENTRY || E->field_type == GD_SBIT_ENTRY || E->field_type == GD_POLYNOM_ENTRY - || E->field_type == GD_DIVIDE_ENTRY || E->field_type == GD_RECIP_ENTRY) + || E->field_type == GD_DIVIDE_ENTRY || E->field_type == GD_RECIP_ENTRY + || E->field_type == GD_MPLEX_ENTRY || E->field_type == GD_WINDOW_ENTRY) { o = IDL_StructTagInfoByName(v->value.s.sdef, "IN_FIELDS", action, &d); if (o != -1) { @@ -974,16 +975,16 @@ if (o != -1) { if (d->type != IDL_TYP_INT) idl_abort("GD_ENTRY element COUNT_VAL must be of type INT"); - E->bitnum = *(int16_t*)(data + o); - } else - E->bitnum = -1; + E->count_val = *(int16_t*)(data + o); + } - o = IDL_StructTagInfoByName(v->value.s.sdef, "COUNT_MAX", action, &d); + o = IDL_StructTagInfoByName(v->value.s.sdef, "PERIOD", action, &d); if (o != -1) { if (d->type != IDL_TYP_INT) - idl_abort("GD_ENTRY element COUNT_MAX must be of type INT"); - E->numbits = *(int16_t*)(data + o); - } + idl_abort("GD_ENTRY element PERIOD must be of type INT"); + E->period = *(int16_t*)(data + o); + } else + E->period = -1; copy_scalar[0] = copy_scalar[1] = 1; break; @@ -5317,7 +5318,7 @@ typedef struct { IDL_KW_RESULT_FIRST_FIELD; GDIDL_KW_RESULT_ERROR; - int val, max; + int val, val_x, period; IDL_STRING in_field1; int in_field1_x; IDL_STRING in_field2; @@ -5325,20 +5326,20 @@ } KW_RESULT; KW_RESULT kw; - kw.in_field1_x = kw.in_field2_x = 0; - kw.val = -1; - kw.max = -1; + kw.in_field1_x = kw.in_field2_x = kw.val_x = 0; + kw.period = -1; GDIDL_KW_INIT_ERROR; static IDL_KW_PAR kw_pars[] = { { "COUNT_FIELD", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field2_x), IDL_KW_OFFSETOF(in_field2) }, - { "COUNT_MAX", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(max) }, - { "COUNT_VAL", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(val) }, + { "COUNT_VAL", IDL_TYP_INT, 1, 0, IDL_KW_OFFSETOF(val_x), + IDL_KW_OFFSETOF(val) }, GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, { "IN_FIELD", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field1_x), IDL_KW_OFFSETOF(in_field1) }, + { "PERIOD", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(period) }, { NULL } }; @@ -5347,14 +5348,23 @@ DIRFILE* D = gdidl_get_dirfile(IDL_LongScalar(argv[0])); const char* field_code = IDL_VarGetString(argv[1]); - if (kw.in_field1_x) - in_field1 = IDL_STRING_STR(&kw.in_field1); + /* no value specified, figure out the previous value */ + if (!kw.val_x) { + gd_entry_t E; + gd_entry(D, field_code, &E); + kw.val = E.count_val; + } - if (kw.in_field2_x) - in_field2 = IDL_STRING_STR(&kw.in_field2); + if (!gd_error(D)) { + if (kw.in_field1_x) + in_field1 = IDL_STRING_STR(&kw.in_field1); - gd_alter_mplex(D, field_code, in_field1, in_field2, kw.val, kw.max); + if (kw.in_field2_x) + in_field2 = IDL_STRING_STR(&kw.in_field2); + gd_alter_mplex(D, field_code, in_field1, in_field2, kw.val, kw.period); + } + GDIDL_SET_ERROR(D); IDL_KW_FREE; @@ -5855,7 +5865,6 @@ { "CB", lincom_dims, (void*)IDL_TYP_DCOMPLEX }, /* LINCOM */ { "BITNUM", 0, (void*)IDL_TYP_INT }, /* (S)BIT */ { "COMP_SCAL", 0, (void*)IDL_TYP_INT }, /* LINCOM / POLYNOM */ - { "COUNT_MAX", 0, (void*)IDL_TYP_INT }, /* MPLEX */ { "COUNT_VAL", 0, (void*)IDL_TYP_INT }, /* MPLEX */ { "DATA_TYPE", 0, (void*)IDL_TYP_INT }, /* RAW / CONST / CARRAY */ { "DIVIDEND", 0, (void*)IDL_TYP_DOUBLE }, /* RECIP */ @@ -5864,6 +5873,7 @@ { "CM", lincom_dims, (void*)IDL_TYP_DCOMPLEX }, /* LINCOM */ { "N_FIELDS", 0, (void*)IDL_TYP_INT }, /* LINCOM */ { "NUMBITS", 0, (void*)IDL_TYP_INT }, /* (S)BIT */ + { "PERIOD", 0, (void*)IDL_TYP_INT }, /* MPLEX */ { "POLY_ORD", 0, (void*)IDL_TYP_INT }, /* POLYNOM */ { "SCALAR", polynom_dims, (void*)IDL_TYP_STRING }, { "SCALAR_IND", polynom_dims, (void*)IDL_TYP_INT }, Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/idl/test/big_test.pro 2013-04-05 01:08:18 UTC (rev 825) @@ -1295,7 +1295,7 @@ nume += check_simple2(228, 2, n.fragment, 0) nume += check_simple2(228, 3, n.count_val, 1) nume += check_simple2(228, 4, n.in_fields, [ 'data', 'sbit' ]) -nume += check_simple2(228, 5, n.count_max, 10) +nume += check_simple2(228, 5, n.period, 10) ; 229: gd_add_mplex check gd_add_mplex, d, 'new21', 'in1', 'in2', 5, max=6 @@ -1307,7 +1307,7 @@ nume += check_simple2(229, 2, n.fragment, 0) nume += check_simple2(229, 3, n.count_val, 5) nume += check_simple2(229, 4, n.in_fields, [ 'in1', 'in2' ]) -nume += check_simple2(229, 5, n.count_max, 6) +nume += check_simple2(229, 5, n.period, 6) ; 230: gd_madd_mplex check gd_add_mplex, d, parent='data', 'mnew21', 'in2', 'in3', 0, max=12 @@ -1319,11 +1319,11 @@ nume += check_simple2(230, 2, n.fragment, 0) nume += check_simple2(230, 3, n.count_val, 0) nume += check_simple2(230, 4, n.in_fields, [ 'in2', 'in3' ]) -nume += check_simple2(230, 5, n.count_max, 12) +nume += check_simple2(230, 5, n.period, 12) ; 231: gd_alter_mplex check gd_alter_mplex, d, 'new21', in_field='in3', count_field='in4', count_val=2, $ - count_max=7 + period=7 nume += check_ok2(231, 1, d) n = gd_entry(d, 'new21') @@ -1332,7 +1332,7 @@ nume += check_simple2(231, 2, n.fragment, 0) nume += check_simple2(231, 3, n.count_val, 2) nume += check_simple2(231, 4, n.in_fields, [ 'in3', 'in4' ]) -nume += check_simple2(231, 5, n.count_max, 7) +nume += check_simple2(231, 5, n.period, 7) ; 232: gd_strtok check str = gd_strtok(d, STRING='"test1 test2" test3\ test4') Modified: trunk/getdata/bindings/matlab/gd_add_mplex.m =================================================================== --- trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-04-05 01:08:18 UTC (rev 825) @@ -1,5 +1,5 @@ function gd_add_mplex(D, field_code, in_field1, in_field2, count_val, ... -count_max, fragment_index) +period, fragment_index) % GD_ADD_MPLEX Add a MPLEX field % % GD_ADD_MPLEX(DIRFILE,NAME,INPUT1,INPUT2,COUNT_VAL,COUNT_MAX,FRAGMENT) @@ -19,7 +19,7 @@ GD = getdata_constants(); gd_add(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ... 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ... - 'count_val', count_val, 'count_max', count_max)); + 'count_val', count_val, 'period', period)); end % Copyright (C) 2013 D. V. Wiebe Modified: trunk/getdata/bindings/matlab/gd_alter_mplex.m =================================================================== --- trunk/getdata/bindings/matlab/gd_alter_mplex.m 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/matlab/gd_alter_mplex.m 2013-04-05 01:08:18 UTC (rev 825) @@ -1,4 +1,4 @@ -function gd_alter_mplex(D, field_code, in1, in2, count_val, count_max) +function gd_alter_mplex(D, field_code, in1, in2, count_val, period) % GD_ALTER_MPLEX Modify the metadata of a MPLEX field % % GD_ALTER_MPLEX(DIRFILE,NAME,INPUT1,INPUT2,COUNT_VAL,COUNT_MAX) @@ -17,7 +17,7 @@ GD = getdata_constants(); gd_alter_entry(D, field_code, struct('field_type', GD.MPLEX_ENTRY, ... 'in_fields', {{in1; in2}}, 'count_val', count_val, ... - 'count_max', count_max), 0); + 'period', period), 0); end % Copyright (C) 2013 D. V. Wiebe Modified: trunk/getdata/bindings/matlab/gd_madd_mplex.m =================================================================== --- trunk/getdata/bindings/matlab/gd_madd_mplex.m 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/matlab/gd_madd_mplex.m 2013-04-05 01:08:18 UTC (rev 825) @@ -1,5 +1,5 @@ function gd_madd_mplex(D, parent, field_code, in_field1, in_field2, ... -count_val, count_max) +count_val, period) % GD_MADD_MPLEX Add a MPLEX metafield % % GD_MADD_MPLEX(DIRFILE,PARENT,NAME,INPUT1,INPUT2,COUNT_VAL,COUNT_MAX) @@ -18,7 +18,7 @@ GD = getdata_constants(); gd_madd(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ... 'in_fields', {{in_field1; in_field2}}, 'count_val', count_val, ... - 'count_max', count_max), parent); + 'period', period), parent); end % Copyright (C) 2013 D. V. Wiebe Modified: trunk/getdata/bindings/matlab/matlab.c =================================================================== --- trunk/getdata/bindings/matlab/matlab.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/matlab/matlab.c 2013-04-05 01:08:18 UTC (rev 825) @@ -843,7 +843,7 @@ const char *linterp_fields[] = {GDMX_COMMON_FIELDS, "in_fields", "table"}; const int mplex_nfields = GDMX_NSCALAR + 3; const char *mplex_fields[] = {GDMX_COMMON_FIELDS, "in_fields", "count_val", - "count_max", GDMX_SCALAR_FIELDS}; + "period", GDMX_SCALAR_FIELDS}; const int multiply_nfields = 1; const char *multiply_fields[] = {GDMX_COMMON_FIELDS, "in_fields"}; const int phase_nfields = GDMX_NSCALAR + 2; @@ -975,7 +975,7 @@ mxSetField(lhs, 0, "in_fields", gdmx_from_nstring_list((const char**)E->in_fields, 2)); mxSetField(lhs, 0, "count_val", gdmx_from_int(E->EN(mplex,count_val))); - mxSetField(lhs, 0, "count_max", gdmx_from_int(E->EN(mplex,count_max))); + mxSetField(lhs, 0, "period", gdmx_from_int(E->EN(mplex,period))); nscalar = 2; break; case GD_MULTIPLY_ENTRY: @@ -1299,8 +1299,8 @@ gdmx_convert_in_fields(rhs[n], &ctx, E); gdmx_convert_struct_scalar(rhs[n], &ctx, "count_val", GD_INT_TYPE, &E->EN(mplex,count_val)); - gdmx_convert_struct_scalar(rhs[n], &ctx, "count_max", GD_INT_TYPE, - &E->EN(mplex,count_max)); + gdmx_convert_struct_scalar(rhs[n], &ctx, "period", GD_INT_TYPE, + &E->EN(mplex,period)); break; case GD_PHASE_ENTRY: gdmx_convert_in_fields(rhs[n], &ctx, E); Modified: trunk/getdata/bindings/matlab/test/big_test.m =================================================================== --- trunk/getdata/bindings/matlab/test/big_test.m 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/matlab/test/big_test.m 2013-04-05 01:08:18 UTC (rev 825) @@ -1866,7 +1866,7 @@ ne = ne + check_num2(228, 3, d.fragment_index, 0); ne = ne + check_sarray2(228, 4, d.in_fields, { 'data'; 'sbit' }); ne = ne + check_num2(228, 5, d.count_val, 1); - ne = ne + check_num2(228, 6, d.count_max, 10); + ne = ne + check_num2(228, 6, d.period, 10); catch exc ne = ne + check_ok(exc, 228); end @@ -1885,7 +1885,7 @@ ne = ne + check_num2(229, 3, d.fragment_index, 0); ne = ne + check_sarray2(229, 4, d.in_fields, { 'in1'; 'in2' }); ne = ne + check_num2(229, 5, d.count_val, 5); - ne = ne + check_num2(229, 6, d.count_max, 6); + ne = ne + check_num2(229, 6, d.period, 6); catch exc ne = ne + check_ok2(exc, 229, 2); end @@ -1904,7 +1904,7 @@ ne = ne + check_num2(230, 3, d.fragment_index, 0); ne = ne + check_sarray2(230, 4, d.in_fields, { 'in3'; 'in2' }); ne = ne + check_num2(230, 5, d.count_val, 0); - ne = ne + check_num2(230, 6, d.count_max, 12); + ne = ne + check_num2(230, 6, d.period, 12); catch exc ne = ne + check_ok2(exc, 230, 2); end @@ -1923,7 +1923,7 @@ ne = ne + check_num2(231, 3, d.fragment_index, 0); ne = ne + check_sarray2(231, 4, d.in_fields, { 'in4'; 'in2' }); ne = ne + check_num2(231, 5, d.count_val, 3); - ne = ne + check_num2(231, 6, d.count_max, 7); + ne = ne + check_num2(231, 6, d.period, 7); catch exc ne = ne + check_ok2(exc, 231, 2); end Modified: trunk/getdata/bindings/perl/GetData.xs =================================================================== --- trunk/getdata/bindings/perl/GetData.xs 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/perl/GetData.xs 2013-04-05 01:08:18 UTC (rev 825) @@ -359,7 +359,7 @@ case GD_MPLEX_ENTRY: gdp_fetch_in_fields(E->in_fields, sv, 2, pkg, func); GDP_EHASH_FETCH_UV("count_val", EN(mplex,count_val), int); - GDP_EHASH_FETCH_UV("count_max", EN(mplex,count_max), int); + GDP_EHASH_FETCH_UV("period", EN(mplex,period), int); gdp_fetch_scalars(E, (HV*)sv, 0x3, pkg, func); break; case GD_RAW_ENTRY: @@ -1243,8 +1243,8 @@ GDP_PUSHrvavpv(E.in_fields, 2); GDP_PUSHpvn("count_val"); GDP_PUSHuv(E.EN(mplex,count_val)); - GDP_PUSHpvn("count_max"); - GDP_PUSHuv(E.EN(mplex,count_max)); + GDP_PUSHpvn("period"); + GDP_PUSHuv(E.EN(mplex,period)); sp = gdp_store_scalars(sp, &E, 0x3); break; case GD_INDEX_ENTRY: Modified: trunk/getdata/bindings/perl/simple_funcs.xsin =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.xsin 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/perl/simple_funcs.xsin 2013-04-05 01:08:18 UTC (rev 825) @@ -141,13 +141,13 @@ int alter_affixes(DIRFILE *dirfile, int index, gdpu_char *prefix, gdpu_char *suffix=NULL) int add_mplex(DIRFILE *dirfile, const char *field_code, const char *in_field, - const char *count_field, int count_val, int count_max, int fragment_index=0) + const char *count_field, int count_val, int period, int fragment_index=0) int alter_mplex(DIRFILE *dirfile, const char *field_code, gdpu_char *in_field=NULL, gdpu_char *count_field=NULL, int count_val=-1, - int count_max=-1) + int period=-1) int madd_mplex(DIRFILE *dirfile, const char *parent, const char *field_code, const char *in_field, const char *count_field, int count_val, - int count_max) + int period) int raw_close(DIRFILE *dirfile, const char *field_code) int desync(DIRFILE *dirfile, unsigned int flags=0) unsigned long int flags(DIRFILE *dirfile, unsigned long int set=0, Modified: trunk/getdata/bindings/perl/t/big_test.t =================================================================== --- trunk/getdata/bindings/perl/t/big_test.t 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/perl/t/big_test.t 2013-04-05 01:08:18 UTC (rev 825) @@ -1621,7 +1621,7 @@ CheckNum2(228, 2, $h{"fragment_index"}, 0); CheckNum2(228, 3, $h{"count_val"}, 1); CheckSArray2(228, 4, $h{"in_fields"}, 'data', 'sbit'); -CheckNum2(228, 5, $h{"count_max"}, 10); +CheckNum2(228, 5, $h{"period"}, 10); # 229: gd_add_mplex check $s = $_->add_mplex('new21', 'in1', 'in2', 5, 6, 0); @@ -1633,7 +1633,7 @@ CheckNum2(229, 2, $h{"fragment_index"}, 0); CheckNum2(229, 3, $h{"count_val"}, 5); CheckSArray2(229, 4, $h{"in_fields"}, 'in1', 'in2'); -CheckNum2(229, 5, $h{"count_max"}, 6); +CheckNum2(229, 5, $h{"period"}, 6); # 230: gd_madd_mplex check $s = $_->madd_mplex('data', 'mnew21', 'in2', 'in3', 0, 12); @@ -1645,7 +1645,7 @@ CheckNum2(230, 2, $h{"fragment_index"}, 0); CheckNum2(230, 3, $h{"count_val"}, 0); CheckSArray2(230, 4, $h{"in_fields"}, 'in2', 'in3'); -CheckNum2(230, 5, $h{"count_max"}, 12); +CheckNum2(230, 5, $h{"period"}, 12); # 231: gd_alter_mplex check $s = $_->alter_mplex('new21', 'in3', 'in4', -1, 7); @@ -1657,7 +1657,7 @@ CheckNum2(231, 2, $h{"fragment_index"}, 0); CheckNum2(231, 3, $h{"count_val"}, 5); CheckSArray2(231, 4, $h{"in_fields"}, 'in3', 'in4'); -CheckNum2(231, 5, $h{"count_max"}, 7); +CheckNum2(231, 5, $h{"period"}, 7); # 232: gd_strtok check @a = $_->strtok('"test1 test2" test3\ test4 test5'); Modified: trunk/getdata/bindings/python/pyentry.c =================================================================== --- trunk/getdata/bindings/python/pyentry.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/python/pyentry.c 2013-04-05 01:08:18 UTC (rev 825) @@ -480,7 +480,7 @@ &E->scalar[0], &E->EN(mplex,count_val)); gdpy_set_scalar_from_pyobj(PyTuple_GetItem(tuple, 3), GD_INT_TYPE, - &E->scalar[1], &E->EN(mplex,count_max)); + &E->scalar[1], &E->EN(mplex,period)); break; case GD_CARRAY_ENTRY: E->EN(scalar,array_len) = @@ -591,7 +591,7 @@ key[0] = "in_field1"; key[1] = "in_field2"; key[2] = "count_val"; - key[3] = "count_max"; + key[3] = "period"; size = 4; break; case GD_CARRAY_ENTRY: @@ -1713,7 +1713,7 @@ return 0; } -static PyObject *gdpy_entry_getcountmax(struct gdpy_entry_t *self, +static PyObject *gdpy_entry_getperiod(struct gdpy_entry_t *self, void *closure) { PyObject *obj = NULL; @@ -1722,42 +1722,42 @@ if (self->E->field_type == GD_MPLEX_ENTRY) { if (self->E->scalar[0] == NULL) - obj = PyInt_FromLong(self->E->EN(mplex,count_max)); + obj = PyInt_FromLong(self->E->EN(mplex,period)); else obj = PyString_FromString(self->E->scalar[0]); } else PyErr_Format(PyExc_AttributeError, "'pygetdata.entry' " - "attribute 'count_max' not available for entry type %s", + "attribute 'period' not available for entry type %s", gdpy_entry_type_names[self->E->field_type]); dreturn("%p", obj); return obj; } -static int gdpy_entry_setcountmax(struct gdpy_entry_t *self, PyObject *value, +static int gdpy_entry_setperiod(struct gdpy_entry_t *self, PyObject *value, void *closure) { - int count_max; + int period; char *scalar; dtrace("%p, %p, %p", self, value, closure); if (self->E->field_type != GD_MPLEX_ENTRY) { PyErr_Format(PyExc_AttributeError, "'pygetdata.entry' " - "attribute 'count_max' not available for entry type %s", + "attribute 'period' not available for entry type %s", gdpy_entry_type_names[self->E->field_type]); dreturn("%i", -1); return -1; } - gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &count_max); + gdpy_set_scalar_from_pyobj(value, GD_INT_TYPE, &scalar, &period); if (PyErr_Occurred()) { dreturn("%i", -1); return -1; } - self->E->EN(mplex,count_max) = count_max; + self->E->EN(mplex,period) = period; free(self->E->scalar[1]); self->E->scalar[1] = scalar; @@ -2032,7 +2032,7 @@ case GD_MPLEX_ENTRY: tuple = Py_BuildValue("(ssII)", self->E->in_fields[0], self->E->in_fields[1], (unsigned int)self->E->EN(mplex,count_val), - (unsigned int)self->E->EN(mplex,count_max)); + (unsigned int)self->E->EN(mplex,period)); break; } @@ -2229,14 +2229,8 @@ { "const_type", (getter)gdpy_entry_getdatatype, (setter)gdpy_entry_setdatatype, "An alias for the data_type attribute.", NULL }, - { "count_max", (getter)gdpy_entry_getcountmax, (setter)gdpy_entry_setcountmax, - "The maximum value of the counter of a MPLEX field. If this is\n" - "specified using a CONST scalar field, this will be the field code of\n" - "that field, otherwise, it will be the number itself.", - NULL }, { "count_val", (getter)gdpy_entry_getcountval, (setter)gdpy_entry_setcountval, "The target value of the counter of a MPLEX field. If this is\n" - /* ------ handy ruler ----------------------------------------------| */ "specified using a CONST scalar field, this will be the field code of\n" "that field, otherwise, it will be the number itself.", NULL }, @@ -2321,6 +2315,13 @@ "dictionary, in which case it will be converted internally to the\n" "corresponding parameters tuple.", NULL }, + { "period", (getter)gdpy_entry_getperiod, (setter)gdpy_entry_setperiod, + "The number of samples between successive occurrences of the MPLEX\n" + "value in the index vector (or zero, if unknown or not constant). If\n" + /* ------ handy ruler ----------------------------------------------| */ + "this is specified using a CONST scalar field, this will be the field\n" + "code of that field, otherwise, it will be the number itself.", + NULL }, { "poly_ord", (getter)gdpy_entry_getpolyord, (setter)gdpy_entry_setpolyord, "The polynomial order of a POLYNOM field. Modifying this will change\n" "the number of terms in the polynomial. If this number is increased,\n" Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/bindings/python/test/big_test.py 2013-04-05 01:08:18 UTC (rev 825) @@ -1850,7 +1850,7 @@ CheckSimple2(228, 2, ent.fragment, 0) CheckSimple2(228, 3, ent.count_val, 1) CheckSimple2(228, 4, ent.in_fields, ( 'data', 'sbit' )) -CheckSimple2(228, 5, ent.count_max, 10) +CheckSimple2(228, 5, ent.period, 10) # 229: gd_add_mplex check ent = pygetdata.entry(pygetdata.MPLEX_ENTRY, "new21", 0, ("in1", "in2", 5, 6)) @@ -1867,7 +1867,7 @@ CheckSimple2(229, 2, ent.fragment, 0) CheckSimple2(229, 3, ent.count_val, 5) CheckSimple2(229, 4, ent.in_fields, ( 'in1', 'in2' )) -CheckSimple2(229, 5, ent.count_max, 6) +CheckSimple2(229, 5, ent.period, 6) # 230: gd_madd_mplex check ent = pygetdata.entry(pygetdata.MPLEX_ENTRY, "mnew21", 0, ("in2", "in3", 0, 12)) @@ -1884,11 +1884,11 @@ CheckSimple2(230, 2, ent.fragment, 0) CheckSimple2(230, 3, ent.count_val, 0) CheckSimple2(230, 4, ent.in_fields, ( 'in2', 'in3' )) -CheckSimple2(230, 5, ent.count_max, 12) +CheckSimple2(230, 5, ent.period, 12) # 231: gd_alter_mplex check ent = pygetdata.entry(pygetdata.MPLEX_ENTRY, "new21", 0, { "count_val": 3, - "in_field1": "in3", "in_field2": "in4", "count_max": 7 }) + "in_field1": "in3", "in_field2": "in4", "period": 7 }) try: d.alter('new21', ent) except: @@ -1902,7 +1902,7 @@ CheckSimple2(231, 2, ent.fragment, 0) CheckSimple2(231, 3, ent.count_val, 3) CheckSimple2(231, 4, ent.in_fields, ( 'in3', 'in4' )) -CheckSimple2(231, 5, ent.count_max, 7) +CheckSimple2(231, 5, ent.period, 7) # 232: gd_strtok check try: Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/dirfile-format.5 2013-04-05 01:08:18 UTC (rev 825) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH dirfile\-format 5 "12 July 2012" "Standards Version 9" "DATA FORMATS" +.TH dirfile\-format 5 "3 April 2013" "Standards Version 9" "DATA FORMATS" .SH NAME dirfile\-format \(em the dirfile database format specification file .SH DESCRIPTION @@ -808,7 +808,7 @@ .IP .I <fieldname> .B MPLEX -.I <input> <index> <count> \fR[\fI<max>\fR] +.I <input> <index> <count> \fR[\fI<period>\fR] .PP where .I input @@ -819,18 +819,22 @@ is the value of the multiplex index when the computed field is stored in .IR input , and -.I max -is the nominal maximum value which the multiplex index takes. If -.I max -is omitted, zero is assumed. If -.I max -is non-zero, the relation -.IR count " <= " max -must hold. Both +.IR period , +if present and non-zero, is the number of samples between successive occurrances +of the value .I count +in the index vector. A +.I period +of zero (or, equivalently, it's omission) indicates that either the value +.I count +is not equally spaced in the index vector, or else that the spacing is unknown. +Both +.I count and -.I max -are non-negative integers. +.I period +are integers, and +.I period +may not be negative. .PP At every sample .IR n , @@ -850,19 +854,19 @@ The values of .I count and -.I max +.I period place no restrictions on values contained in .IR index . Specifically, samples of .I index may exceed -.IR max . +.IR period . Particular values of .I index (including .IR count ) need not be equally spaced (neither by -.I max +.I period nor any other spacing); .I index need not ever take on the value Modified: trunk/getdata/man/gd_add_bit.3 =================================================================== --- trunk/getdata/man/gd_add_bit.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_add_bit.3 2013-04-05 01:08:18 UTC (rev 825) @@ -62,7 +62,7 @@ .HP .BI "int gd_add_mplex(DIRFILE *" dirfile ", const char *" field_name , .BI "const char *" in_field ", const char *" count_field , -.BI "int " count_val ", int " count_max ", int " fragment_index ); +.BI "int " count_val ", int " period ", int " fragment_index ); .HP .BI "int gd_add_multiply(DIRFILE *" dirfile ", const char *" field_name , .BI "const char *" in_field1 ", const char *" in_field2 , Modified: trunk/getdata/man/gd_alter_bit.3 =================================================================== --- trunk/getdata/man/gd_alter_bit.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_alter_bit.3 2013-04-05 01:08:18 UTC (rev 825) @@ -56,7 +56,7 @@ .HP .BI "int gd_alter_mplex(DIRFILE *" dirfile ", const char *" field_name , .BI "const char *" in_field ", const char *" count_field , -.BI "int " count_val ", int " count_max ); +.BI "int " count_val ", int " period ); .HP .BI "int gd_alter_multiply(DIRFILE *" dirfile ", const char *" field_code , .BI "const char *" in_field1 ", const char *" in_field2 ); @@ -170,7 +170,7 @@ .IR spf ", " n_fields ", " numbits ", " cdividend ", or " dividend ; .TP .B -1\fR: -.IR bitnum ", " count_val ", or " count_max ; +.IR bitnum " or " period ; .TP .B GD_NULL\fR: .IR data_type " or " const_type ; Modified: trunk/getdata/man/gd_cbopen.3 =================================================================== --- trunk/getdata/man/gd_cbopen.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_cbopen.3 2013-04-05 01:08:18 UTC (rev 825) @@ -1,6 +1,6 @@ .\" gd_cbopen.3. The gd_cbopen man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_cbopen 3 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_cbopen 3 "3 April 2013" "Version 0.8.4" "GETDATA" .SH NAME gd_cbopen, gd_open \(em open or create a dirfile .SH SYNOPSIS @@ -514,8 +514,7 @@ An attempt was made to add a RAW metafield. .TP .B GD_E_FORMAT_MPLEXVAL -A MPLEX specification has a negative count_max or count_val, or else had -a positive count_max, and count_val was larger than it. +A MPLEX specification has a negative period. .TP .B GD_E_FORMAT_N_FIELDS The number of fields of a LINCOM field was out-of-range. Modified: trunk/getdata/man/gd_entry.3 =================================================================== --- trunk/getdata/man/gd_entry.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_entry.3 2013-04-05 01:08:18 UTC (rev 825) @@ -1,6 +1,6 @@ .\" gd_entry.3. The gd_entry man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_entry 3 "15 August 2012" "Version 0.8.1" "GETDATA" +.TH gd_entry 3 "3 April 2013" "Version 0.8.4" "GETDATA" .SH NAME gd_entry \(em retrieve a dirfile field's metadata .SH SYNOPSIS @@ -240,7 +240,7 @@ fields, the first element corresponds to .I count_val and the second to -.IR count_max . +.IR period . The remainder are uninitialised. .IP \(bu For @@ -545,7 +545,7 @@ const char *in_fields[2]; /* input field codes */ int count_val; /* value of the multiplex index */ - int count_max; /* maximum of the multiplex index */ + int period; /* samples between successive count_vals */ ... } gd_entry_t; @@ -564,10 +564,12 @@ in the input field. .PP The -.I count_max -member is the maximum value of the multiplex index, or zero, if this is not -specified. This is only used to determine how far to look back for a starting -value for the output field; see +.I period +member is the number of samples between successive occurrances of +.I count_val +in the index vector, or zero, if this is not known or constant. This is only +used to determine how far to look back for a starting value for the output +field; see .BR gd_mplex_lookback (3). .SS MULTIPLY and DIVIDE Members @@ -919,7 +921,7 @@ double|b[3]|double|u.lincom.b[3] const char*|table|const char*|u.linterp.table int|count_val|int|u.mplex.count_val -int|count_max|int|u.mplex.count_max +int|period|int|u.mplex.period gd_shift_t|shift|gd_shift_t|u.phase.shift int|poly_ord|int|u.polynom.poly_ord double complex|ca[3]|double|u.polynom.ca[3][2] @@ -930,8 +932,8 @@ double|dividend|double|u.recip.dividend gd_type_t|const_type|gd_type_t|u.scalar.const_type size_t|array_len|size_t|u.scalar.array_len -gd_windop_t|count_val|gd_windop_t|u.window.windop -gd_triplet_t|count_max|gd_triplet_t|u.window.threshold +gd_windop_t|windop|gd_windop_t|u.window.windop +gd_triplet_t|threshold|gd_triplet_t|u.window.threshold .TE .PP In the case of complex valued data in the C89 API, the first element of the Modified: trunk/getdata/man/gd_madd_bit.3 =================================================================== --- trunk/getdata/man/gd_madd_bit.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_madd_bit.3 2013-04-05 01:08:18 UTC (rev 825) @@ -65,7 +65,7 @@ .BI "int gd_madd_mplex(DIRFILE *" dirfile , .BI "const char *" parent ", const char *" field_name , .BI "const char *" in_field ", const char *" count_field , -.BI "int " count_val ", int " count_max ); +.BI "int " count_val ", int " period ); .HP .BI "int gd_madd_multiply(DIRFILE *" dirfile , .BI "const char *" parent ", const char *" field_name , Modified: trunk/getdata/man/gd_mplex_lookback.3 =================================================================== --- trunk/getdata/man/gd_mplex_lookback.3 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/man/gd_mplex_lookback.3 2013-04-05 01:08:18 UTC (rev 825) @@ -1,6 +1,6 @@ .\" gd_mplex_lookback.3. The gd_mplex_lookback man page. .\" -.\" Copyright (C) 2012 D. V. Wiebe +.\" Copyright (C) 2012, 2013 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_mplex_lookback 3 "20 June 2012" "Version 0.8.0" "GETDATA" +.TH gd_mplex_lookback 3 "3 April 2013" "Version 0.8.4" "GETDATA" .SH NAME gd_mplex_lookback \(em set the GetData lookback length for MPLEX fields. .SH SYNOPSIS @@ -61,30 +61,33 @@ Otherwise, .I lookback should be a positive number specifying the number of -.I MPLEX cycles -to search. Each .B MPLEX -field has its own MPLEX cycle length, measured in samples of the index field, -which is defined as follows: +periods to search. Each +.B MPLEX +field has its own period, measured in samples of the index field, which is +defined as follows: .IP \(bu if the .B MPLEX field in question specifies an optional -.I count_max -positive parameter (see the MPLEX definition in dirfile-format(5)), its MPLEX -cycle length is that many samples; +.I period +positive parameter (see the +.B MPLEX +definition in +.BR dirfile-format (5)), +its period is that many samples; .IP \(bu otherwise, if the .B MPLEX field's .I count_val -is at least five, its MPLEX cycle length is twice as many samples as that value; +is at least five, its period is one more sample than twice that value; .IP \(bu -otherwise, the +otherwise, the period is ten samples. +.PP +So, given the following .B MPLEX -cycle length is ten samples. -.PP -So, given the following MPLEX definitions: +definitions: .IP field1 \fBMPLEX\fR data_field index_field 7 12 .br @@ -95,22 +98,23 @@ field4 \fBMPLEX\fR data_field index_field 2 .PP .I field1 -has a cycle length of 12 samples and +has a period of 12 samples and .I field2 -a cycle length of 6 samples (both the value of their -.I count_max +a period of 6 samples (both the value of their +.I period parameters); .I field3 -has a cycle length of 14 samples (twice it's +has a period of 15 samples (one more than twice it's .IR count_val ), and .I field4 -has a cycle length of 10 samples (the default value, since its +has a period of 10 samples (the default value, since its .I count_val is less than five). .PP -The initial value of the MPLEX lookback is ten cycles. This value is provided -in getdata.h as +The initial value of the +.B MPLEX +lookback is ten periods. This value is provided in getdata.h as .BR GD_DEFAULT_LOOKBACK . This function always succeeds and returns no value. Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/add.c 2013-04-05 01:08:18 UTC (rev 825) @@ -428,7 +428,7 @@ break; case GD_MPLEX_ENTRY: E->EN(mplex,count_val) = entry->EN(mplex,count_val); - E->EN(mplex,count_max) = entry->EN(mplex,count_max); + E->EN(mplex,period) = entry->EN(mplex,period); if (_GD_CheckCodeAffixes(D, NULL, entry->in_fields[0], entry->fragment_index) || _GD_CheckCodeAffixes(D, NULL, @@ -441,15 +441,13 @@ E->in_fields[1] = _GD_Strdup(D, entry->in_fields[1]); E->e->u.mplex.type = GD_NULL; - if (entry->EN(mplex,count_max) < 0) - _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_CNTMAX, NULL, - entry->EN(mplex,count_max), NULL); - else if (entry->EN(mplex,count_max) > 0 && - entry->EN(mplex,count_val) >= entry->EN(mplex,count_max)) - { + if (entry->EN(mplex,period) < 0) + _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_PERIOD, NULL, + entry->EN(mplex,period), NULL); + else if (entry->EN(mplex,count_val) < 0) _GD_SetError(D, GD_E_BAD_ENTRY, GD_E_ENTRY_CNTVAL, NULL, entry->EN(mplex,count_val), NULL); - } + copy_scalar[0] = copy_scalar[1] = 1; break; case GD_CONST_ENTRY: @@ -1274,14 +1272,14 @@ /* 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) + const char *count_field, int count_val, int period, int fragment_index) gd_nothrow { gd_entry_t E; int error; dtrace("%p, \"%s\", \"%s\", \"%s\", %i, %i, %i", D, field_code, in_field, - count_field, count_val, count_max, fragment_index); + count_field, count_val, period, fragment_index); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -1293,7 +1291,7 @@ E.field = (char *)field_code; E.field_type = GD_MPLEX_ENTRY; E.EN(mplex,count_val) = count_val; - E.EN(mplex,count_max) = count_max; + E.EN(mplex,period) = period; E.in_fields[0] = (char *)in_field; E.in_fields[1] = (char *)count_field; E.fragment_index = fragment_index; @@ -1871,14 +1869,14 @@ /* 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) + const char *in_field, const char *count_field, int count_val, int period) gd_nothrow { int error; gd_entry_t E; dtrace("%p, \"%s\", \"%s\", \"%s\", \"%s\", %i, %i", D, parent, field_code, - in_field, count_field, count_val, count_max); + in_field, count_field, count_val, period); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -1890,7 +1888,7 @@ E.field = (char *)field_code; E.field_type = GD_MPLEX_ENTRY; E.EN(mplex,count_val) = count_val; - E.EN(mplex,count_max) = count_max; + E.EN(mplex,period) = period; E.in_fields[0] = (char *)in_field; E.in_fields[1] = (char *)count_field; error = (_GD_Add(D, &E, parent) == NULL) ? -1 : 0; Modified: trunk/getdata/src/del.c =================================================================== --- trunk/getdata/src/del.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/del.c 2013-04-05 01:08:18 UTC (rev 825) @@ -204,7 +204,7 @@ _GD_DeReferenceOne(D, E, C, check, 0, GD_INT_TYPE, &E->EN(mplex,count_val)); _GD_DeReferenceOne(D, E, C, check, 1, GD_INT_TYPE, - &E->EN(mplex,count_max)); + &E->EN(mplex,period)); break; case GD_NO_ENTRY: case GD_LINTERP_ENTRY: Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/entry.c 2013-04-05 01:08:18 UTC (rev 825) @@ -274,7 +274,7 @@ break; case GD_MPLEX_ENTRY: _GD_GetScalar(D, E, 0, GD_INT_TYPE, &E->EN(mplex,count_val), err); - _GD_GetScalar(D, E, 1, GD_INT_TYPE, &E->EN(mplex,count_max), err); + _GD_GetScalar(D, E, 1, GD_INT_TYPE, &E->EN(mplex,period), err); break; case GD_NO_ENTRY: case GD_LINTERP_ENTRY: Modified: trunk/getdata/src/errors.c =================================================================== --- trunk/getdata/src/errors.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/errors.c 2013-04-05 01:08:18 UTC (rev 825) @@ -78,7 +78,7 @@ { GD_E_FORMAT, GD_E_FORMAT_ALIAS, "Cannot use alias {4} as parent to a meta field on line {3} of {2}", 0 }, { GD_E_FORMAT, GD_E_FORMAT_MPLEXVAL, - "Count value ({4}) exceeds maximum on line {3} of {2}", 0 }, + "Bad MPLEX period ({4}) on line {3} of {2}", 0 }, /* GD_E_TRUNC: 1 = suberror, 2 = filename. 3 = errno */ { GD_E_TRUNC, 0, "Error truncating {2}: ", 1 }, /* GD_E_CREAT: 1 = suberror, 2 = filename, 3 = errno */ @@ -139,7 +139,7 @@ { GD_E_BAD_ENTRY, GD_E_ENTRY_POLYORD, "POLYNOM order out of range: {3}", 0 }, { GD_E_BAD_ENTRY, GD_E_ENTRY_WINDOP, "Unrecognised WINDOW operator: {3}", 0 }, { GD_E_BAD_ENTRY, GD_E_ENTRY_CNTVAL, "Count value out of range: {3}", 0 }, - { GD_E_BAD_ENTRY, GD_E_ENTRY_CNTMAX, "Count max out of range: {3}", 0 }, + { GD_E_BAD_ENTRY, GD_E_ENTRY_PERIOD, "MPLEX period out of range: {3}", 0 }, /* GD_E_DUPLICATE: 4 = name */ { GD_E_DUPLICATE, 0, "Field code already present: {4}", 0 }, /* GD_E_DIMENSION: 2 = parent field (if any), 4 = field code */ Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/flush.c 2013-04-05 01:08:18 UTC (rev 825) @@ -534,10 +534,10 @@ 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]) { + if (E->EN(mplex,period) > 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"); + &E->EN(mplex,period), E->scalar[1], E->scalar_ind[1], "\n"); } else fputc('\n', stream); break; Modified: trunk/getdata/src/getdata.c =================================================================== --- trunk/getdata/src/getdata.c 2013-03-19 20:22:16 UTC (rev 824) +++ trunk/getdata/src/getdata.c 2013-04-05 01:08:18 UTC (rev 825) @@ -1696,15 +1696,14 @@ else if (tmpbuf[0] != E->EN(mplex,count_val) && D->lookback) { /* It wasn't -- do a look-back to find the start value. On a, say, gzipped * field this is expensive sin... [truncated message content] |
From: <ket...@us...> - 2013-04-05 01:27:56
|
Revision: 826 http://sourceforge.net/p/getdata/code/826 Author: ketiltrout Date: 2013-04-05 01:27:53 +0000 (Fri, 05 Apr 2013) Log Message: ----------- Fix tests. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/perl/t/big_test.t Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-04-05 01:08:18 UTC (rev 825) +++ trunk/getdata/ChangeLog 2013-04-05 01:27:53 UTC (rev 826) @@ -1,4 +1,8 @@ -2013-03-13 D. V. Wiebe <ge...@ke...> svn:825 +2013-04-05 D. V. Wiebe <ge...@ke...> svn:826 + * bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 + bindings/perl/t/big_test.t: Fix test 231. + +2013-04-05 D. V. Wiebe <ge...@ke...> svn:825 * src/getdata.h.in: Renamed gd_entry_t.count_max to gd_entry_t.period. * bindings/cxx/getdata/entry.h (Entry::Period) Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2013-04-05 01:08:18 UTC (rev 825) +++ trunk/getdata/bindings/f77/test/big_test.f 2013-04-05 01:27:53 UTC (rev 826) @@ -2042,7 +2042,7 @@ CALL CHKIN2(ne, 230, 7, j, 12) C 231: GDALMX check - CALL GDALMX(d, 'new21', 5, 'in3', 3, 'in4', 3, -1, 7) + CALL GDALMX(d, 'new21', 5, 'in3', 3, 'in4', 3, 7, -1) CALL CHKOK2(ne, 231, 1, d) l = flen @@ -2052,10 +2052,10 @@ CALL CHKIN2(ne, 231, 1, i, flen) CALL CHKIN2(ne, 231, 2, l, flen) CALL CHKIN2(ne, 231, 3, n, 0) - CALL CHKIN2(ne, 231, 4, m, 5) + CALL CHKIN2(ne, 231, 4, m, 7) CALL CHKST2(ne, 231, 5, fields(1), 'in3') CALL CHKST2(ne, 231, 6, fields(2), 'in4') - CALL CHKIN2(ne, 231, 7, j, 7) + CALL CHKIN2(ne, 231, 7, j, 6) C 232: GDTOKE check l = slen Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2013-04-05 01:08:18 UTC (rev 825) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2013-04-05 01:27:53 UTC (rev 826) @@ -2480,17 +2480,17 @@ call check_int2(ne, 230, 6, ent%period, 12) ! 231: fgd_alter_mplex check - call fgd_alter_mplex(d, 'new21', 'in3', 'in4', -1, 7) + call fgd_alter_mplex(d, 'new21', 'in3', 'in4', 7, -1) call check_ok2(ne, 231, 1, d) n = fgd_entry(d, 'new21', ent) call check_ok2(ne, 231, 2, d) call check_int2(ne, 231, 1, n, GD_MPLEX_ENTRY) call check_int2(ne, 231, 2, ent%fragment_index, 0) - call check_int2(ne, 231, 3, ent%count_val, 5) + call check_int2(ne, 231, 3, ent%count_val, 7) call check_str2(ne, 231, 4, ent%field(1), 'in3') call check_str2(ne, 231, 5, ent%field(2), 'in4') - call check_int2(ne, 231, 6, ent%period, 7) + call check_int2(ne, 231, 6, ent%period, 6) ! 232: fgd_strtok check l = slen Modified: trunk/getdata/bindings/perl/t/big_test.t =================================================================== --- trunk/getdata/bindings/perl/t/big_test.t 2013-04-05 01:08:18 UTC (rev 825) +++ trunk/getdata/bindings/perl/t/big_test.t 2013-04-05 01:27:53 UTC (rev 826) @@ -1648,16 +1648,16 @@ CheckNum2(230, 5, $h{"period"}, 12); # 231: gd_alter_mplex check -$s = $_->alter_mplex('new21', 'in3', 'in4', -1, 7); +$s = $_->alter_mplex('new21', 'in3', 'in4', 7, -1); CheckOK2(231, 1); %h = $_->entry('new21'); CheckOK2(231, 2); CheckNum2(231, 1, $h{"field_type"}, $GetData::MPLEX_ENTRY); CheckNum2(231, 2, $h{"fragment_index"}, 0); -CheckNum2(231, 3, $h{"count_val"}, 5); +CheckNum2(231, 3, $h{"count_val"}, 7); CheckSArray2(231, 4, $h{"in_fields"}, 'in3', 'in4'); -CheckNum2(231, 5, $h{"period"}, 7); +CheckNum2(231, 5, $h{"period"}, 6); # 232: gd_strtok check @a = $_->strtok('"test1 test2" test3\ test4 test5'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-04-06 02:17:13
|
Revision: 827 http://sourceforge.net/p/getdata/code/827 Author: ketiltrout Date: 2013-04-06 02:17:09 +0000 (Sat, 06 Apr 2013) Log Message: ----------- Re-implement CountMax/SetCoutMax in C++ for backwards compatiblity. Fix perl mandir. Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/getdata/entry.h trunk/getdata/bindings/cxx/getdata/mplexentry.h trunk/getdata/configure.ac trunk/getdata/doc/README.cxx trunk/getdata/doc/README.f77 trunk/getdata/doc/README.f95 trunk/getdata/doc/README.idl trunk/getdata/doc/README.matlab trunk/getdata/m4/perl.m4 trunk/getdata/man/dirfile-format.5 Added Paths: ----------- trunk/getdata/doc/README.perl Removed Paths: ------------- trunk/getdata/doc/README.perl.in Property Changed: ---------------- trunk/getdata/doc/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/ChangeLog 2013-04-06 02:17:09 UTC (rev 827) @@ -1,3 +1,9 @@ +2013-04-06 D. V. Wiebe <ge...@ke...> svn:827 + * bindings/cxx/getdata/entry.h (Entry::CountMax) + bindings/cxx/getdata/mplexentry.h (MplexEntry::CountMax + MplexEntry::SetCountMax): Added (but marked deprecated) for backwards + compatibility. + 2013-04-05 D. V. Wiebe <ge...@ke...> svn:826 * bindings/f77/test/big_test.f bindings/f77/test/big_test95.f90 bindings/perl/t/big_test.t: Fix test 231. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/NEWS 2013-04-06 02:17:09 UTC (rev 827) @@ -1,56 +1,89 @@ New in version 0.8.4a: + Dirfile Changes: + + * CLARIFICATION: Inconsistant behaviour in the library, coupled with + contradictory statements in the Dirfile Standards, has resulted in confusion + over the meaning of the final, optional, parameter in a MPLEX definition. + To be clear: this parameter is simply the expected period between successive + occurances of the "count" value in the index vector. (It is used by GetData + only to figure out a resonable length for the MPLEX lookback.) The + following clarifications and corrections have been made to the definition + of the MPLEX field type in dirfile-format(5): + + - The final, optional parameter has been renamed from "max" to "period". + + - This parameter indicates not the maximal range of the index vector, as + previously stated, but the expected number of samples between successive + occurances of the specified "count" value in the index vector; as before, + it should be regarded as a hint, and does not place any actual restriction + on the contents of the index vector. + + - The incorrect requirement that the "count" parameter be non-negative has + been deleted. + + - The incorrect requirement that "count" be less than or equal to "max", if + "max" is present and non-zero, has been deleted. + + - The meaning of an omitted or zero "period", indicating that the spacing of + "count" in the index vector is unknown or non-uniform, is now explicitly + stated. + + - Different MPLEX fields using the same index vector may specify different + periods. + + See also the related library bug fixes below. + Library Changes: - * BUG FIX: Inconsistant behaviour in the library, coupled with contradictory - statements in the Dirfile Standards, has resulted in confusion over the - meaning of the final, optional, parameter in a MPLEX definition. To be clear: - this parameter is simply the expected period between successive occurances of - the mplex value in the index vector. It is used by GetData only to figure out - a resonable length of the MPLEX lookback. To help reduce confusion, this - parameter has been renamed from "count_max" to "period". The Standards have - also been clarified. See also the following related bug fixes. + * The count_max member of the gd_entry_t object has been renamed period. The + corresponding dummy argument in various function prototypes has been + similarly renamed. - * BUG FIX: The count_val MPLEX parameter is not restricted to non-negative - numbers. + * BUG FIX: The library no longer incorrectly rejects negative count_val MPLEX + parameters. Furthermore, a count_val of -1 in gd_alter_entry or + gd_[m]alter_mplex calls is not a special value: it just sets count_val to + -1. - * BUG FIX: The optional period (formerly count_max) MPLEX parameter does not - restrict allowed values of the count_val parameter. + * BUG FIX: The library no longer incorrectly rejects MPLEX fields where + count_val is greater than the period (formerly called count_max). * BUG FIX: The default MPLEX period, if none is specified, is 2*count_val + 1, - not simply 2 * count_val, when count_val is greater than 5. + not simply 2 * count_val, when count_val is greater than 5. - * BUG FIX: A count_val of -1 in gd_alter_entry or gd_[m]alter_mplex calls is - not a special value: it just sets the count_val to -1. - * BUG FIX: Trying to position an I/O pointer to before sample zero with - gd_seek() now properly fails. Previously it would allow it, causing bizarre - things to happen later. + gd_seek() now properly fails. Previously it would allow it, causing bizarre + things to happen later. * BUG FIX: Using gd_tell to get the I/O pointer position of a derived field - with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly - reports an error in the "multiposition" case (ie. when the two inputs are - ultimately reading from different locations in the same RAW field). + with exactly two input fields (MULTIPLY, DIVIDE, MPLEX, WINDOW) now properly + reports an error in the "multiposition" case (ie. when the two inputs are + ultimately reading from different locations in the same RAW field). * BUG FIX: Trying to read sample zero of a gzipped RAW field the second time - now works as expected. Previously, the request to reposition the I/O pointer - back to zero would be ignored by the gzip framework. Reported by Alexandra - Rahlin. + now works as expected. Previously, the request to reposition the I/O + pointer back to zero would be ignored by the gzip framework. Reported by + Alexandra Rahlin. * BUG FIX: The field code of a reference field declared in a subfragment - included with affixes is no longer corrupted by spurious application of the - affixes when the subfragment's metadata are (re-)written. Reported by Seth. + included with affixes is no longer corrupted by spurious application of the + affixes when the subfragment's metadata are (re-)written. Reported by Seth. Bindings Changes: - * IDL BUG FIX: Entry structs representing MPLEX fields are now properly - interpreted. Previously, the underlying gd_entry_t object was being - incorrectly initialised. + * C++: The Entry and MplexEntry member functions CountMax and SetCountMax have + been renamed to Period and SetPeriod for consistency with the changes listed + above. CountMax and SetCountMax are still avaialbe as aliases, but are + marked deprecated. + * IDL BUG FIX: GD_ENTRY structures representing MPLEX fields are now properly + interpreted. Previously, the underlying gd_entry_t object was being + incorrectly initialised. + * PYTHON BUG FIX: Numpy arrays returned by dirfile.getdata() are now the - correct length. Previously they would always be the length requested (or the - length of the dirfile, if no length was explicitly given) even if fewer - samples were returned. Extra elements would contain uninitialised memory. + correct length. Previously they would always be the length requested (or + the length of the dirfile, if no length was explicitly given) even if fewer + samples were returned. Extra elements would contain uninitialised memory. |==============================================================================| @@ -59,27 +92,28 @@ Library Changes: * BUG FIX: Several bugs on big-ended systems have been fixed. Reported by - Dinar Valeev. + Dinar Valeev. * BUG FIX: Adding an entry via gd_[m]add() with a negative CARRAY scalar index - no longer results in an internal error or worse when the added field is later - read. + no longer results in an internal error or worse when the added field is + later read. * BUG FIX: Changing a CONST field to a real floating point type using - gd_alter_const() (or similar) no longer results in the value of the field - being corrupted. + gd_alter_const() (or similar) no longer results in the value of the field + being corrupted. * BUG FIX: A bug in the parser's tokeniser has been fixed to prevent spurious - "unterminated token" syntax errors. Typically this would only be seen when - using gd_strtok() to tokenise an (apparently innocuous) user-supplied string, - but a carefully crafted format file could also be made to get gd_open() to - produce it. + "unterminated token" syntax errors. Typically this would only be seen when + using gd_strtok() to tokenise an (apparently innocuous) user-supplied + string, but a carefully crafted format file could also be made to get + gd_open() to produce it. Bindings Changes: * Bindings for MATLAB have been added. + * The IDL, Perl, and Python bindings no longer require a C99 compiler to be - built. + built. |==============================================================================| Modified: trunk/getdata/bindings/cxx/getdata/entry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/entry.h 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/bindings/cxx/getdata/entry.h 2013-04-06 02:17:09 UTC (rev 827) @@ -228,6 +228,9 @@ return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.period : 0; } + /* deprecated member alias */ + virtual int gd_deprecated CountMax() const { return Period(); } + /* Set methods */ void SetName(const char* name); Modified: trunk/getdata/bindings/cxx/getdata/mplexentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/bindings/cxx/getdata/mplexentry.h 2013-04-06 02:17:09 UTC (rev 827) @@ -56,6 +56,15 @@ virtual int SetPeriod(int period); virtual int SetPeriod(const char* period); + /* deprecated member aliases */ + virtual int gd_deprecated CountMax() const { return Period(); }; + virtual int gd_deprecated SetCountMax(int period) { + return SetPeriod(period); + } + virtual int gd_deprecated SetCountMax(const char* period) { + return SetPeriod(period); + }; + private: MplexEntry(const GetData::Dirfile *dirfile, const char* field_code) : Entry(dirfile, field_code) { }; Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/configure.ac 2013-04-06 02:17:09 UTC (rev 827) @@ -1036,9 +1036,6 @@ 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]) Index: trunk/getdata/doc =================================================================== --- trunk/getdata/doc 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc 2013-04-06 02:17:09 UTC (rev 827) Property changes on: trunk/getdata/doc ___________________________________________________________________ Modified: svn:ignore ## -1,3 +1,2 ## Makefile.in Makefile -README.perl Modified: trunk/getdata/doc/README.cxx =================================================================== --- trunk/getdata/doc/README.cxx 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.cxx 2013-04-06 02:17:09 UTC (rev 827) @@ -400,7 +400,7 @@ * virtual WindOpType Entry::WindOp() * virtual gd_triplet_t Entry::Threshold() * virtual int Entry::CountVal() -* virtual int Entry::CountMax() +* virtual int Entry::Period() These methods will return the corresponding member of the gd_entry_t object. Only methods reasonable to be queried for the given field type will return @@ -767,7 +767,7 @@ * virtual const char *MplexEntry::Scalar() * virtual int MplexEntry::ScalarIndex() * virtual int MplexEntry::CountVal() -* virtual int MplexEntry::CountMax() +* virtual int MplexEntry::Period() These methods, re-implemented from the Entry class, return the corresponding field parameter. @@ -776,8 +776,8 @@ * int MplexEntry::SetWindOp(WindOpType coeff) * int MplexEntry::SetCountVal(int count_val) * int MplexEntry::SetCountVal(const char *count_val) -* int MplexEntry::SetCountMax(int count_max) -* int MplexEntry::SetCountMax(const char *count_max) +* int MplexEntry::SetPeriod(int period) +* int MplexEntry::SetPeriod(const char *period) These functions will change the specified input field, check field, or the count value or max to the value or field code supplied. Modified: trunk/getdata/doc/README.f77 =================================================================== --- trunk/getdata/doc/README.f77 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.f77 2013-04-06 02:17:09 UTC (rev 827) @@ -1132,11 +1132,11 @@ specified is not of POLYNOM type, infield_len will be set to zero. In this case the value of the remaining data is unspecified. -* GDGEMX(infield, infield_len, countfield, countfield_len, countval, countmax, +* GDGEMX(infield, infield_len, countfield, countfield_len, countval, period, fragment_index, dirfile_unit, field_code, field_code_len) Output: - INTEGER countval, countmax, fragment_index + INTEGER countval, period, fragment_index CHARACTER*<infield_len> infield CHARACTER*<countfield_len> countfield Input/Output: @@ -1460,11 +1460,11 @@ should be of type integer, otherwise it should be double precision. * GDALMX(dirfile_unit, field_code, field_code_len, infield, infield_len, - countfield, countfield_len, countval, countmax) + countfield, countfield_len, countval, period) Input: INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval - INTEGER countmax + INTEGER period CHARACTER*<field_code_len> field_code CHARACTER*<infield_len> infield CHARACTER*<countfield_len> countfield @@ -1837,11 +1837,11 @@ should be of type double precision. * GDADMX(dirfile_unit, field_code, field_code_len, infield, infield_len, - countfield, countfield_len, countval, countmax, fragment_index) + countfield, countfield_len, countval, period, fragment_index) Input: INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval - INTEGER countmax, fragment_index + INTEGER period, fragment_index CHARACTER*<field_code_len> field_code CHARACTER*<infield_len> infield CHARACTER*<countfield_len> countfield @@ -1939,7 +1939,7 @@ * GDMDWD(dirfile_unit, parent, field_code, field_code_len, in_field, in_field_len, check_field, check_field_len, windop, threshold) * GDMDMX(dirfile_unit, parent, field_code, field_code_len, in_field, - in_field_len, count_field, count_field_len, count_val, count_max) + in_field_len, count_field, count_field_len, count_val, period) * GDMDCA(dirfile_unit, parent, parent_len, field_code, field_code_len, const_type, array_len, data_type, data) * GDMDCO(dirfile_unit, parent, parent_len, field_code, field_code_len, Modified: trunk/getdata/doc/README.f95 =================================================================== --- trunk/getdata/doc/README.f95 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.f95 2013-04-06 02:17:09 UTC (rev 827) @@ -231,9 +231,9 @@ character (len=*), intent(in) :: field_name, in_field, table * subroutine fgd_add_mplex (dirfile, field_code, in_field, count_field, - count_val, count_max, fragment_index) + count_val, period, fragment_index) character(len=*), intent(in) :: field_code, in_field, count_field - integer, intent(in) :: dirfile, count_val, count_max, fragment_index + integer, intent(in) :: dirfile, count_val, period, fragment_index * subroutine fgd_add_multiply (dirfile, field_name, in_field1, in_field2, fragment_index) @@ -353,9 +353,9 @@ character (len=*), intent(in) :: field_name, in_field, table, parent * subroutine fgd_madd_mplex (dirfile, parent, field_code, in_field, count_field, - count_val, count_max) + count_val, period) character(len=*), intent(in) :: parent, field_code, in_field, count_field - integer, intent(in) :: dirfile, count_val, count_max + integer, intent(in) :: dirfile, count_val, period * subroutine fgd_madd_phase (dirfile, parent, field_name, in_field, phase) integer, intent(in) :: dirfile, phase @@ -512,8 +512,8 @@ character (len=*), intent(in) :: field_name, in_field, table * subroutine fgd_alter_mplex (dirfile, field_name, in_field, count_field, - count_val, count_max) - integer, intent(in) :: dirfile, count_val, count_max + count_val, period) + integer, intent(in) :: dirfile, count_val, period character (len=*), intent(in) :: field_name, in_field, count_field * subroutine fgd_alter_multiply (dirfile, field_name, in_field1, in_field2) @@ -872,7 +872,7 @@ type gd_entry integer :: field_type, n_fields, spf, data_type, bitnum, numbits, shift integer :: fragment_index, comp_scal, poly_ord, array_len, windop - integer :: ithreshold, count_val, count_max + integer :: ithreshold, count_val, period character (len=GD_FIELD_LEN), dimension(3) :: field character (len=GD_FIELD_LEN), dimension(6) :: scalar integer, dimension(6) :: scalar_ind Modified: trunk/getdata/doc/README.idl =================================================================== --- trunk/getdata/doc/README.idl 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.idl 2013-04-06 02:17:09 UTC (rev 827) @@ -117,7 +117,6 @@ CB DCOMPLEX Array[3] BITNUM INT COMP_SCAL INT - COUNT_MAX INT COUNT_VAL INT DATA_TYPE INT DIVIDEND DOUBLE @@ -126,6 +125,7 @@ CM DCOMPLEX Array[3] N_FIELDS INT NUMBITS INT + PERIOD INT POLY_ORD INT SCALAR STRING Array[6] SCALAR_IND INT Array[6] @@ -445,7 +445,7 @@ field metadata. See gd_alter_linterp(3). PROCEDURE GD_ALTER_MPLEX, dirfile_unit, field_code, COUNT_FIELD=count_field, - COUNT_MAX=count_max, COUNT_VAL=count_val, IN_FIELD=in_field + PERIOD=period, COUNT_VAL=count_val, IN_FIELD=in_field This procedure modifies the metadata of the MPLEX field specified by 'field_code', updating only those field parameters specified as keyword Modified: trunk/getdata/doc/README.matlab =================================================================== --- trunk/getdata/doc/README.matlab 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.matlab 2013-04-06 02:17:09 UTC (rev 827) @@ -8,10 +8,10 @@ The compatibility library is installed in ${libdir}. By default, the MATLAB files are installed in ${libdir}/getdata/matlab/getdata, although this path can be changed with the --with-matlab-dir option to ./configure. To use the -bindings, the install directory must be added to the MATLAB path. +bindings, the installation directory must be added to the MATLAB path. Full documentation of the bindings are provided from within the MATLAB help -system. After installing the bindings are installed, running +system. After installing the bindings, running >> help getdata Copied: trunk/getdata/doc/README.perl (from rev 826, trunk/getdata/doc/README.perl.in) =================================================================== --- trunk/getdata/doc/README.perl (rev 0) +++ trunk/getdata/doc/README.perl 2013-04-06 02:17:09 UTC (rev 827) @@ -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 3 of +the UNIX manual: + + $ man 3 GetData + +Before installation, the manual can be read using a command along the lines of + + $ pod2man bindings/perl/GetData.pm.in | nroff -mandoc | less Deleted: trunk/getdata/doc/README.perl.in =================================================================== --- trunk/getdata/doc/README.perl.in 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/doc/README.perl.in 2013-04-06 02:17:09 UTC (rev 827) @@ -1,16 +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 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 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/m4/perl.m4 2013-04-06 02:17:09 UTC (rev 827) @@ -177,7 +177,7 @@ GD_PERL_CONFIG([perlmandir], [siteman3direxp]) elif test $perl_inst_type != "vendor"; then perldir="${local_perl_path}" - perlmandir="${mandir}" + perlmandir="${man3dir}" fi if test $perlmandir = "UNKNOWN"; then Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2013-04-05 01:27:53 UTC (rev 826) +++ trunk/getdata/man/dirfile-format.5 2013-04-06 02:17:09 UTC (rev 827) @@ -857,12 +857,8 @@ .I period place no restrictions on values contained in .IR index . -Specifically, samples of +Specifically, particular values of .I index -may exceed -.IR period . -Particular values of -.I index (including .IR count ) need not be equally spaced (neither by @@ -871,8 +867,11 @@ .I index need not ever take on the value .I count -(in which case the value of the entirety of the output vector is -implementation dependent). MPLEX appeared in Standards Version 9. +(in which case the value of the entirety of the derived field is +implementation dependent). Different MPLEX field definitions which use the +same index vector may specify different +.IR period s. +MPLEX appeared in Standards Version 9. .RE .TP This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-04-10 02:21:13
|
Revision: 829 http://sourceforge.net/p/getdata/code/829 Author: ketiltrout Date: 2013-04-10 02:21:09 +0000 (Wed, 10 Apr 2013) Log Message: ----------- GetData-0.8.4rc1. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-04-06 02:26:25 UTC (rev 828) +++ trunk/getdata/ChangeLog 2013-04-10 02:21:09 UTC (rev 829) @@ -1,3 +1,6 @@ +2013-04-10 D. V. Wiebe <ge...@ke...> svn:829 + GetData-0.8.4rc1. + 2013-04-06 D. V. Wiebe <ge...@ke...> svn:827 * bindings/cxx/getdata/entry.h (Entry::CountMax) bindings/cxx/getdata/mplexentry.h (MplexEntry::CountMax Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-04-06 02:26:25 UTC (rev 828) +++ trunk/getdata/m4/version.m4 2013-04-10 02:21:09 UTC (rev 829) @@ -21,25 +21,25 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 4) -m4_define(getdata_extra, [a]) +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, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 2) +m4_define(getdata_impl_revision, 3) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) dnl libgetdata++ interface version info -m4_define(getdataxx_version, 4:0:1) +m4_define(getdataxx_version, 5:0:2) dnl libfgetdata interface version info -m4_define(fgetdata_version, 4:0:2) +m4_define(fgetdata_version, 4:1:2) dnl libf95getdata interface version info -m4_define(f95getdata_version, 4:0:2) +m4_define(f95getdata_version, 5:0:3) dnl libgetdata-matlab interface version info -m4_define(matlabgetdata_version, 0:0:0) +m4_define(matlabgetdata_version, 0:1:0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-04-11 00:05:32
|
Revision: 830 http://sourceforge.net/p/getdata/code/830 Author: ketiltrout Date: 2013-04-11 00:05:22 +0000 (Thu, 11 Apr 2013) Log Message: ----------- GetData-0.8.4rc2: build system fixes. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/idl/package/configure.ac trunk/getdata/bindings/matlab/package/configure.ac trunk/getdata/bindings/perl/Build.PL.in trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/ChangeLog 2013-04-11 00:05:22 UTC (rev 830) @@ -1,3 +1,11 @@ +2013-04-11 D. V. Wiebe <ge...@ke...> svn:830 + GetData-0.8.4rc2: + + * bindings/perl/Build.PL.in: make include_dirs an array. Reported by Seth. + + * bindings/idl/package/configure.ac bindings/matlab/package/configure.ac: + Require GetData >= 0.8.4. + 2013-04-10 D. V. Wiebe <ge...@ke...> svn:829 GetData-0.8.4rc1. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/NEWS 2013-04-11 00:05:22 UTC (rev 830) @@ -1,4 +1,4 @@ -New in version 0.8.4a: +New in version 0.8.4rc2: Dirfile Changes: Modified: trunk/getdata/bindings/idl/package/configure.ac =================================================================== --- trunk/getdata/bindings/idl/package/configure.ac 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/bindings/idl/package/configure.ac 2013-04-11 00:05:22 UTC (rev 830) @@ -126,7 +126,7 @@ echo echo "*** Looking for getdata" echo -PKG_CHECK_MODULES([GETDATA], [getdata >= 0.8.0]) +PKG_CHECK_MODULES([GETDATA], [getdata >= 0.8.4]) dnl headers echo Modified: trunk/getdata/bindings/matlab/package/configure.ac =================================================================== --- trunk/getdata/bindings/matlab/package/configure.ac 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/bindings/matlab/package/configure.ac 2013-04-11 00:05:22 UTC (rev 830) @@ -136,7 +136,7 @@ echo echo "*** Looking for getdata" echo -PKG_CHECK_MODULES([GETDATA], [getdata >= 0.8.0]) +PKG_CHECK_MODULES([GETDATA], [getdata >= 0.8.4]) dnl types echo Modified: trunk/getdata/bindings/perl/Build.PL.in =================================================================== --- trunk/getdata/bindings/perl/Build.PL.in 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/bindings/perl/Build.PL.in 2013-04-11 00:05:22 UTC (rev 830) @@ -42,7 +42,7 @@ dist_version_from => "GetData.pm", extra_compiler_flags => ['@DEFS@', '-I@top_builddir@/src'], extra_linker_flags => ['-L@top_builddir@/src/.libs/', '-lgetdata'], - include_dirs => '@top_srcdir@/src', + include_dirs => ['@top_srcdir@/src'], license => 'lgpl', module_name => "GetData", pm_files => { 'GetData.pm' => 'lib/GetData.pm' }, Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-04-10 02:21:09 UTC (rev 829) +++ trunk/getdata/m4/version.m4 2013-04-11 00:05:22 UTC (rev 830) @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 4) -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...> - 2013-05-15 00:53:38
|
Revision: 832 http://sourceforge.net/p/getdata/code/832 Author: ketiltrout Date: 2013-05-15 00:53:35 +0000 (Wed, 15 May 2013) Log Message: ----------- GetData-0.8.4. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/README trunk/getdata/RELEASE_NOTES.in trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-05-15 00:52:52 UTC (rev 831) +++ trunk/getdata/ChangeLog 2013-05-15 00:53:35 UTC (rev 832) @@ -1,3 +1,6 @@ +2013-05-14 D. V. Wiebe <ge...@ke...> svn:832 + GetData-0.8.4 released. + 2013-04-11 D. V. Wiebe <ge...@ke...> svn:830 GetData-0.8.4rc2: Modified: trunk/getdata/README =================================================================== --- trunk/getdata/README 2013-05-15 00:52:52 UTC (rev 831) +++ trunk/getdata/README 2013-05-15 00:53:35 UTC (rev 832) @@ -55,9 +55,10 @@ - C++ (libgetdata++) - Fortran 77 (libfgetdata) - Fortran 95 (libf95getdata) - - Python (pygetdata) - the Interactive Data Language (IDL; idl_getdata) + - MATLAB (libgetdata-matlab and associated MEX files) - Perl (GetData.pm) + - Python (pygetdata) Documentation for the various bindings, if present, can be found in files named `README.<language>' in the doc/ directory. The C interface is described @@ -138,7 +139,22 @@ the associated encoding scheme and fail gracefully if encountering dirfiles so encoded. +Building bindings requires appropriate compilers/interpreters and libraries for +the various languages. In particular: +- the C++ bindings require a C++90 compliant compiler +- the Fortran-77 bindings require a Fortran-77 compliant compiler +- the Fortran-95 bindings require both a Fortran-95 compliant compiler and a + Fortran-77 compiler (because the Fortran-95 bindings are built on top of + the Fortran-77 bindings) +- the IDL bindings require a licenced IDL interpreter, version 5.5 or later; + they will not work on an unlicenced interpreter in timed demo mode +- the MATLAB bindings require both a MATLAB interpreter and a MEX compiler +- the Perl bindings require a Perl5 interpreter version 5.6 or later, as well + as the Math::Complex and Module::Build modules. +- the Python bindings require Python 2.3 or later. NumPy is also highly + recommended for efficient use. + USING THE LIBRARY ================= Modified: trunk/getdata/RELEASE_NOTES.in =================================================================== --- trunk/getdata/RELEASE_NOTES.in 2013-05-15 00:52:52 UTC (rev 831) +++ trunk/getdata/RELEASE_NOTES.in 2013-05-15 00:53:35 UTC (rev 832) @@ -1,4 +1,4 @@ -GetData 0.8.3 is known to compile and pass the test suite on the following +GetData 0.8.4 is known to compile and pass the test suite on the following systems (including C++ and Fortran bindings): Linux: @@ -21,11 +21,11 @@ --------------------------------------------------------------------------- Four packages are available: -* getdata-0.8.3.tar.bz2/.gz: the full source code to the library, with +* getdata-0.8.4.tar.bz2/.gz: the full source code to the library, with bindings. This package uses the GNU autotools build system, and is designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys, &c.) -* getdata_win-0.8.3.zip: a reduced source code package, with the CMake +* getdata_win-0.8.4.zip: a reduced source code package, with the CMake build system designed to be built on Microsoft Windows, either using the free MinGW compiler, or else Microsoft's Visual C++ compiler. (The full source package above can also be built using MinGW, if the @@ -34,12 +34,12 @@ package lacks support for compressed dirfiles, the Legacy API, and a few other features. This build is used in native Microsoft Windows builds of kst2. -* idl_getdata-0.8.3.tar.bz2/.gz: the Interactive Data Language (IDL) +* idl_getdata-0.8.4.tar.bz2/.gz: the Interactive Data Language (IDL) bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, pre-built packages rarely come with these bindings, and this package allows end-users to add support for IDL -* matlab_getdata-0.8.3.tar.bz2/.gz: the MATLAB bindings, packaged separately +* matlab_getdata-0.8.4.tar.bz2/.gz: the MATLAB bindings, packaged separately with an autotools build system, designed to be built against an already installed version of GetData. Due to licensing restrictions, pre-built packages rarely come with these bindings, and this package allows end-users Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-05-15 00:52:52 UTC (rev 831) +++ trunk/getdata/m4/version.m4 2013-05-15 00:53:35 UTC (rev 832) @@ -21,7 +21,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 4) -m4_define(getdata_extra, [rc2]) +m4_define(getdata_extra, []) 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...> - 2013-07-18 00:04:44
|
Revision: 835 http://sourceforge.net/p/getdata/code/835 Author: ketiltrout Date: 2013-07-18 00:04:36 +0000 (Thu, 18 Jul 2013) Log Message: ----------- Remove debug printf from python; fix make clean in doc/; allow make clean bindings/perl Modified Paths: -------------- trunk/getdata/bindings/perl/Makefile.am trunk/getdata/bindings/python/pydirfile.c trunk/getdata/doc/Makefile.am Modified: trunk/getdata/bindings/perl/Makefile.am =================================================================== --- trunk/getdata/bindings/perl/Makefile.am 2013-06-21 17:19:05 UTC (rev 834) +++ trunk/getdata/bindings/perl/Makefile.am 2013-07-18 00:04:36 UTC (rev 835) @@ -84,7 +84,7 @@ clean-local: rm -rf lib blib if test -e Build; then \ - $(PERL) Build clean; \ + $(PERL) Build clean || true; \ fi rm -f $(BUILT_SOURCES) make_parameters.sed MYMETA.yml MYMETA.json GetData.pm rm -rf Build _build MANIFEST build.stamp t/*~ Modified: trunk/getdata/bindings/python/pydirfile.c =================================================================== --- trunk/getdata/bindings/python/pydirfile.c 2013-06-21 17:19:05 UTC (rev 834) +++ trunk/getdata/bindings/python/pydirfile.c 2013-07-18 00:04:36 UTC (rev 835) @@ -688,7 +688,6 @@ ns = gd_getdata(self->D, field_code, first_frame, first_sample, 0, (size_t)num_samples, return_type, data); - fprintf(stderr, "%zu/%zu\n", ns, (size_t)num_samples); #ifdef USE_NUMPY if (!as_list) { Modified: trunk/getdata/doc/Makefile.am =================================================================== --- trunk/getdata/doc/Makefile.am 2013-06-21 17:19:05 UTC (rev 834) +++ trunk/getdata/doc/Makefile.am 2013-07-18 00:04:36 UTC (rev 835) @@ -53,4 +53,4 @@ unclean_database_recovery.txt clean-local: - rm -rf *~ README.perl + rm -rf *~ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-09-05 22:19:33
|
Revision: 845 http://sourceforge.net/p/getdata/code/845 Author: ketiltrout Date: 2013-09-05 22:19:29 +0000 (Thu, 05 Sep 2013) Log Message: ----------- GetData-0.8.5. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 trunk/getdata/src/zzslim.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-07-29 16:10:17 UTC (rev 844) +++ trunk/getdata/ChangeLog 2013-09-05 22:19:29 UTC (rev 845) @@ -1,3 +1,16 @@ +2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 + GetData-0.8.5 released. + + * src/zzslim.c: + +2013-07-17 D. V. Wiebe <ge...@ke...> svn:835 + + * bindings/python/pydirfile.c: Remove spurious debug printf. + + * bindings/doc/Makefile.am: Fix make clean + + * bindings/bindings/perl/Makefile.am: Fix make clean + 2013-05-14 D. V. Wiebe <ge...@ke...> svn:832 GetData-0.8.4 released. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-07-29 16:10:17 UTC (rev 844) +++ trunk/getdata/NEWS 2013-09-05 22:19:29 UTC (rev 845) @@ -1,5 +1,20 @@ -New in version 0.8.4rc2: +New in verison 0.8.5: + Library Changes: + + * The zzslim encoding framework, which was inadvertantly rendered + non-compilable in 0.8.4, should once again work. Reported by Matthew + Hasselfield. + + Bindings Changes: + + * PYTHON BUG FIX: A spurious debugging message accidentally left in the + 0.8.4 release has been expunged. + +|==============================================================================| + +New in version 0.8.4: + Dirfile Changes: * CLARIFICATION: Inconsistant behaviour in the library, coupled with Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2013-07-29 16:10:17 UTC (rev 844) +++ trunk/getdata/m4/version.m4 2013-09-05 22:19:29 UTC (rev 845) @@ -20,7 +20,7 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) -m4_define(getdata_revision, 4) +m4_define(getdata_revision, 5) m4_define(getdata_extra, []) m4_define(getdata_version, getdata_major.getdata_minor.getdata_revision[]getdata_extra) @@ -28,7 +28,7 @@ dnl libgetdata current interface version m4_define(getdata_iface_version, 6) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 3) +m4_define(getdata_impl_revision, 4) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 1) Modified: trunk/getdata/src/zzslim.c =================================================================== --- trunk/getdata/src/zzslim.c 2013-07-29 16:10:17 UTC (rev 844) +++ trunk/getdata/src/zzslim.c 2013-09-05 22:19:29 UTC (rev 845) @@ -37,8 +37,8 @@ * open, idata = 0 otherwise idata = -1. */ int _GD_ZzslimName(DIRFILE *restrict D, const char *restrict enc_data, - struct _gd_raw_file *restrict file, const char *restrict base, - int temp __gd_unused, int resolv) + struct gd_raw_file_ *restrict file, const char *restrict base, + int temp gd_unused_, int resolv) { size_t enc_len; @@ -74,8 +74,8 @@ return 0; } -int _GD_ZzslimOpen(int dirfd, struct _gd_raw_file* file, int swap __gd_unused, - unsigned int mode __gd_unused) +int _GD_ZzslimOpen(int dirfd, struct gd_raw_file_* file, int swap gd_unused_, + unsigned int mode gd_unused_) { char *filepath; @@ -102,8 +102,8 @@ return 0; } -off64_t _GD_ZzslimSeek(struct _gd_raw_file* file, off64_t count, - gd_type_t data_type, unsigned int mode __gd_unused) +off64_t _GD_ZzslimSeek(struct gd_raw_file_* file, off64_t count, + gd_type_t data_type, unsigned int mode gd_unused_) { off64_t n; @@ -121,7 +121,7 @@ return n; } -ssize_t _GD_ZzslimRead(struct _gd_raw_file *restrict file, void *restrict ptr, +ssize_t _GD_ZzslimRead(struct gd_raw_file_ *restrict file, void *restrict ptr, gd_type_t data_type, size_t nmemb) { ssize_t n; @@ -134,7 +134,7 @@ return n; } -int _GD_ZzslimClose(struct _gd_raw_file *file) +int _GD_ZzslimClose(struct gd_raw_file_ *file) { int ret; @@ -151,8 +151,8 @@ return ret; } -off64_t _GD_ZzslimSize(int dirfd, struct _gd_raw_file *file, - gd_type_t data_type, int swap __gd_unused) +off64_t _GD_ZzslimSize(int dirfd, struct gd_raw_file_ *file, + gd_type_t data_type, int swap gd_unused_) { char *filepath; off64_t size; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-10-18 02:00:06
|
Revision: 848 http://sourceforge.net/p/getdata/code/848 Author: ketiltrout Date: 2013-10-18 02:00:00 +0000 (Fri, 18 Oct 2013) Log Message: ----------- PHP bindings; better handling of entry objects in Perl, IDL, Fortran; bug fixes. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/Makefile.am trunk/getdata/bindings/cxx/Makefile.am trunk/getdata/bindings/cxx/test/Makefile.am trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/Makefile.am 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/Makefile.am trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/Makefile.am trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/idl/package/README trunk/getdata/bindings/idl/package/configure.ac trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/matlab/test/big_test.m trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/t/big_test.t trunk/getdata/bindings/perl/typemap trunk/getdata/bindings/python/Makefile.am trunk/getdata/bindings/python/test/big_test.py trunk/getdata/configure.ac trunk/getdata/doc/list.tests trunk/getdata/m4/compiler.m4 trunk/getdata/m4/version.m4 trunk/getdata/man/gd_add_bit.3 trunk/getdata/man/gd_alter_bit.3 trunk/getdata/man/gd_alter_entry.3 trunk/getdata/man/gd_dirfile_standards.3 trunk/getdata/man/gd_entry.3 trunk/getdata/man/gd_get_carray_slice.3 trunk/getdata/man/gd_madd_bit.3 trunk/getdata/man/gd_naliases.3 trunk/getdata/man/gd_uninclude.3 trunk/getdata/src/Makefile.am trunk/getdata/src/add.c trunk/getdata/src/common.c trunk/getdata/src/entry.c trunk/getdata/src/errors.c trunk/getdata/src/field_list.c trunk/getdata/src/getdata.c trunk/getdata/src/internal.h trunk/getdata/src/mod.c trunk/getdata/test/Makefile.am trunk/getdata/util/Makefile.am Added Paths: ----------- trunk/getdata/bindings/php/ trunk/getdata/bindings/php/Makefile.am trunk/getdata/bindings/php/getdata/ trunk/getdata/bindings/php/getdata/config.m4.in trunk/getdata/bindings/php/getdata/getdata.c trunk/getdata/bindings/php/getdata/php_getdata.h trunk/getdata/bindings/php/test/ trunk/getdata/bindings/php/test/Makefile.am trunk/getdata/bindings/php/test/big_test.php trunk/getdata/bindings/php/test/callback.php trunk/getdata/m4/php.m4 trunk/getdata/test/add_bit_scalars.c trunk/getdata/test/add_mplex_scalars.c trunk/getdata/test/add_polynom_scalar.c trunk/getdata/test/add_raw_spf_scalar.c trunk/getdata/test/get_carray_c2r.c Removed Paths: ------------- trunk/getdata/test/add_mplex_val.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/ChangeLog 2013-10-18 02:00:00 UTC (rev 848) @@ -1,7 +1,63 @@ +2013-10-18 D. V. Wiebe <ge...@ke...> svn:848 + + * bindings/f77/fgetdata.c (GDASRW GDASLC GDASCL GDASPN GDASCP GDASPH GDASRC + GDASCR GDASWD GDASMX GDLSPH GDLSPN GDLSCP GDLSWD _GDF_AddBitSBit GDASBT + GDASSB _GDF_AlterBitSBit GDLSBT GDLSSB GDLSLC GDLSCL GDLSRC GDLSCR GDLSRW): + Added. + * bindings/f77/getdata.f90.in (fgd_add): Call GDAS.. instead of GDAD.. where + possible. + * bindings/f77/getdata.f90.in (fgd_alter_entry): Call GDLS.. instead of + GDAL.. where possible. + * bindings/f77/getdata.f90.in (fgd__set_field_len fgd__set_scalar_len): + Added. + + * bindings/cxx/test/big_test.cpp bindings/f77/test/big_test.f + bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro + bindings/matlab/test/big_test.m bindings/perl/t/big_test.t + bindings/python/test/big_test.py: Reorganize, renumber tests. Add tests + 243-269 where appropriate. + + * bindings/idl/getdata.c (gdidl_convert_entry_num gdidl_get_entry_num + gdidl_get_entry_scalars gdidl_get_in_fields gdidl_get_entry_cmparr): Added. + * bindings/idl/getdata.c (gdidl_read_idl_entry): Be less pedantic about + numerical types. + * bindings/idl/getdata.c (gdidl_make_idl_entry: Initialise both complex and + real floating point parameters. + + * bindings/perl/GetData.xs (gdp_fetch_cmp_list gdp_fetch_in_fields + gdp_fetch_scalars gdp_to_entry): Be less pedantic about numerical types and + array sizes. + * bindings/perl/typemap (T_PENTRY): Added. + + * bindings/php m4/php.m4: Added. + * bindings/make_parameters.c (PHP): Added. + + * src/mod.c (_GD_Change): Fix MPLEX scalar modifying. + + * src/add.c (_GD_CopyScalars): Added. + * src/add.c (_GD_Change): Fix scalar copying for GD_POLYNOM_ENTRY. Don't + throw errors for passed members which will be ignored due to scalars (spf, + numbits, bitnum). + * test/add_bit_scalars.c test/add_mplex_scalars.c test/add_raw_spf_scalar.c + * test/add_polynom_scalar.c: Added. + + * src/add.c (_GD_Change): Don't throw an error on mplex.count_val < 0. + * src/errors.c src/internal.h: Remove unused GD_E_ENTRY_CNTVAL. + * test/add_mplex_val.c: Deleted. + + * src/getdata.c (_GD_DoConst): Return len instead of 1. + * src/field_list.c (gd_carrays gd_mcarrays): Update _GD_DoField calls to + deal with the above. + * test/get_carray_c2r.c: Added. + + * src/entry.c (_GD_FreeE): When priv == 0, zero free'd pointers. + + * bindings/perl/t/big_test.t: Added test 181. + 2013-09-05 D. V. Wiebe <ge...@ke...> svn:845 GetData-0.8.5 released. - * src/zzslim.c: + * src/zzslim.c: Fix for rename of gd_raw_file_. 2013-07-17 D. V. Wiebe <ge...@ke...> svn:835 Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/NEWS 2013-10-18 02:00:00 UTC (rev 848) @@ -1,3 +1,65 @@ +New in verison 0.9.0a: + + Library Changes: + + * The gd_free_entry_strings() function now NULLs pointers after freeing them. + + * The gd_[m]add() functions now ignore zero-length scalar strings. Previously + they would store these invalid field codes, causing problems later. + + * BUG FIX: Returning complex-valued CARRAYs as purely real now works. + Previously only the first element requested would be returned, the remaining + output buffer containing uninitialised data. + + * BUG FIX: A scalar field code specified for the last factor in a POLYNOM + entry is no longer ignored by gd_[m]add(). + + * BUG FIX: Entry members spf, bitnum, numbits, and period are now completely + ignored by gd_[m]add() when corresponding named scalars are specified. + Previously, an invalid value in these members would result in the entry + being rejected, even though the rest of GetData ignored the invalid, unsued + value. + + * BUG FIX: gd_[m]add() no longer rejects MPLEX fields with negative count_val. + + * BUG FIX: gd_alter_entry() no longer corrupts the DIRFILE when modifying + named scalars of MPLEX fields. + + Bindings Changes: + + * PHP bindings have been added. + + * F77: Functions to add fields with named scalar parameters have been added + (GDASBT GDASCL GDASCP GDASCR GDASLC GDASMX GDASPH GDASPN GDASRC GDASRW + GDASSB GDASWD), but only for those field types which permit named scalars. + Similarly, functions for altering field metatdata with named scalars are + also present (GDLSBT GDLSCL GDLSCP GDLSCR GDLSLC GDLSMX GDLSPH GDLSPN GDLSRC + GDLSRW GDLSSB GDLSWD). These are provided as an alternative to using GDASCA + after the fact. + + * IDL: The entry structure parser has been rewritten. It no longer requires + members which it doesn't need, and is also a lot more lax about numerical + data types. Notably, it now ignores a supplied COMP_SCAL member. Floating + point parameters can be specified in either the base name (M, B, A, + DIVIDEND) or else the member prefixed with 'C' (CM, CB, CA, CDIVIDEND), + whatever numerical type. The bindings will ingest them appropriately. + Also, N_FIELDS and POLY_ORD, may be omitted, and will be calculated from the + supplied data. A scalar IN_FIELDS is treated like an single element array. + + * PERL: The entry hash parser has been rewritten. It no longer requires keys + which it doesn't need. + + * PERL: alter_entry() now only updates defined elements in the passed entry + hash. + + * F77 and F95 BUG FIX: Named scalar indices are now indexed from one instead + of zero, like all other array indices are in the Fortran GetData bindings. + + * F95 BUG FIX: fgd_add and fgd_alter_entry no longer ignore named scalar + parameters provided in supplied entry structures. + +|==============================================================================| + New in verison 0.8.5: Library Changes: @@ -2,3 +64,3 @@ - * The zzslim encoding framework, which was inadvertantly rendered + * BUG FIX: The zzslim encoding framework, which was inadvertantly rendered non-compilable in 0.8.4, should once again work. Reported by Matthew @@ -51,8 +113,8 @@ Library Changes: - * The count_max member of the gd_entry_t object has been renamed period. The - corresponding dummy argument in various function prototypes has been + * The count_max member of the gd_entry_t object has been renamed to period. + The corresponding dummy argument in various function prototypes has been similarly renamed. * BUG FIX: The library no longer incorrectly rejects negative count_val MPLEX @@ -111,7 +173,7 @@ * BUG FIX: Adding an entry via gd_[m]add() with a negative CARRAY scalar index no longer results in an internal error or worse when the added field is - later read. + later read. Instead, a proper error is returned. * BUG FIX: Changing a CONST field to a real floating point type using gd_alter_const() (or similar) no longer results in the value of the field @@ -660,7 +722,7 @@ * GetData, including its bindings, is now supported under MacOS X, Cygwin, and Win32 using MinGW. In the case of MinGW, this includes linking against the - Microsoft C Runtime, which isn't POSIX compliant. Users should excercise + Microsoft C Runtime, which isn't POSIX compliant. Users should exercise caution when writing to dirfiles in this case. * GetData can now be used on ARM processors. As a side-effect, GetData can @@ -677,7 +739,7 @@ * As a result of the previous change, the Standards compliance of the parser in strict mode has been greatly increased. This affects allowed characters - in field names, and field name lengths. The existance or lack thereof of + in field names, and field name lengths. The existence or lack thereof of the implicit FILEFRAM field (an alias for INDEX) is also affected. * Since Standards Versions 4 and earlier were never codified, we've made some @@ -804,7 +866,7 @@ ARMs, GD_NOT_ARM_ENDIAN equals zero and may be omitted. * Where gd_flush() and gd_metaflush() in the past raised GD_E_OPEN_INCLUDE - on I/O error, they now raise the new GD_FLUSH. + on I/O error, they now raise the new GD_E_FLUSH. * All functions now raise GD_E_DIMENSION when encountering a scalar field when expecting a vector. In the past, the error value returned was Modified: trunk/getdata/bindings/Makefile.am =================================================================== --- trunk/getdata/bindings/Makefile.am 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/Makefile.am 2013-10-18 02:00:00 UTC (rev 848) @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2010 D. V. Wiebe +# Copyright (C) 2008-2010, 2013 D. V. Wiebe # ########################################################################## # @@ -46,13 +46,17 @@ PERL_SUBDIR=perl endif +if MAKE_PHPBINDINGS +PHP_SUBDIR=php +endif + noinst_PROGRAMS=make_parameters make_parameters_SOURCES = make_parameters.c nodist_make_parameters_SOURCES = ../src/getdata.h ../src/gd_config.h SUBDIRS = . ${F77_SUBDIR} ${CXX_SUBDIR} ${IDL_SUBDIR} ${MATLAB_SUBDIR} \ - ${PY_SUBDIR} ${PERL_SUBDIR} + ${PY_SUBDIR} ${PERL_SUBDIR} ${PHP_SUBDIR} make_parameters$(EXEEXT): $(make_parameters_SOURCES) \ $(nodist_make_parameters_SOURCES) Modified: trunk/getdata/bindings/cxx/Makefile.am =================================================================== --- trunk/getdata/bindings/cxx/Makefile.am 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/cxx/Makefile.am 2013-10-18 02:00:00 UTC (rev 848) @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2012 D. V. Wiebe +# Copyright (C) 2008-2013 D. V. Wiebe # ########################################################################## # @@ -21,15 +21,7 @@ AUTOMAKE_OPTIONS = foreign getdata_includedir = ${includedir}/getdata -if CXX_WALL -WALL=-Wall -endif - -if CXX_WEXTRA -WEXTRA=-Wextra -endif - -INCLUDES = ${WALL} $(WEXTRA) -I$(top_srcdir)/src +INCLUDES = ${GD_CXX_WALL} $(GD_CXX_WEXTRA) -I$(top_srcdir)/src LIBS= SUBDIRS=test Modified: trunk/getdata/bindings/cxx/test/Makefile.am =================================================================== --- trunk/getdata/bindings/cxx/test/Makefile.am 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/cxx/test/Makefile.am 2013-10-18 02:00:00 UTC (rev 848) @@ -20,15 +20,7 @@ # AUTOMAKE_OPTIONS = foreign -if CXX_WALL -WALL=-Wall -endif - -if CXX_WEXTRA -WEXTRA=-Wextra -endif - -INCLUDES = ${WALL} $(WEXTRA) -I$(srcdir)/.. -I$(top_srcdir)/src +INCLUDES = ${GD_CXX_WALL} $(GD_CXX_WEXTRA) -I$(srcdir)/.. -I$(top_srcdir)/src LDADD=../libgetdata++.la TESTS=big_test Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2013-10-18 02:00:00 UTC (rev 848) @@ -1,4 +1,4 @@ -// Copyright (C) 2009-2012 D. V. Wiebe +// Copyright (C) 2009-2013 D. V. Wiebe // /////////////////////////////////////////////////////////////////////////// // @@ -145,7 +145,7 @@ "/META data mstr STRING \"This is a string constant.\"\n" "/META data mconst CONST COMPLEX128 3.3;4.4\n" "/META data mcarray CARRAY FLOAT64 1.9 2.8 3.7 4.6 5.5\n" - "/META data mlut LINTERP DATA ./lut\n" + "/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 ./lut\n" @@ -228,90 +228,90 @@ write(n, data_data, 80); close(n); - // 0: Dirfile::Error check + // 1: Dirfile::Error check d = new Dirfile("x"); - CHECK_ERROR(0, GD_E_OPEN); + CHECK_ERROR(1, GD_E_OPEN); delete d; - // 1: Dirfile::Dirfile check + // 2: Dirfile::Dirfile check d = new Dirfile(filedir, GD_RDWR); - CHECK_OK(1); + CHECK_OK(2); - // 2: Dirfile::GetData check + // 3: Dirfile::GetData check n = d->GetData("data", 5, 0, 1, 0, UInt8, c); - CHECK_OK(2); - CHECK_INT(2,n,8); - CHECK_INT_ARRAY(2,8,c[i],41 + i); + CHECK_OK(3); + CHECK_INT(3,n,8); + CHECK_INT_ARRAY(3,8,c[i],41 + i); - // 3: Dirfile::GetConstant check + // 12: Dirfile::GetConstant check n = d->GetConstant("const", Float64, &dp); - CHECK_OK(3); - CHECK_INT(3,n,0); - CHECK_DOUBLE(3,dp,5.5); + CHECK_OK(12); + CHECK_INT(12,n,0); + CHECK_DOUBLE(12,dp,5.5); - // 6: Dirfile::NFields check + // 23: Dirfile::NFields check n = d->NFields(); - CHECK_OK(6); - CHECK_INT(6,n,nfields); + CHECK_OK(23); + CHECK_INT(23,n,nfields); - // 8: Dirfile::FieldList check + // 25: Dirfile::FieldList check list = d->FieldList(); - CHECK_OK(8); - CHECK_STRING_ARRAY(8,n,list[i],fields[i]); + CHECK_OK(25); + CHECK_STRING_ARRAY(25,n,list[i],fields[i]); - // 9: Dirfile::NFields check + // 26: Dirfile::NFields check n = d->NMFields("data"); - CHECK_OK(9); - CHECK_INT(9,n,4); + CHECK_OK(26); + CHECK_INT(26,n,4); - // 10: Dirfile::MFieldList check + // 27: Dirfile::MFieldList check fields[0] = (char*)"mstr"; fields[1] = (char*)"mconst"; fields[2] = (char*)"mcarray"; fields[3] = (char*)"mlut"; list = d->MFieldList("data"); - CHECK_OK(10); - CHECK_STRING_ARRAY(10,n,list[i],fields[i]); + CHECK_OK(27); + CHECK_STRING_ARRAY(27,n,list[i],fields[i]); - // 11: Dirfile::NFrames check + // 28: Dirfile::NFrames check n = d->NFrames(); - CHECK_OK(11); - CHECK_INT(11,n,10); + CHECK_OK(28); + CHECK_INT(28,n,10); - // 12: Dirfile::SamplesPerFrame check + // 29: Dirfile::SamplesPerFrame check n = d->SamplesPerFrame("data"); - CHECK_OK(12); - CHECK_INT(12,n,8); + CHECK_OK(29); + CHECK_INT(29,n,8); - // 13: Dirfile::PutData check + // 30: Dirfile::PutData check c[0] = 13; c[1] = 14; c[2] = 15; c[3] = 16; n = d->PutData("data", 5, 1, 0, 4, UInt8, c); - CHECK_OK2(13,1); - CHECK_INT2(13,1,n,4); + CHECK_OK2(30,1); + CHECK_INT2(30,1,n,4); n = d->GetData("data", 5, 0, 1, 0, UInt8, c); - CHECK_OK2(13,2); - CHECK_INT2(13,2,n,8); - CHECK_INT_ARRAY(13,8,c[i],(i == 0 || i > 4) ? 41 + i : 12 + i); + CHECK_OK2(30,2); + CHECK_INT2(30,2,n,8); + CHECK_INT_ARRAY(30,8,c[i],(i == 0 || i > 4) ? 41 + i : 12 + i); - // 14: Dirfile::ErrorString check + // 38: Dirfile::ErrorString check d->GetData("x", 5, 0, 1, 0, Null, NULL); str = d->ErrorString(); - CHECK_STRING(14,str,"Field not found: x"); + CHECK_STRING(38,str,"Field not found: x"); - // 16: Dirfile::Entry / RawEntry check + // 40: Dirfile::Entry / RawEntry check ent = d->Entry("data"); - CHECK_OK(16); - CHECK_INT2(16,1,ent->Type(),RawEntryType); - CHECK_INT2(16,2,ent->FragmentIndex(),0); - CHECK_INT2(16,3,ent->SamplesPerFrame(),8); - CHECK_INT2(16,4,ent->RawType(),Int8); + CHECK_OK(40); + CHECK_INT2(40,1,ent->Type(),RawEntryType); + CHECK_INT2(40,2,ent->FragmentIndex(),0); + CHECK_INT2(40,3,ent->SamplesPerFrame(),8); + CHECK_INT2(40,4,ent->RawType(),Int8); delete ent; - // 18: Dirfile::Entry / LincomEntry check + // 42: Dirfile::Entry / LincomEntry check cq[0] = 1.1; cq[1] = 2.2; cq[2] = 2.2; @@ -319,113 +319,113 @@ cq[4] = 5.5; cq[5] = 5.5; ent = d->Entry("lincom"); - CHECK_OK(18); - CHECK_INT2(18,1,ent->Type(),LincomEntryType); - CHECK_INT2(18,2,ent->NFields(),3); - CHECK_INT2(18,3,ent->FragmentIndex(),0); - CHECK_STRING2(18,4,ent->Input(0),"data"); - CHECK_STRING2(18,5,ent->Input(1),"INDEX"); - CHECK_STRING2(18,6,ent->Input(2),"linterp"); - CHECK_INT2(18,7,ent->ComplexScalars(),1); - CHECK_COMPLEX_ARRAY(18,3,ent->CScale(i),cq[i * 2]); - CHECK_COMPLEX_ARRAY(18,3,ent->COffset(i),cq[i * 2 + 1]); + CHECK_OK(42); + CHECK_INT2(42,1,ent->Type(),LincomEntryType); + CHECK_INT2(42,2,ent->NFields(),3); + CHECK_INT2(42,3,ent->FragmentIndex(),0); + CHECK_STRING2(42,4,ent->Input(0),"data"); + CHECK_STRING2(42,5,ent->Input(1),"INDEX"); + CHECK_STRING2(42,6,ent->Input(2),"linterp"); + CHECK_INT2(42,7,ent->ComplexScalars(),1); + CHECK_COMPLEX_ARRAY(42,3,ent->CScale(i),cq[i * 2]); + CHECK_COMPLEX_ARRAY(42,3,ent->COffset(i),cq[i * 2 + 1]); delete ent; - // 20: Dirfile::Entry / PolynomEntry check + // 44: Dirfile::Entry / PolynomEntry check ent = d->Entry("polynom"); - CHECK_OK(20); - CHECK_INT2(20,1,ent->Type(),PolynomEntryType); - CHECK_INT2(20,2,ent->PolyOrd(),5); - CHECK_INT2(20,3,ent->FragmentIndex(),0); - CHECK_STRING2(20,4,ent->Input(),"data"); - CHECK_INT2(20,7,ent->ComplexScalars(),1); - CHECK_COMPLEX_ARRAY(20,6,ent->CCoefficient(i),cq[i]); + CHECK_OK(44); + CHECK_INT2(44,1,ent->Type(),PolynomEntryType); + CHECK_INT2(44,2,ent->PolyOrd(),5); + CHECK_INT2(44,3,ent->FragmentIndex(),0); + CHECK_STRING2(44,4,ent->Input(),"data"); + CHECK_INT2(44,7,ent->ComplexScalars(),1); + CHECK_COMPLEX_ARRAY(44,6,ent->CCoefficient(i),cq[i]); delete ent; - // 21: Dirfile::Entry / LinterpEntry check + // 45: Dirfile::Entry / LinterpEntry check ent = d->Entry("linterp"); - CHECK_OK(21); - 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(),"./lut"); + CHECK_OK(45); + CHECK_INT2(45,1,ent->Type(),LinterpEntryType); + CHECK_INT2(45,2,ent->FragmentIndex(),0); + CHECK_STRING2(45,3,ent->Input(),"data"); + CHECK_STRING2(45,4,ent->Table(),"./lut"); delete ent; - // 22: Dirfile::Entry / BitEntry check + // 46: Dirfile::Entry / BitEntry check ent = d->Entry("bit"); - CHECK_OK(22); - CHECK_INT2(22,1,ent->Type(),BitEntryType); - CHECK_INT2(22,2,ent->FragmentIndex(),0); - CHECK_STRING2(22,3,ent->Input(),"data"); - CHECK_INT2(22,4,ent->NumBits(),4); - CHECK_INT2(22,5,ent->FirstBit(),3); + CHECK_OK(46); + CHECK_INT2(46,1,ent->Type(),BitEntryType); + CHECK_INT2(46,2,ent->FragmentIndex(),0); + CHECK_STRING2(46,3,ent->Input(),"data"); + CHECK_INT2(46,4,ent->NumBits(),4); + CHECK_INT2(46,5,ent->FirstBit(),3); delete ent; - // 23: Dirfile::Entry / SBitEntry check + // 47: Dirfile::Entry / SBitEntry check ent = d->Entry("sbit"); - CHECK_OK(23); - CHECK_INT2(23,1,ent->Type(),SBitEntryType); - CHECK_INT2(23,2,ent->FragmentIndex(),0); - CHECK_STRING2(23,3,ent->Input(),"data"); - CHECK_INT2(23,4,ent->NumBits(),6); - CHECK_INT2(23,5,ent->FirstBit(),5); + CHECK_OK(47); + CHECK_INT2(47,1,ent->Type(),SBitEntryType); + CHECK_INT2(47,2,ent->FragmentIndex(),0); + CHECK_STRING2(47,3,ent->Input(),"data"); + CHECK_INT2(47,4,ent->NumBits(),6); + CHECK_INT2(47,5,ent->FirstBit(),5); delete ent; - // 24: Dirfile::Entry / MultiplyEntry check + // 48: Dirfile::Entry / MultiplyEntry check ent = d->Entry("mult"); - CHECK_OK(24); - CHECK_INT2(24,1,ent->Type(),MultiplyEntryType); - CHECK_INT2(24,2,ent->FragmentIndex(),0); - CHECK_STRING2(24,3,ent->Input(0),"data"); - CHECK_STRING2(24,4,ent->Input(1),"sbit"); + CHECK_OK(48); + CHECK_INT2(48,1,ent->Type(),MultiplyEntryType); + CHECK_INT2(48,2,ent->FragmentIndex(),0); + CHECK_STRING2(48,3,ent->Input(0),"data"); + CHECK_STRING2(48,4,ent->Input(1),"sbit"); delete ent; - // 25: Dirfile::Entry / PhaseEntry check + // 49: Dirfile::Entry / PhaseEntry check ent = d->Entry("phase"); - CHECK_OK(25); - CHECK_INT2(25,1,ent->Type(),PhaseEntryType); - CHECK_INT2(25,2,ent->FragmentIndex(),0); - CHECK_STRING2(25,3,ent->Input(),"data"); - CHECK_INT2(25,4,ent->Shift(),11); + CHECK_OK(49); + CHECK_INT2(49,1,ent->Type(),PhaseEntryType); + CHECK_INT2(49,2,ent->FragmentIndex(),0); + CHECK_STRING2(49,3,ent->Input(),"data"); + CHECK_INT2(49,4,ent->Shift(),11); delete ent; - // 26: Dirfile::Entry / ConstEntry check + // 50: Dirfile::Entry / ConstEntry check ent = d->Entry("const"); - CHECK_OK(26); - CHECK_INT2(26,1,ent->Type(),ConstEntryType); - CHECK_INT2(26,2,ent->FragmentIndex(),0); - CHECK_INT2(26,3,ent->ConstType(),Float64); + CHECK_OK(50); + CHECK_INT2(50,1,ent->Type(),ConstEntryType); + CHECK_INT2(50,2,ent->FragmentIndex(),0); + CHECK_INT2(50,3,ent->ConstType(),Float64); delete ent; - // 134: Dirfile::Entry / StringEntry check + // 51: Dirfile::Entry / StringEntry check ent = d->Entry("string"); - CHECK_OK(134); - CHECK_INT2(134,1,ent->Type(),StringEntryType); - CHECK_INT2(134,2,ent->FragmentIndex(),0); + CHECK_OK(51); + CHECK_INT2(51,1,ent->Type(),StringEntryType); + CHECK_INT2(51,2,ent->FragmentIndex(),0); delete ent; - // 27: Dirfile::FragmentIndex check + // 52: Dirfile::FragmentIndex check n = d->FragmentIndex("data"); - CHECK_OK(27); - CHECK_INT(27,n,0); + CHECK_OK(52); + CHECK_INT(52,n,0); - // 28: Dirfile::Add / RawEntry check + // 53: Dirfile::Add / RawEntry check rent.SetName("new1"); rent.SetFragmentIndex(0); rent.SetSamplesPerFrame(3); rent.SetType(Float64); d->Add(rent); - CHECK_OK2(28,1); + CHECK_OK2(53,1); ent = d->Entry("new1"); - CHECK_OK2(28,2); - CHECK_INT2(28,1,ent->Type(),RawEntryType); - CHECK_INT2(28,2,ent->FragmentIndex(),0); - CHECK_INT2(28,3,ent->SamplesPerFrame(),3); - CHECK_INT2(28,4,ent->RawType(),Float64); + CHECK_OK2(53,2); + CHECK_INT2(53,1,ent->Type(),RawEntryType); + CHECK_INT2(53,2,ent->FragmentIndex(),0); + CHECK_INT2(53,3,ent->SamplesPerFrame(),3); + CHECK_INT2(53,4,ent->RawType(),Float64); delete ent; - // 29: Dirfile::Add / LincomEntry check + // 54: Dirfile::Add / LincomEntry check q[0] = 9.9; q[1] = 8.8; q[2] = 7.7; @@ -440,21 +440,21 @@ lent.SetScale(q[2], 1); lent.SetOffset(q[3], 1); d->Add(lent); - CHECK_OK2(29,1); + CHECK_OK2(54,1); ent = d->Entry("new2"); - CHECK_OK2(29,2); - CHECK_INT2(29,1,ent->Type(),LincomEntryType); - CHECK_INT2(29,2,ent->NFields(),2); - CHECK_INT2(29,3,ent->FragmentIndex(),0); - CHECK_STRING2(29,4,ent->Input(0),"in1"); - CHECK_STRING2(29,5,ent->Input(1),"in2"); - CHECK_INT2(29,6,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(29,7,2,ent->Scale(i),q[i * 2]); - CHECK_DOUBLE_ARRAY(29,8,2,ent->Offset(i),q[i * 2 + 1]); + CHECK_OK2(54,2); + CHECK_INT2(54,1,ent->Type(),LincomEntryType); + CHECK_INT2(54,2,ent->NFields(),2); + CHECK_INT2(54,3,ent->FragmentIndex(),0); + CHECK_STRING2(54,4,ent->Input(0),"in1"); + CHECK_STRING2(54,5,ent->Input(1),"in2"); + CHECK_INT2(54,6,ent->ComplexScalars(),0); + CHECK_DOUBLE_ARRAY(54,7,2,ent->Scale(i),q[i * 2]); + CHECK_DOUBLE_ARRAY(54,8,2,ent->Offset(i),q[i * 2 + 1]); delete ent; - // 30: Dirfile::Add / LincomEntry check + // 55: Dirfile::Add / LincomEntry check cq[0] = complex<double>(1.1, 1.2); cq[1] = complex<double>(1.3, 1.4); cq[2] = complex<double>(1.4, 1.5); @@ -470,21 +470,21 @@ lent.SetScale(cq[2], 1); lent.SetOffset(cq[3], 1); d->Add(lent); - CHECK_OK2(30,1); + CHECK_OK2(55,1); ent = d->Entry("new3"); - CHECK_OK2(30,2); - CHECK_INT2(30,1,ent->Type(),LincomEntryType); - CHECK_INT2(30,2,ent->NFields(),2); - CHECK_INT2(30,3,ent->FragmentIndex(),0); - CHECK_STRING2(30,4,ent->Input(0),"in1"); - CHECK_STRING2(30,5,ent->Input(1),"in2"); - CHECK_INT2(30,6,ent->ComplexScalars(),1); - CHECK_COMPLEX_ARRAY(30,2,ent->CScale(i),cq[i * 2]); - CHECK_COMPLEX_ARRAY(30,2,ent->COffset(i),cq[i * 2 + 1]); + CHECK_OK2(55,2); + CHECK_INT2(55,1,ent->Type(),LincomEntryType); + CHECK_INT2(55,2,ent->NFields(),2); + CHECK_INT2(55,3,ent->FragmentIndex(),0); + CHECK_STRING2(55,4,ent->Input(0),"in1"); + CHECK_STRING2(55,5,ent->Input(1),"in2"); + CHECK_INT2(55,6,ent->ComplexScalars(),1); + CHECK_COMPLEX_ARRAY(55,2,ent->CScale(i),cq[i * 2]); + CHECK_COMPLEX_ARRAY(55,2,ent->COffset(i),cq[i * 2 + 1]); delete ent; - // 31: Dirfile::Add / PolynomEntry check + // 56: Dirfile::Add / PolynomEntry check q[0] = 3.9; q[1] = 4.8; q[2] = 5.7; @@ -498,19 +498,19 @@ yent.SetCoefficient(q[2], 2); yent.SetCoefficient(q[3], 3); d->Add(yent); - CHECK_OK2(31,1); + CHECK_OK2(56,1); ent = d->Entry("new4"); - CHECK_OK2(31,2); - CHECK_INT2(31,1,ent->Type(),PolynomEntryType); - CHECK_INT2(31,2,ent->PolyOrd(),3); - CHECK_INT2(31,3,ent->FragmentIndex(),0); - CHECK_STRING2(31,4,ent->Input(),"in1"); - CHECK_INT2(31,5,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(31,6,4,ent->Coefficient(i),q[i]); + CHECK_OK2(56,2); + CHECK_INT2(56,1,ent->Type(),PolynomEntryType); + CHECK_INT2(56,2,ent->PolyOrd(),3); + CHECK_INT2(56,3,ent->FragmentIndex(),0); + CHECK_STRING2(56,4,ent->Input(),"in1"); + CHECK_INT2(56,5,ent->ComplexScalars(),0); + CHECK_DOUBLE_ARRAY(56,6,4,ent->Coefficient(i),q[i]); delete ent; - // 32: Dirfile::Add / PolynomEntry check + // 57: Dirfile::Add / PolynomEntry check cq[0] = complex<double>(3.1, 7); cq[1] = complex<double>(4.2, 8); cq[2] = complex<double>(5.2, 9); @@ -525,155 +525,155 @@ yent.SetCoefficient(cq[2], 2); yent.SetCoefficient(cq[3], 3); d->Add(yent); - CHECK_OK2(32,1); + CHECK_OK2(57,1); ent = d->Entry("new5"); - CHECK_OK2(32,2); - CHECK_INT2(32,1,ent->Type(),PolynomEntryType); - CHECK_INT2(32,2,ent->PolyOrd(),3); - CHECK_INT2(32,3,ent->FragmentIndex(),0); - CHECK_STRING2(32,4,ent->Input(),"in2"); - CHECK_INT2(32,7,ent->ComplexScalars(),1); - CHECK_COMPLEX_ARRAY(32,4,ent->CCoefficient(i),cq[i]); + CHECK_OK2(57,2); + CHECK_INT2(57,1,ent->Type(),PolynomEntryType); + CHECK_INT2(57,2,ent->PolyOrd(),3); + CHECK_INT2(57,3,ent->FragmentIndex(),0); + CHECK_STRING2(57,4,ent->Input(),"in2"); + CHECK_INT2(57,7,ent->ComplexScalars(),1); + CHECK_COMPLEX_ARRAY(57,4,ent->CCoefficient(i),cq[i]); delete ent; - // 33: Dirfile::Add / LinterpEntry check + // 58: Dirfile::Add / LinterpEntry check nent.SetName("new6"); nent.SetFragmentIndex(0); nent.SetInput("in"); nent.SetTable("./some/table"); d->Add(nent); - CHECK_OK2(33,1); + CHECK_OK2(58,1); ent = d->Entry("new6"); - CHECK_OK2(33,2); - CHECK_INT2(33,1,ent->Type(),LinterpEntryType); - CHECK_INT2(33,2,ent->FragmentIndex(),0); - CHECK_STRING2(33,3,ent->Input(),"in"); - CHECK_STRING2(33,4,ent->Table(),"./some/table"); + CHECK_OK2(58,2); + CHECK_INT2(58,1,ent->Type(),LinterpEntryType); + CHECK_INT2(58,2,ent->FragmentIndex(),0); + CHECK_STRING2(58,3,ent->Input(),"in"); + CHECK_STRING2(58,4,ent->Table(),"./some/table"); delete ent; - // 34: Dirfile::Add / BitEntry check + // 59: Dirfile::Add / BitEntry check bent.SetName("new7"); bent.SetFragmentIndex(0); bent.SetInput("in1"); bent.SetFirstBit(13); bent.SetNumBits(12); d->Add(bent); - CHECK_OK2(34,1); + CHECK_OK2(59,1); ent = d->Entry("new7"); - CHECK_OK(34); - CHECK_INT2(34,1,ent->Type(),BitEntryType); - CHECK_INT2(34,2,ent->FragmentIndex(),0); - CHECK_STRING2(34,3,ent->Input(),"in1"); - CHECK_INT2(34,4,ent->NumBits(),12); - CHECK_INT2(34,5,ent->FirstBit(),13); + CHECK_OK(59); + CHECK_INT2(59,1,ent->Type(),BitEntryType); + CHECK_INT2(59,2,ent->FragmentIndex(),0); + CHECK_STRING2(59,3,ent->Input(),"in1"); + CHECK_INT2(59,4,ent->NumBits(),12); + CHECK_INT2(59,5,ent->FirstBit(),13); delete ent; - // 35: Dirfile::Add / SBitEntry check + // 60: Dirfile::Add / SBitEntry check sent.SetName("new8"); sent.SetFragmentIndex(0); sent.SetInput("in2"); sent.SetFirstBit(14); sent.SetNumBits(15); d->Add(sent); - CHECK_OK2(35,1); + CHECK_OK2(60,1); ent = d->Entry("new8"); - CHECK_OK(35); - CHECK_INT2(35,1,ent->Type(),SBitEntryType); - CHECK_INT2(35,2,ent->FragmentIndex(),0); - CHECK_STRING2(35,3,ent->Input(),"in2"); - CHECK_INT2(35,4,ent->NumBits(),15); - CHECK_INT2(35,5,ent->FirstBit(),14); + CHECK_OK(60); + CHECK_INT2(60,1,ent->Type(),SBitEntryType); + CHECK_INT2(60,2,ent->FragmentIndex(),0); + CHECK_STRING2(60,3,ent->Input(),"in2"); + CHECK_INT2(60,4,ent->NumBits(),15); + CHECK_INT2(60,5,ent->FirstBit(),14); delete ent; - // 36: Dirfile::Add / MultiplyEntry check + // 61: Dirfile::Add / MultiplyEntry check ment.SetName("new9"); ment.SetFragmentIndex(0); ment.SetInput("in1", 0); ment.SetInput("in2", 1); d->Add(ment); - CHECK_OK2(36,1); + CHECK_OK2(61,1); ent = d->Entry("new9"); - CHECK_OK2(36,2); - CHECK_INT2(36,1,ent->Type(),MultiplyEntryType); - CHECK_INT2(36,2,ent->FragmentIndex(),0); - CHECK_STRING2(36,3,ent->Input(0),"in1"); - CHECK_STRING2(36,4,ent->Input(1),"in2"); + CHECK_OK2(61,2); + CHECK_INT2(61,1,ent->Type(),MultiplyEntryType); + CHECK_INT2(61,2,ent->FragmentIndex(),0); + CHECK_STRING2(61,3,ent->Input(0),"in1"); + CHECK_STRING2(61,4,ent->Input(1),"in2"); delete ent; - // 37: Dirfile::Add / PhaseEntry check + // 62: Dirfile::Add / PhaseEntry check pent.SetName("new10"); pent.SetFragmentIndex(0); pent.SetInput("in1"); pent.SetShift(22); d->Add(pent); - CHECK_OK2(37,1); + CHECK_OK2(62,1); ent = d->Entry("new10"); - CHECK_OK(37); - CHECK_INT2(37,1,ent->Type(),PhaseEntryType); - CHECK_INT2(37,2,ent->FragmentIndex(),0); - CHECK_STRING2(37,3,ent->Input(),"in1"); - CHECK_INT2(37,4,ent->Shift(),22); + CHECK_OK(62); + CHECK_INT2(62,1,ent->Type(),PhaseEntryType); + CHECK_INT2(62,2,ent->FragmentIndex(),0); + CHECK_STRING2(62,3,ent->Input(),"in1"); + CHECK_INT2(62,4,ent->Shift(),22); delete ent; - // 38: Dirfile::Add / ConstEntry check + // 63: Dirfile::Add / ConstEntry check cent.SetName("new11"); cent.SetFragmentIndex(0); cent.SetType(Float64); d->Add(cent); - CHECK_OK2(38,1); + CHECK_OK2(63,1); ent = d->Entry("new11"); - CHECK_OK2(38,2); - CHECK_INT2(38,1,ent->Type(),ConstEntryType); - CHECK_INT2(38,2,ent->FragmentIndex(),0); - CHECK_INT2(38,3,ent->ConstType(),Float64); + CHECK_OK2(63,2); + CHECK_INT2(63,1,ent->Type(),ConstEntryType); + CHECK_INT2(63,2,ent->FragmentIndex(),0); + CHECK_INT2(63,3,ent->ConstType(),Float64); delete ent; - // 39: Fragment check + // 64: Fragment check frag = d->Fragment(0); - CHECK_OK(39); + CHECK_OK(64); sprintf(buf, "dirfile%cformat", GD_DIRSEP); - CHECK_EOSTRING(39,frag->Name(), buf); + CHECK_EOSTRING(64,frag->Name(), buf); delete frag; - // 40: Dirfile::NFragments check + // 65: Dirfile::NFragments check n = d->NFragments(); - CHECK_OK(40); - CHECK_INT(40,n,1); + CHECK_OK(65); + CHECK_INT(65,n,1); - // 41: Dirfile::Include check + // 66: Dirfile::Include check n = d->Include("form2"); - CHECK_OK2(41,1); - CHECK_INT2(41,1,n,1); + CHECK_OK2(66,1); + CHECK_INT2(66,1,n,1); n = d->GetConstant("const2", Int8, &sc); - CHECK_OK2(41,2); - CHECK_INT2(41,2,sc,-19); + CHECK_OK2(66,2); + CHECK_INT2(66,2,sc,-19); - // 42: Dirfile::NFieldsByType check + // 67: Dirfile::NFieldsByType check n = d->NFieldsByType(LincomEntryType); - CHECK_OK(42); - CHECK_INT(42,n,3); + CHECK_OK(67); + CHECK_INT(67,n,3); - // 43: Dirfile::FieldListByType check + // 68: Dirfile::FieldListByType check fields[0] = (char*)"lincom"; fields[1] = (char*)"new2"; fields[2] = (char*)"new3"; list = d->FieldListByType(LincomEntryType); - CHECK_OK(43); - CHECK_STRING_ARRAY(43,n,list[i],fields[i]); + CHECK_OK(68); + CHECK_STRING_ARRAY(68,n,list[i],fields[i]); - // 44: Dirfile::NVectors check + // 69: Dirfile::NVectors check n = d->NVectors(); - CHECK_OK(44); - CHECK_INT(44,n,24); + CHECK_OK(69); + CHECK_INT(69,n,24); - // 45: Dirfile::VectorList check + // 70: Dirfile::VectorList check fields[0] = (char*)"INDEX"; fields[1] = (char*)"alias"; fields[2] = (char*)"bit"; @@ -699,150 +699,120 @@ fields[22] = (char*)"sbit"; fields[23] = (char*)"window"; list = d->VectorList(); - CHECK_OK(45); - CHECK_STRING_ARRAY(45,n,list[i],fields[i]); + CHECK_OK(70); + CHECK_STRING_ARRAY(70,n,list[i],fields[i]); - // 126: Dirfile::MAdd check - q[0] = 9.9; - q[1] = 8.8; - q[2] = 7.7; - q[3] = 6.6; - lent.Dissociate(); - lent.SetName("mnew1"); - lent.SetNFields(2); - lent.SetInput("in1", 0); - lent.SetScale(q[0], 0); - lent.SetOffset(q[1], 0); - lent.SetInput("in2", 1); - lent.SetScale(q[2], 1); - lent.SetOffset(q[3], 1); - d->MAdd(lent, "data"); - CHECK_OK2(126,1); - - ent = d->Entry("data/mnew1"); - CHECK_OK2(126,2); - CHECK_INT2(126,1,ent->Type(),LincomEntryType); - CHECK_INT2(126,2,ent->NFields(),2); - CHECK_INT2(126,3,ent->FragmentIndex(),0); - CHECK_STRING2(126,4,ent->Input(0),"in1"); - CHECK_STRING2(126,5,ent->Input(1),"in2"); - CHECK_INT2(126,6,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(126,7,2,ent->Scale(i),q[i * 2]); - CHECK_DOUBLE_ARRAY(126,8,2,ent->Offset(i),q[i * 2 + 1]); - delete ent; - - // 56: Dirfile::GetString check + // 81: Dirfile::GetString check n = d->GetString("string", GD_MAX_LINE_LENGTH, buf); - CHECK_OK(56); - CHECK_INT(56,n,18); - CHECK_STRING(56,buf,"Zaphod Beeblebrox"); + CHECK_OK(81); + CHECK_INT(81,n,18); + CHECK_STRING(81,buf,"Zaphod Beeblebrox"); - // 57: Dirfile::Add / StringEntry check + // 82: Dirfile::Add / StringEntry check gent.SetName("new12"); gent.SetFragmentIndex(0); d->Add(gent); - CHECK_OK2(57,1); + CHECK_OK2(82,1); ent = d->Entry("new12"); - CHECK_OK2(57,2); - CHECK_INT2(57,1,ent->Type(),StringEntryType); - CHECK_INT2(57,2,ent->FragmentIndex(),0); + CHECK_OK2(82,2); + CHECK_INT2(82,1,ent->Type(),StringEntryType); + CHECK_INT2(82,2,ent->FragmentIndex(),0); delete ent; n = d->GetString("new12", GD_MAX_LINE_LENGTH, buf); - CHECK_OK2(57,3); - CHECK_INT(57,n,1); - CHECK_STRING(57,buf,""); + CHECK_OK2(82,3); + CHECK_INT(82,n,1); + CHECK_STRING(82,buf,""); - // 59: Dirfile::AddSpec check + // 84: Dirfile::AddSpec check d->AddSpec("lorem STRING \"Lorem ipsum\"", 0); - CHECK_OK2(59,1); + CHECK_OK2(84,1); n = d->GetString("lorem", GD_MAX_LINE_LENGTH, buf); - CHECK_OK2(59,2); - CHECK_INT(59,n,12); - CHECK_STRING(59,buf,"Lorem ipsum"); + CHECK_OK2(84,2); + CHECK_INT(84,n,12); + CHECK_STRING(84,buf,"Lorem ipsum"); - // 60: Dirfile::MAddSpec check + // 85: Dirfile::MAddSpec check d->MAddSpec("ipsum STRING \"dolor sit amet.\"", "lorem"); - CHECK_OK2(60,1); + CHECK_OK2(85,1); n = d->GetString("lorem/ipsum", GD_MAX_LINE_LENGTH, buf); - CHECK_OK2(60,2); - CHECK_INT(60,n,16); - CHECK_STRING(60,buf,"dolor sit amet."); + CHECK_OK2(85,2); + CHECK_INT(85,n,16); + CHECK_STRING(85,buf,"dolor sit amet."); - // 61: Dirfile::PutConstant check - sc = 61; + // 86: Dirfile::PutConstant check + sc = 86; n = d->PutConstant("const", Int8, &sc); - CHECK_OK2(61,1); - CHECK_INT2(61,1,n,0); + CHECK_OK2(86,1); + CHECK_INT2(86,1,n,0); n = d->GetConstant("const", Float32, &fl); - CHECK_OK2(61,2); - CHECK_INT2(61,2,n,0); - CHECK_DOUBLE2(61,3,fl,61); + CHECK_OK2(86,2); + CHECK_INT2(86,2,n,0); + CHECK_DOUBLE2(86,3,fl,86); - // 62: Dirfile::PutString check + // 94: Dirfile::PutString check n = d->PutString("string", "Arthur Dent"); - CHECK_OK2(62,1); - CHECK_INT2(62,1,n,12); + CHECK_OK2(94,1); + CHECK_INT2(94,1,n,12); n = d->GetString("string", GD_MAX_LINE_LENGTH, buf); - CHECK_OK2(62,2); - CHECK_INT2(62,2,n,12); - CHECK_STRING(62,buf,"Arthur Dent"); + CHECK_OK2(94,2); + CHECK_INT2(94,2,n,12); + CHECK_STRING(94,buf,"Arthur Dent"); - // 63: Dirfile::NMFieldsByType check - n = d->NMFieldsByType("data", LincomEntryType); - CHECK_OK(63); - CHECK_INT(63,n,1); + // 95: Dirfile::NMFieldsByType check + n = d->NMFieldsByType("data", LinterpEntryType); + CHECK_OK(95); + CHECK_INT(95,n,1); - // 64: Dirfile::MFieldListByType check - fields[0] = (char*)"mnew1"; - list = d->MFieldListByType("data", LincomEntryType); - CHECK_OK(64); - CHECK_STRING_ARRAY(64,n,list[i],fields[i]); + // 96: Dirfile::MFieldListByType check + fields[0] = (char*)"mlut"; + list = d->MFieldListByType("data", LinterpEntryType); + CHECK_OK(96); + CHECK_STRING_ARRAY(96,n,list[i],fields[i]); - // 65: Dirfile::NMVectors check + // 97: Dirfile::NMVectors check n = d->NMVectors("data"); - CHECK_OK(65); - CHECK_INT(65,n,2); + CHECK_OK(97); + CHECK_INT(97,n,1); - // 66: Dirfile::MVectorList check + // 98: Dirfile::MVectorList check fields[0] = (char*)"mlut"; - fields[1] = (char*)"mnew1"; list = d->MVectorList("data"); - CHECK_OK(66); - CHECK_STRING_ARRAY(66,n,list[i],fields[i]); + CHECK_OK(98); + CHECK_STRING_ARRAY(98,n,list[i],fields[i]); - // 67: RawEntry check + // 99: RawEntry check rep = reinterpret_cast<RawEntry*>(d->Entry("new1")); - CHECK_OK2(67,1); + CHECK_OK2(99,1); rep->SetType(Int32,0); - CHECK_OK2(67,2); + CHECK_OK2(99,2); rep->SetSamplesPerFrame(4,0); - CHECK_OK2(67,3); + CHECK_OK2(99,3); ent = d->Entry("new1"); - CHECK_OK2(67,4); - CHECK_INT2(67,1,ent->Type(),RawEntryType); - CHECK_INT2(67,2,ent->FragmentIndex(),0); - CHECK_INT2(67,3,ent->SamplesPerFrame(),4); - CHECK_INT2(67,4,ent->RawType(),Int32); + CHECK_OK2(99,4); + CHECK_INT2(99,1,ent->Type(),RawEntryType); + CHECK_INT2(99,2,ent->FragmentIndex(),0); + CHECK_INT2(99,3,ent->SamplesPerFrame(),4); + CHECK_INT2(99,4,ent->RawType(),Int32); delete ent; - // 68: LincomEntry check + // 100: LincomEntry check lep = reinterpret_cast<LincomEntry*>(d->Entry("new2")); - CHECK_OK2(68,1); + CHECK_OK2(100,1); lep->SetNFields(3); - CHECK_OK2(68,2); + CHECK_OK2(100,2); lep->SetInput("in4",2); - CHECK_OK2(68,3); + CHECK_OK2(100,3); lep->SetScale(1.96,2); - CHECK_OK2(68,4); + CHECK_OK2(100,4); lep->SetOffset(0.22,2); - CHECK_OK2(68,5); + CHECK_OK2(100,5); delete lep; q[0] = 9.9; @@ -852,27 +822,27 @@ q[4] = 1.96; q[5] = 0.22; ent = d->Entry("new2"); - CHECK_OK2(68,6); - CHECK_INT2(68,1,ent->Type(),LincomEntryType); - CHECK_INT2(68,2,ent->NFields(),3); - CHECK_INT2(68,3,ent->FragmentIndex(),0); - CHECK_STRING2(68,4,ent->Input(0),"in1"); - CHECK_STRING2(68,5,ent->Input(1),"in2"); - CHECK_STRING2(68,6,ent->Input(2),"in4"); - CHECK_INT2(68,7,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(68,8,3,ent->Scale(i),q[i * 2]); - CHECK_DOUBLE_ARRAY(68,9,3,ent->Offset(i),q[i * 2 + 1]); + CHECK_OK2(100,6); + CHECK_INT2(100,1,ent->Type(),LincomEntryType); + CHECK_INT2(100,2,ent->NFields(),3); + CHECK_INT2(100,3,ent->FragmentIndex(),0); + CHECK_STRING2(100,4,ent->Input(0),"in1"); + CHECK_STRING2(100,5,ent->Input(1),"in2"); + CHECK_STRING2(100,6,ent->Input(2),"in4"); + CHECK_INT2(100,7,ent->ComplexScalars(),0); + CHECK_DOUBLE_ARRAY(100,8,3,ent->Scale(i),q[i * 2]); + CHECK_DOUBLE_ARRAY(100,9,3,ent->Offset(i),q[i * 2 + 1]); delete ent; - // 70: PolynomEntry check + // 102: PolynomEntry check yep = reinterpret_cast<PolynomEntry*>(d->Entry("new4")); - CHECK_OK2(70,1); + CHECK_OK2(102,1); yep->SetInput("in4"); - CHECK_OK2(70,2); + CHECK_OK2(102,2); yep->SetPolyOrd(4); - CHECK_OK2(70,3); + CHECK_OK2(102,3); yep->SetCoefficient(55.5,4); - CHECK_OK2(70,4); + CHECK_OK2(102,4); delete yep; q[0] = 3.9; @@ -881,276 +851,302 @@ q[3] = 6.6; q[4] = 55.5; ent = d->Entry("new4"); - CHECK_OK2(70,5); - CHECK_INT2(70,1,ent->Type(),PolynomEntryType); - CHECK_INT2(70,2,ent->PolyOrd(),4); - CHECK_INT2(70,3,ent->FragmentIndex(),0); - CHECK_STRING2(70,4,ent->Input(),"in4"); - CHECK_INT2(70,5,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(70,6,5,ent->Coefficient(i),q[i]); + CHECK_OK2(102,5); + CHECK_INT2(102,1,ent->Type(),PolynomEntryType); + CHECK_INT2(102,2,ent->PolyOrd(),4); + CHECK_INT2(102,3,ent->FragmentIndex(),0); + CHECK_STRING2(102,4,ent->Input(),"in4"); + CHECK_INT2(102,5,ent->ComplexScalars(),0); + CHECK_DOUBLE_ARRAY(102,6,5,ent->Coefficient(i),q[i]); delete ent; - // 72: LinterpEntry check + // 104: LinterpEntry check nep = reinterpret_cast<LinterpEntry*>(d->Entry("new6")); - CHECK_OK2(72,1); + CHECK_OK2(104,1); nep->SetInput("in3"); - CHECK_OK2(72,2); + CHECK_OK2(104,2); nep->SetTable("./other/table"); - CHECK_OK2(72,3); + CHECK_OK2(104,3); delete nep; ent = d->Entry("new6"); - CHECK_OK2(72,2); - CHECK_INT2(72,1,ent->Type(),LinterpEntryType); - CHECK_INT2(72,2,ent->FragmentIndex(),0); - CHECK_STRING2(72,3,ent->Input(),"in3"); - CHECK_STRING2(72,4,ent->Table(),"./other/table"); + CHECK_OK2(104,2); + CHECK_INT2(104,1,ent->Type(),LinterpEntryType); + CHECK_INT2(104,2,ent->FragmentIndex(),0); + CHECK_STRING2(104,3,ent->Input(),"in3"); + CHECK_STRING2(104,4,ent->Table(),"./other/table"); delete ent; - // 73: BitEntry check + // 105: BitEntry check bep = reinterpret_cast<BitEntry*>(d->Entry("new7")); - CHECK_OK2(73,1); + CHECK_OK2(105,1); bep->SetInput("in3"); - CHECK_OK2(73,2); + CHECK_OK2(105,2); bep->SetFirstBit(3); - CHECK_OK2(73,3); + CHECK_OK2(105,3); bep->SetNumBits(2); - CHECK_OK2(73,4); + CHECK_OK2(105,4); delete bep; ent = d->Entry("new7"); - CHECK_OK(73); - CHECK_INT2(73,1,ent->Type(),BitEntryType); - CHECK_INT2(73,2,ent->FragmentIndex(),0); - CHECK_STRING2(73,3,ent->Input(),"in3"); - CHECK_INT2(73,4,ent->NumBits(),2); - CHECK_INT2(73,5,ent->FirstBit(),3); + CHECK_OK(105); + CHECK_INT2(105,1,ent->Type(),BitEntryType); + CHECK_INT2(105,2,ent->FragmentIndex(),0); + CHECK_STRING2(105,3,ent->Input(),"in3"); + CHECK_INT2(105,4,ent->NumBits(),2); + CHECK_INT2(105,5,ent->FirstBit(),3); delete ent; - // 74: SBitEntry check + // 106: SBitEntry check sep = reinterpret_cast<SBitEntry*>(d->Entry("new8")); - CHECK_OK2(74,1); + CHECK_OK2(106,1); sep->SetInput("in4"); - CHECK_OK2(74,2); + CHECK_OK2(106,2); sep->SetFirstBit(1); - CHECK_OK2(74,3); + CHECK_OK2(106,3); sep->SetNumBits(22); - CHECK_OK2(74,4); + CHECK_OK2(106,4); delete sep; ent = d->Entry("new8"); - CHECK_OK(74); - CHECK_INT2(74,1,ent->Type(),SBitEntryType); - CHECK_INT2(74,2,ent->FragmentIndex(),0); - CHECK_STRING2(74,3,ent->Input(),"in4"); - CHECK_INT2(74,4,ent->NumBits(),22); - CHECK_INT2(74,5,ent->FirstBit(),1); + CHECK_OK(106); + CHECK_INT2(106,1,ent->Type(),SBitEntryType); + CHECK_INT2(106,2,ent->FragmentIndex(),0); + CHECK_STRING2(106,3,ent->Input(),"in4"); + CHECK_INT2(106,4,ent->NumBits(),22); + CHECK_INT2(106,5,ent->FirstBit(),1); delete ent; - // 75: MultiplyEntry check + // 107: MultiplyEntry check mep = reinterpret_cast<MultiplyEntry*>(d->Entry("new9")); - CHECK_OK2(75,1); + CHECK_OK2(107,1); mep->SetInput("in4",0); - CHECK_OK2(75,2); + CHECK_OK2(107,2); mep->SetInput("in5",1); - CHECK_OK2(75,3); + CHECK_OK2(107,3); delete mep; ent = d->Entry("new9"); - CHECK_OK2(75,2); - CHECK_INT2(75,1,ent->Type(),MultiplyEntryType); - CHECK_INT2(75,2,ent->FragmentIndex(),0); - CHECK_STRING2(75,3,ent->Input(0),"in4"); - CHECK_STRING2(75,4,ent->Input(1),"in5"); + CHECK_OK2(107,2); + CHECK_INT2(107,1,ent->Type(),MultiplyEntryType); + CHECK_INT2(107,2,ent->FragmentIndex(),0); + CHECK_STRING2(107,3,ent->Input(0),"in4"); + CHECK_STRING2(107,4,ent->Input(1),"in5"); delete ent; - // 76: PhsaeEntry check + // 108: PhsaeEntry check pep = reinterpret_cast<PhaseEntry*>(d->Entry("new10")); - CHECK_OK2(76,1); + CHECK_OK2(108,1); pep->SetInput("in2"); - CHECK_OK2(76,2); + CHECK_OK2(108,2); pep->SetShift(8); - CHECK_OK2(76,3); + CHECK_OK2(108,3); delete pep; ent = d->Entry("new10"); - CHECK_OK(76); - CHECK_INT2(76,1,ent->Type(),PhaseEntryType); - CHECK_INT2(76,2,ent->FragmentIndex(),0); - CHECK_STRING2(76,3,ent->Input(),"in2"); - CHECK_INT2(76,4,ent->Shift(),8); + CHECK_OK(108); + CHECK_INT2(108,1,ent->Type(),PhaseEntryType); + CHECK_INT2(108,2,ent->FragmentIndex(),0); + CHECK_STRING2(108,3,ent->Input(),"in2"); + CHECK_INT2(108,4,ent->Shift(),8); delete ent; - // 77: ConstEntry check + // 109: ConstEntry check cep = reinterpret_cast<ConstEntry*>(d->Entry("new11")); - CHECK_OK2(77,1); + CHECK_OK2(109,1); cep->SetType(Float32); - CHECK_OK2(77,2); + CHECK_OK2(109,2); delete cep; ent = d->Entry("new11"); - CHECK_OK2(77,2); - CHECK_INT2(77,1,ent->Type(),ConstEntryType); - CHECK_INT2(77,2,ent->FragmentIndex(),0); - CHECK_INT2(77,3,ent->ConstType(),Float32); + CHECK_OK2(109,2); + CHECK_INT2(109,1,ent->Type(),ConstEntryType); + CHECK_INT2(109,2,ent->FragmentIndex(),0); + CHECK_INT2(109,3,ent->ConstType(),Float32); delete ent; - // 78: Fragment::Encoding check + // 110: Fragment::Encoding check frag = d->Fragment(0); - CHECK_OK(78); - CHECK_INT(78,frag->Encoding(),RawEncoding); + CHECK_OK(110); + CHECK_INT(110,frag->Encoding(),RawEncoding); - // 79: Fragment::Endianness check - CHECK_INT(79,frag->Endianness(),GD_LITTLE_ENDIAN | GD_NOT_ARM_ENDIAN); + // 111: Fragment::Endianness check + CHECK_INT(111,frag->Endianness(),GD_LITTLE_ENDIAN | GD_NOT_ARM_ENDIAN); delete frag; - // 80: Dirfile::Name check + // 112: Dirfile::Name check str = d->Name(); - CHECK_OK(80); - CHECK_EOSTRING(80,str,"dirfile"); + CHECK_OK(112); + CHECK_EOSTRING(112,str,"dirfile"); - // 81: Fragment::Parent check + // 113: Fragment::Parent check frag = d->Fragment(1); - CHECK_OK(81); - CHECK_INT(81,frag->Parent(),0); + CHECK_OK(113); + CHECK_INT(113,frag->Parent(),0); - // 82: Fragment::SetProtection check + // 114: Fragment::SetProtection check frag->SetProtection(GD_PROTECT_DATA); - CHECK_OK(82); + CHECK_OK(114); delete frag; - // 83: Fragment::Protection check + // 115: Fragment::Protection check frag = d->Fragment(1); - CHECK_OK(83); - CHECK_INT(83,frag->Protection(),GD_PROTECT_DATA); + CHECK_OK(115); + CHECK_INT(115,frag->Protection(),GD_PROTECT_DATA); - // 84: RawEntry::FileName check + // 116: RawEntry::FileName check str = rep->FileName(); - CHECK_OK(84); + CHECK_OK(116); sprintf(buf, "dirfile%cnew1", GD_DIRSEP); - CHECK_EOSTRING(84,str, buf); + CHECK_EOSTRING(116,str, buf); delete rep; - // 85: Dirfile::Reference check + // 117: Dirfile::Reference check rep = d->Reference("new1"); - CHECK_OK(85); - CHECK_STRING(85,rep->Name(),"new1"); + CHECK_OK(117); + CHECK_STRING(117,rep->Name(),"new1"); delete rep; - // 135: Dirfile::ReferenceFilename check - str = d->ReferenceFilename(); - CHECK_OK(135); - CHECK_EOSTRING(135,str, buf); + // 118: Dirfile::EoF check + n = d->EoF("lincom"); + CHECK_OK(118); + CHECK_INT(118,n,80); - // 87: Fragment::SetEncoding check + // 119: Fragment::SetEncoding check frag->SetEncoding(SlimEncoding,0); - CHECK_OK(87); - CHECK_INT(87,frag->Encoding(),SlimEncoding); + CHECK_OK(119); + CHECK_INT(119,frag->Encoding(),SlimEncoding); - // 88: Fragment::SetEndianness check + // 120: Fragment::SetEndianness check frag->SetEndianness(GD_BIG_ENDIAN,0); - CHECK_OK(88); - CHECK_INT(88,frag->Endianness(),GD_BIG_ENDIAN); + CHECK_OK(120); + CHECK_INT(120,frag->Endianness(),GD_BIG_ENDIAN); delete frag; - // 89: Dirfile::AlterSpec check + // 121: Dirfile::AlterSpec check d->AlterSpec("new10 PHASE in1 3"); - CHECK_OK2(89,1); + CHECK_OK2(121,1); ent = d->Entry("new10"); - CHECK_OK2(89,2); - CHECK_INT2(89,1,ent->Type(),PhaseEntryType); - CHECK_INT2(89,2,ent->FragmentIndex(),0); - CHECK_STRING2(89,3,ent->Input(),"in1"); - CHECK_INT2(89,4,ent->Shift(),3); + CHECK_OK2(121,2); + CHECK_INT2(121,1,ent->Type(),PhaseEntryType); + CHECK_INT2(121,2,ent->FragmentIndex(),0); + CHECK_STRING2(121,3,ent->Input(),"in1"); + CHECK_INT2(121,4,ent->Shift(),3); delete ent; - // 90: Dirfile::Delete check + // 122: Dirfile::Delete check d->Delete("new10", 0); - CHECK_OK2(90,1); + CHECK_OK2(122,1); ent = d->Entry("new10"); - CHECK_ERROR2(90,2,GD_E_BAD_CODE); + CHECK_ERROR2(122,2,GD_E_BAD_CODE); delete ent; - // 91: Dirfile::MAlterSpec check - d->MAlterSpec("mnew1 LINCOM 2 in4 1 2 in5 3 4", "data", 0); - CHECK_OK2(91,1); + // 123: Dirfile::MAlterSpec check + d->MAlterSpec("mlut LINTERP data /new/lut", "data", 0); + CHECK_OK2(123,1); - ent = d->Entry("data/mnew1"); - CHECK_OK2(91,2); - CHECK_INT2(91,1,ent->Type(),LincomEntryType); - CHECK_INT2(91,2,ent->NFields(),2); - CHECK_INT2(91,3,ent->FragmentIndex(),0); - CHECK_STRING2(91,4,ent->Input(0),"in4"); - CHECK_STRING2(91,5,ent->Input(1),"in5"); - CHECK_INT2(91,6,ent->ComplexScalars(),0); - CHECK_DOUBLE_ARRAY(91,7,2,ent->Scale(i),i * 2 + 1); - CHECK_DOUBLE_ARRAY(91,8,2,ent->Offset(i),i * 2 + 2); + ent = d->Entry("data/mlut"); + CHECK_OK2(123,2); + CHECK_INT2(123,3,ent->Type(),LinterpEntryType); + CHECK_INT2(123,4,ent->FragmentIndex(),0); + CHECK_STRING2(123,5,ent->Input(),"data"); + CHECK_STRING2(123,6,ent->Table(),"/new/lut"); delete ent; - // 92: Entry::Move check + // 124: Entry::Move check ent = d->Entry("new9"); - CHECK_OK2(92,1); + CHECK_OK2(124,1); ent->Move(1,0); - CHECK_OK2(92,2); - CHECK_INT(92,ent->FragmentIndex(),1); + CHECK_OK2(124,2); + CHECK_INT(124,ent->FragmentIndex(),1); - // 93: Entry::Rename check + // 125: Entry::Rename check ent->Rename("newer",0); - CHECK_OK2(93,1); + CHECK_OK2(125,1); delete ent; ent = d->Entry("new9"); - CHECK_ERROR2(93,2,GD_E_BAD_CODE); + CHECK_ERROR2(125,2,GD_E_BAD_CODE); delete ent; ent = d->Entry("newer"); - CHECK_OK2(93,3); - CHECK_INT2(93,1,ent->Type(),MultiplyEntryType); - CHECK_INT2(93,2,ent->FragmentIndex(),1); - CHECK_STRING2(93,3,ent->Input(0),"in4"); - CHECK_STRING2(93,4,ent->Input(1),"in5"); + CHECK_OK2(125,3); + CHECK_INT2(125,1,ent->Type(),MultiplyEntryType); + CHECK_INT2(125,2,ent->FragmentIndex(),1); + CHECK_STRING2(125,3,ent->Input(0),"in4"); + CHECK_STRING2(125,4,ent->Input(1),"in5"); delete ent; - // 94: Dirfile::UnInclude check + // 126: Dirfile::UnInclude check d->UnInclude(1,0); - CHECK_OK2(94,1); + CHECK_OK2(126,1); ent = d->Entry("newer"); - CHECK_ERROR2(94,2,GD_E_BAD_CODE); + CHECK_ERROR2(126,2,GD_E_BAD_CODE); delete ent; - // 95: Fragment::FrameOffset check + // 127: Fragment::FrameOffset check frag = d->Fragment(0); - CHECK_OK(95); - CHECK_INT(95,frag->FrameOffset(),0); + CHECK_OK(127); + CHECK_INT(127,frag->FrameOffset(),0); - // 96: Fragment::SetFrameOffset check + // 128: Fragment::SetFrameOffset check frag->SetFrameOffset(33,0); - CHECK_OK(96); - CHECK_INT(96,frag->FrameOffset(),33); + CHECK_OK(128); + CHECK_INT(128,frag->FrameOffset(),33); - // 97: Dirfile::NativeType check + // 129: Dirfile::NativeType check n = d->NativeType("data"); - CHECK_OK(97); - CHECK_INT(97,n,Int8); + CHECK_OK(129); + CHECK_INT(129,n,Int8); - // 99: Dirfile::Validate check + // 131: Dirfile::Validate check n = d->Validate("new7"); - CHECK_ERROR(99,GD_E_BAD_CODE); - CHECK_INT(99,n,-1); + CHECK_ERROR(131,GD_E_BAD_CODE); + CHECK_INT(131,n,-1); - // 101: Dirfile::FrameNum check + // 133: Dirfile::FrameNum check delete d->Reference("data"); dp = d->FrameNum("data", 33.3, 6); - CHECK_OK(101); - CHECK_DOUBLE(101,dp,37.0375); + CHECK_OK(133); + CHECK_DOUBLE(133,dp,37.0375); - // 86: Dirfile::EoF check - n = d->EoF("lincom"); - CHECK_OK(86); - CHECK_INT(86,n,344); + // 136: Dirfile::MAdd check + q[0] = 9.9; + q[1] = 8.8; + q[2] = 7.7; + q[3] = 6.6; + lent.Dissociate(); + lent.SetName("mnew136"); + lent.SetNFields(2); + lent.SetInput("in1", 0); + lent.SetScale(q[0], 0); + lent.SetOffset(q[1], 0); + lent.SetInput("in2", 1); + lent.SetScale(q[2], 1); + lent.SetOffset(q[3], 1); + d->MAdd(lent, "data"); + CHECK_OK2(136,1); + + ent = d->Entry("data/mnew136"); + CHECK_OK2(136,2); + CHECK_INT2(136,1,ent->Type(),LincomEntryType); + CHECK_INT2(136,2,ent->NFields(),2); + CHECK_INT2(136,3,ent->FragmentIndex(),0); + CHECK_STRING2(136,4,ent->Input(0),"in1"); + CHECK_STRING2(136,5,ent->Input(1),"in2"); + CHECK_INT2(136,6,ent->ComplexScalars(),0); + CHECK_DOUBLE_ARRAY(136,7,2,ent->Scale(i),q[i * 2]); + CHECK_DOUBLE_ARRAY(136,8,2,ent->Offset(i),q[i * 2 + 1]); + delete ent; + + // 137: Dirfile::ReferenceFilename check + str = d->ReferenceFilename(); + CHECK_OK(137); + sprintf(buf, "dirfile%cdata", GD_DIRSEP); + CHECK_EOSTRING(137,str, buf); // 142: Dirfile::BoF check n = d->BoF("lincom"); @@ -1370,7 +1366,7 @@ CHECK_INT2(180,4,ent->ArrayLen(),2); delete ent; - // 181 gd_alter_carray + // 181: gd_alter_carray aep = reinterpret_cast<CarrayEntry*>(d->Entry("new17")); CHECK_OK2(181,1); aep->SetType(Float32); @@ -1388,7 +1384,7 @@ delete ent; // 183: gd_constants - p[0] = 61.; + p[0] = 86.; p[1] = 0.; n = d->NFieldsByType(ConstEntryType); qp = reinterpret_cast<const double *>(d->Constants()); Modified: trunk/getdata/bindings/f77/Makefile.am =================================================================== --- trunk/getdata/bindings/f77/Makefile.am 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/f77/Makefile.am 2013-10-18 02:00:00 UTC (rev 848) @@ -1,4 +1,4 @@ -# Copyright (C) 2008-2010 D. V. Wiebe +# Copyright (C) 2008-2010, 2013 D. V. Wiebe # ########################################################################## # @@ -23,28 +23,12 @@ SED = @SED@ DIFF = @DIFF@ -if FC_WEXTRA -FC_WEXTRA=-Wextra -endif - -if FC_WALL -FC_WALL=-Wall -endif - -if CC_WEXTRA -CC_WEXTRA=-Wextra -endif - -if CC_WALL -CC_WALL=-Wall -endif - if MAKE_F95BINDINGS F95_INC=getdata.mod F95_LIB=libf95getdata.la endif -FCFLAGS += $(FC_WALL) $(FC_WEXTRA) +FCFLAGS += $(GD_FC_WALL) $(GD_FC_WEXTRA) INCLUDES = -I$(top_srcdir)/src EXTRA_DIST=getdata.f.in getdata.f90.in @@ -56,7 +40,7 @@ nodist_include_HEADERS=getdata.f $(F95_INC) lib_LTLIBRARIES=libfgetdata.la $(F95_LIB) -libfgetdata_la_CPPFLAGS = ${CC_WALL} $(CC_WEXTRA) +libfgetdata_la_CPPFLAGS = ${GD_CC_WALL} $(GD_CC_WEXTRA) libfgetdata_la_SOURCES = fgetdata.c fgetdata.h libfgetdata_la_LIBADD=../../src/libgetdata.la libfgetdata_la_LDFLAGS = -version-info @FGETDATA_VERSION@ Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2013-09-05 23:32:05 UTC (rev 847) +++ trunk/getdata/bindings/f77/fgetdata.c 2013-10-18 02:00:00 UTC (rev 848) @@ -1,4 +1,4 @@ -/* Copyright (C) 2008-2012 D. V. Wiebe +/* Copyright (C) 2008-2013 D. V. Wiebe * ************************************************************************* * @@ -25,6 +25,16 @@ #include <stdio.h> #include <string.h> +/* convert scalar_ind from C to FORTRAN */ +#define GDF_SCIND_C2F(out,in) do { \ + (out) = (in); if ((out) >= 0) (out)++; \ +} while (0) + +/* convert scalar ind from FORTRAN to C */ +#define GDF_SCIND_F2C(out,in) do { \ + (out) = (in); if ((out) > 0) (out)--; \ +} while (0) + /* Fortran 77 has no facility to take a pointer to a DIRFILE* object. * Instead, we keep a list of them here. If we ever run out of these, * the caller will be abort()ed. */ @@ -65,7 +75,7 @@ if (l < 0) { *out = NULL; dreturn("%p", NULL); - return *out; + return NULL; } *out = (char*)malloc(l + 1); @@ -1370,24 +1380,17 @@ void F77_FUNC(gdadcr, GDADCR) (const int32_t *dirfile, const char *field_code, const int32_t *field_code_l, const char *in_field, - const int32_t *in_field_l, const GD_DCOMPLEXP(cdividend), + const int32_t *in_field_l, const double *cdividend, const int32_t *fragment_index) { char *fc, *in; dtrace("%i, %p, %i, %p, %i, %g;%g, %i", *dirfile, field_code, *field_code_l, - in_field, *in_field_l, crealp(cdividend), cimagp(cdividend), - *fragment_index); + in_field, *in_field_l, cdividend[0], cdividend[1], *fragment_index); -#ifdef GD_NO_C99_API gd_add_crecip89(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, *field_code_l), _GDF_CString(&in, in_field, *in_field_l), cdividend, *fragment_index); -#else - gd_add_crecip(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, - *field_code_l), _GDF_CString(&in, in_field, *in_field_l), *cdividend, - *fragment_index); -#endif free(fc); free(in); @@ -3115,7 +3118,7 @@ ok = 0; _GDF_FString(scalar, scalar_l, (ok) ? E.scalar[*index - 1] : ""); - *scalar_index = E.scalar_ind[*index - 1]; + GDF_SCIND_C2F(*scalar_index, E.scalar_ind[*index - 1]); gd_free_entry_strings(&E); @@ -3189,7 +3192,7 @@ free(E.scalar[*index - 1]); _GDF_CString(E.scalar + *index - 1, scalar, *scalar_l); - E.scalar_ind[*index - 1] = *scalar_index; + GDF_SCIND_F2C(E.scalar_ind[*index - 1], *scalar_index); gd_alter_entry(D, fc, &E, *recode); @@ -3478,18 +3481,18 @@ void F77_FUNC(gdadmx, GDADMX) (const int32_t *dirfile, const char *field_code, const int32_t *field_code_l, const char *in_field, const int32_t *in_field_l, const char *count_field, - const int32_t *count_field_l, const int32_t *val, const int32_t *max, + const int32_t *count_field_l, const int32_t *val, const int32_t *period, const int32_t *fragment_index) { char *in, *cf, *fc; dtrace("%i, %p, %i, %p, %i, %p, %i, %i, %i, %i", *dirfile, field_code, *field_code_l, in_field, *in_field_l, count_field, *count_field_l, - *val, *max, *fragment_index); + *val, *period, *fragment_index); gd_add_mplex(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, *field_code_l), _GDF_CString(&in, in_field, *in_field_l), - _GDF_CString(&cf, count_field, *count_field_l), *val, *max, + _GDF_CString(&cf, count_field, *count_field_l), *val, *period, *fragment_index); free(fc); @@ -3504,18 +3507,18 @@ const int32_t *parent_l, const char *field_code, const int32_t ... [truncated message content] |
From: <ket...@us...> - 2013-10-19 01:09:13
|
Revision: 849 http://sourceforge.net/p/getdata/code/849 Author: ketiltrout Date: 2013-10-19 01:09:09 +0000 (Sat, 19 Oct 2013) Log Message: ----------- PHP doc Modified Paths: -------------- trunk/getdata/bindings/php/getdata/getdata.c Added Paths: ----------- trunk/getdata/doc/README.php Modified: trunk/getdata/bindings/php/getdata/getdata.c =================================================================== --- trunk/getdata/bindings/php/getdata/getdata.c 2013-10-18 02:00:00 UTC (rev 848) +++ trunk/getdata/bindings/php/getdata/getdata.c 2013-10-19 01:09:09 UTC (rev 849) @@ -2871,13 +2871,13 @@ PHP_FUNCTION(gd_encoding) { - long i; + long i = 0; DIRFILE *D; dtracephp(); - GDPHP_PARSED("l", &i); + GDPHP_PARSED("|l", &i); i = gd_encoding(D, i); @@ -2890,13 +2890,13 @@ PHP_FUNCTION(gd_endianness) { - long i; + long i = 0; DIRFILE *D; dtracephp(); - GDPHP_PARSED("l", &i); + GDPHP_PARSED("|l", &i); i = gd_endianness(D, i); @@ -3158,13 +3158,13 @@ PHP_FUNCTION(gd_frameoffset) { - long i; + long i = 0; DIRFILE *D; dtracephp(); - GDPHP_PARSED("l", &i); + GDPHP_PARSED("|l", &i); i = gd_frameoffset64(D, i); @@ -3218,7 +3218,7 @@ unpack = gdphp_unpack(zunpack); if (len == -1) { - len = gd_carray_len(D, field_code); + len = gd_carray_len(D, field_code) - start; if (len == 0) /* error */ GDPHP_RETURN_F; } @@ -4485,14 +4485,18 @@ PHP_FUNCTION(gd_rewrite_fragment) { - long i = GD_ALL_FRAGMENTS; + zval *zi; + long i; + DIRFILE *D; dtracephp(); - GDPHP_PARSED("|l", &i); + GDPHP_PARSED("|z", &zi); + i = gdphp_long_from_zval_null(zi, GD_ALL_FRAGMENTS); + GDPHP_RETURN_BOOL(gd_rewrite_fragment(D, i)); } Added: trunk/getdata/doc/README.php =================================================================== --- trunk/getdata/doc/README.php (rev 0) +++ trunk/getdata/doc/README.php 2013-10-19 01:09:09 UTC (rev 849) @@ -0,0 +1,575 @@ +PHP BINDINGS FOR GETDATA +======================== + +The PHP bindings for GetData provide PHP5 bindings to the C GetData Library. +The bindings are provided in a PHP extension (called "getdata") which also +defines all the GetData constants (GD_RDONLY, GD_E_OK, &c.). The bindings +are built using phpize(1) and the standard PHP extension build system. + +In PHP, the C API's DIRFILE object is represented by a Dirfile resource, +allocated by gd_open(). The DIRFILE associated with a Dirfile resource is +automatically discarded and de-allocated (see gd_discard(3)) when the resource +goes out of scope and is reclaimed by GC. Typically this means that a +Dirfile opened with these bindings stays open only while the calling +script runs. However, Dirfile resources can also be made persistent by +calling gd_popen() instead. (See Persistent Database Connections in the PHP +manual for details on persistent resources.) + +A persistent Dirfile resource is not collected by GC when it goes out of scope. +Call gd_discard or gd_close to explicitly delete it. See the discussion of +gd_popen() below for more details on retrieving previously-created persistent +Dirfile resources. + +In general when strings are passed to the extension, only that part of the +string up to the first NUL character will be considered. The exception to this +is gd_popen() (q.v.) + +Data Types +---------- + +In the extension, gd_entry_t structs are represented as associative arrays whose +keys are the same as the gd_entry_t structure members in the C API (see +gd_entry(3)), with the following exceptions: + +* There is no "scalar_ind" key. The value associated with the key "scalar" + is an array of two-element arrays. The first element of the two-element + array is the scalar field code, and the second is the scalar index. + +* Because the extension can determine at run-time the type of a value, there + is no need to distinguish purely real from complex data in the entry + arrays. As a result, complex data will be stored in the values associated + with "m", "b", "a", "dividend" when appropriate. For the same reason, there + is no "comp_scal" key. + +Data can be returned by the extension either packed or unpacked. Packed data +are returned as a string and can be later unpacked using the standard unpack() +function. Unpacked data are returned as an array of the data type requested. +See the INI setting "getdata.unpack" below for ways of indicating whether +packed or unpacked data should be returned. + +Although PHP does not support unsigned integers, if requested, the extension +will return unpacked unsigned data coerced to signed. Be careful with its +interpretation. For convenience, in addition to the standard GD_INT32, +GD_INT64, &c. data type symbols, the extension defines the constants GD_INT +and GD_FLOAT to the native PHP integer and floating point types. + +Similarly, data vectors passed to the extension can be packed or unpacked. +Packed data require a GetData type code indicating the type of the packed data. +If a GetData type code is specified with unpacked data, that type will be used +internally to pass the data to the C API; if no type code is given with unpacked +data, a suitable type will be automatically picked by the extension. Because +packed data can be passed through the extension without intermediate conversion, +it should be preferred when a choice is available. + +Complex data (when not packed) is represented as a two-element array. The +element indexed zero is the real part of the datum; the element indexed one +is the imaginary part. If the "getdata.degrade_complex" INI setting (see below) +is true, complex data whose imaginary part is zero will be simply reported as +a real number, rather than the two-element array. + +INI Setttings +------------- + +The GetData extension defines two optional, boolean INI settings: + +* getdata.unpack: If true, GetData will by default return data as an unpacked + array, rather than a packed string. All functions which return data allow + overriding this setting on a call-by-call basis via their "unpack" argument. + The default is false. + +* getdata.degrade_complex: If true, when returning (unpacked) complex value + data, values which are purely real will be represented simply as a floating + point number. If this is false, these values whill be returned as a + two-element array whose second element (the imarginary part) is zero. The + default is true. + +Both of these settings can be changed on the fly using the standard ini_set() +function. + +Functions +--------- + +Unless otherwise indicated, functions in the extension return false on error, +regardless of their stated return type. Functions which are specified to return +a bool return true on success, except as noted. + +Most functions behave equivalently to their counterparts in the C API. See the +corresponding manual page in the Unix manual for complete details. A complete +list of available functions is given below. Differences from the C API are +pointed out. + +In the prototypes below, "data" can be either a string containing packed data +or else an array containing unpacked data; "number" can be any numeric type +(including a two-element array representing a complex number). + +Optional arguments are given in square brackets with their default values. +The default value for the always-optional $unpack parameter is not given; the +default is the current value of the getdata.unpack INI setting (see above). +Some functions have several ways that they can be called. + +* bool gd_add(resource $dirfile, array $entry) + + For LINCOM and POLYNOM entries, the "n_fields" and "poly_ord" keys of $entry + are optional: the extension will use the other supplied parameters to + deterimine these if not given. If named scalars are used for parameters, + the corresponding literal parameter can be omitted. In most cases, $entry + members which are one-element arrays can be replaced with a scalar. + +* bool gd_add_alias(resource $dirfile, string $field_code, string $target, + [ int $fragment_index = 0 ]) + +* bool gd_add_bit(resource $dirfile, string $field_code, string $in_field, + int $bitnum, [ int $numbits = 1, int $fragment_index = 0 ]) + +* bool gd_add_carray(resource $dirfile, string $field_code, int $const_type, + array $unpacked_data, [ int $fragment_index = 0 ]) + bool gd_add_carray(resource $dirfile, string $field_code, int $const_type, + int $data_type, data $data, [ int $fragment_index = 0 ]) + +* bool gd_add_const(resource $dirfile, string $field_code, int $const_type, + number $value) + +* bool gd_add_divide(resource $dirfile, string $field_code, string $in_field1, + string $in_field2, [ int $fragment_index = 0 ]) + +* bool gd_add_lincom(resource $dirfile, string $field_code, array $in_fields, + array $m, array $b, [ int $fragment_index = 0 ]) + +* bool gd_add_linterp(resource $dirfile, string $field_code, string $in_field, + string $table, [ int $fragment_index = 0 ]) + +* bool gd_add_mplex(resource $dirfile, string $field_code, string $in_field, + string $count_field, int $count, [ int $period = 0, + int $fragment_index = 0 ]) + +* bool gd_add_multiply(resource $dirfile, string $field_code, string $in_field1, + string $in_field2, [ int $fragment_index = 0 ]) + +* bool gd_add_phase(resource $dirfile, string $field_code, string $in_field, + int $shift, [ int $fragment_index = 0 ]) + +* bool gd_add_polynom(resource $dirfile, string $field_code, string $in_field, + array $a, [ int $fragment_index = 0 ]) + +* bool gd_add_raw(resource $dirfile, string $field_code, int $data_type, + int $spf, [ int $fragment_index = 0 ]) + +* bool gd_add_recip(resource $dirfile, string $field_code, string $in_field, + number $dividend, [ int $fragment_index = 0]) + +* bool gd_add_sbit(resource $dirfile, string $field_code, string $in_field, + int $bitnum, [ int $numbits = 1, int $fragment_index = 0 ]) + +* bool gd_add_spec(resource $dirfile, string $spec, [ int $fragment_index = 0 ]) + +* bool gd_add_string(resource $dirfile, string $field_code, string $value, + [ int $fragment_index = 0 ]) + +* bool gd_add_window(resource $dirfile, string $field_code, string $in_field, + string $check_field, int $windop, number $threshold, + [ int $fragment_index = 0 ]) + +* string gd_alias_target(resource $dirfile, string $field_code) + +* array gd_aliases(resource $dirfile, string $field_code) + +* bool gd_alter_affixes(resource $dirfile, int $fragment_index, string $prefix, + string $suffix) + + If $prefix and/or $suffix is null, no change will be made to that affix. To + remove an affix, use the empty string (as in the C API). + +* bool gd_alter_bit(resource $dirfile, string $field_code, + [ string $in_field = null, int $bitnum = null, int $numbits = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_carray(resource $dirfile, string $field_code, + [ int $const_type = null, int $array_len = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_const(resource $dirfile, string $field_code, + [ int $const_type = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_encoding(resource $dirfile, int $encoding, int $fragment_index, + [ bool $recode = false ]) + +* bool gd_alter_endianness(resource $dirfile, int $byte_sex, + int $fragment_index, [ bool $recode = false ]) + +* bool gd_alter_entry(resource $dirfile, string $field_code, array $entry, + [ bool $recode = false ]) + + Elements of $entry which are missing or set to null are left unchanged. + +* bool gd_alter_frameoffset(resource $dirfile, int $offset, int $fragment_index, + [ bool $recode = false ]) + +* bool gd_alter_divide(resource $dirfile, string $field_code, + [ string $in_field1 = null, string $in_field2 = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_lincom(resource $dirfile, string $field_code, + [ int $n_fields = null, array $in_fields = null, array $m = null, + array $b = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_linterp(resource $dirfile, string $field_code, + [ string $in_field, string $table, bool $rename = false ]) + +* bool gd_alter_mplex(resource $dirfile, string $field_code, + [ string $in_field = null, string $count_field = null, int $count = null, + int $period = null ]) + +* bool gd_alter_multiply(resource $dirfile, string $field_code, + [ string $in_field1, string $in_field2 ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_phase(resource $dirfile, string $field_code, + [ string $in_field = null, int $shift = null ]) + +* bool gd_alter_polynom(resource $dirfile, string $field_code, + [ int $poly_ord = null, string $in_field = null, array $a = null ]) + +* bool gd_alter_protection(resource $dirfile, int $protection, + int $fragment_index) + +* bool gd_alter_raw(resource $dirfile, string $field_code, + [ int $data_type = null, int $spf = null, bool $recode = false ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_recip(resource $dirfile, string $field_code, + [ string $in_field = null, number $dividend = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_sbit(resource $dirfile, string $field_code, + [ string $in_field = null, int $bitnum = null, int $numbits = null ]) + + Parameters which are null (or not given) are left unchanged. + +* bool gd_alter_spec(resource $dirfile, string $spec, [ bool $recode = false ]) + +* bool gd_alter_window(resource $dirfile, string $field_code, + [ string $in_field = null, string $check_field = null, + int $windop = null, number $threshold = null ]) + +* int gd_bof(resource $dirfile, string $field_code) + +* int gd_carray_len(resource $dirfile, string $field_code) + +* array gd_carrays(resource $dirfile, int $return_type, [ bool $unpack ]) + + Returns an array of packed strings or unpacked arrays. + +* bool gd_close(resource $dirfile) + + On success, the resource $dirfile is deleted. + +* data gd_constants(resource $dirfile, int $return_type, [ bool $unpack ]) + +* bool gd_delete(resource $dirfile, string $field_code, [ int $flags = 0 ]) + +* bool gd_delete_alias(resource $dirfile, string $field_code, + [ int $flags = 0 ]) + +* bool gd_desync(resource $dirfile, [ int $flags = 0 ]) + + Returns true or false, as appropriate, on success, and null on error. + +* int gd_dirfile_standards(resource $dirfile, + [ int $version = GD_VERSION_CURRENT ]) + +* string gd_dirfilekey(resource $dirfile) + + This function, which has no counterpart in the C API, returns the dirfile + key, which is simply the string passed to gd_open() or gd_popen() when + the dirfile was opened. Unlike most strings returned by the extension, + the string returned may contain embedded NUL characters. See gd_popen() + for a discussion on the use of dirfile keys. If you simply want the + dirfile path, use gd_dirfilename() below. + +* string gd_dirfilename(resource $dirfile) + +* bool gd_discard(resource $dirfile) + + On success, the resource $dirfile is deleted. + +* int gd_encoding(resource $dirfile, [ int $fragment_index = 0 ]) + +* int gd_endianness(resource $dirfile, [ int $fragment_index = 0 ]) + +* array gd_entry(resource $dirfile, string $field_code) + + See above for a description of the returned entry array. + +* array gd_entry_list(resource $dirfile, [ string $parent = null, + int $type = GD_ALL_ENTRIES, flags = 0 ]) + +* int gd_entry_type(resource $dirfile, string $field_code) + +* int gd_eof(resource $dirfile, string $field_code) + +* int gd_error(resorce $dirfile) + +* string gd_error_string(resource $dirfile) + +* array gd_field_list(resource $dirfile) + +* array gd_field_list_by_type(resource $dirfile, int $type) + +* int gd_flags(resource $dirfile, [ int $set = 0, int $reset = 0 ]) + +* bool gd_flush(resource $dirfile, [ string $field_code = null ]) + +* array gd_fragment_affixes(resource $dirfile, int $fragment_index) + +* string gd_fragmentname(resoruce $dirfile, int $fragment_index) + +* int gd_frameoffset(resource $dirfile, [ int $fragment_index = 0 ]) + +* float gd_framenum(resource $dirfile, string $field_code, float $value, + [ int $start = 0, int $stop = 0 ]) + + This actually wraps gd_framenum_subset(3). + +* data gd_get_carray(resource $dirfile, string $field_code, int $return_type, + [ int $start = 0, int $len = null, bool $unpack ]) + + If $len is null (or not given), all values to the end of the CARRAY are + returned. + +* number gd_get_constant(resource $dirfile, string $field_code, int $return_type) + +* string gd_get_string(resource $dirfile, string $field_code) + +* data gd_getdata(resource $dirfile, string $field_code, int $first_frame, + int $first_sample, int $num_frames, int $num_samples, int $return_type, + [ bool $unpack ]) + +* bool gd_hidden(resource $dirfile, string $field_code) + + Returns true or false, as appropriate, on success, and null on error. + +* bool gd_hide(resource $dirfile, string $field_code) + +* int gd_include(resource $dirfile, string $path, int $parent_fragment, + [ int $flags = 0, string $prefix = "", string $suffix = "" ]) + + This actually wraps gd_include_affix(3). + +* resource gd_invalid_dirfile(void) + + This returns a Dirfile resource associated with an invalid dirfile. + There is no corresponding function that returns a persistent resource. + +* string gd_linterp_tablename(resource $dirfile, string $field_code) + +* bool gd_madd(resource $dirfile, string $parent, array $entry) + + For LINCOM and POLYNOM entries, the "n_fields" and "poly_ord" keys of $entry + are optional: the extension will use the other supplied parameters to + deterimine these if not given. If named scalars are used for parameters, + the corresponding literal parameter can be omitted. In most cases, $entry + members which are one-element arrays can be replaced with a scalar. + +* bool gd_madd_alias(resource $dirfile, string $parent, string $field_code, + string $target) + +* bool gd_madd_bit(resource $dirfile, string $parent, string $field_code, + string $in_field, int $bitnum, [ int $numbits = 1 ]) + +* bool gd_madd_carray(resource $dirfile, string $parent, string $field_code, + int $const_type, array $unpacked_data) + bool gd_madd_carray(resource $dirfile, string $parent, string $field_code, + int $const_type, int $data_type, data $data) + +* bool gd_madd_const(resource $dirfile, string $parent, string $field_code, + int $const_type, number $value) + +* bool gd_madd_divide(resource $dirfile, string $parent, string $field_code, + string $in_field1, string $in_field2) + +* bool gd_madd_lincom(resource $dirfile, string $parent, string $field_code, + array $in_fields, array $m, array $b) + +* bool gd_madd_linterp(resource $dirfile, string $parent, string $field_code, + string $in_field, string $table) + +* bool gd_madd_mplex(resource $dirfile, string $parent, string $field_code, + string $in_field, string $count_field, int $count, [ int $period = 0 ]) + +* bool gd_madd_multiply(resource $dirfile, string $parent, string $field_code, + string $in_field1, string $in_field2) + +* bool gd_madd_phase(resource $dirfile, string $parent, string $field_code, + string $in_field, int $shift) + +* bool gd_madd_polynom(resource $dirfile, string $parent, string $field_code, + string $in_field, array $a) + +* bool gd_madd_recip(resource $dirfile, string $parent, string $field_code, + string $in_field, number $dividend) + +* bool gd_madd_sbit(resource $dirfile, string $parent, string $field_code, + string $in_field, int $bitnum, [ int $numbits = 1 ]) + +* bool gd_madd_spec(resource $dirfile, string $spec, string $parent) + +* bool gd_madd_string(resource $dirfile, string $parent, string $field_code, + string $value) + +* bool gd_madd_window(resource $dirfile, string $parent, string $field_code, + string $in_field, string $check_field, int $windop, number $threshold) + +* bool gd_malter_spec(resource $dirfile, string $psec, string $parent, + [ bool $recode = false ]) + +* array gd_mcarrays(resource $dirfile, int $return_type, [ bool $unpack ]) + + Returns an array of packed strings or unpacked arrays. + +* data gd_mconstants(resource $dirfile, int $return_type, [ bool $unpack ]) + +* bool gd_metaflush(resource $dirfile) + +* array gd_mfield_list(resource $dirfile, string $field_code) + +* array gd_mfield_list_by_type(resource $dirfile, string $field_code, int $type) + +* bool gd_move(resource $dirfile, string $field_code, $new_fragment, + [ bool move_data = false ]) + +* bool gd_move_alias(resource $dirfile, string $field_code, $new_fragment) + +* bool gd_mplex_lookback(resource $dirfile, int $lookback) + +* array gd_mstrings(resource $dirfile, string $field_code) + +* array gd_mvector_list(resource $dirfile, string $field_code) + +* int gd_naliases(resource $dirfile, string $field_code) + +* int gd_native_type(resource $dirfile, string $field_code) + +* int gd_nentries(resource $dirfile, [ string $parent = null, + int $type = GD_ALL_ENTRIES, flags = 0 ]) + +* int gd_nfields(resource $dirfile) + +* int gd_nfields_by_type(resource $dirfile, int $type) + +* int gd_nfragments(resource $dirfile) + +* int gd_nframes(resource $dirfile) + +* int gd_nmfields(resource $dirfile, string $field_code) + +* int gd_nmfields_by_type(resource $dirfile, string $field_code, int $type) + +* int gd_nmvectors(resource $dirfile, string $field_code) + +* int gd_nvectors(resource $dirfile) + +* resource gd_open(string $dirfilename, [ int $flags = 0, + callable $callback = null, mixed $callback_data = null ]) + + If specified (and non-null), $callback should be a string giving the + name of a callback function. $callback_data, if given, may be anything; + it will be passed to the callback without inspection. + + The $callback should accept two parameters. The first will be an + associative array of parser data, the second will be the + $callback_data passed to this function. + + This function only returns false in the case when it couldn't create a + Dirfile resource; generally, a failed open will still return a Dirfile + resource. Use gd_error() to check for success. + + To open a Dirfile persistently, see gd_popen(). + +* int gd_parent_fragment(resource $dirfile, int $fragment_index) + +* resource gd_popen(string $dirfilename, [ int $flags = 0, + callable $callback = null, mixed $callback_data = null ]) + + If specified (and non-null), $callback should be a string giving the + name of a callback function. $callback_data, if given, may be anything; + it will be passed to the callback without inspection. + + The $callback should accept two parameters. The first will be an + associative array of parser data, the second will be the + $callback_data passed to this function. + + This function only returns false in the case when it couldn't create a + Dirfile resource; generally, a failed open will still return a Dirfile + resource. Use gd_error() to check for success. + + The returned resource will be persistent (ie. it won't be deleted when + it goes out of scope. If a persistent Dirfile is already open with the + same $dirfilename (including embedded NULs), its resource will be returned + and no new Dirfile will be opened. + +* int gd_protection(resource $dirfile, int $fragment_index) + +* bool gd_put_carray(resource $dirfile, string $field_code, array $unpacked_data) + bool gd_put_carray(resource $dirfile, string $field_code, int $start, + array $unpacked_data) + bool gd_put_carray(resource $dirfile, string $field_code, int $data_type, + string $packed_data) + bool gd_put_carray(resource $dirfile, string $field_code, int $start, + int $data_type, data $data) + +* bool gd_put_constant(resource $dirfile, string $field_code, number $datum) + +* bool gd_put_string(resource $dirfile, string $field_code, string $value) + +* int gd_putdata(resource $dirfile, string $field_code, int $first_frame, + int $first_sample, array $unpacked_data) + int gd_putdata(resource $dirfile, string $field_code, int $first_frame, + int $first_sample, int $data_type, data $data) + +* bool gd_raw_close(resource $dirfile, [ string $field_code = null ]) + +* string gd_raw_filename(resource $dirfile, string $field_code) + +* string gd_reference(resource $dirfile, [ string $field_code = null ]) + +* bool gd_rename(resource $dirfile, string $field_code, string new_name, + [ int flags = 0 ]) + +* bool gd_rewrite_fragment(resource $dirfile, + [ int $fragment_index = GD_ALL_FRAGMENTS ]) + +* int gd_seek(resource $dirfile, string $field_code, int $frame_num, + int $sample_num, [ int $flags = 0 ]) + +* int gd_spf(resource $dirfile, string $field_code) + +* array gd_strings(resource $dirfile) + +* array gd_strtok(resource $dirfile, string $string) + + Unlike the C API function, this function fully tokenises the string and + returns an array of string tokens. + +* bool gd_sync(resource $dirfile, [ string $field_code = null ]) + +* int gd_tell(resource $dirfile, string $field_code) + +* bool gd_unhide(resource $dirfile, string $field_code) + +* bool gd_uninclude(resource $dirfile, int $fragment_index, [ bool $delete = false ]) + +* bool gd_validate(resource $dirfile, string $field_code) + +* array gd_vector_list(resource $dirfile) + +* bool gd_verbose_prefix(resource $dirfile, [ string $prefix = "" ]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-10-19 01:31:08
|
Revision: 850 http://sourceforge.net/p/getdata/code/850 Author: ketiltrout Date: 2013-10-19 01:31:01 +0000 (Sat, 19 Oct 2013) Log Message: ----------- Merge in getdata-distutils branch. Modified Paths: -------------- trunk/getdata/bindings/python/Makefile.am trunk/getdata/bindings/python/test/Makefile.am trunk/getdata/configure.ac trunk/getdata/m4/python.m4 Added Paths: ----------- trunk/getdata/bindings/python/setup.py.in Property Changed: ---------------- trunk/getdata/ trunk/getdata/bindings/python/ Index: trunk/getdata =================================================================== --- trunk/getdata 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata 2013-10-19 01:31:01 UTC (rev 850) Property changes on: trunk/getdata ___________________________________________________________________ Modified: svn:mergeinfo ## -1,4 +1,5 ## /branches/getdata-0.4:217-227 /branches/getdata-0.7:513-566 /branches/getdata-arm:355-413 +/branches/getdata-distutils:778-849 /branches/getdata-osx:400-402 \ No newline at end of property Index: trunk/getdata/bindings/python =================================================================== --- trunk/getdata/bindings/python 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata/bindings/python 2013-10-19 01:31:01 UTC (rev 850) Property changes on: trunk/getdata/bindings/python ___________________________________________________________________ Modified: svn:ignore ## -1,4 +1,6 ## -.deps Makefile.in Makefile +build +debug.c pyconstants.c +setup.py Modified: trunk/getdata/bindings/python/Makefile.am =================================================================== --- trunk/getdata/bindings/python/Makefile.am 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata/bindings/python/Makefile.am 2013-10-19 01:31:01 UTC (rev 850) @@ -20,25 +20,19 @@ # AUTOMAKE_OPTIONS = foreign -if GETDATA_DEBUG -DEBUG_C = ../../src/debug.c -endif - SUBDIRS=test -python_LTLIBRARIES = pygetdata.la -LIBS= +nodist_python_SCRIPTS = pygetdata.so BUILT_SOURCES = pyconstants.c -AM_CFLAGS = ${GD_CC_WALL} -fno-strict-aliasing -AM_CPPFLAGS = $(CPPFLAGS) $(PYTHON_CPPFLAGS) $(NUMPY_CPPFLAGS) -pygetdata_la_LDFLAGS = -module -avoid-version \ - -export-symbols-regex initpygetdata -pygetdata_la_LIBADD = $(PYTHON_LIBS) ../../src/libgetdata.la -pygetdata_la_SOURCES = pygetdata.c pydirfile.c pyentry.c pyfragment.c \ - ${DEBUG_C} pygetdata.h -nodist_pygetdata_la_SOURCES = pyconstants.c +distutils_path=build/lib.${PYTHON_PLATFORM}-${PYTHON_VERSION} +pygetdata.so: ${distutils_path}/pygetdata.so + cp $< $@ + +${distutils_path}/pygetdata.so: setup.py ${BUILT_SOURCES} + ${PYTHON} setup.py build + pyconstants.c: ../make_parameters ../make_parameters p > $@ @@ -46,5 +40,6 @@ cd .. && ${MAKE} make_parameters clean-local: - rm -rf ${BUILT_SOURCES} *~ + if [ -e setup.py ]; then ${PYTHON} setup.py clean; fi + rm -rf build pygetdata.so ${BUILT_SOURCES} debug.c *~ Copied: trunk/getdata/bindings/python/setup.py.in (from rev 849, branches/getdata-distutils/bindings/python/setup.py.in) =================================================================== --- trunk/getdata/bindings/python/setup.py.in (rev 0) +++ trunk/getdata/bindings/python/setup.py.in 2013-10-19 01:31:01 UTC (rev 850) @@ -0,0 +1,98 @@ +# Copyright (C) 2012 D. V. Wiebe +# +# @configure_input@ +# +########################################################################## +# +# 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 +# +from distutils.core import setup +from distutils.extension import Extension +from distutils.command.clean import clean as clean +from os.path import join +from os import unlink +from shutil import copy + +libsrc_dir = '@top_srcdir@/src' +libbuild_dir = '../../src' +srcdir = '@srcdir@' + +#include paths +includes = [ libbuild_dir ] + +try: + import numpy + includes.append(numpy.get_include()) +except ImportError: + pass + +sources = [ 'pydirfile.c', 'pyentry.c', 'pyfragment.c', 'pygetdata.c' ] + +# clean copied source files in out-of-place builds; see below +cmdclass = {} + +class gd_clean(clean): + def run(self): + if '@srcdir@' != '.': + for x in sources: + unlink(x) + clean.run(self) + +# deal with out-of-place (VPATH) builds +if srcdir != '.': + includes.append(srcdir) # to find pygetdata.h + + # if we don't do this, the object files will end up in + # @top_builddir@/bindings/bindings/python, + # instead of + # @builddir@/build/temp.<whatever> + # like they're supposed to. It seems to work, but it's a little crazier + # than we're willing to deal with. + for x in sources: + copy(join(srcdir, x), x) + + # handle clean up + cmdclass['clean'] = gd_clean + +# now add this built source; it always ends up where distutils wants it to be +sources.append('pyconstants.c') + +# add debug sources +if @GETDATA_DEBUG@: + copy(join(libsrc_dir, 'debug.c'), 'debug.c') # see comment above + sources.append('debug.c') + includes.append(libsrc_dir) # to find internal.h + +setup( + name = 'pygetdata', + version = '@VERSION@', + cmdclass = cmdclass, + ext_modules = [ + Extension('pygetdata', + sources = sources, + depends = [ + join(srcdir, 'pygetdata.h'), + join(libbuild_dir, 'gd_config.h'), + join(libbuild_dir, 'getdata.h') + ], + include_dirs = includes, + library_dirs = [ join(libbuild_dir, '.libs') ], + libraries = [ 'getdata' ], + define_macros = [ ('HAVE_CONFIG_H','1') ] + ) + ] + ) Modified: trunk/getdata/bindings/python/test/Makefile.am =================================================================== --- trunk/getdata/bindings/python/test/Makefile.am 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata/bindings/python/test/Makefile.am 2013-10-19 01:31:01 UTC (rev 850) @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign if TEST_PYTHON -TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs PYTHONPATH=../.libs/ ${PYTHON} +TESTS_ENVIRONMENT=${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../../src/.libs PYTHONPATH=.. ${PYTHON} pyTESTS=callback.py big_test.py TESTS=$(addprefix ${srcdir}/,$(pyTESTS)) endif Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata/configure.ac 2013-10-19 01:31:01 UTC (rev 850) @@ -862,7 +862,6 @@ AC_MSG_CHECKING([NumPy includes]) NUMPY_CPPFLAGS=-I`$PYTHON -c "import numpy; print numpy.get_include()"` AC_MSG_RESULT([$NUMPY_CPPFLAGS]) - AC_SUBST([NUMPY_CPPFLAGS]) saved_cppflags=$CPPFLAGS CPPFLAGS="${CPPFLAGS} ${PYTHON_CPPFLAGS} ${NUMPY_CPPFLAGS}" @@ -1063,6 +1062,7 @@ AC_CONFIG_FILES([bindings/php/getdata/config.m4]) AC_CONFIG_FILES([bindings/php/test/Makefile]) AC_CONFIG_FILES([bindings/python/Makefile]) +AC_CONFIG_FILES([bindings/python/setup.py]) AC_CONFIG_FILES([bindings/python/test/Makefile]) AC_CONFIG_FILES([doc/Makefile]) AC_CONFIG_FILES([man/Makefile]) Modified: trunk/getdata/m4/python.m4 =================================================================== --- trunk/getdata/m4/python.m4 2013-10-19 01:09:09 UTC (rev 849) +++ trunk/getdata/m4/python.m4 2013-10-19 01:31:01 UTC (rev 850) @@ -96,50 +96,25 @@ AC_MSG_CHECKING([$PYTHON version]) PYTHON_VERSION=`$PYTHON -c "import sys; print sys.version[[:3]]"` AC_MSG_RESULT([$PYTHON_VERSION]) +AC_SUBST([PYTHON_VERSION]) -dnl calculate python CPPFLAGS and LIBS +dnl calculate python CPPFLAGS +AC_MSG_CHECKING([Python includes]) if test -x $PYTHON-config; then - if test -n "$user_python"; then - python_exec_prefix=`$PYTHON-config --exec-prefix` - PYTHON_LIBS="-L${python_exec_prefix}/lib " - else - PYTHON_LIBS="" - fi PYTHON_CPPFLAGS=`$PYTHON-config --includes 2>/dev/null` - PYTHON_LIBS="${PYTHON_LIBS}`$PYTHON-config --ldflags 2>/dev/null`" else python_prefix=`$PYTHON -c "import sys; print sys.prefix"` python_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` - python_libdir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('LIBDIR')"` - python_syslibs=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('SYSLIBS')"` - python_shlibs=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('SHLIBS')"` - python_modlibs=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_config_var('MODLIBS')"` - PYTHON_CPPFLAGS="-I${python_prefix}/include/python${PYTHON_VERSION} -I${python_exec_prefix}/include/python${PYTHON_VERSION}" - if test -n "$user_python"; then - PYTHON_LIBS="-L${python_libdir} " - else - PYTHON_LIBS="" - fi - PYTHON_LIBS="${PYTHON_LIBS}$python_syslibs $python_shlibs $python_modlibs -lpython${PYTHON_VERSION}" fi -AC_MSG_CHECKING([Python includes]) AC_MSG_RESULT([$PYTHON_CPPFLAGS]) -AC_SUBST([PYTHON_CPPFLAGS]) -AC_MSG_CHECKING([Python libraries]) -AC_MSG_RESULT([$PYTHON_LIBS]) -AC_SUBST([PYTHON_LIBS]) -dnl header check -saved_CPPFLAGS=${CPPFLAGS} -CPPFLAGS="${CPPFLAGS} ${PYTHON_CPPFLAGS}" -AC_CHECK_HEADERS(Python.h,,[have_python="no"]) -CPPFLAGS=${saved_CPPFLAGS} +dnl figure out the platform name +AC_MSG_CHECKING([Python platform name]) +PYTHON_PLATFORM=`$PYTHON -c "from distutils import util; print util.get_platform()"` +AC_MSG_RESULT([$PYTHON_PLATFORM]) +AC_SUBST([PYTHON_PLATFORM]) -fi - -if test "x${have_python}" != "xno"; then - dnl calculate the exec prefix pyexec_prefix=$exec_prefix test "x$pyexec_prefix" = xNONE && pyexec_prefix=$prefix @@ -155,16 +130,5 @@ AC_SUBST([pythondir]) AC_MSG_RESULT([$pythondir]) -saved_CPPFLAGS=${CPPFLAGS} -CPPFLAGS="${CPPFLAGS} ${PYTHON_CPPFLAGS}" -saved_LIBS=$LIBS -LIBS="$LIBS ${PYTHON_LIBS}" -dnl try to compile a module -AC_MSG_CHECKING([if we can compile a simple Python extension module]) -AC_TRY_LINK_FUNC([Py_Initialize], [ AC_MSG_RESULT([yes]) ], -[ AC_MSG_RESULT([no]); have_python="no" ]) -CPPFLAGS=$saved_CPPFLAGS -LIBS=$saved_LIBS - fi ]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-10-19 02:43:41
|
Revision: 852 http://sourceforge.net/p/getdata/code/852 Author: ketiltrout Date: 2013-10-19 02:43:38 +0000 (Sat, 19 Oct 2013) Log Message: ----------- Seth's _GD_MakeTempFile patch. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/src/ascii.c trunk/getdata/src/encoding.c trunk/getdata/src/gzip.c trunk/getdata/src/raw.c trunk/getdata/src/sie.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/ChangeLog 2013-10-19 02:43:38 UTC (rev 852) @@ -1,3 +1,13 @@ +2013-10-19 D. V. Wiebe <ge...@ke...> svn:852 + + _GD_MakeTempFile patch from Seth: + + * src/encoding.c (_GD_InitRawIO): Let the encoding framework deal with + creating temporary files. + * src/ascii.c (_GD_AsciiOpen) src/gzip.c (_GD_GzipOpen) src/raw.c + (_GD_RawOpen) src/sie.c (_GD_SampIndDoOpen): Call _GD_MakeTempFile when + necessary. + 2013-10-19 D. V. Wiebe <ge...@ke...> svn:850 Merge in getdata-distutils branch: Modified: trunk/getdata/src/ascii.c =================================================================== --- trunk/getdata/src/ascii.c 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/src/ascii.c 2013-10-19 02:43:38 UTC (rev 852) @@ -37,13 +37,14 @@ file->idata = gd_OpenAt(file->D, fd, file->name, ((mode & GD_FILE_WRITE) ? (O_RDWR | O_CREAT) : O_RDONLY) | O_BINARY, 0666); - if (file->idata < 0) { - dreturn("%i", -1); - return -1; - } } else - file->idata = fd; + file->idata = _GD_MakeTempFile(file->D, fd, file->name); + if (file->idata < 0) { + dreturn("%i", -1); + return -1; + } + file->edata = fdopen(file->idata, (mode & GD_FILE_WRITE) ? "rb+" : "rb"); if (file->edata == NULL) { Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/src/encoding.c 2013-10-19 02:43:38 UTC (rev 852) @@ -544,11 +544,7 @@ E->e->u.raw.file + 1, filebase, 1, 0)) { ; /* error already set */ - } else if ((temp_fd = _GD_MakeTempFile(D, D->fragment[fragment].dirfd, - E->e->u.raw.file[1].name)) < 0) - { - _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[1].name, errno, NULL); - } else if ((*enc->open)(temp_fd, E->e->u.raw.file + 1, swap, + } else if ((*enc->open)(D->fragment[fragment].dirfd, E->e->u.raw.file + 1, swap, GD_FILE_WRITE | GD_FILE_TEMP)) { _GD_SetError(D, GD_E_RAW_IO, 0, E->e->u.raw.file[1].name, errno, NULL); Modified: trunk/getdata/src/gzip.c =================================================================== --- trunk/getdata/src/gzip.c 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/src/gzip.c 2013-10-19 02:43:38 UTC (rev 852) @@ -51,6 +51,8 @@ return 1; } gzmode = "r"; + } else if (mode & GD_FILE_TEMP) { + file->idata = _GD_MakeTempFile(file->D, fd, file->name); } else file->idata = fd; Modified: trunk/getdata/src/raw.c =================================================================== --- trunk/getdata/src/raw.c 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/src/raw.c 2013-10-19 02:43:38 UTC (rev 852) @@ -34,9 +34,11 @@ file->idata = gd_OpenAt(file->D, fd, file->name, ((mode & GD_FILE_WRITE) ? (O_RDWR | O_CREAT) : O_RDONLY) | O_BINARY, 0666); - } else - file->idata = fd; + } else { + file->idata = _GD_MakeTempFile(file->D, fd, file->name); + } + file->pos = 0; file->mode = mode | GD_FILE_READ; Modified: trunk/getdata/src/sie.c =================================================================== --- trunk/getdata/src/sie.c 2013-10-19 01:34:07 UTC (rev 851) +++ trunk/getdata/src/sie.c 2013-10-19 02:43:38 UTC (rev 852) @@ -40,14 +40,14 @@ if (!(mode & GD_FILE_TEMP)) { fd = gd_OpenAt(file->D, fdin, file->name, ((mode & GD_FILE_WRITE) ? (O_RDWR | O_CREAT) : O_RDONLY) | O_BINARY, 0666); + } else { + fd = _GD_MakeTempFile(file->D, fdin, file->name); + } - if (fd < 0) { - dreturn("%i", -1); - return -1; - } - } else - fd = fdin; - + if (fd < 0) { + dreturn("%i", -1); + return -1; + } stream = fdopen(fd, (mode & GD_FILE_WRITE) ? "rb+" : "rb"); if (stream == NULL) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2013-10-19 03:12:54
|
Revision: 853 http://sourceforge.net/p/getdata/code/853 Author: ketiltrout Date: 2013-10-19 03:12:50 +0000 (Sat, 19 Oct 2013) Log Message: ----------- USE_MODULES kludge. Modified Paths: -------------- trunk/getdata/src/internal.h trunk/getdata/test/add_raw_spf_scalar.c Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2013-10-19 02:43:38 UTC (rev 852) +++ trunk/getdata/src/internal.h 2013-10-19 03:12:50 UTC (rev 853) @@ -1162,6 +1162,11 @@ #define gd_MakeFullPathOnly _GD_MakeFullPathOnly #endif char *_GD_MakeFullPathOnly(const DIRFILE *D, int dirfd, const char *name); +#ifdef USE_MODULES +#define _GD_MakeTempFile gd_MakeTempFile +#else +#define gd_MakeTempFile _GD_MakeTempFile +#endif int _GD_MakeTempFile(const DIRFILE*, int, char*); void *_GD_Malloc(DIRFILE *D, size_t size); int _GD_MissingFramework(int encoding, unsigned int funcs); Modified: trunk/getdata/test/add_raw_spf_scalar.c =================================================================== --- trunk/getdata/test/add_raw_spf_scalar.c 2013-10-19 02:43:38 UTC (rev 852) +++ trunk/getdata/test/add_raw_spf_scalar.c 2013-10-19 03:12:50 UTC (rev 853) @@ -41,6 +41,7 @@ rmdirfile(); E.field = "data"; E.field_type = GD_RAW_ENTRY; + E.fragment_index = 0; E.EN(raw,spf) = 0; E.EN(raw,data_type) = GD_UINT8; E.scalar[0] = "const"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |