Mercurial > hg > octave-lyh
diff src/utils.cc @ 1266:e1ddfb12566d
[project @ 1995-04-20 18:56:04 by jwe]
author | jwe |
---|---|
date | Thu, 20 Apr 1995 19:09:12 +0000 |
parents | c56c0565afd5 |
children | 611d403c7f3d |
line wrap: on
line diff
--- a/src/utils.cc +++ b/src/utils.cc @@ -124,7 +124,8 @@ int len = strlen (s) + strlen (t); char *tmp = new char [len+1]; strcpy (tmp, s); - return strcat (tmp, t); + strcat (tmp, t); + return tmp; } // Throw away input until a given character is read. @@ -694,14 +695,12 @@ { char *retval = 0; - char *nm = strsave (name); + char *nm = 0; if (suffix) - { - char *tmp = nm; - nm = strconcat (tmp, suffix); - delete [] tmp; - } + nm = strconcat (name, suffix); + else + nm = strsave (name); if (! the_current_working_directory) get_working_directory ("file_in_path");