annotate src/defun-int.h @ 10160:cd96d29c5efa

remove Emacs local-variable settings from source files in src directory
author John W. Eaton <jwe@octave.org>
date Wed, 20 Jan 2010 20:39:26 -0500
parents 5f3c10ecb150
children f3b65e1ae355
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
525
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
1 /*
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
2
7017
a1dbe9d80eee [project @ 2007-10-12 21:27:11 by jwe]
jwe
parents: 7016
diff changeset
3 Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
8920
eb63fbe60fab update copyright notices
John W. Eaton <jwe@octave.org>
parents: 8746
diff changeset
4 2003, 2004, 2005, 2006, 2007, 2008, 2009 John W. Eaton
525
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
5
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
7
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
10 Free Software Foundation; either version 3 of the License, or (at your
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
11 option) any later version.
525
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
12
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
16 for more details.
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
17
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
19 along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
20 <http://www.gnu.org/licenses/>.
525
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
21
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
22 */
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
23
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
24 #if !defined (octave_defun_int_h)
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
25 #define octave_defun_int_h 1
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
26
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
27 #include <string>
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
28
3145
0d640dc625c7 [project @ 1998-02-05 08:44:59 by jwe]
jwe
parents: 3096
diff changeset
29 #include "ov-builtin.h"
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
30 #include "ov-dld-fcn.h"
3145
0d640dc625c7 [project @ 1998-02-05 08:44:59 by jwe]
jwe
parents: 3096
diff changeset
31 #include "symtab.h"
3015
2e114e914b77 [project @ 1997-06-02 21:03:55 by jwe]
jwe
parents: 3014
diff changeset
32 #include "version.h"
2e114e914b77 [project @ 1997-06-02 21:03:55 by jwe]
jwe
parents: 3014
diff changeset
33
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
34 class octave_value;
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
35
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
36 extern OCTINTERP_API void print_usage (void);
8575
f134925a1cfa m-file implementation of help system
Soren Hauberg <soren@hauberg.org>
parents: 7996
diff changeset
37 extern OCTINTERP_API void print_usage (const std::string&);
3014
38de16594cb4 [project @ 1997-06-02 20:28:09 by jwe]
jwe
parents: 3005
diff changeset
38
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
39 extern OCTINTERP_API void check_version (const std::string& version, const std::string& fcn);
3015
2e114e914b77 [project @ 1997-06-02 21:03:55 by jwe]
jwe
parents: 3014
diff changeset
40
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
41 extern OCTINTERP_API void
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3364
diff changeset
42 install_builtin_function (octave_builtin::fcn f, const std::string& name,
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
43 const std::string& doc,
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
44 bool can_hide_function = true);
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
45
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
46 extern OCTINTERP_API void
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3364
diff changeset
47 install_dld_function (octave_dld_function::fcn f, const std::string& name,
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
48 const octave_shlib& shl, const std::string& doc,
6323
ea65de49e18e [project @ 2007-02-17 02:51:02 by jwe]
jwe
parents: 6109
diff changeset
49 bool relative = false);
703
21cc5b9b9ed6 [project @ 1994-09-15 02:39:57 by jwe]
jwe
parents: 578
diff changeset
50
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
51 extern OCTINTERP_API void
5864
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5823
diff changeset
52 install_mex_function (void *fptr, bool fmex, const std::string& name,
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
53 const octave_shlib& shl, bool relative = false);
5864
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5823
diff changeset
54
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
55 extern OCTINTERP_API void
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3364
diff changeset
56 alias_builtin (const std::string& alias, const std::string& name);
703
21cc5b9b9ed6 [project @ 1994-09-15 02:39:57 by jwe]
jwe
parents: 578
diff changeset
57
9960
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
58 // Gets the shlib of the currently executing DLD function, if any.
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
59 extern OCTINTERP_API octave_shlib
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
60 get_current_shlib (void);
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
61
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
62 // This is a convenience class that calls the above function automatically at
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
63 // construction time. When deriving new classes, you can either use it as a field
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
64 // or as a parent (with multiple inheritance).
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
65
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
66 class octave_auto_shlib : public octave_shlib
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
67 {
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
68 octave_auto_shlib (void)
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
69 : octave_shlib (get_current_shlib ()) { }
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
70 octave_auto_shlib (const octave_shlib& shl)
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
71 : octave_shlib (shl) { }
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
72 };
5f3c10ecb150 implement get_current_shlib and octave_auto_shlib
Jaroslav Hajek <highegg@gmail.com>
parents: 8920
diff changeset
73
3743
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
74 #define DECLARE_FUNX(name, args_name, nargout_name) \
6109
c68896f193e3 [project @ 2006-10-27 02:16:18 by jwe]
jwe
parents: 5864
diff changeset
75 OCTAVE_EXPORT octave_value_list \
3743
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
76 name (const octave_value_list& args_name, int nargout_name)
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
77
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
78 #define DECLARE_FUN(name, args_name, nargout_name) \
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
79 DECLARE_FUNX (F ## name, args_name, nargout_name)
2968
e330cb788508 [project @ 1997-05-15 17:40:29 by jwe]
jwe
parents: 2954
diff changeset
80
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
81 // Define the code that will be used to insert the new function into
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
82 // the symbol table. We look for this name instead of the actual
3523
b80bbb43a1a9 [project @ 2000-02-02 10:25:52 by jwe]
jwe
parents: 3364
diff changeset
83 // function so that we can easily install the doc std::string too.
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
84
6323
ea65de49e18e [project @ 2007-02-17 02:51:02 by jwe]
jwe
parents: 6109
diff changeset
85 typedef bool (*octave_dld_fcn_installer) (const octave_shlib&, bool relative);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
86
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
87 typedef octave_function * (*octave_dld_fcn_getter) (const octave_shlib&, bool relative);
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
88
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
89 #define DEFINE_FUN_INSTALLER_FUN(name, doc) \
7996
6a7db240b3a3 configure.in: eliminate CXX_ABI and OCTAVE_CXX_PREPEND_UNDERSCORE
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
90 DEFINE_FUNX_INSTALLER_FUN(#name, F ## name, G ## name, doc)
5796
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
91
7996
6a7db240b3a3 configure.in: eliminate CXX_ABI and OCTAVE_CXX_PREPEND_UNDERSCORE
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
92 #define DEFINE_FUNX_INSTALLER_FUN(name, fname, gname, doc) \
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
93 extern "C" \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
94 OCTAVE_EXPORT \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
95 octave_function * \
7996
6a7db240b3a3 configure.in: eliminate CXX_ABI and OCTAVE_CXX_PREPEND_UNDERSCORE
John W. Eaton <jwe@octave.org>
parents: 7503
diff changeset
96 gname (const octave_shlib& shl, bool relative) \
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
97 { \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
98 octave_function *retval = 0; \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
99 \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
100 check_version (OCTAVE_API_VERSION, name); \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
101 \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
102 if (! error_state) \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
103 { \
7349
a1ab9dbc9622 [project @ 2008-01-07 14:40:23 by jwe]
jwe
parents: 7336
diff changeset
104 octave_dld_function *fcn = octave_dld_function::create (fname, shl, name, doc); \
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
105 \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
106 if (relative) \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
107 fcn->mark_relative (); \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
108 \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
109 retval = fcn; \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
110 } \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
111 \
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7101
diff changeset
112 return retval; \
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
113 }
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 3321
diff changeset
114
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
115 // MAKE_BUILTINS is defined to extract function names and related
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
116 // information and create the *.df files that are eventually used to
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
117 // create the builtins.cc file.
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
118
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
119 #if defined (MAKE_BUILTINS)
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
120
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
121 // Generate code to install name in the symbol table. The script
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
122 // mkdefs will create a .def file for every .cc file that uses DEFUN,
4208
e96f52432059 [project @ 2002-12-03 19:48:57 by jwe]
jwe
parents: 4165
diff changeset
123 // or DEFCMD.
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
124
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
125 #define DEFUN_INTERNAL(name, args_name, nargout_name, doc) \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
126 BEGIN_INSTALL_BUILTIN \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
127 XDEFUN_INTERNAL (name, args_name, nargout_name, doc) \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
128 END_INSTALL_BUILTIN
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
129
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
130 #define DEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
131 BEGIN_INSTALL_BUILTIN \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
132 XDEFCONSTFUN_INTERNAL (name, args_name, nargout_name, doc) \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
133 END_INSTALL_BUILTIN
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
134
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
135 #define DEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
3743
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
136 BEGIN_INSTALL_BUILTIN \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
137 XDEFUNX_INTERNAL (name, fname, args_name, nargout_name, doc) \
3743
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
138 END_INSTALL_BUILTIN
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
139
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
140 // Generate code to install name in the symbol table. The script
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
141 // mkdefs will create a .def file for every .cc file that uses
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
142 // DEFUN_DLD.
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
143
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
144 #define DEFUN_DLD_INTERNAL(name, args_name, nargout_name, doc) \
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
145 BEGIN_INSTALL_BUILTIN \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
146 XDEFUN_DLD_INTERNAL (name, args_name, nargout_name, doc) \
3364
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
147 END_INSTALL_BUILTIN
fac05a83b4c5 [project @ 1999-11-20 03:05:42 by jwe]
jwe
parents: 3325
diff changeset
148
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
149 #define DEFUNX_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
150 BEGIN_INSTALL_BUILTIN \
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
151 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
152 END_INSTALL_BUILTIN
20f4bd627a74 [project @ 2006-05-09 02:04:54 by jwe]
jwe
parents: 5794
diff changeset
153
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
154 // Generate code for making another name for an existing function.
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
155
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
156 #define DEFALIAS_INTERNAL(alias, name) \
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
157 BEGIN_INSTALL_BUILTIN \
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
158 XDEFALIAS_INTERNAL(alias, name) \
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
159 END_INSTALL_BUILTIN
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
160
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
161 #else /* ! MAKE_BUILTINS */
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
162
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
163 // Generate the first line of the function definition. This ensures
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
164 // that the internal functions all have the same signature.
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
165
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
166 #define DEFUN_INTERNAL(name, args_name, nargout_name, doc) \
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
167 DECLARE_FUN (name, args_name, nargout_name)
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
168
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
169 #define DEFCONSTFUN_INTERNAL(name, args_name, nargout_name, doc) \
4234
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
170 DECLARE_FUN (name, args_name, nargout_name)
90e44267e8cf [project @ 2002-12-21 17:15:25 by jwe]
jwe
parents: 4208
diff changeset
171
8746
5dd06f19e9be handle commands in the lexer
John W. Eaton <jwe@octave.org>
parents: 8575
diff changeset
172 #define DEFUNX_INTERNAL(name, fname, args_name, nargout_name, doc) \
3743
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
173 DECLARE_FUNX (fname, args_name, nargout_name)
35daf9714b9a [project @ 2000-11-30 00:19:10 by jwe]
jwe
parents: 3741
diff changeset
174
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
175 // No definition is required for an alias.
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
176
4699
5e2c68946f30 [project @ 2004-01-20 23:04:46 by jwe]
jwe
parents: 4448
diff changeset
177 #define DEFALIAS_INTERNAL(alias, name)
3295
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
178
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
179 #endif /* ! MAKE_BUILTINS */
35a6d027772c [project @ 1999-10-19 10:13:02 by jwe]
jwe
parents: 3258
diff changeset
180
525
509e9a2d93a6 [project @ 1994-07-20 18:45:27 by jwe]
jwe
parents:
diff changeset
181 #endif