Mercurial > hg > octave-lojdl
changeset 1278:606361d34c74
[project @ 1995-04-26 17:40:24 by jwe]
Initial revision
author | jwe |
---|---|
date | Wed, 26 Apr 1995 17:40:24 +0000 |
parents | db4f4009d6e8 |
children | f146197d9d37 |
files | src/oct-map.cc |
diffstat | 1 files changed, 50 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/src/oct-map.cc @@ -0,0 +1,50 @@ +// oct-map.cc -*- C++ -*- +/* + +Copyright (C) 1995 John W. Eaton + +This file is part of Octave. + +Octave is free software; you can redistribute it and/or modify it +under the terms of the GNU General Public License as published by the +Free Software Foundation; either version 2, or (at your option) any +later version. + +Octave is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with Octave; see the file COPYING. If not, write to the Free +Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include "oct-map.h" +#include "utils.h" + +char ** +Octave_map::make_name_list (void) +{ + char **names = new char * [length () + 1]; + + int i = 0; + for (Pix p = first (); p != 0; next (p)) + names[i++] = strsave (key (p)); + + names[i] = 0; + + return names; +} + +/* +;;; Local Variables: *** +;;; mode: C++ *** +;;; page-delimiter: "^/\\*" *** +;;; End: *** +*/