[Getdata-commits] SF.net SVN: getdata:[795] trunk/getdata
Scientific Database Format
Brought to you by:
ketiltrout
|
From: <ket...@us...> - 2013-02-15 03:13:17
|
Revision: 795
http://sourceforge.net/p/getdata/code/795
Author: ketiltrout
Date: 2013-02-15 03:13:09 +0000 (Fri, 15 Feb 2013)
Log Message:
-----------
Matlab docs, standalone Matlab package, &c.
Modified Paths:
--------------
trunk/getdata/ChangeLog
trunk/getdata/Makefile.am
trunk/getdata/bindings/idl/Makefile.am
trunk/getdata/bindings/idl/getdata.c
trunk/getdata/bindings/idl/makedlm.sh.in
trunk/getdata/bindings/idl/package/configure.ac
trunk/getdata/bindings/make_parameters.c
trunk/getdata/bindings/matlab/Makefile.am
trunk/getdata/bindings/matlab/gd_add.c
trunk/getdata/bindings/matlab/gd_add_alias.c
trunk/getdata/bindings/matlab/gd_add_bit.m
trunk/getdata/bindings/matlab/gd_add_carray.c
trunk/getdata/bindings/matlab/gd_add_const.c
trunk/getdata/bindings/matlab/gd_add_divide.m
trunk/getdata/bindings/matlab/gd_add_lincom.m
trunk/getdata/bindings/matlab/gd_add_linterp.m
trunk/getdata/bindings/matlab/gd_add_mplex.m
trunk/getdata/bindings/matlab/gd_add_multiply.m
trunk/getdata/bindings/matlab/gd_add_phase.m
trunk/getdata/bindings/matlab/gd_add_polynom.m
trunk/getdata/bindings/matlab/gd_add_raw.m
trunk/getdata/bindings/matlab/gd_add_recip.m
trunk/getdata/bindings/matlab/gd_add_sbit.m
trunk/getdata/bindings/matlab/gd_add_spec.c
trunk/getdata/bindings/matlab/gd_add_string.c
trunk/getdata/bindings/matlab/gd_add_window.m
trunk/getdata/bindings/matlab/gd_alias_target.c
trunk/getdata/bindings/matlab/gd_aliases.c
trunk/getdata/bindings/matlab/gd_alter_affixes.c
trunk/getdata/bindings/matlab/gd_alter_bit.m
trunk/getdata/bindings/matlab/gd_alter_carray.m
trunk/getdata/bindings/matlab/gd_alter_const.m
trunk/getdata/bindings/matlab/gd_alter_divide.m
trunk/getdata/bindings/matlab/gd_alter_encoding.c
trunk/getdata/bindings/matlab/gd_alter_endianness.c
trunk/getdata/bindings/matlab/gd_alter_entry.c
trunk/getdata/bindings/matlab/gd_alter_frameoffset.c
trunk/getdata/bindings/matlab/gd_alter_lincom.m
trunk/getdata/bindings/matlab/gd_alter_linterp.m
trunk/getdata/bindings/matlab/gd_alter_mplex.m
trunk/getdata/bindings/matlab/gd_alter_multiply.m
trunk/getdata/bindings/matlab/gd_alter_phase.m
trunk/getdata/bindings/matlab/gd_alter_polynom.m
trunk/getdata/bindings/matlab/gd_alter_protection.c
trunk/getdata/bindings/matlab/gd_alter_raw.m
trunk/getdata/bindings/matlab/gd_alter_recip.m
trunk/getdata/bindings/matlab/gd_alter_sbit.m
trunk/getdata/bindings/matlab/gd_alter_spec.c
trunk/getdata/bindings/matlab/gd_alter_window.m
trunk/getdata/bindings/matlab/gd_bof.c
trunk/getdata/bindings/matlab/gd_carray_len.c
trunk/getdata/bindings/matlab/gd_carrays.c
trunk/getdata/bindings/matlab/gd_close.c
trunk/getdata/bindings/matlab/gd_constants.c
trunk/getdata/bindings/matlab/gd_delete.c
trunk/getdata/bindings/matlab/gd_delete_alias.c
trunk/getdata/bindings/matlab/gd_desync.c
trunk/getdata/bindings/matlab/gd_dirfile_standards.c
trunk/getdata/bindings/matlab/gd_dirfilename.c
trunk/getdata/bindings/matlab/gd_discard.c
trunk/getdata/bindings/matlab/gd_encoding.c
trunk/getdata/bindings/matlab/gd_endianness.c
trunk/getdata/bindings/matlab/gd_entry.c
trunk/getdata/bindings/matlab/gd_entry_list.c
trunk/getdata/bindings/matlab/gd_entry_type.c
trunk/getdata/bindings/matlab/gd_eof.c
trunk/getdata/bindings/matlab/gd_error.c
trunk/getdata/bindings/matlab/gd_error_string.c
trunk/getdata/bindings/matlab/gd_field_list.m
trunk/getdata/bindings/matlab/gd_field_list_by_type.m
trunk/getdata/bindings/matlab/gd_flags.c
trunk/getdata/bindings/matlab/gd_flush.c
trunk/getdata/bindings/matlab/gd_fragment_affixes.c
trunk/getdata/bindings/matlab/gd_fragment_index.c
trunk/getdata/bindings/matlab/gd_fragmentname.c
trunk/getdata/bindings/matlab/gd_framenum.c
trunk/getdata/bindings/matlab/gd_frameoffset.c
trunk/getdata/bindings/matlab/gd_get_carray.c
trunk/getdata/bindings/matlab/gd_get_carray_slice.c
trunk/getdata/bindings/matlab/gd_get_constant.m
trunk/getdata/bindings/matlab/gd_get_string.c
trunk/getdata/bindings/matlab/gd_getdata.c
trunk/getdata/bindings/matlab/gd_hidden.c
trunk/getdata/bindings/matlab/gd_hide.c
trunk/getdata/bindings/matlab/gd_invalid_dirfile.c
trunk/getdata/bindings/matlab/gd_linterp_tablename.c
trunk/getdata/bindings/matlab/gd_madd.c
trunk/getdata/bindings/matlab/gd_madd_alias.c
trunk/getdata/bindings/matlab/gd_madd_bit.m
trunk/getdata/bindings/matlab/gd_madd_carray.c
trunk/getdata/bindings/matlab/gd_madd_const.c
trunk/getdata/bindings/matlab/gd_madd_divide.m
trunk/getdata/bindings/matlab/gd_madd_lincom.m
trunk/getdata/bindings/matlab/gd_madd_linterp.m
trunk/getdata/bindings/matlab/gd_madd_mplex.m
trunk/getdata/bindings/matlab/gd_madd_multiply.m
trunk/getdata/bindings/matlab/gd_madd_phase.m
trunk/getdata/bindings/matlab/gd_madd_polynom.m
trunk/getdata/bindings/matlab/gd_madd_recip.m
trunk/getdata/bindings/matlab/gd_madd_sbit.m
trunk/getdata/bindings/matlab/gd_madd_spec.c
trunk/getdata/bindings/matlab/gd_madd_string.c
trunk/getdata/bindings/matlab/gd_madd_window.m
trunk/getdata/bindings/matlab/gd_malter_spec.c
trunk/getdata/bindings/matlab/gd_matlab.h
trunk/getdata/bindings/matlab/gd_mconstants.c
trunk/getdata/bindings/matlab/gd_metaflush.c
trunk/getdata/bindings/matlab/gd_mfield_list.m
trunk/getdata/bindings/matlab/gd_mfield_list_by_type.m
trunk/getdata/bindings/matlab/gd_move.c
trunk/getdata/bindings/matlab/gd_move_alias.c
trunk/getdata/bindings/matlab/gd_mplex_lookback.c
trunk/getdata/bindings/matlab/gd_mstrings.c
trunk/getdata/bindings/matlab/gd_mvector_list.m
trunk/getdata/bindings/matlab/gd_naliases.c
trunk/getdata/bindings/matlab/gd_native_type.c
trunk/getdata/bindings/matlab/gd_nentries.c
trunk/getdata/bindings/matlab/gd_nfields.m
trunk/getdata/bindings/matlab/gd_nfields_by_type.m
trunk/getdata/bindings/matlab/gd_nfragments.c
trunk/getdata/bindings/matlab/gd_nframes.c
trunk/getdata/bindings/matlab/gd_nmfields.m
trunk/getdata/bindings/matlab/gd_nmfields_by_type.m
trunk/getdata/bindings/matlab/gd_nmvectors.m
trunk/getdata/bindings/matlab/gd_nvectors.m
trunk/getdata/bindings/matlab/gd_open.c
trunk/getdata/bindings/matlab/gd_parent_fragment.c
trunk/getdata/bindings/matlab/gd_protection.c
trunk/getdata/bindings/matlab/gd_put_carray.m
trunk/getdata/bindings/matlab/gd_put_carray_slice.c
trunk/getdata/bindings/matlab/gd_put_constant.m
trunk/getdata/bindings/matlab/gd_put_string.c
trunk/getdata/bindings/matlab/gd_putdata.c
trunk/getdata/bindings/matlab/gd_raw_close.c
trunk/getdata/bindings/matlab/gd_raw_filename.c
trunk/getdata/bindings/matlab/gd_reference.c
trunk/getdata/bindings/matlab/gd_rename.c
trunk/getdata/bindings/matlab/gd_rewrite_fragment.c
trunk/getdata/bindings/matlab/gd_seek.c
trunk/getdata/bindings/matlab/gd_spf.c
trunk/getdata/bindings/matlab/gd_strings.c
trunk/getdata/bindings/matlab/gd_strtok.c
trunk/getdata/bindings/matlab/gd_sync.c
trunk/getdata/bindings/matlab/gd_tell.c
trunk/getdata/bindings/matlab/gd_unhide.c
trunk/getdata/bindings/matlab/gd_uninclude.c
trunk/getdata/bindings/matlab/gd_validate.c
trunk/getdata/bindings/matlab/gd_vector_list.m
trunk/getdata/bindings/matlab/gd_verbose_prefix.c
trunk/getdata/bindings/matlab/getdata_constants.m
trunk/getdata/bindings/matlab/matlab.c
trunk/getdata/bindings/matlab/test/Makefile.am
trunk/getdata/bindings/matlab/test/big_test.m
trunk/getdata/configure.ac
trunk/getdata/doc/Makefile.am
trunk/getdata/m4/matlab.m4
trunk/getdata/m4/python.m4
trunk/getdata/m4/version.m4
Added Paths:
-----------
trunk/getdata/bindings/matlab/Contents.m.head
trunk/getdata/bindings/matlab/doc.tail
trunk/getdata/bindings/matlab/gd_include.c
trunk/getdata/bindings/matlab/gd_mcarrays.c
trunk/getdata/bindings/matlab/make_contents.sh.in
trunk/getdata/bindings/matlab/package/
trunk/getdata/bindings/matlab/package/Makefile.am
trunk/getdata/bindings/matlab/package/README
trunk/getdata/bindings/matlab/package/configure.ac
trunk/getdata/doc/README.matlab
Removed Paths:
-------------
trunk/getdata/bindings/matlab/gd_include.m
trunk/getdata/bindings/matlab/gd_include_affix.c
Property Changed:
----------------
trunk/getdata/bindings/matlab/
Modified: trunk/getdata/ChangeLog
===================================================================
--- trunk/getdata/ChangeLog 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/ChangeLog 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,8 +1,22 @@
-2012-02-02 D. V. Wiebe <ge...@ke...> svn:794
+2012-02-15 D. V. Wiebe <ge...@ke...> svn:795
+ * bindings/matlab/package: Added.
+ * Makefile.am: Add matlabdist and matlabdistcheck
+
+ * doc/README.matlab bindings/matlab/make_contents.sh.in
+ bindings/matlab/Contents.m.head bindings/matlab/doc.tail: Added.
+
+ * bindinag/matlab/matlab.c (gdmx_from_carrays): Added.
+ * bindings/matlab/gd_mcarrays.c: Added.
+ * bindings/matlab/test/big_test.m: Add test 243.
+
+ * bindings/matlab/gd_include.c: Renamed from gd_include_affix.c
+ * bindings/matlab/gd_include.m: Deleted.
+
+2012-02-13 D. V. Wiebe <ge...@ke...> svn:794
* bindings/cxx/test/big_test.cpp bindings/perl/t/big_test.t
bindings/python/test/big_test.py: Add test 243.
-2012-02-02 D. V. Wiebe <ge...@ke...> svn:793
+2012-02-06 D. V. Wiebe <ge...@ke...> svn:793
* src/parse.c (_GD_Tokenise): Don't falsely report an unterminated token when
stopping a partial tokenisation on top of a " or \.
* test/tok_arg.c test/tok_escape.c test/tok_quote.c: Added.
Modified: trunk/getdata/Makefile.am
===================================================================
--- trunk/getdata/Makefile.am 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/Makefile.am 2013-02-15 03:13:09 UTC (rev 795)
@@ -38,10 +38,45 @@
--with-perl-dir="$$dc_install_base/perl" \
--with-python-module-dir="$$dc_install_base/python"
+# matlab-only package
+matlabdist: $(DISTFILES)
+ rm -rf svn_export
+ svn export $(top_srcdir) svn_export
+ ( cd svn_export && \
+ mkdir matlab_getdata && \
+ mkdir matlab_getdata/m4 && \
+ mkdir matlab_getdata/src && \
+ cp bindings/matlab/package/* matlab_getdata && \
+ cp -r bindings/matlab/Makefile.am bindings/matlab/gd_*.[cm] \
+ bindings/matlab/matlab.c bindings/matlab/gd_matlab.h bindings/matlab/test \
+ bindings/matlab/doc.tail bindings/matlab/Contents.m.head \
+ bindings/matlab/make_contents.sh.in \
+ matlab_getdata/src && \
+ cp -r bindings/make_parameters.c matlab_getdata && \
+ cp -r m4/matlab.m4 m4/compiler.m4 m4/version.m4 matlab_getdata/m4 && \
+ cp -r doc/README.matlab COPYING AUTHORS ChangeLog INSTALL NEWS \
+ matlab_getdata && \
+ ( cd matlab_getdata && \
+ aclocal -I m4 && \
+ libtoolize && \
+ autoconf && \
+ autoheader && \
+ automake --add-missing --force-missing && \
+ ./configure && \
+ make dist && \
+ cp matlab_${distdir}* ../.. \
+ ) )
+ rm -rf svn_export
+
+matlabdistcheck: matlab_$(distdir).tar.gz
+ tar -zxvf $<
+ cd matlab_$(distdir) && ./configure && make dist && make distcheck
+ rm -rf matlab_$(distdir)
+
# idl-only package
idldist: $(DISTFILES)
rm -rf svn_export
- svn export . svn_export
+ svn export $(top_srcdir) svn_export
( cd svn_export && \
mkdir idl_getdata && \
mkdir idl_getdata/m4 && \
@@ -74,7 +109,7 @@
windist: $(DISTFILES)
rm -rf crlf_export
cd man && $(MAKE) htmlman
- svn --native-eol CRLF export . crlf_export
+ svn --native-eol CRLF export $(top_srcdir) crlf_export
( cd crlf_export && \
mkdir $(distdir) && \
mkdir $(distdir)/bindings && \
Modified: trunk/getdata/bindings/idl/Makefile.am
===================================================================
--- trunk/getdata/bindings/idl/Makefile.am 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/idl/Makefile.am 2013-02-15 03:13:09 UTC (rev 795)
@@ -26,7 +26,7 @@
SUBDIRS=test
-if GDIDL_EXTERNAL
+if GD_EXTERNAL
GDIDL_GETDATA_LIBS=$(GETDATA_LIBS)
else
GDIDL_GETDATA_LIBS=../../src/libgetdata.la
Modified: trunk/getdata/bindings/idl/getdata.c
===================================================================
--- trunk/getdata/bindings/idl/getdata.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/idl/getdata.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -32,7 +32,7 @@
# include "gd_config.h"
#endif
-#ifdef GDIDL_EXTERNAL
+#ifdef GD_EXTERNAL
# include <complex.h>
# include <getdata.h>
# define dtracevoid()
Modified: trunk/getdata/bindings/idl/makedlm.sh.in
===================================================================
--- trunk/getdata/bindings/idl/makedlm.sh.in 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/idl/makedlm.sh.in 2013-02-15 03:13:09 UTC (rev 795)
@@ -21,11 +21,17 @@
#
# @configure_input@
-sed=@SED@
-grep=@GREP@
+GREP=@GREP@
+DATE=@DATE@
opt=$1
in=$2
+if test "x$DATE" == "xnot found"; then
+ BUILD_DATE="unspecified"
+else
+ BUILD_DATE=`date`
+fi
+
if test "$opt" = "-c"; then
cat <<EOF
/* This code is automatically generated. Changes made here will be lost. */
@@ -38,13 +44,13 @@
MODULE GETDATA
DESCRIPTION IDL GetData bindings
VERSION @VERSION@
-BUILD_DATE @BUILD_DATE@
+BUILD_DATE $BUILD_DATE
SOURCE The GetData Project <@PACKAGE_BUGREPORT@>
STRUCTURE GD_ENTRY
EOF
fi
-grep @@DLM $in | sort -k 5 | {
+$GREP @@DLM $in | sort -k 5 | {
nfunc=0
nproc=0
while read sc magic type func idl min max key extra; do if test "$opt" = "-c"; then
Modified: trunk/getdata/bindings/idl/package/configure.ac
===================================================================
--- trunk/getdata/bindings/idl/package/configure.ac 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/idl/package/configure.ac 2013-02-15 03:13:09 UTC (rev 795)
@@ -115,7 +115,7 @@
GD_PROG_CC_WALL
dnl Declare a few feature test macros
-AC_DEFINE([GDIDL_EXTERNAL], [1], [ Define to 1 if building the GetData IDL bindings outside the GetData source tree ])
+AC_DEFINE([GD_EXTERNAL], [1], [ Define to 1 if building the GetData bindings outside the GetData source tree ])
AC_DEFINE([_BSD_SOURCE], [], [ Expose BSD-derived definitions ])
AC_DEFINE([_SVID_SOURCE], [], [ Expose System V-derived definitions ])
AC_DEFINE([_POSIX_SOURCE], [], [ Expose POSIX.1-1990 conforming definitions ])
@@ -204,7 +204,7 @@
AM_CONDITIONAL(LFS_TRANSITIONAL_API, [test "x$gd_cv_type_off64_t" = "xyes"])
AM_CONDITIONAL(TEST_IDL, [test "x$NO_DLOPEN_TESTS" = "x0"])
AM_CONDITIONAL(HAVE_DIFF, [test "x$DIFF" != "x"])
-AM_CONDITIONAL(GDIDL_EXTERNAL, [true])
+AM_CONDITIONAL(GD_EXTERNAL, [true])
dnl we do this here to avoid screwing up other tests
LDFLAGS="${LDFLAGS}${NO_UNDEFINED}"
Modified: trunk/getdata/bindings/make_parameters.c
===================================================================
--- trunk/getdata/bindings/make_parameters.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/make_parameters.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -465,8 +465,57 @@
{
int i;
- fputs("% Copyright (C) 2013 D. V. Wiebe\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
- "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n"
+ fputs("function GD = getdata_constants()\n", stdout);
+
+ fputs("% GETDATA_CONSTANTS Define GetData symbolic constants\n"
+ "%\n"
+ "% GETDATA_CONSTANTS produces a structure containing the symbolic "
+ "constants\n"
+ "% used by the GetData bindings. Member names of the structure "
+ "correspond to\n"
+ "% names of symbolic constants used in the GetData C API.\n"
+ "%\n"
+ "% Although it can be used in immediate context by doing something "
+ "like\n"
+ "%\n"
+ "% >> GETDATA_CONSTANTS.FLOAT64\n"
+ "%\n"
+ "% ans =\n"
+ "%\n"
+ "% 136\n"
+ "%\n"
+ "% it is usually assigned to a variable, which prevents having to "
+ "evaluate this\n"
+ "% function more than once. We recommend calling this variable GD:\n"
+ "%\n"
+ "% >> GD = GETDATA_CONSTANTS;\n"
+ "% >> GD.FLOAT64\n"
+ "%\n"
+ "% ans =\n"
+ "%\n"
+ "% 136\n"
+ "%\n"
+ "% providing more succinct symbol names which closely resemble the "
+ "cor-\n"
+ "% respondng C API symbol names (e.g. GD_FLOAT64). In the "
+ "documentation for\n"
+ "% these bindings, we assume such a GD variable has been defined, and "
+ "refer to\n"
+ "% symbolic constants as GD.<...> when necessary.\n"
+ "%\n"
+ "% See also GETDATA\n\n", stdout);
+
+ fputs(" GD = struct(...\n"
+ " 'VERSION', '" VERSION "'", stdout);
+
+ for (i = 0; constant_list[i].lname != NULL; ++i)
+ printf(", ...\n '%s', int32(%li)", constant_list[i].sname,
+ constant_list[i].value);
+
+ printf(" ...\n );\nend\n");
+
+ fputs("\n% Copyright (C) 2013 D. V. Wiebe\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"
+ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n"
"% This file is part of the GetData project.\n%\n"
"% GetData is free software; you can redistribute it and/or modify it "
"under\n"
@@ -485,32 +534,7 @@
"License\n"
"% along with GetData; if not, write to the Free Software Foundation, "
"Inc.,\n"
- "% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n\n", stdout);
-
- fputs("% getdata_constants:\n"
- "% ------------------\n"
- "% This function defines a structure containing various constants used "
- "by\n"
- "% the GetData MATLAB bindings. Typically it is called by doing "
- "something\n"
- "% like:\n%\n"
- "% >> GD = getdata_constants()\n%\n"
- "% which then allows you to use constants like 'GD.RDWR' when required "
- "by\n"
- "% the bindings.\n%\n"
- "% For details on the GetData MATLAB bindings see the file "
- "README.matlab\n"
- "% distributed with the GetData source.\n", stdout);
-
- fputs("function GD = getdata_constants()\n"
- " GD = struct(...\n"
- " 'VERSION', '" VERSION "'", stdout);
-
- for (i = 0; constant_list[i].lname != NULL; ++i)
- printf(", ...\n '%s', int32(%li)", constant_list[i].sname,
- constant_list[i].value);
-
- printf(" ...\n );\nend\n");
+ "% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n", stdout);
}
int main(int argc, char* argv[])
Index: trunk/getdata/bindings/matlab
===================================================================
--- trunk/getdata/bindings/matlab 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab 2013-02-15 03:13:09 UTC (rev 795)
Property changes on: trunk/getdata/bindings/matlab
___________________________________________________________________
Modified: svn:ignore
## -1,6 +1,98 ##
*~
.deps
.libs
+Contents.m
Makefile
Makefile.in
+make_contents.sh
*.mex*
+gd_add_alias.m
+gd_add.m
+gd_add_carray.m
+gd_add_const.m
+gd_add_spec.m
+gd_add_string.m
+gd_aliases.m
+gd_alias_target.m
+gd_alter_affixes.m
+gd_alter_encoding.m
+gd_alter_endianness.m
+gd_alter_entry.m
+gd_alter_frameoffset.m
+gd_alter_protection.m
+gd_alter_spec.m
+gd_bof.m
+gd_carray_len.m
+gd_carrays.m
+gd_close.m
+gd_constants.m
+gd_delete_alias.m
+gd_delete.m
+gd_desync.m
+gd_dirfilename.m
+gd_dirfile_standards.m
+gd_discard.m
+gd_encoding.m
+gd_endianness.m
+gd_entry.m
+gd_entry_list.m
+gd_entry_type.m
+gd_eof.m
+gd_error.m
+gd_error_string.m
+gd_flags.m
+gd_flush.m
+gd_fragment_affixes.m
+gd_fragment_index.m
+gd_fragmentname.m
+gd_framenum.m
+gd_frameoffset.m
+gd_get_carray.m
+gd_get_carray_slice.m
+gd_getdata.m
+gd_get_string.m
+gd_hidden.m
+gd_hide.m
+gd_include_affix.m
+gd_invalid_dirfile.m
+gd_linterp_tablename.m
+gd_madd_alias.m
+gd_madd.m
+gd_madd_carray.m
+gd_madd_const.m
+gd_madd_spec.m
+gd_madd_string.m
+gd_malter_spec.m
+gd_mcarrays.m
+gd_mconstants.m
+gd_metaflush.m
+gd_move_alias.m
+gd_move.m
+gd_mplex_lookback.m
+gd_mstrings.m
+gd_naliases.m
+gd_native_type.m
+gd_nentries.m
+gd_nfragments.m
+gd_nframes.m
+gd_open.m
+gd_parent_fragment.m
+gd_protection.m
+gd_put_carray_slice.m
+gd_putdata.m
+gd_put_string.m
+gd_raw_close.m
+gd_raw_filename.m
+gd_reference.m
+gd_rename.m
+gd_rewrite_fragment.m
+gd_seek.m
+gd_spf.m
+gd_strings.m
+gd_strtok.m
+gd_sync.m
+gd_tell.m
+gd_unhide.m
+gd_uninclude.m
+gd_validate.m
+gd_verbose_prefix.m
Added: trunk/getdata/bindings/matlab/Contents.m.head
===================================================================
--- trunk/getdata/bindings/matlab/Contents.m.head (rev 0)
+++ trunk/getdata/bindings/matlab/Contents.m.head 2013-02-15 03:13:09 UTC (rev 795)
@@ -0,0 +1,95 @@
+% These bindings provide light-weight bindings to the GetData C library for
+% use withing MATLAB. In general, there is a one-to-one mapping between C API
+% functions and matlab functions. Differences in behaviour, where notable, are
+% provided in the corresponing function help.
+%
+% The Dirifle object:
+% Dirfile objects returned from GD_OPEN and similar should be treated as
+% opaque objects. They should not be used other than when passing to a
+% function in these bindings.
+%
+% GetData symbolic constants:
+% Like the underlying C API, the GetData bindings make use of a large number
+% of special numbers. For convenience, a struct containing all these numbers
+% is provided by the GETDATA_CONSTANTS function, which is typically used by
+% doing something like:
+%
+% >> GD = GETDATA_CONSTANTS;
+%
+% This then allows the use of these constants as GD.UINT8, GD.RAW_ENTRY, &c.,
+% which is both shorter than using the function directly, i.e.,
+% GETDATA_CONSTANTS.UINT8, and also only requires evaluating the
+% GETDATA_CONSTANTS function once.
+%
+% In this documentation, when a reference is made to a GetData symbolic
+% constant, it is done so as if the GD variable had been created as above.
+% The reader should understand, e.g., GD.UINT8 as referring to the same
+% special number as the similarly-named C API's symbolic constant, e.g.,
+% GD_UINT8.
+%
+% Input and Output:
+% Functions in these GetData bindings produce either one or zero scalar or
+% vector outputs, as explained in the corresponding function documentation.
+%
+% In general, where the C API would allow a NULL string pointer, these
+% bindings accept a numeric zero (0) instead of a string input in place of a
+% NULL.
+%
+% Unlike the C Library, real and complex data may be used interchangeably in
+% function calls.
+%
+% Error reporting:
+% GetData C Library errors are represented in MATLAB as standard exceptions
+% (see MEXCEPTION). In general, GetData functions should be evaluated in a
+% TRY ... CATCH ... END block. GetData-specific exceptions can be identified
+% through their MEXCEPTION.identifier. The component part of a GetData
+% MEXCPETION.identifier will always start with 'GetData:'.
+%
+% Exceptions representing a GetData C Library error will have the component
+% identifier 'GetData:Lib'. Exceptions generated by the bindings themselves
+% (almost all of which are failures in data conversion between MATLAB and C
+% API data types) will have the component identifier 'GetData:GDMX'. For C
+% Library errors, the mnemonic part of the MEXCEPTION.identifier corresponds
+% to the C library error code (e.g. 'GetData:Lib:BadCode'). For C Library
+% errors, numeric error codes can be obtained using the GD_ERROR function, as
+% in the C Library. The return value of GD_ERROR is unspecified after an
+% exception in the MATLAB bindings (i.e. a 'GetData:GDMX' exception).
+%
+% The Entry structure:
+% Functions which deal with generic field metadata (GD_ADD, GD_ALTER_ENTRY,
+% GD_ENTRY, &c.) use structures mirroring the C API's gd_entry_t object with
+% the following exceptions:
+%
+% * In entries with multiple input fields, .IN_FIELDS is a cell array of
+% strings of the appropriate length. For entries with a single input field,
+% .IN_FIELDS may be either a simple string or else a cell array of length
+% one.
+%
+% * A distinction is not made between real and complex data. As a result,
+% the entry struct for, say, a POLYNOM, stores co-efficients in the .A
+% member, regardless of whether they are complex or purely real. As a side
+% effect, the structure does not contain a .COMP_SCAL member.
+%
+% * LINCOM entries don't provide a .N_FIELDS member, nor do POLYNOM entries
+% provide a .POLY_ORD member; these values should be determined by
+% determining the length of .IN_FIELDS, .M, or .B for LINCOMs or of .A for
+% POLYNOMs.
+%
+% * The .SCALAR and .SCALAR_IND members are provided for field types which
+% allow non-literal parameters. Where the C API would have NULL pointers
+% in .SCALAR to indicate a literal, the bindings will have a numeric 0 in
+% the corresponding .SCALAR cell array element. As with .IN_FIELDS, a
+% length-one .SCALAR cell array may be replaced by a scalar.
+%
+% See gd_entry(3) in section 3 of the UNIX manual for details on the C API's
+% gd_entry_t object.
+%
+% Function list:
+% NOTE: accompanying documentation for the functions below in general only
+% point out differences in behaviour between these MATLAB bindings and
+% the underlying C API function which the MATLAB function wraps. Users
+% should also consult the C API documentation, which can be found in
+% section 3 of the UNIX manual, e.g.
+%
+% $ man 3 gd_open
+%
Modified: trunk/getdata/bindings/matlab/Makefile.am
===================================================================
--- trunk/getdata/bindings/matlab/Makefile.am 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/Makefile.am 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,22 +20,14 @@
#
AUTOMAKE_OPTIONS = foreign
-if CXX_WALL
-WALL=-Wall
-endif
-
-if CXX_WEXTRA
-WEXTRA=-Wextra
-endif
-
-INCLUDES = ${WALL} $(WEXTRA) -I$(top_srcdir)/src
-
if GETDATA_DEBUG
DEBUG_C = ../../src/debug.c
endif
SUBDIRS=test
+matlabdir=$(matlabbasedir)/getdata
+
matlabfiles=gd_add_bit.m gd_add_divide.m gd_add_lincom.m gd_add_linterp.m \
gd_add_mplex.m gd_add_multiply.m gd_add_phase.m gd_add_polynom.m \
gd_add_raw.m gd_add_recip.m gd_add_sbit.m gd_add_window.m \
@@ -44,7 +36,7 @@
gd_alter_mplex.m gd_alter_multiply.m gd_alter_phase.m \
gd_alter_polynom.m gd_alter_raw.m gd_alter_recip.m gd_alter_sbit.m \
gd_alter_window.m gd_field_list_by_type.m gd_field_list.m \
- gd_get_constant.m gd_include.m gd_madd_bit.m gd_madd_divide.m \
+ gd_get_constant.m gd_madd_bit.m gd_madd_divide.m \
gd_madd_lincom.m gd_madd_linterp.m gd_madd_mplex.m \
gd_madd_multiply.m gd_madd_phase.m gd_madd_polynom.m \
gd_madd_recip.m gd_madd_sbit.m gd_madd_window.m \
@@ -66,10 +58,11 @@
gd_fragment_index gd_fragmentname \
gd_framenum gd_frameoffset gd_get_carray gd_get_carray_slice \
gd_getdata gd_get_string \
- gd_hidden gd_hide gd_include_affix gd_invalid_dirfile \
+ gd_hidden gd_hide gd_include gd_invalid_dirfile \
gd_linterp_tablename gd_madd gd_madd_alias \
gd_madd_carray gd_madd_const gd_madd_spec gd_madd_string \
- gd_malter_spec gd_mconstants gd_metaflush gd_move gd_move_alias gd_mplex_lookback \
+ gd_malter_spec gd_mcarrays \
+ gd_mconstants gd_metaflush gd_move gd_move_alias gd_mplex_lookback \
gd_mstrings gd_naliases gd_native_type gd_nentries gd_nfragments \
gd_nframes gd_open gd_parent_fragment gd_protection \
gd_put_carray_slice \
@@ -78,21 +71,45 @@
gd_seek gd_spf gd_strings gd_strtok \
gd_sync gd_tell gd_unhide gd_uninclude gd_validate gd_verbose_prefix
-EXTRA_DIST=$(addsuffix .c,${mexfiles})
+matlabcfiles=$(addsuffix .c,${mexfiles})
+matlabmexfiles=$(addsuffix .@mexext@,${mexfiles})
+matlabdocfiles=$(addsuffix .m,${mexfiles})
-matlab_SCRIPTS=$(matlabfiles)
-nodist_matlab_SCRIPTS=getdata_constants.m $(addsuffix .@mexext@,${mexfiles})
+EXTRA_DIST=$(matlabcfiles) doc.tail Contents.m.head
+dist_matlab_SCRIPTS=$(matlabfiles)
+nodist_matlab_SCRIPTS=Contents.m getdata_constants.m $(matlabmexfiles) \
+ $(matlabdocfiles)
+
lib_LTLIBRARIES=libgetdata-matlab.la
-libgetdata_matlab_la_SOURCES=matlab.c $(DEBUG_C) gd_matlab.h
-libgetdata_matlab_la_LIBADD=../../src/libgetdata.la
+libgetdata_matlab_la_SOURCES=matlab.c gd_matlab.h
+nodist_libgetdata_matlab_la_SOURCES=$(DEBUG_C)
libgetdata_matlab_la_CPPFLAGS=${MATLAB_CPPFLAGS}
+libgetdata_matlab_la_LDFLAGS=-version-info @MATLABGETDATA_VERSION@
+if GD_EXTERNAL
+libgetdata_matlab_la_LIBADD=$(GETDATA_LIBS)
+INCLUDES=$(GETDATA_CFLAGS)
+GDMX_LIBS=$(GETDATA_LIBS)
+else
+libgetdata_matlab_la_LIBADD=../../src/libgetdata.la
+INCLUDES=-I${top_srcdir}/src -I../../src
+GDMX_LIBS=-L../../src/.libs -lgetdata
+endif
+
+%.m: %.c ${srcdir}/doc.tail
+ ${GREP} '^ %' $< | ${SED} -e 's/^ //' > $@
+ cat ${srcdir}/doc.tail >> $@
+
%.@mexext@: %.c libgetdata-matlab.la
- ${MEX} -I${top_srcdir}/src -I../../src -L.libs -L../../src/.libs \
- -lgetdata-matlab -lgetdata $<
+ ${MEX} ${INCLUDES} -L.libs -lgetdata-matlab $(GDMX_LIBS) $<
+Contents.m: ${srcdir}/Contents.m.head make_contents.sh $(matlabfiles) \
+ $(matlabdocfiles) ${srcdir}/doc.tail
+ ${SHELL} ./make_contents.sh ${srcdir} > $@
+ cat ${srcdir}/doc.tail >> $@
+
getdata_constants.m: ../make_parameters
../make_parameters m > $@
@@ -100,4 +117,4 @@
cd .. && ${MAKE} make_parameters
clean-local:
- rm -rf *.${mexext}
+ rm -rf $(nodist_matlab_SCRIPTS)
Added: trunk/getdata/bindings/matlab/doc.tail
===================================================================
--- trunk/getdata/bindings/matlab/doc.tail (rev 0)
+++ trunk/getdata/bindings/matlab/doc.tail 2013-02-15 03:13:09 UTC (rev 795)
@@ -0,0 +1,20 @@
+
+% Copyright (C) 2013 D. V. Wiebe
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% This file is part of the GetData project.
+%
+% GetData is free software; you can redistribute it and/or modify it under
+% the terms of the GNU Lesser General Public License as published by the
+% Free Software Foundation; either version 2.1 of the License, or (at your
+% option) any later version.
+%
+% GetData is distributed in the hope that it will be useful, but WITHOUT
+% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+% FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
+% License for more details.
+%
+% You should have received a copy of the GNU Lesser General Public License
+% along with GetData; if not, write to the Free Software Foundation, Inc.,
+% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Modified: trunk/getdata/bindings/matlab/gd_add.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,23 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD Add a field
+ %
+ % GD_ADD(DIRFILE,ENTRY)
+ % adds a field described by ENTRY to the dirfile DIRFILE.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % The ENTRY object should be an entry struct; see GETDATA and gd_entry(3) in
+ % the UNIX manual for details.
+ %
+ % See the documentation on the C API function gd_add(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_MADD, GD_OPEN, GETDATA
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_alias.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_alias.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_alias.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,21 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD_ALIAS Add a field alias
+ %
+ % GD_ADD_ALIAS(DIRFILE,NAME,TARGET,FRAGMENT)
+ % adds a field alias called NAME pointing to TARGET in the metadata
+ % fragment indexed by FRAGMENT of the dirfile DIRFILE.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_add_alias(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_MADD_ALIAS, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_bit.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_bit.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_bit.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,25 @@
+function gd_add_bit(D, field_code, in_fields, bitnum, numbits, fragment_index)
+% GD_ADD_BIT Add a BIT field
+%
+% GD_ADD_BIT(DIRFILE,NAME,INPUT,BITNUM,NUMBITS,FRAGMENT)
+% adds a BIT field called NAME to the dirfile specified by DIRFILE.
+% The input field is INPUT, the first bit is BITNUM and the length
+% is NUMBITS. The field is added to the fragment indexed by
+% FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_bit(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_BIT, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.BIT_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_fields}, ...
+ 'bitnum', bitnum, 'numbits', numbits));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,10 +39,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_bit(D, field_code, in_fields, bitnum, numbits, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.BIT_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, ...
- 'bitnum', bitnum, 'numbits', numbits));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_carray.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_carray.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_carray.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,23 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD_CARRAY Add a CARRAY field
+ %
+ % GD_ADD_CARRAY(DIRFILE,NAME,TYPE,VALUES,FRAGMENT)
+ % adds a CARRAY field called NAME to the dirfile specified by
+ % DIRFILE. The storage type is TYPE, and the values of the field
+ % are in VALUES. The field is added to the fragment indexed by
+ % FRAGMENT.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_add_carray(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_ADD, GD_MADD_CARRAY, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_const.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_const.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_const.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,23 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD_CONST Add a CONST field
+ %
+ % GD_ADD_CONST(DIRFILE,NAME,TYPE,VALUE,FRAGMENT)
+ % adds a CONST field called NAME to the dirfile specified by
+ % DIRFILE. The storage type is TYPE, and the value of the field
+ % is VALUE. The field is added to the fragment indexed by
+ % FRAGMENT.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_add_const(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_ADD, GD_MADD_CONST, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_divide.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_divide.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_divide.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,23 @@
+function gd_add_divide(D, field_code, in1, in2, fragment_index)
+% GD_ADD_DIVIDE Add a DIVIDE field
+%
+% GD_ADD_DIVIDE(DIRFILE,NAME,INPUT1,INPUT2,FRAGMENT)
+% adds a DIVIDE field called NAME to the dirfile specified by
+% DIRFILE. The input fields are INPUT1 and INPUT2 and the field
+% is added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_divide(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_DIVIDE, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.DIVIDE_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {{in1; in2}}));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +37,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_divide(D, field_code, in1, in2, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.DIVIDE_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {{in1; in2}}));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_lincom.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_lincom.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_lincom.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,25 @@
+function gd_add_lincom(D, field_code, in_fields, m, b, fragment_index);
+% GD_ADD_LINCOM Add a LINCOM field
+%
+% GD_ADD_LINCOM(DIRFILE,NAME,INPUTS,M,B,FRAGMENT)
+% adds a LINCOM field called NAME to the dirfile specified by
+% DIRFILE. The input fields are provided in the cell array INPUTS
+% and the slopes and offsets given by the numeric arrays M and B,
+% which may be complex valued. The field is added to the fragment
+% indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_lincom(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_LINCOM, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.LINCOM_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'm', m, 'b', b));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +39,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_lincom(D, field_code, in_fields, m, b, fragment_index);
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.LINCOM_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'm', m, 'b', b));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_linterp.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_linterp.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_linterp.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,24 @@
+function gd_add_linterp(D, field_code, in_field, table, fragment_index);
+% GD_ADD_LINTERP Add a LINTERP field
+%
+% GD_ADD_LINTERP(DIRFILE,NAME,INPUT,TABLE,FRAGMENT)
+% adds a LINTERP field called NAME to the dirfile specified by
+% DIRFILE. The input field is INPUT and the associated look-up
+% table is given by the path TABLE. The field is added to the
+% fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_linterp(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_LINTERP, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.LINTERP_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', in_field, 'table', table));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +38,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_linterp(D, field_code, in_fields, table, fragment_index);
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.LINTERP_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', in_fields, 'table', table));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_mplex.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_mplex.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,27 @@
+function gd_add_mplex(D, field_code, in_field1, in_field2, count_val, ...
+count_max, fragment_index)
+% GD_ADD_MPLEX Add a MPLEX field
+%
+% GD_ADD_MPLEX(DIRFILE,NAME,INPUT1,INPUT2,COUNT_VAL,COUNT_MAX,FRAGMENT)
+% adds a MPLEX field called NAME to the dirfile specified by
+% DIRFILE. The input data field is INPUT1, the index field is
+% INPUT2. The target value is COUNT_VAL and the maximum value of
+% INPUT2 is COUNT_MAX. The field is added to the fragment
+% indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_mplex(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_MPLEX, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ...
+ 'count_val', count_val, 'count_max', count_max));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,11 +41,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_mplex(D, field_code, in_field1, in_field2, count_val, ...
-count_max, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.MPLEX_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ...
- 'count_val', count_val, 'count_max', count_max));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_multiply.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_multiply.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_multiply.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,23 @@
+function gd_add_multiply(D, field_code, in1, in2, fragment_index)
+% GD_ADD_MULTIPLY Add a MULTIPLY field
+%
+% GD_ADD_MULTIPLY(DIRFILE,NAME,INPUT1,INPUT2,FRAGMENT)
+% adds a MULTIPLY field called NAME to the dirfile specified by
+% DIRFILE. The input fields are INPUT1 and INPUT2 and the field
+% is added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_multiply(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_MULTIPLY, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.MULTIPLY_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {{in1; in2}}));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +37,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_multiply(D, field_code, in1, in2, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.MULTIPLY_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {{in1; in2}}));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_phase.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_phase.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_phase.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,23 @@
+function gd_add_phase(D, field_code, in_fields, shift, fragment_index)
+% GD_ADD_PHASE Add a PHASE field
+%
+% GD_ADD_PHASE(DIRFILE,NAME,INPUT,SHIFT,FRAGMENT)
+% adds a PHASE field called NAME to the dirfile specified by
+% DIRFILE. The input field is INPUT and the phase shift is SHIFT.
+% The field is added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_phase(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_PHASE, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.PHASE_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'shift', shift));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +37,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_phase(D, field_code, in_fields, shift, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.PHASE_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'shift', shift));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_polynom.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_polynom.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_polynom.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,24 @@
+function gd_add_polynom(D, field_code, in_field, a, fragment_index);
+% GD_ADD_POLYNOM Add a POLYNOM field
+%
+% GD_ADD_POLYNOM(DIRFILE,NAME,INPUT,A,FRAGMENT)
+% adds a POLYNOM field called NAME to the dirfile specified by
+% DIRFILE. The input field is INPUT and the co-efficients are
+% given in the numerical array A, which may be complex valued.
+% The field is added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_polynom(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_POLYNOM, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.POLYNOM_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_field}, 'a', a));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +38,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_polynom(D, field_code, in_fields, a, fragment_index);
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.POLYNOM_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, 'a', a));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_raw.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_raw.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_raw.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,25 @@
+function gd_add_raw(D, field_code, data_type, spf, fragment_index)
+% GD_ADD_RAW Add a RAW field
+%
+% GD_ADD_RAW(DIRFILE,NAME,TYPE,SPF,FRAGMENT)
+% adds a RAW field called NAME to the dirfile specified by
+% DIRFILE. The type of the raw data is given by TYPE, which should
+% be one of the data types provided by GETDATA_CONSTANTS(). The
+% samples-per-frame of the field is given by SPF. The field is
+% added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_raw(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.RAW_ENTRY, ...
+ 'fragment_index', fragment_index, 'data_type', data_type, 'spf', spf));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,9 +39,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_raw(D, field_code, data_type, spf, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.RAW_ENTRY, ...
- 'fragment_index', fragment_index, 'data_type', data_type, 'spf', spf));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_recip.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_recip.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_recip.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,24 @@
+function gd_add_recip(D, field_code, in_field, dividend, fragment_index)
+% GD_ADD_RECIP Add a RECIP field
+%
+% GD_ADD_RECIP(DIRFILE,NAME,INPUT,DIVIDEND,FRAGMENT)
+% adds a RECIP field called NAME to the dirfile specified by
+% DIRFILE. The scalar dividend is DIVIDEND, which may be complex
+% valued. The field is added to the fragment indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_recip(3) in section 3 of
+% the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_RECIP, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.RECIP_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_field}, ...
+ 'dividend', dividend));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,10 +38,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_recip(D, field_code, in_fields, dividend, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.RECIP_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, ...
- 'dividend', dividend));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_sbit.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_sbit.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_sbit.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,25 @@
+function gd_add_sbit(D, field_code, in_fields, bitnum, numbits, fragment_index)
+% GD_ADD_SBIT Add a SBIT field
+%
+% GD_ADD_SBIT(DIRFILE,NAME,INPUT,BITNUM,NUMBITS,FRAGMENT)
+% adds a SBIT field called NAME to the dirfile specified by DIRFILE.
+% The input field is INPUT, the first bit is BITNUM and the length
+% is NUMBITS. The field is added to the fragment indexed by
+% FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_sbit(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_SBIT, GD_OPEN
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.SBIT_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {in_fields}, ...
+ 'bitnum', bitnum, 'numbits', numbits));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,10 +39,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_sbit(D, field_code, in_fields, bitnum, numbits, fragment_index)
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.SBIT_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {in_fields}, ...
- 'bitnum', bitnum, 'numbits', numbits));
-end
Modified: trunk/getdata/bindings/matlab/gd_add_spec.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_spec.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_spec.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,22 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD_SPEC Add a field
+ %
+ % GD_ADD_SPEC(DIRFILE,SPEC,FRAGMENT)
+ % adds a field described by the field specification line SPEC to
+ % the dirfile DIRFILE. The field is added to the fragment indexed
+ % by FRAGMENT.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_add_spec(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_ADD, GD_MADD_SPEC, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_string.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_string.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_string.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,22 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ADD_STRING Add a STRING field
+ %
+ % GD_ADD_STRING(DIRFILE,NAME,VALUE,FRAGMENT)
+ % adds a STRING field called NAME to the dirfile specified by
+ % DIRFILE. The value of the field is set to VALUE. The field is
+ % added to the fragment indexed by FRAGMENT.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_add_string(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_ADD, GD_MADD_STRING, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_add_window.m
===================================================================
--- trunk/getdata/bindings/matlab/gd_add_window.m 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_add_window.m 2013-02-15 03:13:09 UTC (rev 795)
@@ -1,3 +1,28 @@
+function gd_add_window(D, field_code, in_field1, in_field2, windop, ...
+threshold, fragment_index);
+% GD_ADD_WINDOW Add a WINDOW field
+%
+% GD_ADD_WINDOW(DIRFILE,NAME,INPUT1,INPUT2,WINDOP,THRESHOLD,FRAGMENT)
+% adds a WINDOW field called NAME to the dirfile specified by
+% DIRFILE. The data input field is INPUT1, and the mask field is
+% INPUT2. The operator is specified by WINDOP, which should be one
+% of the GD.WINDOP_... members provided by GETDATA_CONSTANTS, and
+% the threshold is THRESHOLD. The field is added to the fragment
+% indexed by FRAGMENT.
+%
+% The DIRFILE object should have previously been created with GD_OPEN.
+%
+% See the documentation on the C API function gd_add_window(3) in section 3
+% of the UNIX manual for more details.
+%
+% See also GD_ADD, GD_MADD_WINDOW, GD_OPEN, GETDATA_CONSTANTS
+
+ GD = getdata_constants();
+ gd_add(D, struct('field', field_code, 'field_type', GD.WINDOW_ENTRY, ...
+ 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ...
+ 'windop', windop, 'threshold', threshold));
+end
+
% Copyright (C) 2013 D. V. Wiebe
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -17,11 +42,3 @@
% You should have received a copy of the GNU Lesser General Public License
% along with GetData; if not, write to the Free Software Foundation, Inc.,
% 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-function gd_add_window(D, field_code, in_field1, in_field2, windop, ...
-threshold, fragment_index);
- GD = getdata_constants();
- gd_add(D, struct('field', field_code, 'field_type', GD.WINDOW_ENTRY, ...
- 'fragment_index', fragment_index, 'in_fields', {{in_field1; in_field2}}, ...
- 'windop', windop, 'threshold', threshold));
-end
Modified: trunk/getdata/bindings/matlab/gd_alias_target.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_alias_target.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_alias_target.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,20 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ALIAS_TARGET Report the target of an /ALIAS
+ %
+ % T = GD_ALIAS_TARGET(DIRFILE,NAME)
+ % returns the target, T, of the alias named NAME.
+ %
+ % The DIRFILE object should have previously been created with GD_OPEN.
+ %
+ % See the documentation on the C API function gd_alias_target(3) in section 3
+ % of the UNIX manual for more details.
+ %
+ % See also GD_ALIASES, GD_OPEN
+ */
+
void mexFunction(int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
DIRFILE *D;
Modified: trunk/getdata/bindings/matlab/gd_aliases.c
===================================================================
--- trunk/getdata/bindings/matlab/gd_aliases.c 2013-02-14 04:06:02 UTC (rev 794)
+++ trunk/getdata/bindings/matlab/gd_aliases.c 2013-02-15 03:13:09 UTC (rev 795)
@@ -20,6 +20,21 @@
*/
#include "gd_matlab.h"
+/*
+ % GD_ALIASES Retrieve a list of aliases for a field
+ %
+ % A = GD_ALIASES(DIRFILE,NAME)
+ % returns a cell array of strings, A, comprising all the aliases of
+ % ...
[truncated message content] |