Mercurial > hg > octave-terminal
changeset 87:8248ec41f677
[project @ 1993-09-06 05:03:36 by jwe]
author | jwe |
---|---|
date | Mon, 06 Sep 1993 05:03:36 +0000 |
parents | 723cc7235104 |
children | 0fcbd97505ae |
files | src/pt-plot.cc |
diffstat | 1 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/pt-plot.cc +++ b/src/pt-plot.cc @@ -33,6 +33,11 @@ #include "utils.h" #include "tree.h" +extern "C" +{ + char *tilde_expand (char *s); /* From readline's tilde.c */ +} + // The number of lines we\'ve plotted so far. static int plot_line_count; @@ -239,15 +244,19 @@ char *file = (char *) NULL; if (data.is_string_type ()) { - file = data.string_value (); + file = tilde_expand (data.string_value ()); ifstream ftmp (file); if (ftmp) { plot_buf << " \"" << file << '"'; + free (file); goto have_existing_file; } else - file = (char *) NULL; + { + free (file); + file = (char *) NULL; + } } nc = data.columns ();