comparison src/oct-map.cc @ 1755:3a9462b655f1

[project @ 1996-01-22 04:47:22 by jwe]
author jwe
date Mon, 22 Jan 1996 04:47:22 +0000
parents a02f140ed897
children e62277bf5fe0
comparison
equal deleted inserted replaced
1754:5f1938919fdc 1755:3a9462b655f1
27 27
28 #ifdef HAVE_CONFIG_H 28 #ifdef HAVE_CONFIG_H
29 #include <config.h> 29 #include <config.h>
30 #endif 30 #endif
31 31
32 #include "str-vec.h"
33
32 #include "pt-const.h" 34 #include "pt-const.h"
33 #include "oct-map.h" 35 #include "oct-map.h"
34 #include "utils.h" 36 #include "utils.h"
35 37
36 char ** 38 string_vector
37 Octave_map::make_name_list (void) 39 Octave_map::make_name_list (void)
38 { 40 {
39 int len = length (); 41 int len = length ();
40 42
41 char **names = new char * [len + 1]; 43 string_vector names (len);
42 44
43 int i = 0; 45 int i = 0;
44 for (Pix p = first (); p != 0; next (p)) 46 for (Pix p = first (); p != 0; next (p))
45 names[i++] = strsave (key (p)); 47 names[i++] = key (p);
46
47 names[i] = 0;
48 48
49 return names; 49 return names;
50 } 50 }
51 51
52 /* 52 /*