annotate src/dynamic-ld.cc @ 2893:9fd1df4b464a

[project @ 1997-04-28 02:07:38 by jwe]
author jwe
date Mon, 28 Apr 1997 02:10:02 +0000
parents 95e85daad148
children f1c5f8151397
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
1 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
2
2847
8b262e771614 [project @ 1997-03-27 16:18:26 by jwe]
jwe
parents: 2800
diff changeset
3 Copyright (C) 1996, 1997 John W. Eaton
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
4
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
5 This file is part of Octave.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
6
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
7 Octave is free software; you can redistribute it and/or modify it
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
8 under the terms of the GNU General Public License as published by the
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
9 Free Software Foundation; either version 2, or (at your option) any
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
10 later version.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
11
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
12 Octave is distributed in the hope that it will be useful, but WITHOUT
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
15 for more details.
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
16
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
17 You should have received a copy of the GNU General Public License
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
18 along with Octave; see the file COPYING. If not, write to the Free
1315
611d403c7f3d [project @ 1995-06-25 19:56:32 by jwe]
jwe
parents: 1192
diff changeset
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
20
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
21 */
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
22
240
a99f28f5e351 [project @ 1993-11-30 20:24:36 by jwe]
jwe
parents: 184
diff changeset
23 #ifdef HAVE_CONFIG_H
1192
b6360f2d4fa6 [project @ 1995-03-30 21:38:35 by jwe]
jwe
parents: 1155
diff changeset
24 #include <config.h>
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25 #endif
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
26
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
27 #if defined (WITH_SHL)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
28 #include <cerrno>
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
29 #include <cstring>
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
30 #endif
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
31
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
32 #include <strstream.h>
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
33
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
34 extern "C"
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
35 {
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
36 #if defined (WITH_DL)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
37 #include <dlfcn.h>
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
38 #ifndef RTLD_LAZY
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
39 #define RTLD_LAZY 1
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
40 #endif
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
41 #elif defined (WITH_SHL)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
42 #include <dl.h>
1102
954cfe6fa85d [project @ 1995-02-14 21:38:30 by jwe]
jwe
parents: 1009
diff changeset
43 #endif
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
44 }
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
45
2492
06595bc7f2d0 [project @ 1996-11-09 00:13:50 by jwe]
jwe
parents: 2370
diff changeset
46 #include <defaults.h>
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
47 #include "dirfns.h"
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
48 #include "dynamic-ld.h"
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
49 #include "error.h"
1670
6708c53892c1 [project @ 1995-12-27 04:33:00 by jwe]
jwe
parents: 1665
diff changeset
50 #include "toplev.h"
1155
22741d6ed818 [project @ 1995-02-27 04:26:21 by jwe]
jwe
parents: 1102
diff changeset
51 #include "pathsearch.h"
2862
95e85daad148 [project @ 1997-04-15 22:00:57 by jwe]
jwe
parents: 2847
diff changeset
52 #include "oct-obj.h"
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
53 #include "oct-builtin.h"
2370
a45c7d64b5e3 [project @ 1996-10-11 23:51:15 by jwe]
jwe
parents: 2200
diff changeset
54 #include "ov.h"
1352
19c10b8657d5 [project @ 1995-09-05 08:11:57 by jwe]
jwe
parents: 1315
diff changeset
55 #include "utils.h"
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
56 #include "variables.h"
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
57
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
58 #if defined (WITH_DYNAMIC_LINKING)
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
59
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
60 typedef void * (*resolver_fcn) (const string& name, const string& file);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
61
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
62 static string
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
63 mangle_octave_oct_file_name (const string& name)
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
64 {
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
65 string retval ("FS");
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
66 retval.append (name);
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
67 retval.append ("__Fv");
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
68 return retval;
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
69 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
70
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
71 #if defined (WITH_DL)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
72
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
73 static void *
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
74 dl_resolve_octave_reference (const string& name, const string& file)
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
75 {
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
76 void *retval = 0;
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
77
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
78 // Dynamic linking with dlopen/dlsym doesn't require specification
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
79 // of the libraries at runtime. Instead, they are specified when
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
80 // the .oct file is created.
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
81
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
82 void *handle = dlopen (file.c_str (), RTLD_LAZY);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
83
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
84 if (handle)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
85 {
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
86 retval = dlsym (handle, name.c_str ());
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
87
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
88 if (! retval)
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
89 {
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
90 const char *errmsg = dlerror ();
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
91
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
92 if (errmsg)
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
93 error("%s: `%s'", name.c_str (), errmsg);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
94 else
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
95 error("unable to link function `%s'", name.c_str ());
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
96
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
97 dlclose (handle);
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
98 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
99 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
100 else
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
101 error ("%s: %s `%s'", dlerror (), file.c_str (), name.c_str ());
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
102
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
103 return retval;
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
104 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
105
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
106 static resolver_fcn resolve_octave_reference = dl_resolve_octave_reference;
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
107
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
108 #elif defined (WITH_SHL)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
109
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
110 static void *
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
111 shl_resolve_octave_reference (const string& name, const string& file)
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
112 {
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
113 void *retval = 0;
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
114
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
115 // Dynamic linking with shl_load/shl_findsym doesn't require
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
116 // specification of the libraries at runtime. Instead, they are
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
117 // specified when the .oct file is created.
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
118
2800
9aeba8e006a4 [project @ 1997-03-09 09:50:20 by jwe]
jwe
parents: 2492
diff changeset
119 shl_t handle = shl_load (file.c_str (), BIND_DEFERRED, 0L);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
120
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
121 if (handle)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
122 {
2800
9aeba8e006a4 [project @ 1997-03-09 09:50:20 by jwe]
jwe
parents: 2492
diff changeset
123 int status = shl_findsym (&handle, name.c_str (),
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
124 TYPE_UNDEFINED, retval);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
125
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
126 if (status < 0)
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
127 {
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
128 const char *errmsg = strerror (errno);
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
129
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
130 if (errmsg)
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
131 error("%s: `%s'", name.c_str (), errmsg);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
132 else
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
133 error("unable to link function `%s'", name.c_str ());
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
134
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
135 retval = 0;
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
136 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
137 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
138 else
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
139 error ("%s: %s `%s'", strerror (errno), file.c_str (), name.c_str ());
1665
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
140
f2f93a3cd42f [project @ 1995-12-24 07:15:10 by jwe]
jwe
parents: 1664
diff changeset
141 return retval;
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
142 }
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
143
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
144 static resolver_fcn resolve_octave_reference = shl_resolve_octave_reference;
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
145
1742
a02f140ed897 [project @ 1996-01-12 11:09:39 by jwe]
jwe
parents: 1670
diff changeset
146 #endif
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
147
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
148 typedef octave_builtin * (*builtin_obj_fcn) (void);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
149
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
150 int
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
151 load_octave_oct_file (const string& name)
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
152 {
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
153 int retval = 0;
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
154
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
155 string oct_file = oct_file_in_path (name);
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
156
1907
8c6cea97eb80 [project @ 1996-02-10 01:12:46 by jwe]
jwe
parents: 1884
diff changeset
157 if (! oct_file.empty ())
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
158 {
1755
3a9462b655f1 [project @ 1996-01-22 04:47:22 by jwe]
jwe
parents: 1742
diff changeset
159 string mangled_name = mangle_octave_oct_file_name (name);
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
160
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
161 builtin_obj_fcn f
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
162 = (builtin_obj_fcn) resolve_octave_reference (mangled_name, oct_file);
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
163
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
164 if (f)
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
165 {
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
166 octave_builtin *obj = f ();
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
167
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
168 if (obj)
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
169 {
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
170 install_builtin_function (obj);
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
171 retval = 1;
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
172 }
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
173 }
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
174 }
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
175
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
176 return retval;
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
177 }
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
178
1664
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
179 #else
913a157f1e02 [project @ 1995-12-24 07:00:22 by jwe]
jwe
parents: 1488
diff changeset
180
2893
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
181 int
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
182 load_octave_oct_file (const string&)
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
183 {
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
184 return 0;
9fd1df4b464a [project @ 1997-04-28 02:07:38 by jwe]
jwe
parents: 2862
diff changeset
185 }
707
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
186
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
187 #endif
d7c4962ec7a0 [project @ 1994-09-16 13:50:20 by jwe]
jwe
parents: 527
diff changeset
188
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
189 /*
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
190 ;;; Local Variables: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
191 ;;; mode: C++ ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
192 ;;; End: ***
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
193 */