Mercurial > hg > octave-terminal
changeset 115:cb9692aa9245
[project @ 1993-09-20 08:15:06 by jwe]
(symbol_table::list (int&)): Make sure count is initialized to zero.
(symbol_table::var_list (int&)): Ditto.
(symbol_table::fcn_list (int&)): Ditto.
author | jwe |
---|---|
date | Mon, 20 Sep 1993 08:15:06 +0000 |
parents | a20da3b44f08 |
children | 94582f2307be |
files | src/symtab.cc |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/symtab.cc +++ b/src/symtab.cc @@ -722,12 +722,12 @@ char ** symbol_table::list (int& count) { + count = 0; int n = size (); if (n == 0) return (char **) NULL; char **symbols = new char * [n+1]; - count = 0; for (int i = 0; i < HASH_TABLE_SIZE; i++) { symbol_record *ptr = table[i].next (); @@ -745,12 +745,12 @@ char ** symbol_table::var_list (int& count) { + count = 0; int n = size (); if (n == 0) return (char **) NULL; char **symbols = new char * [n+1]; - count = 0; for (int i = 0; i < HASH_TABLE_SIZE; i++) { symbol_record *ptr = table[i].next (); @@ -769,12 +769,12 @@ char ** symbol_table::fcn_list (int& count) { + count = 0; int n = size (); if (n == 0) return (char **) NULL; char **symbols = new char * [n+1]; - count = 0; for (int i = 0; i < HASH_TABLE_SIZE; i++) { symbol_record *ptr = table[i].next ();