annotate src/dynamic-ld.h @ 11523:fd0a3ac60b0e

update copyright notices
author John W. Eaton <jwe@octave.org>
date Fri, 14 Jan 2011 05:47:45 -0500
parents f3b65e1ae355
children 7dd7cccf0757
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
11523
fd0a3ac60b0e update copyright notices
John W. Eaton <jwe@octave.org>
parents: 10313
diff changeset
3 Copyright (C) 1993-2011 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
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
9 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
10 option) any later version.
1
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
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 6323
diff changeset
18 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
19 <http://www.gnu.org/licenses/>.
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
383
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 240
diff changeset
23 #if !defined (octave_dynamic_ld_h)
0b52c68ec81f [project @ 1994-03-09 21:19:44 by jwe]
jwe
parents: 240
diff changeset
24 #define octave_dynamic_ld_h 1
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
25
2862
95e85daad148 [project @ 1997-04-15 22:00:57 by jwe]
jwe
parents: 2847
diff changeset
26 #include <string>
95e85daad148 [project @ 1997-04-15 22:00:57 by jwe]
jwe
parents: 2847
diff changeset
27
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2970
diff changeset
28 #include "oct-shlib.h"
2894
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
29
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
30 class octave_function;
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
31
2894
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
32 class
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
33 octave_dynamic_loader
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
34 {
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
35 protected:
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
36
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
37 octave_dynamic_loader (void) { }
2894
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
38
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
39 public:
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
40
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
41 virtual ~octave_dynamic_loader (void) { }
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
42
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
43 static octave_function *
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
44 load_oct (const std::string& fcn_name,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
45 const std::string& file_name = std::string (),
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
46 bool relative = false);
5864
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5307
diff changeset
47
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
48 static octave_function *
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
49 load_mex (const std::string& fcn_name,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
50 const std::string& file_name = std::string (),
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
51 bool relative = false);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2970
diff changeset
52
7872
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
53 static bool remove_oct (const std::string& fcn_name, octave_shlib& shl);
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
54
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
55 static bool remove_mex (const std::string& fcn_name, octave_shlib& shl);
2894
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
56
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
57 private:
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
58
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
59 // No copying!
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
60
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
61 octave_dynamic_loader (const octave_dynamic_loader&);
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
62
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
63 octave_dynamic_loader& operator = (const octave_dynamic_loader&);
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
64
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
65 static octave_dynamic_loader *instance;
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
66
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
67 static bool instance_ok (void);
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
68
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
69 octave_function *
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
70 do_load_oct (const std::string& fcn_name,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
71 const std::string& file_name = std::string (),
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
72 bool relative = false);
5864
e884ab4f29ee [project @ 2006-06-22 00:57:27 by jwe]
jwe
parents: 5307
diff changeset
73
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
74 octave_function *
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
75 do_load_mex (const std::string& fcn_name,
10313
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
76 const std::string& file_name = std::string (),
f3b65e1ae355 untabify src header files
John W. Eaton <jwe@octave.org>
parents: 10160
diff changeset
77 bool relative = false);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2970
diff changeset
78
7872
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
79 bool do_remove_oct (const std::string& fcn_name, octave_shlib& shl);
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
80
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
81 bool do_remove_mex (const std::string& fcn_name, octave_shlib& shl);
3325
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2970
diff changeset
82
2efa28a91e7a [project @ 1999-10-29 21:39:20 by jwe]
jwe
parents: 2970
diff changeset
83 static bool doing_load;
2926
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
84
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
85 protected:
66ef74ee5d9f [project @ 1997-05-05 03:20:52 by jwe]
jwe
parents: 2894
diff changeset
86
7996
6a7db240b3a3 configure.in: eliminate CXX_ABI and OCTAVE_CXX_PREPEND_UNDERSCORE
John W. Eaton <jwe@octave.org>
parents: 7872
diff changeset
87 static std::string name_mangler (const std::string& name);
7336
745a8299c2b5 [project @ 2007-12-28 20:56:55 by jwe]
jwe
parents: 7017
diff changeset
88
7996
6a7db240b3a3 configure.in: eliminate CXX_ABI and OCTAVE_CXX_PREPEND_UNDERSCORE
John W. Eaton <jwe@octave.org>
parents: 7872
diff changeset
89 static std::string name_uscore_mangler (const std::string& name);
7872
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
90
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
91 static std::string mex_mangler (const std::string& name);
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
92
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
93 static std::string mex_uscore_mangler (const std::string& name);
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
94
1b63f8da772d fix unloading of mex files
John W. Eaton <jwe@octave.org>
parents: 7336
diff changeset
95 static std::string mex_f77_mangler (const std::string& name);
2894
f1c5f8151397 [project @ 1997-04-28 05:39:26 by jwe]
jwe
parents: 2893
diff changeset
96 };
1
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
97
78fd87e624cb [project @ 1993-08-08 01:13:40 by jwe]
jwe
parents:
diff changeset
98 #endif