Mercurial > octave-nkf
comparison src/pt-plot.cc @ 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 | 4e753587fac1 |
comparison
equal
deleted
inserted
replaced
86:723cc7235104 | 87:8248ec41f677 |
---|---|
30 #include <strstream.h> | 30 #include <strstream.h> |
31 | 31 |
32 #include "error.h" | 32 #include "error.h" |
33 #include "utils.h" | 33 #include "utils.h" |
34 #include "tree.h" | 34 #include "tree.h" |
35 | |
36 extern "C" | |
37 { | |
38 char *tilde_expand (char *s); /* From readline's tilde.c */ | |
39 } | |
35 | 40 |
36 // The number of lines we\'ve plotted so far. | 41 // The number of lines we\'ve plotted so far. |
37 static int plot_line_count; | 42 static int plot_line_count; |
38 | 43 |
39 // Is this a parametric plot? Makes a difference for 3D plotting. | 44 // Is this a parametric plot? Makes a difference for 3D plotting. |
237 if (data.is_defined ()) | 242 if (data.is_defined ()) |
238 { | 243 { |
239 char *file = (char *) NULL; | 244 char *file = (char *) NULL; |
240 if (data.is_string_type ()) | 245 if (data.is_string_type ()) |
241 { | 246 { |
242 file = data.string_value (); | 247 file = tilde_expand (data.string_value ()); |
243 ifstream ftmp (file); | 248 ifstream ftmp (file); |
244 if (ftmp) | 249 if (ftmp) |
245 { | 250 { |
246 plot_buf << " \"" << file << '"'; | 251 plot_buf << " \"" << file << '"'; |
252 free (file); | |
247 goto have_existing_file; | 253 goto have_existing_file; |
248 } | 254 } |
249 else | 255 else |
250 file = (char *) NULL; | 256 { |
257 free (file); | |
258 file = (char *) NULL; | |
259 } | |
251 } | 260 } |
252 | 261 |
253 nc = data.columns (); | 262 nc = data.columns (); |
254 switch (ndim) | 263 switch (ndim) |
255 { | 264 { |