annotate src/oct-map.cc @ 1297:12ecc2ecf0e3

[project @ 1995-05-01 18:39:43 by jwe]
author jwe
date Mon, 01 May 1995 18:39:43 +0000
parents 3f49454bc68c
children 611d403c7f3d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1278
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
1 // oct-map.cc -*- C++ -*-
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
2 /*
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
3
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
4 Copyright (C) 1995 John W. Eaton
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
5
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
6 This file is part of Octave.
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
7
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
8 Octave is free software; you can redistribute it and/or modify it
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
11 later version.
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
12
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
13 Octave is distributed in the hope that it will be useful, but WITHOUT
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
16 for more details.
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
17
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
19 along with Octave; see the file COPYING. If not, write to the Free
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
20 Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
21
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
22 */
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
23
1297
12ecc2ecf0e3 [project @ 1995-05-01 18:39:43 by jwe]
jwe
parents: 1287
diff changeset
24 #if defined (__GNUG__)
12ecc2ecf0e3 [project @ 1995-05-01 18:39:43 by jwe]
jwe
parents: 1287
diff changeset
25 #pragma implementation
12ecc2ecf0e3 [project @ 1995-05-01 18:39:43 by jwe]
jwe
parents: 1287
diff changeset
26 #endif
12ecc2ecf0e3 [project @ 1995-05-01 18:39:43 by jwe]
jwe
parents: 1287
diff changeset
27
1278
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
28 #ifdef HAVE_CONFIG_H
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
29 #include <config.h>
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
30 #endif
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
31
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
32 #include "oct-map.h"
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
33 #include "utils.h"
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
34
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
35 char **
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
36 Octave_map::make_name_list (void)
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
37 {
1287
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
38 int len = length ();
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
39
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
40 char **names = new char * [len + 1];
1278
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
41
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
42 int i = 0;
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
43 for (Pix p = first (); p != 0; next (p))
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
44 names[i++] = strsave (key (p));
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
45
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
46 names[i] = 0;
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
47
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
48 return names;
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
49 }
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
50
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
51 /*
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
52 ;;; Local Variables: ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
53 ;;; mode: C++ ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
54 ;;; page-delimiter: "^/\\*" ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
55 ;;; End: ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
56 */