1278
|
1 // oct-map.cc -*- C++ -*- |
|
2 /* |
|
3 |
|
4 Copyright (C) 1995 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 |
1315
|
20 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
1278
|
21 |
|
22 */ |
|
23 |
1297
|
24 #if defined (__GNUG__) |
|
25 #pragma implementation |
|
26 #endif |
|
27 |
1278
|
28 #ifdef HAVE_CONFIG_H |
|
29 #include <config.h> |
|
30 #endif |
|
31 |
1742
|
32 #include "pt-const.h" |
1278
|
33 #include "oct-map.h" |
|
34 #include "utils.h" |
|
35 |
|
36 char ** |
|
37 Octave_map::make_name_list (void) |
|
38 { |
1287
|
39 int len = length (); |
|
40 |
|
41 char **names = new char * [len + 1]; |
1278
|
42 |
|
43 int i = 0; |
|
44 for (Pix p = first (); p != 0; next (p)) |
|
45 names[i++] = strsave (key (p)); |
|
46 |
|
47 names[i] = 0; |
|
48 |
|
49 return names; |
|
50 } |
|
51 |
|
52 /* |
|
53 ;;; Local Variables: *** |
|
54 ;;; mode: C++ *** |
|
55 ;;; page-delimiter: "^/\\*" *** |
|
56 ;;; End: *** |
|
57 */ |