1
|
1 // Builtin function support. -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1992, 1993 John W. Eaton |
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
|
10 Free Software Foundation; either version 2, or (at your option) any |
|
11 later version. |
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
|
19 along with Octave; see the file COPYING. If not, write to the Free |
|
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. |
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (_builtins_h) |
|
25 #define _builtins_h 1 |
|
26 |
|
27 #ifdef __GNUG__ |
|
28 #pragma interface |
|
29 #endif |
|
30 |
|
31 #include <Complex.h> |
|
32 |
|
33 #include "help.h" |
|
34 |
|
35 #ifndef MAPPER_FCN_TYPEDEFS |
|
36 #define MAPPER_FCN_TYPEDEFS 1 |
|
37 |
|
38 typedef double (*d_d_Mapper)(double); |
|
39 typedef double (*d_c_Mapper)(const Complex&); |
|
40 typedef Complex (*c_c_Mapper)(const Complex&); |
|
41 |
|
42 #endif |
|
43 |
|
44 struct Mapper_fcn |
|
45 { |
|
46 int neg_arg_complex; |
|
47 d_d_Mapper d_d_mapper; |
|
48 d_c_Mapper d_c_mapper; |
|
49 c_c_Mapper c_c_mapper; |
|
50 }; |
|
51 |
|
52 struct builtin_mapper_functions |
|
53 { |
|
54 char *name; |
|
55 int nargin_max; |
|
56 int nargout_max; |
|
57 int neg_arg_complex; |
|
58 d_d_Mapper d_d_mapper; |
|
59 d_c_Mapper d_c_mapper; |
|
60 c_c_Mapper c_c_mapper; |
|
61 char *help_string; |
|
62 }; |
|
63 |
|
64 #ifndef SV_FUNCTION_TYPEDEFS |
|
65 #define SV_FUNCTION_TYPEDEFS 1 |
|
66 |
|
67 typedef int (*sv_Function)(void); |
|
68 |
|
69 #endif |
|
70 |
|
71 struct builtin_string_variables |
|
72 { |
|
73 char *name; |
|
74 char *value; |
|
75 sv_Function sv_function; |
|
76 char *help_string; |
|
77 }; |
|
78 |
|
79 extern void install_builtins (void); |
|
80 extern int is_text_function_name (char *s); |
|
81 |
|
82 extern help_list *builtin_mapper_functions_help (void); |
|
83 extern help_list *builtin_general_functions_help (void); |
|
84 extern help_list *builtin_text_functions_help (void); |
|
85 extern help_list *builtin_variables_help (void); |
|
86 |
|
87 #endif |
|
88 |
|
89 /* |
|
90 ;;; Local Variables: *** |
|
91 ;;; mode: C++ *** |
|
92 ;;; page-delimiter: "^/\\*" *** |
|
93 ;;; End: *** |
|
94 */ |