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 |
164
|
31 class Complex; |
|
32 struct help_list; |
1
|
33 |
|
34 #ifndef MAPPER_FCN_TYPEDEFS |
|
35 #define MAPPER_FCN_TYPEDEFS 1 |
|
36 |
|
37 typedef double (*d_d_Mapper)(double); |
|
38 typedef double (*d_c_Mapper)(const Complex&); |
|
39 typedef Complex (*c_c_Mapper)(const Complex&); |
|
40 |
|
41 #endif |
|
42 |
|
43 struct Mapper_fcn |
|
44 { |
|
45 int neg_arg_complex; |
|
46 d_d_Mapper d_d_mapper; |
|
47 d_c_Mapper d_c_mapper; |
|
48 c_c_Mapper c_c_mapper; |
|
49 }; |
|
50 |
|
51 struct builtin_mapper_functions |
|
52 { |
|
53 char *name; |
|
54 int nargin_max; |
|
55 int nargout_max; |
|
56 int neg_arg_complex; |
|
57 d_d_Mapper d_d_mapper; |
|
58 d_c_Mapper d_c_mapper; |
|
59 c_c_Mapper c_c_mapper; |
|
60 char *help_string; |
|
61 }; |
|
62 |
|
63 #ifndef SV_FUNCTION_TYPEDEFS |
|
64 #define SV_FUNCTION_TYPEDEFS 1 |
|
65 |
|
66 typedef int (*sv_Function)(void); |
|
67 |
|
68 #endif |
|
69 |
|
70 struct builtin_string_variables |
|
71 { |
|
72 char *name; |
|
73 char *value; |
|
74 sv_Function sv_function; |
|
75 char *help_string; |
|
76 }; |
|
77 |
|
78 extern void install_builtins (void); |
164
|
79 extern int is_text_function_name (const char *s); |
1
|
80 |
|
81 extern help_list *builtin_mapper_functions_help (void); |
|
82 extern help_list *builtin_general_functions_help (void); |
|
83 extern help_list *builtin_text_functions_help (void); |
|
84 extern help_list *builtin_variables_help (void); |
|
85 |
|
86 #endif |
|
87 |
|
88 /* |
|
89 ;;; Local Variables: *** |
|
90 ;;; mode: C++ *** |
|
91 ;;; page-delimiter: "^/\\*" *** |
|
92 ;;; End: *** |
|
93 */ |