annotate libinterp/mkbuiltins @ 21244:1473547f50f5

include octave-config.h in public header files * mk-opts.pl, mkbuiltins, mk-ops.awk, sparse-mk-ops.awk: Emit "#include octave-config.h" statement for generated header files. * build-env.h, builtins.h, Cell.h, base-text-renderer.h, c-file-ptr-stream.h, cdisplay.h, comment-list.h, data.h, debug.h, defaults.in.h, defun-dld.h, defun-int.h, defun.h, dirfns.h, display.h, dynamic-ld.h, error.h, errwarn.h, event-queue.h, file-io.h, ft-text-renderer.h, gl-render.h, gl2ps-print.h, graphics.in.h, gripes.h, help.h, hook-fcn.h, input.h, jit-ir.h, jit-typeinfo.h, jit-util.h, load-path.h, load-save.h, ls-ascii-helper.h, ls-hdf5.h, ls-mat-ascii.h, ls-mat4.h, ls-mat5.h, ls-oct-binary.h, ls-oct-text.h, ls-utils.h, mex.h, mexproto.h, mxarray.in.h, oct-errno.h, oct-fstrm.h, oct-handle.h, oct-hdf5-types.h, oct-hdf5.h, oct-hist.h, oct-iostrm.h, oct-lvalue.h, oct-map.h, oct-obj.h, oct-opengl.h, oct-prcstrm.h, oct-procbuf.h, oct-stdstrm.h, oct-stream.h, oct-strstrm.h, oct.h, octave-default-image.h, octave-link.h, octave-preserve-stream-state.h, pager.h, pr-output.h, procstream.h, profiler.h, pt-jit.h, sighandlers.h, siglist.h, sparse-xdiv.h, sparse-xpow.h, symtab.h, sysdep.h, text-renderer.h, toplev.h, txt-eng.h, utils.h, variables.h, workspace-element.h, xdiv.h, xnorm.h, xpow.h, zfstream.h, oct-qhull.h, ov-base-diag.h, ov-base-int.h, ov-base-mat.h, ov-base-scalar.h, ov-base-sparse.h, ov-base.h, ov-bool-mat.h, ov-bool-sparse.h, ov-bool.h, ov-builtin.h, ov-cell.h, ov-ch-mat.h, ov-class.h, ov-classdef.h, ov-colon.h, ov-complex.h, ov-cs-list.h, ov-cx-diag.h, ov-cx-mat.h, ov-cx-sparse.h, ov-dld-fcn.h, ov-fcn-handle.h, ov-fcn-inline.h, ov-fcn.h, ov-float.h, ov-flt-complex.h, ov-flt-cx-diag.h, ov-flt-cx-mat.h, ov-flt-re-diag.h, ov-flt-re-mat.h, ov-int-traits.h, ov-int16.h, ov-int32.h, ov-int64.h, ov-int8.h, ov-intx.h, ov-java.h, ov-lazy-idx.h, ov-mex-fcn.h, ov-null-mat.h, ov-oncleanup.h, ov-perm.h, ov-range.h, ov-re-diag.h, ov-re-mat.h, ov-re-sparse.h, ov-scalar.h, ov-str-mat.h, ov-struct.h, ov-type-conv.h, ov-typeinfo.h, ov-uint16.h, ov-uint32.h, ov-uint64.h, ov-uint8.h, ov-usr-fcn.h, ov.h, ovl.h, octave.h, op-int.h, ops.h, options-usage.h, lex.h, parse.h, pt-all.h, pt-arg-list.h, pt-array-list.h, pt-assign.h, pt-binop.h, pt-bp.h, pt-cbinop.h, pt-cell.h, pt-check.h, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.h, pt-eval.h, pt-except.h, pt-exp.h, pt-fcn-handle.h, pt-funcall.h, pt-id.h, pt-idx.h, pt-jump.h, pt-loop.h, pt-mat.h, pt-misc.h, pt-pr-code.h, pt-select.h, pt-stmt.h, pt-unop.h, pt-walk.h, pt.h, token.h, version.in.h, Array-util.h, Array.h, CColVector.h, CDiagMatrix.h, CMatrix.h, CNDArray.h, CRowVector.h, CSparse.h, DiagArray2.h, MArray.h, MDiagArray2.h, MSparse.h, Matrix.h, MatrixType.h, PermMatrix.h, Range.h, Sparse.h, boolMatrix.h, boolNDArray.h, boolSparse.h, chMatrix.h, chNDArray.h, dColVector.h, dDiagMatrix.h, dMatrix.h, dNDArray.h, dRowVector.h, dSparse.h, dim-vector.h, fCColVector.h, fCDiagMatrix.h, fCMatrix.h, fCNDArray.h, fCRowVector.h, fColVector.h, fDiagMatrix.h, fMatrix.h, fNDArray.h, fRowVector.h, idx-vector.h, int16NDArray.h, int32NDArray.h, int64NDArray.h, int8NDArray.h, intNDArray.h, uint16NDArray.h, uint32NDArray.h, uint64NDArray.h, uint8NDArray.h, f77-fcn.h, lo-error.h, quit.h, CmplxAEPBAL.h, CmplxCHOL.h, CmplxGEPBAL.h, CmplxHESS.h, CmplxLU.h, CmplxQR.h, CmplxQRP.h, CmplxSCHUR.h, CmplxSVD.h, CollocWt.h, DAE.h, DAEFunc.h, DAERT.h, DAERTFunc.h, DASPK.h, DASRT.h, DASSL.h, DET.h, EIG.h, LSODE.h, ODE.h, ODEFunc.h, ODES.h, ODESFunc.h, Quad.h, base-aepbal.h, base-dae.h, base-de.h, base-lu.h, base-min.h, base-qr.h, bsxfun-decl.h, bsxfun.h, dbleAEPBAL.h, dbleCHOL.h, dbleGEPBAL.h, dbleHESS.h, dbleLU.h, dbleQR.h, dbleQRP.h, dbleSCHUR.h, dbleSVD.h, eigs-base.h, fCmplxAEPBAL.h, fCmplxCHOL.h, fCmplxGEPBAL.h, fCmplxHESS.h, fCmplxLU.h, fCmplxQR.h, fCmplxQRP.h, fCmplxSCHUR.h, fCmplxSVD.h, fEIG.h, floatAEPBAL.h, floatCHOL.h, floatGEPBAL.h, floatHESS.h, floatLU.h, floatQR.h, floatQRP.h, floatSCHUR.h, floatSVD.h, lo-mappers.h, lo-specfun.h, oct-convn.h, oct-fftw.h, oct-norm.h, oct-rand.h, oct-spparms.h, randgamma.h, randmtzig.h, randpoisson.h, sparse-chol.h, sparse-dmsolve.h, sparse-lu.h, sparse-qr.h, Sparse-diag-op-defs.h, Sparse-op-decls.h, Sparse-op-defs.h, Sparse-perm-op-defs.h, mx-base.h, mx-defs.h, mx-ext.h, mx-op-decl.h, mx-op-defs.h, dir-ops.h, file-ops.h, file-stat.h, lo-sysdep.h, mach-info.h, oct-env.h, oct-group.h, oct-openmp.h, oct-passwd.h, oct-syscalls.h, oct-time.h, oct-uname.h, pathlen.h, sysdir.h, syswait.h, action-container.h, base-list.h, byte-swap.h, caseless-str.h, cmd-edit.h, cmd-hist.h, data-conv.h, functor.h, glob-match.h, lo-array-errwarn.h, lo-array-gripes.h, lo-cutils.h, lo-ieee.h, lo-macros.h, lo-math.h, lo-regexp.h, lo-traits.h, lo-utils.h, oct-alloc.h, oct-base64.h, oct-binmap.h, oct-cmplx.h, oct-glob.h, oct-inttypes.h, oct-locbuf.h, oct-mutex.h, oct-refcount.h, oct-rl-edit.h, oct-rl-hist.h, oct-shlib.h, oct-sort.h, oct-sparse.h, pathsearch.h, singleton-cleanup.h, sparse-sort.h, sparse-util.h, statdefs.h, str-vec.h, sun-utils.h, unwind-prot.h, url-transfer.h: Include octave-config.h.
author John W. Eaton <jwe@octave.org>
date Wed, 10 Feb 2016 14:25:53 -0500
parents 48b2ad5ee801
children 1bca6c72d2b1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6218
c1b66b74937d [project @ 2006-12-27 17:43:50 by jwe]
jwe
parents: 5796
diff changeset
1 #! /bin/sh
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
2 #
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19593
diff changeset
3 # Copyright (C) 1996-2015 John W. Eaton
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
4 #
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
5 # This file is part of Octave.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
6 #
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
7 # Octave is free software; you can redistribute it and/or modify it
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
8 # under the terms of the GNU General Public License as published by the
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
9 # Free Software Foundation; either version 3 of the License, or (at
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
10 # your option) any later version.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
11 #
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
12 # Octave is distributed in the hope that it will be useful, but WITHOUT
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
15 # for more details.
19593
446c46af4b42 strip trailing whitespace from most source files
John W. Eaton <jwe@octave.org>
parents: 17744
diff changeset
16 #
7019
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
17 # You should have received a copy of the GNU General Public License
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
18 # along with Octave; see the file COPYING. If not, see
4270ded9ddc6 [project @ 2007-10-13 01:42:20 by jwe]
jwe
parents: 6218
diff changeset
19 # <http://www.gnu.org/licenses/>.
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
20
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
21 if test $# -lt 2; then
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
22 echo "usage: mkbuiltins --header|--source f1 f2 ..." 1>&2
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
23 exit 1
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
24 fi
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
25
4299
02fcb550f20c [project @ 2003-01-16 20:15:14 by jwe]
jwe
parents: 4234
diff changeset
26 SED=${SED:-'sed'}
02fcb550f20c [project @ 2003-01-16 20:15:14 by jwe]
jwe
parents: 4234
diff changeset
27
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
28 make_header=false
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
29 make_source=false
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
30 case "$1" in
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
31 --header)
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
32 make_header=true
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
33 shift
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
34 ;;
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
35 --source)
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
36 make_source=true
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
37 shift
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
38 ;;
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
39 *)
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
40 echo "mkbuiltins: unrecognized option: $1" 1>&2
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
41 exit 1
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
42 ;;
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
43 esac
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
44
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
45 if $make_header; then
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
46
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
47 cat << \EOF
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
48 // DO NOT EDIT! Generated automatically by mkbuiltins.
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
49
20791
f7084eae3318 maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents: 19697
diff changeset
50 #if ! defined (octave_builtin_defun_decls_h)
15419
2afbe4295682 correct name of include guard in generated builtin-defun-decls.h file
John W. Eaton <jwe@octave.org>
parents: 15418
diff changeset
51 #define octave_builtin_defun_decls_h 1
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
52
21244
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20940
diff changeset
53 #include "octave-config.h"
1473547f50f5 include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents: 20940
diff changeset
54
20940
48b2ad5ee801 maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents: 20791
diff changeset
55 #include "ovl.h"
15422
57e685d135ec include oct-obj.h in generated builtin-defun-decls.h file
John W. Eaton <jwe@octave.org>
parents: 15419
diff changeset
56
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
57 #define DEFUN_DECL(name) \
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
58 extern OCTINTERP_API octave_value_list \
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
59 name (const octave_value_list& = octave_value_list (), int = 0);
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
60
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
61 EOF
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
62
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
63 $SED -n -e 's/ *\(XDEFUN\|XDEFCONSTFUN\)_INTERNAL *( *\([_A-Za-z][_A-Za-z0-9]*\) *,.*$/DEFUN_DECL (F\2);/p; s/^ *XDEFUNX_INTERNAL *( *"\([_A-Za-z][_A-Za-z0-9]*\)" *,.*$/DEFUN_DECL (F\1);/p' "$@"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
64
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
65 cat << \EOF
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
66
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
67 #undef DEFUN_DECL
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
68
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
69 #endif
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
70
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
71 EOF
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
72
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
73 else
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
74
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
75 cat << \EOF
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
76 // DO NOT EDIT! Generated automatically by mkbuiltins.
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
77
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
78 #ifdef HAVE_CONFIG_H
15268
307912900544 Use angle brackets for #include <config.h> for consistency.
Rik <rik@octave.org>
parents: 15195
diff changeset
79 #include <config.h>
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
80 #endif
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
81
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2910
diff changeset
82 #include "defun.h"
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15422
diff changeset
83 #include "help.h"
20940
48b2ad5ee801 maint: Rename oct-obj.[cc|h] to ovl.[cc|h] for clarity.
Rik <rik@octave.org>
parents: 20791
diff changeset
84 #include "ovl.h"
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
85 #include "variables.h"
7210
818b1417bce9 [project @ 2007-11-28 16:43:13 by jwe]
jwe
parents: 7019
diff changeset
86 #include "builtins.h"
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
87
3399
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
88 #if defined (quad)
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
89 #undef quad
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
90 #endif
e665633c76af [project @ 1999-12-22 22:11:50 by jwe]
jwe
parents: 3364
diff changeset
91
4128
919b2f6573ee [project @ 2002-10-25 20:36:14 by jwe]
jwe
parents: 4110
diff changeset
92 #if defined (ENABLE_DYNAMIC_LINKING)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
93
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
94 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
95
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
96 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
97
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
98 #else
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
99
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
100 #define XDEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) \
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
101 XDEFUN_INTERNAL(name, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
102
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
103 #define XDEFUNX_DLD_INTERNAL(name, fname, args_name, nargout_name, doc) \
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
104 XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
105
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
106 #endif
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3321
diff changeset
107
15004
ea6997657614 which: provide source file name for built-in functions
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
108 #define XDEFUN_FILE_NAME(name) \
ea6997657614 which: provide source file name for built-in functions
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
109 std::string file = name;
9014
71fca0fc2436 save source file names for functions as comments in .texi files
John W. Eaton <jwe@octave.org>
parents: 8920
diff changeset
110
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
111 #define XDEFUN_INTERNAL(name, args_name, nargout_name, doc) \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
112 extern DECLARE_FUN (name, args_name, nargout_name); \
15004
ea6997657614 which: provide source file name for built-in functions
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
113 install_builtin_function (F ## name, #name, file, doc); \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4128
diff changeset
114
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
115 #define XDEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4128
diff changeset
116 extern DECLARE_FUN (name, args_name, nargout_name); \
15004
ea6997657614 which: provide source file name for built-in functions
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
117 install_builtin_function (F ## name, #name, file, doc, false); \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
118
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
119 #define XDEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
3744
b0588fc1f3ca [project @ 2000-11-30 00:27:00 by jwe]
jwe
parents: 3399
diff changeset
120 extern DECLARE_FUNX (fname, args_name, nargout_name); \
15004
ea6997657614 which: provide source file name for built-in functions
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
121 install_builtin_function (fname, name, file, doc); \
3744
b0588fc1f3ca [project @ 2000-11-30 00:27:00 by jwe]
jwe
parents: 3399
diff changeset
122
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
123 #define XDEFALIAS_INTERNAL(alias, name) \
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
124 alias_builtin (#alias, #name);
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
125
3321
6923abb04e16 [project @ 1999-10-26 18:15:30 by jwe]
jwe
parents: 3295
diff changeset
126 #define XDEFCONST_INTERNAL(name, defn, doc)
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3225
diff changeset
127
2373
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
128 EOF
d423dcc0ac32 [project @ 1996-10-12 00:19:58 by jwe]
jwe
parents: 2335
diff changeset
129
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
130 for arg
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
131 do
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
132 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
133 echo "static void"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
134 echo "install_${fcn}_fcns (void)"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
135 echo "{"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
136 cat "$arg"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
137 echo "}"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
138 echo ""
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
139 done
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
140
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
141 cat << \EOF
2907
8bb31a2b480b [project @ 1997-04-30 05:01:46 by jwe]
jwe
parents: 2890
diff changeset
142
7503
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7210
diff changeset
143 void
8c32f95c2639 convert mapper functions to new format
David Bateman <dbateman@free.fr>
parents: 7210
diff changeset
144 install_builtins (void)
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
145 {
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
146 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
147
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
148 for arg
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
149 do
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
150 fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'`
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
151 echo " install_${fcn}_fcns ();"
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
152 done
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
153
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
154 cat << \EOF
15470
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15422
diff changeset
155
bf0857c789f4 initialize docstrings for built-in functions from file
John W. Eaton <jwe@octave.org>
parents: 15422
diff changeset
156 install_built_in_docstrings ();
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
157 }
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
158
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
159 EOF
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
160
15418
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
161 fi
60090630cb76 generate declarations for all built-in DEFUN functions
John W. Eaton <jwe@octave.org>
parents: 15268
diff changeset
162
2335
4a9feb849125 [project @ 1996-07-19 02:51:02 by jwe]
jwe
parents:
diff changeset
163 exit 0