annotate src/oct-map.cc @ 1287:3f49454bc68c

[project @ 1995-04-28 00:41:42 by jwe]
author jwe
date Fri, 28 Apr 1995 00:41:42 +0000
parents 606361d34c74
children 12ecc2ecf0e3
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
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
24 #ifdef HAVE_CONFIG_H
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
25 #include <config.h>
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
26 #endif
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
27
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
28 #include "oct-map.h"
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
29 #include "utils.h"
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
30
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
31 char **
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
32 Octave_map::make_name_list (void)
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
33 {
1287
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
34 int len = length ();
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
35
3f49454bc68c [project @ 1995-04-28 00:41:42 by jwe]
jwe
parents: 1278
diff changeset
36 char **names = new char * [len + 1];
1278
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
37
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
38 int i = 0;
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
39 for (Pix p = first (); p != 0; next (p))
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
40 names[i++] = strsave (key (p));
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 names[i] = 0;
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
43
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
44 return names;
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
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 ;;; Local Variables: ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
49 ;;; mode: C++ ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
50 ;;; page-delimiter: "^/\\*" ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
51 ;;; End: ***
606361d34c74 [project @ 1995-04-26 17:40:24 by jwe]
jwe
parents:
diff changeset
52 */