getdata-commits Mailing List for GetData (Page 10)
Scientific Database Format
Brought to you by:
ketiltrout
This list is closed, nobody may subscribe to it.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(5) |
Oct
(20) |
Nov
(21) |
Dec
(16) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(1) |
Feb
(1) |
Mar
(56) |
Apr
(20) |
May
(4) |
Jun
(2) |
Jul
(3) |
Aug
(11) |
Sep
(2) |
Oct
(4) |
Nov
(18) |
Dec
(16) |
2012 |
Jan
(8) |
Feb
(12) |
Mar
(30) |
Apr
(13) |
May
(10) |
Jun
(17) |
Jul
(18) |
Aug
(19) |
Sep
|
Oct
(1) |
Nov
(1) |
Dec
(9) |
2013 |
Jan
(1) |
Feb
(4) |
Mar
(27) |
Apr
(6) |
May
(3) |
Jun
(1) |
Jul
(10) |
Aug
|
Sep
(3) |
Oct
(15) |
Nov
(4) |
Dec
(9) |
2014 |
Jan
|
Feb
(3) |
Mar
(4) |
Apr
(10) |
May
(15) |
Jun
|
Jul
(14) |
Aug
|
Sep
(2) |
Oct
(6) |
Nov
|
Dec
(9) |
2015 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <ket...@us...> - 2012-05-23 17:40:29
|
Revision: 710 http://getdata.svn.sourceforge.net/getdata/?rev=710&view=rev Author: ketiltrout Date: 2012-05-23 17:40:23 +0000 (Wed, 23 May 2012) Log Message: ----------- msys+mingw fixes. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/cmake/test/CMakeLists.txt trunk/getdata/configure.ac trunk/getdata/src/compat.c trunk/getdata/src/open.c trunk/getdata/test/test.h Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/ChangeLog 2012-05-23 17:40:23 UTC (rev 710) @@ -1,4 +1,13 @@ -2012-05-22 D. V. Wiebe <ge...@ke...> svn:706 +2012-05-23 D. V. Wiebe <ge...@ke...> svn:710 + * test/test.h: Don't redefine isnan if it's okay as-is. + + * src/open.c (_GD_CreateDirfile): Don't unnecessarily disable mtime + acquisition. + * cmake/test/CMakeLists.txt: enable desync checks. + + * src/compat.c (gd_strtod): Fix sign check. + +2012-05-22 D. V. Wiebe <ge...@ke...> svn:709 * cmake/CMakeLists.txt: Update definitons. Support GD_UTIL. * cmake/test/CMakeLists.txt: Update the list of excluded tests. * cmake/src/CMakeLists.txt: Support GD_DEBUG and conditionally build debug.c. Modified: trunk/getdata/cmake/test/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/test/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/cmake/test/CMakeLists.txt 2012-05-23 17:40:23 UTC (rev 710) @@ -20,7 +20,6 @@ if(MSVC) set(tests_ignored ${tests_ignored} - desync desync_flush desync_reopen desync_reopen_inv error_verbose error_verbose_prefix get64 get_uint64 get_endian64 get_int64 get_off64 nframes64 Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/configure.ac 2012-05-23 17:40:23 UTC (rev 710) @@ -699,7 +699,7 @@ AC_CHECK_FUNCS([basename _chsize _chsize_s _commit fchmod _fdopen fdopendir \ fpathconf fseeko fseeko64 _fstat fstat64 _fstat64 fstatat \ fstatat64 fsync ftello ftello64 ftruncate ftruncate64 getcwd \ - _getcwd getdelim gmtime_r _isnan lseek64 _lseeki64 lstat \ + _getcwd getdelim gmtime_r isnan _isnan lseek64 _lseeki64 lstat \ lstat64 _mkdir mkfifo nan _open openat pathconf _read \ readdir_r readlink renameat _rmdir snprintf _snprintf stat64 \ _stat64 _strtoi64 strtoll _strtoui64 strtoull _unlink unlinkat \ Modified: trunk/getdata/src/compat.c =================================================================== --- trunk/getdata/src/compat.c 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/src/compat.c 2012-05-23 17:40:23 UTC (rev 710) @@ -343,7 +343,7 @@ /* skip sign */ if (*ptr == '+' || *ptr == '-') { - if (ptr == '-') + if (*ptr == '-') sign = 0x80; ptr++; } Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/src/open.c 2012-05-23 17:40:23 UTC (rev 710) @@ -210,9 +210,7 @@ static FILE *_GD_CreateDirfile(DIRFILE *restrict D, int dirfd, int dir_error, char *restrict dirfile, time_t *mtime) { -#ifndef GD_NO_DIR_OPEN struct stat statbuf; -#endif int fd = -1; int format_error = 0, format_trunc = 0; FILE* fp = NULL; @@ -377,11 +375,9 @@ D->dir[0].path = dirfile; D->ndir = 1; -#ifndef GD_NO_DIR_OPEN /* get the mtime */ if (fstat(fd, &statbuf) == 0) *mtime = statbuf.st_mtime; -#endif dreturn("%p", fp); return fp; Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-05-23 06:57:07 UTC (rev 709) +++ trunk/getdata/test/test.h 2012-05-23 17:40:23 UTC (rev 710) @@ -35,7 +35,7 @@ #include <float.h> #endif -#ifdef HAVE__ISNAN +#if defined HAVE__ISNAN && ! defined HAVE_ISNAN #define isnan _isnan #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-05-23 06:57:19
|
Revision: 709 http://getdata.svn.sourceforge.net/getdata/?rev=709&view=rev Author: ketiltrout Date: 2012-05-23 06:57:07 +0000 (Wed, 23 May 2012) Log Message: ----------- Fixes for MSVC. Also added checkdirfile, the C++ test suite, and verbose debugging to the CMake rules. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/Makefile.am trunk/getdata/README.win trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/cxx/getdata/entry.h trunk/getdata/bindings/cxx/getdata/fragment.h trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/cmake/CMakeLists.txt trunk/getdata/cmake/bindings/cxx/CMakeLists.txt trunk/getdata/cmake/src/CMakeLists.txt trunk/getdata/cmake/test/CMakeLists.txt trunk/getdata/configure.ac trunk/getdata/src/add.c trunk/getdata/src/ascii.c trunk/getdata/src/bzip.c trunk/getdata/src/common.c trunk/getdata/src/compat.c trunk/getdata/src/constant.c trunk/getdata/src/encoding.c trunk/getdata/src/endian.c trunk/getdata/src/errors.c trunk/getdata/src/field_list.c trunk/getdata/src/flush.c trunk/getdata/src/getdata.c trunk/getdata/src/gzip.c trunk/getdata/src/internal.h trunk/getdata/src/lzma.c trunk/getdata/src/mod.c trunk/getdata/src/name.c trunk/getdata/src/nan.h trunk/getdata/src/parse.c trunk/getdata/src/putdata.c trunk/getdata/src/raw.c trunk/getdata/src/sie.c trunk/getdata/src/slim.c trunk/getdata/src/string.c trunk/getdata/src/types.c trunk/getdata/src/zzip.c trunk/getdata/src/zzslim.c trunk/getdata/test/add_meta.c trunk/getdata/test/add_meta_alias.c trunk/getdata/test/include_cb.c trunk/getdata/test/include_pc.c trunk/getdata/test/madd_affix.c trunk/getdata/test/madd_window.c trunk/getdata/test/open_cb_abort.c trunk/getdata/test/open_cb_cont.c trunk/getdata/test/open_cb_ignore.c trunk/getdata/test/open_cb_invalid.c trunk/getdata/test/open_cb_rescan.c trunk/getdata/test/parse_mplex_nomax.c trunk/getdata/test/slim_nframes.c trunk/getdata/test/test.h trunk/getdata/util/checkdirfile.c Added Paths: ----------- trunk/getdata/cmake/bindings/cxx/test/ trunk/getdata/cmake/bindings/cxx/test/CMakeLists.txt trunk/getdata/cmake/util/ trunk/getdata/cmake/util/CMakeLists.txt Property Changed: ---------------- trunk/getdata/README.win trunk/getdata/bindings/cxx/getdata/mplexentry.h trunk/getdata/bindings/cxx/getdata/windowentry.h trunk/getdata/bindings/cxx/internal.h trunk/getdata/bindings/cxx/mplexentry.cpp trunk/getdata/bindings/cxx/windowentry.cpp trunk/getdata/bindings/f77/test/test_getdata.f.in trunk/getdata/bindings/idl/package/Makefile.am trunk/getdata/bindings/idl/package/README trunk/getdata/bindings/idl/package/configure.ac trunk/getdata/bindings/perl/Build.PL.in trunk/getdata/bindings/perl/GetData.pm.in trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/MANIFEST.in trunk/getdata/bindings/perl/Makefile.am trunk/getdata/bindings/perl/funclist.pl trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/perl/test/callback.t trunk/getdata/bindings/perl/typemap trunk/getdata/doc/README.perl trunk/getdata/m4/perl.m4 trunk/getdata/man/gd_add_alias.3 trunk/getdata/man/gd_alias_target.3 trunk/getdata/man/gd_aliases.3 trunk/getdata/man/gd_alter_affixes.3 trunk/getdata/man/gd_desync.3 trunk/getdata/man/gd_entry_list.3 trunk/getdata/man/gd_error_count.3 trunk/getdata/man/gd_flags.3 trunk/getdata/man/gd_fragment_affixes.3 trunk/getdata/man/gd_hidden.3 trunk/getdata/man/gd_hide.3 trunk/getdata/man/gd_mplex_lookback.3 trunk/getdata/man/gd_naliases.3 trunk/getdata/man/gd_nentries.3 trunk/getdata/man/gd_seek.3 trunk/getdata/man/gd_tell.3 trunk/getdata/man/gd_verbose_prefix.3 trunk/getdata/man/make_html.pl trunk/getdata/src/fpos.c trunk/getdata/src/sie.c trunk/getdata/src/zzip.c trunk/getdata/src/zzslim.c trunk/getdata/test/add_affix.c trunk/getdata/test/add_alias.c trunk/getdata/test/add_alias_meta.c trunk/getdata/test/add_meta.c trunk/getdata/test/add_meta_alias.c trunk/getdata/test/add_mplex.c trunk/getdata/test/add_mplex_val.c trunk/getdata/test/add_raw_include.c trunk/getdata/test/add_resolv.c trunk/getdata/test/add_scalar_carray.c trunk/getdata/test/add_spec_resolv.c trunk/getdata/test/add_string_affix.c trunk/getdata/test/add_window.c trunk/getdata/test/add_window_op.c trunk/getdata/test/alias_list.c trunk/getdata/test/alias_list_alias.c trunk/getdata/test/alias_list_missing.c trunk/getdata/test/alias_num.c trunk/getdata/test/alias_num_alias.c trunk/getdata/test/alias_num_missing.c trunk/getdata/test/alias_target.c trunk/getdata/test/alias_target_alias.c trunk/getdata/test/alias_target_missing.c trunk/getdata/test/alter_crecip_zero.c trunk/getdata/test/alter_entry_affix.c trunk/getdata/test/alter_entry_hidden.c trunk/getdata/test/alter_mplex.c trunk/getdata/test/alter_mspec_affix.c trunk/getdata/test/alter_recip_zero.c trunk/getdata/test/alter_spec_affix.c trunk/getdata/test/alter_window.c trunk/getdata/test/ascii_add.c trunk/getdata/test/cvlist_array_hidden.c trunk/getdata/test/cvlist_array_meta_hidden.c trunk/getdata/test/cvlist_hidden.c trunk/getdata/test/cvlist_meta_hidden.c trunk/getdata/test/del_derived_after.c trunk/getdata/test/desync.c trunk/getdata/test/desync_flush.c trunk/getdata/test/desync_reopen.c trunk/getdata/test/desync_reopen_inv.c trunk/getdata/test/elist_alias.c trunk/getdata/test/elist_hidden.c trunk/getdata/test/elist_scalar.c trunk/getdata/test/endian_alter_sie.c trunk/getdata/test/entry_divide.c trunk/getdata/test/entry_mplex.c trunk/getdata/test/entry_mplex_scalar.c trunk/getdata/test/entry_recip.c trunk/getdata/test/entry_type_alias.c trunk/getdata/test/entry_window.c trunk/getdata/test/entry_window_scalar.c trunk/getdata/test/error_num.c trunk/getdata/test/error_verbose.c trunk/getdata/test/error_verbose_prefix.c trunk/getdata/test/flist_hidden.c trunk/getdata/test/flist_meta_hidden.c trunk/getdata/test/flist_type_hidden.c trunk/getdata/test/flist_type_meta_hidden.c trunk/getdata/test/fragment_affix.c trunk/getdata/test/fragment_affix_alter.c trunk/getdata/test/fragment_affix_alter2.c trunk/getdata/test/fragment_affix_dup.c trunk/getdata/test/fragment_index_alias.c trunk/getdata/test/get_here.c trunk/getdata/test/get_here_foffs.c trunk/getdata/test/get_heres.c trunk/getdata/test/get_lincom_null.c trunk/getdata/test/get_lincom_spf.c trunk/getdata/test/get_mplex.c trunk/getdata/test/get_mplex_lb.c trunk/getdata/test/get_mplex_lball.c trunk/getdata/test/get_mplex_nolb.c trunk/getdata/test/get_phase_affix.c trunk/getdata/test/get_rofs.c trunk/getdata/test/get_window.c trunk/getdata/test/get_window_clr.c trunk/getdata/test/get_window_ge.c trunk/getdata/test/get_window_gt.c trunk/getdata/test/get_window_le.c trunk/getdata/test/get_window_lt.c trunk/getdata/test/get_window_ne.c trunk/getdata/test/get_window_set.c trunk/getdata/test/global_flags.c trunk/getdata/test/gzip_add.c trunk/getdata/test/gzip_get_put.c trunk/getdata/test/gzip_move_to.c trunk/getdata/test/gzip_put_get.c trunk/getdata/test/hide.c trunk/getdata/test/hide_hidden.c trunk/getdata/test/hide_unhide.c trunk/getdata/test/include_affix.c trunk/getdata/test/madd_affix.c trunk/getdata/test/madd_alias.c trunk/getdata/test/madd_index.c trunk/getdata/test/madd_mplex.c trunk/getdata/test/madd_spec_resolv.c trunk/getdata/test/madd_window.c trunk/getdata/test/move_affix.c trunk/getdata/test/move_affix_dup.c trunk/getdata/test/move_alias.c trunk/getdata/test/name_affix.c trunk/getdata/test/name_affix_bad.c trunk/getdata/test/name_after.c trunk/getdata/test/name_after_const.c trunk/getdata/test/name_dup.c trunk/getdata/test/name_update.c trunk/getdata/test/name_update_const.c trunk/getdata/test/nentries_alias.c trunk/getdata/test/nentries_hidden.c trunk/getdata/test/nentries_scalar.c trunk/getdata/test/nfields_hidden.c trunk/getdata/test/nfields_type_hidden.c trunk/getdata/test/nfields_vector_hidden.c trunk/getdata/test/nmeta_hidden.c trunk/getdata/test/nmeta_type_hidden.c trunk/getdata/test/nmeta_vectors_hidden.c trunk/getdata/test/open_abs.c trunk/getdata/test/parse_alias.c trunk/getdata/test/parse_alias_code.c trunk/getdata/test/parse_alias_dup.c trunk/getdata/test/parse_alias_meta.c trunk/getdata/test/parse_alias_missing.c trunk/getdata/test/parse_hidden.c trunk/getdata/test/parse_hidden_field.c trunk/getdata/test/parse_hidden_meta.c trunk/getdata/test/parse_include_absolute.c trunk/getdata/test/parse_include_absrel.c trunk/getdata/test/parse_include_loop.c trunk/getdata/test/parse_include_prefix.c trunk/getdata/test/parse_include_prefix_dup.c trunk/getdata/test/parse_include_preprefix.c trunk/getdata/test/parse_include_relabs.c trunk/getdata/test/parse_include_relrel.c trunk/getdata/test/parse_include_suffix.c trunk/getdata/test/parse_include_sufsuffix.c trunk/getdata/test/parse_malias.c trunk/getdata/test/parse_malias_dup.c trunk/getdata/test/parse_malias_meta.c trunk/getdata/test/parse_meta_affix.c trunk/getdata/test/parse_meta_alias.c trunk/getdata/test/parse_meta_implicit_affix.c trunk/getdata/test/parse_meta_jump.c trunk/getdata/test/parse_meta_malias.c trunk/getdata/test/parse_meta_meta.c trunk/getdata/test/parse_mplex.c trunk/getdata/test/parse_mplex_ncols.c trunk/getdata/test/parse_mplex_nomax.c trunk/getdata/test/parse_mplex_scalar.c trunk/getdata/test/parse_version_89.c trunk/getdata/test/parse_version_98.c trunk/getdata/test/parse_version_p8.c trunk/getdata/test/parse_version_p9.c trunk/getdata/test/parse_window.c trunk/getdata/test/parse_window_ncols.c trunk/getdata/test/parse_window_op.c trunk/getdata/test/parse_window_scalar.c trunk/getdata/test/put_here.c trunk/getdata/test/put_heres.c trunk/getdata/test/put_mplex.c trunk/getdata/test/put_window.c trunk/getdata/test/put_zero.c trunk/getdata/test/seek64.c trunk/getdata/test/seek_cur.c trunk/getdata/test/seek_end.c trunk/getdata/test/seek_foffs.c trunk/getdata/test/seek_set.c trunk/getdata/test/sie_get_big.c trunk/getdata/test/sie_get_little.c trunk/getdata/test/sie_move_from.c trunk/getdata/test/sie_move_to.c trunk/getdata/test/sie_nframes_big.c trunk/getdata/test/sie_nframes_little.c trunk/getdata/test/sie_put_big.c trunk/getdata/test/sie_put_little.c trunk/getdata/test/spf_alias.c trunk/getdata/test/spf_alias_meta.c trunk/getdata/test/spf_alias_missing.c trunk/getdata/test/svlist_hidden.c trunk/getdata/test/svlist_meta_hidden.c trunk/getdata/test/tell.c trunk/getdata/test/tell64.c trunk/getdata/test/trunc_dir.c trunk/getdata/test/trunc_truncsub.c trunk/getdata/test/version_9.c trunk/getdata/test/version_9_strict.c trunk/getdata/test/version_9_write.c trunk/getdata/test/vlist_alias.c trunk/getdata/test/vlist_hidden.c trunk/getdata/test/vlist_meta_hidden.c trunk/getdata/test/zzip_data.c trunk/getdata/test/zzip_get.c trunk/getdata/test/zzip_get_get.c trunk/getdata/test/zzip_nframes.c trunk/getdata/test/zzslim_get.c trunk/getdata/test/zzslim_nframes.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/ChangeLog 2012-05-23 06:57:07 UTC (rev 709) @@ -1,3 +1,34 @@ +2012-05-22 D. V. Wiebe <ge...@ke...> svn:706 + * cmake/CMakeLists.txt: Update definitons. Support GD_UTIL. + * cmake/test/CMakeLists.txt: Update the list of excluded tests. + * cmake/src/CMakeLists.txt: Support GD_DEBUG and conditionally build debug.c. + * cmake/bindings/cxx/CMakeLists.txt: Support GD_TEST. + * cmake/util/CMakeLists.txt cmake/bindings/cxx/test/CMakeLists.txt: Added. + + * src/internal.h: Define PRNsize_t and PRNssize_t to get around printf()s + which don't recognise the "z" length modifier. Changed everywhere. Handle + basename, offsetof, strtod. + + * src/compat.c (basename gd_strtod): Added. + * src/parse.c (_GD_SetScalar) src/nan.h: Call gd_strtod. + + * README.win: Update. + + * bindings/cxx/test/big_test.cpp: Tweak includes to allow compilation with + MSVC. + + * bindings/cxx/getdata/entry.h bindings/cxx/getdata/fragment.h: Include + dirfile.h. + + * test/include_cb.c test/madd_window.c test/open_cb_cont.c + test/open_cb_invalid.c test/include_pc.c test/test.h test/open_cb_rescan.c + test/open_cb_abort.c test/open_cb_ignore.c: Tweak for compilation with MSVC. + + * test/add_meta_alias.c test/madd_affix.c test/parse_mplex_nomax.c + test/add_meta.c: Fix gd_entry_t access. + + * util/checkdirfile.c: Preprocessor fixes for compilation with MSVC. + 2012-04-21 D. V. Wiebe <ge...@ke...> svn:706 GetData-0.8.0rc1: Modified: trunk/getdata/Makefile.am =================================================================== --- trunk/getdata/Makefile.am 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/Makefile.am 2012-05-23 06:57:07 UTC (rev 709) @@ -82,7 +82,7 @@ mkdir $(distdir)/man && \ cp ../man/*[35].html $(distdir)/man && \ cp -r bindings/cxx $(distdir)/bindings && \ - cp -r cmake src test $(distdir) && \ + cp -r cmake util src test $(distdir) && \ $(SED) cmake/CMakeLists.txt \ -e 's/-DPACKAGE_VERSION=\\".*\\"/-DPACKAGE_VERSION=\\"$(PACKAGE_VERSION)\\"/' \ > $(distdir)/cmake/CMakeLists.txt && \ Modified: trunk/getdata/README.win =================================================================== --- trunk/getdata/README.win 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/README.win 2012-05-23 06:57:07 UTC (rev 709) @@ -4,21 +4,12 @@ The GetData Project is the reference implementation of the Dirfile Standards. The Dirfile database format is designed to provide a fast, simple format for storing and reading binary time-ordered data. The Dirfile Standards are -described in detail in three Unix manual pages distributed with this package: -dirfile(5), dirfile-format(5) and dirfile-encoding(5), which may be read before -installation by running: +described in detail in three manual pages distributed with this package: - $ man man/dirfile.5 - $ man man/dirfile-format.5 - $ man man/dirfile-encoding.5 + man/dirfile.5.html + man/dirfile-format.5.html + man/dirfile-encoding.5.html -from the top GetData Project directory (the directory containing this README -file). After installation, they can be read with the standard man command: - - $ man dirfile - $ man dirfile-format - $ man dirfile-encoding - More information on the GetData Project and the Dirfile database format may be found on the World Wide Web: @@ -98,30 +89,44 @@ BUILDING THE LIBRARY ==================== -This package may be built using Kitware's CMake build system. Consult the CMake +This package may be built using Kitware's CMake build system. Consult the CMake documentation for generic instructions on using CMake. A brief summary follows. -This package supports building GetData using either Microsoft's Visual C++ compiler -or else the free MinGW compiler, both which produce native Win32 binaries. +This package supports building GetData using either Microsoft's Visual C++ +compiler or else the free MinGW compiler, both which produce native Win32 +binaries. -Best practice is to build out of source. Call CMake in the build folder and -point it to the 'cmake' folder within the GetData source. For instance, -to create a project file for Microsoft Visual Studio 10 execute: +Best practice is to build outside the source tree. Call CMake in the build +folder and point it to the 'cmake' folder within the GetData source. For +instance, to create a project file for Microsoft Visual Studio 10 execute: - cmake -G"Visual Studio 10" ..\getdata-0.7\cmake + cmake -G"Visual Studio 10" ..\getdata-0.8\cmake Then build the project as usual. -The GetData test suit could be ebabled by setting the GD_TEST variable: +This package comes with a few utility programs in the util subdirectory. They +can be optionally built by setting the GD_UTIL variable: - cmake . -DGD_TEST=1 + cmake <path> -DGD_UTIL=1 +The GetData test suit can be ebabled by setting the GD_TEST variable: + + cmake <path> -DGD_TEST=1 + In Visual Studio run the test by building the 'RUN_TESTS'. Using mingw or nmake run the tests by calling ctest. -The install path could be set via the variable CMAKE_INSTALL_PREFIX. +Verbose debugging output can be turned on by setting the GD_DEBUG variable: + + cmake <path> -DGD_DEBUG=1 + +These debugging messages are typically only useful to people debugging GetData +itself. For release builds of GetData it should usually be left off, as they may +have a negative performance impact. + +The install path can be set via the variable CMAKE_INSTALL_PREFIX. By default it installs to <build-dir>/INSTALLED. -The file cmake/FindGetData.cmake could be used in projects managed by +The file cmake/FindGetData.cmake may be used in projects managed by CMake and which have to search for a GetData installation. Property changes on: trunk/getdata/README.win ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-05-23 06:57:07 UTC (rev 709) @@ -22,6 +22,10 @@ #ifndef GETDATA_DIRFILE_H #define GETDATA_DIRFILE_H +#ifndef _FILE_OFFSET_BITS +# define _FILE_OFFSET_BITS 64 +#endif + // We don't want the legacy API since its symbols clash with us. #ifndef GD_NO_LEGACY_API # define GD_NO_LEGACY_API Modified: trunk/getdata/bindings/cxx/getdata/entry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/entry.h 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/bindings/cxx/getdata/entry.h 2012-05-23 06:57:07 UTC (rev 709) @@ -22,21 +22,7 @@ #ifndef GETDATA_ENTRY_H #define GETDATA_ENTRY_H -#ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 -#endif - -#ifndef GD_NO_LEGACY_API -# define GD_NO_LEGACY_API -#endif -#ifndef GD_C89_API -# define GD_C89_API -#endif - -extern "C" { -#include <getdata.h> -} - +#include <getdata/dirfile.h> #include <complex> namespace GetData { Modified: trunk/getdata/bindings/cxx/getdata/fragment.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/fragment.h 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/bindings/cxx/getdata/fragment.h 2012-05-23 06:57:07 UTC (rev 709) @@ -22,23 +22,9 @@ #ifndef GETDATA_FRAGMENT_H #define GETDATA_FRAGMENT_H -#ifndef _FILE_OFFSET_BITS -# define _FILE_OFFSET_BITS 64 -#endif - -#ifndef GD_NO_LEGACY_API -# define GD_NO_LEGACY_API -#endif -#ifndef GD_C89_API -# define GD_C89_API -#endif - -extern "C" { -#include <getdata.h> -} +#include <getdata/dirfile.h> #include <sys/types.h> - namespace GetData { enum EncodingScheme { Property changes on: trunk/getdata/bindings/cxx/getdata/mplexentry.h ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/cxx/getdata/windowentry.h ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/cxx/internal.h ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/cxx/mplexentry.cpp ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-05-23 06:57:07 UTC (rev 709) @@ -24,16 +24,26 @@ #undef GETDATA_LEGACY_API #include "getdata/dirfile.h" +#include "internal.h" + #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> #include <string.h> #include <errno.h> -#include <unistd.h> #include <iostream> #include <math.h> +#include <stdlib.h> #include <stdio.h> +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif + +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + #if MKDIR_NO_MODE #ifdef HAVE__MKDIR #define mkdir(f,m) _mkdir(f) Property changes on: trunk/getdata/bindings/cxx/windowentry.cpp ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/f77/test/test_getdata.f.in ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/idl/package/Makefile.am ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/idl/package/README ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/idl/package/configure.ac ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/Build.PL.in ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/GetData.pm.in ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/GetData.xs ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/MANIFEST.in ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/Makefile.am ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/funclist.pl ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/simple_funcs.pl ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/simple_funcs.xsin ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/test/big_test.t ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/test/callback.t ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/bindings/perl/typemap ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/cmake/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -3,135 +3,146 @@ project(getdata) -#set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) + +set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) if(NOT GD_DIR) - set(GD_DIR ${CMAKE_SOURCE_DIR}/..) + set(GD_DIR ${CMAKE_SOURCE_DIR}/..) endif() macro(GD_FILES name folder) - file(GLOB ${name}_folder_sources ${GD_DIR}/${folder}/*.c) - file(GLOB ${name}_folder_sources_cpp ${GD_DIR}/${folder}/*.cpp) - file(GLOB ${name}_folder_headers ${GD_DIR}/${folder}/*.h) - set(${name}_sources ${${name}_sources} ${${name}_folder_sources} ${${name}_folder_sources_cpp}) - set(${name}_headers ${${name}_headers} ${${name}_folder_headers}) - include_directories(${CMAKE_SOURCE_DIR}/${folder}) + file(GLOB ${name}_folder_sources ${GD_DIR}/${folder}/*.c) + file(GLOB ${name}_folder_sources_cpp ${GD_DIR}/${folder}/*.cpp) + file(GLOB ${name}_folder_headers ${GD_DIR}/${folder}/*.h) + set(${name}_sources ${${name}_sources} ${${name}_folder_sources} ${${name}_folder_sources_cpp}) + set(${name}_headers ${${name}_headers} ${${name}_folder_headers}) + include_directories(${CMAKE_SOURCE_DIR}/${folder}) endmacro() #TODO add configure add_definitions( - -DPACKAGE_NAME=\"GetData\" - -DPACKAGE_VERSION=\"0.8.0\" - -DPACKAGE_BUGREPORT=\"get...@li...\") + -DPACKAGE_NAME=\"GetData\" + -DPACKAGE_VERSION=\"0.8.0\" + -DPACKAGE_BUGREPORT=\"get...@li...\" + -DUNALIGNED_ACCESS_OK + ) - - - # kst2 doesn't need the legacy API set(DEFINE_GD_LEGACY_API "/* #undef GD_LEGACY_API */") -# MSVCRT integer types - - - if(MSVC) - ## Substitutions needed to build getdata.h - # build in ANSI C mode - set(DEFINE_GD_NO_C99_API "#define GD_NO_C99_API") + ## Substitutions needed to build getdata.h + # build in ANSI C mode + set(DEFINE_GD_NO_C99_API "#define GD_NO_C99_API") - set(DEFINE_gd_int64_t "#define gd_int64_t __int64") - set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") + # MSVCRT integer types + set(DEFINE_gd_int64_t "#define gd_int64_t __int64") + set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") - add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) - add_definitions( - -D__MSVCRT__ - -D_USE_MATH_DEFINES - -DHAVE_DIRENT_H - -DHAVE_DIRECT_H + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) + add_definitions( + -D__MSVCRT__ + -D_USE_MATH_DEFINES + -DHAVE__CHSIZE + -DHAVE__COMMIT + -DHAVE__FSTAT64 + -DHAVE__GETCWD + -DHAVE__ISNAN + -DHAVE__MKDIR + -DHAVE__RMDIR + -DHAVE__SNPRINTF + -DHAVE__STAT64 + -DHAVE__STRTOI64 + -DHAVE__STRTOUI64 + -DHAVE_DIRENT_H + -DHAVE_DIRECT_H -DHAVE_FCNTL_H - -DHAVE_LIBGEN_H - -DSTDC_HEADERS - -DHAVE_INTTYPES_H - -DHAVE_IO_H - -DHAVE_STDINT_H + -DHAVE_FLOAT_H + -DHAVE_LIBGEN_H + -DSTDC_HEADERS + -DHAVE_INTTYPES_H + -DHAVE_IO_H + -DHAVE_STDINT_H + -DHAVE_STRUCT___STAT64 -DHAVE_SYS_STAT_H - -DHAVE__STAT64 - -DHAVE_STRUCT__STAT64 - -DHAVE__COMMIT - -DHAVE__STRTOI64 - -DHAVE__STRTOUI64 - -DHAVE__GETCWD -DGD_DIRSEP='\\\\' + -DMKDIR_NO_MODE -Drestrict= -DSIZEOF_INT=4 -DSIZEOF_UNSIGNED_INT=4 - ) - set(CMAKE_DEBUG_POSTFIX d) - - # ANSI C - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Za") - - # Suppress warnings - string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") - - include_directories(${GD_DIR}/src/msvc) + ) + set(CMAKE_DEBUG_POSTFIX d) + + # ANSI C + #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Za") + + # Suppress warnings + string(REGEX REPLACE "/W[0-4]" "/W0" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}") + + include_directories(${GD_DIR}/src/msvc) endif() if(MINGW) - set(DEFINE_gd_int16_t "#define gd_int16_t __int16") - set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned __int16") - set(DEFINE_gd_int64_t "#define gd_int64_t __int64") - set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") + set(DEFINE_gd_int16_t "#define gd_int16_t __int16") + set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned __int16") + set(DEFINE_gd_int64_t "#define gd_int64_t __int64") + set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") - add_definitions( - -D__MSVCRT__ - -D__MSVCRT_VERSION__=0x0601 - -DSTDC_HEADERS - -DHAVE_IO_H - -DHAVE_STDINT_H - -DHAVE_COMPLEX_H - -DHAVE_OFF64_T - -DHAVE_LIBGEN_H - -DHAVE_STRTOLL - -DHAVE_DIRENT_H - -DHAVE_DIRECT_H - -DHAVE__COMMIT - -DHAVE__STAT64 - -DHAVE__STRTOI64 - -DHAVE__STRTOUI64 - -DHAVE_STRUCT___STAT64 - -DHAVE__GETCWD - -DMKDIR_NO_MODE - -DHAVE_SYS_FILE_H - -DHAVE_SYS_STAT_H - -DHAVE_DIRENT_H - -DS_IFLNK=0xa000 - -DHAVE_DECL_OFFSETOF - -DHAVE__CHSIZE - -DGD_DIRSEP=0x53 - ) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + add_definitions( + -D__MSVCRT__ + -D__MSVCRT_VERSION__=0x0601 + -DSTDC_HEADERS + -DHAVE_IO_H + -DHAVE_STDINT_H + -DHAVE_COMPLEX_H + -DHAVE_OFF64_T + -DHAVE_LIBGEN_H + -DHAVE_STRTOLL + -DHAVE_DIRENT_H + -DHAVE_DIRECT_H + -DHAVE__COMMIT + -DHAVE__STAT64 + -DHAVE__STRTOI64 + -DHAVE__STRTOUI64 + -DHAVE_STRUCT___STAT64 + -DHAVE__GETCWD + -DMKDIR_NO_MODE + -DHAVE_SYS_FILE_H + -DHAVE_SYS_STAT_H + -DHAVE_DIRENT_H + -DS_IFLNK=0xa000 + -DHAVE_DECL_OFFSETOF + -DHAVE__CHSIZE + -DGD_DIRSEP=0x53 + ) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") endif() +if(GD_TEST) + enable_testing() +endif() configure_file(${GD_DIR}/src/getdata.h.in ${CMAKE_BINARY_DIR}/getdata.h @ONLY) include_directories(${GD_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/INSTALLED CACHE PATH "install path" FORCE) + set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR}/INSTALLED CACHE PATH "install path" FORCE) endif() add_subdirectory(src) add_subdirectory(bindings) +if(GD_UTIL) + add_subdirectory(util) +endif() + if(GD_TEST) - enable_testing() - add_subdirectory(test) + add_subdirectory(test) endif() Modified: trunk/getdata/cmake/bindings/cxx/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/bindings/cxx/CMakeLists.txt 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/cmake/bindings/cxx/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -15,3 +15,7 @@ install(FILES ${h_headers} DESTINATION include/getdata) install(TARGETS ${GD_CXX} DESTINATION lib) + +if (GD_TEST) + add_subdirectory(test) +endif() Added: trunk/getdata/cmake/bindings/cxx/test/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/bindings/cxx/test/CMakeLists.txt (rev 0) +++ trunk/getdata/cmake/bindings/cxx/test/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -0,0 +1,5 @@ +project(GetDataTests) + +add_executable(cxx_test_big_test ${GD_DIR}/bindings/cxx/test/big_test.cpp) +target_link_libraries(cxx_test_big_test ${GD_CXX} getdata) +add_test(NAME cxx_test_big_test COMMAND cxx_test_big_test) Property changes on: trunk/getdata/cmake/bindings/cxx/test/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/cmake/src/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/src/CMakeLists.txt 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/cmake/src/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -1,7 +1,6 @@ set(files_ignored ${GD_DIR}/src/bzip.c - ${GD_DIR}/src/debug.c ${GD_DIR}/src/gzip.c ${GD_DIR}/src/lzma.c ${GD_DIR}/src/legacy.c @@ -24,6 +23,14 @@ add_definitions(-DGD_C89_API) endif() +if(GD_DEBUG) + add_definitions(-DGETDATA_DEBUG) +else() + set(files_ignored + ${files_ignored} + ${GD_DIR}/src/debug.c + ) +endif() list(REMOVE_ITEM gd_sources ${files_ignored}) Modified: trunk/getdata/cmake/test/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/test/CMakeLists.txt 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/cmake/test/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -3,59 +3,55 @@ GD_FILES(gd test) add_definitions(-DGD_C89_API) - + set(tests_ignored - bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put - gzip_get gzip_get_get gzip_move_from gzip_nframes gzip_put - lzma_get lzma_nframes - legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf - open_eaccess - slim_get slim_nframes slim_put - trunc_rofs - xz_get xz_nframes - ) - + bzip_get bzip_get_get bzip_move_from bzip_nframes bzip_put + gzip_add gzip_get gzip_get_get gzip_get_put gzip_move_from gzip_move_to gzip_nframes gzip_put gzip_put_get + lzma_get lzma_nframes + legacy_get legacy_get_put legacy_get_rofs legacy_nframes legacy_nonexistent legacy_put legacy_spf + open_eaccess + slim_get slim_nframes slim_put + trunc_rofs + xz_get xz_nframes + zzip_data zzip_get zzip_get_get zzip_nframes + zzslim_get zzslim_nframes + ) + if(MSVC) - set(tests_ignored - ${tests_ignored} - endian_alter endian_get endian_move - get64 get_uint64 get_endian64 get_int64 get_off64 - include_cb include_pc - index_domain index_range - move_data_endian - nframes64 - open_cb_abort open_cb_cont open_cb_ignore open_cb_invalid open_cb_rescan - put64 put_endian64 put_off64 - ) + set(tests_ignored + ${tests_ignored} + desync desync_flush desync_reopen desync_reopen_inv + error_verbose error_verbose_prefix + get64 get_uint64 get_endian64 get_int64 get_off64 + nframes64 + put64 put_endian64 put_off64 + seek64 + tell64 + ) endif() - if(MINGW) - set(tests_ignored - ${tests_ignored} - add_crecip89 - alter_crecip89 - endian_alter endian_get endian_move - header_complex - madd_crecip89 - move_data_endian - ) + set(tests_ignored + ${tests_ignored} + add_crecip89 + alter_crecip89 + endian_alter endian_get endian_move + header_complex + madd_crecip89 + move_data_endian + ) endif() foreach(_item ${tests_ignored}) - list(REMOVE_ITEM gd_sources ${GD_DIR}/test/${_item}.c) + list(REMOVE_ITEM gd_sources ${GD_DIR}/test/${_item}.c) endforeach() - #set(gd_sources ${GD_DIR}/test/parse_include_relabs.c) foreach(_test ${gd_sources}) - get_filename_component(testname ${_test} NAME_WE) - set(testname test_${testname}) - add_executable(${testname} ${_test}) - target_link_libraries(${testname} getdata) - add_test(NAME ${testname} COMMAND ${testname}) + get_filename_component(testname ${_test} NAME_WE) + set(testname test_${testname}) + add_executable(${testname} ${_test}) + target_link_libraries(${testname} getdata) + add_test(NAME ${testname} COMMAND ${testname}) endforeach() - - - Added: trunk/getdata/cmake/util/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/util/CMakeLists.txt (rev 0) +++ trunk/getdata/cmake/util/CMakeLists.txt 2012-05-23 06:57:07 UTC (rev 709) @@ -0,0 +1,11 @@ +include_directories(${GD_DIR}/util) + +add_executable(checkdirfile ${GD_DIR}/util/checkdirfile.c) +target_link_libraries(checkdirfile getdata) +install(TARGETS checkdirfile DESTINATION bin) + +## dirfile2ascii uses getopt_long.... +# +#add_executable(dirfile2ascii ${GD_DIR}/util/dirfile2ascii.c) +#target_link_libraries(dirfile2ascii getdata) +#install(TARGETS dirfile2ascii DESTINATION bin) Property changes on: trunk/getdata/cmake/util/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/configure.ac 2012-05-23 06:57:07 UTC (rev 709) @@ -548,9 +548,9 @@ echo "*** Looking for additional header files" echo AC_CHECK_HEADERS([asm/unaligned.h Availability.h byteswap.h direct.h fcntl.h \ - inttypes.h io.h libgen.h libkern/OSByteOrder.h stddef.h \ - stdint.h sys/endian.h sys/file.h sys/param.h sys/stat.h \ - sys/types.h sys/wait.h unistd.h]) + float.h inttypes.h io.h libgen.h libkern/OSByteOrder.h \ + stddef.h stdint.h sys/endian.h sys/file.h sys/param.h \ + sys/stat.h sys/types.h sys/wait.h unistd.h]) if test "x$disable_c99" = "xno"; then AC_CHECK_HEADERS([complex.h]) fi @@ -696,13 +696,14 @@ echo echo "*** Looking for additional library functions" echo -AC_CHECK_FUNCS([_chsize _chsize_s _commit fchmod _fdopen fdopendir fpathconf \ - fseeko fseeko64 _fstat fstat64 _fstat64 fstatat fstatat64 \ - fsync ftello ftello64 ftruncate ftruncate64 getcwd _getcwd \ - getdelim gmtime_r lseek64 _lseeki64 lstat lstat64 _mkdir \ - mkfifo nan _open openat pathconf _read readdir_r readlink \ - renameat _rmdir snprintf _snprintf stat64 _stat64 _strtoi64 \ - strtoll _strtoui64 strtoull _unlink unlinkat _write]) +AC_CHECK_FUNCS([basename _chsize _chsize_s _commit fchmod _fdopen fdopendir \ + fpathconf fseeko fseeko64 _fstat fstat64 _fstat64 fstatat \ + fstatat64 fsync ftello ftello64 ftruncate ftruncate64 getcwd \ + _getcwd getdelim gmtime_r _isnan lseek64 _lseeki64 lstat \ + lstat64 _mkdir mkfifo nan _open openat pathconf _read \ + readdir_r readlink renameat _rmdir snprintf _snprintf stat64 \ + _stat64 _strtoi64 strtoll _strtoui64 strtoull _unlink unlinkat \ + _write]) if test "x$disable_c99" = "xno"; then AC_CHECK_FUNCS([cabs]) fi @@ -749,13 +750,6 @@ #endif ]) -AC_CHECK_DECLS([offsetof],,, - [ -#ifdef HAVE_STDDEF_H -#include <stddef.h> -#endif -]) - AC_CHECK_DECLS([get_unaligned, put_unaligned],,, [ #ifdef HAVE_ASM_UNALIGNED_H Property changes on: trunk/getdata/doc/README.perl ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/m4/perl.m4 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_add_alias.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_alias_target.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_aliases.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_alter_affixes.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_desync.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_entry_list.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_error_count.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_flags.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_fragment_affixes.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_hidden.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_hide.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_mplex_lookback.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_naliases.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_nentries.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_seek.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_tell.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/gd_verbose_prefix.3 ___________________________________________________________________ Added: svn:eol-style + native Property changes on: trunk/getdata/man/make_html.pl ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/add.c 2012-05-23 06:57:07 UTC (rev 709) @@ -1287,8 +1287,8 @@ gd_entry_t *entry; gd_entry_t C; - dtrace("%p, \"%s\", 0x%X, %zi, 0x%X, %p, %i", D, field_code, const_type, - array_len, data_type, values, fragment_index); + dtrace("%p, \"%s\", 0x%X, %" PRNsize_t ", 0x%X, %p, %i", D, field_code, + const_type, array_len, data_type, values, fragment_index); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -1883,8 +1883,8 @@ gd_entry_t *entry; gd_entry_t C; - dtrace("%p, \"%s\", \"%s\", 0x%X, %zi 0x%X, %p", D, parent, field_code, - const_type, array_len, data_type, values); + dtrace("%p, \"%s\", \"%s\", 0x%X, %" PRNsize_t ", 0x%X, %p", D, parent, + field_code, const_type, array_len, data_type, values); if (D->flags & GD_INVALID) {/* don't crash */ _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/ascii.c =================================================================== --- trunk/getdata/src/ascii.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/ascii.c 2012-05-23 06:57:07 UTC (rev 709) @@ -148,7 +148,7 @@ short int i16; #endif - dtrace("%p, %p, 0x%X, %zu", file, ptr, data_type, nmemb); + dtrace("%p, %p, 0x%X, %" PRNsize_t, file, ptr, data_type, nmemb); _GD_ScanFormat(fmt, data_type); if (data_type & GD_COMPLEX) { @@ -207,7 +207,7 @@ ssize_t ret = 0; size_t n = 0; - dtrace("%p, %p, 0x%X, %zu", file, ptr, data_type, nmemb); + dtrace("%p, %p, 0x%X, %" PRNsize_t, file, ptr, data_type, nmemb); switch(data_type) { case GD_UINT8: Modified: trunk/getdata/src/bzip.c =================================================================== --- trunk/getdata/src/bzip.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/bzip.c 2012-05-23 06:57:07 UTC (rev 709) @@ -172,7 +172,7 @@ struct gd_bzdata *ptr = (struct gd_bzdata *)file->edata; unsigned long long nbytes = nmemb * GD_SIZE(data_type); - dtrace("%p, %p, 0x%X, %zu", file, data, data_type, nmemb); + dtrace("%p, %p, 0x%X, %" PRNsize_t, file, data, data_type, nmemb); while (nbytes > (unsigned long long)(ptr->end - ptr->pos)) { int n; Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/common.c 2012-05-23 06:57:07 UTC (rev 709) @@ -59,7 +59,7 @@ if (len != -1) { - dreturn("\"%s\" (%zu)", line, *n); + dreturn("\"%s\" (%" PRNsize_t ")", line, *n); return line; /* a line was read */ } @@ -185,7 +185,7 @@ { void* ptr = NULL; - dtrace("%p, 0x%x, %zu", D, type, n); + dtrace("%p, 0x%x, %" PRNsize_t, D, type, n); if (n == 0) { _GD_InternalError(D); dreturn("%p", NULL); @@ -387,7 +387,7 @@ static size_t _GD_GetIndex(double x, const struct _gd_lut *lut, size_t idx, size_t n) { - dtrace("%g, %p, %zu, %zu", x, lut, idx, n); + dtrace("%g, %p, %" PRNsize_t ", %" PRNsize_t, x, lut, idx, n); /* Just linearly search - we're probably right to start */ /* increment until we are bigger */ @@ -398,7 +398,7 @@ while ((idx > 0) && (x < lut[idx].x)) idx--; - dreturn("%zu", idx); + dreturn("%" PRNsize_t, idx); return idx; } @@ -480,7 +480,7 @@ size_t i; double x; - dtrace("%p, %p, 0x%x, %i, %p, %zu, %p, %zu", D, data, type, complex_table, + dtrace("%p, %p, 0x%x, %i, %p, %" PRNsize_t ", %p, %" PRNsize_t, D, data, type, complex_table, data_in, npts, lut, n_ln); switch (type) { @@ -574,7 +574,7 @@ { size_t i; - dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %zu", D, n, data1, return_type, + dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, return_type, data2, data3, m, b, spf, n_read); switch(return_type) { @@ -683,7 +683,7 @@ { size_t i; - dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %zu", D, n, data1, return_type, + dtrace("%p, %i, %p, 0x%x, %p, %p, %p, %p, %p, %" PRNsize_t, D, n, data1, return_type, data2, data3, m, b, spf, n_read); switch(return_type) { @@ -729,7 +729,7 @@ { size_t i; - dtrace("%p, %p, 0x%x, %g, %zu", D, data, return_type, dividend, n_read); + dtrace("%p, %p, 0x%x, %g, %" PRNsize_t, D, data, return_type, dividend, n_read); switch(return_type) { case GD_NULL: break; @@ -785,7 +785,7 @@ { size_t i; - dtrace("%p, %p, 0x%x, %g;%g, %zu", D, data, return_type, creal(dividend), + dtrace("%p, %p, 0x%x, %g;%g, %" PRNsize_t, D, data, return_type, creal(dividend), cimag(dividend), n_read); switch(return_type) { Modified: trunk/getdata/src/compat.c =================================================================== --- trunk/getdata/src/compat.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/compat.c 2012-05-23 06:57:07 UTC (rev 709) @@ -1,4 +1,4 @@ -/* Copyright (C) 2010, 2011 D. V. Wiebe +/* Copyright (C) 2010, 2011, 2012 D. V. Wiebe * *************************************************************************** * @@ -155,7 +155,7 @@ { char *ptr; - dtrace("%i, %p, %zu", errnum, buf, buflen); + dtrace("%i, %p, %" PRNsize_t, errnum, buf, buflen); ptr = strerror(errnum); strncpy(buf, ptr, buflen); @@ -184,7 +184,7 @@ if (*lineptr == NULL || *n == 0) { *lineptr = (char *)malloc(*n = 100); if (*lineptr == NULL) { - dreturn("%i)", -1); + dreturn("%i", -1); return -1; } } @@ -198,7 +198,7 @@ if (nread == 0) { /* this is an error or EOF with no data read */ - dreturn("%i)", -1); + dreturn("%i", -1); return -1; } @@ -281,6 +281,21 @@ } #endif +#ifndef HAVE_BASENAME +char *basename(char *path) +{ + char *last_elem, *ptr; + + last_elem = path; + + for (ptr = path; *ptr; ++ptr) + if ((*ptr == '/' || *ptr == GD_DIRSEP) && *(ptr + 1)) + last_elem = ptr + 1; + + return last_elem; +} +#endif + /* emulate readdir_r(3) with non-threadsafe readdir(3) */ #ifndef HAVE_READDIR_R int _GD_ReadDir(DIR *dirp, struct dirent *entry, struct dirent **result) @@ -307,3 +322,131 @@ return 0; } #endif + +/* the MSVCRT's strtod isn't POSIX compliant */ +#ifdef __MSVCRT__ +double gd_strtod(const char *nptr, char **endptr) +{ + const char *ptr = nptr; + double r; + long int li; + int sign = 0; + + dtrace("\"%s\", %p", nptr, endptr); + + /* the basic problem here is that MSVCRT's strtod() doesn't properly covert + * octal or hexadecimal numbers, nor does it do the special values "INF" and + * "NAN. So, we have to check for those first. For the first two, we then + * run it through strtol instead (which does do octal and hex fine in the + * MSVCRT) and then cast back to double. For the other two we're on our own. + */ + + /* skip sign */ + if (*ptr == '+' || *ptr == '-') { + if (ptr == '-') + sign = 0x80; + ptr++; + } + + /* check for octal "0[0-7]..." or hex ("0[Xx][0-9A-Fa-f]...") */ + if (*ptr == '0') { + switch (*(ptr + 1)) { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case 'x': + case 'X': + li = strtol(nptr, endptr, 0); + dreturn("%li", li); + return (double)li; + } + } else if ((*ptr | 0x20) == 'n') { + if (((*(ptr + 1) | 0x20) == 'a') && ((*(ptr + 2) | 0x20) == 'n')) { + /* an IEEE-754 double-precision quiet NaN: + * + * 1111 1111 1111 1111 1111 1111 1111 1111 + * 1111 1111 1111 1111 1111 1111 1111 1111 + * = 0xFFFFFFFFFFFFFFFF + * + * (a signalling NaN doesn't set the MSB of the mantissa) + * + * There are several of these; this one is nice because it's byte-sex + * independent, unlike INF below. + */ + const union { + unsigned char x[8]; + double d; + } nan_punning = {{ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }}; + + if (endptr) { + *endptr = ptr += 3; + /* a NaN may end with something in parentheses */ + if (*ptr == '(') { + while (*++ptr) { + if (*ptr == ')') { + *endptr = ptr + 1; + break; + } + } + } + } + + /* return NaN */ + dreturn("%g (%c)", nan_punning.d, endptr ? **endptr : '-'); + errno = 0; + return nan_punning.d; + } + } else if ((*ptr | 0x20) == 'i') { + if (((*(ptr + 1) | 0x20) == 'n') && ((*(ptr + 2) | 0x20) == 'f')) { + /* an IEEE-754 double-precision infinity (s is the sign bit): + * + * s111 1111 1111 1000 0000 0000 0000 0000 + * 0000 0000 0000 0000 0000 0000 0000 0000 + * = 0x7FF0000000000000 (+INF), or + * 0xFFF0000000000000 (-INF) + */ + const union { + unsigned char x[8]; + double d; + } inf_punning = {{ +#ifdef ARM_ENDIAN_DOUBLES + 0x00, 0x00, 0xF0, 0x7F | sign, 0x00, 0x00, 0x00, 0x00 +#elif defined(FLOATS_BIGENDIAN) + 0x7F | sign, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +#else + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x7F | sign +#endif + }}; + + if (endptr) { + *endptr = ptr += 3; + /* INF may also be INFINITY, disregarding case */ + if ( + ((*ptr | 0x20) == 'i') && + ((*(ptr + 1) | 0x20) == 'n') && + ((*(ptr + 2) | 0x20) == 'i') && + ((*(ptr + 3) | 0x20) == 't') && + ((*(ptr + 4) | 0x20) == 'y')) + { + *endptr += 5; + } + } + + /* return signed infinity */ + dreturn("%g (%c)", inf_punning.d, endptr ? **endptr : '-'); + errno = 0; + return inf_punning.d; + } + } + + /* otherwise, just run strtod */ + r = strtod(nptr, endptr); + dreturn("%g (%c)", r, endptr ? **endptr : '-'); + return r; +} +#endif Modified: trunk/getdata/src/constant.c =================================================================== --- trunk/getdata/src/constant.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/constant.c 2012-05-23 06:57:07 UTC (rev 709) @@ -71,8 +71,8 @@ char* field_code; int repr; - dtrace("%p, \"%s\", %i, %zi, 0x%x, %p", D, field_code_in, (int)start, n, - return_type, data_out); + dtrace("%p, \"%s\", %i, %" PRNsize_t ", 0x%x, %p", D, field_code_in, + (int)start, n, return_type, data_out); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); @@ -187,7 +187,7 @@ return 0; } - dreturn("%zu", entry->EN(scalar,array_len)); + dreturn("%" PRNsize_t, entry->EN(scalar,array_len)); return entry->EN(scalar,array_len); } @@ -259,7 +259,7 @@ int repr; char* field_code; - dtrace("%p, \"%s\", %i, %zu, 0x%x, %p", D, field_code_in, first, n, data_type, + dtrace("%p, \"%s\", %i, %" PRNsize_t ", 0x%x, %p", D, field_code_in, first, n, data_type, data_in); if (D->flags & GD_INVALID) { Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/encoding.c 2012-05-23 06:57:07 UTC (rev 709) @@ -456,7 +456,7 @@ { ssize_t n_wrote; - dtrace("%p, %p, %p, %p, 0x%X, %zu, %i", D, E, enc, ptr, type, n, temp); + dtrace("%p, %p, %p, %p, 0x%X, %" PRNsize_t ", %i", D, E, enc, ptr, type, n, temp); if (temp) n_wrote = (*enc->write)(E->e->u.raw.file + 1, ptr, type, n); @@ -476,7 +476,7 @@ n_wrote = (*enc->write)(E->e->u.raw.file, ptr, type, n); } - dreturn("%zi", n_wrote); + dreturn("%" PRNssize_t, n_wrote); return n_wrote; } Modified: trunk/getdata/src/endian.c =================================================================== --- trunk/getdata/src/endian.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/endian.c 2012-05-23 06:57:07 UTC (rev 709) @@ -192,7 +192,7 @@ { size_t i; - dtrace("%p, %zu, %zu", databuffer, size, ns); + dtrace("%p, %zu, %" PRNsize_t, databuffer, size, ns); switch (size) { case 2: Modified: trunk/getdata/src/errors.c =================================================================== --- trunk/getdata/src/errors.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/errors.c 2012-05-23 06:57:07 UTC (rev 709) @@ -264,7 +264,7 @@ char* bufend; int i, s = -1; - dtrace("%p, %p, %zu", D, buffer, buflen); + dtrace("%p, %p, %" PRNsize_t, D, buffer, buflen); /* Sanity check */ if (D == NULL || (buffer && buflen < 1)) { Modified: trunk/getdata/src/field_list.c =================================================================== --- trunk/getdata/src/field_list.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/field_list.c 2012-05-23 06:57:07 UTC (rev 709) @@ -158,7 +158,7 @@ const int hidden = (flags & GD_ENTRIES_HIDDEN); const int noalias = (flags & GD_ENTRIES_NOALIAS); - dtrace("%p, %p, %zu, 0x%X, 0x%X", D, p, offs, type, flags); + dtrace("%p, %p, %" PRNsize_t ", 0x%X, 0x%X", D, p, offs, type, flags); if (D->flags & GD_INVALID) { _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/flush.c 2012-05-23 06:57:07 UTC (rev 709) @@ -233,7 +233,7 @@ if (!permissive && standards < 6) { fputs(in, stream); - dreturn("%zu", strlen(in)); + dreturn("%" PRNsize_t, strlen(in)); return strlen(in); } @@ -263,7 +263,7 @@ } } - dreturn("%zu", len); + dreturn("%" PRNsize_t, len); return len; } @@ -275,7 +275,7 @@ int dummy; char *ptr; - dtrace("%p, %p, \"%s\", \"%s\", \"%s\", %zu, %i, %i", D, stream, prefix, + dtrace("%p, %p, \"%s\", \"%s\", \"%s\", %" PRNsize_t ", %i, %i", D, stream, prefix, suffix, in, len, permissive, standards); ptr = _GD_MungeCode(D, NULL, prefix, suffix, NULL, NULL, in, &dummy); @@ -340,8 +340,8 @@ size_t z; char *ptr; - dtrace("%p, %p, %p, %i, %i, %zi, %i, %i", D, stream, E, me, meta, max_len, - pretty, permissive); + dtrace("%p, %p, %p, %i, %i, %" PRNsize_t ", %i, %i", D, stream, E, me, meta, + max_len, pretty, permissive); /* INDEX is implicit, and it is an error to define it in the format file */ if (E->field_type == GD_INDEX_ENTRY) { Property changes on: trunk/getdata/src/fpos.c ___________________________________________________________________ Added: svn:eol-style + native Modified: trunk/getdata/src/getdata.c =================================================================== --- trunk/getdata/src/getdata.c 2012-05-03 20:47:35 UTC (rev 708) +++ trunk/getdata/src/getdata.c 2012-05-23 06:57:07 UTC (rev 709) @@ -104,7 +104,7 @@ { size_t i; - dtrace("%p, %p, 0x%X, %p, 0x%X, %zu, %i", D, cdata, in_type, rdata, type, n, + dtrace("%p, %p, 0x%X, %p, 0x%X, %" PRNsize_t ", %i", D, cdata, in_type, rdata, type, n, repr); switch (type) { @@ -159,7 +159,7 @@ { size_t i; - dtrace("%p, 0x%X, %lli, %zu", dataout, rtype, (long long)s0, n); + dtrace("%p, 0x%X, %lli, %" PRNsize_t, dataout, rtype, (long long)s0, n); switch (rtype) { case GD_INT8: @@ -224,7 +224,7 @@ size_t i; const double NaN = NAN; - dtrace("%p, 0x%X, %zu", databuffer, type, nz); + dtrace("%p, 0x%X, %" PRNsize_t, databuffer, type, nz); if (type & GD_IEEE754) { if (type == GD_FLOAT32) @@ -243,7 +243,7 @@ } else memset(databuffer, 0, nz * GD_SIZE(type)); - dreturn("%zu", nz); + dreturn("%" PRNsize_t, nz); return (nz); } @@ -258,7 +258,7 @@ char *databuffer; size_t zero_pad = 0; - dtrace("%p, %p, %lli, %zu, 0x%X, %p)", D, E, (long long)s0, ns, return_type, + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p)", D, E, (long long)s0, ns, return_type, data_out); if (s0 < E->EN(raw,spf) * D->fragment[E->fragment_index].frame_offset) @@ -347,7 +347,7 @@ free(databuffer); - dreturn("%zu", (D->error == GD_E_OK) ? n_read : (size_t)0); + dreturn("%" PRNsize_t, (D->error == GD_E_OK) ? n_read : (size_t)0); return (D->error == GD_E_OK) ? n_read : (size_t)0; } @@ -413,7 +413,7 @@ { size_t i; - dtrace("%p, %p, 0x%X, %zu, %i, %p", D, data, type, npts, n, a); + dtrace("%p, %p, 0x%X, %" PRNsize_t ", %i, %p", D, data, type, npts, n, a); if (n == 1) { /* no need to duplicate this case */ @@ -600,7 +600,7 @@ { size_t i; - dtrace("%p, %p, 0x%X, %zu, %i, %p", D, data, type, npts, n, a); + dtrace("%p, %p, 0x%X, %" PRNsize_t ", %i, %p", D, data, type, npts, n, a); if (n == 1) { /* no need to duplicate this case */ @@ -650,7 +650,7 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %zu", D, A, spfA, B, spfB, type, n); + dtrace("%p, %p, %u, %p, %u, 0x%X, %" PRNsize_t, D, A, spfA, B, spfB, type, n); switch (type) { case GD_NULL: break; @@ -702,7 +702,7 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %zu", D, A, spfA, B, spfB, type, n); + dtrace("%p, %p, %u, %p, %u, 0x%X, %" PRNsize_t, D, A, spfA, B, spfB, type, n); switch (type) { case GD_NULL: break; @@ -748,7 +748,7 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %zu", D, A, spfA, B, spfB, type, n); + dtrace("%p, %p, %u, %p, %u, 0x%X, %" PRNsize_t, D, A, spfA, B, spfB, type, n); switch (type) { case GD_NULL: break; @@ -801,7 +801,7 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %zu", D, A, spfA, B, spfB, type, n); + dtrace("%p, %p, %u, %p, %u, 0x%X, %" PRNsize_t, D, A, spfA, B, spfB, type, n); switch (type) { case GD_NULL: break; @@ -871,7 +871,7 @@ size_t i; const double NaN = NAN; - dtrace("%p, %p, %u, %p, %u, 0x%X, %i, {%g,%llx,%lli}, %zu", D, A, spfA, B, + dtrace("%p, %p, %u, %p, %u, 0x%X, %i, {%g,%llx,%lli}, %" PRNsize_t, D, A, spfA, B, spfB, type, op, threshold.r, (unsigned long long)threshold.u, (long long)threshold.i, n); @@ -929,7 +929,7 @@ { size_t i; - dtrace("%p, %p, %u, %p, %u, 0x%X, %i, %p, %zu", D, A, spfA, B, spfB, type, + dtrace("%p, %p, %u, %p, %u, 0x%X, %i, %p, %" PRNsize_t, D, A, spfA, B, spfB, type, val, start, n); switch (type) { @@ -967,7 +967,7 @@ const gd_type_t ntype = (return_type & GD_COMPLEX) ? GD_COMPLEX128 : GD_FLOAT64; - dtrace("%p, %p, %lli, %zu, 0x%X, %p", D, E, (long long)first_samp, num_samp, + dtrace("%p, %p, %lli, %" PRNsize_t ", 0x%X, %p", D, E, (long long)first_samp, num_samp, return_type, data_out); /* input field checks */ @@ -1007,7 +1007,7 @@ if (E->EN(lincom,n_fields) == 1 && _gd_ccmpl(E->EN(lincom,cm)[0],1,0) && ... [truncated message content] |
From: <ket...@us...> - 2012-05-03 20:47:41
|
Revision: 708 http://getdata.svn.sourceforge.net/getdata/?rev=708&view=rev Author: ketiltrout Date: 2012-05-03 20:47:35 +0000 (Thu, 03 May 2012) Log Message: ----------- MSVC fixes. Modified Paths: -------------- trunk/getdata/cmake/CMakeLists.txt trunk/getdata/src/field_list.c trunk/getdata/src/internal.h trunk/getdata/src/open.c trunk/getdata/src/parse.c trunk/getdata/src/sie.c Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/cmake/CMakeLists.txt 2012-05-03 20:47:35 UTC (rev 708) @@ -44,7 +44,7 @@ set(DEFINE_GD_NO_C99_API "#define GD_NO_C99_API") set(DEFINE_gd_int64_t "#define gd_int64_t __int64") - set(DEFINE_gd_uint64_t "#define gd_uint64_t __uint64") + set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions( @@ -52,17 +52,23 @@ -D_USE_MATH_DEFINES -DHAVE_DIRENT_H -DHAVE_DIRECT_H + -DHAVE_FCNTL_H -DHAVE_LIBGEN_H -DSTDC_HEADERS -DHAVE_INTTYPES_H -DHAVE_IO_H -DHAVE_STDINT_H + -DHAVE_SYS_STAT_H -DHAVE__STAT64 -DHAVE_STRUCT__STAT64 -DHAVE__COMMIT -DHAVE__STRTOI64 -DHAVE__STRTOUI64 -DHAVE__GETCWD + -DGD_DIRSEP='\\\\' + -Drestrict= + -DSIZEOF_INT=4 + -DSIZEOF_UNSIGNED_INT=4 ) set(CMAKE_DEBUG_POSTFIX d) Modified: trunk/getdata/src/field_list.c =================================================================== --- trunk/getdata/src/field_list.c 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/src/field_list.c 2012-05-03 20:47:35 UTC (rev 708) @@ -117,11 +117,11 @@ /* aliases */ if (E->field_type == GD_ALIAS_ENTRY) { + int ret = 0; if (noalias) { dreturn("%i (alias)", 0); return 0; } - int ret = 0; if (E->e->entry[0]) ret = _GD_ListEntry(E->e->entry[0], meta, hidden, 0, special, type); dreturn("%i", ret); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/src/internal.h 2012-05-03 20:47:35 UTC (rev 708) @@ -116,6 +116,12 @@ /* the open() in the MSVCRT doesn't permit open()ing directories */ #ifdef __MSVCRT__ #define GD_NO_DIR_OPEN +/* rename open() flags */ +#define O_RDWR _O_RDWR +#define O_RDONLY _O_RDONLY +#define O_CREAT _O_CREAT +#define O_EXCL _O_EXCL +#define O_TRUNC _O_TRUNC #endif #ifdef GD_NO_C99_API @@ -374,7 +380,7 @@ #endif #if !defined(HAVE_DECL_OFFSETOF) || ! HAVE_DECL_OFFSETOF -#define offsetof(t,m) ((size_t)((char*)&(((t)*)0)->(m) - (char*)0)) +#define offsetof(t,m) ((size_t)(((char*)&((t*)0)->m) - (char*)0)) #endif #ifdef HAVE_READDIR_R Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/src/open.c 2012-05-03 20:47:35 UTC (rev 708) @@ -116,9 +116,15 @@ /* check file type */ switch (statbuf.st_mode & S_IFMT) { case S_IFREG: +#ifdef S_IFBLK case S_IFBLK: +#endif +#ifdef S_IFIFO case S_IFIFO: +#endif +#ifdef S_IFCHR case S_IFCHR: +#endif #ifdef S_IFLNK case S_IFLNK: #endif Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/src/parse.c 2012-05-03 20:47:35 UTC (rev 708) @@ -2099,13 +2099,14 @@ break; case 'I': if (strcmp(ptr, "INCLUDE") == 0 && (!pedantic || *standards >= 3)) { - matched = 1; + int frag; unsigned long subflags = D->fragment[me].encoding | D->fragment[me].byte_sex | (*flags & (GD_PEDANTIC | GD_PERMISSIVE | GD_FORCE_ENDIAN | GD_FORCE_ENCODING | GD_IGNORE_DUPS | GD_IGNORE_REFS)); + matched = 1; - int frag = _GD_Include(D, in_cols[1], D->fragment[me].cname, linenum, + frag = _GD_Include(D, in_cols[1], D->fragment[me].cname, linenum, ref_name, me, (n_cols > 2) ? in_cols[2] : NULL, (n_cols > 3) ? in_cols[3] : NULL, standards, &subflags, 0); Modified: trunk/getdata/src/sie.c =================================================================== --- trunk/getdata/src/sie.c 2012-05-03 19:47:36 UTC (rev 707) +++ trunk/getdata/src/sie.c 2012-05-03 20:47:35 UTC (rev 708) @@ -334,8 +334,9 @@ for (i = 0; i < nelem; ++i) { if (memcmp(((const char*)ptr) + i * dlen, cur_datum, dlen)) { if (++rin == plen) { + void *p2; plen += 10; - void *p2 = realloc(p, plen * size); + p2 = realloc(p, plen * size); if (p2 == NULL) { free(p); dreturn("%i", -1); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-05-03 19:47:43
|
Revision: 707 http://getdata.svn.sourceforge.net/getdata/?rev=707&view=rev Author: ketiltrout Date: 2012-05-03 19:47:36 +0000 (Thu, 03 May 2012) Log Message: ----------- rc1. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/m4/version.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-04-21 04:32:53 UTC (rev 706) +++ trunk/getdata/ChangeLog 2012-05-03 19:47:36 UTC (rev 707) @@ -1,3 +1,9 @@ +2012-04-21 D. V. Wiebe <ge...@ke...> svn:706 + GetData-0.8.0rc1: + + * bindings/cxx/test/big_test.cpp bindings/perl/test/big_test.t: Fix + mplex_lookback checks. + 2012-04-21 D. V. Wiebe <ge...@ke...> svn:705 * man/make_html.pl: Improvements. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-04-21 04:32:53 UTC (rev 706) +++ trunk/getdata/NEWS 2012-05-03 19:47:36 UTC (rev 707) @@ -1,4 +1,4 @@ -New in version 0.8.0a: +New in version 0.8.0rc1: Dirfile Changes Modified: trunk/getdata/m4/version.m4 =================================================================== --- trunk/getdata/m4/version.m4 2012-04-21 04:32:53 UTC (rev 706) +++ trunk/getdata/m4/version.m4 2012-05-03 19:47:36 UTC (rev 707) @@ -21,22 +21,22 @@ m4_define(getdata_major, 0) m4_define(getdata_minor, 8) m4_define(getdata_revision, 0) -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, 4) +m4_define(getdata_iface_version, 5) dnl libgetdata current interface implementation revision -m4_define(getdata_impl_revision, 3) +m4_define(getdata_impl_revision, 0) dnl libgetdata interface age (current interface - oldest supported interface) m4_define(getdata_iface_age, 0) dnl libgetdata++ interface version info -m4_define(getdataxx_version, 2:0:0) +m4_define(getdataxx_version, 3:0:0) dnl libfgetdata interface version info -m4_define(fgetdata_version, 2:1:0) +m4_define(fgetdata_version, 3:0:1) dnl libf95getdata interface version info -m4_define(f95getdata_version, 2:0:0) +m4_define(f95getdata_version, 3:0:1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-21 04:32:59
|
Revision: 706 http://getdata.svn.sourceforge.net/getdata/?rev=706&view=rev Author: ketiltrout Date: 2012-04-21 04:32:53 +0000 (Sat, 21 Apr 2012) Log Message: ----------- Fix tests. Modified Paths: -------------- trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/perl/test/big_test.t Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-04-21 02:52:38 UTC (rev 705) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-04-21 04:32:53 UTC (rev 706) @@ -1711,9 +1711,8 @@ CHECK_STRING_ARRAY(239,n,list[i],fields[i]); // 240: gd_mplex_lookback - n = d->MplexLookback(GD_LOOKBACK_ALL); + d->MplexLookback(GD_LOOKBACK_ALL); CHECK_OK(240); - CHECK_INT(240, n, 0); Modified: trunk/getdata/bindings/perl/test/big_test.t =================================================================== --- trunk/getdata/bindings/perl/test/big_test.t 2012-04-21 02:52:38 UTC (rev 705) +++ trunk/getdata/bindings/perl/test/big_test.t 2012-04-21 04:32:53 UTC (rev 706) @@ -22,7 +22,7 @@ use GetData; use Math::Complex; use strict; -use Test::More tests => 1304; +use Test::More tests => 1303; my $ne = 0; my ($s, @a, %h); @@ -1699,9 +1699,8 @@ window)); # 240: gd_mplex_lookback -$s = $_->mplex_lookback($GetData::LOOKBACK_ALL); +$_->mplex_lookback($GetData::LOOKBACK_ALL); CheckOK(240); -CheckNum(240, $s, 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-21 02:52:50
|
Revision: 705 http://getdata.svn.sourceforge.net/getdata/?rev=705&view=rev Author: ketiltrout Date: 2012-04-21 02:52:38 +0000 (Sat, 21 Apr 2012) Log Message: ----------- * gd_mplex_lookback returns void * html-man improvements; doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/dirfile.cpp trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/python/pydirfile.c trunk/getdata/doc/README.cxx trunk/getdata/man/Makefile.am trunk/getdata/man/dirfile-encoding.5 trunk/getdata/man/dirfile-format.5 trunk/getdata/man/dirfile.5 trunk/getdata/man/dirfile2ascii.1 trunk/getdata/man/gd_alias_target.3 trunk/getdata/man/gd_cbopen.3 trunk/getdata/man/gd_encoding.3 trunk/getdata/man/gd_entry.3 trunk/getdata/man/gd_entry_list.3 trunk/getdata/man/gd_entry_type.3 trunk/getdata/man/gd_error_count.3 trunk/getdata/man/gd_get_carray_slice.3 trunk/getdata/man/gd_get_constant.3 trunk/getdata/man/gd_getdata.3 trunk/getdata/man/gd_include_affix.3 trunk/getdata/man/gd_madd_bit.3 trunk/getdata/man/gd_mplex_lookback.3 trunk/getdata/man/gd_nentries.3 trunk/getdata/man/gd_parent_fragment.3 trunk/getdata/man/gd_put_carray_slice.3 trunk/getdata/man/gd_put_constant.3 trunk/getdata/man/gd_putdata.3 trunk/getdata/man/make_html.pl trunk/getdata/src/getdata.h.in trunk/getdata/src/globals.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/ChangeLog 2012-04-21 02:52:38 UTC (rev 705) @@ -1,3 +1,10 @@ +2012-04-21 D. V. Wiebe <ge...@ke...> svn:705 + * man/make_html.pl: Improvements. + + * src/globals.c (gd_mplex_lookback): Always succeed; return void. + + * bindings/perl/simple_funcs.pl: Handle returning void. + 2012-04-19 D. V. Wiebe <ge...@ke...> svn:701 * src/add.c (_GD_Add): Don't check protection level before figuring out the fragment index. Modified: trunk/getdata/bindings/cxx/dirfile.cpp =================================================================== --- trunk/getdata/bindings/cxx/dirfile.cpp 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/bindings/cxx/dirfile.cpp 2012-04-21 02:52:38 UTC (rev 705) @@ -550,9 +550,9 @@ return gd_verbose_prefix(D, prefix); } -int Dirfile::MplexLookback(int lookback) const +void Dirfile::MplexLookback(int lookback) const { - return gd_mplex_lookback(D, lookback); + gd_mplex_lookback(D, lookback); } unsigned int Dirfile::NEntries(const char *parent, unsigned int type, Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-04-21 02:52:38 UTC (rev 705) @@ -194,7 +194,7 @@ const char **MFieldListByType(const char *parent, EntryType type) const; - int MplexLookback(int lookback) const; + void MplexLookback(int lookback) const; const char **MStrings(const char *parent) const; Modified: trunk/getdata/bindings/perl/simple_funcs.pl =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.pl 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/bindings/perl/simple_funcs.pl 2012-04-21 02:52:38 UTC (rev 705) @@ -135,10 +135,24 @@ print "\tCODE:\n\t\tdtrace(\"", join(", ", map(printfmt($_), @argtype)); print "\", ", join(", ", map(printmunge($_), @arg)), ");\n"; - print "\t\tRETVAL = "; + + print "\t\t"; + if ($ret ne "void") { + print "RETVAL = "; + } print (($lfs) ? "gdp64(gd_$func)" : "gd_$func"); - print "($arglist);\n\t\tGDP_UNDEF_ON_ERROR();\n\tOUTPUT:\n"; - print "\t\tRETVAL\n\tCLEANUP:\n", map(printcleanup($_), @arg); - print "\t\tdreturn(\"", &printfmt($ret), "\", "; - print &printmunge([$ret, "RETVAL"]), ");\n\n"; + print "($arglist);\n"; + + if ($ret ne "void") { + print "\t\tGDP_UNDEF_ON_ERROR();\n"; + print "\tOUTPUT:\n\t\tRETVAL\n"; + } + + print "\tCLEANUP:\n", map(printcleanup($_), @arg); + if ($ret eq "void") { + print "\t\tdreturnvoid();\n\n"; + } else { + print "\t\tdreturn(\"", &printfmt($ret), "\", "; + print &printmunge([$ret, "RETVAL"]), ");\n\n"; + } } Modified: trunk/getdata/bindings/perl/simple_funcs.xsin =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.xsin 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/bindings/perl/simple_funcs.xsin 2012-04-21 02:52:38 UTC (rev 705) @@ -153,4 +153,4 @@ unsigned long int flags(DIRFILE *dirfile, unsigned long int set=0, unsigned long int reset=0) int verbose_prefix(DIRFILE *dirfile, gdpu_char *prefix=NULL) -int mplex_lookback(DIRFILE *dirfile, int lookback) +void mplex_lookback(DIRFILE *dirfile, int lookback) Modified: trunk/getdata/bindings/python/pydirfile.c =================================================================== --- trunk/getdata/bindings/python/pydirfile.c 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/bindings/python/pydirfile.c 2012-04-21 02:52:38 UTC (rev 705) @@ -134,7 +134,7 @@ if (self) { self->D = NULL; - self->mplex_lookback = 10; + self->mplex_lookback = GD_DEFAULT_LOOKBACK; self->verbose_prefix = NULL; self->callback = NULL; self->callback_data = NULL; Modified: trunk/getdata/doc/README.cxx =================================================================== --- trunk/getdata/doc/README.cxx 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/doc/README.cxx 2012-04-21 02:52:38 UTC (rev 705) @@ -250,7 +250,7 @@ * const char **Dirfile::MFieldList(const char *parent) * const char **Dirfile::MFieldListByType(const char *parent, GetData::EntryType type) -* int MplexLookback(int lookback) +* void MplexLookback(int lookback) * int Dirfile::MoveAlias(const char* field_code, int new_fragment) * const char **Dirfile::MStrings(const char *parent) * const char **Dirfile::MVectorList(const char *parent) Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/Makefile.am 2012-04-21 02:52:38 UTC (rev 705) @@ -105,7 +105,7 @@ HTMLMANS=$(addsuffix .html,$(nodist_man_MANS)) \ $(addsuffix .html,$(dist_man_MANS)) -%.html: % +%.html: % make_html.pl ./make_html.pl $< > $@ htmlman: $(HTMLMANS) Modified: trunk/getdata/man/dirfile-encoding.5 =================================================================== --- trunk/getdata/man/dirfile-encoding.5 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/dirfile-encoding.5 2012-04-21 02:52:38 UTC (rev 705) @@ -118,7 +118,7 @@ GetData caches an uncompressed megabyte of data at a time to speed access times. A call to -.BR get_nframes (3) +.BR gd_nframes (3) requires decompression of the entire binary file to determine its uncompressed size, and may take some time to complete. The file extension of the BZip2 Encoding is @@ -137,7 +137,7 @@ being written to usually doesn't work. To speed the operation of -.BR get_nframes (3), +.BR gd_nframes (3), the GZip Encoding takes the uncompressed size of the file the gzip footer, which contains the file's uncompressed size in bytes, modulo 2**32. As a result, using a field with an (uncompressed) binary file size larger than 4\~GiB as the @@ -159,7 +159,7 @@ As with the BZip2 Encoding, GetData caches an uncompressed megabyte of data at a time to speed access times. A call to -.BR get_nframes (3) +.BR gd_nframes (3) requires decompression of the entire binary file to determine its uncompressed size, and may take some time to complete. The file extension of the LZMA Encoding is @@ -248,7 +248,7 @@ .BR gd_open (3) is required to read ZZSlim encoded data. The file extension of the ZZSlim Encoding is -.BR zip . +.BR .zip . .SH AUTHOR Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/dirfile-format.5 2012-04-21 02:52:38 UTC (rev 705) @@ -208,11 +208,12 @@ requriement that the input fields of a derived field exist .RI ( q.v. ), it is not an error for the target of an alias to not exist. Syntax is: +.IP .RS -.IP .B /ALIAS .I <name> <target> -.PP +.RE +.IP A metafield alias may defined by using the .IR <parent-field> / <alias-name> syntax for @@ -222,10 +223,11 @@ specifically, a metafield alias may target a top-level field, or a metafield of with a different parent; conversely, a top-level alias may target a metafield. -.PP +.IP A metafield alias may never appear as the parent part of a metafield field code, even if it refers to a top-level field. That is, given the valid format: .IP +.RS field1 \fBRAW UINT8\fR 1 .br field1/meta \fBCONST FLOAT64\fR 0.0 @@ -233,7 +235,8 @@ field2 \fBRAW UINT8\fR 1 .br \fB/ALIAS\fR field2/alias field1 -.PP +.RE +.IP The metafield .I field1/meta may not be referred to as @@ -242,10 +245,9 @@ .I field2/alias is a valid field code referring to .IR field1 . -.PP +.IP The /ALIAS directive has no scope: it is processed immediately. It appeared in Standards Version 9. -.RE .TP .B /ENCODING The /ENCODING directive specifies the encoding scheme used to encode binary @@ -1032,10 +1034,10 @@ .IR i ", " S INT32 .TP -.IR f +.I f FLOAT32 .TP -.IR d +.I d FLOAT64 .RE @@ -1140,50 +1142,50 @@ is one of the following tokens indicating the particular comparison performed: .RS .TP -.B EQ +.I EQ data are extracted where .IR check , converted to a 64-bit signed integer, equals .IR threshold , .TP -.B GE +.I GE data are extracted where .IR check , converted to a 64-bit floating-point number, is greater than or equal to .IR threshold , .TP -.B GT +.I GT data are extracted where .IR check , converted to a 64-bit floating-point number, is strictly greater than .IR threshold , .TP -.B LE +.I LE data are extracted where .IR check , converted to a 64-bit floating-point number, is less than or equal to .IR threshold , .TP -.B LT +.I LT data are extracted where .IR check , converted to a 64-bit floating-point number, is strictly less than .IR threshold , .TP -.B NE +.I NE data are extracted where .IR check , converted to a 64-bit signed integer, is not equal to .IR threshold , .TP -.B SET +.I SET data are extracted where at least one bit set in .IR threshold is also set in .IR check , when converted to a 64-bit unsigned integer, .TP -.B CLR +.I CLR data are extracted where at least one bit set in .IR threshold is not set in @@ -1293,7 +1295,7 @@ .RB ( ; ) with no intervening whitespace. So, for example, the tokens .IP -1;0 0;1 4;0 0;5 9.313e2;74.1 +1;0 \t 0;1 \t 4;0 \t 0;5 \t 9.313e2;74.1 .PP represent, respectively, the real unit, the imaginary unit, the real number four, the imaginary number Modified: trunk/getdata/man/dirfile.5 =================================================================== --- trunk/getdata/man/dirfile.5 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/dirfile.5 2012-04-21 02:52:38 UTC (rev 705) @@ -126,12 +126,11 @@ .SH AUTHORS -The dirfile specification was developed by C. B. Netterfield +The Dirfile format was developed by C. B. Netterfield .nh <net...@as...>. .hy 1 - -The dirfile specification is now maintained by D. V. Wiebe +It is now maintained by D. V. Wiebe .nh <ge...@ke...>. .hy 1 Modified: trunk/getdata/man/dirfile2ascii.1 =================================================================== --- trunk/getdata/man/dirfile2ascii.1 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/dirfile2ascii.1 2012-04-21 02:52:38 UTC (rev 705) @@ -19,7 +19,7 @@ .SH SYNOPSIS .nh .ad l -.TP +.HP \fBdirfile2ascii\fR [ \fIOPTION\fR ]... \fIDIRFILE\fR .RB "[ [ " \-a " | " \-A " | " \-e " | " \-E " | " \-F " | " \-g " | " \-G " |" .BR \-o " | " \-i " | " \-u " | " \-x " | " \-X " ]" Modified: trunk/getdata/man/gd_alias_target.3 =================================================================== --- trunk/getdata/man/gd_alias_target.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_alias_target.3 2012-04-21 02:52:38 UTC (rev 705) @@ -21,8 +21,8 @@ .HP .nh .ad l -.BI "const char *gd_alias_target(DIRFILE *" dirfile ", const char *" alias_name -.B ); +.BI "const char *gd_alias_target(DIRFILE *" dirfile , +.BI "const char *" alias_name ); .hy .ad n .SH DESCRIPTION Modified: trunk/getdata/man/gd_cbopen.3 =================================================================== --- trunk/getdata/man/gd_cbopen.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_cbopen.3 2012-04-21 02:52:38 UTC (rev 705) @@ -69,8 +69,8 @@ (read-write), and may also contain zero or more of the following flags, bitwise-or'd together: .PP -.B GD_ARM_ENDIAN .PD 0 +.B GD_ARM_ENDIAN .TP .PD .B GD_NOT_ARM_ENDIAN @@ -91,8 +91,8 @@ indicates the native behaviour of the platform. That symbol will equal zero, and may be omitted. .PP -.B GD_BIG_ENDIAN .PD 0 +.B GD_BIG_ENDIAN .TP .PD .B GD_LITTLE_ENDIAN @@ -139,9 +139,10 @@ .BR GD_CREAT , the call will fail if the dirfile specified by .I dirfilename -already exists. Behaviour of this flag is undefined if +already exists. If .B GD_CREAT -is not specified. This flag suffers from all the limitations of the +is not specified, this flag is ignored. This flag suffers from all the +limitations of the .B O_EXCL flag as indicated in .BR open (2). @@ -512,6 +513,10 @@ .B GD_E_FORMAT_METARAW 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. +.TP .B GD_E_FORMAT_N_FIELDS The number of fields of a LINCOM field was out-of-range. .TP @@ -541,18 +546,6 @@ .TP .B GD_E_FORMAT_WINDOP The operation in a WINDOW field was not recognised. -.TP -.B GD_E_FORMAT_META_META -A -.B /META -directive used a metafield for the parent field for the definition. -.TP -.B GD_E_FORMAT_ALIAS -A metafield specification uses an alias for the parent field. -.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. .PP .IR pdata -> filename and Modified: trunk/getdata/man/gd_encoding.3 =================================================================== --- trunk/getdata/man/gd_encoding.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_encoding.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_encoding.3. The gd_encoding man page. .\" -.\" Copyright (C) 2008, 2009, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_encoding 3 "15 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_encoding 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_encoding \(em report the binary encoding of data in a dirfile .SH SYNOPSIS @@ -47,19 +47,26 @@ .IP .nh .ad l -.BR GD_UNENCODED ,\~ GD_TEXT_ENCODED ,\~ GD_SLIM_ENCODED ,\~ -.BR GD_GZIP_ENCODED ,\~ GD_BZIP2_ENCODED ,\~ GD_LZMA_ENCODED ,\~ +.BR GD_UNENCODED , +.BR GD_BZIP2_ENCODED , +.BR GD_GZIP_ENCODED , +.BR GD_LZMA_ENCODED , +.BR GD_SIE_ENCODED , +.BR GD_SLIM_ENCODED , +.BR GD_TEXT_ENCODED , +.BR GD_ZZIP_ENCODED , +.BR GD_ZZSLIM_ENCODED , .BR GD_ENC_UNSUPPORTED . .ad n .hy .PP -See -.BR gd_cbopen (3) -and dirfile-encoding(5) for the meanings of these symbols and details on the -supported encoding schemes. If the encoding scheme specified in the dirfile +If the encoding scheme specified in the dirfile metadata is unknown to GetData, .B GD_ENC_UNSUPPORTED -will be returned. +will be returned. See +.BR gd_cbopen (3) +and dirfile-encoding(5) for the meanings of the other symbols and details on the +supported encoding schemes. .PP On error, it returns zero and sets the dirfile error to a non-zero error value. Possible error values are: Modified: trunk/getdata/man/gd_entry.3 =================================================================== --- trunk/getdata/man/gd_entry.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_entry.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_entry.3. The gd_entry man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_entry 3 "18 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_entry 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_entry \(em retrieve a dirfile field's metadata .SH SYNOPSIS @@ -134,17 +134,29 @@ .IP .nh .ad l -.BR GD_BIT_ENTRY ", " GD_CARRAY_ENTRY ", " GD_CONST_ENTRY ", " GD_DIVIDE_ENTRY , -.BR GD_INDEX_ENTRY ", " GD_LINCOM_ENTRY ", " GD_LINTERP_ENTRY , -.BR GD_MULTIPLY_ENTRY ", " GD_PHASE_ENTRY ", " GD_POLYNOM_ENTRY , -.BR GD_RAW_ENTRY ", " GD_RECIP_ENTRY ", " GD_SBIT_ENTRY ", " GD_STRING_ENTRY . +.BR GD_BIT_ENTRY , +.BR GD_CARRAY_ENTRY , +.BR GD_CONST_ENTRY , +.BR GD_DIVIDE_ENTRY , +.BR GD_INDEX_ENTRY , +.BR GD_LINCOM_ENTRY , +.BR GD_LINTERP_ENTRY , +.BR GD_MPLEX_ENTRY , +.BR GD_MULTIPLY_ENTRY , +.BR GD_PHASE_ENTRY , +.BR GD_POLYNOM_ENTRY , +.BR GD_RAW_ENTRY , +.BR GD_RECIP_ENTRY , +.BR GD_SBIT_ENTRY , +.BR GD_STRING_ENTRY , +.BR GD_WINDOW_ENTRY . .ad n .hy .PP .B GD_INDEX_ENTRY is a special field type used only for the implicit .I INDEX -field. The meaning of the other symbols should be self-explanatory. +field. The other entry types are explained in detail in dirfile-format(5). .PP The .I fragment_index Modified: trunk/getdata/man/gd_entry_list.3 =================================================================== --- trunk/getdata/man/gd_entry_list.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_entry_list.3 2012-04-21 02:52:38 UTC (rev 705) @@ -101,8 +101,8 @@ .BR gd_close (3) and should not be de-allocated by the caller. The list returned should not be assumed to be in any particular order. The array is terminated by a NULL -pointer. The number of strings in the array can be obtained from an equivalent -call to +pointer. The number of elements in the array, excluding the terminating NULL, +can be obtained from an equivalent call to .BR gd_nentries (3). The caller may not modify any strings in the array, or the array itself. Doing @@ -119,6 +119,7 @@ .RS .BI gd_field_list( dirfile ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", NULL, GD_ALL_ENTRIES, 0); @@ -128,6 +129,7 @@ .RS .BI gd_field_list_by_type( dirfile ", " type ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", NULL, " type ", 0);" @@ -137,6 +139,7 @@ .RS .BI gd_mfield_list( dirfile ", " parent ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", " parent ", GD_ALL_ENTRIES, 0);" @@ -146,6 +149,7 @@ .RS .BI gd_mfield_list_by_type( dirfile ", " parent ", " type ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", " parent ", " type ", 0);" @@ -155,6 +159,7 @@ .RS .BI gd_mvector_list( dirfile ", " parent ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", " parent ", GD_VECTOR_ENTRIES, 0);" @@ -164,6 +169,7 @@ .RS .BI gd_vector_list( dirfile ); .RE +.PP is equivalent to .RS .BI gd_entry_list( dirfile ", NULL, GD_VECTOR_ENTRIES, 0);" Modified: trunk/getdata/man/gd_entry_type.3 =================================================================== --- trunk/getdata/man/gd_entry_type.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_entry_type.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_entry_type.3. The gd_entry_type man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_entry_type 3 "18 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_entry_type 3 "21 August 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_entry_type \(em retrieve the type of a dirfile field .SH SYNOPSIS @@ -42,10 +42,22 @@ .IP .nh .ad l -.BR GD_BIT_ENTRY ", " GD_CARRAY_ENTRY ", " GD_CONST_ENTRY ", " GD_DIVIDE_ENTRY , -.BR GD_INDEX_ENTRY ", " GD_LINCOM_ENTRY ", " GD_LINTERP_ENTRY , -.BR GD_MULTIPLY_ENTRY ", " GD_PHASE_ENTRY ", " GD_POLYNOM_ENTRY , -.BR GD_RAW_ENTRY ", " GD_RECIP_ENTRY ", " GD_SBIT_ENTRY ", " GD_STRING_ENTRY . +.BR GD_BIT_ENTRY , +.BR GD_CARRAY_ENTRY , +.BR GD_CONST_ENTRY , +.BR GD_DIVIDE_ENTRY , +.BR GD_INDEX_ENTRY , +.BR GD_LINCOM_ENTRY , +.BR GD_LINTERP_ENTRY , +.BR GD_MPLEX_ENTRY , +.BR GD_MULTIPLY_ENTRY , +.BR GD_PHASE_ENTRY , +.BR GD_POLYNOM_ENTRY , +.BR GD_RAW_ENTRY , +.BR GD_RECIP_ENTRY , +.BR GD_SBIT_ENTRY , +.BR GD_STRING_ENTRY , +.BR GD_WINDOW_ENTRY . .ad n .hy .SH RETURN VALUE Modified: trunk/getdata/man/gd_error_count.3 =================================================================== --- trunk/getdata/man/gd_error_count.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_error_count.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,4 +1,4 @@ -\" gd_error_count.3. The gd_error_count man page. +.\" gd_error_count.3. The gd_error_count man page. .\" .\" Copyright (C) 2011 D. V. Wiebe .\" Modified: trunk/getdata/man/gd_get_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_get_carray_slice.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_get_carray_slice.3 2012-04-21 02:52:38 UTC (rev 705) @@ -78,43 +78,43 @@ return type of the data: .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number .TP -.IR GD_COMPLEX64 +.B GD_COMPLEX64 C99-conformant 64-bit single precision complex number .TP -.IR GD_COMPLEX128 +.B GD_COMPLEX128 C99-conformant 128-bit double precision complex number .TP -.I GD_NULL +.B GD_NULL the null type: the database is queried as usual, but no data is returned. In this case, .I data_out Modified: trunk/getdata/man/gd_get_constant.3 =================================================================== --- trunk/getdata/man/gd_get_constant.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_get_constant.3 2012-04-21 02:52:38 UTC (rev 705) @@ -55,43 +55,43 @@ return type of the data: .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number .TP -.IR GD_COMPLEX64 +.B GD_COMPLEX64 C99-conformant 64-bit single precision complex number .TP -.IR GD_COMPLEX128 +.B GD_COMPLEX128 C99-conformant 128-bit double precision complex number .TP -.I GD_NULL +.B GD_NULL the null type: the database is queried as usual, but no data is returned. In this case, .I data_out Modified: trunk/getdata/man/gd_getdata.3 =================================================================== --- trunk/getdata/man/gd_getdata.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_getdata.3 2012-04-21 02:52:38 UTC (rev 705) @@ -103,43 +103,43 @@ return type of the data: .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number .TP -.IR GD_COMPLEX64 +.B GD_COMPLEX64 C99-conformant 64-bit single precision complex number .TP -.IR GD_COMPLEX128 +.B GD_COMPLEX128 C99-conformant 128-bit double precision complex number .TP -.I GD_NULL +.B GD_NULL the null type: the database is queried as usual, but no data is returned. In this case, .I data_out Modified: trunk/getdata/man/gd_include_affix.3 =================================================================== --- trunk/getdata/man/gd_include_affix.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_include_affix.3 2012-04-21 02:52:38 UTC (rev 705) @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_include_affix 3 "4 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_include_affix 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_include_affix, gd_include \(em add a format specification fragment to a dirfile @@ -71,19 +71,51 @@ The .I flags -argument should be a bitwise-or'd collection of the following flags, or zero -if no flags are desired: +argument should be a bitwise-or'd collection of zero or more of the following +flags: +.PP +.PD 0 +.B GD_ARM_ENDIAN .TP +.PD +.B GD_NOT_ARM_ENDIAN +Specifies that double precision floating point raw data on disk are, or are not, +stored in the middle-endian format used by older ARM processors. + +These flag only set the default endianness, and will be overridden when an +.B /ENDIAN +directive specifies the byte sex of +.B RAW +fields, unless +.B GD_FORCE_ENDIAN +is also specified. + +On every platform, one of these flags +.RB ( GD_NOT_ARM_ENDIAN +on all but middle-ended ARM systems) +indicates the native behaviour of the platform. That symbol will equal zero, +and may be omitted. +.PP +.PD 0 .B GD_BIG_ENDIAN -Specifies that raw data on disk is stored as big-endian data (most significant -byte first). Specifying this flag along with the contradictory -.BR GD_LITTLE_ENDIAN -will cause the library to assume that the endianness of the data is opposite to -that of the native architecture. +.TP +.PD +.B GD_LITTLE_ENDIAN +Specifies the default byte sex of raw data stored on disk to be either +big-endian (most significant byte first) or little-endian (least significant +byte first). Omitting both flags indicates the default should be the native +endianness of the platform. -This flag is ignored completely if an -.B ENDIAN -directive occurs in the fragment, unless +Unlike the ARM endianness flags above, neither of these symbols is ever zero. +Specifying both these flags together will cause the library to assume that the +endianness of the data is opposite to that of the native architecture, whatever +that might be. + +These flag only set the default endianness, and will be overridden when an +.B /ENDIAN +directive specifies the byte sex of +.B RAW +fields, unless .B GD_FORCE_ENDIAN is also specified. .TP @@ -99,16 +131,17 @@ .BR GD_CREAT , the call will fail if the file specified by .I include_file -already exists. Behaviour of this flag is undefined if +already exists. If .B GD_CREAT -is not specified. This flag suffers from all the limitations of the +is not specified, this flag is ignord. This flag suffers from all the +limitations of the .B O_EXCL flag as indicated in .BR open (2). .TP .B GD_FORCE_ENCODING Specifies that -.B ENCODING +.B /ENCODING directives (see .BR dirfile-format (5)) found in the fragment should be ignored. The encoding scheme @@ -118,7 +151,7 @@ .TP .B GD_FORCE_ENDIAN Specifies that -.B ENDIAN +.B /ENDIAN directives (see .BR dirfile-format (5)) found in the fragment should be ignored. When specified with one of @@ -154,19 +187,6 @@ directive in the included fragment will replace the current reference field in the dirfile. .TP -.B GD_LITTLE_ENDIAN -Specifies that raw data on disk is stored as little-endian data (least -significant byte first). Specifying this flag along with the contradictory -.BR GD_BIG_ENDIAN -will cause the library to assume that the endianness of the data is opposite to -that of the native architecture. - -This flag is ignored completely if an -.B ENDIAN -directive occurs in the fragment, unless -.B GD_FORCE_ENDIAN -is also specified. -.TP .B GD_PEDANTIC Specifies that unrecognised lines found during the parsing of the fragment should always cause a fatal error. Without this flag, if a @@ -193,9 +213,8 @@ .B GD_FORCE_ENCODED is also specified. If none of these symbols is present, .B GD_AUTO_ENCODED -is assumed, unless the -.BR gd_include_affix () -call results in creation or truncation of the fragment. In that case, +is assumed, unless this call results in creation or truncation of the fragment. +In that case, .B GD_UNENCODED is assumed. See .BR dirfile-encoding (5) Modified: trunk/getdata/man/gd_madd_bit.3 =================================================================== --- trunk/getdata/man/gd_madd_bit.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_madd_bit.3 2012-04-21 02:52:38 UTC (rev 705) @@ -259,7 +259,6 @@ and .BR gd_madd_crecip (): .PP -.nf .B #define GD_C89_API .B #include <getdata.h> .HP @@ -275,10 +274,9 @@ .HP .BI "int gd_madd_crecip(DIRFILE *" dirfile ", const char *" parent , .BI "const char *" field_name ", const char *" in_field , -.BI "double " cdividend "[2], int " fragment_index ); +.BI "double " cdividend\fR[2] ", int " fragment_index ); .hy .ad n -.fi .PP In this case, the array pointers passed as .IR cm ", " cb Modified: trunk/getdata/man/gd_mplex_lookback.3 =================================================================== --- trunk/getdata/man/gd_mplex_lookback.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_mplex_lookback.3 2012-04-21 02:52:38 UTC (rev 705) @@ -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 "1 April 2012" "Version 0.8.0" "GETDATA" +.TH gd_mplex_lookback 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_mplex_lookback \(em set the GetData lookback length for MPLEX fields. .SH SYNOPSIS @@ -21,7 +21,7 @@ .HP .nh .ad l -.BI "int gd_mplex_lookback(DIRFILE *" dirfile ", int " lookback ); +.BI "void gd_mplex_lookback(DIRFILE *" dirfile ", int " lookback ); .hy .ad n .SH DESCRIPTION @@ -61,23 +61,29 @@ .I lookback should be a positive number specifying the number of .I MPLEX cycles -to search. Each MPLEX field has its own MPLEX cycle length, measured in samples -of the index field, which is defined as follows: +to search. Each +.B MPLEX +field has its own +.B MPLEX +cycle length, measured in samples of the index field, which is defined as +follows: .IP \(bu if the .B MPLEX field in question specifies an optional -.I max +.I count_max positive parameter (see the MPLEX definition in dirfile-format(5)), its MPLEX cycle length is that many samples; .IP \(bu if the .B MPLEX field's -.I count +.I count_val is at least five, its MPLEX cycle length is twice as many samples as that value; .IP \(bu -otherwise, the MPLEX cylce length is ten samples. +otherwise, the +.B MPLEX +cylce length is ten samples. .PP So, given the following MPLEX definitions: .IP @@ -90,43 +96,26 @@ field4 \fBMPLEX\fR data_field index_field 2 .PP .I field1 -has a cycle length of 12 samples, +has a cycle length of 12 samples and .I field2 -6 samples (both the value of their -.I max -parameters), +a cycle length of 6 samples (both the value of their +.I count_max +parameters); .I field3 -14 samples (twice it's -.IR count ), +has a cycle length of 14 samples (twice it's +.IR count_val ), and .I field4 -10 samples (the default value, since its -.I count +has a cycle length 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 .BR GD_DEFAULT_LOOKBACK . - -.SH RETURN VALUE -On success, -.BR gd_mplex_lookback () -returns zero; on error it returns -1 and sets the dirfile error to a non-zero -value. Possible error values are: - -.TP -.B GD_E_BAD_DIRFILE -The supplied dirfile was invalid. -.PP -The dirfile error may be retrieved by calling -.BR gd_error (3). -A descriptive error string for the last error encountered can be obtained from a -call to -.BR gd_error_string (3). +This function always succeeds and returns no value. .SH SEE ALSO .BR dirfile (5), .BR dirfile-format (5), -.BR gd_error (3), -.BR gd_error_string (3), .BR gd_getdata (3). Modified: trunk/getdata/man/gd_nentries.3 =================================================================== --- trunk/getdata/man/gd_nentries.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_nentries.3 2012-04-21 02:52:38 UTC (rev 705) @@ -104,6 +104,7 @@ .RS .BI gd_nfields( dirfile ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", NULL, GD_ALL_ENTRIES, 0); @@ -113,6 +114,7 @@ .RS .BI gd_nfields_by_type( dirfile ", " type ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", NULL, " type ", 0);" @@ -122,6 +124,7 @@ .RS .BI gd_nmfields( dirfile ", " parent ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", " parent ", GD_ALL_ENTRIES, 0);" @@ -131,6 +134,7 @@ .RS .BI gd_nmfields_by_type( dirfile ", " parent ", " type ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", " parent ", " type ", 0);" @@ -140,6 +144,7 @@ .RS .BI gd_nmvectors( dirfile ", " parent ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", " parent ", GD_VECTOR_ENTRIES, 0);" @@ -149,6 +154,7 @@ .RS .BI gd_nvectors( dirfile ); .RE +.PP is equivalent to .RS .BI gd_nentries( dirfile ", NULL, GD_VECTOR_ENTRIES, 0);" Modified: trunk/getdata/man/gd_parent_fragment.3 =================================================================== --- trunk/getdata/man/gd_parent_fragment.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_parent_fragment.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_parent_fragment.3. The gd_parent_fragment man page. .\" -.\" Copyright (C) 2008, 2010 D. V. Wiebe +.\" Copyright (C) 2008, 2010, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_parent_fragment 3 "21 July 2010" "Version 0.7.0" "GETDATA" +.TH gd_parent_fragment 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_parent_fragment \(em retrieve the parent fragment of a fragment in a dirfile .SH SYNOPSIS @@ -21,7 +21,7 @@ .HP .nh .ad l -.BI "int gd_parent_fragment(const DIRFILE *" dirfile ", int " fragment_index ); +.BI "int gd_parent_fragment(DIRFILE *" dirfile ", int " fragment_index ); .hy .ad n .SH DESCRIPTION Modified: trunk/getdata/man/gd_put_carray_slice.3 =================================================================== --- trunk/getdata/man/gd_put_carray_slice.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_put_carray_slice.3 2012-04-21 02:52:38 UTC (rev 705) @@ -74,40 +74,40 @@ .IR data_in : .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number .TP -.IR GD_COMPLEX64 +.B GD_COMPLEX64 C99-conformant 64-bit single precision complex number .TP -.IR GD_COMPLEX128 +.B GD_COMPLEX128 C99-conformant 128-bit double precision complex number .RE Modified: trunk/getdata/man/gd_put_constant.3 =================================================================== --- trunk/getdata/man/gd_put_constant.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_put_constant.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_put_constant.3. The gd_put_constant man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_put_constant 3 "19 August 2011" "Version 0.8.0" "GETDATA" +.TH gd_put_constant 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_put_constant \(em retrieve a scalar constant from a dirfile database .SH SYNOPSIS @@ -50,35 +50,41 @@ return type of the data: .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 \~or\~ GD_FLOAT +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 \~or\~ GD_DOUBLE +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number +.TP +.B GD_COMPLEX64 +C99-conformant 64-bit single precision complex number +.TP +.B GD_COMPLEX128 +C99-conformant 128-bit double precision complex number .RE The data type of the supplied value need not be the same as the type of the Modified: trunk/getdata/man/gd_putdata.3 =================================================================== --- trunk/getdata/man/gd_putdata.3 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/gd_putdata.3 2012-04-21 02:52:38 UTC (rev 705) @@ -1,6 +1,6 @@ .\" gd_putdata.3. The gd_putdata man page. .\" -.\" Copyright (C) 2008, 2009, 2010, 2011 D. V. Wiebe +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe .\" .\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" .\" @@ -13,7 +13,7 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_putdata 3 "14 October 2011" "Version 0.8.0" "GETDATA" +.TH gd_putdata 3 "21 April 2012" "Version 0.8.0" "GETDATA" .SH NAME gd_putdata \(em write data to a dirfile database .SH SYNOPSIS @@ -95,35 +95,41 @@ the input data: .RS .TP 11 -.I GD_UINT8 +.B GD_UINT8 unsigned 8-bit integer .TP -.I GD_INT8 +.B GD_INT8 signed (two's complement) 8-bit integer .TP -.I GD_UINT16 +.B GD_UINT16 unsigned 16-bit integer .TP -.I GD_INT16 +.B GD_INT16 signed (two's complement) 16-bit integer .TP -.I GD_UINT32 +.B GD_UINT32 unsigned 32-bit integer .TP -.I GD_INT32 +.B GD_INT32 signed (two's complement) 32-bit integer .TP -.I GD_UINT64 +.B GD_UINT64 unsigned 64-bit integer .TP -.I GD_INT64 +.B GD_INT64 signed (two's complement) 64-bit integer .TP -.IR GD_FLOAT32 \~or\~ GD_FLOAT +.B GD_FLOAT32 IEEE-754 standard 32-bit single precision floating point number .TP -.IR GD_FLOAT64 \~or\~ GD_DOUBLE +.B GD_FLOAT64 IEEE-754 standard 64-bit double precision floating point number +.TP +.B GD_COMPLEX64 +C99-conformant 64-bit single precision complex number +.TP +.B GD_COMPLEX128 +C99-conformant 128-bit double precision complex number .RE The type of the input data need not be the same as the type of the data stored @@ -241,7 +247,6 @@ supported by the library. See .BR dirfile-encoding (5) for details on dirfile encoding schemes. -.RE .PP The dirfile error may be retrieved by calling .BR gd_error (3). Modified: trunk/getdata/man/make_html.pl =================================================================== --- trunk/getdata/man/make_html.pl 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/man/make_html.pl 2012-04-21 02:52:38 UTC (rev 705) @@ -2,6 +2,8 @@ use strict; +my @dlstack = (); + die unless $ARGV[0]; my $f = $ARGV[0]; my $a = $ARGV[1]; @@ -35,24 +37,70 @@ @t; } +sub FromTo { + my ($from, $to) = @_; + my $codes; + + return "" if ($from eq $to); + + $codes .= "</$from>" unless ($from eq "R"); + $codes .= "<$to>" unless ($to eq "R"); + + $codes; +} + +sub FixFont { + my ($cur, $string) = @_; + my $out; + + $out .= FromTo("R", $cur); + + my @c = split //, $string; + + for (my $i = 0; $i <= $#c; ++$i) { + if ($c[$i] eq '\\' and $c[$i + 1] eq 'f') { + my $new = $c[$i + 2]; + die $string unless $new; + $out .= FromTo($cur, $new); + $cur = $new; + $i += 2; + } else { + $out .= $c[$i]; + } + } + + $out .= FromTo($cur, "R"); + + $out; +} + sub Alternate { - my $s = 0; - my $h = ""; - my @t = Splitify($_[4]); + my @types; + my $string; + ($types[0], $types[1], $string) = @_; + my $s = 1; + my @t = Splitify($string); + my $h = shift @t; for (@t) { - $h .= $_[$s] . $_ . $_[$s + 1]; - $s = 2 - $s; + $h .= "\\f" . $types[$s] . $_; + $s = 1 - $s; } - $h; + FixFont($types[0], $h); } my $dl = 0; +my $rs = 0; +my $pd = 0; my $ul = 0; my $nf = 0; my $header = 0; my $table = 0; +my $dl_end = 0; +my $pd_data; +my $vers="Version 0.0.0"; +my $date="Date unknown."; open F, $f or die $!; while(<F>) { next if (/^\.\\"/); @@ -62,10 +110,24 @@ } $_ = ".IP" if ($_ =~ /\.in /); $_ = ".PP" if ($_ eq ".in"); + + #strip email addresses? + if (/^<[^ ]*@[^ ]*>./) { + $html .= ". "; + next; + } + + s/\\-/-/g; s/&/&/g; s/</</g; s/>/>/g; - s/\\\(em/—/g; + s/\\t/ /g; + s/\\\|/ /g; + s/""""/""/g; + s/\\e"/\\"/g; + s/ *\\\(em */—/g; + s/\\\(co/©/g; + s/ -([0-9])/ −$1/g; s/ / /g if ($nf and not /^\./); @@ -77,7 +139,7 @@ $html .= '<DIV CLASS="inset"><TABLE>'; $header = 1; } elsif (/^\.TE/) { - $html .= "</TABLE></DIV"; + $html .= "</TABLE></DIV>"; $table = 0; } elsif (/cbscbs/ or /rlrl/) { ; @@ -94,62 +156,86 @@ next; } + #$html .= "[$dl+$#dlstack;$rs]"; if (/^\.TH (gd_\w*) 3 "(.*?)" "(.*?)"/) { - my $vers = $3; - my $date = $2; + $vers = $3; + $date = $2; my $func = $a || $1; $html .= '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" ' . '"http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD>' . '<META http-equiv="Content-Type" content="text/html;charset=utf-8" >' . '<LINK REL="stylesheet" HREF="/getdata.css" TYPE="text/css"><TITLE>' . $func . '(3) Manual Page</TITLE></HEAD><BODY><H1>' . $func . "(3)</H1>"; + } elsif (/^\.TH ([^ ]*) ([15]) "(.*?)" "(.*?)"/) { + $vers = $4; + $date = $3; + my $sect = $2; + my $name = $a || $1; + $html .= '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" ' . + '"http://www.w3.org/TR/html4/strict.dtd"><HTML><HEAD>' . + '<META http-equiv="Content-Type" content="text/html;charset=utf-8" >' . + '<LINK REL="stylesheet" HREF="/getdata.css" TYPE="text/css"><TITLE>' . + $name . "($sect) Manual Page</TITLE></HEAD><BODY><H1>" . $name . + "($sect)</H1>"; } elsif (/^[^.]/) { - $html .= $_ . " "; + $html .= FixFont("R", $_) . " "; } elsif (/^\.B (.*)/) { - if ($dl == 2) { - $html .= "<DT><B>$1</B></DT><DD>"; + if ($pd) { + $pd_data = $1; + } elsif ($dl == 2) { + $html .= "<DT>"; + if ($pd_data) { + $html .= FixFont("B", $pd_data) . "<BR>"; + $pd_data = undef; + } + $html .= FixFont("B", $1) . "</DT><DD>"; $dl = 1; } else { - $html .= "<B>$1</B> "; + $html .= FixFont("B", $1) . " "; } } elsif (/^\.BI (.*)/) { if ($dl == 2) { $html .= "<DT>"; - $html .= Alternate("<B>", "</B>", "<I>", "</I>", $1) . " "; + $html .= Alternate("B", "I", $1) . " "; $html .= "</DT><DD>"; $dl = 1; } else { - $html .= Alternate("<B>", "</B>", "<I>", "</I>", $1) . " "; + $html .= Alternate("B", "I", $1) . " "; } } elsif (/^\.BR (.*)/) { if ($dl == 2) { $html .= "<DT>"; - $html .= Alternate("<B>", "</B>", "", "", $1) . " "; + $html .= Alternate("B", "R", $1) . " "; $html .= "</DT><DD>"; $dl = 1; } else { - $html .= Alternate("<B>", "</B>", "", "", $1) . " "; + $html .= Alternate("B", "R", $1) . " "; } } elsif (/^\.DP$/) { $html .= "<P>"; } elsif (/^\.HP$/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; + if ($dl == 1) { $html .= "</DD></DL>"; $dl = pop(@dlstack) || 0; }; if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; $html .= '<P class="hang">'; } elsif (/^\.I (.*)/) { - $html .= "<I>$1</I> "; + if ($dl == 2) { + $html .= "<DT>" . FixFont("I", $1) . "</DT><DD>"; + $dl = 1; + } else { + $html .= FixFont("I", $1) . " "; + } } elsif (/^\.IB (.*)/) { if ($dl == 2) { $html .= "<DT>"; - $html .= Alternate("<I>", "</I>", "<B>", "</B>", $1) . " "; + $html .= Alternate("I", "B", $1) . " "; $html .= "</DT><DD>"; $dl = 1; } else { - $html .= Alternate("<I>", "</I>", "<B>", "</B>", $1) . " "; + $html .= Alternate("I", "B", $1) . " "; } } elsif (/^\.IP \\\(bu/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; + if ($dl == 1) { $html .= "</DD></DL>"; $dl = pop(@dlstack) || 0; }; if ($ul == 1) { $html .= "<LI>"; } else { @@ -157,63 +243,102 @@ $ul = 1; } } elsif (/^\.IP/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; - $html .= '<P class="inset">'; + if ($dl and not $rs) { + $html .= '<P>'; + } else { + $html .= '<P class="inset">'; + } } elsif (/^\.IR (.*)/) { - $html .= Alternate("<I>", "</I>", "", "", $1) . " "; - } elsif (/^\.PP$/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; + if ($dl == 2) { + $html .= "<DT>"; + $html .= Alternate("I", "R", $1) . " "; + $html .= "</DT><DD>"; + $dl = 1; + } else { + $html .= Alternate("I", "R", $1) . " "; + } + } elsif (/^\.PP?$/) { + $dl_end = 0; + if ($dl == 1) { + $dl_end = 3; + $html .= "</DD></DL>"; + if ($rs) { + $dl = 0; + } else { + $dl = pop(@dlstack) || 0; + } + } + if ($rs == 2) { $html .= '</DIV>'; $rs = 1; } if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; $html .= "<P>"; + } elsif (/^\.PD 0/) { + if ($dl_end) { + $dl_end = 0; + $dl = 1; + # chop off "</DD></DL><P>" + for (my $i = 0; $i < length("</DD></DL><P>"); ++$i) { + chop $html; + } + } + $pd = 1; } elsif (/^\.PD/) { - ; + $pd = 0; } elsif (/^\.RB (.*)/) { if ($dl == 2) { $html .= "<DT>"; - $html .= Alternate("", "", "<B>", "</B>", $1) . " "; + $html .= Alternate("R", "B", $1) . " "; $html .= "</DT><DD>"; $dl = 1; } else { - $html .= Alternate("", "", "<B>", "</B>", $1) . " "; + $html .= Alternate("R", "B", $1) . " "; } } elsif (/^\.RE/) { - $html .= '</DIV>'; + if ($dl == 1) { $html .= "</DD></DL>" } + if ($rs == 2) { $html .= '</DIV>' } + $dl = pop @dlstack; + $rs = 0; } elsif (/^\.RI (.*)/) { if ($dl == 2) { $html .= "<DT>"; - $html .= Alternate("", "", "<I>", "</I>", $1) . " "; + $html .= Alternate("R", "I", $1) . " "; $html .= "</DT><DD>"; $dl = 1; } else { - $html .= Alternate("", "", "<I>", "</I>", $1) . " "; + $html .= Alternate("R", "I", $1) . " "; } } elsif (/^\.RS/) { - $html .= '<DIV CLASS="inset">' + $html .= '<DIV CLASS="inset">'; + push @dlstack, $dl; + $rs = 2; + $dl = 0; } elsif (/^\.SH (.*)/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; + if ($dl == 1) { $html .= "</DD></DL>"; $dl = pop(@dlstack) || 0; }; if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; - $html .= "<H2>$1</H2>"; + $html .= "<H2>$1</H2><P>"; } elsif (/^\.SS (.*)/) { - if ($dl == 1) { $html .= "</DD></DL>"; $dl = 0; }; + if ($dl == 1) { $html .= "</DD></DL>"; $dl = pop(@dlstack) || 0; }; if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; - $html .= "<H3>$1</H3>"; + $html .= "<H3>$1</H3><P>"; } elsif (/^\.TP/) { if ($ul == 1) { $html .= "</UL>"; $ul = 0; }; if ($dl == 1) { - $html .= "</DD>"; $dl = 0; + $html .= "</DD>"; } else { + push @dlstack, $dl if ($dl); $html .= "<DL>"; } $dl = 2; next; } elsif (/\.TS/) { $table = 1; + } elsif (/^\.br/) { + $html .= "<BR>"; } elsif (/\.fam C/) { $html .= "<tt>"; next; @@ -234,11 +359,18 @@ $html .= $_; } $html .= "<BR>" if $nf; + $dl_end-- if ($dl_end); } $html .= "</BODY></HTML>"; +$html =~ s/ \* / × /g; $html =~ s/\\~/ /g; $html =~ s/(<B>(gd_\w*?)<\/B>\(3\))/<A HREF="$2.3.html">$1<\/A>/g; +$html =~ s/((?:<B>)?(dirfile[-a-z]*)(?:<\/B>)?\(5\))/<A HREF="$2.5.html">$1<\/A>/g; +$html =~ s/\\e/\\/g; + +$html .= "<HR><P><I>Last updated on $date for GetData $vers.</I>"; + print $html; Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/src/getdata.h.in 2012-04-21 02:52:38 UTC (rev 705) @@ -824,7 +824,7 @@ extern int gd_move_alias(DIRFILE *dirfile, const char *field_code, int new_fragment) gd_nothrow gd_nonnull ((1,2)); -extern int gd_mplex_lookback(DIRFILE *dirfile, int lookback) gd_nothrow +extern void gd_mplex_lookback(DIRFILE *dirfile, int lookback) gd_nothrow gd_nonnull((1)); extern const char **gd_mstrings(DIRFILE *dirfile, const char *parent) gd_nothrow Modified: trunk/getdata/src/globals.c =================================================================== --- trunk/getdata/src/globals.c 2012-04-20 01:05:08 UTC (rev 704) +++ trunk/getdata/src/globals.c 2012-04-21 02:52:38 UTC (rev 705) @@ -160,20 +160,13 @@ return 0; } -int gd_mplex_lookback(DIRFILE *D, int lookback) gd_nothrow +void gd_mplex_lookback(DIRFILE *D, int lookback) gd_nothrow { dtrace("%p, %i", D, lookback); - if (D->flags & GD_INVALID) { - _GD_SetError(D, GD_E_BAD_DIRFILE, 0, NULL, 0, NULL); - dreturn("%i", -1); - return -1; - } - _GD_ClearError(D); D->lookback = lookback; - dreturn("%i", 0); - return 0; + dreturnvoid(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-20 01:05:16
|
Revision: 704 http://getdata.svn.sourceforge.net/getdata/?rev=704&view=rev Author: ketiltrout Date: 2012-04-20 01:05:08 +0000 (Fri, 20 Apr 2012) Log Message: ----------- Install perl. Modified Paths: -------------- trunk/getdata/Makefile.am trunk/getdata/bindings/perl/Makefile.am trunk/getdata/doc/Makefile.am trunk/getdata/m4/perl.m4 trunk/getdata/man/Makefile.am Modified: trunk/getdata/Makefile.am =================================================================== --- trunk/getdata/Makefile.am 2012-04-19 23:41:04 UTC (rev 703) +++ trunk/getdata/Makefile.am 2012-04-20 01:05:08 UTC (rev 704) @@ -35,6 +35,7 @@ gpg -abo $@ $< DISTCHECK_CONFIGURE_FLAGS = --with-idl-dlm-dir="$$dc_install_base/idl" \ + --with-perl-dir="$$dc_install_base/perl" \ --with-python-module-dir="$$dc_install_base/python" # idl-only package Modified: trunk/getdata/bindings/perl/Makefile.am =================================================================== --- trunk/getdata/bindings/perl/Makefile.am 2012-04-19 23:41:04 UTC (rev 703) +++ trunk/getdata/bindings/perl/Makefile.am 2012-04-20 01:05:08 UTC (rev 704) @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST=funclist.pl GetData.xs simple_funcs.pl simple_funcs.xsin typemap \ - GetData.pm.in MANIFEST.in test/*.t + GetData.pm.in MANIFEST.in test/big_test.t test/callback.t if GETDATA_DEBUG TEST_VERBOSE=verbose=1 @@ -29,6 +29,14 @@ PERL_TESTS=t/big_test.t t/callback.t +man3dir=${perlmandir} +nodist_man3_MANS=blib/libdoc/GetData.3 + +nodist_perl_SCRIPTS=blib/lib/GetData.pm + +perlautogetdatadir=${perldir}/auto/GetData +nodist_perlautogetdata_SCRIPTS=blib/arch/auto/GetData/GetData.bs blib/arch/auto/GetData/GetData.so + t: mkdir t @@ -38,15 +46,13 @@ lib: mkdir lib -lib/GetData.xs: GetData.xs - $(MAKE) lib +lib/GetData.xs: lib GetData.xs cat $(srcdir)/GetData.xs > $@ -lib/typemap: typemap - $(MAKE) lib +lib/typemap: lib typemap cat $(srcdir)/typemap > $@ -lib/simple_funcs.xs: simple_funcs.xsin simple_funcs.pl +lib/simple_funcs.xs: lib simple_funcs.xsin simple_funcs.pl $(PERL) $(srcdir)/simple_funcs.pl $(srcdir)/simple_funcs.xsin > $@ MANIFEST: MANIFEST.in @@ -65,25 +71,36 @@ $(PERL) $(srcdir)/funclist.pl lib/GetData.xs lib/simple_funcs.xs > $@ chmod a-w $@ -all-local: lib blib/arch/auto/GetData/GetData.bs - -blib/arch/auto/GetData/GetData.bs: Build +blib/arch/auto/GetData/GetData.bs: Build lib/GetData.xs lib/simple_funcs.xs \ + lib/typemap $(PERL) Build build touch $@ +blib/arch/auto/GetData/GetData.so: blib/arch/auto/GetData/GetData.bs + touch $@ + +blib/lib/GetData.pm: blib/arch/auto/GetData/GetData.bs + touch $@ + +blib/libdoc/GetData.3: blib/arch/auto/GetData/GetData.bs + touch $@ + .PRECIOUS: Build Build: Build.PL GetData.pm lib/GetData.xs lib/simple_funcs.xs lib/typemap \ MANIFEST $(PERL) Build.PL clean-local: - rm -rf lib + rm -rf lib blib if test -e Build; then \ $(PERL) Build clean; \ fi rm -f $(BUILT_SOURCES) make_parameters.sed MYMETA.yml MYMETA.json GetData.pm rm -rf Build _build MANIFEST t +uninstall-hook: + rmdir $(DESTDIR)${perlautogetdatadir} + if TEST_PERL check: $(PERL_TESTS) ${DL_LIBRARY_PATH}=${${DL_LIBRARY_PATH}}:../../src/.libs $(PERL) ./Build test ${TEST_VERBOSE} Modified: trunk/getdata/doc/Makefile.am =================================================================== --- trunk/getdata/doc/Makefile.am 2012-04-19 23:41:04 UTC (rev 703) +++ trunk/getdata/doc/Makefile.am 2012-04-20 01:05:08 UTC (rev 704) @@ -1,4 +1,4 @@ -# Copyright (C) 2008 D. V. Wiebe +# Copyright (C) 2008, 2012 D. V. Wiebe # ########################################################################## # @@ -36,12 +36,16 @@ READMEIDL=README.idl endif +if MAKE_PERLBINDINGS +READMEPERL=README.perl +endif + if MAKE_PYBINDINGS READMEPYTHON=README.python endif dist_doc_DATA = ${READMECXX} ${READMEF77} ${READMEF95} ${READMEIDL} \ - ${READMEPYTHON} unclean_database_recovery.txt + ${READMEPERL} ${READMEPYTHON} unclean_database_recovery.txt clean-local: rm -rf *~ Modified: trunk/getdata/m4/perl.m4 =================================================================== --- trunk/getdata/m4/perl.m4 2012-04-19 23:41:04 UTC (rev 703) +++ trunk/getdata/m4/perl.m4 2012-04-20 01:05:08 UTC (rev 704) @@ -176,5 +176,9 @@ AC_SUBST([perldir]) AC_MSG_RESULT([$perldir]) + AC_MSG_CHECKING([Perl man directory]) + AC_SUBST([perlmandir]) + AC_MSG_RESULT([$perlmandir]) + fi ]) Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-04-19 23:41:04 UTC (rev 703) +++ trunk/getdata/man/Makefile.am 2012-04-20 01:05:08 UTC (rev 704) @@ -68,7 +68,7 @@ gd_madd_bit.3:gd_madd_lincom.3 gd_madd_bit.3:gd_madd_linterp.3 \ gd_madd_bit.3:gd_madd_mplex.3 gd_madd_bit.3:gd_madd_multiply.3 \ gd_madd_bit.3:gd_madd_phase.3 gd_madd_bit.3:gd_madd_polynom.3 \ - d_madd_bit.3:gd_madd_recip.3 gd_madd_bit.3:gd_madd_sbit.3 \ + gd_madd_bit.3:gd_madd_recip.3 gd_madd_bit.3:gd_madd_sbit.3 \ gd_madd_bit.3:gd_madd_string.3 gd_madd_bit.3:gd_madd_window.3 \ gd_add.3:gd_madd.3 \ gd_add_spec.3:gd_madd_spec.3 \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-19 23:41:10
|
Revision: 703 http://getdata.svn.sourceforge.net/getdata/?rev=703&view=rev Author: ketiltrout Date: 2012-04-19 23:41:04 +0000 (Thu, 19 Apr 2012) Log Message: ----------- Fix IDL test. Modified Paths: -------------- trunk/getdata/bindings/idl/test/big_test.pro Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2012-04-19 23:36:06 UTC (rev 702) +++ trunk/getdata/bindings/idl/test/big_test.pro 2012-04-19 23:41:04 UTC (rev 703) @@ -1212,7 +1212,7 @@ nume += check_simple2(214, 6, n.uthreshold, 128) ; 217: gd_alter_window check -gd_alter_window, d, 'new18', in_field1='in3', in_field2='in4', /GE, $ +gd_alter_window, d, 'new18', in_field='in3', check_field='in4', /GE, $ threshold=32e3 nume += check_ok2(217, 1, d) @@ -1322,7 +1322,7 @@ nume += check_simple2(230, 5, n.count_max, 12) ; 231: gd_alter_mplex check -gd_alter_mplex, d, 'new21', in_field1='in3', in_field2='in4', count_val=2, $ +gd_alter_mplex, d, 'new21', in_field='in3', count_field='in4', count_val=2, $ count_max=7 nume += check_ok2(231, 1, d) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-19 23:36:16
|
Revision: 702 http://getdata.svn.sourceforge.net/getdata/?rev=702&view=rev Author: ketiltrout Date: 2012-04-19 23:36:06 +0000 (Thu, 19 Apr 2012) Log Message: ----------- * Perl docs + tweaks * Fix _GD_Add() protect bug. * Remove GNUisms to permit building on OpenBSD. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/cxx/test/Makefile.am trunk/getdata/bindings/f77/Makefile.am trunk/getdata/bindings/perl/Build.PL.in trunk/getdata/bindings/perl/GetData.pm.in trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/Makefile.am trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/perl/typemap trunk/getdata/man/gd_alter_bit.3 trunk/getdata/man/gd_move.3 trunk/getdata/man/gd_rename.3 trunk/getdata/src/add.c trunk/getdata/test/Makefile.am trunk/getdata/test/error_verbose.c trunk/getdata/test/error_verbose_prefix.c Added Paths: ----------- trunk/getdata/doc/README.perl Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/ChangeLog 2012-04-19 23:36:06 UTC (rev 702) @@ -1,3 +1,31 @@ +2012-04-19 D. V. Wiebe <ge...@ke...> svn:701 + * src/add.c (_GD_Add): Don't check protection level before figuring out the + fragment index. + + * bindings/perl/GetData.xs bindings/perl/typemap + bindings/perl/simple_funcs.pl: gdpu_spf_t -> gdpu_uint_t. + + * bindings/perl/GetData.xs (gdp_to_entry entry): Use "in_fields" everywhere + to be consistent with the C API. + + * bindings/perl/GetData.xs (mcarrays): Remove unpacked. Use GIMME_V + instead. + + * bindings/perl/simple_funcs.xsin (reference alter_phase add_window + alter_window alter_affixes add_mplex alter_mplex desync flags + verbose_prefix): Fix parameter defaults and types. + + * bindings/perl/Build.PL.in: Install GetData.pm + + * bindings/perl/simple_funcs.xsin (include include_affex): Deleted. + * bindings/perl/GetData.xs (include): Added. + + * doc/README.perl: Added. + * bindings/perl/GetData.pm.in: POD. + + * bindings/cxx/test/Makefile.am bindings/f77/Makefile.am test/Makefile.am + test/error_verbose.c test/error_verbose_prefix.c: Remove GNUisms. + 2012-04-13 D. V. Wiebe <ge...@ke...> svn:699 * src/common.c (_GD_CanonicalPath): Terminate and don't clobber string from realpath(). Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/NEWS 2012-04-19 23:36:06 UTC (rev 702) @@ -100,12 +100,12 @@ * BUG FIX: In previous versions, renaming a field with gd_rename() wouldn't update or invalidate the cache of fields which depended on the old name, - leading to surprising results. It will now either invalidate these fields + leading to surprising results. It will now either invalidate these fields' metadata caches or else change the name in those definitions as well. * BUG FIX: The invalid syntax "/META parent/child granchild ..." is now - properly rejected by the metadata parser. Previously it half-worked, - resulting in segfault in gd_close(). + properly rejected by the parser. Previously it half-worked, resulting in + a segfault in gd_close(). * BUG FIX: Several syntax errors encountered in PHASE and RECIP field specifications weren't being reported by the parser, leading to corrupted @@ -115,8 +115,8 @@ metadata to disk. Nor does it forget to put newlines after RECIP or DIVIDE field specifications. - * BUG FIX: GetData no longer assumes all fields have the same number of - samples-per-frame when computing a LINCOM. + * BUG FIX: GetData no longer assumes all LINCOM input fields have the same + number of samples per frame. * BUG FIX: Writing an empty fragment with GD_PRETTY_PRINT turned on no longer results in a floating-point exception. @@ -138,6 +138,12 @@ * BUG FIX: CARRAY indices provided to gd_add() in the entry.scalar_ind member are no longer ignored. Reported by S. J. Benton. + * BUG FIX: When adding a metafield with gd_(m)add(), GetData no longer checks + the protection of the fragment indexed by entry->fragment_index. Instead it + ignores entry->fragment_index completely (as the documentation indicates it + should) and checks the protection of the fragment containing the parent + field. + API Changes: * Functions which add fields (gd_add(), gd_add_<type>(), &c.) can now be used Modified: trunk/getdata/bindings/cxx/test/Makefile.am =================================================================== --- trunk/getdata/bindings/cxx/test/Makefile.am 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/cxx/test/Makefile.am 2012-04-19 23:36:06 UTC (rev 702) @@ -41,7 +41,7 @@ $(MAKE) getdata-clean-dirs getdata-clean-dirs: - rm -rvf *odirfile + rm -rf *odirfile clean-local: $(MAKE) getdata-clean-dirs Modified: trunk/getdata/bindings/f77/Makefile.am =================================================================== --- trunk/getdata/bindings/f77/Makefile.am 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/f77/Makefile.am 2012-04-19 23:36:06 UTC (rev 702) @@ -80,8 +80,8 @@ make_parameters.sed: make_parameters.stamp @if test ! -f $@; then \ - rm -f $<; \ - $(MAKE) $<; \ + rm -f make_parameters.stamp; \ + $(MAKE) make_parameters.stamp; \ fi if HAVE_DIFF @@ -106,10 +106,10 @@ getdata.f: $(srcdir)/getdata.f.in make_parameters.sed rm -f $@ - $(SED) -f make_parameters.sed $< > $@ + $(SED) -f make_parameters.sed $(srcdir)/getdata.f.in > $@ chmod a-w $@ getdata.f90: $(srcdir)/getdata.f90.in make_parameters.sed rm -f $@ - $(SED) -f make_parameters.sed $< > $@ + $(SED) -f make_parameters.sed $(srcdir)/getdata.f90.in > $@ chmod a-w $@ Modified: trunk/getdata/bindings/perl/Build.PL.in =================================================================== --- trunk/getdata/bindings/perl/Build.PL.in 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/Build.PL.in 2012-04-19 23:36:06 UTC (rev 702) @@ -27,6 +27,7 @@ include_dirs => '@top_srcdir@/src', license => 'lgpl', module_name => "GetData", + pm_files => { 'GetData.pm' => 'lib/GetData.pm' }, release_status => "testing", requires => { perl => '5.6.0', Modified: trunk/getdata/bindings/perl/GetData.pm.in =================================================================== --- trunk/getdata/bindings/perl/GetData.pm.in 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/GetData.pm.in 2012-04-19 23:36:06 UTC (rev 702) @@ -29,10 +29,10 @@ require Math::Complex; our @ISA = qw(Exporter); -our %EXPORT_TAGS = ( 'all' => [ qw(VERSION @FUNCLIST@ @PARAMLIST@) ], -'constants' => [ qw(VERSION @PARAMLIST@) ], 'functions' => [ qw(@FUNCLIST@) ]); +our %EXPORT_TAGS = ('all' => [qw(VERSION @FUNCLIST@ @PARAMLIST@)], +'constants' => [qw(VERSION @PARAMLIST@)], 'functions' => [qw(@FUNCLIST@)]); -our @EXPORT_OK = ( @{$EXPORT_TAGS{'all'}} ); +our @EXPORT_OK = (@{$EXPORT_TAGS{'all'}}); our @EXPORT = qw(); @PARAMETERS@ @@ -54,8 +54,8 @@ # the following calls are equivalent my $data = GetData::getdata($DIRFILE, "field", 5, 0, 1, - GetData::UINT8); - my $data = $DIRFILE->getdata("field", 5, 0, 1, GetData::UINT8); + $GetData::UINT8); + my $data = $DIRFILE->getdata("field", 5, 0, 1, $GetData::UINT8); =head1 DESCRIPTION @@ -65,59 +65,1162 @@ These methods have the same name as their C counterparts, excluding the C namespace prefix `gd_' (or `GD_', for C preprocessor constants). -The dirfile lvalue returned by GetData::cbopen or GetData::cbopen is a -simplistic object. Any GetData method which takes a dirfile as a parameter, -may instead be called as method of the dirfile object itself. (See the -synopsis above for an example.) Dirfile metadata entries (which are C structs -of type gd_entry_t) are represented as simple hashes. +The dirfile lvalue returned by GetData::open is a simplistic object. Any +GetData method which takes a dirfile as a parameter, may instead be called as +method of the dirfile object itself. (See the synopsis above for an example.) +Dirfile metadata entries (which are C structs of type gd_entry_t) are +represented as simple hashes. By default, GetData does not export any symbols. All symbols in the GetData package may be exported with: use GetData "all"; -but this is discouraged, as it will overwrite useful things like &open. +but this is discouraged, as it will overwrite useful things like &CORE::open. -=head1 METHODS +Throughout the module, complex data are generally represented as +C<Math::Complex> objects, but may be simplified to ordinary floating point +numbers if the imaginary part is zero. +=head1 CONSTANTS + +The module defines a large number of symbolic constants used by the API which +mirror the constants defined in the C API. The "constants" tag may be used to +export just the constants from the module, if desired. Some genericly useful +sets of constants are discussed below. Other constants are discussed in the +method descriptions where they are used. + +=head2 Data Types + +GetData knows the following data types: + =over -=item cbopen ( DIRFILENAME, FLAGS, SEHANDLER, EXTRA ) +=item $GetData::NULL -Create or open a Dirfile database called DIRFILENAME. FLAGS should be either -$GetData::RDONLY (for read-only access) or $GetData::RDWR (for read-write -access), optionally bitwise or'd with any of the flags listed in the -gd_cbopen(3) manual page. +the null data type, which returns no data. -SEHANDLER is a Perl callback function which will be executed whenever a syntax -error is encountered. It may be undef, if no callback is desired (but see the -open() method in that case). If called, SEHANDLER will be passed two arguments. -The first is a reference to a hash containing the parser data. The second is -the EXTRA object passed to cbopen(). SEHANDLER is called in scalar context, -and should return either: +=item $GetData::UINT8 +unsigned 8-bit integer + +=item $GetData::INT8 + +signed (two's complement) 8-bit integer + +=item $GetData::UINT16 + +unsigned 16-bit integer + +=item $GetData::INT16 + +signed (two's complement) 16-bit integer + +=item $GetData::UINT32 + +unsigned 32-bit integer + +=item $GetData::INT32 + +signed (two's complement) 32-bit integer + +=item $GetData::UINT64 + +unsigned 64-bit integer + +=item $GetData::INT64 + +signed (two's complement) 64-bit integer + +=item $GetData::FLOAT32 + +IEEE-754 standard 32-bit single precision floating point number + +=item $GetData::FLOAT64 + +IEEE-754 standard 64-bit double precision floating point number + +=item $GetData::COMPLEX64 + +FORTRAN and C99 conformant 64-bit single precision floating point complex number + +=item $GetData::COMPLEX128 + +FORTRAN and C99 conformant 128-bit double precision floating point complex +number + +=back + +=head2 Encoding Types + +The following encoding types are known by GetData: + =over -=item * an integer, one of the $GetData::SYNTAX_... constants; or +$GetData::BZIP2_ENCODED, +$GetData::GZIP_ENCODED, +$GetData::LZMA_ENCODED, +$GetData::SIE_ENCODED, +$GetData::SLIM_ENCODED, +$GetData::TEXT_ENCODED, +$GetData::ZZIP_ENCODED, +$GetData::ZZSLIM_ENCODED, +$GetData::UNENCODED. -=item * a string containing the corrected line, in which case -$GetData::SYNTAX_RESCAN is assumed; or, +=back -=item * a reference to a list consisting of an integer, one of the -$GetData::SYNTAX_... constants, and then, optionally, a string containing the -corrected line. +Details of these encoding types are given in the dirfile-format(5) manual page. +=head2 Entry Types + +The following symbols are used to indicate entry types: + +=over + +$GetData::NO_ENTRY, +$GetData::BIT_ENTRY, +$GetData::CARRAY_ENTRY, +$GetData::CONST_ENTRY, +$GetData::DIVIDE_ENTRY, +$GetData::INDEX_ENTRY, +$GetData::LINCOM_ENTRY, +$GetData::LINTERP_ENTRY, +$GetData::MPLEX_ENTRY, +$GetData::MULTIPLY_ENTRY, +$GetData::PHASE_ENTRY, +$GetData::POLYNOM_ENTRY, +$GetData::RAW_ENTRY, +$GetData::RECIP_ENTRY, +$GetData::SBIT_ENTRY, +$GetData::STRING_ENTRY, +$GetData::WINDOW_ENTRY + =back +Of these, C<$GetData::NO_ENTRY> is used to flag invalid entry types and +C<$GetData::INDEX_ENTRY> is used only for the implicit B<INDEX> field. See +gd_entry(3) and dirfile-format(5) for details of the other entry types. + +=head2 WINDOW Operators + +The following symbols are used to indicate WINDOW operators: + +=over + +$GetData::WINDOP_EQ, +$GetData::WINDOP_GE, +$GetData::WINDOP_GT, +$GetData::WINDOP_LE, +$GetData::WINDOP_LT, +$GetData::WINDOP_NE, +$GetData::WINDOP_CLR, +$GetData::WINDOP_SET. + +=back + +=head1 INPUT DATA + +Functions which take sets of data as input (L<add_carray>, L<madd_carray>, +L<put_carray>, L<put_carray_slice>, and L<putdata>) accept data in a number of +ways. The arguments specifying the data always appear at the end of the +argument list. They are represented as C<{DATA...}> in the method descriptions +below. Input data arguments are parsed as follows. + +=over + +=item 1. + +If the first data argument is undef, then it is ignored and all subsequent +arguments are taken as data: + + $dirfile->putdata("field_code", $first_frame, $first_sample, + undef, @data) + +or + + $dirfile->putdata("field_code", $first_frame, $first_sample, + undef, $data[0], $data[1], $data[2], ...) + +=item 2. + +Otherwise, if the first data argument is a reference to an array, the array is +taken as data (and any further arguments are ignored): + + $dirfile->putdata("field_code", $first_frame, $first_sample, + \@data) + +=item 3. + +Otherwise, if only two arguments make up the data argument list, and the second +is a reference to an array, the first is taken as a type code specifing the +conversion type, and the second is taken as the data: + + $dirfile->putdata("field_code", $first_frame, $first_sample, + $GetData::UINT8, @data) + +=item 4. + +Otherwise, if only two arguments make up the data argument list, and the second +is not a reference to an array, the first is, again, taken as a type code, and +the second is assumed to be a packed string containing the data in a format +appropriate for the type code specified: + + $packed_data = pack("C", @data) + $dirfile->putdata("field_code", $first_frame, $first_sample, + $GetData::UINT8, $packed_data) + +=item 5. + +Otherwise, finally, the data argument list elements are simply taken as data +themselves: + + $dirfile->putdata("field_code", $first_frame, $first_sample, + @data) + +or + + $dirfile->putdata("field_code", $first_frame, $first_sample, + $data[0], $data[1], $data[2], ...) + + +=back + +GetData internally converts the Perl data into a format readably by the C API. +In cases 3 and 4 above, the type the data is converted into is specified +explicitly in the call. In the other cases, GetData must guess an appropriate +C type into which to convert the data. It does so by looking at the first +data value: + +=over + +=item * + +if the value is a C<Math::Complex> object, the data are converted to double +precision complex data (C<COMPLEX128>) + +=item * + +if the value is an integer, the data are converted to a 64-bit signed integer +(C<INT64>) + +=item * + +otherwise, the data are converted to a double precision float (C<FLOAT64>). + +=back + +Of the above methods, the first is only necessary when the data array has only +two elements, and so would be mistaken for method four if specified without the +initial undef. Furthermore, the fourth method is typically the most efficient, +since the packed data scalar can often be used as the input to the C API without +need for type conversion. + +=head1 ENTRY HASHES + +The replacement for the C<gd_entry_t> object of the C API is a simple hash. The +key names are the same as the names of the C<gd_entry_t> members. (See +gd_entry(3) for details). + +In entry hashes returned by GetData, only those keys appropriate for the entry +type specified will be present. Entry hashes passed to GetData from the caller +may have other keys than those required by the entry type. They will be +ignored. + +The value associated with the C<field_type> key will be one of the symbols +listed under L</"Entry Types"> above. For entry types which have (potentially) +more than one input field (DIVIDE, LINCOM, MPLEX, MULTIPLY, WINDOW), the value +associated with the C<"in_fields"> key will be a list of strings, regardless of +how many elements it has; other entry types which provide C<"in_fields"> will be +a scalar, even though the key name is still plural. + +Elements of the C<scalar> array which are undef indicate literal parameters +(equivalent to C<NULL> in the C<gd_entry_t>'s C<scalar> member). Similarly, +undef is used in C<scalar_ind> where the C API uses -1, to indicate CONST +fields, instead of CARRAYs. + +=head1 DIRFILE CREATION METHODS + +=over + +=item open ($DIRFILENAME, $FLAGS, $SEHANDLER=undef, $EXTRA=undef) + +Create or open a Dirfile database called C<$DIRFILENAME>. C<$FLAGS> should be +either C<$GetData::RDONLY> (for read-only access) or C<$GetData::RDWR> (for +read-write access), optionally bitwise or'd with any of the following flags: + +=over + +$GetData::ARM_ENDIAN, +$GetData::BIG_ENDIAN, +$GetData::CREAT, +$GetData::EXCL, +$GetData::FORCE_ENCODING, +$GetData::FORCE_ENDIAN, +$GetData::IGNORE_DUPS, +$GetData::IGNORE_REFS, +$GetData::LITTLE_ENDIAN, +$GetData::NOT_ARM_ENDIAN, +$GetData::PEDANTIC, +$GetData::PERMISSIVE, +$GetData::PRETTY_PRINT, +$GetData::TRUNC, +$GetData::TRUNCSUB, +$GetData::VERBOSE, + +=back + +and at most one of the encoding symbols listed above in the L</"Encoding Types"> +section or else C<$GetData::AUTO_ENCODED> indicating that GetData should attempt +to automatically determine the encoding. The meaning of the dirfile flags +may be found in the gd_cbopen(3) manual page. + +$SEHANDLER is a Perl callback function which will be executed whenever a syntax +error is encountered. It may be undef, if no callback is desired. When +called, C<$SEHANDLER> will be passed two arguments. The first is a reference to +a hash containing the parser data. The second is the C<$EXTRA> scalar passed to +this method. C<$SEHANDLER> is called in scalar context, and should return +either: + +=over + +=item * + +an integer, one of the symbolic constants: + +=over + +$GetData::SYNTAX_ABORT, +$GetData::SYNTAX_CONTINUE, +$GetData::SYNTAX_IGNORE, +$GetData::SYNTAX_RESCAN; + +=back + +(see gd_cbopen(3) for their meaning), or + +=item * + +a string containing the corrected line, in which case C<$GetData::SYNTAX_RESCAN> +is assumed; or, + +=item * + +a reference to a list consisting of an integer, one of the +C<$GetData::SYNTAX_...> constants listed above, and then, optionally, a string +containing the corrected line. + +=back + This function always returns a valid Dirfile object, even if the call failed; -the caller should check GetData::error() on the returned dirfile to test for +the caller should use the returned dirfile's L<error>() method to test for success. +=item invalid_dirfile () + +This function always returns a newly created, but invalid, Dirfile object. +Unlike an invalid dirfile created (either accidentally or purposefully) using +L<open>(), the dirfile returned by this function always has a zero error code. +See gd_invalid_dirfile(3). + =back +=head1 DIRFILE OBJECT METHODS + +The following methods all operate on a dirfile object returned by one of the +above methods and can either be called as: + + $GetData::method($dirfile, ...) + +or else, as + + $dirfile->method(...) + +without change in operation. + +=head2 List of Methods + +=over + +=item $dirfile->add_carray ($FIELD_NAME, $DATA_TYPE, $FRAGMENT_INDEX, +{DATA...}) + +Adds a new CARRAY field called C<$FIELD_NAME> to the metadata fragment indexed +by C<$FRAGMENT_INDEX>. The storage type of the CARRAY is given by +C<$DATA_TYPE>, which should be one of the symbols listed above under +L</"Data Types">. The value of the CARRAY is then set to the data given in +the C<{DATA...}> argument list, which also determines its length. See the +L</"Input Data"> section above for details on the allowed forms of C<{DATA...}>. +See gd_add_carray(3). + +=item $dirfile->add_const ($FIELD_NAME, $DATA_TYPE, [$VALUE, $FRAGMENT_INDEX]) + +Adds a new CONST field called C<$FIELD_NAME> to the metadata fragment indexed +by C<$FRAGMENT_INDEX>, or to the primary format file if omitted. The +C<$DATA_TYPE> argument indicates the storage type, which should be one of the +symbols listed above under L</"Data Types">. If given, the value of the field +is set to C<$VALUE>, otherwise the field will be initialised to zero. See +gd_add_const(3). + +=item $dirfile->aliases ($FIELD_CODE) + +In scalar context, returns the number of aliases of C<$FIELD_CODE>. In list +context, returns an array of alias names for C<$FIELD_CODE>. See gd_naliases(3) +and gd_aliases(3). + +=item $dirfile->carrays ($RETURN_TYPE) + +Returns the value of all carrays (excluding metafields) in the dirfile after +converting them to the return type C<$RETURN_TYPE>, which should be one of the +symbols listed under L</"Data Types"> above. If called in scalar context, +returns a reference to an array of packed string data. If called in list +context, returns an array of arrays of unpacked data. See gd_carrays(3). + +=item $dirfile->close () + +Closes the dirfile, writing changes to disk. Upon successful completion, the +dirfile object will be invalidated, prohibiting further operation on it. A +dirfile which is destroyed by garbage collection is discarded (see L</"discard"> +below). This function should be called if metadata need to be written to disk +before the object goes out of scope. See gd_close(3). + +=item $dirfile->constants ($RETURN_TYPE) + +Returns the value of all constants (excluding metafields) in the dirfile after +converting them to the return type C<$RETURN_TYPE>, which should be one of the +symbols listed under L</"Data Types"> above. If called in scalar context, +returns a packed string containing the data. If called in list context, the +data will be unpacked and returned as an array. See gd_constants(3). + +=item $dirfile->discard () + +Closes the dirfile, ignoring changes to metadata, but writing changed data to +disk. Upon successful completion, the dirfile object will be invalidated, +prohibiting further operation on it. This function is called automatically by +the dirfile destructor, and need not be called explicitly. To save the metadata +on close, use L</close>. See gd_discard(3). + +=item $dirfile->entry ($FIELD_CODE) + +If called in scalar context, returns the entry type of C<$FIELD_CODE>, one +of the symbols listed above under L</"Entry Types">. In array context, returns +a hash describing the indicated field. See gd_entry_type(3) and gd_entry(3). + +=item $dirfile->entry_list ($PARENT, $TYPE, $FLAGS) + +In scalar context, returns the number of entries matching the supplied criteria. +In list context, returns an array of the names of the entries. If C<$PARENT> +is undef, top-level entries are considered, otherwise meta entries under +C<$PARENT> are considered. If C<$TYPE> is one of the entry types listed above +under L</"Entry Types">, only entries of that type are considered. Alternatley, +C<$TYPE> may be one of: + +=over + +$GetData::ALL_ENTRIES, +$GetData::SCALAR_ENTRIES, +$GetData::VECTOR_ENTRIES. + +=back + +Setting C<$TYPE> to undef is equivalent to setting it to +C<$GetData::ALL_ENTRIES>. If not undef, which is treated as zero, C<$FLAGS> +should be zero or more of the following flags: + +=over + +$GetData::ENTRIES_HIDDEN, +$GetData::ENTRIES_NOALIAS. + +=back + +See gd_nentries(3) and gd_entry_list(3) for the meaning of these symbols. + +=item $dirfile->error () + +Returns the error code of the last operation on this dirfile. See gd_error(3). + +=item $dirfile->error_string () + +Returns a string describing the error encountered (if any) by the last operation +on this dirfile. See gd_error_string(3). + +=item $dirfile->field_list () + +Equivalent to: C<$dirfile-E<gt>entry_list(undef, undef, undef)>. + +=item $dirfile->field_list_by_type ($TYPE) + +Equivalent to: C<$dirfile-E<gt>entry_list(undef, $TYPE, undef)>. + +=item $dirfile->fragment_affixes ($FRAGMENT_INDEX) + +Returns an array containing the prefix (first) and suffix (second) of the +fragment indexed by C<$FRAGMENT_INDEX>. See gd_fragment_affixes(3). + +=item $dirfile->fragments () + +In scalar context, returns the number of metadata fragments in the dirfile. +In list context, returns an array of pathnames to the fragments on disk, in the +order that they're indexed. See gd_nfragments(3) and gd_fragmentname(3). + +=item $dirfile->get_carray ($FIELD_CODE, $RETURN_TYPE) + +Returns the value of the CARRAY named C<$FIELD_CODE> after converting its +elements to the return type C<$RETURN_TYPE>, which should be one of the symbols +listed under L</"Data Types"> above. If called in scalar context, returns a +packed string containing the data. If called in list context, the data will be +unpacked and returned as an array. See gd_get_carray(3). + +=item $dirfile->get_carray_slice ($FIELD_CODE, $START, $LEN, $RETURN_TYPE) + +Returns the value of a portion of the CARRAY named C<$FIELD_CODE> after +converting its elements to the return type C<$RETURN_TYPE>, which should be one +of the symbols listed under L</"Data Types"> above. The first element returned +is given by C<$START>, and the number of elements by C<$LEN>. If called in +scalar context, returns a packed string containing the data. If called in list +context, the data will be unpacked and returned as an array. Less data than +requested may be returned, if insufficient data exists. See +gd_get_carray_slice(3). + +=item $dirfile->get_constant ($FIELD_CODE, $RETURN_TYPE) + +Returns the value of the CONST named C<$FIELD_CODE> after converting it to the +return type C<$RETURN_TYPE>, which should be one of the symbols listed under +L</"Data Types"> above. See gd_get_constant(3). + +=item $dirfile->getdata ($FIELD_CODE, $FIRST_FRAME, $FIRST_SAMP, $NUM_FRAMES, +$NUM_SAMP, $RETURN_TYPE) + +Returns data from the field specified by C<$FIELD_CODE> after converting them +to the return type C<$RETURN_TYPE>, which should be one of the symbols listed +under L</"Data Types"> above. The first sample returned is C<$FIRST_SAMP> +samples after the start of C<$FIRST_FRAME> and the amount of data returned is +L<$NUM_FRAMES> frames plus L<$NUM_SAMP> samples. If called in scalar context +returns a string of packed data. If called in array context, the data will be +unpacked and returned as an array. Complex data are returned as +C<Math::Complex> objects. See gd_getdata(3). + +=item $dirfile->get_string ($FIELD_CODE) + +Returns the value of the STRING named C<$FIELD_CODE>. See gd_get_string(3). + +=item $dirfile->include ($FILE, $PARENT_FRAGMENT, $FLAGS, [$PREFIX, $SUFFIX]) + +Includes the fragment metadata file C<$FILE> under the fragment indexed by +C<$PARENT_FRAGMENT>. C<$FLAGS> should be a bitwise or'd collection of zero or +more of the following flags: + +=over + +$GetData::BIG_ENDIAN, +$GetData::CREAT, +$GetData::EXCL, +$GetData::FORCE_ENCODING, +$GetData::FORCE_ENDIAN, +$GetData::IGNORE_DUPS, +$GetData::IGNORE_REFS, +$GetData::LITTLE_ENDIAN, +$GetData::PEDANTIC, +$GetData::TRUNC, + +=back + +and at most one of the encoding symbols listed above in the L</"Encoding Types"> +section or else C<$GetData::AUTO_ENCODED> indicating that GetData should attempt +to automatically determine the encoding. If C<$PREFIX> or C<$SUFFIX> are +omitted or undef, the added fragment will contain no such affix. See +gd_include_affix(3). + +=item $dirfile->madd_carray ($PARENT, $FIELD_NAME, $DATA_TYPE, {DATA...}) + +Adds a new CARRAY metafield called C<$FIELD_NAME> under the parent field +C<$PARENT>. The storage type of the CARRAY is given by C<$DATA_TYPE>, which +should be one of the symbols listed above under L</"Data Types">. The value of +the CARRAY is then set to the data given in the C<{DATA...}> argument list, +which also determines its length. See the L</"Input Data"> section above for +details on the allowed forms of C<{DATA...}>. See gd_madd_carray(3). + +=item $dirfile->madd_const ($PARENT, $FIELD_NAME, $DATA_TYPE, [$VALUE]) + +Adds a new CONST metafield called C<$FIELD_NAME> under the field C<$PARENT>. +The C<$DATA_TYPE> argument indicates the storage type, which should be one of +the symbols listed above under L</"Data Types">. If given, the value of the +field is set to C<$VALUE>, otherwise the field will be initialised to zero. +See gd_madd_const(3). + +=item $dirfile->mcarrays ($PARENT, $RETURN_TYPE) + +Behaves analogously to L<carrays>() (I<q.v.>), but returns CARRAYs which are +metafields under the parent specified by C<$PARENT>. + +=item $dirfile->mconstants ($PARENT, $RETURN_TYPE) + +Behaves analogously to L<constants>() (I<q.v.>), but returns CONSTs which are +metafields under the parent specified by C<$PARENT>. + +=item $dirfile->mfield_list ($PARENT) + +Equivalent to C<$dirfile-E<gt>entry_list($PARENT, undef, undef)>. + +=item $dirfile->mfield_list_by_type ($PARENT, $TYPE) + +Equivalent to C<$dirfile-E<gt>entry_list($PARENT, $TYPE, undef)>. + +=item $dirfile->mstrings ($PARENT) + +Behaves analogously to L<strings>() (I<q.v.>), but returns STRINGs which are +metafields under the parent specified by C<$PARENT>. + +=item $dirfile->mvector_list ($PARENT) + +Equivalent to: + $dirfile-E<gt>entry_list($PARENT, $GetData::VECTOR_ENTRIES, undef). + +=item $dirfile->parser_callback ($SEHANDLER, $EXTRA=undef) + +Sets the registered parser callback function for the dirfile to C<$SEHANDLER>, +or to nothing if undef, and updates the C<$EXTRA> parameter. See +gd_parser_callback(3). + +=item $dirfile->put_carray ($FIELD_CODE, {DATA...}) + +Sets the value of the CARRAY named C<$FIELD_CODE> to the values contained in +the C<{DATA...}> argument list. See the L</"Input Data"> section above for +details on the allowed forms of C<{DATA...}>. See gd_put_carray(3). + +=item $dirfile->put_carray_slice ($FIELD_CODE, $START, {DATA...}) + +Sets a value of the portion of the CARRAY named C<$FIELD_CODE> beginning with +element numbered C<$START> to the values contained in the C<{DATA...}> argument +list. See the L</"Input Data"> section above for details on the allowed forms +of C<{DATA...}>. See gd_put_carray_slice(3). + +=item $dirfile->put_constant ($FIELD_CODE, $DATUM) + +Sets the value of the CONST field C<$FIELD_CODE> to the value C<$DATUM>. See +gd_put_constant(3). + +=item $dirfile->putdata ($FIELD_CODE, $FIRST_FRAME, $FIRST_SAMPLE, {DATA...}) + +Sets a portion of the vector given by C<$FIELD_CODE> to the values contained in +the C<{DATA...}> argument list. The first sample written is C<$FIRST_SAMPLE> +samples after the start of C<$FIRST_FRAME>. See the L</"Input Data"> section +above for details on the allowed forms of C<{DATA...}>. See gd_putdata(3). + +=item $dirfile->strings () + +In scalar context, returns the number of STRING fields. In list context, +returns an array of strings containing the values of all the STRING fields. +See gd_strings(3). + +=item $dirfile->strtok ($STRING) + +Tokenises C<$STRING>, returning an array of tokens. See gd_strtok(3). + +=item $dirfile->vector_list () + +Equivalent to: + $dirfile-E<gt>entry_list(undef, $GetData::VECTOR_ENTRIES, undef). + +=back + +=head2 Other Methods + +For the most part, following methods behave identically to their C API +counterpart. See the corresponding C API manual page for details. Different +behaviour, if any, is indicated. + +=over + +=item $dirfile->add ($ENTRY) + +C<$ENTRY> should be a reference to an entry hash; see L</"ENTRY HASHES"> above. + +=item $dirfile->add_alias ($FIELD_CODE, $TARGET, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_bit ($FIELD_CODE, $IN_FIELD, $BITNUM, $NUMBITS, +[$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_divide ($FIELD_CODE, $IN_FIELD1, $IN_FIELD2, +[$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_lincom ($FIELD_CODE, $N_FIELDS, $IN_FIELDS, $M, $B, +[$FRAGMENT_INDEX]) + +C<$IN_FIELDS>, C<$M>, and C<$B> should be references to arrays of the +appropriate length. The elements of C<$M> and C<$B> may be of any numerical +type, including C<Math::Complex>. C<$FRAGMENT_INDEX> = 0 is assumed if not +specified. + +=item $dirfile->add_linterp ($FIELD_CODE, $IN_FIELD, $TABLE, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_mplex ($FIELD_CODE, $IN_FIELD, $COUNT_FIELD, $COUNT_VAL, +$COUNT_MAX, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_multiply ($FIELD_CODE, $IN_FIELD1, $IN_FIELD2, +[$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_phase ($FIELD_CODE, $IN_FIELD, $SHIFT, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_polynom ($FIELD_CODE, $POLY_ORD, $IN_FIELD, $A, +[$FRAGMENT_INDEX]) + +C<$A> should be a reference to an array of numbers (of any numerical type, +including C<Math::Complex>) of the appropriate length. C<$FRAGMENT_INDEX> = 0 +is assumed if not specified. + +=item $dirfile->add_raw ($FIELD_CODE, $DATA_TYPE, $SPF, [$FRAGMENT_INDEX]) + +C<$DATA_TYPE> should be one of the symbols listed under L</"Data Types"> above. +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_recip ($FIELD_CODE, $IN_FIELD, $DIVIDEND, [$FRAGMENT_INDEX]) + +C<$DIVIDEND> may be of any numerical type, including C<Math::Complex>. +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_sbit ($FIELD_CODE, $IN_FIELD, $BITNUM, $NUMBITS, +[$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_spec ($LINE, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_string ($FIELD_CODE, $VALUE, [$FRAGMENT_INDEX]) + +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->add_window ($FIELD_CODE, $IN_FIELD, $CHECK_FIELD, $WINDOP, +$THRESHOLD, [$FRAGMENT_INDEX]) + +C<$WINDOP> should be one of the symbols listed under L</WINDOW Operators> above. +C<$FRAGMENT_INDEX> = 0 is assumed if not specified. + +=item $dirfile->alias_target ($FIELD_CODE) + +Z<> + +=item $dirfile->alter_affixes ($FRAGMENT_INDEX, $PREFIX, [$SUFFIX]) + +If C<$PREFIX> or C<$SUFFIX> are undef, or if C<$SUFFIX> is omitted, that +affix is not changed. + +=item $dirfile->alter_bit ($FIELD_CODE, [$IN_FIELD, $BITNUM, $NUMBITS]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$BITNUM == -1>, or C<$NUMBITS == 0>, that parameter is not +changed. + +=item $dirfile->alter_carray ($FIELD_CODE, $CONST_TYPE, $ARRAY_LEN) + +C<$CONST_TYPE> should be one of the symbols listed under L</"Data Types"> above. + +=item $dirfile->alter_const ($FIELD_CODE, [$CONST_TYPE]) + +If C<$CONST_TYPE> is omitted, or equal to C<$GetData::NULL>, it is not changed; +otherwise, it should be one of the symbols listed under L</"Data Types"> above. + +=item $dirfile->alter_divide ($FIELD_CODE, [$IN_FIELD1, $IN_FIELD2]) + +Arguments not given or set to undef are not changed. + +=item $dirfile->alter_encoding ($ENCODING, [$FRAGMENT_INDEX, $RECODE]) + +Both C<$FRAGMENT_INDEX> and C<$RECODE> default to 0 if not given. + +=item $dirfile->alter_endianness ($BYTE_SEX, [$FRAGMENT_INDEX, $RECODE]) + +Both C<$FRAGMENT_INDEX> and C<$RECODE> default to 0 if not given. + +=item $dirfile->alter_entry ($FIELD_CODE, $ENTRY, [$RECODE]) + +C<$ENTRY> should be a reference to an entry hash; see L</"ENTRY HASHES"> above. +If not given, C<$RECODE> defaults to 0. + +=item $dirfile->alter_frameoffset ($OFFSET, [$FRAGMENT_INDEX, $RECODE]) + +Both C<$FRAGMENT_INDEX> and C<$RECODE> default to 0 if not given. + +=item $dirfile->alter_lincom ($FIELD_CODE, [$N_FIELDS, $IN_FIELDS, $M, $B]) + +Arguments not given or set to undef are not changed. +If given, C<$IN_FIELDS>, C<$M>, and C<$B> should be references to arrays of the +appropriate length. + +=item $dirfile->alter_linterp ($FIELD_CODE, [$IN_FIELD, $TABLE, $RENAME_TABLE]) + +Arguments not given or set to undef are not changed. +If not given, C<$RENAME_TABLE> defaults to 0. + +=item $dirfile->alter_mplex ($FIELD_CODE, [$IN_FIELD, $COUNT_FIELD, $COUNT_VAL, +$COUNT_MAX]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$COUNT_VAL> or C<$COUNT_MAX> are -1, that parameter is not +chaged. + +=item $dirfile->alter_multiply ($FIELD_CODE, [$IN_FIELD1, $IN_FIELD2]) + +Arguments not given or set to undef are not changed. + +=item $dirfile->alter_phase ($FIELD_CODE, $IN_FIELD, $SHIFT) + +If C<$IN_FIELD == undef>, it is not changed. + +=item $dirfile->alter_polynom ($FIELD_CODE, [$POLY_ORD, $IN_FIELD, $A]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$POLY_ORD == 0>, it is not changed. + +=item $dirfile->alter_protection ($PROTECTION_LEVEL, $FRAGMENT_INDEX) + +Z<> + +=item $dirfile->alter_raw ($FIELD_CODE, [$DATA_TYPE, $SPF, $RECODE]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$DATA_TYPE == $GetData::NULL> or C<$SPF == 0>, that parameter +is not changed. +If not given, C<$RECODE> defaults to 0. + +=item $dirfile->alter_recip ($FIELD_CODE, [$IN_FIELD, $DIVIDEND]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$DIVIDEND == 0>, it is not changed. +C<$DIVIDEND> may be of any numerical type, including C<Math::Complex>. + +=item $dirfile->alter_sbit ($FIELD_CODE, [$IN_FIELD, $BITNUM, $NUMBITS]) + +Arguments not given or set to undef are not changed. +Additionally, if C<$BITNUM == -1>, or C<$NUMBITS == 0>, that parameter is not +changed. + +=item $dirfile->alter_spec ($LINE, [$RECODE]) + +If not given, C<$RECODE> defaults to 0. + +=item $dirfile->alter_window ($FIELD_CODE, $IN_FIELD, $CHECK_FIELD, $WINDOP, +$THRESHOLD) + +If C<$IN_FIELD> or C<$CHECK_FIELD> are undef, or if C<$WINDOP == +$GetData::WINDOP_UNK>, that paremeter is not changed. Otherwise, +C<$WINDOP> should be one of the symbols listed under L</WINDOW Operators> above. + +=item $dirfile->bof ($FIELD_CODE) + +Z<> + +=item $dirfile->carray_len ($FIELD_CODE) + +Z<> + +=item $dirfile->delete ($FIELD_CODE, [$FLAGS]) + +If not given, C<$FLAGS> defaults to 0. Otherwise, it should be a bitwise or'd +collection of zero or more of the following flags: + +=over + +$GetData::DEL_DATA, +$GetData::DEL_DEREF, +$GetData::DEL_FORCE, +$GetData::DEL_META. + +=back + +=item $dirfile->delete_alias ($FIELD_CODE, [$FLAGS]) + +If not given, C<$FLAGS> defaults to 0; otherwise, see the description of +L</delete> above for valid values. + +=item $dirfile->desync ([$FLAGS]) + +If omitted, C<$FLAGS> defaults to zero. Otherwise, it should be zero or more +of the following flags bitwise or'd together: + +=over + +$GetData::DESYNC_PATHCHECK, +$GetData::DESYNC_REOPEN. + +=back + +=item $dirfile->dirfilename () + +Z<> + +=item $dirfile->dirfile_standards ([$VERSION]) + +In addition to a simple integer verison number, C<$VERSION> may be one of the +symbols + +=over + +$GetData::VERSION_CURRENT, +$GetData::VERSION_EARLIEST, +$GetData::VERSION_LATEST. + +=back + +If not given, C<$GetData::VERSION_CURRENT> is assumed. + +=item $dirfile->encoding ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->endianness ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->eof ($FIELD_CODE) + +Z<> + +=item $dirfile->error_count () + +Z<> + +=item $dirfile->flags ([$SET, $RESET]) + +If omitted, C<$SET> and C<$RESET> default to 0. Otherwise, they should be +zero or more of the following flags, bitwise or'd together: + +=over + +$GetData::PRETTY_PRINT, +$GetData::VERBOSE. + +=back + +=item $dirfile->flush ($FIELD_CODE) + +Z<> + +=item $dirfile->fragment_index ($FIELD_CODE) + +Z<> + +=item $dirfile->fragmentname ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->frameoffset ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->framenum ($FIELD_CODE, $VALUE, [$START, $END]) + +C<$START> and C<$END> default to 0 if not given. + +=item $dirfile->hidden ($FIELD_CODE) + +Z<> + +=item $dirfile->hide ($FIELD_CODE) + +Z<> + +=item $dirfile->madd ($ENTRY, $PARENT) + +C<$ENTRY> should be a reference to an entry hash; see L</"ENTRY HASHES"> above. + +=item $dirfile->madd_alias ($PARENT, $FIELD_CODE, $TARGET) + +Z<> + +=item $dirfile->madd_bit ($PARENT, $FIELD_CODE, $IN_FIELD, $BITNUM, $NUMBITS) + +Z<> + +=item $dirfile->madd_divide ($PARENT, $FIELD_CODE, $IN_FIELD1, $IN_FIELD2) + +Z<> + +=item $dirfile->madd_lincom ($PARENT, $FIELD_CODE, $N_FIELDS, $IN_FIELDS, $M, +$B) + +C<$IN_FIELDS>, C<$M>, and C<$B> should be references to arrays of the +appropriate length. The elements of C<$M> and C<$B> may be of any numerical +type, including C<Math::Complex>. + +=item $dirfile->madd_linterp ($PARENT, $FIELD_CODE, $IN_FIELD, $TABLE) + +Z<> + +=item $dirfile->madd_mplex ($PARENT, $FIELD_CODE, $IN_FIELD, $COUNT_FIELD, +$COUNT_VAL, $COUNT_MAX) + +Z<> + +=item $dirfile->madd_multiply ($PARENT, $FIELD_CODE, $IN_FIELD1, $IN_FIELD2) + +Z<> + +=item $dirfile->madd_phase ($PARENT, $FIELD_CODE, $IN_FIELD, $SHIFT) + +Z<> + +=item $dirfile->madd_polynom ($PARENT, $FIELD_CODE, $POLY_ORD, $IN_FIELD, $A) + +C<$A> should be a reference to an array of numbers (of any numerical type, +including C<Math::Complex>) of the appropriate length. + +=item $dirfile->madd_recip ($PARENT, $FIELD_CODE, $IN_FIELD, $DIVIDEND) + +C<$DIVIDEND> may be of any numerical type, including C<Math::Complex>. + +=item $dirfile->madd_sbit ($PARENT, $FIELD_CODE, $IN_FIELD, $BITNUM, $NUMBITS) + +Z<> + +=item $dirfile->madd_spec ($LINE, $PARENT) + +Z<> + +=item $dirfile->madd_string ($PARENT, $FIELD_CODE, $VALUE) + +Z<> + +=item $dirfile->madd_window ($PARENT, $FIELD_CODE, $IN_FIELD, $CHECK_FIELD, +$WINDOP, $THRESHOLD) + +C<$WINDOP> should be one of the symbols listed under L</WINDOW Operators> above. + +=item $dirfile->malter_spec ($LINE, $PARENT, [$RECODE]) + +If not given, C<$RECODE> defaults to 0. + +=item $dirfile->metaflush () + +Z<> + +=item $dirfile->move ($FIELD_CODE, $NEW_FRAGMENT, [$MOVE_DATA]) + +If not given, C<$MOVE_DATA> defaults to 0. + +=item $dirfile->move_alias ($FIELD_CODE, $NEW_FRAGMENT) + +Z<> + +=item $dirfile->mplex_lookback ($LOOKBACK) + +Z<> + +=item $dirfile->native_type ($FIELD_CODE) + +The returned value will be one of the symbols listed above under +L</"Data Types">. + +=item $dirfile->nframes () + +Z<> + +=item $dirfile->parent_fragment ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->protection ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->put_string ($FIELD_CODE, $STRING) + +Z<> + +=item $dirfile->raw_close ($FIELD_CODE) + +Z<> + +=item $dirfile->raw_filename ($FIELD_CODE) + +Z<> + +=item $dirfile->reference ([$FIELD_CODE]) + +If C<$FIELD_CODE> is not given or undef, this function simply reports the +current reference field. + +=item $dirfile->rename ($OLD_CODE, $NEW_NAME, [$FLAGS]) + +If not given, C<$FLAGS> defaults to 0. Otherwise, it should be a bitwise or'd +collection of zero or more of the following flags: + +=over + +$GetData::REN_DATA, +$GetData::REN_UPDB. + +=back + +=item $dirfile->rewrite_fragment ($FRAGMENT_INDEX) + +Z<> + +=item $dirfile->seek ($FIELD_CODE, $FRAME_NUM, $SAMPLE_NUM, [$FLAGS]) + +If not given, C<$FLAGS> defaults to C<$GetData::SEEK_SET>. Otherwise, it should +be one of: + +=over + +$GetData::SEEK_CUR, +$GetData::SEEK_END, +$GetData::SEEK_SET. + +=back + +Furthermore, this value should be bitwise or'd with C<$GetData::SEEK_WRITE> if +the next operation on the field is a write (via L</putdata>). + +=item $dirfile->spf ($FIELD_CODE) + +Z<> + +=item $dirfile->sync ($FIELD_CODE) + +Z<> + +=item $dirfile->tell ($FIELD_CODE) + +Z<> + +=item $dirfile->unhide ($FIELD_CODE) + +Z<> + +=item $dirfile->uninclude ($FRAGMENT_INDEX, [$DEL]) + +If not given, C<$DEL> defaults to 0. + +=item $dirfile->validate ($FIELD_CODE) + +Z<> + +=item $dirfile->verbose_prefix ([$PREFIX]) + +If C<$PREFIX> is omitted or undef, the prefix is removed. + +=back + =head1 COPYRIGHT -Copyright (C) 2011 D. V. Wiebe +Copyright (C) 2012 D. V. Wiebe 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 @@ -127,6 +1230,10 @@ 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. +details. +=head1 SEE ALSO + +Math::Complex(3), dirfile(5) + =cut Modified: trunk/getdata/bindings/perl/GetData.xs =================================================================== --- trunk/getdata/bindings/perl/GetData.xs 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/GetData.xs 2012-04-19 23:36:06 UTC (rev 702) @@ -55,7 +55,7 @@ typedef int gdpu_bitnum_t; typedef int gdpu_numbits_t; typedef gd_shift_t gdpu_shift_t; -typedef unsigned int gdpu_spf_t; +typedef unsigned int gdpu_uint_t; typedef gd_type_t gdpu_type_t; typedef int gdpu_int; typedef const char gdpu_char; @@ -289,7 +289,7 @@ switch (E->field_type) { case GD_BIT_ENTRY: case GD_SBIT_ENTRY: - GDP_EHASH_FETCH_PV("in_field", in_fields[0]); + GDP_EHASH_FETCH_PV("in_fields", in_fields[0]); GDP_EHASH_FETCH_UV("bitnum", bitnum, int); GDP_EHASH_FETCH_UV("numbits", bitnum, int); gdp_fetch_scalars(E, (HV*)sv, 0x3, pkg, func); @@ -310,7 +310,7 @@ gdp_fetch_scalars(E, (HV*)sv, ((1 << n) - 1) * 9, pkg, func); break; case GD_LINTERP_ENTRY: - GDP_EHASH_FETCH_PV("in_field", in_fields[0]); + GDP_EHASH_FETCH_PV("in_fields", in_fields[0]); GDP_EHASH_FETCH_PV("table", table); break; case GD_MULTIPLY_ENTRY: @@ -318,12 +318,12 @@ gdp_fetch_in_fields(E->in_fields, sv, 2, pkg, func); break; case GD_PHASE_ENTRY: - GDP_EHASH_FETCH_PV("in_field", in_fields[0]); + GDP_EHASH_FETCH_PV("in_fields", in_fields[0]); GDP_EHASH_FETCH_IV("shift", shift, gd_shift_t); gdp_fetch_scalars(E, (HV*)sv, 1, pkg, func); break; case GD_POLYNOM_ENTRY: - GDP_EHASH_FETCH_PV("in_field", in_fields[0]); + GDP_EHASH_FETCH_PV("in_fields", in_fields[0]); GDP_EHASH_FETCH_IV("poly_ord", poly_ord, int); n = (E->poly_ord > GD_MAX_POLYORD) ? GD_MAX_POLYORD : E->poly_ord; E->comp_scal = 1; @@ -331,7 +331,7 @@ gdp_fetch_scalars(E, (HV*)sv, (1 << (n + 1)) - 1, pkg, func); break; case GD_RECIP_ENTRY: - GDP_EHASH_FETCH_PV("in_field", in_fields[0]); + GDP_EHASH_FETCH_PV("in_fields", in_fields[0]); E->comp_scal = 1; GDP_EHASH_FETCH_CMP("cdividend", cdividend); gdp_fetch_scalars(E, (HV*)sv, 1, pkg, func); @@ -1130,7 +1130,7 @@ switch (E.field_type) { case GD_BIT_ENTRY: case GD_SBIT_ENTRY: - GDP_PUSHpvn("in_field"); + GDP_PUSHpvn("in_fields"); GDP_PUSHpvz(E.in_fields[0]); GDP_PUSHpvn("bitnum"); GDP_PUSHuv(E.bitnum); @@ -1158,7 +1158,7 @@ sp = gdp_store_scalars(sp, &E, ((1 << E.n_fields) - 1) * 9); break; case GD_LINTERP_ENTRY: - GDP_PUSHpvn("in_field"); + GDP_PUSHpvn("in_fields"); GDP_PUSHpvz(E.in_fields[0]); GDP_PUSHpvn("table"); GDP_PUSHpvz(E.table); @@ -1169,7 +1169,7 @@ GDP_PUSHrvavpv(E.in_fields, 2); break; case GD_PHASE_ENTRY: - GDP_PUSHpvn("in_field"); + GDP_PUSHpvn("in_fields"); GDP_PUSHpvz(E.in_fields[0]); GDP_PUSHpvn("shift"); GDP_PUSHiv(E.shift); @@ -1178,14 +1178,14 @@ case GD_POLYNOM_ENTRY: GDP_PUSHpvn("poly_ord"); GDP_PUSHiv(E.poly_ord); - GDP_PUSHpvn("in_field"); + GDP_PUSHpvn("in_fields"); GDP_PUSHpvz(E.in_fields[0]); GDP_PUSHpvn("a"); GDP_PUSHrvavcmp(E.ca, E.poly_ord + 1); sp = gdp_store_scalars(sp, &E, (1 << (E.poly_ord + 1)) - 1); break; case GD_RECIP_ENTRY: - GDP_PUSHpvn("in_field"); + GDP_PUSHpvn("in_fields"); GDP_PUSHpvz(E.in_fields[0]); GDP_PUSHpvn("dividend"); GDP_PUSHcmp(E.cdividend); @@ -1263,32 +1263,38 @@ dreturn("%p", RETVAL); AV * -mcarrays(dirfile, parent, return_type, unpacked=0) +mcarrays(dirfile, parent, return_type) DIRFILE * dirfile const char * parent; gd_type_t return_type - IV unpacked PREINIT: const gd_carray_t *data_out = NULL; GDP_DIRFILE_ALIAS; ALIAS: GetData::Dirfile::mcarrays = 1 - CODE: - dtrace("%p, %03x, %i", dirfile, return_type, (int)unpacked); + PPCODE: + dtrace("%p, %03x; %i", dirfile, return_type, (int)GIMME_V); I32 i, len = (I32)gd_nmfields_by_type(dirfile, parent, GD_CARRAY_ENTRY); data_out = gd_mcarrays(dirfile, parent, return_type); GDP_UNDEF_ON_ERROR(); - RETVAL = newAV(); - for (i = 0; i < len; ++i) - av_store(RETVAL, i, newSVpvn(data_out[i].d, - data_out[i].n * GD_SIZE(return_type))); - OUTPUT: - RETVAL - CLEANUP: - dreturn("%p", RETVAL); + /* in array context, return an array of arrays of unpacked data. + * Otherwise, return a reference to an array of packed data. */ + if (GIMME_V == G_ARRAY) + for (i = 0; i < len; ++i) + XPUSHs(sv_2mortal(newRV_noinc((SV *)gdp_unpack(NULL, data_out[i].d, + data_out[i].n, return_type)))); + else { + AV *av = newAV(); + for (i = 0; i < len; ++i) + av_store(av, i, newSVpvn(data_out[i].d, + data_out[i].n * GD_SIZE(return_type))); + XPUSHs(sv_2mortal(newRV_noinc((SV*)av))); + } + dreturnvoid(); + void mconstants(dirfile, parent, return_type) DIRFILE * dirfile @@ -1512,7 +1518,7 @@ DIRFILE * dirfile gdpu_char * parent gdpu_type_t type - gdpu_type_t flags + gdpu_uint_t flags PREINIT: GDP_DIRFILE_ALIAS; ALIAS: @@ -2047,4 +2053,27 @@ dreturnvoid(); +int +include(dirfile, file, fragment_index, flags, prefix=NULL, suffix=NULL) + DIRFILE * dirfile + const char * file + int fragment_index + unsigned long int flags + gdpu_char * prefix + gdpu_char * suffix + PREINIT: + GDP_DIRFILE_ALIAS; + ALIAS: + GetData::Dirfile::include = 1 + CODE: + dtrace("%p, \"%s\", %i, %lu, \"%s\", \"%s\"", dirfile, file, fragment_index, + flags, prefix, suffix); + RETVAL = gd_include_affix(dirfile, file, fragment_index, prefix, suffix, + flags); + GDP_UNDEF_ON_ERROR(); + OUTPUT: + RETVAL + CLEANUP: + dreturn("%i", RETVAL); + INCLUDE: simple_funcs.xs Modified: trunk/getdata/bindings/perl/Makefile.am =================================================================== --- trunk/getdata/bindings/perl/Makefile.am 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/Makefile.am 2012-04-19 23:36:06 UTC (rev 702) @@ -21,7 +21,7 @@ AUTOMAKE_OPTIONS = foreign EXTRA_DIST=funclist.pl GetData.xs simple_funcs.pl simple_funcs.xsin typemap \ - GetData.pm.in MANIFEST.in test + GetData.pm.in MANIFEST.in test/*.t if GETDATA_DEBUG TEST_VERBOSE=verbose=1 Modified: trunk/getdata/bindings/perl/simple_funcs.pl =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.pl 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/simple_funcs.pl 2012-04-19 23:36:06 UTC (rev 702) @@ -71,7 +71,7 @@ return "%02x"; } elsif ($_ eq "gd_shift_t" or $_ eq "gdpu_shift_t") { return "%lli"; - } elsif ($_ eq "gdpu_spf_t") { + } elsif ($_ eq "gdpu_uint_t") { return "%u"; } elsif ($_ eq "gd_type_t" or $_ eq "gdpu_type_t") { return "%03x"; @@ -88,7 +88,7 @@ } elsif ($_ eq "gd_triplet_t") { return "{%g,%llX,%lli}"; } else { - die $_; + die "Can't format \"$_\""; } } Modified: trunk/getdata/bindings/perl/simple_funcs.xsin =================================================================== --- trunk/getdata/bindings/perl/simple_funcs.xsin 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/simple_funcs.xsin 2012-04-19 23:36:06 UTC (rev 702) @@ -36,7 +36,7 @@ int alter_multiply(DIRFILE *dirfile, const char *field_code, gdpu_char *in_field1=NULL, gdpu_char *in_field2=NULL) int alter_phase(DIRFILE *dirfile, const char *field_code, - gdpu_char *in_field=NULL, gdpu_shift_t shift=0) + gdpu_char *in_field, gdpu_shift_t shift) int alter_sbit(DIRFILE *dirfile, const char *field_code, gdpu_char *in_field=NULL, gdpu_bitnum_t bitnum=-1, gdpu_numbits_t numbits=0) size_t carray_len(DIRFILE *dirfile, const char *field_code) @@ -75,7 +75,7 @@ int alter_protection(DIRFILE *dirfile, int protection_level, int fragment_index) int protection(DIRFILE *dirfile, int fragment_index) const char *raw_filename(DIRFILE *dirfile, const char *field_code) -const char *reference(DIRFILE *dirfile, const char *field_code=NULL) +const char *reference(DIRFILE *dirfile, gdpu_char *field_code=NULL) unsigned int spf(DIRFILE *dirfile, const char *field_code) size_t put_string(DIRFILE *dirfile, const char *field_code, const char *data) int validate(DIRFILE *dirfile, const char *field_code) @@ -94,12 +94,10 @@ int alter_linterp(DIRFILE *dirfile, const char *field_code, gdpu_char *in_field=NULL, gdpu_char *table=NULL, int recode=0) int alter_raw(DIRFILE *dirfile, const char *field_code, - gdpu_type_t data_type=GD_NULL, gdpu_spf_t spf=0, int recode=0) + gdpu_type_t data_type=GD_NULL, gdpu_uint_t spf=0, int recode=0) int alter_spec(DIRFILE *dirfile, const char *line, int recode=0) int delete(DIRFILE *dirfile, const char *field_code, int flags=0) int flush(DIRFILE *dirfile, const char *field_code) -int include(DIRFILE *dirfile, const char *file, int fragment_index, - unsigned long int flags) int malter_spec(DIRFILE *dirfile, const char *line, const char *parent, int recode=0) int metaflush(DIRFILE *dirfile) @@ -134,26 +132,25 @@ const char *target) int add_window(DIRFILE *dirfile, const char *field_code, const char *in_field, const char *check_field, gd_windop_t windop, gd_triplet_t threshold, - int fragment_index) + int fragment_index=0) int madd_window(DIRFILE *dirfile, const char *parent, const char *field_code, const char *in_field, const char *check_field, gd_windop_t windop, gd_triplet_t threshold) -int alter_window(DIRFILE *dirfile, const char *field_code, const char *in_field, - const char *check_field, gd_windop_t windop, gd_triplet_t threshold) -int include_affix(DIRFILE *dirfile, const char *file, int fragment_index, - const char *prefix, const char *suffix, unsigned long int flags) -int alter_affixes(DIRFILE *dirfile, int index, const char *prefix, - const char *suffix) +int alter_window(DIRFILE *dirfile, const char *field_code, gdpu_char *in_field, + gdpu_char *check_field, gd_windop_t windop, gd_triplet_t threshold) +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) -int alter_mplex(DIRFILE *dirfile, const char *field_code, const char *in_field, - const char *count_field, int count_val, int count_max) + const char *count_field, int count_val, int count_max, 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 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 raw_close(DIRFILE *dirfile, const char *field_code) -int desync(DIRFILE *dirfile, unsigned int flags) -unsigned long int flags(DIRFILE *dirfile, unsigned long int set, - unsigned long int reset) -int verbose_prefix(DIRFILE *dirfile, const char *prefix) +int desync(DIRFILE *dirfile, unsigned int flags=0) +unsigned long int flags(DIRFILE *dirfile, unsigned long int set=0, + unsigned long int reset=0) +int verbose_prefix(DIRFILE *dirfile, gdpu_char *prefix=NULL) int mplex_lookback(DIRFILE *dirfile, int lookback) Modified: trunk/getdata/bindings/perl/test/big_test.t =================================================================== --- trunk/getdata/bindings/perl/test/big_test.t 2012-04-18 06:23:28 UTC (rev 701) +++ trunk/getdata/bindings/perl/test/big_test.t 2012-04-19 23:36:06 UTC (rev 702) @@ -333,12 +333,12 @@ %h = $_->entry("polynom"); CheckOK(20); CheckSArray2(20, 1, [ sort keys %h ], qw(a field field_type), - qw(fragment_index in_field poly_ord scalar scalar_ind)); + qw(fragment_index in_fields poly_ord scalar scalar_ind)); CheckArray2(20, 2, $h{'a'}, 1.1, 2.2, 2.2, 3.3+4.4*i, 5.5, 5.5); CheckString2(20, 4, $h{'field'}, "polynom"); CheckNum2(20, 5, $h{'field_type'}, $GetData::POLYNOM_ENTRY); CheckNum2(20, 6, $h{'fragment_index'}, 0); -CheckString2(20, 7, $h{'in_field'}, "data"); +CheckString2(20, 7, $h{'in_fields'}, "data"); CheckNum2(20, 8, $h{'poly_ord'}, 5); CheckSArray2(20, 9, $h{'scalar'}, undef, undef, undef, undef, "const", "const"); CheckArray2(20, 10, $h{'scalar_ind'}, undef, undef, undef, undef, -1, -1); @@ -347,23 +347,23 @@ %h = $_->entry("linterp"); CheckOK(21); CheckSArray2(21, 0, [ sort keys %h ], qw(field field_type fragment_index), - qw(in_field table)); + qw(in_fields table)); CheckString2(21, 1, $h{'field'}, "linterp"); CheckNum2(21, 2, $h{'field_type'}, $GetData::LINTERP_ENTRY); CheckNum2(21, 3, $h{'fragment_index'}, 0); -CheckString2(21, 4, $h{'in_field'}, "data"); +CheckString2(21, 4, $h{'in_fields'}, "data"); CheckString2(21, 5, $h{'table'}, "/look/up/file"); # 22: get_entry check %h = $_->entry("bit"); CheckOK(22); CheckSArray2(22, 0, [ sort keys %h ], qw(bitnum field field_type), - qw(fragment_index in_field numbits scalar scalar_ind)); + qw(fragment_index in_fields numbits scalar scalar_ind)); CheckNum2(22, 1, $h{'bitnum'}, 3); CheckString2(22, 2, $h{'field'}, "bit"); CheckNum2(22, 3, $h{'field_type'}, $GetData::BIT_ENTRY); CheckNum2(22, 4, $h{'fragment_index'}, 0); -CheckString2(22, 5, $h{'in_field'}, "data"); +CheckString2(22, 5, $h{'in_fields'}, "data"); CheckNum2(22, 6, $h{'numbits'}, 4); CheckSArray2(22, 7, $h{'scalar'}, undef, undef); CheckArray2(22, 8, $h{'scalar_ind'}, undef, undef); @@ -372,12 +372,12 @@ %h = $_->entry("sbit"); CheckOK(23); CheckSArray2(23, 0, [ sort keys %h ], qw(bitnum field field_type), - qw(fragment_index in_field numbits scalar scalar_ind)); + qw(fragment_index in_fields numbits scalar scalar_ind)); CheckNum2(23, 1, $h{'bitnum'}, 5); CheckString2(23, 2, $h{'field'}, "sbit"); CheckNum2(23, 3, $h{'field_type'}, $GetData::SBIT_ENTRY); CheckNum2(23, 4, $h{'fragment_index'}, 0); -CheckString2(23, 5, $h{'in_field'}, "data"); +CheckString2(23, 5, $h{'in_fields'}, "data"); CheckNum2(23, 6, $h{'numbits'}, 6); CheckSArray2(23, 7, $h{'scalar'}, undef, undef); CheckArray2(23, 8, $h{'scalar_ind'}, undef, undef); @@ -396,11 +396,11 @@ %h = $_->entry("phase"); CheckOK(25); CheckSArray2(25, 0, [ sort keys %h ], qw(field field_type fragment_index), - qw(in_field scalar scalar_ind shift)); + qw(in_fields scalar scalar_ind shift)); CheckString2(25, 1, $h{'field'}, "phase"); CheckNum2(25, 2, $h{'field_type'}, $GetData::PHASE_ENTRY); CheckNum2(25, 3, $h{'fragment_index'}, 0); -CheckString2(25, 4, $h{'in_field'}, "data"); +CheckString2(25, 4, $h{'in_fields'}, "data"); CheckSArray2(25, 5, $h{'scalar'}, undef); CheckArray2(25, 6, $h{'scalar_ind'}, undef); CheckNum2(25, 7, $h{'shift'}, 11); @@ -472,7 +472,7 @@ CheckString2(31, 7, $h{'field'}, "new4"); CheckNum2(31, 8, $h{'field_ty... [truncated message content] |
From: <ket...@us...> - 2012-04-18 06:23:38
|
Revision: 701 http://getdata.svn.sourceforge.net/getdata/?rev=701&view=rev Author: ketiltrout Date: 2012-04-18 06:23:28 +0000 (Wed, 18 Apr 2012) Log Message: ----------- Conditionalise sys/wait.h Modified Paths: -------------- trunk/getdata/configure.ac trunk/getdata/test/error_verbose.c trunk/getdata/test/error_verbose_prefix.c Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-04-13 18:28:12 UTC (rev 700) +++ trunk/getdata/configure.ac 2012-04-18 06:23:28 UTC (rev 701) @@ -550,7 +550,7 @@ AC_CHECK_HEADERS([asm/unaligned.h Availability.h byteswap.h direct.h fcntl.h \ inttypes.h io.h libgen.h libkern/OSByteOrder.h stddef.h \ stdint.h sys/endian.h sys/file.h sys/param.h sys/stat.h \ - sys/types.h unistd.h]) + sys/types.h sys/wait.h unistd.h]) if test "x$disable_c99" = "xno"; then AC_CHECK_HEADERS([complex.h]) fi Modified: trunk/getdata/test/error_verbose.c =================================================================== --- trunk/getdata/test/error_verbose.c 2012-04-13 18:28:12 UTC (rev 700) +++ trunk/getdata/test/error_verbose.c 2012-04-18 06:23:28 UTC (rev 701) @@ -21,7 +21,9 @@ #include "test.h" #include <stdlib.h> +#ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> +#endif #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> Modified: trunk/getdata/test/error_verbose_prefix.c =================================================================== --- trunk/getdata/test/error_verbose_prefix.c 2012-04-13 18:28:12 UTC (rev 700) +++ trunk/getdata/test/error_verbose_prefix.c 2012-04-18 06:23:28 UTC (rev 701) @@ -21,7 +21,9 @@ #include "test.h" #include <stdlib.h> +#ifdef HAVE_SYS_WAIT_H #include <sys/wait.h> +#endif #include <sys/stat.h> #include <sys/types.h> #include <fcntl.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-13 18:28:19
|
Revision: 700 http://getdata.svn.sourceforge.net/getdata/?rev=700&view=rev Author: ketiltrout Date: 2012-04-13 18:28:12 +0000 (Fri, 13 Apr 2012) Log Message: ----------- open_abs test. Added Paths: ----------- trunk/getdata/test/open_abs.c Added: trunk/getdata/test/open_abs.c =================================================================== --- trunk/getdata/test/open_abs.c (rev 0) +++ trunk/getdata/test/open_abs.c 2012-04-13 18:28:12 UTC (rev 700) @@ -0,0 +1,53 @@ +/* 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) +{ + const char *filedir = "dirfile"; + const char *format = "dirfile/format"; + char path[4096]; + int error, r = 0; + DIRFILE *D; + + rmdirfile(); + mkdir(filedir, 0777); + close(open(format, O_CREAT | O_EXCL | O_WRONLY, 0666)); + + getcwd(path, 4096); + strcat(path, "/"); + strcat(path, filedir); + D = gd_open(path, GD_RDONLY | GD_VERBOSE); + error = gd_error(D); + gd_close(D); + + unlink(format); + rmdir(filedir); + + CHECKI(error, 0); + return r; +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-13 18:25:52
|
Revision: 699 http://getdata.svn.sourceforge.net/getdata/?rev=699&view=rev Author: ketiltrout Date: 2012-04-13 18:25:43 +0000 (Fri, 13 Apr 2012) Log Message: ----------- Bug fixes. Doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/TODO trunk/getdata/bindings/cxx/getdata/fragment.h trunk/getdata/bindings/cxx/getdata/mplexentry.h trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/f77/getdata.f.in trunk/getdata/bindings/f77/getdata.f90.in trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/make_parameters.c trunk/getdata/doc/README.cxx trunk/getdata/doc/README.f77 trunk/getdata/doc/README.f95 trunk/getdata/doc/README.idl trunk/getdata/doc/README.python trunk/getdata/src/common.c trunk/getdata/test/Makefile.am Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/ChangeLog 2012-04-13 18:25:43 UTC (rev 699) @@ -1,3 +1,19 @@ +2012-04-13 D. V. Wiebe <ge...@ke...> svn:699 + * src/common.c (_GD_CanonicalPath): Terminate and don't clobber string + from realpath(). + + * bindings/make_parameters.c: Add GD_SIE_ENCODED. + + * bindings/cxx/getdata/fragment.h: Update encodings. + + * bindings/f77/fgetdata.c (GDTOKE) bindings/f77/getdata.f90.in (fgd_strtok): + Drop the 'n' parameter: just do what the C API does. + + * bindings/idl/getdata.c (gdidl_getdata gdidl_putdata): Drop /HERE: just use + the absense of FIRST_FRAME and FIRST_SAMPLE. + + * bindings/idl/getdata.c (gdidl_add_mplex): Make the MAX parameter optional. + 2012-04-01 D. V. Wiebe <ge...@ke...> svn:696 * src/compat.c (_GD_ReadDir): Renamed from gd_readdir(). Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/NEWS 2012-04-13 18:25:43 UTC (rev 699) @@ -194,8 +194,9 @@ but don't really care what it was. * Reading MPLEX fields can result in inefficiencies due to GetData having to - look backwards for the first value of the derived field. A new function, - gd_mplex_lookback(), can be used to alter how much lookback is done. + look backwards for the first value of the part of the derived field + requested. A new function, gd_mplex_lookback(), can be used to alter how + much lookback is done, if any. * The "move_data" flag in gd_rename() has been replaced with a generic "flags" parameter. Two rename flags are defined: GD_REN_DATA, which recovers the @@ -242,11 +243,58 @@ Bindings Changes: + * F77: Due to small namespace issues, the encoding parameters (corresponding + to the GD_...ENCODED symbols in the C API) have all been renamed. They + are now of the form GDE_xx. + * Python: The return_type, num_fields, and num_samples parameters to dirfile.getdata() are now optional. The return_type defautls to pygetdata.FLOAT, and if neither num_fields nor num_samples are given, all frames (ie. the value of dirfile.nframes) are returned. + * IDL: A number of undocumented, unnecessary function aliases have been + removed. They should be replaced with their canonical names, without change + in use: + + Alias Replacement + ---------------------- ---------------- + GD_ADD_CLINCOM GD_ADD_LINCOM + GD_ADD_CPOLYNOM GD_ADD_POLYNOM + GD_ADD_CRECIP GD_ADD_RECIP + GD_ALTER_CLINCOM GD_ALTER_LINCOM + GD_ALTER_CPOLYNOM GD_ALTER_POLYNOM + GD_ALTER_CRECIP GD_ALTER_RECIP + GD_FIELD_LIST_BY_TYPE GD_ENTRY_LIST + GD_FRAMENUM_SUBSET GD_FRAMENUM + GD_MADD GD_ADD + GD_MADD_BIT GD_ADD_BIT + GD_MADD_CARRAY GD_ADD_CARRAY + GD_MADD_CLINCOM GD_ADD_LINCOM + GD_MADD_CPOLYNOM GD_ADD_POLYNOM + GD_MADD_CRECIP GD_ADD_RECIP + GD_MADD_DIVIDE GD_ADD_DIVIDE + GD_MADD_LINCOM GD_ADD_LINCOM + GD_MADD_LINTERP GD_ADD_LINTERP + GD_MADD_MULTIPLY GD_ADD_MULTIPLY + GD_MADD_PHASE GD_ADD_PHASE + GD_MADD_POLYNOM GD_ADD_POLYNOM + GD_MADD_RECIP GD_ADD_RECIP + GD_MADD_SBIT GD_ADD_SBIT + GD_MADD_STRING GD_ADD_STRING + GD_MALTER_SPEC GD_ALTER_SPEC + GD_MCONSTANTS GD_CONSTANTS + GD_MFIELD_LIST GD_ENTRY_LIST + GD_MFIELD_LIST_BY_TYPE GD_ENTRY_LIST + GD_MSTRINGS GD_STRINGS + GD_MVECTOR_LIST GD_VECTOR_LIST + GD_NFIELDS_BY_TYPE GD_NENTRIES + GD_NMFIELDS GD_NENTRIES + GD_NMFIELDS_BY_TYPE GD_NENTRIES + GD_NMVECTORS GD_NVECTORS + + * BUG FIX: All bindings now provide a named constant corresponding to the C + API error GD_E_UNKNOWN_ENCODING, which was overlooked in previous releases. + * IDL BUG FIX: The missing /IGNORE_REFS and /PRETTY_PRINT are now available in gd_open. Modified: trunk/getdata/TODO =================================================================== --- trunk/getdata/TODO 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/TODO 2012-04-13 18:25:43 UTC (rev 699) @@ -2,3 +2,4 @@ * Hashed compressed files * linterp table path munging [MH] * Make webpage suck less +* Fused multiply-add [CBN] Modified: trunk/getdata/bindings/cxx/getdata/fragment.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/fragment.h 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/cxx/getdata/fragment.h 2012-04-13 18:25:43 UTC (rev 699) @@ -45,7 +45,8 @@ AutoEncoding = GD_AUTO_ENCODED, RawEncoding = GD_UNENCODED, TextEncoding = GD_TEXT_ENCODED, SlimEncoding = GD_SLIM_ENCODED, GzipEncoding = GD_GZIP_ENCODED, Bzip2Encoding = GD_BZIP2_ENCODED, - UnsupportedEncoding = GD_ENC_UNSUPPORTED + SieEncoding = GD_SIE_ENCODED, ZzipEncoding = GD_ZZIP_ENCODED, + ZzslimEncoding = GD_ZZSLIM_ENCODED, UnsupportedEncoding = GD_ENC_UNSUPPORTED }; class Dirfile; Modified: trunk/getdata/bindings/cxx/getdata/mplexentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/mplexentry.h 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/cxx/getdata/mplexentry.h 2012-04-13 18:25:43 UTC (rev 699) @@ -52,9 +52,9 @@ int SetInput(const char* field, int index); virtual int SetCountVal(int count_val); - virtual int SetCountVal(const char* threshold); + virtual int SetCountVal(const char* count_val); virtual int SetCountMax(int count_max); - virtual int SetCountMax(const char* threshold); + virtual int SetCountMax(const char* count_max); private: MplexEntry(const GetData::Dirfile *dirfile, const char* field_code) : Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-04-13 18:25:43 UTC (rev 699) @@ -3862,26 +3862,20 @@ dreturnvoid(); } -/* gd_tokenise wrapper */ +/* gd_strtok wrapper */ void F77_FUNC(gdtoke, GDTOKE) (char *toke, int32_t *toke_l, - const int32_t *dirfile, const char *string, const int32_t *string_l, - const int32_t *n) + const int32_t *dirfile, const char *string, const int32_t *string_l) { - char *token, *st; + char *token, *st = NULL; DIRFILE *D; - int i; - dtrace("%p, %p, %i, %p, %i, %i", toke, toke_l, *dirfile, string, *string_l, - *n); + dtrace("%p, %p, %i, %p, %i", toke, toke_l, *dirfile, string, *string_l); D = _GDF_GetDirfile(*dirfile); - _GDF_CString(&st, string, *string_l); + if (*string_l > 0) + _GDF_CString(&st, string, *string_l); token = gd_strtok(D, st); - for (i = 1; i < *n; ++i) { - free(token); - token = gd_strtok(D, NULL); - } free(st); _GDF_FString(toke, toke_l, token); Modified: trunk/getdata/bindings/f77/getdata.f.in =================================================================== --- trunk/getdata/bindings/f77/getdata.f.in 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/f77/getdata.f.in 2012-04-13 18:25:43 UTC (rev 699) @@ -362,6 +362,8 @@ EXTERNAL GDSYNC C Corresponding to gd_tell(3) EXTERNAL GDTELL +C Corresponding to gd_strtok(3) + EXTERNAL GDTOKE C Corresponding to gd_unhide(3) EXTERNAL GDUHID C Corresponding to gd_uninclude(3) Modified: trunk/getdata/bindings/f77/getdata.f90.in =================================================================== --- trunk/getdata/bindings/f77/getdata.f90.in 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/f77/getdata.f90.in 2012-04-13 18:25:43 UTC (rev 699) @@ -2780,13 +2780,13 @@ count_max) end subroutine -subroutine fgd_strtok (token, l, dirfile, string, n) +subroutine fgd_strtok (token, l, dirfile, string) character (len=*), intent(out) :: token integer, intent(inout) :: l - integer, intent(in) :: dirfile, n + integer, intent(in) :: dirfile character (len=*), intent(in) :: string - call gdtoke(token, l, dirfile, TRIM(string), LEN_TRIM(string), n) + call gdtoke(token, l, dirfile, TRIM(string), LEN_TRIM(string)) end subroutine function fgd_desync (dirfile, flags) Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/f77/test/big_test.f 2012-04-13 18:25:43 UTC (rev 699) @@ -2059,13 +2059,13 @@ C 232: GDTOKE check l = slen - CALL GDTOKE(str, l, d, '"test1 test2" test3\ test4 test5', 32, 1) + CALL GDTOKE(str, l, d, '"test1 test2" test3\ test4 test5', 32) CALL CHKOK2(ne, 232, 1, d) CALL CHKIN2(ne, 232, 2, l, slen) CALL CHKST2(ne, 232, 3, str, 'test1 test2') l = slen - CALL GDTOKE(str, l, d, '"test1 test2" test3\ test4 test5', 32, 2) + CALL GDTOKE(str, l, d, '', -1) CALL CHKOK2(ne, 232, 4, d) CALL CHKIN2(ne, 232, 5, l, slen) CALL CHKST2(ne, 232, 6, str, 'test3 test4') Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2012-04-13 18:25:43 UTC (rev 699) @@ -2493,13 +2493,13 @@ ! 232: fgd_strtok check l = slen - call fgd_strtok(str, l, d, '"test1 test2" test3\ test4 test5', 1) + call fgd_strtok(str, l, d, '"test1 test2" test3\ test4 test5') call check_ok2(ne, 232, 1, d) call check_int2(ne, 232, 2, l, slen) call check_str2(ne, 232, 3, str, 'test1 test2') l = slen - call fgd_strtok(str, l, d, '"test1 test2" test3\ test4 test5', 2) + call fgd_strtok(str, l, d, '') call check_ok2(ne, 232, 4, d) call check_int2(ne, 232, 5, l, slen) call check_str2(ne, 232, 6, str, 'test3 test4') Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/idl/getdata.c 2012-04-13 18:25:43 UTC (rev 699) @@ -1053,10 +1053,12 @@ encoding = GD_SLIM_ENCODED; else if (strcasecmp(enc, "SIE")) encoding = GD_SIE_ENCODED; + else if (strcasecmp(enc, "TEXT")) + encoding = GD_TEXT_ENCODED; else if (strcasecmp(enc, "ZZIP")) encoding = GD_ZZIP_ENCODED; - else if (strcasecmp(enc, "TEXT")) - encoding = GD_TEXT_ENCODED; + else if (strcasecmp(enc, "ZZSLIM")) + encoding = GD_ZZSLIM_ENCODED; else if (strcasecmp(enc, "NONE")) encoding = GD_UNENCODED; else if (strcasecmp(enc, "RAW")) @@ -3559,23 +3561,25 @@ IDL_LONG64 first_sample; IDL_LONG n_frames; IDL_LONG n_samples; - int here; + int first_frame_x, first_sample_x; gd_type_t return_type; } KW_RESULT; KW_RESULT kw; IDL_VPTR r; - kw.first_frame = kw.first_sample = kw.n_frames = kw.n_samples = kw.here = 0; + kw.first_frame = kw.first_sample = kw.n_frames = kw.n_samples = 0; + kw.first_frame_x = kw.first_sample_x = 0; kw.return_type = GD_FLOAT64; GDIDL_KW_INIT_ERROR; static IDL_KW_PAR kw_pars[] = { GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, - { "FIRST_FRAME", IDL_TYP_LONG64, 1, 0, 0, IDL_KW_OFFSETOF(first_frame) }, - { "FIRST_SAMPLE", IDL_TYP_LONG64, 1, 0, 0, IDL_KW_OFFSETOF(first_sample) }, - { "HERE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(here) }, + { "FIRST_FRAME", IDL_TYP_LONG64, 1, 0, IDL_KW_OFFSETOF(first_frame_x), + IDL_KW_OFFSETOF(first_frame) }, + { "FIRST_SAMPLE", IDL_TYP_LONG64, 1, 0, IDL_KW_OFFSETOF(first_sample_x), + IDL_KW_OFFSETOF(first_sample) }, { "NUM_FRAMES", IDL_TYP_LONG, 1, 0, 0, IDL_KW_OFFSETOF(n_frames) }, { "NUM_SAMPLES", IDL_TYP_LONG, 1, 0, 0, IDL_KW_OFFSETOF(n_samples) }, { "TYPE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(return_type) }, @@ -3591,7 +3595,7 @@ DIRFILE *D = gdidl_get_dirfile(IDL_LongScalar(argv[0])); const char* field_code = IDL_VarGetString(argv[1]); - if (kw.here) { + if (kw.first_frame_x == 0 && kw.first_sample_x == 0) { kw.first_frame = GD_HERE; kw.first_sample = 0; } @@ -4675,19 +4679,20 @@ GDIDL_KW_RESULT_ERROR; IDL_LONG64 first_frame; IDL_LONG64 first_sample; - int here; + int first_frame_x, first_sample_x; } KW_RESULT; KW_RESULT kw; - kw.first_frame = kw.first_sample = kw.here = 0; + kw.first_frame = kw.first_sample = kw.first_frame_x = kw.first_sample_x = 0; GDIDL_KW_INIT_ERROR; static IDL_KW_PAR kw_pars[] = { GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, - { "FIRST_FRAME", IDL_TYP_LONG64, 1, 0, 0, IDL_KW_OFFSETOF(first_frame) }, - { "FIRST_SAMPLE", IDL_TYP_LONG64, 1, 0, 0, IDL_KW_OFFSETOF(first_sample) }, - { "HERE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(here) }, + { "FIRST_FRAME", IDL_TYP_LONG64, 1, 0, IDL_KW_OFFSETOF(first_sample_x), + IDL_KW_OFFSETOF(first_frame) }, + { "FIRST_SAMPLE", IDL_TYP_LONG64, 1, 0, IDL_KW_OFFSETOF(first_sample_x), + IDL_KW_OFFSETOF(first_sample) }, { NULL } }; @@ -4696,7 +4701,7 @@ DIRFILE *D = gdidl_get_dirfile(IDL_LongScalar(argv[0])); const char* field_code = IDL_VarGetString(argv[1]); - if (kw.here) { + if (kw.first_frame_x == 0 && kw.first_sample_x == 0) { kw.first_frame = GD_HERE; kw.first_sample = 0; } @@ -5102,7 +5107,7 @@ dreturnvoid(); } -/* @@DLM: P gdidl_add_mplex GD_ADD_MPLEX 6 6 KEYWORDS */ +/* @@DLM: P gdidl_add_mplex GD_ADD_MPLEX 5 5 KEYWORDS */ void gdidl_add_mplex(int argc, IDL_VPTR argv[], char *argk) { dtraceidl(); @@ -5113,16 +5118,18 @@ IDL_STRING parent; int parent_x; int fragment_index; + int max; } KW_RESULT; KW_RESULT kw; GDIDL_KW_INIT_ERROR; - kw.fragment_index = kw.parent_x = 0; + kw.fragment_index = kw.parent_x = kw.max = 0; static IDL_KW_PAR kw_pars[] = { GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, { "FRAGMENT", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(fragment_index) }, + { "MAX", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(max) }, { "PARENT", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(parent_x), IDL_KW_OFFSETOF(parent) }, { NULL } @@ -5135,13 +5142,13 @@ const char* in_field = IDL_VarGetString(argv[2]); const char* count = IDL_VarGetString(argv[3]); int val = IDL_LongScalar(argv[4]); - int max = IDL_LongScalar(argv[5]); if (kw.parent_x) { const char* parent = IDL_STRING_STR(&kw.parent); - gd_madd_mplex(D, parent, field_code, in_field, count, val, max); + gd_madd_mplex(D, parent, field_code, in_field, count, val, kw.max); } else - gd_add_mplex(D, field_code, in_field, count, val, max, kw.fragment_index); + gd_add_mplex(D, field_code, in_field, count, val, kw.max, + kw.fragment_index); GDIDL_SET_ERROR(D); @@ -5180,16 +5187,16 @@ GDIDL_KW_INIT_ERROR; static IDL_KW_PAR kw_pars[] = { + { "CHECK_FIELD", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(check_x), + IDL_KW_OFFSETOF(check) }, { "CLR", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(clr) }, { "EQ", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(eq) }, GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, { "GE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(ge) }, { "GT", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(gt) }, - { "IN_FIELD1", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field_x), + { "IN_FIELD", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field_x), IDL_KW_OFFSETOF(in_field) }, - { "IN_FIELD2", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(check_x), - IDL_KW_OFFSETOF(check) }, { "LE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(le) }, { "LT", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(lt) }, { "NE", IDL_TYP_INT, 1, 0, 0, IDL_KW_OFFSETOF(ne) }, @@ -5316,14 +5323,14 @@ 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) }, GDIDL_KW_PAR_ERROR, GDIDL_KW_PAR_ESTRING, - { "IN_FIELD1", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field1_x), + { "IN_FIELD", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field1_x), IDL_KW_OFFSETOF(in_field1) }, - { "IN_FIELD2", IDL_TYP_STRING, 1, 0, IDL_KW_OFFSETOF(in_field2_x), - IDL_KW_OFFSETOF(in_field2) }, { NULL } }; Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/idl/test/big_test.pro 2012-04-13 18:25:43 UTC (rev 699) @@ -1136,7 +1136,7 @@ ; 203: gd_seek n = gd_seek(d, "data", frame_num=35) nume += check_ok2(203, 0, d) -m = gd_getdata(d, "data", type=!GD.INT16, /here, num_frames=1) +m = gd_getdata(d, "data", type=!GD.INT16, num_frames=1) nume += check_ok2(203, 1, d) nume += check_simple2(203, 0, n, 280) nume += check_simple2(203, 1, m, INDGEN(8) + 17) @@ -1298,7 +1298,7 @@ nume += check_simple2(228, 5, n.count_max, 10) ; 229: gd_add_mplex check -gd_add_mplex, d, 'new21', 'in1', 'in2', 5, 6 +gd_add_mplex, d, 'new21', 'in1', 'in2', 5, max=6 nume += check_ok2(229, 1, d) n = gd_entry(d, 'new21') @@ -1310,7 +1310,7 @@ nume += check_simple2(229, 5, n.count_max, 6) ; 230: gd_madd_mplex check -gd_add_mplex, d, parent='data', 'mnew21', 'in2', 'in3', 0, 12 +gd_add_mplex, d, parent='data', 'mnew21', 'in2', 'in3', 0, max=12 nume += check_ok2(230, 1, d) n = gd_entry(d, 'data/mnew21') Modified: trunk/getdata/bindings/make_parameters.c =================================================================== --- trunk/getdata/bindings/make_parameters.c 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/bindings/make_parameters.c 2012-04-13 18:25:43 UTC (rev 699) @@ -119,13 +119,14 @@ CONSTANT(AUTO_ENCODED, "GDE_AU", 1), CONSTANT(BZIP2_ENCODED, "GDE_BZ", 2), + CONSTANT(GZIP_ENCODED, "GDE_GZ", 2), CONSTANT(LZMA_ENCODED, "GDE_LZ", 2), + CONSTANT(SIE_ENCODED, "GDE_SI", 2), + CONSTANT(SLIM_ENCODED, "GDE_SL", 2), + CONSTANT(TEXT_ENCODED, "GDE_TX", 2), CONSTANT(UNENCODED, "GDE_UN", 2), - CONSTANT(GZIP_ENCODED, "GDE_GZ", 2), - CONSTANT(TEXT_ENCODED, "GDE_TX", 2), - CONSTANT(SLIM_ENCODED, "GDE_SL", 2), + CONSTANT(ZZSLIM_ENCODED, "GDE_ZS", 2), CONSTANT(ZZIP_ENCODED, "GDE_ZZ", 2), - CONSTANT(ZZSLIM_ENCODED, "GDE_ZS", 2), CONSTANT(NO_ENTRY, "GD_NOE", 3), CONSTANT(RAW_ENTRY, "GD_RWE", 3), Modified: trunk/getdata/doc/README.cxx =================================================================== --- trunk/getdata/doc/README.cxx 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/doc/README.cxx 2012-04-13 18:25:43 UTC (rev 699) @@ -51,7 +51,8 @@ IndexEntryType = GD_INDEX_ENTRY, DivideEntryType = GD_DIVIDE_ENTRY, RecipEntryType = GD_RECIP_ENTRY, - WindowEntryType = GD_WINDOW_ENTRY + WindowEntryType = GD_WINDOW_ENTRY, + MPlexEntryType = GD_MPLEX_ENTRY }; The GetData window operations (defined in getdata/entry.h): @@ -73,7 +74,8 @@ AutoEncoding = GD_AUTO_ENCODED, RawEncoding = GD_UNENCODED, TextEncoding = GD_TEXT_ENCODED, SlimEncoding = GD_SLIM_ENCODED, GzipEncoding = GD_GZIP_ENCODED, Bzip2Encoding = GD_BZIP2_ENCODED, - UnsupportedEncoding = GD_ENC_UNSUPPORTED + SieEncoding = GD_SIE_ENCODED, ZzipEncoding = GD_ZZIP_ENOCDED, + ZzslimEncoding = GD_ZZSLIM_ENCODED, UnsupportedEncoding = GD_ENC_UNSUPPORTED }; @@ -126,7 +128,7 @@ The ErrorCount method calls gd_error_count(3) to return the number of errors encountered by the GetData library on this Dirfile object since this method - was last called (or, the first time, since the object was created).. + was last called (or, the first time, since the object was created). * const char *Dirfile::ErrorString() * const char *Dirfile::ErrorString(size_t len) @@ -216,8 +218,11 @@ * const void *Dirfile::Constants(GetData::DataType type = Float64) * int Dirfile::Delete(const char *field_code, int flags = 0) * int Dirfile::DeleteAlias(const char* field_code, int flags = 0) +* const char **Dirfile::EntryList(const char *parent = NULL, + unsigned int type = 0, unsigned int flags = 0) * const char **Dirfile::FieldList() * const char **Dirfile::FieldListByType(GetData::EntryType type) +* unsigned long Dirfile::Flags(unsigned long set = 0, unsigned long reset = 0) * int Dirfile::Flush(const char *field_code = NULL) * const char *Dirfile::FormatFilename(int index) * int Dirfile::GetCarray(const char *field_code, GetData::DataType type, @@ -241,15 +246,18 @@ * int Dirfile::MAlterSpec(const char *line, const char *parent) * const gd_carray_t *Dirfile::MCarrays(GetData::DataType type = Float64) * const void *Dirfile::MConstants(const char *parent, GetData::DataType type) +* int Dirfile::MetaFlush() * const char **Dirfile::MFieldList(const char *parent) * const char **Dirfile::MFieldListByType(const char *parent, - * GetData::EntryType type) -* int Dirfile::MetaFlush() + GetData::EntryType type) +* int MplexLookback(int lookback) * int Dirfile::MoveAlias(const char* field_code, int new_fragment) * const char **Dirfile::MStrings(const char *parent) * const char **Dirfile::MVectorList(const char *parent) * int Dirfile::NAliases(const char* field_code) * DataType Dirfile::NativeType(const char *field_code) +* unsigned int Dirfile::NEntries(const char *parent = NULL, + unsigned int type = 0, unsigned int flags = 0) * unsigned int Dirfile::NFields() * unsigned int Dirfile::NFieldsByType(GetData::EntryType type) * off_t Dirfile::NFrames() @@ -267,15 +275,18 @@ off_t first_sample, size_t num_frames, size_t num_samples, GetData::DataType type, const void *data_in) * size_t Dirfile::PutString(const char *field_code, const char *data_in) +* int RawClose(const char *field_code = NULL) * unsigned int Dirfile::SamplesPerFrame(const char *field_code) * off_t Dirfile::Seek(const char *field_code, off_t frame_num, off_t sample_num, int whence) * const char **Dirfile::Strings() +* char *StrTok(const char *string = NULL) * int Dirfile::Sync(const char* field_code = NULL) * off_t Dirfile::Tell(const char *field_code) * int Dirfile::UnHide(const char* field_code) * int Dirfile::Validate(const char *field_code) * const char **Dirfile::VectorList() +* int VerbosePrefix(const char *prefix = NULL) These methods call the corresponding function from the C API on the C DIRFILE object associated with the C++ object. For allowed values for arguments of @@ -350,13 +361,9 @@ * EntryType Entry::Type() - This will return the field type of the Entry's field. This will be one of: + This will return the field type of the Entry's field. This will be one of the + Entry types listed above in the CONSTANTS section. - NoEntryType, BitEntryType, ConstEntryType, DivideEntryType, IndexEntryType, - LincomEntryType, LinterpEntryType, MultiplyEntryType, PhaseEntryType, - PolynomEntryType, RawEntryType, RecipEntryType, SBitEntryType, - StringEntryType - * int Entry::SetFragmentIndex(int fragment_index) * int Entry::Move(int new_fragment, int move_data = 0) @@ -390,9 +397,10 @@ * virtual DataType Entry::ConstType() * virtual size_t Entry::ArrayLen() * virtual const char *Entry::Table() -* virtual const char *Entry::Check() * virtual WindOpType Entry::WindOp() * virtual gd_triplet_t Entry::Threshold() +* virtual int Entry::CountVal() +* virtual int Entry::CountMax() 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 @@ -723,8 +731,7 @@ * WindowEntry::WindowEntry(const char *field_code, const char *in_field, const char *check_field, int fragment_index = 0) -* virtual const char *WindowEntry::Input() -* virtual const char *WindowEntry::Check() +* virtual const char *WindowEntry::Input(int index = 0) * virtual const char *WindowEntry::Scalar() * virtual int WindowEntry::ScalarIndex() * virtual WindOpType WindowEntry::WindOp() @@ -733,8 +740,7 @@ These methods, re-implemented from the Entry class, return the corresponding field parameter. -* int WindowEntry::SetInput(const char *field) -* int WindowEntry::SetCheck(const char *field) +* int WindowEntry::SetInput(const char *field, int index) * int WindowEntry::SetWindOp(WindOpType coeff) * int WindowEntry::SetThreshold(gd_triplet_t threshold) * int WindowEntry::SetThreshold(const char *threhsold) @@ -745,6 +751,38 @@ above. +MplexEntry Class +------------------- + +Defined in getdata/mplex.h + +* Mplex::MplexEntry() + + This creates a new MPLEX entry object with default parameters. + +* MplexEntry::MplexEntry(const char *field_code, const char *in_field, + const char *check_field, int fragment_index = 0) + +* virtual const char *MplexEntry::Input(int index = 0) +* virtual const char *MplexEntry::Scalar() +* virtual int MplexEntry::ScalarIndex() +* virtual int MplexEntry::CountVal() +* virtual int MplexEntry::CountMax() + + These methods, re-implemented from the Entry class, return the corresponding + field parameter. + +* int MplexEntry::SetInput(const char *field, int index) +* 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) + + These functions will change the specified input field, check field, or the + count value or max to the value or field code supplied. + + CarraytEntry Class ---------------- Modified: trunk/getdata/doc/README.f77 =================================================================== --- trunk/getdata/doc/README.f77 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/doc/README.f77 2012-04-13 18:25:43 UTC (rev 699) @@ -2,8 +2,8 @@ =============================== This README describes the Fortran 77 bindings for the GetData library. These -bindings consist of a Fortran compatibility library `libfgetdata' (written in -C) and a Fortran 77 source file `getdata.f' which defines useful Fortran +bindings consist of a Fortran compatibility library, 'libfgetdata' (written in +C) and a Fortran 77 source file, 'getdata.f' which defines useful Fortran parameters and declares the external subroutines. These bindings are designed to comply to the Fortran 77 standards. As a result, @@ -31,7 +31,7 @@ All integer type parameters passed to the compatibility library are of type INTEGER (i.e. the native size of the platform). As a result, largefile support -will not be available in the Fortran 77 bindings on a 32-bit system. +are not be available in the Fortran 77 bindings. All character string arguments require also an integer indicating the size of the character buffer. In cases where the bindings return a string value, the @@ -91,6 +91,26 @@ GDINCA. Use GDCLBK to change the callback function before calling GDINCL or GDINCA, if required. +* GDCLBK(dirfile_unit, callback) + + Input: + INTEGER dirfile_unit + EXTERNAL callback + + This wraps gd_parser_callback(3), setting the registered parser callback to + the subroutine given. The signature of this subroutine is given above under + GDCOPN. Unlike the C interface, this function cannot be used to remove a + registered callback; use GDNOCB for that. + +* GDNOCB(dirfile_unit) + + Input: + INTEGER dirfile_unit + + This calls gd_parser_callback(3) to deregister a previous parser callback + associated with the specified dirfile. If it had none, this procedure does + nothing. + * GDINVD(dirfile_unit) Output: @@ -136,6 +156,16 @@ synced, and field_code will be ignored. Otherwise the field named by field_code will be synced. +* GDRCLO(dirfile_unit, field_code, field_code_len) + + Input: + INTEGER dirfile_unit, field_code_len + CHARACTER*<field_code_len> field_code + + This wraps gd_raw_close(3). If field_code_len is zero, the entire dirfile + will be closed, and field_code will be ignored. Otherwise the field named by + field_code will be closed. + * GDMFLS(dirfile_unit) Input: @@ -144,7 +174,52 @@ This subroutine wraps gd_metaflush(3), and will cause metadata changes to be written to disk. +* GDDSYN(desync, dirfile_unit, flags) + Output: + INTEGER desync + Input: + INTEGER dirfile_unit, flags + + This wraps gd_desync(3), and sets desync to a non-zero value if the loaded + dirfile has become desynchronised from the metadata on disk and will, + optionally, reload the dirfile. + +* GDFLAG(flags, dirfile_unit, set, reset) + + Output: + INTEGER flags + Input: + INTEGER dirfile_unit, set, reset + + This wraps gd_flags(3). The value of the flags after modification are + returned in flags. + +* GDTOKE(token, token_len, dirfile_unit, string, string_len) + + Output: + CHARACTER*<token_len> token + Input/Output: + INTEGER token_len + Input: + INTEGER dirfile_unit, string_len + CHARACTER*<string_len> string + + This wraps gd_strtok(3). If string_len <= 0, the next token of the previously + supplied string is returned in token (ie. NULL is passed to gd_strtok(3)), + otherwise, the first token from string is returned, and the string is cached + by GetData. If the output token is longer than the supplied token_len, the + actual length of the token is returned in token_len and token is unmodified. + +* GDVBPX(dirfile_unit, prefix, prefix_len + + Input: + INTEGER dirfile_unit, prefix_len + CHARACTER*<prefix_len> prefix + + This wraps gd_verbose_prefix(3). To remove a prefix, set prefix_len to + zero, in which case prefix itself is ignored. + Subroutines interacting with data --------------------------------- @@ -344,41 +419,41 @@ This subroutine wraps gd_tell(3), and returns the current value of the field pointer for the specified field. +* GDMXLB(dirfile_unit, lookback) + Input: + INTEGER dirfile_unit, lookback + + This wraps gd_mplex_lookback(3). + + Subroutines interacting with global metadata -------------------------------------------- -* GDNFLD(nfields, dirfile_unit) +* GDNENT(nentries dirfile_unit, parent, parent_len, type, flags) Output: - INTEGER nframes + INTEGER nentries Input: - INTEGER dirfile_unit + INTEGER dirfile_unit, parent_len, type, flags + CHARACTER*<parent_len> parent + + This wraps gd_nentries(3). It returns the number of entries in the dirfile + satisfying the supplied criteria. If parent_len is zero, parent itself is + ignored, and top-level entries are considered. Otherwise, meta-entries + under parent are considered. - This wraps gd_nfields(3). It takes the dirfile unit number as input and - returns the number of fields in the dirfile in nfields. - +* GDNFLD(nfields, dirfile_unit) * GDNFDT(nfields, dirfile_unit, type) - - Output: - INTEGER nframes - Input: - INTEGER dirfile_unit, type - - This wraps gd_nfields_by_type(3). It takes the dirfile unit number, and - type specifier as input and returns the number of fields of the specified type - in the dirfile in nfields. - * GDNVEC(nvectors, dirfile_unit) +* GDNMFD(nfields, dirfile, parent, parent_l) +* GDNMFT(nfields, dirfile, parent, parent_l, type) +* GDNMVE(nvectors, dirfile, parent, parent_l) - Output: - INTEGER nvectors - Input: - INTEGER dirfile_unit + These procedures wrap, respectively, gd_nfields(3), gd_nfields_by_type(3), + gd_nvectors(3), gd_nmfields(3), gd_nmfields_by_type(3), and gd_nmvectors(3), + and are all special cases of GDNENT. - This wraps gd_nvectors(3). It takes the dirfile unit number as input and - returns the number of vector fields in the dirfile in nfields. - * GDNALS(nfields, dirfile_unit, field_code, field_code_len) Output: @@ -390,119 +465,58 @@ This wraps gd_naliases(3). It returns the number of aliases of field_code (including field_code itself). -* GDNMFD(nfields, dirfile, parent, parent_l) -* GDNMFT(nfields, dirfile, parent, parent_l, type) -* GDNMVE(nvectors, dirfile, parent, parent_l) +* GDENTX(entry_max, dirfile_unit, parent, parent_len, type, flags) - These subroutine wrap gd_nmfields(3), gd_nmfields_by_type(3), and - gd_nmvectors(3). They behave analogously to GDNFLD, GDNFDT, and GDNVEC. - -* GDFDNX(field_max, dirfile_unit) - Output: - INTEGER field_max + INTEGER entry_max Input: - INTEGER dirfile_unit - + INTEGER dirfile_unit, parent_len, type, flags + CHARACTER*<parent_len> parent + This subroutine, which has no direct analogue in the C API, returns the - length of the longest field name defined in the dirfile. It takes the - dirfile unit number as input and returns the length (in characters) of - the longest field name in the dirfile in field_max. + length of the longest entry name defined in the dirfile. It returns + the length (in characters) of the longest entry name in the dirfile in + entry_max which satisfies the given criteria. If parent_len is zero, + parent itself is ignored, and top-level entries are considered. + Otherwise, meta-entries under parent are considered. +* GDFDNX(field_max, dirfile_unit) * GDMFNX(field_max, dirfile_unit, parent, parent_len) - Output: - INTEGER field_max - Input: - INTEGER dirfile_unit, parent_len - CHARACTER*<parent_len> parent - - This subroutine, which has no direct analogue in the C API, returns the - length of the longest field name defined in the dirfile for META fields of the - supplied parent field. It returns the length (in characters) of the longest - META field name for the supplied parent in field_max. + These subroutines are special cases of GDENTX, with type and flags both + equal to zero, and, in the case of GDFDNX, parent_len also zero. -* GDFLDN(name, name_len, dirfile_unit, field_num) +* GDENTN(name, name_len, dirfile_unit, parent, parent_len, type, flags, + entry_num) Output: CHARACTER*<name_len> name Input/Output: INTEGER name_len Input: - INTEGER dirfile_unit, field_num + INTEGER dirfile_unit, parent_len, type, flags, entry_num + CHARACTER*<parent_len> parent - This subroutine is the replacement for gd_field_list(3). It returns in - name a Fortran 77 string containing the field name of the field indexed by - field_num (which is should be a number between 1 and the output of GDNFLD). + This subroutine is the replacement for gd_entry_list(3). It returns in + name a Fortran 77 string containing the entry name of the entry indexed by + entry_num (which is should be a number between 1 and the output of GDNENT). If the name of the field is longer than name_len, it will return the actual length of the field in name_len and not modify the name argument. If - field_num is out of range, name_len will be set to zero, and name will not be + entry_num is out of range, name_len will be set to zero, and name will not be modified. +* GDFLDN(name, name_len, dirfile_unit, field_num) * GDFDNT(name, name_len, dirfile_unit, type, field_num) - - Output: - CHARACTER*<name_len> name - Input/Output: - INTEGER name_len - Input: - INTEGER dirfile_unit, field_num, type - - This subroutine is the replacement for gd_field_list_by_type(3) and - behaves in the same manner as GDFLDN. Type should be one of the parameters - defined in getdata.f (see below). - * GDVECN(name, name_len, dirfile_unit, field_num) - - Output: - CHARACTER*<name_len> name - Input/Output: - INTEGER name_len - Input: - INTEGER dirfile_unit, field_num - - This subroutine is the replacement for gd_vector_list(3) and behaves in - the same manner as GDFLDN. - * GDMFDN(name, name_len, dirfile_unit, parent, parent_len, field_num) - - Output: - CHARACTER*<name_len> name - Input/Output: - INTEGER name_len - Input: - INTEGER dirfile_unit, field_num, parent_len - CHARACTER*<parent_len> parent - - This subroutine is the replacement for gd_mfield_list(3) and behaves in - the same manner as GDFLDN. - * GDMFDT(name, name_len, dirfile_unit, parent, parent_len, type, field_num) - - Output: - CHARACTER*<name_len> name - Input/Output: - INTEGER name_len - Input: - INTEGER dirfile_unit, field_num, parent_len, type - CHARACTER*<parent_len> parent - - This subroutine is the replacement for gd_mfield_list_by_type(3) and - behaves in the same manner as GDFDNT. - * GDMVEN(name, name_len, dirfile_unit, parent, parent_len, field_num) - Output: - CHARACTER*<name_len> name - Input/Output: - INTEGER name_len - Input: - INTEGER dirfile_unit, field_num, parent_len - CHARACTER*<parent_len> parent + These subroutines are replacements for, respectively, gd_field_list(3), + gd_field_list_by_type(3), gd_vector_list(3), gd_mfield_list(3), + gd_mfield_list_by_type(3), and gd_mvector_list(3), and are all special cases + of GDENTN. - This subroutine is the replacement for gd_mvector_list(3) and behaves in - the same manner as GDVECN. - * GDALSS(name, name_len, dirfile_unit, field_code, field_code_len, field_num) Output: @@ -1060,7 +1074,7 @@ CHARACTER*<field_code_len> field_code This subroutine returns metadata describing a PHASE field. If field_code - is not found, or the field specified is not of PHASE type, shift will + is not found, or the field specified is not of PHASE type, infield_len will be set to zero. In this case the value of the remaining data is unspecified. * GDGEPN(poly_ord, infield, infield_len, a0, a1, a2, a3, a4, a5, fragment_index, @@ -1099,15 +1113,14 @@ unspecified. * GDGEWD(infield, infield_len, checkfield, checkfield_len, windop, ithreshold, - rthreshold, fragment_index, dirfile_unit, field_code, - field_code_len) + rthreshold, fragment_index, dirfile_unit, field_code, field_code_len) Output: INTEGER windop, ithreshold, fragment_index CHARACTER*<infield_len> infield CHARACTER*<checkfield_len> checkfield Input/Output: - INTEGER infield_len, check_field_len + INTEGER infield_len, checkfield_len Input: INTEGER dirfile_unit, field_code_len CHARACTER*<field_code_len> field_code @@ -1119,6 +1132,23 @@ 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, + fragment_index, dirfile_unit, field_code, field_code_len) + + Output: + INTEGER countval, countmax, fragment_index + CHARACTER*<infield_len> infield + CHARACTER*<countfield_len> countfield + Input/Output: + INTEGER infield_len, countfield_len + Input: + INTEGER dirfile_unit, field_code_len + CHARACTER*<field_code_len> field_code + + This subroutine returns metadata describing a MPLEX field. If field_code + is not found, or the field specified is not of MPLEX type, infield_len will + be set to zero. In this case the value of the remaining data is unspecified. + * GDGECA(const_type, array_len, fragment_index, dirfile_unit, field_code, field_code_len) @@ -1417,18 +1447,31 @@ check_field, check_field_len, windop, threshold) Input: - INTEGER dirfile_unit, field_code_len, in_field_len + INTEGER dirfile_unit, field_code_len, in_field_len, check_field_len, windop CHARACTER*<field_code_len> field_code CHARACTER*<in_field_len> in_field - CHARACTER*<checkn_field_len> check_field + CHARACTER*<check_field_len> check_field INTEGER threshold or DOUBLE PRECISION threshold This subroutine wraps gd_alter_windop(3), and modifies the specified field metadata. If windop is one of GDW_EQ, GDW_NE, GDW_ST, or GDW_CL, threshold - should be of type integer, otherwise it will be double precision. + 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) + + Input: + INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval + INTEGER countmax + CHARACTER*<field_code_len> field_code + CHARACTER*<infield_len> infield + CHARACTER*<countfield_len> countfield + + This subroutine wraps gd_alter_mplex(3), and modifies the specified field + metadata. + * GDALCA(dirfile_unit, field_code, field_code_len, const_type, array_len) Input: @@ -1774,7 +1817,7 @@ CHARACTER*<in_field_len> in_field This subroutine adds a PHASE field with the supplied parameters to the - specified format file fragment of the dirfile. + specified fragment of the dirfile. * GDADWD(dirfile_unit, field_code, field_code_len, in_field, in_field_len, check_field, check_field_len, windop, threshold, fragment_index) @@ -1793,6 +1836,19 @@ GDW_ST, or GDW_CL, threshold should be an integer; otherwise, threshold should be of type double precision. +* GDADMX(dirfile_unit, field_code, field_code_len, infield, infield_len, + countfield, countfield_len, countval, countmax, fragment_index) + + Input: + INTEGER dirfile_unit, field_code_len, infield_len, countfile_len, countval + INTEGER countmax, fragment_index + CHARACTER*<field_code_len> field_code + CHARACTER*<infield_len> infield + CHARACTER*<countfield_len> countfield + + This subroutine adds a MPLEX field with the supplied parameters to the + specified fragment of the dirfile. + * GDADCA(dirfile_unit, field_code, field_code_len, const_type, array_len, data_type, data, fragment_index) @@ -1882,6 +1938,8 @@ in_field_len, bitnum, numbits) * 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) * 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, @@ -1924,6 +1982,7 @@ GD_EDO GD_E_DOMAIN GD_EDU GD_E_DUPLICATE GD_EEN GD_E_BAD_ENDIANNESS Deprecated; kept as an alias for GD_EAR. + GD_EEX GD_E_EXISTS GD_EFL GD_E_FLUSH GD_EFO GD_E_FORMAT GD_EIE GD_E_INTERNAL_ERROR @@ -1943,35 +2002,45 @@ GD_UCL GD_E_UNCLEAN_DB GD_UNS GD_E_UNSUPPORTED -Dirfile flags (required by GDOPEN, GDCOPN, GDINCL, and GDINCA): +Dirfile flags (required by GDOPEN, GDCOPN, GDINCL, GDINCA, and GDFLAG): F77 symbol C symbol Notes ---------- ----------------- -------------------------------------- GD_RO GD_RDONLY The flags argument passed to GDOPEN GD_RW GD_RDWR must contain at least GD_RO or GD_RW + + GD_AE GD_ARM_ENDIAN + GD_BE GD_BIG_ENDIAN GD_CR GD_CREAT GD_EX GD_EXCL - GD_TR GD_TRUNC - GD_AE GD_ARM_ENDIAN - GD_BE GD_BIG_ENDIAN + GD_FC GD_FORCE_ENCODING + GD_FE GD_FORCE_ENDIAN + GD_ID GD_IGNORE_DUPS + GD_IR GD_IGNORE_REFS GD_LE GD_LITTLE_ENDIAN GD_NA GD_NOT_ARM_ENDIAN - GD_FC GD_FORCE_ENCODING - GD_FE GD_FORCE_ENDIAN GD_PE GD_PEDANTIC GD_PM GD_PERMISSIVE + GD_PP GD_PRETTY_PRINT + GD_TR GD_TRUNC + GD_TS GD_TRUNCSUB GD_VB GD_VERBOSE - GD_ID GD_IGNORE_DUPS - GD_IR GD_IGNORE_REFS - GD_PP GD_PRETTY_PRINT - GD_EA GD_AUTO_ENCODED - GD_EN GD_UNENCODED - GD_ET GD_TEXT_ENCODED - GD_ES GD_SLIM_ENCODED - GD_EG GD_GZIP_ENCODED - GD_EB GD_BZIP2_ENCODED - GD_EL GD_LZMA_ENCODED +Encoding types: + + F77 symbol C symbol Notes + ---------- ----------------- -------------------------------------- + GDE_AU GD_AUTO_ENCODED + GDE_BZ GD_BZIP2_ENCODED + GDE_GZ GD_GZIP_ENCODED + GDE_LZ GD_LZMA_ENCODED + GDE_SL GD_SLIM_ENCODED + GDE_SI GD_SIE_ENCODED + GDE_TX GD_TEXT_ENCODED + GDE_UN GD_UNENCODED + GDE_ZS GD_ZZSLIM_ENCODED + GDE_ZZ GD_ZZIP_ENCODED + Entry types (required by GDFLDT): F77 symbol C symbol Notes @@ -1989,6 +2058,7 @@ GD_DVE GD_DIVIDE_ENTRY GD_RCE GD_RECIP_ENTRY GD_WDE GD_WINDOW_ENTRY + GD_MXE GD_MPLEX_ENTRY GD_COE GD_CONST_ENTRY GD_CAE GD_CARRAY_ENTRY GD_STE GD_STRING_ENTRY @@ -2063,6 +2133,7 @@ GDF_LT GD_E_FORMAT_LITERAL GDF_MM GD_E_FORMAT_META_META GDF_MR GD_E_FORMAT_METARAW + GDF_MV GD_E_FORMAT_MPLEXVAL GDF_NA GD_E_FORMAT_BAD_NAME GDF_NB GD_E_FORMAT_NUMBITS GDF_NF GD_E_FORMAT_N_FIELDS @@ -2107,6 +2178,20 @@ GDW_ST GD_WINDOP_SET GDW_UN GD_WINDOP_UNK +Desync flags: + + F77 symbol C symbol + ---------- --------------------- + GDDS_P GD_DESYNC_PATHCHECK + GDDS_O GD_DESYNC_REOPEN + +MPLEX lookback parameters: + + F77 symbol C symbol + ---------- --------------------- + GDLB_A GD_LOOKBACK_ALL + GDLB_D GD_DEFAULT_LOOKBACK + Miscellaneous parameters: F77 symbol C symbol Modified: trunk/getdata/doc/README.f95 =================================================================== --- trunk/getdata/doc/README.f95 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/doc/README.f95 2012-04-13 18:25:43 UTC (rev 699) @@ -56,9 +56,20 @@ * subroutine fgd_close (dirfile_unit) integer, intent(in) :: dirfile +* subroutine fgd_desync (dirfile_unit, flags) + integer :: fgd_desync + integer, intent(in) :: dirfile, flags + * subroutine fgd_discard (dirfile_unit) integer, intent(in) :: dirfile +* subroutine fgd_verbose_prefix(dirfile, prefix) + integer, intent(in) :: dirfile + character (len=*), intent(in) :: prefix + +* subroutine fgd_mplex_lookback(dirfile, lookback) + integer, intent(in) :: dirfile, lookback + * subroutine fgd_flush (dirfile_unit, field_code) integer, intent(in) :: dirfile character (len=*), intent(in) :: field_code @@ -67,9 +78,13 @@ integer, intent(in) :: dirfile character (len=*), intent(in) :: field_code - (For both fgd_flush and fgd_sync, If field_code is the empty string, the - operation will be peformed on the entire dirfile.) +* subroutine fgd_raw_close (dirfile, field_code) + integer, intent(in) :: dirfile + character (len=*), intent(in) :: field_code + (For fgd_flush, fgd_sync and fgd_raw_close, if field_code is the empty string, + the operation will be peformed on the entire dirfile.) + * subroutine fgd_metaflush (dirfile_unit) integer, intent(in) :: dirfile @@ -77,6 +92,12 @@ ind) integer, intent(in) :: dirfile_unit, ind +* function fgd_nentries (dirfile, parent, entype, flags) + integer :: fgd_nentries + integer, intent(in) :: dirfile, entype, flags + character (len=*), intent(in) :: parent + integer :: parent_l + * integer function fgd_nfields (dirfile_unit) integer, intent(in) :: dirfile_unit @@ -209,6 +230,11 @@ integer, intent(in) :: dirfile, fragment_index 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) + character(len=*), intent(in) :: field_code, in_field, count_field + integer, intent(in) :: dirfile, count_val, count_max, fragment_index + * subroutine fgd_add_multiply (dirfile, field_name, in_field1, in_field2, fragment_index) integer, intent(in) :: dirfile, fragment_index @@ -326,6 +352,11 @@ integer, intent(in) :: dirfile 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) + character(len=*), intent(in) :: parent, field_code, in_field, count_field + integer, intent(in) :: dirfile, count_val, count_max + * subroutine fgd_madd_phase (dirfile, parent, field_name, in_field, phase) integer, intent(in) :: dirfile, phase character (len=*), intent(in) :: field_name, in_field, parent @@ -365,7 +396,6 @@ integer, intent(in) :: dirfile, windop double precision, intent(in) :: threshold - * character (len=GD_FIELD_LEN) function fgd_reference (dirfile) integer, intent(in) :: dirfile @@ -481,6 +511,11 @@ integer, intent(in) :: dirfile, move 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 + character (len=*), intent(in) :: field_name, in_field, count_field + * subroutine fgd_alter_multiply (dirfile, field_name, in_field1, in_field2) integer, intent(in) :: dirfile character (len=*), intent(in) :: field_name, in_field1, in_field2 @@ -585,6 +620,15 @@ integer, intent(in) :: dirfile, frame_num, sample_num, flags character (len=*), intent(in): field_code +* subroutine fgd_strtok (token, token_len, dirfile, string) + character (len=*), intent(out) :: token + integer, intent(inout) :: token_len + integer, intent(in) :: dirfile + character (len=*), intent(in) :: string + + (If passed the empty string, the next token of the previous string is + returned.) + * integer function fgd_tell (dirfile, field_code) integer, intent(in) :: dirfile character (len=*), intent(in): field_code @@ -611,7 +655,6 @@ character (len=*), intent(in) :: field_code - In order to respect type safety, the gd_getdata and gd_putdata analogues encode the data type of their array in their function name, rather than as a parameter. Otherwise, they behave the same as their C counterparts. @@ -691,7 +734,7 @@ integer, intent(in) :: dirfile_unit character (len=*), intent(in) :: field_code integer(1), intent(out) :: data_out -* subroutine fgd_constants_i1(values, dirfile, parent) +* subroutine fgd_mconstants_i1(values, dirfile, parent) integer(1), dimension(:), intent(out) :: values character (len=*), intent(in) :: parent * subroutine fgd_put_carray_i1 (dirfile, field_code, data_in, start, array_len) @@ -709,6 +752,16 @@ Other procedures in the Fortran 95 bindings are: +function fgd_entry_name_max (dirfile, parent, entype, flags) + integer :: fgd_entry_name_max + integer, intent(in) :: dirfile, entype, flags + character (len=*), intent(in) :: parent + integer :: parent_l + + This function returns the length of the longest entry name defined in the + dirfile satisfying the given criteria. The parameters are the same as they + are for fgd_nentries. + * integer fgd_field_name_max (dirfile_unit) integer, intent(in) :: dirfile_unit @@ -742,21 +795,27 @@ This function returns the length of the longest alias for the given field_code. +* subroutine fgd_entry_list (entry_list, dirfile, parent, entype, flags, + entry_len) + character(len=*), dimension(:), intent(out) :: entry_list + integer, intent(in) :: dirfile, entype, flags + integer, intent(inout) :: entry_len + character (len=*), intent(in) :: parent + integer :: max_len, nentries, i, parent_l + + This subroutine behaves analogously to gd_entry_list(3), except that it + requires an additional argument, entry_len, which is the longest entry name + which will fit in the supplied entry_list array. If the longest entry name in + the dirfile is longer than entry_len, entry_len will be set to this value + (which is equivalent to the return value of fgd_entry_name_max) and entry_list + will remain untouched. + + Analogously: + * subroutine fgd_field_list (field_list, dirfile, field_len) character (len=<field_len>) dimension(:), intent(out) :: field_list integer, intent(in) :: dirfile_unit integer, intent(inout) :: field_len - - This subroutine behaves analogously to gd_get_field_list(3), except that it - requires a third argument, field_len, which is the longest field name which - will fit in the supplied field_list array. If the longest field name in the - dirfile is longer than field_len, field_len will be set to this value (which - is equivalent to the return value of fgd_field_name_max or - fgd_string_value_max) and field_list will remain untouched. The character - strings returned are Fortran strings. - - Analogously: - * subroutine fgd_field_list_by_type (field_list, dirfile, entype, field_len) character (len=<field_len>) dimension(:), intent(out) :: field_list integer, intent(in) :: dirfile_unit, entype @@ -806,14 +865,14 @@ type(gd_entry), intent(out) :: ent This fills ent with the metadata for field_code obtained by calling - gd_get_entry(3). It returns the field type, or GD_NO_ENTRY if an error - occurred in the gd_get_entry() call. The gd_entry type is defined in the + gd_entry(3). It returns the field type, or GD_NO_ENTRY if an error + occurred in the gd_entry() call. The gd_entry type is defined in the getdata module to be: 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 + integer :: ithreshold, count_val, count_max 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 2012-04-06 16:18:19 UTC (rev 698) +++ trunk/getdata/doc/README.idl 2012-04-13 18:25:43 UTC (rev 699) @@ -21,7 +21,7 @@ something similar to: *** GETDATA - IDL GetData bindings (not loaded) - Version: 0.8.0, Build Date: Sat Oct 23 00:00:00 UTC 2010, Source: The GetData Project <get...@li...> + Version: 0.8.0, Build Date: Thu Apr 12 00:00:00 UTC 2012, Source: The GetData Project <get...@li...> Path: /usr/local/rsi/idl/bin/bin.linux.x86/idl_getdata.so The DLM will be automatically loaded by the interpreter the first time a IDL @@ -86,7 +86,7 @@ procedures may take two optional keyword parameters which deal with error reporting: - ERROR: a variable in which the dirfile error number resulting from this + ERROR: a variable into which the dirfile error number resulting from this call will be stored. It will be the !GD.E_* error code corresponding to the C API error code. On success this will be !GD.E_OK (= 0). If this parameter is not specified, the dirfile error can still be @@ -105,34 +105,37 @@ The GD_ENTRY structure is used in place of the C API's gd_entry_t data type. It is essentially equivalent and is defined as: +** Structure GD_ENTRY, 30 tags, length=512, data length=502: FIELD STRING - FIELD_TYPE INTEGER - FRAGMENT INTEGER + FIELD_TYPE INT + FRAGMENT INT IN_FIELDS STRING Array[3] A DOUBLE Array[6] CA DCOMPLEX Array[6] - ARRAY_LEN INTEGER + ARRAY_LEN INT B DOUBLE Array[3] CB DCOMPLEX Array[3] - BITNUM INTEGER - COMP_SCAL INTEGER - DATA_TYPE INTEGER + BITNUM INT + COMP_SCAL INT + COUNT_MAX INT + COUNT_VAL INT + DATA_TYPE INT DIVIDEND DOUBLE CDIVIDEND DCOMPLEX M DOUBLE Array[3] CM DCOMPLEX Array[3] - N_FIELDS INTEGER - NUMBITS INTEGER - POLY_ORD INTEGER + N_FIELDS INT + NUMBITS INT + POLY_ORD INT SCALAR STRING Array[6] - SCALAR_IND INTEGER Array[6] + SCALAR_IND INT Array[6] SHIFT LONG SPF UINT TABLE STRING UTHRESHOLD ULONG ITHRESHOLD LONG RTHRESHOLD DOUBLE - WINDOP INTEGER + WINDOP INT The DATA_TYPE member is used for both RAW and CONST fields. (The gd_entry_t object has a 'const_type' member for the CONST fields instead.) For details on @@ -233,6 +236,17 @@ indexed by FRAGMENT, or the primary format file if FRAGMENT is not given either. See gd_add_linterp(3) and gd_madd_linterp(3). +PROCEDURE GD_ADD_MPLEX, dirfile_unit, field_name, in_field, count_field, + value, FRAGMENT=fragment, MAX=max, PARENT=parent + + This procedure adds a MPLEX field with the name 'field_name' to the dirfile. + The input vector is 'in_field', the multiplex index vector is 'count_field', + the value of the multiplex index is 'value' and the maximum value is 'max', + if specified. If PARENT is given, this field is added as a metafield under + the given parent field. Otherwise, the field is added to the fragment indexed + by FRAGMENT, or the primary format file if FRAGMENT is not given either. See + gd_add_mplex(3) and gd_madd_mplex(3). + PROCEDURE GD_ADD_MULTIPLY, dirfile_unit, field_name, in_field1, in_field2, FRAGMENT=fragment, PARENT=parent @@ -254,7 +268,7 @@ and gd_madd_phase(3). PROCEDURE GD_ADD_POLYNOM, dirfile_unit, field_name, in_field, a0, [a1, [a2, - [a3, [a4, [a5,]]]]], FRAGMENT=fragment, PARENT=parent + [a3, [a4, [a5,]]]]] FRAGMENT=fragment, PARENT=parent This procedure adds a POLYNOM field with the name 'field_name' to the dirfile. The input vector field is given by 'in_field' and the shift by the remaining @@ -430,6 +444,13 @@ file containing the look up table will be renamed to reflect changes to the 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 + + This procedure modifies the metadata of the MPLEX field specified by + 'field_code', updating only those field parameters specified as keyword + parameters. See gd_alter_mplex(3). + PROCEDURE GD_ALTER_MULTIPLY, dirfile_unit, field_code, IN_FIELD1=in_field1, IN_FIELD2=in_field2 @@ -489,8 +510,9 @@ to the field metadata. If PARENT is given, the field is assumed to be a metafield under the given parent. See gd_alter_spec(3) and gd_malter_spec(3). -PROCEDURE GD_ALTER_WINDOW, dirfile_unit, field_code, CHECK=check, /CLR, /EQ, - /GE, /GT, IN_FIELD=in_field, /LE, /LT, /NE, /SET, THRESHOLD=threshold +PROCEDURE GD_ALTER_WINDOW, dirfile_unit, field_code, CHECK_FIELD=check_field, + /CLR, /EQ, /GE, /GT, IN_FIELD=in_field, /LE,... [truncated message content] |
From: <ket...@us...> - 2012-04-06 16:18:25
|
Revision: 698 http://getdata.svn.sourceforge.net/getdata/?rev=698&view=rev Author: ketiltrout Date: 2012-04-06 16:18:19 +0000 (Fri, 06 Apr 2012) Log Message: ----------- NEWS Modified Paths: -------------- trunk/getdata/NEWS Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-04-06 16:17:12 UTC (rev 697) +++ trunk/getdata/NEWS 2012-04-06 16:18:19 UTC (rev 698) @@ -112,7 +112,8 @@ metadata on open. * BUG FIX: GetData no longer omits the input field to a RECIP when writing - metadata to disk. + metadata to disk. Nor does it forget to put newlines after RECIP or DIVIDE + field specifications. * BUG FIX: GetData no longer assumes all fields have the same number of samples-per-frame when computing a LINCOM. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-06 16:17:18
|
Revision: 697 http://getdata.svn.sourceforge.net/getdata/?rev=697&view=rev Author: ketiltrout Date: 2012-04-06 16:17:12 +0000 (Fri, 06 Apr 2012) Log Message: ----------- Fix compiler warning. Modified Paths: -------------- trunk/getdata/src/open.c Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2012-04-04 23:47:18 UTC (rev 696) +++ trunk/getdata/src/open.c 2012-04-06 16:17:12 UTC (rev 697) @@ -24,33 +24,35 @@ /* crawl the directory, and delete everything */ static int _GD_TruncDir(DIRFILE *D, int dirfd, const char *dirfile, int root) { - int format_trunc = 0; + int ret, format_trunc = 0; DIR* dir; struct dirent *lamb, *result; struct stat statbuf; - int fd = dirfd, ret; size_t dirent_len = offsetof(struct dirent, d_name); size_t dirfile_len = strlen(dirfile); dtrace("%p, %i, \"%s\", %i", D, dirfd, dirfile, root); #if defined(HAVE_FDOPENDIR) && !defined(GD_NO_DIR_OPEN) - /* only need to duplicate the fd of the root directory; otherwise this - * function will close the fd */ - if (root && (fd = dup(dirfd)) == -1) { - _GD_SetError(D, GD_E_TRUNC, GD_E_TRUNC_DIR, dirfile, errno, NULL); - dreturn("%i", -1); - return -1; - } - dir = fdopendir(fd); + { + int fd = dirfd; + /* only need to duplicate the fd of the root directory; otherwise this + * function will close the fd */ + if (root && (fd = dup(dirfd)) == -1) { + _GD_SetError(D, GD_E_TRUNC, GD_E_TRUNC_DIR, dirfile, errno, NULL); + dreturn("%i", -1); + return -1; + } + dir = fdopendir(fd); #ifdef HAVE_FPATHCONF - dirent_len += fpathconf(fd, _PC_NAME_MAX) + 1; + dirent_len += fpathconf(fd, _PC_NAME_MAX) + 1; #elif defined HAVE_PATHCONF - dirent_len += pathconf(dirfile, _PC_NAME_MAX) + 1; + dirent_len += pathconf(dirfile, _PC_NAME_MAX) + 1; #else - dirent_len += FILENAME_MAX; + dirent_len += FILENAME_MAX; #endif + } #else dir = opendir(dirfile); @@ -172,7 +174,7 @@ #else rmdir(name) #endif - ) { + ) { _GD_SetError(D, GD_E_TRUNC, GD_E_TRUNC_UNLINK, name, errno, NULL); free(lamb); free(name); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-04-04 23:47:27
|
Revision: 696 http://getdata.svn.sourceforge.net/getdata/?rev=696&view=rev Author: ketiltrout Date: 2012-04-04 23:47:18 +0000 (Wed, 04 Apr 2012) Log Message: ----------- Compatibility mode fixes; more doc updates. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/man/Makefile.am trunk/getdata/man/dirfile-format.5 trunk/getdata/man/gd_delete.3 trunk/getdata/man/gd_rename.3 trunk/getdata/src/add.c trunk/getdata/src/ascii.c trunk/getdata/src/common.c trunk/getdata/src/compat.c trunk/getdata/src/del.c trunk/getdata/src/encoding.c trunk/getdata/src/entry.c trunk/getdata/src/errors.c trunk/getdata/src/flimits.c trunk/getdata/src/fpos.c trunk/getdata/src/fragment.c trunk/getdata/src/getdata.h.in trunk/getdata/src/globals.c trunk/getdata/src/gzip.c trunk/getdata/src/include.c trunk/getdata/src/internal.h trunk/getdata/src/legacy.c trunk/getdata/src/mod.c trunk/getdata/src/move.c trunk/getdata/src/name.c trunk/getdata/src/nframes.c trunk/getdata/src/open.c trunk/getdata/src/putdata.c trunk/getdata/src/sie.c trunk/getdata/src/zzip.c trunk/getdata/src/zzslim.c Added Paths: ----------- trunk/getdata/man/gd_include_affix.3 Removed Paths: ------------- trunk/getdata/man/gd_include.3 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/ChangeLog 2012-04-04 23:47:18 UTC (rev 696) @@ -1,3 +1,6 @@ +2012-04-01 D. V. Wiebe <ge...@ke...> svn:696 + * src/compat.c (_GD_ReadDir): Renamed from gd_readdir(). + 2012-04-01 D. V. Wiebe <ge...@ke...> svn:694 * src/getdata.h.in: Deprecate gd_bit_t and gd_spf_t. Remove gd_count_t. * src/getdata.h.in bindings/make_parameters.c: Remove GD_COUNT_MAX. Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/NEWS 2012-04-04 23:47:18 UTC (rev 696) @@ -1,7 +1,254 @@ New in version 0.8.0a: - * Some stuff. + Dirfile Changes + * Dirfile Standards Version 9 has been released. It adds two new field types: + MPLEX, which allows multiplexing multiple low-rate channels in one high-rate + one, and WINDOW, which extracts a portion of a field based on the value of + a second field. More changes are listed below. + + * Alternate field names may be defined using the /ALIAS directive. Aliases + can't be used as a parent when defining metafields, but are otherwise + indistinguishable from a field's original ("canonical") name. + + * The /VERSION directive now has fragment scope, which should + + * Fields may be "hidden" using the /HIDDEN directive. The Standards don't say + what a "hidden" field does, but GetData will, by default, exclude them from + the count and list functions. + + * Literal integers in the format may now be specified in octal (using 0####) + or hexidecimal (using 0x##### or 0X#####) in addition to decimal. + + * Effects of the /VERSION directive no longer propagate upwards to parent + fragments. This makes subdirfile encapsulation easier and fixes the + "Version Leak" problem reported with earlier Standards. The effect of this + is twofold: "/VERSION 9" never propagates upwards, but neither do the + Versions specified in subfragments included in a Version 9 fragment (even if + they are earlier Versions). + + * The /INCLUDE directive can take two additional, optional parameters which + specify a prefix and/or suffix used to modify the entry names of the fields + defined in the included fragment. (The intent of this is to permit the + inclusion of multiple subdirfiles which define the same set of fields, by + modifying their field names.) + + * Three new encoding schemes are available. The first is the Sample-Index + Encoding (SIE), similar to run-length encoding, useful for compressing data + which changes very rarely varying data. Like the ASCII encoding, GetData + implements it internally, so it's always available. The other two schemes + (zzip and zzslim) are based around the ZZip library, an access library for + PKWARE ZIP files. These are unusual in that they store all raw data in the + same ZIP archive. + + * The /ENCODING directive takes an optional second token. The zzip and zzslim + encoding schemes optionally use this token to specify the name of the + combined ZIP archive. + + * The data type names FLOAT (an alias for FLOAT32) and DOUBLE (an alias for + FLOAT64) have been deprecated. + + Library Changes: + + * On POSIX systems, GetData now caches the dirfile directory (and any other + necessary subdirectories). This guards against third-parties renaming the + directory while GetData is interested in it. + + * GetData is, in general, more careful about pathname management. At least + on POSIX systems, it will now try to canonicalise all paths it comes across, + including resolving symlinks. As a result, GetData no longer becomes + befuddled by a caller who opens a Dirfile with a relative pathname and then + calls chdir(2). Functions like gd_fragmentname() and gd_raw_filename() now + return canonicalised paths. + + * The library no longer forces a sync of all raw data on close. The sync + causes a flush of filesystem buffers, which is usually unnecessary overhead, + and degredatious to efficient disk I/O. Use an explicit gd_sync() or + gd_flush() before closing to recover the old behaviour, if desired. + + * The error messages output by GetData with GD_VERBOSE turned on now has + "libgetdata: " prefixed to it. A further prefix may be specified by the + caller. + + * When truncating a dirfile, the primary format file is no longer deleted and + then recreated. Instead, it is simply truncated in-place. This change + means that a Dirfile which is undergoing truncation always appears (to + GetData, at least) to be a valid Dirfile, which can be useful if it is being + concurrently read. + + * Write support for gzip-encoded data has been added. Writes occur out of + place, which means sufficient space on the filesystem is needed for a second + copy of every field being written. Writing to a gzip compressed field + requires uncompressing the portion of the field before the write of the + existing file, recompressing it to the temporary file, then writing the new + data to the temporary file. A subsequent write at a later position, will + continue to write to the compressed file, but a subsequent write to an + earlier position requires coping all remaining data from the old file to the + temporary file, finalising it, moving it over top of the old file, and then + starting afresh with a new temporary file. As a result, it's not very fast, + and likely should be avoided for non-sequential writes. + + * Raw data files are now only opened for writing if writing is going to occur. + In particular, this means that opening a dirfile with GD_RDWR will still + work even if you don't have write access to it, so long as you don't try + writing to it. + + * GetData now tracks a "current location" for all RAW files, and allows reads + and writes to occur at the "current location" (via the special symbol + GD_HERE). For some derived fields the idea of a "current location" doesn't + make sense, and won't work. + + * BUG FIX: In previous versions, renaming a field with gd_rename() wouldn't + update or invalidate the cache of fields which depended on the old name, + leading to surprising results. It will now either invalidate these fields + metadata caches or else change the name in those definitions as well. + + * BUG FIX: The invalid syntax "/META parent/child granchild ..." is now + properly rejected by the metadata parser. Previously it half-worked, + resulting in segfault in gd_close(). + + * BUG FIX: Several syntax errors encountered in PHASE and RECIP field + specifications weren't being reported by the parser, leading to corrupted + metadata on open. + + * BUG FIX: GetData no longer omits the input field to a RECIP when writing + metadata to disk. + + * BUG FIX: GetData no longer assumes all fields have the same number of + samples-per-frame when computing a LINCOM. + + * BUG FIX: Writing an empty fragment with GD_PRETTY_PRINT turned on no longer + results in a floating-point exception. + + * BUG FIX: Renaming a field now properly flags the fragment which contains it + as dirty, which will ensure the rename is writen to disk when the metadata + are next flushed. + + * BUG FIX: Whitespace within tokens is now properly escaped when metadata is + flushed to disk. + + * BUG FIX: The parser no longer gets tripped up by two character escape + sequences in a row, nor by an escape sequence at the start of a token. + + * BUG FIX: "/PROTECT data" directives are now being written when they should + be. Previously, they were dropped completely. Reported by Alexandra + Rahlin. + + * BUG FIX: CARRAY indices provided to gd_add() in the entry.scalar_ind member + are no longer ignored. Reported by S. J. Benton. + + API Changes: + + * Functions which add fields (gd_add(), gd_add_<type>(), &c.) can now be used + to add metafields by using their full "parent/name" field code. The old, + explicit metafield adding routines (gd_madd(), &c.) are still available. + + * As with their corresponding names in the Standards, the gd_type_t symbols + GD_FLOAT and GD_DOUBLE are now deprecated. Use GD_FLOAT32 and GD_FLOAT64 as + appropriate. + + * A new open flag, GD_TRUNCSUB, will cause GD_TRUNC to descend into + subdirectories of a directory it is truncating. If not specified along with + GD_TRUNC, it does nothing. + + * New public functions gd_nentries() and gd_entry_list() provide a generic + interface to the field counting and list functionality. The other functions + (gd_nfields(), gd_nfields_by_type(), &c. and gd_field_list(), + gd_field_list_by_type(), &c. are now simply special cases of these two + functions. + + * The "hiddenness" of a field name may be queried with gd_hidden(), set with + gd_hide() and cleared with gd_unhide(). + + * /INCLUDE affixes may be queried with gd_fragment_affixes() and added, + modified or deleted with gd_alter_affixes(). A new fragment can be added to + the dirfile with affixes using gd_include_affix(). + + * New aliases may be added with gd_add_alias() or gd_madd_alais. The target + of an alias is retrned by gd_alias_target(); a list of aliases of a field, + or their number, is returned by gd_aliases() and gd_naliases(). + + * In addition to the special symbol GD_HERE which may be passed to + gd_getdata() and gd_putdata(), the "current location" of fields may be + queried with gd_tell() and moved with gd_seek(). + + * Because GetData considers aliases and canonical names to be + indistinguishable, passing an alias name to most functions will result in + the function operating on target field. To manipulate aliases themselves, + the API has the new interfaces gd_move_alias(), gd_delete_alias(), and + gd_rename_alias(). + + * The typedefs gd_bit_t and gd_spf_t have been deprecated. They are replaced + with 'int' and 'unsigned int' respectively. For backwards compatibility, + the typedefs (with their new types) are still declared in getdata.h, but the + API no longer makes use of them. + + * GetData's tokeniser has been exposed to the public API via the gd_strtok() + function, which works similar to strtok(3), and returns successive tokens of + a string given it. + + * A new function gd_error_count() returns the number of GetData errors + encountered on a Dirfile since it was last called (or since the Dirfile was + opened). This is useful for programs that care whether *something* failed, + but don't really care what it was. + + * Reading MPLEX fields can result in inefficiencies due to GetData having to + look backwards for the first value of the derived field. A new function, + gd_mplex_lookback(), can be used to alter how much lookback is done. + + * The "move_data" flag in gd_rename() has been replaced with a generic "flags" + parameter. Two rename flags are defined: GD_REN_DATA, which recovers the + old behaviour of move_data, and GD_REN_UBDB which will cause references to + the renamed field to be renamed also in derived fields which refer to it. + Without GD_REN_UBDB, these definitions are left unchagned. + + * Flags which affect the long-term operation of GetData may be modified after + open using gd_flags(). Currently these flags are just GD_VERBOSE and + GD_PRETTY_PRTNT. + + * The gd_flush() function, which both syncs and closes RAW files, has been + broken up into its two parts with two new functions: gd_sync(), which just + syncs and gd_raw_close(), which just closes. gd_flush() still does both. + + * Using the new gd_desync() function will cause GetData to determine whether + the Dirfile metadata on disk has changed since the Dirfile was opened. + + * A prefix to the automatic error messages printed by GetData when using the + GD_VERBOSE flag may be specified with gd_verbose_prefix(). + + * When requesting the exclusive creation of a new dirfile with (O_CREAT | + O_EXCL) GetData will now return the new error GD_E_EXISTS if the dirfile + already exists. Previously it would return GD_E_CREAT in this situation. + + * The error codes GD_E_BAD_ENDIANNESS and GD_E_BAD_PROTECTION have been + combined into a more generic error code: GD_E_ARGUMENT. The old symbols are + retained for backwards compatibility. + + * C89 API: Passing NULL to gd_alter_crecip() for cdividend is now treated as + if it were passed zero (ie. it indicates no change for cdividend). + + * BUG FIX: calling gd_putdata() with num_frames and num_samples both zero no + longer confuses GetData: instead it simply does nothing. + + * BUG FIX: gd_spf() now returns GD_E_DIMENSION when passed a scalar field + code, as the documentation says it should. Previously it returned + GD_E_BAD_FIELD_TYPE. + + Legacy API Changes: + + * The never-used n_mplex/mplexEntries part of the FormatType now has a use: + both MPLEX and WINDOW entries are reported there. + + Bindings Changes: + + * Python: The return_type, num_fields, and num_samples parameters to + dirfile.getdata() are now optional. The return_type defautls to + pygetdata.FLOAT, and if neither num_fields nor num_samples are given, all + frames (ie. the value of dirfile.nframes) are returned. + + * IDL BUG FIX: The missing /IGNORE_REFS and /PRETTY_PRINT are now available in + gd_open. + |==============================================================================| New in version 0.7.3: @@ -346,7 +593,7 @@ * Python: dirfiles are now opened read-only by default. - * C++ BUG FIX: Entry::Scalar() no longer rejects valid values of index. + * C++ BUG FIX: Entry::Scalar() no longer rejects valid values of index. * IDL BUG FIX: A memory impropriety involving keyword arguments. This bug manifested by rejecting valid keyword arguments on 64-bit systems, but may @@ -375,7 +622,7 @@ New in version 0.6.3: - Bindings + Bindings * A memory leak has been plugged in the Python bindings manifesting in calls to dirfile.getdata() returning a NumPy array. In previous versions, the @@ -402,7 +649,7 @@ * A potential segfault relating to error reporting in the legacy API has been fixed. - + Bindings * C++ BUG FIX: Several bugs preventing compilation of the C++ test-suite under @@ -693,7 +940,7 @@ - dirfile_alter_entry, dirfile_alter_<field-type>, dirfile_alter_spec, dirfile_malter_spec - + * A field may be moved to a different format file fragment using dirfile_move. * A field may be renamed by using dirfile_rename. @@ -713,7 +960,7 @@ is really only useful identically duplicate specifications, since there is no indication of which of the duplicates is honoured. Explicit control can be obtained by handling this inside a caller supplied callback function. - + Bindings: * All functions in the Fortran 77 bindings have been completely renamed from @@ -762,7 +1009,7 @@ |==============================================================================| New in version 0.4.1: - + Library Changes * BUG FIX: Adding an ASCII encoded RAW field no longer creates an empty, @@ -784,7 +1031,7 @@ |==============================================================================| New in version 0.4.0: - + Dirfile Changes * GetData now supports Dirfile Standards Version 6. Standards Version 6 adds @@ -970,7 +1217,7 @@ are new This affects the legacy API. - + Legacy API Changes * The legacy API has been marked deprecated. Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-04-04 23:47:18 UTC (rev 696) @@ -3341,7 +3341,8 @@ if (!gd_error(D) && (*field_num > 0) && (*field_num <= (int)nfields)) { v = gd_mstrings(D, pa); - _GDF_FString(value, value_l, gd_error(D) ? "" : v[*field_num - 1]); + _GDF_FString((char*)value, value_l, + gd_error(D) ? "" : ((char**)v)[*field_num - 1]); } else *value_l = 0; @@ -3436,11 +3437,11 @@ *field_code_l, in_field, *in_field_l, check_field, *check_field_l, *windop, threshold, *fragment_index); - t = _GDF_SetTriplet(*windop, threshold); + t = _GDF_SetTriplet((gd_windop_t)*windop, threshold); gd_add_window(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, *field_code_l), _GDF_CString(&in, in_field, *in_field_l), - _GDF_CString(&cf, check_field, *check_field_l), *windop, t, + _GDF_CString(&cf, check_field, *check_field_l), (gd_windop_t)*windop, t, *fragment_index); free(fc); @@ -3464,12 +3465,12 @@ *parent_l, field_code, *field_code_l, in_field, *in_field_l, check_field, *check_field_l, *windop, threshold); - t = _GDF_SetTriplet(*windop, threshold); + t = _GDF_SetTriplet((gd_windop_t)*windop, threshold); gd_madd_window(_GDF_GetDirfile(*dirfile), _GDF_CString(&pa, parent, *parent_l), _GDF_CString(&fc, field_code, *field_code_l), _GDF_CString(&in, in_field, *in_field_l), _GDF_CString(&cf, check_field, - *check_field_l), *windop, t); + *check_field_l), (gd_windop_t)*windop, t); free(pa); free(fc); @@ -3654,11 +3655,11 @@ *field_code_l, in_field, *in_field_l, check_field, *check_field_l, *windop, threshold); - t = _GDF_SetTriplet(*windop, threshold); + t = _GDF_SetTriplet((gd_windop_t)*windop, threshold); gd_alter_window(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, *field_code_l), _GDF_CString(&in, in_field, *in_field_l), - _GDF_CString(&cf, check_field, *check_field_l), *windop, t); + _GDF_CString(&cf, check_field, *check_field_l), (gd_windop_t)*windop, t); free(cf); free(in); Modified: trunk/getdata/man/Makefile.am =================================================================== --- trunk/getdata/man/Makefile.am 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/man/Makefile.am 2012-04-04 23:47:18 UTC (rev 696) @@ -40,9 +40,9 @@ gd_fragment_index.3 gd_fragmentname.3 gd_framenum_subset.3 \ gd_frameoffset.3 gd_free_entry_strings.3 gd_get_carray_slice.3 \ gd_get_constant.3 gd_get_string.3 gd_getdata.3 gd_hidden.3 \ - gd_hide.3 gd_include.3 gd_invalid_dirfile.3 gd_madd_bit.3 \ - gd_mcarrays.3 gd_mconstants.3 gd_metaflush.3 gd_move.3 \ - gd_mplex_lookback.3 gd_mstrings.3 gd_naliases.3 \ + gd_hide.3 gd_include_affix.3 gd_invalid_dirfile.3 \ + gd_madd_bit.3 gd_mcarrays.3 gd_mconstants.3 gd_metaflush.3 \ + gd_move.3 gd_mplex_lookback.3 gd_mstrings.3 gd_naliases.3 \ gd_native_type.3 gd_nentries.3 gd_nfragments.3 gd_nframes.3 \ gd_parent_fragment.3 gd_parser_callback.3 gd_protection.3 \ gd_put_carray_slice.3 gd_put_constant.3 gd_put_string.3 \ @@ -74,6 +74,7 @@ gd_add_spec.3:gd_madd_spec.3 \ gd_cbopen.3:gd_open.3 \ gd_close.3:gd_discard.3 \ + gd_include_affix.3:gd_include.3 \ gd_alter_bit.3:gd_alter_carray.3 gd_alter_bit.3:gd_alter_clincom.3 \ gd_alter_bit.3:gd_alter_const.3 gd_alter_bit.3:gd_alter_cpolynom.3 \ gd_alter_bit.3:gd_alter_crecip.3 gd_alter_bit.3:gd_alter_divide.3 \ @@ -87,6 +88,8 @@ gd_get_carray_slice.3:gd_get_carray.3 \ gd_put_carray_slice.3:gd_put_carray.3 \ gd_delete.3:gd_delete_alias.3 \ + gd_rename.3:gd_rename_alias.3 \ + gd_move.3:gd_move_alias.3 \ gd_hide.3:gd_unhide.3 \ gd_add_alias.3:gd_madd_alias.3 \ gd_flush.3:gd_sync.3 gd_flush.3:gd_raw_close.3 \ Modified: trunk/getdata/man/dirfile-format.5 =================================================================== --- trunk/getdata/man/dirfile-format.5 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/man/dirfile-format.5 2012-04-04 23:47:18 UTC (rev 696) @@ -526,9 +526,16 @@ The /VERSION directive has .IR "immediate scope" : its effect is immediate, and it applies only to metadata below it, including -and propagating downwards to sub-fragments after the directive. Its effect -also propagates upwards back to the parent fragment, and affect subsequent -metadata. It appeared in Standards Version 5. +and propagating downwards to sub-fragments after the directive. +.PP +In Standards Version 8 and earlier, its effect also propagates upwards back to +the parent fragment, and affect subsequent metadata. Starting with Standards +Version 9, this no longer happens. As a result, a /VERSION directive which +indicates a version of 9 or later never propagates upwards; additionally, +/VERSION directives found in subfragments included in a Version 9 or later +fragment aren't propagated upwards into that fragment, regardless of the +Version of the subfragments. The /VERSION directive appeared in Standards +Version 5. .RE .SH FIELD SPECIFICATION LINES Modified: trunk/getdata/man/gd_delete.3 =================================================================== --- trunk/getdata/man/gd_delete.3 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/man/gd_delete.3 2012-04-04 23:47:18 UTC (rev 696) @@ -22,7 +22,7 @@ .nh .ad l .BI "int gd_delete(DIRFILE *" dirfile ", const char *" field_code , -.BI "int " flags ); +.BI "unsigned int " flags ); .HP .BI "int gd_delete_alias(DIRFILE *" dirfile ", const char *" alias_name , .BI "unsigned int " flags ); Deleted: trunk/getdata/man/gd_include.3 =================================================================== --- trunk/getdata/man/gd_include.3 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/man/gd_include.3 2012-04-04 23:47:18 UTC (rev 696) @@ -1,299 +0,0 @@ -.\" gd_include.3. The gd_include man page. -.\" -.\" Copyright (C) 2008, 2009, 2010, 2011 D. V. Wiebe -.\" -.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" -.\" -.\" This file is part of the GetData project. -.\" -.\" Permission is granted to copy, distribute and/or modify this document -.\" under the terms of the GNU Free Documentation License, Version 1.2 or -.\" any later version published by the Free Software Foundation; with no -.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover -.\" Texts. A copy of the license is included in the `COPYING.DOC' file -.\" as part of this distribution. -.\" -.TH gd_include 3 "17 August 2011" "Version 0.8.0" "GETDATA" -.SH NAME -gd_include \(em add a format specification fragment to a dirfile -.SH SYNOPSIS -.B #include <getdata.h> -.HP -.nh -.ad l -.BI "int gd_include(DIRFILE *" dirfile ", const char *" include_file , -.BI "int " parent_fragment ", unsigned long " flags ); -.hy -.ad n -.SH DESCRIPTION -The -.BR gd_include () -adds the format specification fragment given by the path -.I include_file -to the specified dirfile, possibly creating the fragment. This occurs as if, -in the existing fragment indexed -by -.IR parent_fragment , -the following directive were present: -.IP -.BI "/INCLUDE " <include_file> -.PP -(see -.BR dirfile-format (5)). -If a parser callback function had been specified when the dirfile was opened -using -.BR gd_cbopen (3), -or added later with -.BR gd_parser_callback (3), -this callback function will be called if a syntax error is encountered while -parsing the included fragment. - -The -.I flags -argument should be a bitwise-or'd collection of the following flags, or zero -if no flags are desired: -.TP -.B GD_BIG_ENDIAN -Specifies that raw data on disk is stored as big-endian data (most significant -byte first). Specifying this flag along with the contradictory -.BR GD_LITTLE_ENDIAN -will cause the library to assume that the endianness of the data is opposite to -that of the native architecture. - -This flag is ignored completely if an -.B ENDIAN -directive occurs in the fragment, unless -.B GD_FORCE_ENDIAN -is also specified. -.TP -.B GD_CREAT -An empty fragment will be created, if one does not already exist. The fragment -will have mode -.BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH -(0666), modified by the caller's umask value (see -.BR umask (2)). -.TP -.B GD_EXCL -Ensure that this call creates a new fragment: when specified along with -.BR GD_CREAT , -the call will fail if the file specified by -.I include_file -already exists. Behaviour of this flag is undefined if -.B GD_CREAT -is not specified. This flag suffers from all the limitations of the -.B O_EXCL -flag as indicated in -.BR open (2). -.TP -.B GD_FORCE_ENCODING -Specifies that -.B ENCODING -directives (see -.BR dirfile-format (5)) -found in the fragment should be ignored. The encoding scheme -specified in -.I flags -will be used instead (see below). -.TP -.B GD_FORCE_ENDIAN -Specifies that -.B ENDIAN -directives (see -.BR dirfile-format (5)) -found in the fragment should be ignored. When specified with one of -.BR GD_BIG_ENDIAN " or " GD_LITTLE_ENDIAN , -the indicated endianness will be assumed. If this flag is specified with -neither of those flags, the fragment will be assumed to have the endianness of -the native architecture. -.TP -.B GD_IGNORE_DUPS -If the fragment specifies more than one field with the same name, or a field -with the same name as an existing field, all but one of them will be ignored by -the parser. Without this flag, parsing would fail with the -.B GD_E_FORMAT -error, possibly resulting in invocation of the registered callback function. -Which of the duplicate fields is kept is not specified, nor whether an existing -field takes precedence over a new one or not. As a result, this flag is -typically only useful in the case where identical copies of a field -specification line are present. - -No indication is provided to indicate whether a duplicate field has been -discarded. If finer grained control is required, the caller should handle -.B GD_E_FORMAT_DUPLICATE -suberrors itself with an appropriate callback function. -.TP -.B GD_IGNORE_REFS -If the dirfile currently has a reference field (either because one was specified -explicitly, or else because the first -.B RAW -field was used), -.B /REFERENCE -directives in the included fragment will be ignored. Otherwise, a -.B /REFERENCE -directive in the included fragment will replace the current reference field in -the dirfile. -.TP -.B GD_LITTLE_ENDIAN -Specifies that raw data on disk is stored as little-endian data (least -significant byte first). Specifying this flag along with the contradictory -.BR GD_BIG_ENDIAN -will cause the library to assume that the endianness of the data is opposite to -that of the native architecture. - -This flag is ignored completely if an -.B ENDIAN -directive occurs in the fragment, unless -.B GD_FORCE_ENDIAN -is also specified. -.TP -.B GD_PEDANTIC -Specifies that unrecognised lines found during the parsing of the fragment -should always cause a fatal error. Without this flag, if a -.B VERSION -directive (see -.BR dirfile-format (5)) -indicates that the fragment being opened conforms Standards Version newer than -the version understood by the library, unrecognised lines will be silently -ignored. -.TP -.B GD_TRUNC -If -.I include_file -already exists, it will be truncated before opening. If the file does not -exist, this flag is ignored. - -.PP -The -.I flags -argument may also be bitwise or'd with one of the following symbols indicating -the default encoding scheme of the fragment. Like the endianness flags, the -choice of encoding here is ignored if the encoding is specified in the fragment -itself, unless -.B GD_FORCE_ENCODED -is also specified. If none of these symbols is present, -.B GD_AUTO_ENCODED -is assumed, unless the -.BR gd_include () -call results in creation or truncation of the fragment. In that case, -.B GD_UNENCODED -is assumed. See -.BR dirfile-encoding (5) -for details on dirfile encoding schemes. -.TP -.B GD_AUTO_ENCODED -Specifies that the encoding type is not known in advance, but should be detected -by the GetData library. Detection is accomplished by searching for raw data -files with extensions appropriate to the encoding scheme. This method will -notably fail if the the library is called via -.BR putdata (3) -to create a previously non-existent raw field unless a read is first -successfully performed on the dirfile. Once the library has determined the -encoding scheme for the first time, it remembers it for subsequent calls. -.TP -.B GD_BZIP2_ENCODED -Specifies that raw data files are compressed using the Burrows-Wheeler block -sorting text compression algorithm and Huffman coding, as implemented in the -bzip2 format. -.TP -.B GD_GZIP_ENCODED -Specifies that raw data files are compressed using Lempel-Ziv coding (LZ77) -as implemented in the gzip format. -.TP -.B GD_LZMA_ENCODED -Specifies that raw data files are compressed using the Lempel-Ziv Markov Chain -Algorithm (LZMA) as implemented in the xz container format. -.TP -.B GD_SLIM_ENCODED -Specifies that raw data files are compressed using the slimlib library. -.TP -.B GD_TEXT_ENCODED -Specifies that raw data files are encoded as text files containing one data -sample per line. -.TP -.B GD_UNENCODED -Specifies that raw data files are not encoded, but written verbatim to disk. - -.SH RETURN VALUE -On success, -.BR gd_include () -returns the format specification index of the newly added fragment. On error, --1 is returned and the dirfile error is set to a non-zero error value. Possible -error values are: -.TP 8 -.B GD_E_ACCMODE -The supplied dirfile was opened in read-only mode. -.TP -.B GD_E_ALLOC -The library was unable to allocate memory. -.TP -.B GD_E_BAD_DIRFILE -The supplied dirfile was invalid. -.TP -.B GD_E_BAD_INDEX -The supplied parent fragment index was out of range. -.TP -.B GD_E_BAD_REFERENCE -The reference field specified by a -.B /REFERENCE -directive in the fragment (see -.BR dirfile-format (5)) -was not found, or was not a -.B RAW -field. In this case, the included fragment will still be added to the dirfile, -but the -.B /REFERENCE -directive will be ignored. See also the -.B BUGS -section below. -.TP -.B GD_E_CALLBACK -The registered callback function returned an unrecognised response. -.TP -.B GD_E_FORMAT -A syntax error occurred in the fragment. -.TP -.B GD_E_LINE_TOO_LONG -The parser encountered a line in the format specification longer than it was -able to deal with. Lines are limited by the storage size of -.BR ssize_t . -On 32-bit systems, this limits format specification lines to 2**31 characters. -The limit is larger on 64-bit systems. -.TP -.B GD_E_OPEN_FRAGMENT -The fragment could not be opened or created. -.TP -.B GD_E_PROTECTED -The metadata of the parent fragment was protected from change. -.PP -The dirfile error may be retrieved by calling -.BR gd_error (3). -A descriptive error string for the last error encountered can be obtained from -a call to -.BR gd_error_string (3). -When finished with it, the DIRFILE object may be de-allocated with a call to -.BR gd_close (3), -even if the open failed. -.SH BUGS -If this function fails with the error -.BR GD_E_BAD_REFERENCE , -it typically results in no reference field being defined for the dirfile, even -if the dirfile contains -.B RAW -fields. As a result, functions which rely on the reference field, such as -.BR gd_nframes (3), -will operate incorrectly. Callers should explicitly set the reference field -with -.BR gd_reference (3) -in this case. -.SH SEE ALSO -.BR gd_open (3), -.BR gd_parser_callback (3), -.BR gd_reference (3), -.BR gd_uninclude (3), -.BR gd_error (3), -.BR gd_error_string (3), -.BR gd_fragmentname (3), -.BR gd_nfragments (3), -.BR dirfile (5), -.BR dirfile-encoding (5), -.BR dirfile-format (5) Copied: trunk/getdata/man/gd_include_affix.3 (from rev 694, trunk/getdata/man/gd_include.3) =================================================================== --- trunk/getdata/man/gd_include_affix.3 (rev 0) +++ trunk/getdata/man/gd_include_affix.3 2012-04-04 23:47:18 UTC (rev 696) @@ -0,0 +1,335 @@ +.\" gd_include_affix.3. The gd_include_affix man page. +.\" +.\" Copyright (C) 2008, 2009, 2010, 2011, 2012 D. V. Wiebe +.\" +.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" +.\" +.\" This file is part of the GetData project. +.\" +.\" Permission is granted to copy, distribute and/or modify this document +.\" under the terms of the GNU Free Documentation License, Version 1.2 or +.\" any later version published by the Free Software Foundation; with no +.\" Invariant Sections, with no Front-Cover Texts, and with no Back-Cover +.\" Texts. A copy of the license is included in the `COPYING.DOC' file +.\" as part of this distribution. +.\" +.TH gd_include_affix 3 "4 April 2012" "Version 0.8.0" "GETDATA" +.SH NAME +gd_include_affix, gd_include \(em add a format specification fragment to a +dirfile +.SH SYNOPSIS +.B #include <getdata.h> +.HP +.nh +.ad l +.BI "int gd_include_affix(DIRFILE *" dirfile ", const char *" include_file , +.BI "int " parent_fragment ", const char *" prefix , "const char *" suffix , +.BI "unsigned long " flags ); +.HP +.BI "int gd_include(DIRFILE *" dirfile ", const char *" include_file , +.BI "int " parent_fragment ", unsigned long " flags ); +.hy +.ad n +.SH DESCRIPTION +The +.BR gd_include_affix () +function adds the format specification fragment given by the path +.I include_file +to the specified dirfile, possibly creating the fragment, using the affixes +specified. This occurs as if, in the existing fragment indexed +by +.IR parent_fragment , +the following directive were present: +.IP +.B /INCLUDE +.I <include_file> <prefix> <suffix> +.PP +(see +.BR dirfile-format (5)). +If a parser callback function had been specified when the dirfile was opened +using +.BR gd_cbopen (3), +or added later with +.BR gd_parser_callback (3), +this callback function will be called if a syntax error is encountered while +parsing the included fragment. + +Passing NULL as +.I prefix +or +.I suffix +is the same as using the empty string (ie. the corresponding affix is empty). +The function +.BR gd_include () +is equivalent to calling +.BR gd_include_affix () +with both +.I prefix +and +.I suffix +equal to NULL. + +The +.I flags +argument should be a bitwise-or'd collection of the following flags, or zero +if no flags are desired: +.TP +.B GD_BIG_ENDIAN +Specifies that raw data on disk is stored as big-endian data (most significant +byte first). Specifying this flag along with the contradictory +.BR GD_LITTLE_ENDIAN +will cause the library to assume that the endianness of the data is opposite to +that of the native architecture. + +This flag is ignored completely if an +.B ENDIAN +directive occurs in the fragment, unless +.B GD_FORCE_ENDIAN +is also specified. +.TP +.B GD_CREAT +An empty fragment will be created, if one does not already exist. The fragment +will have mode +.BR S_IRUSR " | " S_IWUSR " | " S_IRGRP " | " S_IWGRP " | " S_IROTH " | " S_IWOTH +(0666), modified by the caller's umask value (see +.BR umask (2)). +.TP +.B GD_EXCL +Ensure that this call creates a new fragment: when specified along with +.BR GD_CREAT , +the call will fail if the file specified by +.I include_file +already exists. Behaviour of this flag is undefined if +.B GD_CREAT +is not specified. This flag suffers from all the limitations of the +.B O_EXCL +flag as indicated in +.BR open (2). +.TP +.B GD_FORCE_ENCODING +Specifies that +.B ENCODING +directives (see +.BR dirfile-format (5)) +found in the fragment should be ignored. The encoding scheme +specified in +.I flags +will be used instead (see below). +.TP +.B GD_FORCE_ENDIAN +Specifies that +.B ENDIAN +directives (see +.BR dirfile-format (5)) +found in the fragment should be ignored. When specified with one of +.BR GD_BIG_ENDIAN " or " GD_LITTLE_ENDIAN , +the indicated endianness will be assumed. If this flag is specified with +neither of those flags, the fragment will be assumed to have the endianness of +the native architecture. +.TP +.B GD_IGNORE_DUPS +If the fragment specifies more than one field with the same name, or a field +with the same name as an existing field, all but one of them will be ignored by +the parser. Without this flag, parsing would fail with the +.B GD_E_FORMAT +error, possibly resulting in invocation of the registered callback function. +Which of the duplicate fields is kept is not specified, nor whether an existing +field takes precedence over a new one or not. As a result, this flag is +typically only useful in the case where identical copies of a field +specification line are present. + +No indication is provided to indicate whether a duplicate field has been +discarded. If finer grained control is required, the caller should handle +.B GD_E_FORMAT_DUPLICATE +suberrors itself with an appropriate callback function. +.TP +.B GD_IGNORE_REFS +If the dirfile currently has a reference field (either because one was specified +explicitly, or else because the first +.B RAW +field was used), +.B /REFERENCE +directives in the included fragment will be ignored. Otherwise, a +.B /REFERENCE +directive in the included fragment will replace the current reference field in +the dirfile. +.TP +.B GD_LITTLE_ENDIAN +Specifies that raw data on disk is stored as little-endian data (least +significant byte first). Specifying this flag along with the contradictory +.BR GD_BIG_ENDIAN +will cause the library to assume that the endianness of the data is opposite to +that of the native architecture. + +This flag is ignored completely if an +.B ENDIAN +directive occurs in the fragment, unless +.B GD_FORCE_ENDIAN +is also specified. +.TP +.B GD_PEDANTIC +Specifies that unrecognised lines found during the parsing of the fragment +should always cause a fatal error. Without this flag, if a +.B VERSION +directive (see +.BR dirfile-format (5)) +indicates that the fragment being opened conforms Standards Version newer than +the version understood by the library, unrecognised lines will be silently +ignored. +.TP +.B GD_TRUNC +If +.I include_file +already exists, it will be truncated before opening. If the file does not +exist, this flag is ignored. + +.PP +The +.I flags +argument may also be bitwise or'd with one of the following symbols indicating +the default encoding scheme of the fragment. Like the endianness flags, the +choice of encoding here is ignored if the encoding is specified in the fragment +itself, unless +.B GD_FORCE_ENCODED +is also specified. If none of these symbols is present, +.B GD_AUTO_ENCODED +is assumed, unless the +.BR gd_include_affix () +call results in creation or truncation of the fragment. In that case, +.B GD_UNENCODED +is assumed. See +.BR dirfile-encoding (5) +for details on dirfile encoding schemes. +.TP +.B GD_AUTO_ENCODED +Specifies that the encoding type is not known in advance, but should be detected +by the GetData library. Detection is accomplished by searching for raw data +files with extensions appropriate to the encoding scheme. This method will +notably fail if the the library is called via +.BR gd_putdata (3) +to create a previously non-existent raw field unless a read is first +successfully performed on the dirfile. Once the library has determined the +encoding scheme for the first time, it remembers it for subsequent calls. +.TP +.B GD_BZIP2_ENCODED +Specifies that raw data files are compressed using the Burrows-Wheeler block +sorting text compression algorithm and Huffman coding, as implemented in the +bzip2 format. +.TP +.B GD_GZIP_ENCODED +Specifies that raw data files are compressed using Lempel-Ziv coding (LZ77) +as implemented in the gzip format. +.TP +.B GD_LZMA_ENCODED +Specifies that raw data files are compressed using the Lempel-Ziv Markov Chain +Algorithm (LZMA) as implemented in the xz container format. +.TP +.B GD_SIE_ENCODED +Specified that raw data files are sample-index encoded, similar to run-length +encoding, suitable for data that change rarely. +.TP +.B GD_SLIM_ENCODED +Specifies that raw data files are compressed using the slimlib library. +.TP +.B GD_TEXT_ENCODED +Specifies that raw data files are encoded as text files containing one data +sample per line. +.TP +.B GD_UNENCODED +Specifies that raw data files are not encoded, but written verbatim to disk. +.TP +.B GD_ZZIP_ENCODED +Specifies that raw data files are compressed using the DEFLATE algorithm. All +raw data files for a given fragment are collected together and stored in a PKZIP +archive called raw.zip. +.TP +.B GD_ZZSLIM_ENCODED +Specifies that raw data files are compressed using a combinations of compression +schemes: first files are slim-compressed, as with the +.B GD_SLIM_ENCODED +scheme, and then they are collected together and compressed (again) into a PKZIP +archive called raw.zip, as in the +.B GD_ZZIP_ENCODED +scheme. + +.SH RETURN VALUE +On success, these functions return the format specification index of the newly +added fragment. On error, -1 is returned and the dirfile error is set to a +non-zero error value. Possible error values are: +.TP 8 +.B GD_E_ACCMODE +The supplied dirfile was opened in read-only mode. +.TP +.B GD_E_ALLOC +The library was unable to allocate memory. +.TP +.B GD_E_BAD_DIRFILE +The supplied dirfile was invalid. +.TP +.B GD_E_BAD_INDEX +The supplied parent fragment index was out of range. +.TP +.B GD_E_BAD_REFERENCE +The reference field specified by a +.B /REFERENCE +directive in the fragment (see +.BR dirfile-format (5)) +was not found, or was not a +.B RAW +field. In this case, the included fragment will still be added to the dirfile, +but the +.B /REFERENCE +directive will be ignored. See also the +.B BUGS +section below. +.TP +.B GD_E_CALLBACK +The registered callback function returned an unrecognised response. +.TP +.B GD_E_FORMAT +A syntax error occurred in the fragment. +.TP +.B GD_E_LINE_TOO_LONG +The parser encountered a line in the format specification longer than it was +able to deal with. Lines are limited by the storage size of +.BR ssize_t . +On 32-bit systems, this limits format specification lines to 2**31 characters. +The limit is larger on 64-bit systems. +.TP +.B GD_E_OPEN_FRAGMENT +The fragment could not be opened or created. +.TP +.B GD_E_PROTECTED +The metadata of the parent fragment was protected from change. +.PP +The dirfile error may be retrieved by calling +.BR gd_error (3). +A descriptive error string for the last error encountered can be obtained from +a call to +.BR gd_error_string (3). + +.SH BUGS +If this function fails with the error +.BR GD_E_BAD_REFERENCE , +it typically results in no reference field being defined for the dirfile, even +if the dirfile contains +.B RAW +fields. As a result, functions which rely on the reference field, such as +.BR gd_nframes (3), +will operate incorrectly. Callers should explicitly set the reference field +with +.BR gd_reference (3) +in this case. +.SH SEE ALSO +.BR gd_open (3), +.BR gd_alter_affixes (3), +.BR gd_error (3), +.BR gd_error_string (3), +.BR gd_fragmentname (3), +.BR gd_nfragments (3), +.BR gd_parser_callback (3), +.BR gd_reference (3), +.BR gd_uninclude (3), +.BR dirfile (5), +.BR dirfile-encoding (5), +.BR dirfile-format (5) Modified: trunk/getdata/man/gd_rename.3 =================================================================== --- trunk/getdata/man/gd_rename.3 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/man/gd_rename.3 2012-04-04 23:47:18 UTC (rev 696) @@ -13,16 +13,19 @@ .\" Texts. A copy of the license is included in the `COPYING.DOC' file .\" as part of this distribution. .\" -.TH gd_rename 3 "1 January 2012" "Version 0.8.0" "GETDATA" +.TH gd_rename 3 "4 April 2012" "Version 0.8.0" "GETDATA" .SH NAME -gd_rename \(em change the name of a dirfile field +gd_rename, gd_rename_alias \(em change the name of a dirfile field or alias .SH SYNOPSIS .B #include <getdata.h> .HP .nh .ad l .BI "int gd_rename(DIRFILE *" dirfile ", const char" -.BI * old_code ", const char *" new_name ", unsigned " flags ); +.BI * old_code ", const char *" new_name ", unsigned int " flags ); +.HP +.BI "int gd_rename_alias(DIRFILE *" dirfile ", const char *" alias_name , +.BI "unsigned int " flags ); .hy .ad n .SH DESCRIPTION @@ -37,6 +40,18 @@ .IR new_name . If the new name is the same as the old name, this function does nothing. +The +.BR gd_rename_alias () +function behaves similarly, but renames the alias specified by +.I alias_name +instead. (This function is needed, since passing +.I alias_name +to +.BR gd_rename () +as +.I field_code +would have resulted in the field pointed to by the alias being renamed instead.) + When renaming a metafield, the metafield should be specified in .I old_code by its full (slashed) field code, while Modified: trunk/getdata/src/add.c =================================================================== --- trunk/getdata/src/add.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/add.c 2012-04-04 23:47:18 UTC (rev 696) @@ -68,7 +68,7 @@ * dealiased */ *offset = strlen(P->field) + 1; - temp2 = _GD_Malloc(D, *offset + strlen(ptr) + 1); + temp2 = (char*)_GD_Malloc(D, *offset + strlen(ptr) + 1); if (temp2 == NULL) { free(*buffer); dreturn("%p", NULL); @@ -526,7 +526,7 @@ /* This is the first raw field in this fragment; propagate it upwards */ for (i = E->fragment_index; i != -1; i = D->fragment[i].parent) { if (D->fragment[i].ref_name == NULL) { - D->fragment[i].ref_name = strdup(new_ref); + D->fragment[i].ref_name = (char *)strdup((const char*)new_ref); D->fragment[i].modified = 1; } else break; Modified: trunk/getdata/src/ascii.c =================================================================== --- trunk/getdata/src/ascii.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/ascii.c 2012-04-04 23:47:18 UTC (rev 696) @@ -32,7 +32,7 @@ dreturn("%i", 0); return 0; } else if (file->edata != NULL) - fclose(file->edata); + fclose((FILE*)file->edata); file->idata = gd_OpenAt(file->D, fd, file->name, ((mode & GD_FILE_WRITE) ? (O_RDWR | O_CREAT) : O_RDONLY) | O_BINARY, 0666); Modified: trunk/getdata/src/common.c =================================================================== --- trunk/getdata/src/common.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/common.c 2012-04-04 23:47:18 UTC (rev 696) @@ -137,7 +137,7 @@ *index = u; /* not found perhaps it's an subfield of an aliased field? */ - if ((ptr = strchr(field_code, '/'))) { + if ((ptr = (char*)strchr(field_code, '/'))) { char *new_code = strdup(field_code); if (new_code) { new_code[ptr - field_code] = '\0'; @@ -146,7 +146,7 @@ if (E && E->field_type == GD_ALIAS_ENTRY && E->e->entry[0]) { size_t plen = strlen(E->e->entry[0]->field); - new_code = malloc(plen + strlen(ptr) + 2); + new_code = (char*)malloc(plen + strlen(ptr) + 2); if (new_code) { strcpy(new_code, E->e->entry[0]->field); new_code[plen] = '/'; @@ -971,7 +971,7 @@ if (car && !_GD_AbsPath(cdr)) { if (!_GD_AbsPath(car)) { /* car is not abosulte -- don't bother trying to do anything fancy */ - res = malloc(strlen(car) + strlen(cdr) + 2); + res = (char*)malloc(strlen(car) + strlen(cdr) + 2); if (res == NULL) { dreturn("%p", NULL); return NULL; @@ -1155,7 +1155,7 @@ } if (S_ISLNK(statbuf.st_mode)) { - char target[PATH_MAX], *new; + char target[PATH_MAX]; ssize_t slen; /* check for symlink loop */ @@ -1202,7 +1202,7 @@ return NULL; } } else { - char slash[2] = { GD_DIRSEP, 0 }; + char *new_work, slash[2] = { GD_DIRSEP, 0 }; len = strlen(end) + slen + 2; if (*(ptr + slen - 1) == GD_DIRSEP) { @@ -1210,16 +1210,16 @@ len--; } - new = (char*)malloc(len); - if (new == NULL) { + new_work = (char*)malloc(len); + if (new_work == NULL) { free(res); free(work); dreturn("%p", NULL); return NULL; } - sprintf(new, "%s%s%s", ptr, slash, end); + sprintf(new_work, "%s%s%s", ptr, slash, end); free(work); - end = work = new; + end = work = new_work; } } } @@ -1233,7 +1233,7 @@ free(work); /* trim */ - ptr = realloc(res, res_len + 1); + ptr = (char*)realloc(res, res_len + 1); if (ptr) res = ptr; @@ -1325,7 +1325,7 @@ return -1; } - D->dir = ptr; + D->dir = (struct gd_dir_t*)ptr; D->dir[D->ndir].rc = 1; D->dir[D->ndir].path = _GD_Strdup(D, dir); Modified: trunk/getdata/src/compat.c =================================================================== --- trunk/getdata/src/compat.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/compat.c 2012-04-04 23:47:18 UTC (rev 696) @@ -283,7 +283,7 @@ /* emulate readdir_r(3) with non-threadsafe readdir(3) */ #ifndef HAVE_READDIR_R -int gd_readdir(DIR *dirp, struct dirent *entry, struct dirent **result) +int _GD_ReadDir(DIR *dirp, struct dirent *entry, struct dirent **result) { struct dirent *local_entry; Modified: trunk/getdata/src/del.c =================================================================== --- trunk/getdata/src/del.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/del.c 2012-04-04 23:47:18 UTC (rev 696) @@ -335,8 +335,8 @@ } if ((*_gd_ef[E->e->u.raw.file[0].subenc].name)(D, - D->fragment[E->fragment_index].enc_data, E->e->u.raw.file, - E->e->u.raw.filebase, 0, 0)) + (const char*)D->fragment[E->fragment_index].enc_data, + E->e->u.raw.file, E->e->u.raw.filebase, 0, 0)) { free(del_list); dreturn("%i", -1); Modified: trunk/getdata/src/encoding.c =================================================================== --- trunk/getdata/src/encoding.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/encoding.c 2012-04-04 23:47:18 UTC (rev 696) @@ -539,7 +539,7 @@ if (mode & GD_FILE_TEMP) { /* create temporary file in file[1] */ - if ((*enc->name)(D, D->fragment[E->fragment_index].enc_data, + if ((*enc->name)(D, (const char*)D->fragment[E->fragment_index].enc_data, E->e->u.raw.file + 1, filebase, 1, 0)) { ; /* error already set */ @@ -564,7 +564,7 @@ if (oop_write) { /* an out-of-place write requires us to open a temporary file and pass * in its fd */ - if ((*enc->name)(D, D->fragment[E->fragment_index].enc_data, + if ((*enc->name)(D, (const char*)D->fragment[E->fragment_index].enc_data, E->e->u.raw.file + 1, filebase, 1, 0)) { dreturn("%i", 1); @@ -587,7 +587,7 @@ /* open a regular file, if necessary */ if (E->e->u.raw.file[0].idata < 0) { - if ((*enc->name)(D, D->fragment[E->fragment_index].enc_data, + if ((*enc->name)(D, (const char*)D->fragment[E->fragment_index].enc_data, E->e->u.raw.file, filebase, 0, 0)) { dreturn("%i", 1); @@ -677,7 +677,7 @@ if (D->fragment[E->fragment_index].encoding == GD_AUTO_ENCODED) { D->fragment[E->fragment_index].encoding = _GD_ResolveEncoding(D, E->e->u.raw.filebase, - D->fragment[E->fragment_index].enc_data, GD_AUTO_ENCODED, + (const char*)D->fragment[E->fragment_index].enc_data, GD_AUTO_ENCODED, D->fragment[E->fragment_index].dirfd, E->e->u.raw.file); } @@ -691,7 +691,7 @@ /* Figure out the encoding subtype, if required */ if (E->e->u.raw.file[0].subenc == GD_ENC_UNKNOWN) _GD_ResolveEncoding(D, E->e->u.raw.filebase, - D->fragment[E->fragment_index].enc_data, + (const char*)D->fragment[E->fragment_index].enc_data, D->fragment[E->fragment_index].encoding, D->fragment[E->fragment_index].dirfd, E->e->u.raw.file); @@ -793,7 +793,7 @@ _GD_FiniRawIO(D, raw_entry[i], fragment, GD_FINIRAW_DISCARD); if ((*_gd_ef[temp.subenc].name)(D, - D->fragment[raw_entry[i]->fragment_index].enc_data, + (const char*)D->fragment[raw_entry[i]->fragment_index].enc_data, raw_entry[i]->e->u.raw.file, raw_entry[i]->e->u.raw.filebase, 0, 0)) { @@ -927,7 +927,7 @@ { D->fragment[fragment].encoding = _GD_ResolveEncoding(D, D->entry[i]->e->u.raw.filebase, - D->fragment[fragment].enc_data, GD_AUTO_ENCODED, + (const char*)D->fragment[fragment].enc_data, GD_AUTO_ENCODED, D->fragment[fragment].dirfd, D->entry[i]->e->u.raw.file); if (D->fragment[fragment].encoding != GD_AUTO_ENCODED) @@ -949,12 +949,12 @@ * 2) use mktemp to generate a "unique" file name, and then try to openat it * exclusively; repeat as necessary. */ -int _GD_MakeTempFile(const DIRFILE *D gd_unused_d, int dirfd, char *template) +int _GD_MakeTempFile(const DIRFILE *D gd_unused_d, int dirfd, char *tmpl) { int fd = -1; - char *tmp = strdup(template); + char *tmp = strdup(tmpl); - dtrace("%p, %i, \"%s\"", D, dirfd, template); + dtrace("%p, %i, \"%s\"", D, dirfd, tmpl); if (!tmp) { dreturn("%i", -1); @@ -962,15 +962,15 @@ } do { - strcpy(template, tmp); - mktemp(template); - if (template[0] == 0) { + strcpy(tmpl, tmp); + mktemp(tmpl); + if (tmpl[0] == 0) { free(tmp); dreturn("%i", -1); return -1; } - fd = gd_OpenAt(D, dirfd, template, O_RDWR | O_CREAT | O_EXCL, 0666); + fd = gd_OpenAt(D, dirfd, tmpl, O_RDWR | O_CREAT | O_EXCL, 0666); } while (errno == EEXIST); free(tmp); Modified: trunk/getdata/src/entry.c =================================================================== --- trunk/getdata/src/entry.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/entry.c 2012-04-04 23:47:18 UTC (rev 696) @@ -342,8 +342,8 @@ dreturn("%p", NULL); return NULL; } else if ((*_gd_ef[E->e->u.raw.file[0].subenc].name)(D, - D->fragment[E->fragment_index].enc_data, E->e->u.raw.file, - E->e->u.raw.filebase, 0, 0)) + (const char*)D->fragment[E->fragment_index].enc_data, + E->e->u.raw.file, E->e->u.raw.filebase, 0, 0)) { dreturn("%p", NULL); return NULL; @@ -530,7 +530,8 @@ return NULL; } - E->e->alias_list = _GD_Realloc(D, E->e->alias_list, sizeof(const char *) * n); + E->e->alias_list = (const char**)_GD_Realloc(D, E->e->alias_list, + sizeof(const char *) * n); if (D->error) { dreturn("%p", NULL); Modified: trunk/getdata/src/errors.c =================================================================== --- trunk/getdata/src/errors.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/errors.c 2012-04-04 23:47:18 UTC (rev 696) @@ -349,7 +349,7 @@ return buffer; } -int gd_error_count(DIRFILE *D) +int gd_error_count(DIRFILE *D) gd_nothrow { int count; Modified: trunk/getdata/src/flimits.c =================================================================== --- trunk/getdata/src/flimits.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/flimits.c 2012-04-04 23:47:18 UTC (rev 696) @@ -193,8 +193,8 @@ break; if ((*_gd_ef[E->e->u.raw.file[0].subenc].name)(D, - D->fragment[E->fragment_index].enc_data, E->e->u.raw.file, - E->e->u.raw.filebase, 0, 0)) + (const char*)D->fragment[E->fragment_index].enc_data, + E->e->u.raw.file, E->e->u.raw.filebase, 0, 0)) { break; } Modified: trunk/getdata/src/fpos.c =================================================================== --- trunk/getdata/src/fpos.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/fpos.c 2012-04-04 23:47:18 UTC (rev 696) @@ -111,7 +111,7 @@ /* Get the current I/O position of the given field */ -off64_t gd_tell64(DIRFILE *D, const char *field_code_in) +off64_t gd_tell64(DIRFILE *D, const char *field_code_in) gd_nothrow { off64_t pos = -1; gd_entry_t* entry; @@ -148,7 +148,7 @@ return pos; } -off_t gd_tell(DIRFILE *D, const char *field_code) +off_t gd_tell(DIRFILE *D, const char *field_code) gd_nothrow { return (off_t)gd_tell64(D, field_code); } Modified: trunk/getdata/src/fragment.c =================================================================== --- trunk/getdata/src/fragment.c 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/fragment.c 2012-04-04 23:47:18 UTC (rev 696) @@ -89,7 +89,7 @@ dtrace("%p, %i, \"%s\", \"%s\", %p, %p", D, i, prefix, suffix, new_codes, n); - ptr = _GD_Realloc(D, codes, sizeof(char*) * (nn + 2)); + ptr = (char**)_GD_Realloc(D, codes, sizeof(char*) * (nn + 2)); if (!ptr) { dreturn("%p (%i)", codes, *n); return codes; @@ -130,7 +130,7 @@ /* Check for namespace clashes in our files */ for (u = 0; u < D->n_entries; ++u) if (D->entry[u]->fragment_index == i && D->entry[u]->e->n_meta != -1) { - ptr = _GD_Realloc(D, new_codes, sizeof(char*) * ++nn); + ptr = (char**)_GD_Realloc(D, new_codes, sizeof(char*) * ++nn); if (ptr) { new_codes = ptr; /* remunge the code */ @@ -329,7 +329,7 @@ /* stat the file via it's path relative to the original filedir */ char *buffer; if (D->fragment[i].sname) { - buffer = _GD_Malloc(D, strlen(D->name) + + buffer = (char*)_GD_Malloc(D, strlen(D->name) + strlen(D->fragment[i].bname) + strlen(D->fragment[i].sname) + 3); if (buffer == NULL) { dreturn("%i", -1); @@ -338,8 +338,8 @@ sprintf(buffer, "%s%c%s%c%s", D->name, GD_DIRSEP, D->fragment[i].sname, GD_DIRSEP, D->fragment[i].bname); } else { - buffer = _GD_Malloc(D, strlen(D->name) + strlen(D->fragment[i].bname) + - 2); + buffer = (char*)_GD_Malloc(D, strlen(D->name) + + strlen(D->fragment[i].bname) + 2); if (buffer == NULL) { dreturn("%i", -1); return -1; Modified: trunk/getdata/src/getdata.h.in =================================================================== --- trunk/getdata/src/getdata.h.in 2012-04-04 02:32:43 UTC (rev 695) +++ trunk/getdata/src/getdata.h.in 2012-04-04 23:47:18 UTC (rev 696) @@ -307,7 +307,7 @@ #define GD_FLOAT GD_FLOAT32 #define GD_DOUBLE GD_FLOAT64 - +/* Window operations */ typedef enum { GD_WINDOP_UNK, GD_WINDOP_EQ, @@ -824,7 +824,8 @@ extern int gd_move_alias(DIRFILE *dirfile, const char *field_code, int new_fragment) gd_nothrow gd_nonnull ((1,2)); -extern int gd_mplex_lookback(DIRFILE *dirfile, int lookback); +extern int gd_mplex_lookback(DIRFILE *dirfile, int lookback) gd_nothrow +gd_nonnull((1)); extern const char **gd_mstrings(DIRFILE *dirfile, const char *parent) g... [truncated message content] |
From: <ket...@us...> - 2012-04-04 02:32:52
|
Revision: 695 http://getdata.svn.sourceforge.net/getdata/?rev=695&view=rev Author: ketiltrout Date: 2012-04-04 02:32:43 +0000 (Wed, 04 Apr 2012) Log Message: ----------- Fortran-77 requires INTEGER to be the same size as REAL, which is four bytes. Modified Paths: -------------- trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/f77/fgetdata.h Modified: trunk/getdata/bindings/f77/fgetdata.c =================================================================== --- trunk/getdata/bindings/f77/fgetdata.c 2012-04-04 01:52:57 UTC (rev 694) +++ trunk/getdata/bindings/f77/fgetdata.c 2012-04-04 02:32:43 UTC (rev 695) @@ -146,12 +146,12 @@ switch(op) { case GD_WINDOP_EQ: case GD_WINDOP_NE: - t.i = *(int*)data; + t.i = *(int32_t*)data; dreturn("%lli", (long long)t.i); break; case GD_WINDOP_SET: case GD_WINDOP_CLR: - t.u = *(int*)data; + t.u = *(int32_t*)data; dreturn("%llu", (unsigned long long)t.u); break; default: @@ -164,7 +164,7 @@ } /* create a Fortran space padded string */ -static int _GDF_FString(char* dest, int *dlen, const char* src) +static int _GDF_FString(char *dest, int32_t *dlen, const char *src) { int i, slen; @@ -194,7 +194,7 @@ } /* callback wrapper */ -static int _GDF_Callback(gd_parser_data_t* pdata, void* f77_callback) +static int _GDF_Callback(gd_parser_data_t* pdata, void *f77_callback) { struct _GDF_callback_container *c = (struct _GDF_callback_container*)f77_callback; @@ -220,8 +220,8 @@ } /* gd_open wrapper */ -void F77_FUNC(gdopen, GDOPEN) (int* dirfile, const char* dirfilename, - const int* dirfilename_l, const int* flags) +void F77_FUNC(gdopen, GDOPEN) (int32_t *dirfile, const char *dirfilename, + const int32_t *dirfilename_l, const int32_t *flags) { char *out; @@ -236,7 +236,7 @@ } /* gd_close wrapper */ -void F77_FUNC(gdclos, GDCLOS) (const int* dirfile) +void F77_FUNC(gdclos, GDCLOS) (const int32_t *dirfile) { dtrace("%i", *dirfile); @@ -250,8 +250,8 @@ } /* gd_flush wrapper */ -void F77_FUNC(gdflsh, GDFLSH) (const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdflsh, GDFLSH) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { dtrace("%i, %p, %i", *dirfile, field_code, *field_code_l); @@ -268,11 +268,11 @@ } /* gd_getdata wrapper */ -void F77_FUNC(gdgetd, GDGETD) (int* n_read, const int* dirfile, - const char* field_code, const int* field_code_l, - const int* first_frame, const int* first_sample, - const int* num_frames, const int* num_samples, const int* return_type, - void* data_out) +void F77_FUNC(gdgetd, GDGETD) (int32_t *n_read, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l, + const int32_t *first_frame, const int32_t *first_sample, + const int32_t *num_frames, const int32_t *num_samples, + const int32_t *return_type, void *data_out) { char *out; @@ -289,7 +289,7 @@ } /* Return the maximum field name length */ -void F77_FUNC(gdfdnx, GDFDNX) (int* max, const int* dirfile) +void F77_FUNC(gdfdnx, GDFDNX) (int32_t *max, const int32_t *dirfile) { const char **fl; size_t len = 0; @@ -314,8 +314,8 @@ } /* Return the maximum field name length for a meta list */ -void F77_FUNC(gdmfnx, GDMFNX) (int* max, const int* dirfile, const char* parent, - const int* parent_l) +void F77_FUNC(gdmfnx, GDMFNX) (int32_t *max, const int32_t *dirfile, + const char *parent, const int32_t *parent_l) { const char **fl; unsigned int i, nfields; @@ -343,8 +343,8 @@ } /* gd_field_list wrapper -- this only returns one field name */ -void F77_FUNC(gdfldn, GDFLDN) (char* name, int* name_l, const int* dirfile, - const int* field_num) +void F77_FUNC(gdfldn, GDFLDN) (char *name, int32_t *name_l, + const int32_t *dirfile, const int32_t *field_num) { const char** fl; DIRFILE* D; @@ -365,8 +365,9 @@ } /* gd_mfield_list wrapper -- this only returns one field name */ -void F77_FUNC(gdmfdn, GDMFDN) (char* name, int* name_l, const int* dirfile, - const char* parent, const int* parent_l, const int* field_num) +void F77_FUNC(gdmfdn, GDMFDN) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *parent, const int32_t *parent_l, + const int32_t *field_num) { const char** fl; unsigned int nfields; @@ -391,16 +392,16 @@ } /* gd_nfields wrapper */ -void F77_FUNC(gdnfld, GDNFLD) (int* nfields, const int* dirfile) +void F77_FUNC(gdnfld, GDNFLD) (int32_t *nfields, const int32_t *dirfile) { *nfields = gd_nfields(_GDF_GetDirfile(*dirfile)); } /* gd_bof wrapper */ -void F77_FUNC(gdgbof, GDGBOF) (int* bof, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgbof, GDGBOF) (int32_t *bof, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { - char* fc; + char *fc; dtrace("%p, %i, %p, %i", bof, *dirfile, field_code, *field_code_l); *bof = gd_bof(_GDF_GetDirfile(*dirfile), _GDF_CString(&fc, field_code, @@ -411,8 +412,8 @@ } /* gd_eof wrapper */ -void F77_FUNC(gdgeof, GDGEOF) (int* eof, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgeof, GDGEOF) (int32_t *eof, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *fc; dtrace("%p, %i, %p, %i", eof, *dirfile, field_code, *field_code_l); @@ -425,16 +426,16 @@ } /* gd_nframes wrapper */ -void F77_FUNC(gdnfrm, GDNFRM) (int* nframes, const int* dirfile) +void F77_FUNC(gdnfrm, GDNFRM) (int32_t *nframes, const int32_t *dirfile) { *nframes = gd_nframes(_GDF_GetDirfile(*dirfile)); } /* gd_spf wrapper */ -void F77_FUNC(gdgspf, GDGSPF) (int* spf, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgspf, GDGSPF) (int32_t *spf, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { - char* out; + char *out; dtrace("%p, %i, %p, %i", spf, *dirfile, field_code, *field_code_l); *spf = gd_spf(_GDF_GetDirfile(*dirfile), @@ -444,10 +445,11 @@ } /* gd_putdata wrapper */ -void F77_FUNC(gdputd, GDPUTD) (int* n_wrote, const int* dirfile, - const char* field_code, const int* field_code_l, const int* first_frame, - const int* first_sample, const int* num_frames, const int* num_samples, - const int* data_type, const void* data_in) +void F77_FUNC(gdputd, GDPUTD) (int32_t *n_wrote, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l, + const int32_t *first_frame, const int32_t *first_sample, + const int32_t *num_frames, const int32_t *num_samples, + const int32_t *data_type, const void *data_in) { char *out; dtrace("%p, %i, %p, %i, %i, %i, %i, %i, 0x%x, %p", n_wrote, *dirfile, @@ -463,7 +465,7 @@ } /* return the error number */ -void F77_FUNC(gderor, GDEROR) (int* error, const int* dirfile) +void F77_FUNC(gderor, GDEROR) (int32_t *error, const int32_t *dirfile) { dtrace("%p, %i", error, *dirfile); @@ -473,7 +475,7 @@ } /* gd_error_count wrapper */ -void F77_FUNC(gdecnt, GDECNT) (int* error_count, const int* dirfile) +void F77_FUNC(gdecnt, GDECNT) (int32_t *error_count, const int32_t *dirfile) { dtrace("%p, %i", error_count, *dirfile); @@ -483,7 +485,8 @@ } /* gd_error_string wrapper */ -void F77_FUNC(gdestr, GDESTR) (const int* dirfile, char* buffer, const int* len) +void F77_FUNC(gdestr, GDESTR) (const int32_t *dirfile, char *buffer, + const int32_t *len) { int i; gd_error_string(_GDF_GetDirfile(*dirfile), buffer, *len); @@ -497,8 +500,8 @@ } /* gd_entry_type wrapper */ -void F77_FUNC(gdenty, GDENTY) (int* type, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdenty, GDENTY) (int32_t *type, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *fc; @@ -513,8 +516,9 @@ } /* gd_entry wrapper for RAW */ -void F77_FUNC(gdgerw, GDGERW) (int* spf, int* dtype, int* fragment_index, - const int* dirfile, const char* field_code, const int* field_code_l) +void F77_FUNC(gdgerw, GDGERW) (int32_t *spf, int32_t *dtype, + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -538,12 +542,12 @@ } /* gd_entry wrapper for LINCOM */ -void F77_FUNC(gdgelc, GDGELC) (int* nfields, - char* infield1, int* infield1_l, double* m1, double* b1, - char* infield2, int* infield2_l, double* m2, double* b2, - char* infield3, int* infield3_l, double* m3, double* b3, - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdgelc, GDGELC) (int32_t *nfields, + char *infield1, int32_t *infield1_l, double *m1, double *b1, + char *infield2, int32_t *infield2_l, double *m2, double *b2, + char *infield3, int32_t *infield3_l, double *m3, double *b3, + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -583,12 +587,12 @@ dreturnvoid(); } -void F77_FUNC(gdgecl, GDGECL) (int* nfields, - char* infield1, int* infield1_l, GD_DCOMPLEXP(m1), GD_DCOMPLEXP(b1), - char* infield2, int* infield2_l, GD_DCOMPLEXP(m2), GD_DCOMPLEXP(b2), - char* infield3, int* infield3_l, GD_DCOMPLEXP(m3), GD_DCOMPLEXP(b3), - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdgecl, GDGECL) (int32_t *nfields, + char *infield1, int32_t *infield1_l, GD_DCOMPLEXP(m1), GD_DCOMPLEXP(b1), + char *infield2, int32_t *infield2_l, GD_DCOMPLEXP(m2), GD_DCOMPLEXP(b2), + char *infield3, int32_t *infield3_l, GD_DCOMPLEXP(m3), GD_DCOMPLEXP(b3), + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *fc; gd_entry_t E; @@ -632,10 +636,10 @@ } /* gd_entry wrapper for POLYNOM */ -void F77_FUNC(gdgepn, GDGEPN) (int* poly_ord, char* infield, int* infield_l, - double* a0, double* a1, double* a2, double* a3, double* a4, double* a5, - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdgepn, GDGEPN) (int32_t *poly_ord, char *infield, + int32_t *infield_l, double *a0, double *a1, double *a2, double *a3, + double *a4, double *a5, int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -673,11 +677,11 @@ dreturnvoid(); } -void F77_FUNC(gdgecp, GDGECP) (int* poly_ord, char* infield, int* infield_l, - GD_DCOMPLEXP(a0), GD_DCOMPLEXP(a1), GD_DCOMPLEXP(a2), +void F77_FUNC(gdgecp, GDGECP) (int32_t *poly_ord, char *infield, + int32_t *infield_l, GD_DCOMPLEXP(a0), GD_DCOMPLEXP(a1), GD_DCOMPLEXP(a2), GD_DCOMPLEXP(a3), GD_DCOMPLEXP(a4), GD_DCOMPLEXP(a5), - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -717,9 +721,9 @@ } /* gd_entry wrapper for LINTERP */ -void F77_FUNC(gdgelt, GDGELT) (char* in_field, int* in_field_l, char* table, - int* table_l, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgelt, GDGELT) (char *in_field, int32_t *in_field_l, char *table, + int32_t *table_l, int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -742,9 +746,9 @@ } /* gd_entry wrapper for BIT */ -void F77_FUNC(gdgebt, GDGEBT) (char* in_field, int* in_field_l, int* bitnum, - int* numbits, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgebt, GDGEBT) (char *in_field, int32_t *in_field_l, + int32_t *bitnum, int32_t *numbits, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -768,9 +772,9 @@ } /* gd_entry wrapper for SBIT */ -void F77_FUNC(gdgesb, GDGESB) (char* in_field, int* in_field_l, int* bitnum, - int* numbits, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgesb, GDGESB) (char *in_field, int32_t *in_field_l, + int32_t *bitnum, int32_t *numbits, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -794,9 +798,9 @@ } /* gd_entry wrapper for MULTIPLY */ -void F77_FUNC(gdgemt, GDGEMT) (char* in_field1, int* in_field1_l, - char* in_field2, int* in_field2_l, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgemt, GDGEMT) (char *in_field1, int32_t *in_field1_l, + char *in_field2, int32_t *in_field2_l, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -820,9 +824,9 @@ } /* gd_entry wrapper for DIVIDE */ -void F77_FUNC(gdgedv, GDGEDV) (char* in_field1, int* in_field1_l, - char* in_field2, int* in_field2_l, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgedv, GDGEDV) (char *in_field1, int32_t *in_field1_l, + char *in_field2, int32_t *in_field2_l, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -847,10 +851,10 @@ } /* gd_entry wrapper for WINDOW */ -void F77_FUNC(gdgewd, GDGEWD) (char *in_field, int *in_field_l, - char *check_field, int *check_field_l, int *windop, int *ithreshold, - double *rthreshold, int *fragment_index, const int *dirfile, - const char *field_code, const int *field_code_l) +void F77_FUNC(gdgewd, GDGEWD) (char *in_field, int32_t *in_field_l, + char *check_field, int32_t *check_field_l, int32_t *windop, + int32_t *ithreshold, double *rthreshold, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *fc; gd_entry_t E; @@ -889,10 +893,10 @@ } /* gd_entry wrapper for MPLEX */ -void F77_FUNC(gdgemx, GDGEMX) (char *in_field, int *in_field_l, - char *count_field, int *count_field_l, int *val, int *max, - int *fragment_index, const int *dirfile, const char *field_code, - const int *field_code_l) +void F77_FUNC(gdgemx, GDGEMX) (char *in_field, int32_t *in_field_l, + char *count_field, int32_t *count_field_l, int32_t *val, int32_t *max, + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *fc; gd_entry_t E; @@ -919,9 +923,9 @@ } /* gd_entry wrapper for RECIP */ -void F77_FUNC(gdgerc, GDGERC) (char* in_field, int* in_field_l, - double* dividend, int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgerc, GDGERC) (char *in_field, int32_t *in_field_l, + double *dividend, int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -944,9 +948,9 @@ dreturnvoid(); } -void F77_FUNC(gdgecr, GDGECR) (char* in_field, int* in_field_l, - GD_DCOMPLEXP(cdividend), int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdgecr, GDGECR) (char *in_field, int32_t *in_field_l, + GD_DCOMPLEXP(cdividend), int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -970,9 +974,9 @@ } /* gd_entry wrapper for PHASE */ -void F77_FUNC(gdgeph, GDGEPH) (char* in_field, int* in_field_l, int* shift, - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdgeph, GDGEPH) (char *in_field, int32_t *in_field_l, + int32_t *shift, int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -995,8 +999,8 @@ } /* gd_entry wrapper for CONST */ -void F77_FUNC(gdgeco, GDGECO) (int* data_type, int* fragment_index, - const int* dirfile, const char* field_code, const int* field_code_l) +void F77_FUNC(gdgeco, GDGECO) (int32_t *data_type, int32_t *fragment_index, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -1018,9 +1022,9 @@ } /* gd_entry wrapper for CARRAY */ -void F77_FUNC(gdgeca, GDGECA) (int* data_type, int *array_len, - int* fragment_index, const int* dirfile, const char* field_code, - const int* field_code_l) +void F77_FUNC(gdgeca, GDGECA) (int32_t *data_type, int32_t *array_len, + int32_t *fragment_index, const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l) { char *out; gd_entry_t E; @@ -1043,8 +1047,8 @@ } /* gd_fragment_index wrapper */ -void F77_FUNC(gdfrgi, GDFRGI) (int* fragment_index, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdfrgi, GDFRGI) (int32_t *fragment_index, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *fc; dtrace("%p, %i, %p, %i", fragment_index, *dirfile, field_code, @@ -1059,9 +1063,9 @@ } /* gd_add_raw wrapper */ -void F77_FUNC(gdadrw, GDADRW) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* data_type, const int* spf, - const int* fragment_index) +void F77_FUNC(gdadrw, GDADRW) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *data_type, const int32_t *spf, + const int32_t *fragment_index) { char *out; @@ -1076,15 +1080,15 @@ } /* gd_add_lincom wrapper */ -void F77_FUNC(gdadlc, GDADLC) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* n_fields, const char* in_field1, - const int* in_field1_l, const double* m1, const double* b1, - const char* in_field2, const int* in_field2_l, const double* m2, - const double* b2, const char* in_field3, const int* in_field3_l, - const double* m3, const double* b3, const int* fragment_index) +void F77_FUNC(gdadlc, GDADLC) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const double *m1, const double *b1, + const char *in_field2, const int32_t *in_field2_l, const double *m2, + const double *b2, const char *in_field3, const int32_t *in_field3_l, + const double *m3, const double *b3, const int32_t *fragment_index) { char *fc; - char* in_fields[3] = {NULL, NULL, NULL}; + char *in_fields[3] = {NULL, NULL, NULL}; double m[3] = {0, 0, 0}; double b[3] = {0, 0, 0}; const int nf = *n_fields; @@ -1121,16 +1125,16 @@ dreturnvoid(); } -void F77_FUNC(gdadcl, GDADCL) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* n_fields, const char* in_field1, - const int* in_field1_l, const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), - const char* in_field2, const int* in_field2_l, const GD_DCOMPLEXP(m2), - const GD_DCOMPLEXP(b2), const char* in_field3, const int* in_field3_l, +void F77_FUNC(gdadcl, GDADCL) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), + const char *in_field2, const int32_t *in_field2_l, const GD_DCOMPLEXP(m2), + const GD_DCOMPLEXP(b2), const char *in_field3, const int32_t *in_field3_l, const GD_DCOMPLEXP(m3), const GD_DCOMPLEXP(b3), - const int* fragment_index) + const int32_t *fragment_index) { char *fc; - char* in_fields[3] = {NULL, NULL, NULL}; + char *in_fields[3] = {NULL, NULL, NULL}; #ifdef GD_NO_C99_API double cm[6] = {0, 0, 0, 0, 0, 0}; double cb[6] = {0, 0, 0, 0, 0, 0}; @@ -1173,11 +1177,11 @@ } /* gd_add_polynom wrapper */ -void F77_FUNC(gdadpn, GDADPN) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* poly_ord, const char* in_field, - const int* in_field_l, const double* a0, const double* a1, const double* a2, - const double* a3, const double* a4, const double* a5, - const int* fragment_index) +void F77_FUNC(gdadpn, GDADPN) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const double *a0, const double *a1, + const double *a2, const double *a3, const double *a4, const double *a5, + const int32_t *fragment_index) { char *fc, *inf; double a[6] = {0, 0, 0, 0, 0, 0}; @@ -1209,12 +1213,12 @@ dreturnvoid(); } -void F77_FUNC(gdadcp, GDADCP) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* poly_ord, const char* in_field, - const int* in_field_l, const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), +void F77_FUNC(gdadcp, GDADCP) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), const GD_DCOMPLEXP(a2), const GD_DCOMPLEXP(a3), const GD_DCOMPLEXP(a4), const GD_DCOMPLEXP(a5), - const int* fragment_index) + const int32_t *fragment_index) { char *fc, *inf; #ifdef GD_NO_C99_API @@ -1251,9 +1255,10 @@ } /* gd_add_linterp wrapper */ -void F77_FUNC(gdadlt, GDADLT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const char* table, const int* table_l, const int* fragment_index) +void F77_FUNC(gdadlt, GDADLT) (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 *table, const int32_t *table_l, + const int32_t *fragment_index) { char *fc, *in, *tab; @@ -1270,9 +1275,10 @@ } /* gd_add_bit wrapper */ -void F77_FUNC(gdadbt, GDADBT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const int* bitnum, const int* numbits, const int* fragment_index) +void F77_FUNC(gdadbt, GDADBT) (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 int32_t *bitnum, const int32_t *numbits, + const int32_t *fragment_index) { char *fc, *in; @@ -1288,9 +1294,10 @@ } /* gd_add_sbit wrapper */ -void F77_FUNC(gdadsb, GDADSB) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const int* bitnum, const int* numbits, const int* fragment_index) +void F77_FUNC(gdadsb, GDADSB) (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 int32_t *bitnum, const int32_t *numbits, + const int32_t *fragment_index) { char *fc, *in; @@ -1306,9 +1313,10 @@ } /* gd_add_multiply wrapper */ -void F77_FUNC(gdadmt, GDADMT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const char* in_field2, const int* in_field2_l, const int* fragment_index) +void F77_FUNC(gdadmt, GDADMT) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l, const int32_t *fragment_index) { char *fc, *in1, *in2; @@ -1326,9 +1334,10 @@ } /* gd_add_divide wrapper */ -void F77_FUNC(gdaddv, GDADDV) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const char* in_field2, const int* in_field2_l, const int* fragment_index) +void F77_FUNC(gdaddv, GDADDV) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l, const int32_t *fragment_index) { char *fc, *in1, *in2; @@ -1347,9 +1356,10 @@ } /* gd_add_recip wrapper */ -void F77_FUNC(gdadrc, GDADRC) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const double* dividend, const int* fragment_index) +void F77_FUNC(gdadrc, GDADRC) (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 double *dividend, + const int32_t *fragment_index) { char *fc, *in; @@ -1366,9 +1376,10 @@ dreturnvoid(); } -void F77_FUNC(gdadcr, GDADCR) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const GD_DCOMPLEXP(cdividend), const int* fragment_index) +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 *fragment_index) { char *fc, *in; @@ -1393,9 +1404,10 @@ } /* gd_add_phase wrapper */ -void F77_FUNC(gdadph, GDADPH) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const int* shift, const int* fragment_index) +void F77_FUNC(gdadph, GDADPH) (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 int32_t *shift, + const int32_t *fragment_index) { char *fc, *in; @@ -1412,8 +1424,8 @@ } /* gd_fragmentname wrapper */ -void F77_FUNC(gdfrgn, GDFRGN) (char* filename, int* filename_l, - const int* dirfile, const int* index) +void F77_FUNC(gdfrgn, GDFRGN) (char *filename, int32_t *filename_l, + const int32_t *dirfile, const int32_t *index) { dtrace("%p, %i, %i, %i", filename, *filename_l, *dirfile, *index); _GDF_FString(filename, filename_l, gd_fragmentname(_GDF_GetDirfile(*dirfile), @@ -1422,13 +1434,13 @@ } /* gd_nfragments wrapper */ -void F77_FUNC(gdnfrg, GDNFRG) (int* nformats, const int* dirfile) +void F77_FUNC(gdnfrg, GDNFRG) (int32_t *nformats, const int32_t *dirfile) { *nformats = gd_nfragments(_GDF_GetDirfile(*dirfile)); } /* gd_metaflush wrapper */ -void F77_FUNC(gdmfls, GDMFLS) (const int* dirfile) +void F77_FUNC(gdmfls, GDMFLS) (const int32_t *dirfile) { dtrace("%i", *dirfile); @@ -1438,7 +1450,7 @@ } /* gd_rewrite_fragment wrapper */ -void F77_FUNC(gdrfrg, GDRFRG) (const int* dirfile, const int* fragment) +void F77_FUNC(gdrfrg, GDRFRG) (const int32_t *dirfile, const int32_t *fragment) { dtrace("%i, %i", *dirfile, *fragment); @@ -1448,8 +1460,8 @@ } /* gd_include wrapper */ -void F77_FUNC(gdincl, GDINCL) (const int* dirfile, const char* file, - const int* file_l, const int* fragment_index, const int* flags) +void F77_FUNC(gdincl, GDINCL) (const int32_t *dirfile, const char *file, + const int32_t *file_l, const int32_t *fragment_index, const int32_t *flags) { char *fi; @@ -1464,8 +1476,8 @@ } /* gd_nfield_by_type wrapper */ -void F77_FUNC(gdnfdt, GDNFDT) (int* nfields, const int* dirfile, - const int* type) +void F77_FUNC(gdnfdt, GDNFDT) (int32_t *nfields, const int32_t *dirfile, + const int32_t *type) { dtrace("%p, %i, 0x%x", nfields, *dirfile, *type); @@ -1475,14 +1487,14 @@ } /* gd_nvectors wrapper */ -void F77_FUNC(gdnvec, GDNVEC) (int* nvectors, const int* dirfile) +void F77_FUNC(gdnvec, GDNVEC) (int32_t *nvectors, const int32_t *dirfile) { *nvectors = gd_nvectors(_GDF_GetDirfile(*dirfile)); } /* gd_field_list_by_type wrapper -- this only returns one field name */ -void F77_FUNC(gdfdnt, GDFDNT) (char* name, int* name_l, const int* dirfile, - const int* type, const int* field_num) +void F77_FUNC(gdfdnt, GDFDNT) (char *name, int32_t *name_l, + const int32_t *dirfile, const int32_t *type, const int32_t *field_num) { const char** fl; DIRFILE* D; @@ -1503,8 +1515,8 @@ } /* gd_vector_list wrapper -- this only returns one field name */ -void F77_FUNC(gdvecn, GDVECN) (char* name, int* name_l, const int* dirfile, - const int* field_num) +void F77_FUNC(gdvecn, GDVECN) (char *name, int32_t *name_l, + const int32_t *dirfile, const int32_t *field_num) { const char** fl; DIRFILE *D; @@ -1525,9 +1537,9 @@ } /* gd_mfield_list_by_type wrapper -- this only returns one field name */ -void F77_FUNC(gdmfdt, GDMFDT) (char* name, int* name_l, const int* dirfile, - const char* parent, const int* parent_l, const int* type, - const int* field_num) +void F77_FUNC(gdmfdt, GDMFDT) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *parent, const int32_t *parent_l, + const int32_t *type, const int32_t *field_num) { const char **fl; unsigned int nfields; @@ -1552,13 +1564,14 @@ } /* gd_mvector_list wrapper -- this only returns one field name */ -void F77_FUNC(gdmven, GDMVEN) (char* name, int* name_l, const int* dirfile, - const char* parent, const int* parent_l, const int* field_num) +void F77_FUNC(gdmven, GDMVEN) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *parent, const int32_t *parent_l, + const int32_t *field_num) { const char** fl; unsigned int nfields; DIRFILE* D; - char* pa; + char *pa; dtrace("%p, %p, %i, %i", name, name_l, *dirfile, *field_num); @@ -1577,16 +1590,16 @@ } /* gd_madd_lincom wrapper */ -void F77_FUNC(gdmdlc, GDMDLC) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const int* n_fields, const char* in_field1, const int* in_field1_l, - const double* m1, const double* b1, const char* in_field2, - const int* in_field2_l, const double* m2, const double* b2, - const char* in_field3, const int* in_field3_l, const double* m3, - const double* b3) +void F77_FUNC(gdmdlc, GDMDLC) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const double *m1, const double *b1, + const char *in_field2, const int32_t *in_field2_l, const double *m2, + const double *b2, const char *in_field3, const int32_t *in_field3_l, + const double *m3, const double *b3) { char *pa, *fc; - char* in_fields[3] = {NULL, NULL, NULL}; + char *in_fields[3] = {NULL, NULL, NULL}; double m[3] = {0, 0, 0}; double b[3] = {0, 0, 0}; const int nf = *n_fields; @@ -1625,16 +1638,16 @@ dreturnvoid(); } -void F77_FUNC(gdmdcl, GDMDCL) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const int* n_fields, const char* in_field1, const int* in_field1_l, - const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), const char* in_field2, - const int* in_field2_l, const GD_DCOMPLEXP(m2), const GD_DCOMPLEXP(b2), - const char* in_field3, const int* in_field3_l, const GD_DCOMPLEXP(m3), - const GD_DCOMPLEXP(b3)) +void F77_FUNC(gdmdcl, GDMDCL) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), + const char *in_field2, const int32_t *in_field2_l, const GD_DCOMPLEXP(m2), + const GD_DCOMPLEXP(b2), const char *in_field3, const int32_t *in_field3_l, + const GD_DCOMPLEXP(m3), const GD_DCOMPLEXP(b3)) { char *pa, *fc; - char* in_fields[3] = {NULL, NULL, NULL}; + char *in_fields[3] = {NULL, NULL, NULL}; #ifdef GD_NO_C99_API double cm[6] = {0, 0, 0, 0, 0, 0}; double cb[6] = {0, 0, 0, 0, 0, 0}; @@ -1679,11 +1692,11 @@ } /* gd_madd_polynom wrapper */ -void F77_FUNC(gdmdpn, GDMDPN) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const int* poly_ord, const char* in_field, const int* in_field_l, - const double* a0, const double* a1, const double* a2, const double* a3, - const double* a4, const double* a5) +void F77_FUNC(gdmdpn, GDMDPN) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const double *a0, const double *a1, + const double *a2, const double *a3, const double *a4, const double *a5) { char *pa, *fc, *inf; double a[6] = {0, 0, 0, 0, 0, 0}; @@ -1717,10 +1730,10 @@ dreturnvoid(); } -void F77_FUNC(gdmdcp, GDMDCP) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const int* poly_ord, const char* in_field, const int* in_field_l, - const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), +void F77_FUNC(gdmdcp, GDMDCP) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), const GD_DCOMPLEXP(a2), const GD_DCOMPLEXP(a3), const GD_DCOMPLEXP(a4), const GD_DCOMPLEXP(a5)) { @@ -1763,10 +1776,10 @@ } /* gd_madd_linterp wrapper */ -void F77_FUNC(gdmdlt, GDMDLT) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, const char* table, - const int* table_l) +void F77_FUNC(gdmdlt, GDMDLT) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const char *table, const int32_t *table_l) { char *pa, *fc, *in, *tab; @@ -1785,10 +1798,10 @@ } /* gd_madd_bit wrapper */ -void F77_FUNC(gdmdbt, GDMDBT) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, const int* bitnum, - const int* numbits) +void F77_FUNC(gdmdbt, GDMDBT) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const int32_t *bitnum, const int32_t *numbits) { char *pa, *fc, *in; @@ -1805,10 +1818,10 @@ } /* gd_madd_sbit wrapper */ -void F77_FUNC(gdmdsb, GDMDSB) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, const int* bitnum, - const int* numbits) +void F77_FUNC(gdmdsb, GDMDSB) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const int32_t *bitnum, const int32_t *numbits) { char *pa, *fc, *in; @@ -1825,10 +1838,11 @@ } /* gd_madd_multiply wrapper */ -void F77_FUNC(gdmdmt, GDMDMT) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field1, const int* in_field1_l, const char* in_field2, - const int* in_field2_l) +void F77_FUNC(gdmdmt, GDMDMT) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l) { char *pa, *fc, *in1, *in2; @@ -1849,10 +1863,11 @@ } /* gd_madd_divide wrapper */ -void F77_FUNC(gdmddv, GDMDDV) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field1, const int* in_field1_l, const char* in_field2, - const int* in_field2_l) +void F77_FUNC(gdmddv, GDMDDV) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l) { char *pa, *fc, *in1, *in2; @@ -1874,9 +1889,10 @@ } /* gd_madd_recip wrapper */ -void F77_FUNC(gdmdrc, GDMDRC) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, const double* dividend) +void F77_FUNC(gdmdrc, GDMDRC) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const double *dividend) { char *pa, *fc, *in1; @@ -1894,10 +1910,10 @@ dreturnvoid(); } -void F77_FUNC(gdmdcr, GDMDCR) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, - const GD_DCOMPLEXP(cdividend)) +void F77_FUNC(gdmdcr, GDMDCR) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const GD_DCOMPLEXP(cdividend)) { char *pa, *fc, *in1; @@ -1923,9 +1939,10 @@ } /* gd_madd_phase wrapper */ -void F77_FUNC(gdmdph, GDMDPH) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* in_field, const int* in_field_l, const int* shift) +void F77_FUNC(gdmdph, GDMDPH) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *in_field, + const int32_t *in_field_l, const int32_t *shift) { char *pa, *fc, *in; @@ -1943,9 +1960,9 @@ } /* gd_add_const wrapper */ -void F77_FUNC(gdadco, GDADCO) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* const_type, const int* data_type, - const void* value, const int* fragment_index) +void F77_FUNC(gdadco, GDADCO) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type, + const int32_t *data_type, const void *value, const int32_t *fragment_index) { char *fc; @@ -1961,9 +1978,10 @@ } /* gd_madd_const wrapper */ -void F77_FUNC(gdmdco, GDMDCO) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const int* const_type, const int* data_type, const void* value) +void F77_FUNC(gdmdco, GDMDCO) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type, + const int32_t *data_type, const void *value) { char *pa, *fc; @@ -1980,9 +1998,9 @@ } /* gd_add_carray wrapper */ -void F77_FUNC(gdadca, GDADCA) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *const_type, int *array_len, - const int *data_type, const void *value, const int *fragment_index) +void F77_FUNC(gdadca, GDADCA) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type, int32_t *array_len, + const int32_t *data_type, const void *value, const int32_t *fragment_index) { char *fc; @@ -1999,10 +2017,10 @@ } /* gd_madd_carray wrapper */ -void F77_FUNC(gdmdca, GDMDCA) (const int *dirfile, const char *parent, - const int *parent_l, const char *field_code, const int *field_code_l, - const int *const_type, const int *array_len, const int *data_type, - const void *value) +void F77_FUNC(gdmdca, GDMDCA) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type, + const int32_t *array_len, const int32_t *data_type, const void *value) { char *pa, *fc; @@ -2019,9 +2037,9 @@ } /* gd_add_string wrapper */ -void F77_FUNC(gdadst, GDADST) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* value, const int* value_l, - const int* fragment_index) +void F77_FUNC(gdadst, GDADST) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *value, const int32_t *value_l, + const int32_t *fragment_index) { char *fc, *va; @@ -2037,9 +2055,9 @@ } /* gd_madd_string wrapper */ -void F77_FUNC(gdmdst, GDMDST) (const int* dirfile, const char* parent, - const int* parent_l, const char* field_code, const int* field_code_l, - const char* value, const int* value_l) +void F77_FUNC(gdmdst, GDMDST) (const int32_t *dirfile, const char *parent, + const int32_t *parent_l, const char *field_code, + const int32_t *field_code_l, const char *value, const int32_t *value_l) { char *pa, *fc, *va; @@ -2057,8 +2075,8 @@ } /* gd_add_spec wrapper */ -void F77_FUNC(gdadsp, GDADSP) (const int* dirfile, const char* spec, - const int* spec_l, const int* fragment_index) +void F77_FUNC(gdadsp, GDADSP) (const int32_t *dirfile, const char *spec, + const int32_t *spec_l, const int32_t *fragment_index) { char *sp; @@ -2072,8 +2090,8 @@ } /* gd_madd_spec wrapper */ -void F77_FUNC(gdmdsp, GDMDSP) (const int* dirfile, const char* spec, - const int* spec_l, const char *parent, const int* parent_l) +void F77_FUNC(gdmdsp, GDMDSP) (const int32_t *dirfile, const char *spec, + const int32_t *spec_l, const char *parent, const int32_t *parent_l) { char *pa, *sp; @@ -2089,8 +2107,8 @@ } /* gd_get_constant wrapper */ -void F77_FUNC(gdgtco, GDGTCO) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *return_type, void *data_out) +void F77_FUNC(gdgtco, GDGTCO) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *return_type, void *data_out) { char *fc; @@ -2105,8 +2123,8 @@ } /* gd_get_carray wrapper */ -void F77_FUNC(gdgtca, GDGTCA) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *return_type, void *data_out) +void F77_FUNC(gdgtca, GDGTCA) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *return_type, void *data_out) { char *fc; @@ -2121,9 +2139,9 @@ } /* gd_get_carray_slice wrapper */ -void F77_FUNC(gdgcas, GDGCAS) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *start, const int *n, - const int *return_type, void *data_out) +void F77_FUNC(gdgcas, GDGCAS) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *start, const int32_t *n, + const int32_t *return_type, void *data_out) { char *fc; @@ -2139,8 +2157,8 @@ } /* gd_carray_len wrapper */ -void F77_FUNC(gdcaln, GDCALN) (int *len, const int *dirfile, - const char *field_code, const int *field_code_l) +void F77_FUNC(gdcaln, GDCALN) (int32_t *len, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l) { char *fc; @@ -2154,8 +2172,8 @@ } /* gd_get_string wrapper */ -void F77_FUNC(gdgtst, GDGTST) (int *size, const int *dirfile, - const char *field_code, const int *field_code_l, const int *len, +void F77_FUNC(gdgtst, GDGTST) (int32_t *size, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l, const int32_t *len, char *data_out) { char *fc, *out; @@ -2177,8 +2195,8 @@ } /* gd_put_constant wrapper */ -void F77_FUNC(gdptco, GDPTCO) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *data_type, const void *data_in) +void F77_FUNC(gdptco, GDPTCO) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *data_type, const void *data_in) { char *fc; @@ -2193,8 +2211,8 @@ } /* gd_put_carray wrapper */ -void F77_FUNC(gdptca, GDPTCA) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *data_type, const void *data_in) +void F77_FUNC(gdptca, GDPTCA) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *data_type, const void *data_in) { char *fc; @@ -2209,9 +2227,9 @@ } /* gd_put_carray_slice wrapper */ -void F77_FUNC(gdpcas, GDPCAS) (const int *dirfile, const char *field_code, - const int *field_code_l, const int *start, const int *n, - const int *data_type, const void *data_in) +void F77_FUNC(gdpcas, GDPCAS) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *start, const int32_t *n, + const int32_t *data_type, const void *data_in) { char *fc; @@ -2226,9 +2244,9 @@ } /* gd_put_string wrapper */ -void F77_FUNC(gdptst, GDPTST) (int* n_wrote, const int* dirfile, - const char* field_code, const int* field_code_l, const int* len, - const char* data_in) +void F77_FUNC(gdptst, GDPTST) (int32_t *n_wrote, const int32_t *dirfile, + const char *field_code, const int32_t *field_code_l, const int32_t *len, + const char *data_in) { char *fc, *in; dtrace("%p, %i, %p, %i, %i, %p", n_wrote, *dirfile, field_code, *field_code_l, @@ -2242,10 +2260,10 @@ } /* gd_nmfields wrapper */ -void F77_FUNC(gdnmfd, GDNMFD) (int* nfields, const int* dirfile, - const char* parent, const int* parent_l) +void F77_FUNC(gdnmfd, GDNMFD) (int32_t *nfields, const int32_t *dirfile, + const char *parent, const int32_t *parent_l) { - char* pa; + char *pa; dtrace("%p, %i, %p, %i", nfields, *dirfile, parent, *parent_l); *nfields = gd_nmfields(_GDF_GetDirfile(*dirfile), _GDF_CString(&pa, parent, @@ -2255,8 +2273,8 @@ } /* gd_nmfields_by_type wrapper */ -void F77_FUNC(gdnmft, GDNMFT) (int* nfields, const int* dirfile, - const char* parent, const int* parent_l, const int* type) +void F77_FUNC(gdnmft, GDNMFT) (int32_t *nfields, const int32_t *dirfile, + const char *parent, const int32_t *parent_l, const int32_t *type) { char *pa; dtrace("%p, %i, %p, %i, 0x%x", nfields, *dirfile, parent, *parent_l, *type); @@ -2269,8 +2287,8 @@ } /* gd_nmvectors wrapper */ -void F77_FUNC(gdnmve, GDNMVE) (int* nvectors, const int* dirfile, - const char* parent, const int* parent_l) +void F77_FUNC(gdnmve, GDNMVE) (int32_t *nvectors, const int32_t *dirfile, + const char *parent, const int32_t *parent_l) { char *pa; @@ -2284,7 +2302,7 @@ } /* gd_discard wrapper */ -void F77_FUNC(gddscd, GDDSCD) (const int* dirfile) +void F77_FUNC(gddscd, GDDSCD) (const int32_t *dirfile) { dtrace("%i", *dirfile); @@ -2298,8 +2316,9 @@ } /* gd_cbopen wrapper */ -void F77_FUNC(gdcopn, GDCOPN) (int* dirfile, const char* dirfilename, - const int* dirfilename_l, const int* flags, const _GDF_callback_t callback) +void F77_FUNC(gdcopn, GDCOPN) (int32_t *dirfile, const char *dirfilename, + const int32_t *dirfilename_l, const int32_t *flags, + const _GDF_callback_t callback) { const struct _GDF_callback_container temp = { callback }; DIRFILE *D; @@ -2323,7 +2342,7 @@ } /* gd_parser_callback wrapper */ -void F77_FUNC(gdclbk, GDCLBK) (const int* dirfile, +void F77_FUNC(gdclbk, GDCLBK) (const int32_t *dirfile, const _GDF_callback_t callback) { dtrace("%i, %p", *dirfile, callback); @@ -2348,7 +2367,7 @@ } /* deregister a callback function (ie. gd_parser_callback(..., NULL) */ -void F77_FUNC(gdnocb, GDNOCB) (const int* dirfile) +void F77_FUNC(gdnocb, GDNOCB) (const int32_t *dirfile) { dtrace("%i", *dirfile); @@ -2362,9 +2381,9 @@ } /* gd_alter_bit wrapper */ -void F77_FUNC(gdalbt, GDALBT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - int* bitnum, int* numbits) +void F77_FUNC(gdalbt, GDALBT) (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 int32_t *bitnum, const int32_t *numbits) { char *fc, *in; @@ -2381,9 +2400,9 @@ } /* gd_alter_sbit wrapper */ -void F77_FUNC(gdalsb, GDALSB) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - int* bitnum, int* numbits) +void F77_FUNC(gdalsb, GDALSB) (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 int32_t *bitnum, const int32_t *numbits) { char *fc, *in; @@ -2400,8 +2419,8 @@ } /* gd_alter_const wrapper */ -void F77_FUNC(gdalco, GDALCO) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* const_type) +void F77_FUNC(gdalco, GDALCO) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type) { char *fc; @@ -2415,8 +2434,9 @@ } /* gd_alter_carray wrapper */ -void F77_FUNC(gdalca, GDALCA) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* const_type, const int *array_len) +void F77_FUNC(gdalca, GDALCA) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *const_type, + const int32_t *array_len) { char *fc; @@ -2431,15 +2451,15 @@ } /* gd_alter_lincom wrapper */ -void F77_FUNC(gdallc, GDALLC) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* n_fields, const char* in_field1, - const int* in_field1_l, const double* m1, const double* b1, - const char* in_field2, const int* in_field2_l, const double* m2, - const double* b2, const char* in_field3, const int* in_field3_l, - const double* m3, const double* b3) +void F77_FUNC(gdallc, GDALLC) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const double *m1, const double *b1, + const char *in_field2, const int32_t *in_field2_l, const double *m2, + const double *b2, const char *in_field3, const int32_t *in_field3_l, + const double *m3, const double *b3) { - char* fc = (char *)malloc(*field_code_l + 1); - char* in_fields[3] = {NULL, NULL, NULL}; + char *fc = (char *)malloc(*field_code_l + 1); + char *in_fields[3] = {NULL, NULL, NULL}; double m[3] = {0, 0, 0}; double b[3] = {0, 0, 0}; const int nf = *n_fields; @@ -2477,15 +2497,15 @@ } /* gd_alter_clincom wrapper */ -void F77_FUNC(gdalcl, GDALCL) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* n_fields, const char* in_field1, - const int* in_field1_l, const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), - const char* in_field2, const int* in_field2_l, const GD_DCOMPLEXP(m2), - const GD_DCOMPLEXP(b2), const char* in_field3, const int* in_field3_l, +void F77_FUNC(gdalcl, GDALCL) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *n_fields, const char *in_field1, + const int32_t *in_field1_l, const GD_DCOMPLEXP(m1), const GD_DCOMPLEXP(b1), + const char *in_field2, const int32_t *in_field2_l, const GD_DCOMPLEXP(m2), + const GD_DCOMPLEXP(b2), const char *in_field3, const int32_t *in_field3_l, const GD_DCOMPLEXP(m3), const GD_DCOMPLEXP(b3)) { char *fc; - char* in_fields[3] = {NULL, NULL, NULL}; + char *in_fields[3] = {NULL, NULL, NULL}; #ifdef GD_NO_C99_API double cm[6] = {0, 0, 0, 0, 0, 0}; double cb[6] = {0, 0, 0, 0, 0, 0}; @@ -2527,17 +2547,18 @@ } /* gd_alter_polynom wrapper */ -void F77_FUNC(gdalpn, GDALPN) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* poly_ord, const char* in_field, - const int* in_field_l, const double* a0, const double* a1, const double* a2, - const double* a3, const double* a4, const double* a5) +void F77_FUNC(gdalpn, GDALPN) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const double *a0, const double *a1, + const double *a2, const double *a3, const double *a4, const double *a5) { - char* fc, *inf; + char *fc, *inf; double a[6] = {0, 0, 0, 0, 0, 0}; const int po = (*poly_ord > 5) ? 5 : *poly_ord; dtrace("%i, %p, %i, %i, %p, %i, %g, %g, %p, %p, %p, %p", *dirfile, field_code, - *field_code_l, *poly_ord, in_field, *in_field_l, *a0, *a1, a2, a3, a4, a5); + *field_code_l, *poly_ord, in_field, *in_field_l, *a0, *a1, a2, a3, a4, + a5); _GDF_CString(&inf, in_field, *in_field_l); @@ -2563,13 +2584,13 @@ } /* gd_alter_cpolynom wrapper */ -void F77_FUNC(gdalcp, GDALCP) (const int* dirfile, const char* field_code, - const int* field_code_l, const int* poly_ord, const char* in_field, - const int* in_field_l, const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), +void F77_FUNC(gdalcp, GDALCP) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const int32_t *poly_ord, const char *in_field, + const int32_t *in_field_l, const GD_DCOMPLEXP(a0), const GD_DCOMPLEXP(a1), const GD_DCOMPLEXP(a2), const GD_DCOMPLEXP(a3), const GD_DCOMPLEXP(a4), const GD_DCOMPLEXP(a5)) { - char* fc, *inf; + char *fc, *inf; #ifdef GD_NO_C99_API double ca[12] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; #else @@ -2604,9 +2625,10 @@ } /* gd_alter_multiply wrapper */ -void F77_FUNC(gdalmt, GDALMT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const char* in_field2, const int* in_field2_l) +void F77_FUNC(gdalmt, GDALMT) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l) { char *fc, *in1, *in2; @@ -2624,9 +2646,10 @@ } /* gd_alter_divide wrapper */ -void F77_FUNC(gdaldv, GDALDV) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const char* in_field2, const int* in_field2_l) +void F77_FUNC(gdaldv, GDALDV) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const char *in_field2, + const int32_t *in_field2_l) { char *fc, *in1, *in2; @@ -2645,9 +2668,9 @@ } /* gd_alter_recip wrapper */ -void F77_FUNC(gdalrc, GDALRC) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const double* dividend) +void F77_FUNC(gdalrc, GDALRC) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const double *dividend) { char *fc, *in1; @@ -2664,9 +2687,9 @@ dreturnvoid(); } -void F77_FUNC(gdalcr, GDALCR) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field1, const int* in_field1_l, - const GD_DCOMPLEXP(cdividend)) +void F77_FUNC(gdalcr, GDALCR) (const int32_t *dirfile, const char *field_code, + const int32_t *field_code_l, const char *in_field1, + const int32_t *in_field1_l, const GD_DCOMPLEXP(cdividend)) { char *fc, *in1; @@ -2690,9 +2713,9 @@ } /* gd_alter_phase wrapper */ -void F77_FUNC(gdalph, GDALPH) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const int* shift) +void F77_FUNC(gdalph, GDALPH) (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 int32_t *shift) { char *fc, *in; @@ -2708,50 +2731,51 @@ } /* gd_encoding wrapper */ -void F77_FUNC(gdgenc, GDGENC) (int* encoding, const int* dirfile, - const int* fragment) +void F77_FUNC(gdgenc, GDGENC) (int32_t *encoding, const int32_t *dirfile, + const int32_t *fragment) { *encoding = gd_encoding(_GDF_GetDirfile(*dirfile), *fragment); } /* gd_endianness wrapper */ -void F77_FUNC(gdgend, GDGEND) (int* endianness, const int* dirfile, - const int* fragment) +void F77_FUNC(gdgend, GDGEND) (int32_t *endianness, const int32_t *dirfile, + const int32_t *fragment) { *endianness = gd_endianness(_GDF_GetDirfile(*dirfile), *fragment); } /* dirfilename wrapper */ -void F77_FUNC(gdname, GDNAME) (char* name, int* name_l, const int* dirfile) +void F77_FUNC(gdname, GDNAME) (char *name, int32_t *name_l, + const int32_t *dirfile) { - const char* dn = gd_dirfilename(_GDF_GetDirfile(*dirfile)); + const char *dn = gd_dirfilename(_GDF_GetDirfile(*dirfile)); _GDF_FString(name, name_l, dn); } /* gd_parent_fragment wrapper */ -void F77_FUNC(gdpfrg, GDPFRG) (int* parent, const int* dirfile, - const int* fragment) +void F77_FUNC(gdpfrg, GDPFRG) (int32_t *parent, const int32_t *dirfile, + const int32_t *fragment) { *parent = gd_parent_fragment(_GDF_GetDirfile(*dirfile), *fragment); } /* gd_alter_protection wrapper */ -void F77_FUNC(gdaprt, GDAPRT) (const int* dirfile, const int* protection_level, - const int* fragment) +void F77_FUNC(gdaprt, GDAPRT) (const int32_t *dirfile, + const int32_t *protection_level, const int32_t *fragment) { gd_alter_protection(_GDF_GetDirfile(*dirfile), *protection_level, *fragment); } /* gd_protection wrapper */ -void F77_FUNC(gdgprt, GDGPRT) (int* protection_level, const int* dirfile, - const int* fragment) +void F77_FUNC(gdgprt, GDGPRT) (int32_t *protection_level, + const int32_t *dirfile, const int32_t *fragment) { *protection_level = gd_protection(_GDF_GetDirfile(*dirfile), *fragment); } /* gd_raw_filename wrapper */ -void F77_FUNC(gdrwfn, GDRWFN) (char* name, int* name_l, const int* dirfile, - const char* field_code, const int* field_code_l) +void F77_FUNC(gdrwfn, GDRWFN) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *fc, *fn; @@ -2770,8 +2794,8 @@ } /* gd_reference wrapper */ -void F77_FUNC(gdrefe, GDREFE) (char* name, int* name_l, const int* dirfile, - const char* field_code, const int *field_code_l) +void F77_FUNC(gdrefe, GDREFE) (char *name, int32_t *name_l, + const int32_t *dirfile, const char *field_code, const int32_t *field_code_l) { char *fc; const char *ref; @@ -2789,25 +2813,26 @@ } /* gd_alter_encoding wrapper */ -void F77_FUNC(gdaenc, GDAENC) (const int* dirfile, const int* encoding, - const int* fragment, const int* recode) +void F77_FUNC(gdaenc, GDAENC) (const int32_t *dirfile, const int32_t *encoding, + const int32_t *fragment, const int32_t *recode) { gd_alter_encoding(_GDF_GetDirfile(*dirfile), *encoding, *fragment, *recode); } /* gd_alter_endianness wrapper */ -void F77_FUNC(gdaend, GDAEND) (const int* dirfile, const int* endianness, - const int* fragment, const int* recode) +void F77_FUNC(gdaend, GDAEND) (const int32_t *dirfile, + const int32_t *endianness, const int32_t *fragment, const int32_t *recode) { gd_alter_endianness(_GDF_GetDirfile(*dirfile), *endianness, *fragment, *recode); } /* gd_alter_linterp wrapper */ -void F77_FUNC(gdallt, GDALLT) (const int* dirfile, const char* field_code, - const int* field_code_l, const char* in_field, const int* in_field_l, - const char* table, const int* table_l, const int* recode) +void F77_FUNC(gdallt, GDALLT) (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 *table, const int32_t *table_l, + const int32_t *recode) { ... [truncated message content] |
From: <ket...@us...> - 2012-04-04 01:53:07
|
Revision: 694 http://getdata.svn.sourceforge.net/getdata/?rev=694&view=rev Author: ketiltrout Date: 2012-04-04 01:52:57 +0000 (Wed, 04 Apr 2012) Log Message: ----------- * Deprecate gd_bit_t and gd_spf_t; delete gd_count_t. The former two are still defined, but no longer used in the API. * the count_max parameter to MPLEX is optional. * Deprecate GD_FLOAT and GD_DOUBLE, and the corresponding symbols in the Standards. * Finally finished _GD_FiniRawIO. * Allow the caller to modify the MPLEX lookback length via gd_mplex_lookback(). * gd_tokenise -> gd_strtok to sidestep regional spelling varations. * Added new gd_entry_list() and gd_nentries() and then made all the other counting and list functions special cases of these. * Update mans. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/NEWS trunk/getdata/bindings/Makefile.am trunk/getdata/bindings/cxx/bitentry.cpp trunk/getdata/bindings/cxx/dirfile.cpp trunk/getdata/bindings/cxx/getdata/bitentry.h trunk/getdata/bindings/cxx/getdata/dirfile.h trunk/getdata/bindings/cxx/getdata/entry.h trunk/getdata/bindings/cxx/getdata/mplexentry.h trunk/getdata/bindings/cxx/getdata/rawentry.h trunk/getdata/bindings/cxx/getdata/sbitentry.h trunk/getdata/bindings/cxx/mplexentry.cpp trunk/getdata/bindings/cxx/rawentry.cpp trunk/getdata/bindings/cxx/sbitentry.cpp trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/fgetdata.c trunk/getdata/bindings/f77/fgetdata.h trunk/getdata/bindings/f77/getdata.f.in trunk/getdata/bindings/f77/getdata.f90.in trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/getdata.c trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/make_parameters.c trunk/getdata/bindings/perl/GetData.xs trunk/getdata/bindings/perl/Makefile.am trunk/getdata/bindings/perl/simple_funcs.pl trunk/getdata/bindings/perl/simple_funcs.xsin trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/perl/typemap trunk/getdata/bindings/python/pydirfile.c trunk/getdata/bindings/python/pyentry.c trunk/getdata/bindings/python/pygetdata.c trunk/getdata/bindings/python/pygetdata.h trunk/getdata/bindings/python/test/big_test.py trunk/getdata/cmake/CMakeLists.txt trunk/getdata/doc/list.tests trunk/getdata/man/Makefile.am trunk/getdata/man/dirfile-encoding.5 trunk/getdata/man/dirfile-format.5 trunk/getdata/man/dirfile.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_getdata.3 trunk/getdata/man/gd_madd_bit.3 trunk/getdata/man/gd_native_type.3 trunk/getdata/man/gd_spf.3 trunk/getdata/src/Makefile.am trunk/getdata/src/add.c trunk/getdata/src/close.c trunk/getdata/src/common.c trunk/getdata/src/del.c trunk/getdata/src/encoding.c trunk/getdata/src/entry.c trunk/getdata/src/field_list.c trunk/getdata/src/flimits.c trunk/getdata/src/flush.c trunk/getdata/src/fpos.c trunk/getdata/src/getdata.c trunk/getdata/src/getdata.h.in trunk/getdata/src/globals.c trunk/getdata/src/include.c trunk/getdata/src/index.c trunk/getdata/src/internal.h trunk/getdata/src/mod.c trunk/getdata/src/name.c trunk/getdata/src/nfields.c trunk/getdata/src/open.c trunk/getdata/src/parse.c trunk/getdata/src/putdata.c trunk/getdata/src/spf.c trunk/getdata/test/Makefile.am trunk/getdata/test/add_mplex.c trunk/getdata/test/add_mplex_val.c trunk/getdata/test/add_sort.c trunk/getdata/test/alias_list.c trunk/getdata/test/alias_list_alias.c trunk/getdata/test/alter_mplex.c trunk/getdata/test/del_carray_deref.c trunk/getdata/test/del_const_deref.c trunk/getdata/test/del_const_force.c trunk/getdata/test/error_verbose.c trunk/getdata/test/error_verbose_prefix.c trunk/getdata/test/fragment_name.c trunk/getdata/test/include.c trunk/getdata/test/include_affix.c trunk/getdata/test/include_auto.c trunk/getdata/test/include_ignore.c trunk/getdata/test/include_ref.c trunk/getdata/test/madd_mplex.c trunk/getdata/test/nframes_spf.c trunk/getdata/test/parse_alias_meta.c trunk/getdata/test/parse_include.c trunk/getdata/test/parse_include_absolute.c trunk/getdata/test/parse_include_absrel.c trunk/getdata/test/parse_include_prefix.c trunk/getdata/test/parse_include_preprefix.c trunk/getdata/test/parse_include_relabs.c trunk/getdata/test/parse_include_relrel.c trunk/getdata/test/parse_include_slash.c trunk/getdata/test/parse_include_suffix.c trunk/getdata/test/parse_include_sufsuffix.c trunk/getdata/test/parse_mplex_ncols.c trunk/getdata/test/put_zero.c trunk/getdata/test/spf.c trunk/getdata/test/spf_alias.c trunk/getdata/test/spf_alias_meta.c trunk/getdata/test/spf_alias_missing.c trunk/getdata/test/spf_divide.c trunk/getdata/test/spf_lincom.c trunk/getdata/test/spf_multiply.c trunk/getdata/test/spf_polynom.c trunk/getdata/test/spf_recip.c trunk/getdata/test/spf_recurse.c trunk/getdata/test/test.h trunk/getdata/test/version_6_write.c trunk/getdata/util/dirfile2ascii.c Added Paths: ----------- trunk/getdata/man/gd_entry_list.3 trunk/getdata/man/gd_flags.3 trunk/getdata/man/gd_mplex_lookback.3 trunk/getdata/man/gd_nentries.3 trunk/getdata/man/gd_verbose_prefix.3 trunk/getdata/test/elist_alias.c trunk/getdata/test/elist_hidden.c trunk/getdata/test/elist_scalar.c trunk/getdata/test/get_lincom_null.c trunk/getdata/test/get_mplex_lball.c trunk/getdata/test/get_mplex_nolb.c trunk/getdata/test/nentries_alias.c trunk/getdata/test/nentries_hidden.c trunk/getdata/test/nentries_scalar.c trunk/getdata/test/parse_malias_meta.c trunk/getdata/test/parse_mplex_nomax.c Removed Paths: ------------- trunk/getdata/man/gd_field_list.3 trunk/getdata/man/gd_field_list_by_type.3 trunk/getdata/man/gd_mfield_list.3 trunk/getdata/man/gd_mfield_list_by_type.3 trunk/getdata/man/gd_mvector_list.3 trunk/getdata/man/gd_nfields.3 trunk/getdata/man/gd_nfields_by_type.3 trunk/getdata/man/gd_nmfields.3 trunk/getdata/man/gd_nmfields_by_type.3 trunk/getdata/man/gd_nmvectors.3 trunk/getdata/man/gd_nvectors.3 trunk/getdata/man/gd_vector_list.3 trunk/getdata/src/meta_list.c trunk/getdata/src/nmeta.c Property Changed: ---------------- trunk/getdata/test/ Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/ChangeLog 2012-04-04 01:52:57 UTC (rev 694) @@ -1,3 +1,133 @@ +2012-04-01 D. V. Wiebe <ge...@ke...> svn:694 + * src/getdata.h.in: Deprecate gd_bit_t and gd_spf_t. Remove gd_count_t. + * src/getdata.h.in bindings/make_parameters.c: Remove GD_COUNT_MAX. + * cmake/CMakeLists.txt: Remove DEFINE_gd_int16_t and DEFINE_gd_uint16_t. + * src/internal.h: Calculate GD_INT_TYPE and GD_UINT_TYPE. + + * src/entry.c (_GD_CalculateEntry) src/flush.c (_GD_FieldSpec) src/getdata.c + (_GD_DoMplex) src/putdata.c (_GD_DoMplexOut gd_putdata64) src/del.c + (_GD_DeReference) src/parse.c (_GD_ParseMplex _GD_ParseBit) src/mod.c + (_GD_Change): Use GD_INT_TYPE when dealing with bitnum, numbits, count_max, + and count_val. + * src/add.c (gd_add_bit gd_add_sbit gd_add_mplex gd_madd_bit gd_madd_sbit + gd_madd_mplex) src/mod.c (gd_alter_bit gd_alter_sbit gd_alter_mplex) + bindings/python/pyentry.c (gdpy_entry_setnumbits gdpy_entry_setbitnum + gdpy_entry_setcountval gdpy_entry_setcountmax) bindings/cxx/mplexentry.cpp + (MplexEntry::MplexEntry MplexEntry::SetCountVal MplexEntry::SetCountMax) + bindings/cxx/sbitentry.cpp (SBitEntry::SBitEntry SBitEntry::SetFirstBit + SBitEntry::SetNumBits) bindings/cxx/test/big_test.cpp + bindings/cxx/bitentry.cpp (BitEntry::BitEntry BitEntry::SetFirstBit + BitEntry::SetNumBits) bindings/cxx/getdata/bitentry.h (FirstBit NumBits) + bindings/cxx/getdata/entry.h (FirstBit NumBits CountVal CountMax) + bindings/cxx/getdata/mplexentry.h (CountVal CountMax) + bindings/cxx/getdata/sbitentry.h (FirstBit NumBits) bindings/perl/GetData.xs + bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c + (GDADBT GDADSB GDMDBT GDMDSB GDALBT GDALSB) bindings/idl/getdata.c + (gdidl_make_idl_entry gdidl_read_idl_entry gdidl_add_mplex gdidl_alter_mplex): + gd_bit_t, gd_count_t -> int. + * src/fpos.c (_GD_Seek) src/getdata.c (_GD_MultiplyData _GD_CMultiplyData + _GD_DivideData _GD_CDivideData _GD_WindowData _GD_CDivideData _GD_MplexData + _GD_DoLincom _GD_DoMultiply _GD_DoDivide _GD_DoWindow _GD_DoMplex + gd_getdata64) src/putdata.c (_GD_MplexOutData gd_putdata64) src/flimits.c + (_GD_GetEOF _GD_GetBOF gd_bof64) src/common.c (_GD_LinterpData + _GD_LincomData) src/add.c (gd_add_raw) src/spf.c (_GD_GetSPF gd_spf) + src/mod.c (_GD_SPFConvert) src/mod.c (gd_alter_entry) src/index.c + (gd_framenum_subset64) bindings/python/pyentry.c (gdpy_entry_setspf) + bindings/python/pydirfile.c (gdpy_dirfile_getdata) bindings/cxx/rawentry.cpp + (RawEntry::RawEntry RawEntry::SetSamplesPerFrame) + bindings/cxx/getdata/rawentry.h (SamplesPerFrame) bindings/perl/GetData.xs + bindings/perl/typemap bindings/perl/simple_funcs.pl bindings/f77/fgetdata.c + (GDADRW GDALRW) util/dirfile2ascii.c: gd_spf_t -> unsigned int. + * src/flush.c (_GD_WriteConst) src/mod.c (_GD_AlterScalar): Add missing + integer types. + + * src/parse.c (_GD_ParseMplex): Make count_max optional. + * src/getdata.c (_GD_DoMplex) src/add.c (_GD_Add): Handle count_max == 0. + + * src/getdata.h.in: Mark GD_FLOAT and GD_DOUBLE as deprecated. + + * src/encoding.c (_GD_FiniRawIO): Handle short writes and IO errors. + + * src/getdata.c (_GD_DoMplex): use D->lookback to determine how far to + search backwards. Also, read data in chunks of size GD_BUFFER_SIZE. + * src/open.c (_GD_Open): Initialise D->lookback. + * src/globals.c (gd_mplex_lookback): Added. + * bindings/cxx/dirfile.cpp (Dirfile::MplexLookback) + bindings/perl/simple_funcs.xsin (mplex_lookback) bindings/f77/getdata.f90.in + (fgd_mplex_lookback) bindings/f77/fgetdata.c (GDMXLB) bindings/idl/getdata.c + (gdidl_mplex_lookback): Added. + + * src/parse.c (gd_strtok): Renamed from gd_tokenise to avoid regional + spelling variations. Bindings renamed accordingly (except for the F77 + bindings). + + * bindings/python/pygetdata.c: Add GD_E_EXISTS exception. + + * bindings/python/pydirfile.h: Add mplex_lookback and verbose_prefix to + gdpy_constant_t. + * bindings/python/pydirfile.c (gdpy_dirfile_delete): Delete verbose_prefix. + * bindings/python/pydirfile.c (gdpy_dirfile_create): Initialise + mplex_lookback and verbose_prefix. + * bindings/python/pydirfile.c (gdpy_dirfile_verbose_prefix): Deleted. + * bindings/python/pydirfile.c (gdpy_dirfile_getverboseprefix + gdpy_dirfile_setverboseprefix gdpy_dirfile_getmplexlookback + gdpy_dirfile_setmplexlookback): Added. + + * bindings/Makefile.am: add src/gd_config.h to the prerequisites of + make_parameters. + + * src/flush.c (_GD_FlushFragment): Write /ENCODING for zzip and zzslim. + + * src/meta_list.c: Merged into src/field_list.c + * src/nmeta.c: Merged into src/nfields.c + + * src/add.c (_GD_InvalidEntype): Added. + * src/internal.h: Add entry_list and entry_list_flags to DIRFILE and + private_entry. + * src/internal.h (_GD_EntryIndex): Deleted. + * src/field_list.c (_GD_EntryIndex _GD_EntryList gd_entry_list): Added. + * src/field_list.c (_GD_ListEntry): Handle GD_ENTRIES_... flags. + * src/field_list.c (gd_field_list_by_type gd_vector_list gd_field_list + gd_mfield_list_by_type gd_mfield_list): Reimplement via gd_entry_list(). + + * src/nfields.c (_GD_NEntries gd_nentries): Added. + * src/nfields.c (gd_nfields gd_nvectors gd_nfields_by_type gd_nmfields + gd_nmvectors gd_nmfields_by_type): Reimplement via gd_nentries(). + + * src/field_list.c (gd_constants gd_carrays gd_strings gd_mconstants + gd_mcarrays gd_mstrings): Call _GD_NEntries for counts. + + * src/entry.c (gd_hide gd_unhide) src/del.c (_GD_Delete) src/include.c + (gd_uninclude) src/add.c (_GD_Add): Delete count updates. + + * src/name.c (_GD_Rename) src/del.c (_GD_Delete) src/include.c + (gd_uninclude) src/add.c (_GD_Add _GD_AddAlias): Invalidate metafield lists + too. + + * src/entry.c (_GD_FreeE) src/close.c (_GD_FreeD): Delete entry_lists. + + * src/globals.c (gd_flags): Don't check GD_INVALID. + + * bindings/python/pydirfile.c (gdpy_dirfile_nentries + gdpy_dirfile_entrylist) bindings/perl/GetData.xs (entry_list) + bindings/cxx/dirfile.cpp (Dirfile::NEntries Dirfile::EntryList) + bindings/f77/getdata.f90.in (fgd_nentries fgd_entry_name_max fgd_entry_list) + bindings/f77/fgetdata.c (GDNENT GDENTX GDENTN): Added. + * bindings/idl/getdata.c (gdidl_get_field_list gdidl_get_nfields)): Convert to + bindings for gd_entry_list and gd_nentries. + + * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp + bindings/perl/test/big_test.t bindings/f77/test/big_test.f + bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro: Add tests + 237 through 240. + + * test/elist_alias.c test/elist_hidden.c test/elist_scalar.c + test/get_lincom_null.c test/get_mplex_lball.c test/get_mplex_nolb.c + test/nentries_alias.c test/nentries_hidden.c test/nentries_scalar.c + test/parse_malias_meta.c test/parse_mplex_nomax.c: Added. + + * man/: Updated. + 2012-03-28 D. V. Wiebe <ge...@ke...> svn:691 * src/flush.c (_GD_FieldSpec) src/parse.c (_GD_ParseMplex): Swap order of fields in MPLEX specification. @@ -208,7 +338,7 @@ recreate the format file; just truncate it. (This helps kst not get confused when monitoring a dirfile which gets truncated.) -2012-02-14 D. V. Wiebe <ge...@ke...> svn:656,657 +2012-02-14 D. V. Wiebe <ge...@ke...> svn:656 svn:657 * src/putdata.c (gd_putdata): Return early if num_samp == 0. * test/put_zero.c: Added. @@ -4375,7 +4505,7 @@ * src/common.c (_GD_GetEntry): Removed FILEFRAM as an alias for INDEX per discussion with Barth. -2008-10-10 D. V. Wiebe <ge...@ke...> svn:129 +2008-10-10 D. V. Wiebe <ge...@ke...> svn:128 svn:129 * src/entry.c (_GD_FreeE): Renamed from dirfile_free_entry_strings (for which a new boilerplate function has been created). Separated cleaning up internal and externally created entries. Internally, the library now @@ -4400,7 +4530,7 @@ encoding specific *touch() function. * src/raw.c (_GD_RawTouch): Added. (Also used for the ASCII encoding). - * src/meta_list.c: Fixed all functions to get them working. + * src/meta_list.c: Added (META version of field_list.c) * src/field_list.c: Call _GD_ClearError in all public functions. * src/nmeta.c: Added (META version of nfields.c) Modified: trunk/getdata/NEWS =================================================================== --- trunk/getdata/NEWS 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/NEWS 2012-04-04 01:52:57 UTC (rev 694) @@ -10,10 +10,13 @@ * BUG FIX: Passing a zero dividend to alter_crecip() and alter_recip() now results in the dividend not changing, per documentation. + * BUG FIX: GetData wasn't properly computing the module directory, causing encodings using external modules to fail with GD_E_UNSUPPORTED. + * BUG FIX: Metafield records are now properly stored in the format file for Standards Version 8. + * BUG FIX: gd_raw_filename() wasn't clearing the Dirfile error before operation, resulting in it failing erroneously in certain situations. @@ -30,10 +33,13 @@ * If built with modules, the plugin shared objects will now be installed in a separate directory (by default "${libdir}/getdata", but see the --with-module-dir option in ./configure). + * BUG FIX: When using modules, a missing plugin no longer results in a lock up the second time an attempt is made to find it. + * BUG FIX: GetData now properly processes /INCLUDE directives with absolute paths, as the documentation insists it should. + * BUG FIX: gd_add()ing the first raw field in a dirfile to a subfragment no longer results in memory corruption when calling gd_close(). @@ -55,8 +61,10 @@ * BUG FIX: When the parser fails in a gd_include() call, the internal list of conformant Standards Versions for the loaded dirfile is no longer corrupted. + * BUG FIX Performing two consecutive reads of the same field in an ASCII encoded datasources no longer confuses GetData. + * BUG FIX: Numerous memory leaks have been patched (mostly pin-holes, although there are a few, rare but egregious ones). @@ -64,9 +72,11 @@ * The value(s) of a CONST or CARRAY field added with gd_[m]add() is now guaranteed to be zero; previously, it was unspecified. + * BUG FIX: Specifying both GD_VERBOSE and GD_IGNORE_DUPS no longer results in spurious "Field code already defined" messages when duplicate fields are encountered. + * BUG FIX: Calling gd_delete on a metafield no longer results in a segfault. Bindings Changes: @@ -80,9 +90,11 @@ * dirfile2ascii now pads reads past the end-of-field. The value used to pad may be specified with '-z', and defaults to 0/NaN. Previously, the value of uninitialized memory was output. + * BUG FIX: dirfile2ascii now does what the user intends when presented with cart-before-horse arguments, ie. "dirfile2ascii -e field DIRFILE". Previously this resulted in confusion. + * BUG FIX: dirfile2ascii now accepts field conversion '-u', which was documented but overlooked in the argument parser. @@ -96,16 +108,20 @@ types: DIVIDE, which computes X/Y for vectors X and Y, RECIP, which computes A/X for vector X and scalar A, and CARRAY, which is an array of CONST scalars. A few other changes are listed below. + * Like CONST fields, CARRAY elements can be used as parametersin the definition of other fields. Syntax is 'field<n>', where 'field' is the field name and 'n' the element index in the CARRAY (and the angle brackets are literal angle brackets). If the '<n>' is omitted, the first element (numbered 0) is assumed. + * Slashes on reserved words are now mandatory, allowing fields with reserved words as names. + * The long-deprecated single character data type codes have been removed from Standards Version 8. (They are still accepted by GetData, which handles all previous Standards Versions as well.) + * The /ENDIAN directive now takes an optional second parameter. The only allowed value for this second token is "arm", which indicates that double precision floating point data (including double precision complex data) are @@ -118,9 +134,11 @@ Win32 using MinGW. In the case of MinGW, this includes linking against the Microsoft C Runtime, which isn't POSIX compliant. Users should excercise caution when writing to dirfiles in this case. + * GetData can now be used on ARM processors. As a side-effect, GetData can now read and write the middle-ended floating point format used by older ARM processors (on any processor, via endianness conversion). + * Some changes have been made to the parser. It now operates in one of two modes: pedantic mode, which adheres strictly to one particular Dirfile Standards Version, and permissive mode (the default) which is more @@ -128,51 +146,64 @@ switch the parser from permissive to pedantic mode unless told not to (see GD_PERMISSIVE below), and will change the particular Standards Version to which pedantic mode is adhering. + * As a result of the previous change, the Standards compliance of the parser in strict mode has been greatly increased. This affects allowed characters in field names, and field name lengths. The existance or lack thereof of the implicit FILEFRAM field (an alias for INDEX) is also affected. + * Since Standards Versions 4 and earlier were never codified, we've made some assumptions as to their behaviour in certain undocumented situtations. Most noticably, they still prohibit ASCII control codes (bytes < 0x20) and '/' in field names. We also assume these dirfiles have native byte sex, even though some early GetData behaviour implied only little-ended data was acceptable. + * Every Dirfile object now records its current Standards Version, which affects functions such as gd_add_spec(). The Version will start out as the value of the last /VERSION directive encountered by the parser, or else the latest compliant Standards Version. It can be changed (see below). + * When writing metadata to disk, fragments will be written according to the current Standards Version of the dirfile object, rather than always using the latest version, as before. + * The C library now sports an "ANSI C" mode, which allows compilation of GetData without a C99-compliant compiler. Some functionality may be lost, most prominently, but unsurprisingly, the default (C99) API. + * The artificial maximum line length of 4096 bytes for format metadata has been removed. The maximum line length is now 2**31 bytes on 32-bit systems, and more on 64-bit systems. This also has the side-effect of removing the same length limit which had been applied to field names. + * LINTERP tables are no longer required to be sorted. The library will sort them, if needed. As a side-effect of this, tables are no longer read twice when loading, leading to potential speed-up. + * BUG FIX: The library wasn't properly checking that the second and higher input fields in LINCOM and MULTIPLY fields were, in fact, vectors, leading to possible segfaults. + * BUG FIX: A memory leak associated with modifying LINCOM metadata has been fixed. + * BUG FIX: Using a complex valued vector as the second input field in a MULTIPLY wouldn't result in the field being internally flagged as complex, leading to loss of the imaginary part in certain situtaitons. + * BUG FIX: Trying to write to a LINTERP via a table which isn't monotonic now results in error. Previously, this was allowed, with arbitrary data stored to disk. + * BUG FIX: On encountering a line longer than it was prepared to deal with, the parser used to get very confused, potentially resulting in bizarre behaviour. On the off chance such a line is encountered, GetData will now raise GD_E_LINE_TOO_LONG in these cases. (And, since the maxmium line - length has been increased to at least 2**31 bytes, this should only occur - in pathological situations.) + length has been increased to at least 2**31 characters, this should only + occur in pathological situations.) + * BUG FIX: Deleting a metafield was not being communicated to its parent, resulting in differing opinions within the library as to the deleted field's exsitence. @@ -184,6 +215,7 @@ performed. All public functions, and data types now begin with 'gd_'. All public preprocessor macros now begin with 'GD_'. Symbol renaming has occurred in the following manner: + - functions which started with 'put' simply prefix 'gd_' to their name. So put_constant() becomes gd_put_constant(). - functions which started with 'get' replace 'get' with 'gd', except those @@ -196,54 +228,71 @@ - macros which started with 'GETDATA_' now start with 'GD_'. Those that started with 'NO_GETDATA_' now start with 'GD_NO_'. So GETDATA_LEGACY_API becomes GD_LEGACY_API and NO_GETDATA_LEGACY_API becomes GD_NO_LEGACY_API. + * The above renaming rules result in one gd_ namespace clash. As a result, get_reference() has been removed completely. Calls will have to be changed to use gd_reference(), formerly dirfile_reference(). + * Furthermore, the function dirfile_protect() is now gd_alter_protection() to match the naming of other fragment metadata altering functions. + * To ease transition to the new namespace, defining GD_FUNCTION_ALIASES before including getdata.h will create a bunch of preprocessor macros which map the old names to the new. + * The meaning of the GD_PEDANTIC flag to gd_[cb]open() has changed. It now forces the parser to start off in pedantic mode (see above), following the latest Standards Version, rather than the default permissive mode. This is a subtle change, and in most cases the effects of GD_PEDANTIC will be the same as they were before. + * A new dirfile flag, GD_PERMISSIVE, has been added. Passing this to gd_[cb]open() will prohibit the parser from switching into pedantic mode when it encounters a /VERSION directive. This flag is needed to read dirfiles which claim to adhere to the Standards via a /VERSION directive, but contain invalid syntax nonetheless. + * The current Standards Version of an open dirfile can be set or queried by calling the new function gd_dirfile_standards(). NB: this only affects the open dirfile, not the metadata stored on disk. + * A new function, gd_rewrite_fragment() will force GetData to write the specified fragment to disk, even if no metadata in the fragment has changed. + * Two new functions, gd_bof() and gd_eof() can be used to find the sample number of the beginning- or end-of-field for a given field. Notably, these can be used to calculate the amount of raw data on disk for a given field. + * The new gd_invalid_dirfile() function will return a newly created, invalid dirfile. Primarily useful to callers as a "null dirfile" placeholder. + * GD_E_OPEN_INCLUDE has been renamed to GD_E_OPEN_FRAGMENT, but the former symbol remains as an alias. + * Two new bitflags to gd_cbopen and gd_open: GD_ARM_ENDIAN and GD_NOT_ARM_ENDIAN allow specifying the default ordering of double precision data. These flags may also be used with gd_alter_endianness() and will be returned by gd_endianness(). On all platforms except for middle-endian 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. + * All functions now raise GD_E_DIMENSION when encountering a scalar field when expecting a vector. In the past, the error value returned was different for different functions. + * getdata.h now wraps itself in an extern "C" block if included by a C++ compiler. + * If passed a NULL pointer, gd_error_string() will return a newly malloc'd buffer long enough to hold the entire string. It should be free'd by the caller. + * The parser data passed to the callback function now includes the length of the buffer. The parser also permits the callback to assign a new pointer to the 'line' element of the parser data if the buffer passed in is too small. + * gd_metaflush() now fails and raises GD_E_ACCMODE if called on a read-only dirfile. (Previously it would successfully do nothing.) @@ -255,39 +304,56 @@ * BUG FIX: In previous versions, attempting to access an invalid dirfile (anything that would cause gd_open to fail) resulted in leaked memory. This leak has been plugged. + * BUG FIX: A segfault involving the reporting of POLYNOM fields has been fixed in GetFormat(). Bindings * Bindings for the functionality introduced into 0.7.0 have been added. + * F77: GDPROT has been renamed GDAPRT to mirror the renaming of gd_alter_protection(). + * F77: GDGTCO and GDPTCO no longer return an indicator of success. + * F77: The signatues of GDGSCA and GDASCA have changed to return/take the scalar index as well. + * F95: For consistency sake, the Fortran 95 bindings have undergone the same renaming so they have the same name as their C counterparts. All functions are now preceded by 'fgd_'. + * F95: The fgd_get_constant_* and fgd_put_constant_* procedures are now subroutines, not functions. + * C++: Const member functions are now flagged as such. + * C++: The len parameter to Dirfile::ErrorString is now ignored. + * C++: dirfiles are now opened read-only by default. + * IDL: The IDL bindings have also followed suit in the great renaming. The exception to this is GETDATA_CONSTANTS(), which is not renamed. + * IDL: Various constants defined in getdata.h but not used by the IDL bindings have been removed from the structure returned by GETDATA_CONSTANTS(). - * Pyhon: dirfile.getdata() now raises ValueError if neither num_frames nor + + * Python: dirfile.getdata() now raises ValueError if neither num_frames nor num_samples are specified. In the past, it would happily return nothing in this case. + * Python: dirfiles are now opened read-only by default. + * C++ BUG FIX: Entry::Scalar() no longer rejects valid values of index. + * IDL BUG FIX: A memory impropriety involving keyword arguments. This bug manifested by rejecting valid keyword arguments on 64-bit systems, but may have had other, subtle effects on 32-bit systems as well. + * Python BUG FIX: A non-literal phase shift is now properly reported. + * Python BUG FIX: Calling Dirfile.discard() or Dirfile.close() no longer results in a segfault. @@ -295,9 +361,11 @@ * The --disable-checkdirfile option has been removed from ./configure. It is now always installed. + * A utility, dirfile2ascii, is now installed alongside checkdirfile. This utility converts all or part of a dirfile into ASCII text. dirfile2ascii was written by Matthew Truch. + * The thoroughness of the checks done by checkdirfile have increased. It now reports format syntax errors, Dirfile Standards compliance, problems with field definitions (such as missing input fields), and the size of the @@ -339,6 +407,7 @@ * C++ BUG FIX: Several bugs preventing compilation of the C++ test-suite under Fedora 13 have been fixed. + * IDL BUG FIX: Several segfaults in the IDL bindings have been eradicated. Miscellaneous @@ -361,14 +430,19 @@ * GetData now support Dirfile Standards Version 7. Standards Version 7 adds complex data types, a signed bitfield (SBIT), a polynomial derived field (POLYNOM), and other features detailed below. + * Metafields can now be specified using a normal format specification line and their full (slashed) field code. + * Field codes can now contain a "representation suffix", which allows specifying a complex norm used to convert complex valued data into purely real data. + * The n_fields parameter in a LINCOM specification is now optional. + * A new encoding scheme which supports LZMA compressed data using the .xz container format has been added. + * Look-up tables may contain a complex y-value. This prohibits writing to the associated LINTERP field. @@ -377,37 +451,51 @@ * The field parameters spf (RAW), bitnum and numbits (BIT and SBIT) are now restricted to 16-bit numbers, which should be more than enough. The public API uses gd_spf_t and gd_bit_t for these quantities. + * The shift field parameter is now a 64-bit integer type, called gd_shift_t. + * The dirfile flags, including encoding and endianness symbols are now explicitly long ints. Previously these quantities mixed long int with int arbitrarily. This affects the public API. + * The parser callback has received a new, API breaking signature, which should hopefully reduce the amount of API breakage in the future. It is also now possible for the caller to pass data through GetData to the callback, if desired. + * Computation of derived fields can now handle complex valued inputs, and computation will occur in the complex plane when required. + * The computation of LINCOM fields has been re-written and is now ~20% faster for LINCOMs with 2 or 3 input fields. (No change for LINCOMs of 1 field.) + * A new open flag, GD_PRETTY_PRINT, tells the library to attempt to write a nicer looking format file. What this specifically means, isn't part of the public API and shouldn't be relied on in portable code. + * BUG FIX: dirfile_madd_spec() and dirfile_add_spec() didn't properly flag the fragments they modified as dirty, leading to possible loss of metadata. + * BUG FIX: calling get_nframes on a bzip2 encoded dirfile would report the wrong dirfile length. + * BUG FIX: LINTERP tables are now closed after loading, resolving a file descriptor leak of great age (ie. pre-0.3.0). + * BUG FIX: When re-writing a format file fragment containing fields with CONST scalar field parameters, GetData no longer replaces the CONST field codes in the field specification lines with the value of the CONST field. + * BUG FIX: when moving a field with dirfile_move(), the fragment index in the entry objects of metafields defined for the field were not updated. (The metafields were placed in the correct fragment when the metadata was flushed to disk, despite this.) + * BUG FIX: Calling getdata() or putdata() on 64-bit architectures in certain situations involving a non-zero frameoffset no longer results in bizarrity. + * BUG FIX: A memory leak associated with RAW field metadata has been fixed. + * BUG FIX: 64-bit integer literals in the format file are no longer truncated to double precision when read. @@ -416,39 +504,52 @@ * This release breaks ABI compatibility and, to a lesser extent, API compatibility. The SOVERSION of the library has been incremented accordingly. + * A C-89 API will be declared by getdata.h if GETDATA_C89_API is defined before inclusion. If this symbol is not defined, the C API defined will include C-99 conforming complex types, and getdata.h will include complex.h if `complex' has not been defined before inclusion. + * Due to the new, simple way of specifying META fields in Standards Version 7, dirfile_add_spec() and dirfile_alter_spec() can be used to modify metafields. dirfile_madd_spec() and dirfile_malter_spec() remain as well. + * An array containing the CONST scalar field codes used when non-literal parameters are used in the specification of various different fields has been added to the gd_entry_t object. As a side-effect of this, dirfile_add(), dirfile_alter_entry(), and dirfile_madd() can be used to manipulate non-literal field parameters. + * A function, get_native_type(), now exists which returns the underlying data type of a specified field code. + * A function, get_framenum(), is now available to perform a "reverse look-up" on a field: given a data value, it reports the frame number where the field has that value. The field must be monotonic. + * A function, dirfile_validate(), now exists which can be used to check the validity of a field code before use. + * Two new error codes have been added: GD_E_DOMAIN, potentially returned by get_framenum(), and GD_E_BAD_REPR, indicating an unrecognised representation suffix, or an attempt to write to a representation. + * A new syntax error suberror code has been added: GD_E_FORMAT_LITERAL, which indicates a syntax error in a complex literal number. + * BUG FIX: On success, dirfilename(), dirfile_reference(), and get_reference() didn't change the error code to GD_E_OK, resulting in spurious error codes from these functions. + * BUG FIX: dirfile_madd_string() and dirfile_madd_const() now don't fail erroneously by reporting GD_E_BAD_CODE. + * BUG FIX: error strings relating to GD_E_DELETE error codes now report the proper error information. + * BUG FIX: the list returned by get_mstrings() is now properly NULL terminated. + * BUG FIX: the entry->table member now reports the proper path to the LUT. (That is, the path stored in the format file.) Previously it incorrectly reported a path relative to the base dirfile directory. @@ -463,45 +564,67 @@ * Bindings for Python and the Interactive Data Language (IDL) have been added. + * Bindings for the functionality introduced into 0.6.0 have been added. + * C++: The missing bindings for dirfilename(), get_nvectors(), and get_fragment_index() have been added. + * C++: Empty entry class constructors have been added which allow delayed specification of field metadata. + * C++: The dirfile.h header now includes all other C++ headers, and is now the only header required to be included in applications. (The other headers can still be included, with no ill effects.) + * All bindings have a much expanded test suite, which has resulted in the discovery of many bugs (subsequently fixed). + * F77: The callback function is now dirfile-specific, as it is in the C API. + * C++ BUG FIX: Entry class constructors now properly set the field name for metafields. + * C++ BUG FIX: Fragment::SetEncoding() now actually does what it advertises, instead of doing nothing. + * C++ BUG FIX: The recode argument to various functions is now optional and defaults to zero, as the documentation already indicated. + * C++ BUG FIX: dirfile_close() was not being called by the Dirifle destructor. + * F77 BUG FIX: a NULL C string returned from the C API now returns an empty string, rather than causing a segfault. + * F77 BUG FIX: attempting to call another F77 function before calling GDCOPN or GDOPEN no longer results in a segfault. + * F77 BUG FIX: passing an out-of-range dirfile unit no longer results in undefined behaviour. + * F77 BUG FIX: the last character of a string returned by the bindings is no longer deleted. + * F77 BUG FIX: string lengths now report the correct length. + * F77 BUG FIX: passing dirfile unit 0 to GDCLOS or GDDSCD no longer corrupts the bindings. + * F77 BUG FIX: GDFLDN no longer accepts indices less than one. + * F77 BUG FIX: GDESTR now space pads its output string, rather than filling the remainder of the string with garbage. + * F77 BUG FIX: The get_entry() bindings, GDGExx no longer segfault on dirfile error. + * F77 BUG FIX: GDGTST and GDPTST now report the FORTRAN string length, which is one less than the C API would report, due to the lack of a terminating null. + * F95 BUG FIX: Attempting to retrieve a PHASE entry with fget_entry() now works. + * F95 BUG FIX: Several routines which were named fdrifile_<foo> are now properly spelled. @@ -528,12 +651,16 @@ be built into stand-alone library modules which will be loaded, as needed, at runtime. GetData will fail gracefully if modules are missing. See the README for full details. + * BUG FIX: Writing metadata to disc now preserves the permissions of the format file fragments which are changed. + * BUG FIX: Format files without a line feed character at the end of the file no longer cause the parser to segfault. + * BUG FIX: putdata() now reports the correct number of samples written for ASCII encoded files. + * BUG FIX: GetData no longer inserts unnecessary "/./" elements into the paths it reports. @@ -546,10 +673,14 @@ to either correct the syntax error, or else tell GetData whether to ignore the line or not. The callback function may be later modified by calling dirfile_parser_callback. + * A fragment may be removed from a dirfile by calling dirfile_uninclude. + * The pathname of the dirfile may be retrieved by calling dirfilename. + * The reference field for the dirfile may be set or retrieved by calling dirfile_reference. + * Fragment metadata may be queried or modified by calling: - get_encoding, dirfile_alter_encoding @@ -564,13 +695,19 @@ dirfile_malter_spec * A field may be moved to a different format file fragment using dirfile_move. + * A field may be renamed by using dirfile_rename. + * A field may be removed from the dirfile by calling dirfile_delete. + * The type or fragment index of a field may be retrieved by calling get_entry_type or get_fragment_index, respectively. + * The pathname of a raw field may be obtained from a call to get_raw_filename. + * A DIRFILE may be deallocated without saving modified metadata by calling dirfile_discard. + * A new flag, GD_IGNORE_DUPS, may be passed to dirfile_open to tell the parser to ignore duplicate field specifications in the format files. This is really only useful identically duplicate specifications, since there is @@ -581,8 +718,10 @@ * All functions in the Fortran 77 bindings have been completely renamed from GDFxxx to GDxxxx to provide a larger namespace for our use. + * Fortran 77, Fortran 95, and C++ bindings have been updated for the latest API changes. + * BUG FIX: Fortran 77 functions which return character strings no longer corrupt memory as a side-effect of operation. This also affected the Fortran 95 bindings. @@ -601,8 +740,10 @@ * BUG FIX: The default protection level of format file fragments is now properly set to "none". Reported by Brendan Crill. + * BUG FIX: getdata() now reports the correct number of samples read for slim and ASCII encoded files. Reported by Adam Hincks. + * BUG FIX: A segmentation fault only encountered when reading slim encoded data has been fixed in dirfile_flush(). @@ -626,14 +767,17 @@ * BUG FIX: Adding an ASCII encoded RAW field no longer creates an empty, unencoded binary file. + * BUG FIX: A few minor memory leaks have been patched. Most of these were the result of insufficient clean up in dirfile_close(). + * As an exception to the Standards, the full stop character '.' is once again permitted in field names. This is required by BLAST. Instead, field names are prohibited from ending with the known encoding extensions. The Standards still prohibit the full stop character in field names, and the GD_PEDANTIC flag will disable this exception. Furthermore, fields may not be added via GetData which contain a full stop character. + * Some minor speed improvements have been made to the format file parser resulting in a ~30% decrease in parsing time. @@ -646,15 +790,19 @@ * GetData now supports Dirfile Standards Version 6. Standards Version 6 adds numerical (CONST) and string (STRING) scalar fields to the dirfile, as well as other features outlined below. + * CONST names can now appear as parameters in field specifications in certain places in lieu of a literal number. + * The tokeniser has been re-written. Any sequence of non-NUL bytes can now form a valid token. Field codes may not have ASCII control characters or the "reserved characters" &, /, ;, <, >, |, . but may contain any other characters (including whitespace). + * Subordinate fields may now be attached to fields. These subfields are defined with the META directive, and referenced in most cases as "<parent-field>/<subfield>". + * Binary files in dirfiles may now be "encoded". In addition to raw (unencoded) files, two encodings are currently supported: @@ -663,16 +811,20 @@ Encoding schemes are fragment-local, although they are inherited from parent fragments. + * Endianness is now also fragment-local, meaning different endiannesses can co-exist in the same dirfile (so long as the fields are defined in different format file fragments), and GetData will do the Right Thing. + * "FILEFRAM" is no-longer supported as an alias for "INDEX". This affects GetData's implementation of all Standards Versions. Code that made use of FILEFRAM will have to be updated to use INDEX instead. + * The reference field, previously the first RAW field in the format file, may now be specified using the REFERENCE directive. The reference field is the field that is looked at when get_nframes() is called. This is important to programs like kst which support streaming dirfiles. + * Portions (or all) of a dirfile's data and metadata can be protected from change by specifying the PROTECT directive. This protection is "advisory", ie. while GetData will respect it in all cases, don't count on the PROTECT @@ -682,12 +834,15 @@ * INDEX is now a normal field. It appears in the count/list functions. Attempts to write to INDEX will fail. + * The GD_E_EMPTY error code has been removed: it is no longer an error to query a dirfile containing no RAW fields. + * The presence of two fields in the dirfile with the same name is now detected, and will cause a syntax error when parsing the format file. Previously, such things were allowed, but only one of the synonym fields could ever be queried. (Which field was returned was arbitrary.) + * Field code look-ups for input fields are now cached, which should result in slightly better performance from the library. @@ -701,28 +856,36 @@ * Whole other format file fragments may also be added to the dirfile by calling dirfile_include(). + * A function is now present (dirfile_metaflush()) to flush metadata changes to disk (by re-writing format file fragments). dirfile_flush() and dirfile_close() will also flush metadata, if needed. + * STRING and CONST values can be retrieved/set by calling (get,put)_string() and (get,put)_constant(). (get,put)data() are only for vector type fields. + * META fields can be queried/set like normal fields using the get/put functions and their full (slashed) field code. + * In addition to get_nfields() and get_field_list(), there are now corresponding functions that provide lists/counts of vectors (get_vector_list()/get_nvectors()), particular field types (get_field_list_by_type()/get_nfields_by_type()), as well as functions that provide lists of string values (get_string_values()) and constant values (get_const_values()). + * Analogous functions for the add, list, and counting functions exist for META fields, as well. + * Extra flags have been added to dirfile_open() to permit indicating the encoding type, if not specified in the dirfile itself. + * DIRFILE struct members and gd_entry_t private members are now completely hidden from the public interface. Where previously callers could query dirfile->error to check for an error, they must now call get_error(dirfile). This change was made to reduce unintentional ABI breakage when modifying internal library properties. + * GD_VERBOSE has been added to the list of available dirfile_open() flags. If this flag is specified, GetData will write errors to stderr as encountered. @@ -732,6 +895,7 @@ * Error codes which cannot be returned by the legacy API might not have a corresponding string in GD_ERROR_CODES[]. Instead, these entries will simply be the NULL pointer. + * No facilities exist in the legacy API to set or query CONST or STRING fields. However, META fields of vector type can be queried/set using GetData() and PutData(), as in the new API. @@ -764,10 +928,12 @@ * GetData now supports Dirfile Standards Version 5 which includes support for signed 8-bit, and signed and unsigned 64-bit integer types. + * As part of Standards Version 5, the restriction on field name length has been removed. (The filesystem will impose an effective limit on RAW fields of a few hundred characters, and format file lines are limited to several thousand, limiting derived field names.) + * The library can now convert between big and little endiannesses. An optional directive, ENDIAN, added in Standards Version 5, is available to specify the byte-sex of a dirfile. @@ -778,8 +944,11 @@ support in the old interface. The old interface (referred to as the "legacy API") is still supported, but doesn't fully implement Dirfile Standards Version 5. See the README for full details. + * putdata now respects FRAMEOFFSET. + * putdata can now write to PHASE fields, and multi-bit BIT fields. + * Some error codes have been renamed, and others removed or added, in order to regularise error codes between getdata and putdata in the sundry versions. Furthermore, the underlying values of some of these codes have changed @@ -805,7 +974,9 @@ Legacy API Changes * The legacy API has been marked deprecated. + * Error codes have changed per the description above. + * Only the public members of FormatType are now initialised by GetFormat. Bindings Modified: trunk/getdata/bindings/Makefile.am =================================================================== --- trunk/getdata/bindings/Makefile.am 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/Makefile.am 2012-04-04 01:52:57 UTC (rev 694) @@ -45,7 +45,7 @@ noinst_PROGRAMS=make_parameters make_parameters_SOURCES = make_parameters.c -nodist_make_parameters_SOURCES = ../src/getdata.h +nodist_make_parameters_SOURCES = ../src/getdata.h ../src/gd_config.h SUBDIRS = . ${F77_SUBDIR} ${CXX_SUBDIR} ${PY_SUBDIR} ${IDL_SUBDIR} \ ${PERL_SUBDIR} Modified: trunk/getdata/bindings/cxx/bitentry.cpp =================================================================== --- trunk/getdata/bindings/cxx/bitentry.cpp 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/bitentry.cpp 2012-04-04 01:52:57 UTC (rev 694) @@ -21,7 +21,7 @@ #include "internal.h" BitEntry::BitEntry(const char* field_code, const char* in_field, - gd_bit_t bitnum, gd_bit_t numbits, int fragment_index) : Entry() + int bitnum, int numbits, int fragment_index) : Entry() { E.field = strdup(field_code); E.field_type = GD_BIT_ENTRY; @@ -47,7 +47,7 @@ return 0; } -int BitEntry::SetFirstBit(gd_bit_t first_bit) +int BitEntry::SetFirstBit(int first_bit) { E.u.bit.bitnum = first_bit; @@ -57,7 +57,7 @@ return 0; } -int BitEntry::SetNumBits(gd_bit_t num_bits) +int BitEntry::SetNumBits(int num_bits) { E.u.bit.numbits = num_bits; Modified: trunk/getdata/bindings/cxx/dirfile.cpp =================================================================== --- trunk/getdata/bindings/cxx/dirfile.cpp 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/dirfile.cpp 2012-04-04 01:52:57 UTC (rev 694) @@ -521,9 +521,9 @@ return gd_unhide(D, field_code); } -char *Dirfile::Tokenise(const char *string) +char *Dirfile::StrTok(const char *string) { - return gd_tokenise(D, string); + return gd_strtok(D, string); } int Dirfile::DeSync(unsigned int flags) @@ -545,7 +545,24 @@ return gd_flags(D, set, reset); } -void Dirfile::VerbosePrefix(const char *prefix) const +int Dirfile::VerbosePrefix(const char *prefix) const { - gd_verbose_prefix(D, prefix); + return gd_verbose_prefix(D, prefix); } + +int Dirfile::MplexLookback(int lookback) const +{ + return gd_mplex_lookback(D, lookback); +} + +unsigned int Dirfile::NEntries(const char *parent, unsigned int type, + unsigned int flags) const +{ + return gd_nentries(D, parent, type, flags); +} + +const char** Dirfile::EntryList(const char *parent, unsigned int type, + unsigned int flags) const +{ + return gd_entry_list(D, parent, type, flags); +} Modified: trunk/getdata/bindings/cxx/getdata/bitentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/bitentry.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/bitentry.h 2012-04-04 01:52:57 UTC (rev 694) @@ -34,19 +34,19 @@ public: BitEntry() : Entry() { E.field_type = GD_BIT_ENTRY; }; - BitEntry(const char* field_code, const char* in_field, gd_bit_t bitnum, - gd_bit_t numbits = 1, int fragment_index = 0); + BitEntry(const char* field_code, const char* in_field, int bitnum, + int numbits = 1, int fragment_index = 0); virtual const char *Input() const { return E.in_fields[0]; }; - virtual gd_bit_t FirstBit() const { return E.u.bit.bitnum; }; + virtual int FirstBit() const { return E.u.bit.bitnum; }; - virtual gd_bit_t NumBits() const { return E.u.bit.numbits; }; + virtual int NumBits() const { return E.u.bit.numbits; }; int SetInput(const char* field); - int SetFirstBit(gd_bit_t first_bit); + int SetFirstBit(int first_bit); int SetFirstBit(const char* first_bit); - int SetNumBits(gd_bit_t num_bits); + int SetNumBits(int num_bits); int SetNumBits(const char* num_bits); virtual const char *Scalar(int index = 0) const; Modified: trunk/getdata/bindings/cxx/getdata/dirfile.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/dirfile.h 2012-04-04 01:52:57 UTC (rev 694) @@ -122,6 +122,9 @@ GetData::Entry* Entry(const char *field_code) const; + const char **EntryList(const char *parent = NULL, unsigned int type = 0, + unsigned int flags = 0) const; + off_t EoF(const char *field_code) const; int Error() const; @@ -191,6 +194,8 @@ const char **MFieldListByType(const char *parent, EntryType type) const; + int MplexLookback(int lookback) const; + const char **MStrings(const char *parent) const; int MoveAlias(const char* field_code, int new_fragment) const; @@ -199,6 +204,9 @@ int NAliases(const char* field_code) const; + unsigned int NEntries(const char *parent = NULL, unsigned int type = 0, + unsigned int flags = 0) const; + unsigned int NFields() const; unsigned int NFieldsByType(EntryType type) const; @@ -253,7 +261,7 @@ off_t Tell(const char* field_code) const; - char *Tokenise(const char *string = NULL); + char *StrTok(const char *string = NULL); int UnHide(const char* field_code) const; @@ -261,7 +269,7 @@ int Validate(const char* field_code) const; - void VerbosePrefix(const char *prefix = NULL) const; + int VerbosePrefix(const char *prefix = NULL) const; const char **VectorList() const; Modified: trunk/getdata/bindings/cxx/getdata/entry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/entry.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/entry.h 2012-04-04 01:52:57 UTC (rev 694) @@ -123,7 +123,7 @@ virtual int ScalarIndex(int index = 0) const; /* RAW methods */ - virtual gd_spf_t SamplesPerFrame() const { + virtual unsigned int SamplesPerFrame() const { return (E.field_type == GD_RAW_ENTRY) ? E.u.raw.spf : 0; }; @@ -169,11 +169,11 @@ }; /* (S)BIT methods */ - virtual gd_bit_t FirstBit() const { + virtual int FirstBit() const { return (E.field_type == GD_BIT_ENTRY) ? E.u.bit.bitnum : -1; }; - virtual gd_bit_t NumBits() const { + virtual int NumBits() const { return (E.field_type == GD_BIT_ENTRY) ? E.u.bit.numbits : -1; }; @@ -234,11 +234,11 @@ } /* MPLEX methods */ - virtual gd_count_t CountVal() const { + virtual int CountVal() const { return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.count_val : 0; } - virtual gd_count_t CountMax() const { + virtual int CountMax() const { return (E.field_type == GD_MPLEX_ENTRY) ? E.u.mplex.count_max : 0; } Modified: trunk/getdata/bindings/cxx/getdata/mplexentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/mplexentry.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/mplexentry.h 2012-04-04 01:52:57 UTC (rev 694) @@ -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, gd_count_t count_val, gd_count_t count_max, + const char *check_Field, int count_val, int count_max, int fragment_index = 0); virtual const char *Input(int index = 0) const { @@ -46,14 +46,14 @@ virtual int ScalarIndex() const { return E.scalar_ind[0]; }; - virtual gd_count_t CountVal() const { return E.u.mplex.count_val; }; + virtual int CountVal() const { return E.u.mplex.count_val; }; - virtual gd_count_t CountMax() const { return E.u.mplex.count_max; }; + virtual int CountMax() const { return E.u.mplex.count_max; }; int SetInput(const char* field, int index); - virtual int SetCountVal(gd_count_t count_val); + virtual int SetCountVal(int count_val); virtual int SetCountVal(const char* threshold); - virtual int SetCountMax(gd_count_t count_max); + virtual int SetCountMax(int count_max); virtual int SetCountMax(const char* threshold); private: Modified: trunk/getdata/bindings/cxx/getdata/rawentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/rawentry.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/rawentry.h 2012-04-04 01:52:57 UTC (rev 694) @@ -37,17 +37,17 @@ filename = NULL; }; - RawEntry(const char* field_code, DataType data_type, gd_spf_t spf, + RawEntry(const char* field_code, DataType data_type, unsigned int spf, int fragment_index = 0); virtual ~RawEntry(); - virtual gd_spf_t SamplesPerFrame() const { return E.u.raw.spf; }; + virtual unsigned int SamplesPerFrame() const { return E.u.raw.spf; }; virtual DataType RawType() const { return (DataType)E.u.raw.data_type; }; const char* FileName(); - int SetSamplesPerFrame(gd_spf_t spf, int recode = 0); + int SetSamplesPerFrame(unsigned int spf, int recode = 0); int SetSamplesPerFrame(const char *spf, int recode = 0); int SetType(DataType type, int recode = 0); Modified: trunk/getdata/bindings/cxx/getdata/sbitentry.h =================================================================== --- trunk/getdata/bindings/cxx/getdata/sbitentry.h 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/getdata/sbitentry.h 2012-04-04 01:52:57 UTC (rev 694) @@ -34,19 +34,19 @@ public: SBitEntry() : Entry() { E.field_type = GD_SBIT_ENTRY; }; - SBitEntry(const char* field_code, const char* in_field, gd_bit_t bitnum, - gd_bit_t numbits = 1, int fragment_index = 0); + SBitEntry(const char* field_code, const char* in_field, int bitnum, + int numbits = 1, int fragment_index = 0); virtual const char *Input() const { return E.in_fields[0]; }; - virtual gd_bit_t FirstBit() const { return E.u.bit.bitnum; }; + virtual int FirstBit() const { return E.u.bit.bitnum; }; - virtual gd_bit_t NumBits() const { return E.u.bit.numbits; }; + virtual int NumBits() const { return E.u.bit.numbits; }; int SetInput(const char* field); - int SetFirstBit(gd_bit_t first_bit); + int SetFirstBit(int first_bit); int SetFirstBit(const char* first_bit); - int SetNumBits(gd_bit_t num_bits); + int SetNumBits(int num_bits); int SetNumBits(const char* num_bits); virtual const char *Scalar(int index = 0) const; Modified: trunk/getdata/bindings/cxx/mplexentry.cpp =================================================================== --- trunk/getdata/bindings/cxx/mplexentry.cpp 2012-03-30 06:09:55 UTC (rev 693) +++ trunk/getdata/bindings/cxx/mplexentry.cpp 2012-04-04 01:52:57 UTC (rev 694) @@ -21,7 +21,7 @@ #include "internal.h" MplexEntry::MplexEntry(const char* field_code, const char* in_field, - const ... [truncated message content] |
From: <ket...@us...> - 2012-03-30 06:10:02
|
Revision: 693 http://getdata.svn.sourceforge.net/getdata/?rev=693&view=rev Author: ketiltrout Date: 2012-03-30 06:09:55 +0000 (Fri, 30 Mar 2012) Log Message: ----------- Pass -fno_backslash to f77. Modified Paths: -------------- trunk/getdata/bindings/f77/test/Makefile.am trunk/getdata/configure.ac trunk/getdata/m4/compiler.m4 Modified: trunk/getdata/bindings/f77/test/Makefile.am =================================================================== --- trunk/getdata/bindings/f77/test/Makefile.am 2012-03-30 06:01:48 UTC (rev 692) +++ trunk/getdata/bindings/f77/test/Makefile.am 2012-03-30 06:09:55 UTC (rev 693) @@ -28,6 +28,10 @@ F77_WALL=-Wall endif +if F77_FNO_BACKSLASH +F77_FNO_BACKSLASH=-fno-backslash +endif + if INTEL_F77_COMPILER F77_ASSUME=-assume byterecl endif @@ -42,7 +46,7 @@ BUILT_SOUCES = test_getdata.f -FFLAGS += -I. -I.. $(F77_WALL) $(F77_WEXTRA) $(F77_ASSUME) +FFLAGS += -I. -I.. $(F77_WALL) $(F77_WEXTRA) $(F77_ASSUME) $(F77_FNO_BACKSLASH) FCFLAGS += -I. -I.. $(F77_WALL) $(FC_WEXTRA) $(FC_ASSUME) F95LDADD=../libf95getdata.la $(F77LDADD) F77LDADD=../libfgetdata.la Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-03-30 06:01:48 UTC (rev 692) +++ trunk/getdata/configure.ac 2012-03-30 06:09:55 UTC (rev 693) @@ -483,6 +483,7 @@ if test "x$make_f77bindings" != "xno"; then GD_PROG_F77_WALL GD_PROG_F77_WEXTRA + GD_PROG_F77_FNO_BACKSLASH GD_LANG_F77_COMPILER_INTEL fi @@ -986,6 +987,8 @@ AM_CONDITIONAL(CC_WEXTRA, [test "x$gd_cv_prog_cc_wextra" == "xyes"]) AM_CONDITIONAL(CXX_WEXTRA, [test "x$gd_cv_prog_cxx_wextra" == "xyes"]) AM_CONDITIONAL(F77_WEXTRA, [test "x$gd_cv_prog_f77_wextra" == "xyes"]) +AM_CONDITIONAL(F77_FNO_BACKSLASH, + [test "x$gd_cv_prog_f77_fno_backslash" == "xyes"]) AM_CONDITIONAL(FC_WEXTRA, [test "x$gd_cv_prog_fc_wextra" == "xyes"]) AM_CONDITIONAL(INTEL_F77_COMPILER, [test "x$gd_cv_f77_compiler_intel" == "xyes"]) Modified: trunk/getdata/m4/compiler.m4 =================================================================== --- trunk/getdata/m4/compiler.m4 2012-03-30 06:01:48 UTC (rev 692) +++ trunk/getdata/m4/compiler.m4 2012-03-30 06:09:55 UTC (rev 693) @@ -101,6 +101,20 @@ FFLAGS=$gd_saved_FFLAGS]) +dnl GD_PROG_F77_FNO_BACKSLASH +dnl ------------------------------------------------------------- +dnl Check whether the Fotran-77 compiler accepts -fno-backslash +AC_DEFUN([GD_PROG_F77_FNO_BACKSLASH], +[gd_saved_FFLAGS=$FFLAGS +AC_CACHE_CHECK([whether $F77 accepts -fno-backslash], +gd_cv_prog_f77_fno_backslash, [FFLAGS="-fno-backslash" +AC_LANG_PUSH([Fortran 77]) +AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [gd_cv_prog_f77_fno_backslash=yes], +[gd_cv_prog_f77_fno_backslash=no]) +AC_LANG_POP([Fortran 77])]) +FFLAGS=$gd_saved_FFLAGS]) + + dnl GD_PROG_FC_WEXTRA dnl ------------------------------------------------------------- dnl Check whether the free-form Fotran compiler accepts -Wextra This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-30 06:01:54
|
Revision: 692 http://getdata.svn.sourceforge.net/getdata/?rev=692&view=rev Author: ketiltrout Date: 2012-03-30 06:01:48 +0000 (Fri, 30 Mar 2012) Log Message: ----------- MSYS fixes. Modified Paths: -------------- trunk/getdata/src/open.c trunk/getdata/test/test.h Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2012-03-28 23:06:41 UTC (rev 691) +++ trunk/getdata/src/open.c 2012-03-30 06:01:48 UTC (rev 692) @@ -117,7 +117,9 @@ case S_IFBLK: case S_IFIFO: case S_IFCHR: +#ifdef S_IFLNK case S_IFLNK: +#endif if (root && strcmp(lamb->d_name, "format") == 0) { /* don't delete the format file; we'll truncate it later */ format_trunc = 1; Modified: trunk/getdata/test/test.h =================================================================== --- trunk/getdata/test/test.h 2012-03-28 23:06:41 UTC (rev 691) +++ trunk/getdata/test/test.h 2012-03-30 06:01:48 UTC (rev 692) @@ -37,6 +37,12 @@ #define rmdirfile() chmod("dirfile", 0755); system("rm -rf dirfile"); #endif +/* sleep for WIN32/64 */ +#if defined _WIN32 || defined _WIN64 +#include <windows.h> +#define sleep(x) Sleep(1000 * (x)) +#endif + /* path munging for WIN32/64 */ #if defined _WIN32 || defined _WIN64 #define gd_pathwrite(x,y) do { \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-28 23:06:48
|
Revision: 691 http://getdata.svn.sourceforge.net/getdata/?rev=691&view=rev Author: ketiltrout Date: 2012-03-28 23:06:41 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Since we're not planning to deal with ReadData files anymore, make our specification of MPLEX conform to the other fields in the Standards. Will require some finagling by anyone who writes a CalSpecs plugin for defile. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/cxx/test/big_test.cpp trunk/getdata/bindings/f77/test/big_test.f trunk/getdata/bindings/f77/test/big_test95.f90 trunk/getdata/bindings/idl/test/big_test.pro trunk/getdata/bindings/perl/test/big_test.t trunk/getdata/bindings/python/test/big_test.py trunk/getdata/src/flush.c trunk/getdata/src/parse.c trunk/getdata/test/alter_mplex.c trunk/getdata/test/entry_mplex.c trunk/getdata/test/entry_mplex_scalar.c trunk/getdata/test/get_mplex.c trunk/getdata/test/get_mplex_lb.c trunk/getdata/test/put_mplex.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/ChangeLog 2012-03-28 23:06:41 UTC (rev 691) @@ -1,3 +1,14 @@ +2012-03-28 D. V. Wiebe <ge...@ke...> svn:691 + * src/flush.c (_GD_FieldSpec) src/parse.c (_GD_ParseMplex): Swap order of + fields in MPLEX specification. + + * bindings/python/test/big_test.py bindings/cxx/test/big_test.cpp + bindings/perl/test/big_test.t bindings/f77/test/big_test.f + bindings/f77/test/big_test95.f90 bindings/idl/test/big_test.pro + test/entry_mplex_scalar.c test/get_mplex.c test/alter_mplex.c + test/put_mplex.c test/get_mplex_lb.ctest/entry_mplex.c: Update for + Standards change. + 2012-03-28 D. V. Wiebe <ge...@ke...> svn:690 * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Fix test program. * bindings/idl/getdata.c (gdidl_alter_mplex): Fix uninitialised variable. Modified: trunk/getdata/bindings/cxx/test/big_test.cpp =================================================================== --- trunk/getdata/bindings/cxx/test/big_test.cpp 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/cxx/test/big_test.cpp 2012-03-28 23:06:41 UTC (rev 691) @@ -141,7 +141,7 @@ "polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const\n" "bit BIT data 3 4\n" "sbit SBIT data 5 6\n" - "mplex MPLEX sbit data 1 10\n" + "mplex MPLEX data sbit 1 10\n" "mult MULTIPLY data sbit\n" "div DIVIDE mult bit\n" "recip RECIP div 6.5;4.3\n" Modified: trunk/getdata/bindings/f77/test/big_test.f =================================================================== --- trunk/getdata/bindings/f77/test/big_test.f 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/f77/test/big_test.f 2012-03-28 23:06:41 UTC (rev 691) @@ -250,7 +250,7 @@ + const const' WRITE(1, *) 'bit BIT data 3 4' WRITE(1, *) 'sbit SBIT data 5 6' - WRITE(1, *) 'mplex MPLEX sbit data 1 10' + WRITE(1, *) 'mplex MPLEX data sbit 1 10' WRITE(1, *) 'mult MULTIPLY data sbit' WRITE(1, *) 'phase PHASE data 11' WRITE(1, *) 'div DIVIDE mult bit' Modified: trunk/getdata/bindings/f77/test/big_test95.f90 =================================================================== --- trunk/getdata/bindings/f77/test/big_test95.f90 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/f77/test/big_test95.f90 2012-03-28 23:06:41 UTC (rev 691) @@ -249,7 +249,7 @@ write(1, *) 'polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const' write(1, *) 'bit BIT data 3 4' write(1, *) 'sbit SBIT data 5 6' - write(1, *) 'mplex MPLEX sbit data 1 10' + write(1, *) 'mplex MPLEX data sbit 1 10' write(1, *) 'mult MULTIPLY data sbit' write(1, *) 'phase PHASE data 11' write(1, *) 'div DIVIDE mult bit' Modified: trunk/getdata/bindings/idl/test/big_test.pro =================================================================== --- trunk/getdata/bindings/idl/test/big_test.pro 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/idl/test/big_test.pro 2012-03-28 23:06:41 UTC (rev 691) @@ -61,7 +61,7 @@ printf,1,'polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const' printf,1,'bit BIT data 3 4' printf,1,'sbit SBIT data 5 6' -printf,1,'mplex MPLEX sbit data 1 10' +printf,1,'mplex MPLEX data sbit 1 10' printf,1,'mult MULTIPLY data sbit' printf,1,'div DIVIDE mult bit' printf,1,'recip RECIP div 6.5;4.3' Modified: trunk/getdata/bindings/perl/test/big_test.t =================================================================== --- trunk/getdata/bindings/perl/test/big_test.t 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/perl/test/big_test.t 2012-03-28 23:06:41 UTC (rev 691) @@ -167,7 +167,7 @@ polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const bit BIT data 3 4 sbit SBIT data 5 6 -mplex MPLEX sbit data 1 10 +mplex MPLEX data sbit 1 10 mult MULTIPLY data sbit div DIVIDE mult bit recip RECIP div 6.5;4.3 Modified: trunk/getdata/bindings/python/test/big_test.py =================================================================== --- trunk/getdata/bindings/python/test/big_test.py 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/bindings/python/test/big_test.py 2012-03-28 23:06:41 UTC (rev 691) @@ -108,7 +108,7 @@ "polynom POLYNOM data 1.1 2.2 2.2 3.3;4.4 const const\n" "bit BIT data 3 4\n" "sbit SBIT data 5 6\n" - "mplex MPLEX sbit data 1 10\n" + "mplex MPLEX data sbit 1 10\n" "mult MULTIPLY data sbit\n" "div DIVIDE mult bit\n" "recip RECIP div 6.5;4.3\n" Modified: trunk/getdata/src/flush.c =================================================================== --- trunk/getdata/src/flush.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/src/flush.c 2012-03-28 23:06:41 UTC (rev 691) @@ -497,11 +497,10 @@ break; case GD_MPLEX_ENTRY: fprintf(stream, " MPLEX%s ", pretty ? " " : ""); - /* NB: these are backwards! */ - _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); - fputc(' ', stream); _GD_StringEscapeise(stream, E->in_fields[0], 0, permissive, D->standards); fputc(' ', stream); + _GD_StringEscapeise(stream, E->in_fields[1], 0, permissive, D->standards); + fputc(' ', stream); _GD_WriteConst(D, stream, me, permissive, GD_INT64, &E->EN(mplex,count_val), E->scalar[0], E->scalar_ind[0], " "); _GD_WriteConst(D, stream, me, permissive, GD_INT64, Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/src/parse.c 2012-03-28 23:06:41 UTC (rev 691) @@ -765,9 +765,8 @@ return NULL; } - /* These are backwards! */ - E->in_fields[0] = _GD_Strdup(D, in_cols[3]); - E->in_fields[1] = _GD_Strdup(D, in_cols[2]); + E->in_fields[0] = _GD_Strdup(D, in_cols[2]); + E->in_fields[1] = _GD_Strdup(D, in_cols[3]); E->scalar[0] = _GD_SetScalar(D, in_cols[4], &E->EN(mplex,count_val), GD_UINT16, format_file, line, E->scalar_ind, NULL, standards, pedantic); Modified: trunk/getdata/test/alter_mplex.c =================================================================== --- trunk/getdata/test/alter_mplex.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/alter_mplex.c 2012-03-28 23:06:41 UTC (rev 691) @@ -29,7 +29,7 @@ const char *format_data = "count RAW UINT8 8\n" "data RAW UINT8 8\n" - "mplex MPLEX count data 1 3\n"; + "mplex MPLEX data count 1 3\n"; unsigned char data_data[256]; unsigned char c[8]; gd_triplet_t threshold; Modified: trunk/getdata/test/entry_mplex.c =================================================================== --- trunk/getdata/test/entry_mplex.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/entry_mplex.c 2012-03-28 23:06:41 UTC (rev 691) @@ -49,8 +49,8 @@ CHECKI(n, 0); CHECKS(E.field, "data"); CHECKX(E.field_type, GD_MPLEX_ENTRY); - CHECKS(E.in_fields[0], "in2"); - CHECKS(E.in_fields[1], "in1"); + CHECKS(E.in_fields[0], "in1"); + CHECKS(E.in_fields[1], "in2"); CHECKI(E.EN(mplex,count_val), 1); CHECKI(E.EN(mplex,count_max), 2); gd_free_entry_strings(&E); Modified: trunk/getdata/test/entry_mplex_scalar.c =================================================================== --- trunk/getdata/test/entry_mplex_scalar.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/entry_mplex_scalar.c 2012-03-28 23:06:41 UTC (rev 691) @@ -52,8 +52,8 @@ CHECKI(n, 0); CHECKS(E.field, "data"); CHECKX(E.field_type, GD_MPLEX_ENTRY); - CHECKS(E.in_fields[0], "in2"); - CHECKS(E.in_fields[1], "in1"); + CHECKS(E.in_fields[0], "in1"); + CHECKS(E.in_fields[1], "in2"); CHECKS(E.scalar[0], "a"); CHECKS(E.scalar[1], "b"); CHECKI(E.scalar_ind[0], -1); Modified: trunk/getdata/test/get_mplex.c =================================================================== --- trunk/getdata/test/get_mplex.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/get_mplex.c 2012-03-28 23:06:41 UTC (rev 691) @@ -27,7 +27,7 @@ const char *data = "dirfile/data"; const char *count = "dirfile/count"; const char *format_data = - "mplex MPLEX count data 1 3\n" + "mplex MPLEX data count 1 3\n" "count RAW UINT8 8\n" "data RAW UINT8 8\n"; unsigned char c[8]; Modified: trunk/getdata/test/get_mplex_lb.c =================================================================== --- trunk/getdata/test/get_mplex_lb.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/get_mplex_lb.c 2012-03-28 23:06:41 UTC (rev 691) @@ -27,7 +27,7 @@ const char *data = "dirfile/data"; const char *count = "dirfile/count"; const char *format_data = - "mplex MPLEX count data 2 3\n" + "mplex MPLEX data count 2 3\n" "count RAW UINT8 8\n" "data RAW UINT8 8\n"; unsigned char c[8]; Modified: trunk/getdata/test/put_mplex.c =================================================================== --- trunk/getdata/test/put_mplex.c 2012-03-28 22:55:10 UTC (rev 690) +++ trunk/getdata/test/put_mplex.c 2012-03-28 23:06:41 UTC (rev 691) @@ -27,7 +27,7 @@ const char *data = "dirfile/data"; const char *count = "dirfile/count"; const char *format_data = - "mplex MPLEX count data 1 3\n" + "mplex MPLEX data count 1 3\n" "count RAW UINT8 8\n" "data RAW UINT8 8\n"; unsigned char c[8], d[8]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-28 22:55:17
|
Revision: 690 http://getdata.svn.sourceforge.net/getdata/?rev=690&view=rev Author: ketiltrout Date: 2012-03-28 22:55:10 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Minor corrections. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/bindings/idl/getdata.c trunk/getdata/m4/compiler.m4 Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-03-28 22:38:38 UTC (rev 689) +++ trunk/getdata/ChangeLog 2012-03-28 22:55:10 UTC (rev 690) @@ -1,3 +1,7 @@ +2012-03-28 D. V. Wiebe <ge...@ke...> svn:690 + * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Fix test program. + * bindings/idl/getdata.c (gdidl_alter_mplex): Fix uninitialised variable. + 2012-03-28 D. V. Wiebe <ge...@ke...> svn:689 * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Added. * src/parse.c src/internal.h: Work around deficiencies in the GCC-3.4 C99 Modified: trunk/getdata/bindings/idl/getdata.c =================================================================== --- trunk/getdata/bindings/idl/getdata.c 2012-03-28 22:38:38 UTC (rev 689) +++ trunk/getdata/bindings/idl/getdata.c 2012-03-28 22:55:10 UTC (rev 690) @@ -5294,7 +5294,7 @@ } KW_RESULT; KW_RESULT kw; - kw.in_field1_x = kw.in_field2_x; + kw.in_field1_x = kw.in_field2_x = 0; kw.val = GD_COUNT_MAX; kw.max = 0; GDIDL_KW_INIT_ERROR; Modified: trunk/getdata/m4/compiler.m4 =================================================================== --- trunk/getdata/m4/compiler.m4 2012-03-28 22:38:38 UTC (rev 689) +++ trunk/getdata/m4/compiler.m4 2012-03-28 22:55:10 UTC (rev 690) @@ -258,10 +258,10 @@ AC_DEFUN([GD_C_RESTRICT_ARRAY],[ dnl do nothing if restrict hasn't been found if ! test "x$ac_cv_c_restrict" = "xno"; then -AC_CACHE_CHECK([whether restrict can be applied to pointer arrays], +AC_CACHE_CHECK([whether restrict can be applied to pointer array arguments], [gd_cv_c_restrict_array],[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ - int foo (int *restrict bar[3]) { return bar[2]; } + int *foo (int *restrict bar@<:@3@:>@) { return bar@<:@2@:>@; } ], [])], [gd_cv_c_restrict_array="yes"],[gd_cv_c_restrict_array="no"]) ]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-28 22:38:44
|
Revision: 689 http://getdata.svn.sourceforge.net/getdata/?rev=689&view=rev Author: ketiltrout Date: 2012-03-28 22:38:38 +0000 (Wed, 28 Mar 2012) Log Message: ----------- Word around GCC-3.4 C99 non-compliance. Modified Paths: -------------- trunk/getdata/ChangeLog trunk/getdata/configure.ac trunk/getdata/m4/compiler.m4 trunk/getdata/src/internal.h trunk/getdata/src/parse.c Modified: trunk/getdata/ChangeLog =================================================================== --- trunk/getdata/ChangeLog 2012-03-27 20:21:36 UTC (rev 688) +++ trunk/getdata/ChangeLog 2012-03-28 22:38:38 UTC (rev 689) @@ -1,3 +1,8 @@ +2012-03-28 D. V. Wiebe <ge...@ke...> svn:689 + * m4/compiler.m4 (GD_C_RESTRICT_ARRAY): Added. + * src/parse.c src/internal.h: Work around deficiencies in the GCC-3.4 C99 + compliance. + 2012-03-22 D. V. Wiebe <ge...@ke...> svn:683 * src/sie.c (_GD_SampIndWrite): Fix file size calculation during truncation. Modified: trunk/getdata/configure.ac =================================================================== --- trunk/getdata/configure.ac 2012-03-27 20:21:36 UTC (rev 688) +++ trunk/getdata/configure.ac 2012-03-28 22:38:38 UTC (rev 689) @@ -471,6 +471,7 @@ echo AC_C_INLINE AC_C_RESTRICT +GD_C_RESTRICT_ARRAY GD_PROG_CC_WALL GD_PROG_CC_WEXTRA @@ -517,9 +518,10 @@ fi dnl Declare a few feature test macros -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 ]) +AC_DEFINE([_GNU_SOURCE], [1], [ Expose GNU extensions ]) +AC_DEFINE([_BSD_SOURCE], [1], [ Expose BSD-derived definitions ]) +AC_DEFINE([_SVID_SOURCE], [1], [ Expose System V-derived definitions ]) +AC_DEFINE([_POSIX_SOURCE], [1], [ Expose POSIX.1-1990 conforming definitions ]) AC_DEFINE([_POSIX_C_SOURCE], [200809L], [ Expose POSIX:2008 conforming definitions ]) Modified: trunk/getdata/m4/compiler.m4 =================================================================== --- trunk/getdata/m4/compiler.m4 2012-03-27 20:21:36 UTC (rev 688) +++ trunk/getdata/m4/compiler.m4 2012-03-28 22:38:38 UTC (rev 689) @@ -251,3 +251,24 @@ [ Define to 1 if you have the type `$1' ]) fi ]) + +dnl GD_C_RESTRICT_ARRAY +dnl ----------------------------------------------------------- +dnl Check whether "<type> *restrict foo[]" is allowed. +AC_DEFUN([GD_C_RESTRICT_ARRAY],[ +dnl do nothing if restrict hasn't been found +if ! test "x$ac_cv_c_restrict" = "xno"; then +AC_CACHE_CHECK([whether restrict can be applied to pointer arrays], +[gd_cv_c_restrict_array],[ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM([ + int foo (int *restrict bar[3]) { return bar[2]; } +], [])], +[gd_cv_c_restrict_array="yes"],[gd_cv_c_restrict_array="no"]) +]) +fi + +if test "x$gd_cv_c_restrict_array" = "xyes"; then +AC_DEFINE([GD_RESTRICT_ARRAY_OK], [1], +[Define to 1 if restrict can used on pointer arrays]) +fi +]) Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-03-27 20:21:36 UTC (rev 688) +++ trunk/getdata/src/internal.h 2012-03-28 22:38:38 UTC (rev 689) @@ -168,6 +168,12 @@ #endif #endif +#ifdef GD_RESTRICT_ARRAY_OK +#define gd_restrict_arr restrict +#else +#define gd_restrict_arr +#endif + #ifndef PATH_MAX # ifdef _POSIX_PATH_MAX # define PATH_MAX _POSIX_PATH_MAX Modified: trunk/getdata/src/parse.c =================================================================== --- trunk/getdata/src/parse.c 2012-03-27 20:21:36 UTC (rev 688) +++ trunk/getdata/src/parse.c 2012-03-28 22:38:38 UTC (rev 689) @@ -251,7 +251,7 @@ /* _GD_ParseRaw: parse a RAW entry in the format file */ static gd_entry_t *_GD_ParseRaw(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -335,7 +335,7 @@ /* _GD_ParseLincom: parse a LINCOM entry in the format file. */ static gd_entry_t *_GD_ParseLincom(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -434,7 +434,7 @@ /* _GD_ParseLinterp: parse a LINTERP entry in the format file. */ static gd_entry_t *_GD_ParseLinterp(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -500,7 +500,7 @@ /* _GD_ParseMultiply: parse MULTIPLY entry in format file. */ static gd_entry_t *_GD_ParseMultiply(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -563,7 +563,7 @@ /* _GD_ParseRecip: parse RECIP entry in format file. */ static gd_entry_t *_GD_ParseRecip(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -631,7 +631,7 @@ /* _GD_ParseWindow: parse WINDOW entry in format file. */ static gd_entry_t *_GD_ParseWindow(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -720,7 +720,7 @@ /* _GD_ParseMplex: parse MPLEX entry in format file. */ static gd_entry_t *_GD_ParseMplex(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -795,7 +795,7 @@ /* _GD_ParseDivide: parse DIVIDE entry in format file. */ static gd_entry_t *_GD_ParseDivide(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -859,7 +859,7 @@ /* _GD_ParseBit: parse BIT entry in format file. */ static gd_entry_t *_GD_ParseBit(DIRFILE *restrict D, int is_signed, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -940,7 +940,7 @@ /* _GD_ParsePhase: parse PHASE entry in formats file. */ static gd_entry_t *_GD_ParsePhase(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -1008,7 +1008,7 @@ /* _GD_ParsePolynom: parse a POLYNOM in the format file. */ static gd_entry_t *_GD_ParsePolynom(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -1118,7 +1118,7 @@ /* _GD_ParseConst: parse CONST entry in formats file. */ static gd_entry_t *_GD_ParseConst(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { @@ -1336,7 +1336,7 @@ /* _GD_ParseString: parse STRING entry in formats file. */ static gd_entry_t *_GD_ParseString(DIRFILE *restrict D, - char *restrict in_cols[MAX_IN_COLS], int n_cols, + char *gd_restrict_arr in_cols[MAX_IN_COLS], int n_cols, const gd_entry_t *restrict parent, const char *restrict format_file, int line, int me, int standards, int pedantic, int *restrict is_dot) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-27 20:21:42
|
Revision: 688 http://getdata.svn.sourceforge.net/getdata/?rev=688&view=rev Author: ketiltrout Date: 2012-03-27 20:21:36 +0000 (Tue, 27 Mar 2012) Log Message: ----------- Add frameoffset to ticker totals. Modified Paths: -------------- trunk/defile/bin/cli.c Modified: trunk/defile/bin/cli.c =================================================================== --- trunk/defile/bin/cli.c 2012-03-27 03:36:17 UTC (rev 687) +++ trunk/defile/bin/cli.c 2012-03-27 20:21:36 UTC (rev 688) @@ -1096,10 +1096,11 @@ si = 'm'; } if (df->nframes > 0) - printf("R:[%llu of %llu] W:[%llu] %.*f %cHz %c", nr, df->nframes, nw, + printf("R:[%llu of %llu] W:[%llu] %.*f %cHz %c", nr + df->offset, + df->nframes, nw + df->offset, (drate >= 100) ? 1 : (drate >= 10) ? 2 : 3, drate, si, eol); else - printf("R:[%llu] W:[%llu] %.*f %cHz %c", nr, nw, + printf("R:[%llu] W:[%llu] %.*f %cHz %c", nr + df->offset, nw + df->offset, (drate >= 100) ? 1 : (drate >= 10) ? 2 : 3, drate, si, eol); fflush(stdout); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ket...@us...> - 2012-03-27 03:36:23
|
Revision: 687 http://getdata.svn.sourceforge.net/getdata/?rev=687&view=rev Author: ketiltrout Date: 2012-03-27 03:36:17 +0000 (Tue, 27 Mar 2012) Log Message: ----------- Delete -m<foo> from LDFLAGS. Modified Paths: -------------- trunk/getdata/m4/idl.m4 Modified: trunk/getdata/m4/idl.m4 =================================================================== --- trunk/getdata/m4/idl.m4 2012-03-24 13:43:33 UTC (rev 686) +++ trunk/getdata/m4/idl.m4 2012-03-27 03:36:17 UTC (rev 687) @@ -119,7 +119,7 @@ AC_SUBST([IDL_CFLAGS]) AC_SUBST([IDL_CFLAGS]) -IDL_LIBS=`(echo 'print,"@@@"+!MAKE_DLL.LD' | $IDL 2>&1) | $GREP '@@@' | sed -e 's/@@@@<:@^ @:>@* \(.*\?\) -o.*/\1/' | sed -e 's/-m /-m/g'` +IDL_LIBS=`(echo 'print,"@@@"+!MAKE_DLL.LD' | $IDL 2>&1) | $GREP '@@@' | sed -e 's/@@@@<:@^ @:>@* \(.*\?\) -o.*/\1/' | sed -e 's/-m \?[\w]*//g'` AC_MSG_CHECKING([IDL linker flags]) AC_MSG_RESULT([$IDL_LIBS]) AC_SUBST([IDL_LIBS]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <syn...@us...> - 2012-03-24 13:43:44
|
Revision: 686 http://getdata.svn.sourceforge.net/getdata/?rev=686&view=rev Author: syntheticpp Date: 2012-03-24 13:43:33 +0000 (Sat, 24 Mar 2012) Log Message: ----------- compile with mingw 4.6 Modified Paths: -------------- trunk/getdata/cmake/CMakeLists.txt trunk/getdata/cmake/src/CMakeLists.txt trunk/getdata/src/fragment.c trunk/getdata/src/internal.h trunk/getdata/src/open.c Modified: trunk/getdata/cmake/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/CMakeLists.txt 2012-03-24 02:54:17 UTC (rev 685) +++ trunk/getdata/cmake/CMakeLists.txt 2012-03-24 13:43:33 UTC (rev 686) @@ -25,26 +25,29 @@ #TODO add configure add_definitions( -DPACKAGE_NAME=\"GetData\" - -DPACKAGE_VERSION=\"0.7.2\" + -DPACKAGE_VERSION=\"0.8.0\" -DPACKAGE_BUGREPORT=\"get...@li...\") -## Substitutions needed to build getdata.h -# build in ANSI C mode -set(DEFINE_GD_NO_C99_API "#define GD_NO_C99_API") + # kst2 doesn't need the legacy API set(DEFINE_GD_LEGACY_API "/* #undef GD_LEGACY_API */") # MSVCRT integer types -set(DEFINE_gd_int16_t "#define gd_int16_t short int") -set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned short int") -set(DEFINE_gd_int64_t "#define gd_int64_t __int64") -set(DEFINE_gd_uint64_t "#define gd_int64_t __uint64") if(MSVC) + ## Substitutions needed to build getdata.h + # build in ANSI C mode + set(DEFINE_GD_NO_C99_API "#define GD_NO_C99_API") + + set(DEFINE_gd_int16_t "#define gd_int16_t short int") + set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned short int") + set(DEFINE_gd_int64_t "#define gd_int64_t __int64") + set(DEFINE_gd_uint64_t "#define gd_uint64_t __uint64") + add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS) add_definitions( -D__MSVCRT__ @@ -75,6 +78,11 @@ endif() if(MINGW) + set(DEFINE_gd_int16_t "#define gd_int16_t __int16") + set(DEFINE_gd_uint16_t "#define gd_uint16_t unsigned __int16") + set(DEFINE_gd_int64_t "#define gd_int64_t __int64") + set(DEFINE_gd_uint64_t "#define gd_uint64_t unsigned __int64") + add_definitions( -D__MSVCRT__ -D__MSVCRT_VERSION__=0x0601 @@ -94,10 +102,18 @@ -DHAVE_STRUCT___STAT64 -DHAVE__GETCWD -DMKDIR_NO_MODE + -DHAVE_SYS_FILE_H + -DHAVE_SYS_STAT_H + -DHAVE_DIRENT_H + -DS_IFLNK=0xa000 + -DHAVE_DECL_OFFSETOF + -DHAVE__CHSIZE + -DGD_DIRSEP=0x53 ) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") endif() -set(GD_ENABLE_C99_API 0) + configure_file(${GD_DIR}/src/getdata.h.in ${CMAKE_BINARY_DIR}/getdata.h @ONLY) include_directories(${GD_DIR}/src ${CMAKE_CURRENT_BINARY_DIR}) Modified: trunk/getdata/cmake/src/CMakeLists.txt =================================================================== --- trunk/getdata/cmake/src/CMakeLists.txt 2012-03-24 02:54:17 UTC (rev 685) +++ trunk/getdata/cmake/src/CMakeLists.txt 2012-03-24 13:43:33 UTC (rev 686) @@ -6,6 +6,8 @@ ${GD_DIR}/src/lzma.c ${GD_DIR}/src/legacy.c ${GD_DIR}/src/slim.c + ${GD_DIR}/src/zzslim.c + ${GD_DIR}/src/zzip.c ) GD_FILES(gd src) Modified: trunk/getdata/src/fragment.c =================================================================== --- trunk/getdata/src/fragment.c 2012-03-24 02:54:17 UTC (rev 685) +++ trunk/getdata/src/fragment.c 2012-03-24 13:43:33 UTC (rev 686) @@ -313,7 +313,7 @@ /* if we can't open directories, we're stuck with the full path method */ #ifdef GD_NO_DIR_OPEN - flags |= GD_DESYNC_PATHCECK; + flags |= GD_DESYNC_PATHCHECK; #endif _GD_ClearError(D); Modified: trunk/getdata/src/internal.h =================================================================== --- trunk/getdata/src/internal.h 2012-03-24 02:54:17 UTC (rev 685) +++ trunk/getdata/src/internal.h 2012-03-24 13:43:33 UTC (rev 686) @@ -60,6 +60,7 @@ #include <stdlib.h> #include <string.h> #include <stdio.h> +#include <stddef.h> #include <errno.h> #include <ctype.h> #include <limits.h> Modified: trunk/getdata/src/open.c =================================================================== --- trunk/getdata/src/open.c 2012-03-24 02:54:17 UTC (rev 685) +++ trunk/getdata/src/open.c 2012-03-24 13:43:33 UTC (rev 686) @@ -367,9 +367,11 @@ D->dir[0].path = dirfile; D->ndir = 1; +#ifndef GD_NO_DIR_OPEN /* get the mtime */ if (fstat(fd, &statbuf) == 0) *mtime = statbuf.st_mtime; +#endif dreturn("%p", fp); return fp; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |