# HG changeset patch # User jwe # Date 747291816 0 # Node ID 8248ec41f677d5013d15e45a6b59547da012ff9f # Parent 723cc7235104a85e5041fc448857adfda35f898f [project @ 1993-09-06 05:03:36 by jwe] diff -r 723cc7235104 -r 8248ec41f677 src/pt-plot.cc --- a/src/pt-plot.cc Mon Sep 06 04:56:50 1993 +0000 +++ b/src/pt-plot.cc Mon Sep 06 05:03:36 1993 +0000 @@ -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 ();