Mercurial > octave
annotate libinterp/corefcn/mexproto.h @ 31607:aac27ad79be6 stable
maint: Re-indent code after switch to using namespace macros.
* build-env.h, build-env.in.cc, Cell.h, __betainc__.cc, __eigs__.cc,
__ftp__.cc, __ichol__.cc, __ilu__.cc, __isprimelarge__.cc, __magick_read__.cc,
__pchip_deriv__.cc, amd.cc, base-text-renderer.cc, base-text-renderer.h,
besselj.cc, bitfcns.cc, bsxfun.cc, c-file-ptr-stream.h, call-stack.cc,
call-stack.h, ccolamd.cc, cellfun.cc, chol.cc, colamd.cc, dasrt.cc, data.cc,
debug.cc, defaults.cc, defaults.h, det.cc, display.cc, display.h, dlmread.cc,
dynamic-ld.cc, dynamic-ld.h, ellipj.cc, environment.cc, environment.h,
error.cc, error.h, errwarn.h, event-manager.cc, event-manager.h,
event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h, fft.cc, fft2.cc,
file-io.cc, filter.cc, find.cc, ft-text-renderer.cc, ft-text-renderer.h,
gcd.cc, gl-render.cc, gl-render.h, gl2ps-print.cc, gl2ps-print.h,
graphics-toolkit.cc, graphics-toolkit.h, graphics.cc, gsvd.cc, gtk-manager.cc,
gtk-manager.h, help.cc, help.h, hook-fcn.cc, hook-fcn.h, input.cc, input.h,
interpreter-private.cc, interpreter-private.h, interpreter.cc, interpreter.h,
inv.cc, jsondecode.cc, jsonencode.cc, latex-text-renderer.cc,
latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
lookup.cc, ls-hdf5.cc, ls-mat4.cc, ls-mat5.cc, lsode.cc, lu.cc, mappers.cc,
matrix_type.cc, max.cc, mex.cc, mexproto.h, mxarray.h, mxtypes.in.h,
oct-errno.in.cc, oct-hdf5-types.cc, oct-hist.cc, oct-hist.h, oct-map.cc,
oct-map.h, oct-opengl.h, oct-prcstrm.h, oct-process.cc, oct-process.h,
oct-stdstrm.h, oct-stream.cc, oct-stream.h, oct-strstrm.h,
octave-default-image.h, ordqz.cc, ordschur.cc, pager.cc, pager.h, pinv.cc,
pow2.cc, pr-output.cc, psi.cc, qr.cc, quadcc.cc, rand.cc, regexp.cc,
settings.cc, settings.h, sighandlers.cc, sighandlers.h, sparse-xpow.cc,
sqrtm.cc, stack-frame.cc, stack-frame.h, stream-euler.cc, strfns.cc, svd.cc,
syminfo.cc, syminfo.h, symrcm.cc, symrec.cc, symrec.h, symscope.cc, symscope.h,
symtab.cc, symtab.h, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h,
text-renderer.cc, text-renderer.h, time.cc, toplev.cc, typecast.cc,
url-handle-manager.cc, url-handle-manager.h, urlwrite.cc, utils.cc, utils.h,
variables.cc, variables.h, xdiv.cc, __delaunayn__.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __ode15__.cc, __voronoi__.cc, audioread.cc, convhulln.cc,
gzip.cc, cdef-class.cc, cdef-class.h, cdef-fwd.h, cdef-manager.cc,
cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h,
cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h,
cdef-utils.cc, cdef-utils.h, ov-base-diag.cc, ov-base-int.cc, ov-base-mat.cc,
ov-base-mat.h, ov-base-scalar.cc, ov-base.cc, ov-base.h, ov-bool-mat.cc,
ov-bool-mat.h, ov-bool-sparse.cc, ov-bool.cc, ov-builtin.h, ov-cell.cc,
ov-ch-mat.cc, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h,
ov-complex.cc, ov-cx-diag.cc, ov-cx-mat.cc, ov-cx-sparse.cc, ov-dld-fcn.cc,
ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.h, ov-float.cc,
ov-flt-complex.cc, ov-flt-cx-diag.cc, ov-flt-cx-mat.cc, ov-flt-re-diag.cc,
ov-flt-re-mat.cc, ov-flt-re-mat.h, ov-intx.h, ov-java.cc, ov-lazy-idx.cc,
ov-legacy-range.cc, ov-magic-int.cc, ov-mex-fcn.cc, ov-mex-fcn.h,
ov-null-mat.cc, ov-perm.cc, ov-range.cc, ov-re-diag.cc, ov-re-mat.cc,
ov-re-mat.h, ov-re-sparse.cc, ov-scalar.cc, ov-str-mat.cc, ov-struct.cc,
ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc, ov.h, ovl.h,
octave.cc, octave.h, op-b-sbm.cc, op-bm-sbm.cc, op-cs-scm.cc, op-fm-fcm.cc,
op-fs-fcm.cc, op-s-scm.cc, op-scm-cs.cc, op-scm-s.cc, op-sm-cs.cc, ops.h,
anon-fcn-validator.cc, anon-fcn-validator.h, bp-table.cc, bp-table.h,
comment-list.cc, comment-list.h, filepos.h, lex.h, oct-lvalue.cc, oct-lvalue.h,
parse.h, profiler.cc, profiler.h, pt-anon-scopes.cc, pt-anon-scopes.h,
pt-arg-list.cc, pt-arg-list.h, pt-args-block.cc, pt-args-block.h,
pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h, pt-binop.cc,
pt-binop.h, pt-bp.cc, pt-bp.h, pt-cbinop.cc, pt-cbinop.h, pt-cell.cc,
pt-cell.h, pt-check.cc, pt-check.h, pt-classdef.cc, pt-classdef.h, pt-cmd.h,
pt-colon.cc, pt-colon.h, pt-const.cc, pt-const.h, pt-decl.cc, pt-decl.h,
pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc, pt-exp.h,
pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc, pt-idx.h,
pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.cc, pt-mat.h, pt-misc.cc, pt-misc.h,
pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-spmd.cc, pt-spmd.h,
pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt-unop.cc, pt-unop.h,
pt-walk.cc, pt-walk.h, pt.cc, pt.h, token.cc, token.h, Range.cc, Range.h,
idx-vector.cc, idx-vector.h, range-fwd.h, CollocWt.cc, CollocWt.h,
aepbalance.cc, aepbalance.h, chol.cc, chol.h, gepbalance.cc, gepbalance.h,
gsvd.cc, gsvd.h, hess.cc, hess.h, lo-mappers.cc, lo-mappers.h, lo-specfun.cc,
lo-specfun.h, lu.cc, lu.h, oct-convn.cc, oct-convn.h, oct-fftw.cc, oct-fftw.h,
oct-norm.cc, oct-norm.h, oct-rand.cc, oct-rand.h, oct-spparms.cc,
oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randgamma.cc, randgamma.h,
randmtzig.cc, randmtzig.h, randpoisson.cc, randpoisson.h, schur.cc, schur.h,
sparse-chol.cc, sparse-chol.h, sparse-lu.cc, sparse-lu.h, sparse-qr.cc,
sparse-qr.h, svd.cc, svd.h, child-list.cc, child-list.h, dir-ops.cc, dir-ops.h,
file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, lo-sysdep.cc, lo-sysdep.h,
lo-sysinfo.cc, lo-sysinfo.h, mach-info.cc, mach-info.h, oct-env.cc, oct-env.h,
oct-group.cc, oct-group.h, oct-password.cc, oct-password.h, oct-syscalls.cc,
oct-syscalls.h, oct-time.cc, oct-time.h, oct-uname.cc, oct-uname.h,
action-container.cc, action-container.h, base-list.h, cmd-edit.cc, cmd-edit.h,
cmd-hist.cc, cmd-hist.h, f77-fcn.h, file-info.cc, file-info.h,
lo-array-errwarn.cc, lo-array-errwarn.h, lo-hash.cc, lo-hash.h, lo-ieee.h,
lo-regexp.cc, lo-regexp.h, lo-utils.cc, lo-utils.h, oct-base64.cc,
oct-base64.h, oct-glob.cc, oct-glob.h, oct-inttypes.h, oct-mutex.cc,
oct-mutex.h, oct-refcount.h, oct-shlib.cc, oct-shlib.h, oct-sparse.cc,
oct-sparse.h, oct-string.h, octave-preserve-stream-state.h, pathsearch.cc,
pathsearch.h, quit.cc, quit.h, unwind-prot.cc, unwind-prot.h, url-transfer.cc,
url-transfer.h:
Re-indent code after switch to using namespace macros.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 01 Dec 2022 18:02:15 -0800 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
rev | line source |
---|---|
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
1 //////////////////////////////////////////////////////////////////////// |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
2 // |
30564
796f54d4ddbf
update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents:
29655
diff
changeset
|
3 // Copyright (C) 2006-2022 The Octave Project Developers |
27923
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
4 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
5 // See the file COPYRIGHT.md in the top-level directory of this |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
6 // distribution or <https://octave.org/copyright/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
7 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
8 // This file is part of Octave. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
9 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
10 // Octave is free software: you can redistribute it and/or modify it |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
11 // under the terms of the GNU General Public License as published by |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
12 // the Free Software Foundation, either version 3 of the License, or |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
13 // (at your option) any later version. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
14 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
15 // Octave is distributed in the hope that it will be useful, but |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
16 // WITHOUT ANY WARRANTY; without even the implied warranty of |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
18 // GNU General Public License for more details. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
19 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
20 // You should have received a copy of the GNU General Public License |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
21 // along with Octave; see the file COPYING. If not, see |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
22 // <https://www.gnu.org/licenses/>. |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
23 // |
bd51beb6205e
update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents:
27919
diff
changeset
|
24 //////////////////////////////////////////////////////////////////////// |
5864 | 25 |
26 /* | |
27 | |
28 This code was originally distributed as part of Octave Forge under | |
6064 | 29 the following terms: |
5864 | 30 |
31 Author: Paul Kienzle | |
32 I grant this code to the public domain. | |
33 2001-03-22 | |
34 | |
35 THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND | |
36 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
37 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
38 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
39 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
40 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
41 OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
42 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
43 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
44 OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
45 SUCH DAMAGE. | |
46 | |
47 */ | |
48 | |
49 /* mex.h is for use in C-programs only; do NOT include it in mex.cc */ | |
50 | |
21241
bae38398f5f1
use consistent style for all liboctave and libinterp include guards
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
51 #if ! defined (octave_mexproto_h) |
bae38398f5f1
use consistent style for all liboctave and libinterp include guards
John W. Eaton <jwe@octave.org>
parents:
21200
diff
changeset
|
52 #define octave_mexproto_h 1 |
5864 | 53 |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21241
diff
changeset
|
54 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21241
diff
changeset
|
55 |
5864 | 56 #if defined (__cplusplus) |
21200
fcac5dbbf9ed
maint: Indent #ifdef blocks in libinterp.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
57 # include <cstdlib> |
29654
d13d090cb03a
use std::size_t and std::ptrdiff_t in C++ code (bug #60471)
John W. Eaton <jwe@octave.org>
parents:
29358
diff
changeset
|
58 using std::size_t; |
5864 | 59 extern "C" { |
5900 | 60 #else |
21200
fcac5dbbf9ed
maint: Indent #ifdef blocks in libinterp.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
61 # include <stdlib.h> |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
62 # include <stdbool.h> |
5864 | 63 #endif |
64 | |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
65 #if ! defined (MX_HAS_INTERLEAVED_COMPLEX) |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
66 # define MX_HAS_INTERLEAVED_COMPLEX 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
67 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
68 |
5900 | 69 #define MXARRAY_TYPEDEFS_ONLY |
70 #include "mxarray.h" | |
71 #undef MXARRAY_TYPEDEFS_ONLY | |
72 | |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
73 /* Prototype for the gateway function. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
74 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
75 extern void mexFunction (int nlhs, mxArray *plhs[], |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
76 int nrhs, const mxArray *prhs[]); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
77 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
78 /* Interface to the interpreter. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
79 extern OCTINTERP_API const char * mexFunctionName (void); |
5864 | 80 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
81 extern OCTINTERP_API int mexCallMATLAB (int nargout, mxArray *argout[], |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
82 int nargin, mxArray *argin[], |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
83 const char *fname); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
84 extern OCTINTERP_API mxArray *mexCallMATLABWithTrap (int nargout, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
85 mxArray *argout[], |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
86 int nargin, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
87 mxArray *argin[], |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
88 const char *fname); |
22451
ad5439817753
Add mexCallMATLABWithTrap to MEX API (bug #48949).
Rik <rik@octave.org>
parents:
22407
diff
changeset
|
89 |
6109 | 90 extern OCTINTERP_API int mexEvalString (const char *s); |
22454
8445f67a8123
Add function mexEvalStringWithTrap to MEX API.
Rik <rik@octave.org>
parents:
22451
diff
changeset
|
91 extern OCTINTERP_API mxArray * mexEvalStringWithTrap (const char *s); |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
92 |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
93 extern OCTINTERP_API void mexSetTrapFlag (int flag); |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
94 |
6109 | 95 extern OCTINTERP_API void mexErrMsgTxt (const char *s); |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
96 extern OCTINTERP_API void mexErrMsgIdAndTxt (const char *id, const char *s, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
97 ...); |
6109 | 98 extern OCTINTERP_API void mexWarnMsgTxt (const char *s); |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
99 extern OCTINTERP_API void mexWarnMsgIdAndTxt (const char *id, const char *s, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
100 ...); |
10127
f21fdff5c906
Change signature of mexPrintf.
David Grundberg <davidg@cs.umu.se>
parents:
10126
diff
changeset
|
101 extern OCTINTERP_API int mexPrintf (const char *fmt, ...); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
102 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
103 extern OCTINTERP_API mxArray *mexGetVariable (const char *space, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
104 const char *name); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
105 extern OCTINTERP_API const mxArray *mexGetVariablePtr (const char *space, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
106 const char *name); |
5864 | 107 |
15352
9a8dbd6b6b20
* mysparse.c (mexFunction): Declare pbr and pbr2 as mxLogical*, not bool*.
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
108 extern OCTINTERP_API int mexPutVariable (const char *space, const char *name, |
9a8dbd6b6b20
* mysparse.c (mexFunction): Declare pbr and pbr2 as mxLogical*, not bool*.
John W. Eaton <jwe@octave.org>
parents:
15195
diff
changeset
|
109 const mxArray *ptr); |
5864 | 110 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
111 #if MX_HAS_INTERLEAVED_COMPLEX |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
112 # define mexGet mexGet_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
113 #endif |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
114 extern OCTINTERP_API const mxArray *mexGet (double handle, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
115 const char *property); |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
116 |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
117 extern OCTINTERP_API int mexSet (double handle, const char *property, |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
118 mxArray *val); |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
119 |
6109 | 120 extern OCTINTERP_API void mexMakeArrayPersistent (mxArray *ptr); |
121 extern OCTINTERP_API void mexMakeMemoryPersistent (void *ptr); | |
5879 | 122 |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
123 extern OCTINTERP_API void mexLock (void); |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
124 extern OCTINTERP_API void mexUnlock (void); |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
125 |
6109 | 126 extern OCTINTERP_API int mexIsGlobal (const mxArray *ptr); |
127 extern OCTINTERP_API int mexIsLocked (void); | |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
128 |
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
129 extern OCTINTERP_API int mexAtExit (void (*f) (void)); |
5900 | 130 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
131 /* Floating point predicates. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
132 extern OCTINTERP_API bool mxIsFinite (double v); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
133 extern OCTINTERP_API bool mxIsInf (double v); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
134 extern OCTINTERP_API bool mxIsNaN (double v); |
5900 | 135 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
136 /* Floating point values. */ |
6109 | 137 extern OCTINTERP_API double mxGetEps (void); |
138 extern OCTINTERP_API double mxGetInf (void); | |
139 extern OCTINTERP_API double mxGetNaN (void); | |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
140 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
141 /* Memory management. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
142 extern OCTINTERP_API void * mxCalloc (size_t n, size_t size); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
143 extern OCTINTERP_API void * mxMalloc (size_t n); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
144 extern OCTINTERP_API void * mxRealloc (void *ptr, size_t size); |
6109 | 145 extern OCTINTERP_API void mxFree (void *ptr); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
146 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
147 /* Constructors. */ |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
148 #if MX_HAS_INTERLEAVED_COMPLEX |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
149 # define mxCreateCellArray mxCreateCellArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
150 # define mxCreateCellMatrix mxCreateCellMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
151 # define mxCreateCharArray mxCreateCharArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
152 # define mxCreateCharMatrixFromStrings mxCreateCharMatrixFromStrings_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
153 # define mxCreateDoubleMatrix mxCreateDoubleMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
154 # define mxCreateDoubleScalar mxCreateDoubleScalar_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
155 # define mxCreateLogicalArray mxCreateLogicalArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
156 # define mxCreateLogicalMatrix mxCreateLogicalMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
157 # define mxCreateLogicalScalar mxCreateLogicalScalar_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
158 # define mxCreateNumericArray mxCreateNumericArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
159 # define mxCreateNumericMatrix mxCreateNumericMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
160 # define mxCreateUninitNumericArray mxCreateUninitNumericArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
161 # define mxCreateUninitNumericMatrix mxCreateUninitNumericMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
162 # define mxCreateSparse mxCreateSparse_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
163 # define mxCreateSparseLogicalMatrix mxCreateSparseLogicalMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
164 # define mxCreateString mxCreateString_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
165 # define mxCreateStructArray mxCreateStructArray_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
166 # define mxCreateStructMatrix mxCreateStructMatrix_interleaved |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
167 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
168 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
169 extern OCTINTERP_API mxArray *mxCreateCellArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
170 const mwSize *dims); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
171 extern OCTINTERP_API mxArray * mxCreateCellMatrix (mwSize m, mwSize n); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
172 extern OCTINTERP_API mxArray *mxCreateCharArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
173 const mwSize *dims); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
174 extern OCTINTERP_API mxArray *mxCreateCharMatrixFromStrings (mwSize m, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
175 const char **str); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
176 extern OCTINTERP_API mxArray *mxCreateDoubleMatrix (mwSize nr, mwSize nc, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
177 mxComplexity flag); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
178 extern OCTINTERP_API mxArray * mxCreateDoubleScalar (double val); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
179 extern OCTINTERP_API mxArray *mxCreateLogicalArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
180 const mwSize *dims); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
181 extern OCTINTERP_API mxArray * mxCreateLogicalMatrix (mwSize m, mwSize n); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
182 extern OCTINTERP_API mxArray * mxCreateLogicalScalar (mxLogical val); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
183 extern OCTINTERP_API mxArray *mxCreateNumericArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
184 const mwSize *dims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
185 mxClassID class_id, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
186 mxComplexity flag); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
187 extern OCTINTERP_API mxArray *mxCreateNumericMatrix (mwSize m, mwSize n, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
188 mxClassID class_id, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
189 mxComplexity flag); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
190 extern OCTINTERP_API mxArray *mxCreateUninitNumericArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
191 const mwSize *dims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
192 mxClassID class_id, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
193 mxComplexity flag); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
194 extern OCTINTERP_API mxArray *mxCreateUninitNumericMatrix (mwSize m, mwSize n, |
22464
1d2960b5efe6
Add new MEX fcns mxCreateUninitNumericArray, mxCreateUninitNumericMatrix.
Rik <rik@octave.org>
parents:
22462
diff
changeset
|
195 mxClassID class_id, |
1d2960b5efe6
Add new MEX fcns mxCreateUninitNumericArray, mxCreateUninitNumericMatrix.
Rik <rik@octave.org>
parents:
22462
diff
changeset
|
196 mxComplexity flag); |
1d2960b5efe6
Add new MEX fcns mxCreateUninitNumericArray, mxCreateUninitNumericMatrix.
Rik <rik@octave.org>
parents:
22462
diff
changeset
|
197 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
198 extern OCTINTERP_API mxArray *mxCreateSparse (mwSize m, mwSize n, mwSize nzmax, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
199 mxComplexity flag); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
200 extern OCTINTERP_API mxArray *mxCreateSparseLogicalMatrix (mwSize m, mwSize n, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
201 mwSize nzmax); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
202 extern OCTINTERP_API mxArray * mxCreateString (const char *str); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
203 extern OCTINTERP_API mxArray *mxCreateStructArray (mwSize ndims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
204 const mwSize *dims, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
205 int num_keys, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
206 const char **keys); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
207 extern OCTINTERP_API mxArray *mxCreateStructMatrix (mwSize rows, mwSize cols, |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
208 int num_keys, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
209 const char **keys); |
5900 | 210 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
211 /* Copy constructor. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
212 extern OCTINTERP_API mxArray * mxDuplicateArray (const mxArray *v); |
5900 | 213 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
214 /* Destructor. */ |
6109 | 215 extern OCTINTERP_API void mxDestroyArray (mxArray *v); |
5900 | 216 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
217 /* Type Predicates. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
218 extern OCTINTERP_API bool mxIsCell (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
219 extern OCTINTERP_API bool mxIsChar (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
220 extern OCTINTERP_API bool mxIsClass (const mxArray *ptr, const char *name); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
221 extern OCTINTERP_API bool mxIsComplex (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
222 extern OCTINTERP_API bool mxIsDouble (const mxArray *ptr); |
22471
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
223 /* Matlab seems to have deprecated IsFunctionHandle, but it seems useful */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
224 extern OCTINTERP_API bool mxIsFunctionHandle (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
225 extern OCTINTERP_API bool mxIsInt16 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
226 extern OCTINTERP_API bool mxIsInt32 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
227 extern OCTINTERP_API bool mxIsInt64 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
228 extern OCTINTERP_API bool mxIsInt8 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
229 extern OCTINTERP_API bool mxIsLogical (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
230 extern OCTINTERP_API bool mxIsNumeric (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
231 extern OCTINTERP_API bool mxIsSingle (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
232 extern OCTINTERP_API bool mxIsSparse (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
233 extern OCTINTERP_API bool mxIsStruct (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
234 extern OCTINTERP_API bool mxIsUint16 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
235 extern OCTINTERP_API bool mxIsUint32 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
236 extern OCTINTERP_API bool mxIsUint64 (const mxArray *ptr); |
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
237 extern OCTINTERP_API bool mxIsUint8 (const mxArray *ptr); |
5900 | 238 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
239 /* Odd type+size predicate. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
240 extern OCTINTERP_API bool mxIsLogicalScalar (const mxArray *ptr); |
5900 | 241 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
242 /* Odd type+size+value predicate. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
243 extern OCTINTERP_API bool mxIsLogicalScalarTrue (const mxArray *ptr); |
5900 | 244 |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
245 /* Size predicates. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
246 extern OCTINTERP_API bool mxIsEmpty (const mxArray *ptr); |
22462
6cb7813e5b2f
Add new mxIsScalar function for MEX API.
Rik <rik@octave.org>
parents:
22459
diff
changeset
|
247 extern OCTINTERP_API bool mxIsScalar (const mxArray *ptr); |
5900 | 248 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
249 /* Just plain odd thing to ask of a value. */ |
22465
6149f6b34cbc
Change all mxIs* functions in MEX API to return bool rather than int.
Rik <rik@octave.org>
parents:
22464
diff
changeset
|
250 extern OCTINTERP_API bool mxIsFromGlobalWS (const mxArray *ptr); |
5900 | 251 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
252 /* Dimension extractors. */ |
6686 | 253 extern OCTINTERP_API size_t mxGetM (const mxArray *ptr); |
254 extern OCTINTERP_API size_t mxGetN (const mxArray *ptr); | |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
255 extern OCTINTERP_API const mwSize * mxGetDimensions (const mxArray *ptr); |
6686 | 256 extern OCTINTERP_API mwSize mxGetNumberOfDimensions (const mxArray *ptr); |
257 extern OCTINTERP_API size_t mxGetNumberOfElements (const mxArray *ptr); | |
5900 | 258 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
259 /* Dimension setters. */ |
6686 | 260 extern OCTINTERP_API void mxSetM (mxArray *ptr, mwSize M); |
261 extern OCTINTERP_API void mxSetN (mxArray *ptr, mwSize N); | |
22471
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
262 extern OCTINTERP_API int mxSetDimensions (mxArray *ptr, const mwSize *dims, |
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
263 mwSize ndims); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
264 |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
265 #if MX_HAS_INTERLEAVED_COMPLEX |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
266 extern OCTINTERP_API int mxMakeArrayReal (mxArray *ptr); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
267 extern OCTINTERP_API int mxMakeArrayComplex (mxArray *ptr); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
268 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
269 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
270 /* Data extractors. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
271 extern OCTINTERP_API double * mxGetPr (const mxArray *ptr); |
6109 | 272 extern OCTINTERP_API double mxGetScalar (const mxArray *ptr); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
273 extern OCTINTERP_API mxChar * mxGetChars (const mxArray *ptr); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
274 extern OCTINTERP_API mxLogical * mxGetLogicals (const mxArray *ptr); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
275 extern OCTINTERP_API void * mxGetData (const mxArray *ptr); |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
276 #if MX_HAS_INTERLEAVED_COMPLEX |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
277 extern OCTINTERP_API mxDouble * mxGetDoubles (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
278 extern OCTINTERP_API mxSingle * mxGetSingles (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
279 extern OCTINTERP_API mxInt8 * mxGetInt8s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
280 extern OCTINTERP_API mxInt16 * mxGetInt16s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
281 extern OCTINTERP_API mxInt32 * mxGetInt32s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
282 extern OCTINTERP_API mxInt64 * mxGetInt64s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
283 extern OCTINTERP_API mxUint8 * mxGetUint8s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
284 extern OCTINTERP_API mxUint16 * mxGetUint16s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
285 extern OCTINTERP_API mxUint32 * mxGetUint32s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
286 extern OCTINTERP_API mxUint64 * mxGetUint64s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
287 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
288 extern OCTINTERP_API mxComplexDouble * mxGetComplexDoubles (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
289 extern OCTINTERP_API mxComplexSingle * mxGetComplexSingles (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
290 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
291 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
292 extern OCTINTERP_API mxComplexInt8 * mxGetComplexInt8s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
293 extern OCTINTERP_API mxComplexInt16 * mxGetComplexInt16s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
294 extern OCTINTERP_API mxComplexInt32 * mxGetComplexInt32s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
295 extern OCTINTERP_API mxComplexInt64 * mxGetComplexInt64s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
296 extern OCTINTERP_API mxComplexUint8 * mxGetComplexUint8s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
297 extern OCTINTERP_API mxComplexUint16 * mxGetComplexUint16s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
298 extern OCTINTERP_API mxComplexUint32 * mxGetComplexUint32s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
299 extern OCTINTERP_API mxComplexUint64 * mxGetComplexUint64s (const mxArray *p); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
300 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
301 #else |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
302 extern OCTINTERP_API double * mxGetPi (const mxArray *ptr); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
303 extern OCTINTERP_API void * mxGetImagData (const mxArray *ptr); |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
304 #endif |
5900 | 305 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
306 /* Data setters. */ |
6109 | 307 extern OCTINTERP_API void mxSetPr (mxArray *ptr, double *pr); |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
308 extern OCTINTERP_API void mxSetData (mxArray *ptr, void *data); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
309 #if MX_HAS_INTERLEAVED_COMPLEX |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
310 extern OCTINTERP_API int mxSetDoubles (mxArray *p, mxDouble *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
311 extern OCTINTERP_API int mxSetSingles (mxArray *p, mxSingle *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
312 extern OCTINTERP_API int mxSetInt8s (mxArray *p, mxInt8 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
313 extern OCTINTERP_API int mxSetInt16s (mxArray *p, mxInt16 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
314 extern OCTINTERP_API int mxSetInt32s (mxArray *p, mxInt32 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
315 extern OCTINTERP_API int mxSetInt64s (mxArray *p, mxInt64 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
316 extern OCTINTERP_API int mxSetUint8s (mxArray *p, mxUint8 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
317 extern OCTINTERP_API int mxSetUint16s (mxArray *p, mxUint16 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
318 extern OCTINTERP_API int mxSetUint32s (mxArray *p, mxUint32 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
319 extern OCTINTERP_API int mxSetUint64s (mxArray *p, mxUint64 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
320 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
321 extern OCTINTERP_API int mxSetComplexDoubles (mxArray *p, mxComplexDouble *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
322 extern OCTINTERP_API int mxSetComplexSingles (mxArray *p, mxComplexSingle *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
323 #if 0 |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
324 /* We don't have these yet. */ |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
325 extern OCTINTERP_API int mxSetComplexInt8s (mxArray *p, mxComplexInt8 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
326 extern OCTINTERP_API int mxSetComplexInt16s (mxArray *p, mxComplexInt16 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
327 extern OCTINTERP_API int mxSetComplexInt32s (mxArray *p, mxComplexInt32 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
328 extern OCTINTERP_API int mxSetComplexInt64s (mxArray *p, mxComplexInt64 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
329 extern OCTINTERP_API int mxSetComplexUint8s (mxArray *p, mxComplexUint8 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
330 extern OCTINTERP_API int mxSetComplexUint16s (mxArray *p, mxComplexUint16 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
331 extern OCTINTERP_API int mxSetComplexUint32s (mxArray *p, mxComplexUint32 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
332 extern OCTINTERP_API int mxSetComplexUint64s (mxArray *p, mxComplexUint64 *d); |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
333 #endif |
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
334 #else |
6109 | 335 extern OCTINTERP_API void mxSetPi (mxArray *ptr, double *pi); |
336 extern OCTINTERP_API void mxSetImagData (mxArray *ptr, void *pi); | |
28126
4c21f99b4ad5
handle interleaved complex data and new typed data access functions for mex
John W. Eaton <jwe@octave.org>
parents:
27923
diff
changeset
|
337 #endif |
5900 | 338 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
339 /* Classes. */ |
6109 | 340 extern OCTINTERP_API mxClassID mxGetClassID (const mxArray *ptr); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
341 extern OCTINTERP_API const char * mxGetClassName (const mxArray *ptr); |
6109 | 342 extern OCTINTERP_API void mxSetClassName (mxArray *ptr, const char *name); |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
343 extern OCTINTERP_API mxArray *mxGetProperty (const mxArray *ptr, mwIndex idx, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
344 const char *property_name); |
23893
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
345 extern OCTINTERP_API void mxSetProperty (mxArray *ptr, mwIndex idx, |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
346 const char *property_name, |
75eff5b667b3
new mxSetProperty function for MEX API
John W. Eaton <jwe@octave.org>
parents:
23891
diff
changeset
|
347 const mxArray *property_value); |
5900 | 348 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
349 /* Cell support. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
350 extern OCTINTERP_API mxArray * mxGetCell (const mxArray *ptr, mwIndex idx); |
5900 | 351 |
6686 | 352 extern OCTINTERP_API void mxSetCell (mxArray *ptr, mwIndex idx, mxArray *val); |
5900 | 353 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
354 /* Sparse support. */ |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
355 extern OCTINTERP_API mwIndex * mxGetIr (const mxArray *ptr); |
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
356 extern OCTINTERP_API mwIndex * mxGetJc (const mxArray *ptr); |
6686 | 357 extern OCTINTERP_API mwSize mxGetNzmax (const mxArray *ptr); |
5900 | 358 |
6686 | 359 extern OCTINTERP_API void mxSetIr (mxArray *ptr, mwIndex *ir); |
360 extern OCTINTERP_API void mxSetJc (mxArray *ptr, mwIndex *jc); | |
361 extern OCTINTERP_API void mxSetNzmax (mxArray *ptr, mwSize nzmax); | |
5900 | 362 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
363 /* Structure support. */ |
6109 | 364 extern OCTINTERP_API int mxAddField (mxArray *ptr, const char *key); |
5900 | 365 |
6109 | 366 extern OCTINTERP_API void mxRemoveField (mxArray *ptr, int key_num); |
5900 | 367 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
368 extern OCTINTERP_API mxArray *mxGetField (const mxArray *ptr, mwIndex index, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
369 const char *key); |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
370 extern OCTINTERP_API mxArray *mxGetFieldByNumber (const mxArray *ptr, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
371 mwIndex index, int key_num); |
5900 | 372 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
373 extern OCTINTERP_API void mxSetField (mxArray *ptr, mwIndex index, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
374 const char *key, mxArray *val); |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
375 extern OCTINTERP_API void mxSetFieldByNumber (mxArray *ptr, mwIndex index, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
376 int key_num, mxArray *val); |
5900 | 377 |
6109 | 378 extern OCTINTERP_API int mxGetNumberOfFields (const mxArray *ptr); |
5900 | 379 |
31607
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
380 extern OCTINTERP_API const char *mxGetFieldNameByNumber (const mxArray *ptr, |
aac27ad79be6
maint: Re-indent code after switch to using namespace macros.
Rik <rik@octave.org>
parents:
30564
diff
changeset
|
381 int key_num); |
6109 | 382 extern OCTINTERP_API int mxGetFieldNumber (const mxArray *ptr, const char *key); |
5900 | 383 |
17787
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
384 extern OCTINTERP_API int mxGetString (const mxArray *ptr, char *buf, |
175b392e91fe
Use GNU style coding conventions for code in libinterp/
Rik <rik@octave.org>
parents:
17744
diff
changeset
|
385 mwSize buflen); |
23446
cd4e1ee28716
maint: Use convention 'void * fcn ()' for functions which return pointers.
Rik <rik@octave.org>
parents:
23441
diff
changeset
|
386 extern OCTINTERP_API char * mxArrayToString (const mxArray *ptr); |
11586
12df7854fa7c
strip trailing whitespace from source files
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
387 |
9651
7234534f47ba
mexproto.h: define OCTINTERP_API if it is not already defined
John W. Eaton <jwe@octave.org>
parents:
9650
diff
changeset
|
388 /* Miscellaneous. */ |
22471
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
389 extern OCTINTERP_API mwIndex mxCalcSingleSubscript (const mxArray *ptr, |
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
390 mwSize nsubs, |
667d353d1ab8
Clean up MEX API prototypes to match Matlab.
Rik <rik@octave.org>
parents:
22465
diff
changeset
|
391 mwIndex *subs); |
22459
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
392 |
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
393 extern OCTINTERP_API size_t mxGetElementSize (const mxArray *ptr); |
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
394 |
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
395 #if defined (MEX_DEBUG) |
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
396 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
397 # define mxAssert(expr, msg) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
398 do \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
399 { \ |
23037
0412dc701e28
mexproto.h (mxAssert, mxAssertS): ensure operator precedence (bug #50050)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
22471
diff
changeset
|
400 if (! (expr)) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
401 { \ |
24721 | 402 if (msg && msg[0]) \ |
403 mexErrMsgIdAndTxt \ | |
404 ("Octave:MEX", \ | |
405 "Assertion failed: %s, at line %d of file \"%s\".\n%s\n", \ | |
406 #expr, __LINE__, __FILE__, msg); \ | |
22459
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
407 else \ |
24721 | 408 mexErrMsgIdAndTxt \ |
409 ("Octave:MEX", \ | |
410 "Assertion failed: %s, at line %d of file \"%s\".\n", \ | |
411 #expr, __LINE__, __FILE__); \ | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
412 } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
413 } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
414 while (0) |
5900 | 415 |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
416 # define mxAssertS(expr, msg) \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
417 do \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
418 { \ |
23037
0412dc701e28
mexproto.h (mxAssert, mxAssertS): ensure operator precedence (bug #50050)
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents:
22471
diff
changeset
|
419 if (! (expr)) \ |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
420 { \ |
24721 | 421 if (msg && msg[0]) \ |
422 mexErrMsgIdAndTxt \ | |
423 ("Octave:MEX", \ | |
424 "Assertion failed at line %d of file \"%s\".\n%s\n", \ | |
425 __LINE__, __FILE__, msg); \ | |
22459
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
426 else \ |
24721 | 427 mexErrMsgIdAndTxt \ |
428 ("Octave:MEX", \ | |
429 "Assertion failed at line %d of file \"%s\".\n", \ | |
430 __LINE__, __FILE__); \ | |
22197
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
431 } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
432 } \ |
e43d83253e28
refill multi-line macro definitions
John W. Eaton <jwe@octave.org>
parents:
21724
diff
changeset
|
433 while (0) |
22459
6af82fc041a4
Implement Matlab-compatible MEX functions mxAssert and mxAssertS.
Rik <rik@octave.org>
parents:
22454
diff
changeset
|
434 |
5900 | 435 #else |
21200
fcac5dbbf9ed
maint: Indent #ifdef blocks in libinterp.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
436 # define mxAssert(expr, msg) |
fcac5dbbf9ed
maint: Indent #ifdef blocks in libinterp.
Rik <rik@octave.org>
parents:
19697
diff
changeset
|
437 # define mxAssertS(expr, msg) |
5879 | 438 #endif |
439 | |
5864 | 440 #if defined (__cplusplus) |
441 } | |
442 #endif | |
443 | |
444 #endif |