# HG changeset patch # User jwe # Date 1059191111 0 # Node ID 53ee020af84770486de5c0e53d1d45c9c9b7cfa6 # Parent efb6301dae80c65bcfc13b9fd4a6e0d8f78023c4 [project @ 2003-07-26 03:45:10 by jwe] diff -r efb6301dae80 -r 53ee020af847 ChangeLog --- a/ChangeLog Tue Jul 15 19:18:20 2003 +0000 +++ b/ChangeLog Sat Jul 26 03:45:11 2003 +0000 @@ -1,3 +1,7 @@ +2003-07-25 John W. Eaton + + * configure.in: Warn if --enable-dl but not --enable-shared. + 2003-07-15 John W. Eaton * emacs/octave-mod.el (octave-variables): Delete diff -r efb6301dae80 -r 53ee020af847 configure.in --- a/configure.in Tue Jul 15 19:18:20 2003 +0000 +++ b/configure.in Sat Jul 26 03:45:11 2003 +0000 @@ -22,7 +22,7 @@ ### 02111-1307, USA. AC_INIT -AC_REVISION($Revision: 1.430 $) +AC_REVISION($Revision: 1.431 $) AC_PREREQ(2.52) AC_CONFIG_SRCDIR([src/octave.cc]) AC_CONFIG_HEADER(config.h) @@ -1471,6 +1471,16 @@ warn_msg_printed=false +if $ENABLE_DYNAMIC_LINKING; then + if $SHARED_LIBS; then + true + else + AC_MSG_WARN([You used --enable-dl but not --enable-shared.]) + AC_MSG_WARN([Are you sure that is what you want to do?]) + warn_msg_printed=true + fi +fi + if test -n "$warn_f77_and_g77"; then AC_MSG_WARN($warn_f77_and_g77) warn_msg_printed=true diff -r efb6301dae80 -r 53ee020af847 liboctave/CMatrix.cc --- a/liboctave/CMatrix.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/CMatrix.cc Sat Jul 26 03:45:11 2003 +0000 @@ -2756,38 +2756,50 @@ for (int i = 0; i < nr; i++) { - int idx_j = 0; - - Complex tmp_min = elem (i, idx_j); - bool real_only = row_is_real_only (i); - double abs_min = real_only ? real (tmp_min) : ::abs (tmp_min); - - if (xisnan (tmp_min)) - idx_j = -1; + int idx_j; + + Complex tmp_min; + + double abs_min = octave_NaN; + + for (idx_j = 0; idx_j < nc; idx_j++) + { + tmp_min = elem (i, idx_j); + + if (! octave_is_NaN_or_NA (tmp_min)) + { + abs_min = real_only ? real (tmp_min) : ::abs (tmp_min); + break; + } + } + + for (int j = idx_j+1; j < nc; j++) + { + Complex tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + + double abs_tmp = real_only ? real (tmp) : ::abs (tmp); + + if (abs_tmp < abs_min) + { + idx_j = j; + tmp_min = tmp; + abs_min = abs_tmp; + } + } + + if (octave_is_NaN_or_NA (tmp_min)) + { + result.elem (i) = Complex_NaN_result; + index.elem (i) = 0; + } else { - for (int j = 1; j < nc; j++) - { - Complex tmp = elem (i, j); - - double abs_tmp = real_only ? real (tmp) : ::abs (tmp); - - if (xisnan (tmp)) - { - idx_j = -1; - break; - } - else if (abs_tmp < abs_min) - { - idx_j = j; - tmp_min = tmp; - abs_min = abs_tmp; - } - } - - result.elem (i) = (idx_j < 0) ? Complex_NaN_result : tmp_min; + result.elem (i) = tmp_min; index.elem (i) = idx_j; } } @@ -2818,38 +2830,50 @@ for (int i = 0; i < nr; i++) { - int idx_j = 0; - - Complex tmp_max = elem (i, idx_j); - bool real_only = row_is_real_only (i); - double abs_max = real_only ? real (tmp_max) : ::abs (tmp_max); - - if (xisnan (tmp_max)) - idx_j = -1; + int idx_j; + + Complex tmp_max; + + double abs_max = octave_NaN; + + for (idx_j = 0; idx_j < nc; idx_j++) + { + tmp_max = elem (i, idx_j); + + if (! octave_is_NaN_or_NA (tmp_max)) + { + abs_max = real_only ? real (tmp_max) : ::abs (tmp_max); + break; + } + } + + for (int j = idx_j+1; j < nc; j++) + { + Complex tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + + double abs_tmp = real_only ? real (tmp) : ::abs (tmp); + + if (abs_tmp > abs_max) + { + idx_j = j; + tmp_max = tmp; + abs_max = abs_tmp; + } + } + + if (octave_is_NaN_or_NA (tmp_max)) + { + result.elem (i) = Complex_NaN_result; + index.elem (i) = 0; + } else { - for (int j = 1; j < nc; j++) - { - Complex tmp = elem (i, j); - - double abs_tmp = real_only ? real (tmp) : ::abs (tmp); - - if (xisnan (tmp)) - { - idx_j = -1; - break; - } - else if (abs_tmp > abs_max) - { - idx_j = j; - tmp_max = tmp; - abs_max = abs_tmp; - } - } - - result.elem (i) = (idx_j < 0) ? Complex_NaN_result : tmp_max; + result.elem (i) = tmp_max; index.elem (i) = idx_j; } } @@ -2880,38 +2904,50 @@ for (int j = 0; j < nc; j++) { - int idx_i = 0; - - Complex tmp_min = elem (idx_i, j); - bool real_only = column_is_real_only (j); - double abs_min = real_only ? real (tmp_min) : ::abs (tmp_min); - - if (xisnan (tmp_min)) - idx_i = -1; + int idx_i; + + Complex tmp_min; + + double abs_min = octave_NaN; + + for (idx_i = 0; idx_i < nr; idx_i++) + { + tmp_min = elem (idx_i, j); + + if (! octave_is_NaN_or_NA (tmp_min)) + { + abs_min = real_only ? real (tmp_min) : ::abs (tmp_min); + break; + } + } + + for (int i = idx_i+1; i < nr; i++) + { + Complex tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + + double abs_tmp = real_only ? real (tmp) : ::abs (tmp); + + if (abs_tmp < abs_min) + { + idx_i = i; + tmp_min = tmp; + abs_min = abs_tmp; + } + } + + if (octave_is_NaN_or_NA (tmp_min)) + { + result.elem (j) = Complex_NaN_result; + index.elem (j) = 0; + } else { - for (int i = 1; i < nr; i++) - { - Complex tmp = elem (i, j); - - double abs_tmp = real_only ? real (tmp) : ::abs (tmp); - - if (xisnan (tmp)) - { - idx_i = -1; - break; - } - else if (abs_tmp < abs_min) - { - idx_i = i; - tmp_min = tmp; - abs_min = abs_tmp; - } - } - - result.elem (j) = (idx_i < 0) ? Complex_NaN_result : tmp_min; + result.elem (j) = tmp_min; index.elem (j) = idx_i; } } @@ -2942,38 +2978,50 @@ for (int j = 0; j < nc; j++) { - int idx_i = 0; - - Complex tmp_max = elem (idx_i, j); - bool real_only = column_is_real_only (j); - double abs_max = real_only ? real (tmp_max) : ::abs (tmp_max); - - if (xisnan (tmp_max)) - idx_i = -1; + int idx_i; + + Complex tmp_max; + + double abs_max = octave_NaN; + + for (idx_i = 0; idx_i < nr; idx_i++) + { + tmp_max = elem (idx_i, j); + + if (! octave_is_NaN_or_NA (tmp_max)) + { + abs_max = real_only ? real (tmp_max) : ::abs (tmp_max); + break; + } + } + + for (int i = idx_i+1; i < nr; i++) + { + Complex tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + + double abs_tmp = real_only ? real (tmp) : ::abs (tmp); + + if (abs_tmp > abs_max) + { + idx_i = i; + tmp_max = tmp; + abs_max = abs_tmp; + } + } + + if (octave_is_NaN_or_NA (tmp_max)) + { + result.elem (j) = Complex_NaN_result; + index.elem (j) = 0; + } else { - for (int i = 1; i < nr; i++) - { - Complex tmp = elem (i, j); - - double abs_tmp = real_only ? real (tmp) : ::abs (tmp); - - if (xisnan (tmp)) - { - idx_i = -1; - break; - } - else if (abs_tmp > abs_max) - { - idx_i = i; - tmp_max = tmp; - abs_max = abs_tmp; - } - } - - result.elem (j) = (idx_i < 0) ? Complex_NaN_result : tmp_max; + result.elem (j) = tmp_max; index.elem (j) = idx_i; } } diff -r efb6301dae80 -r 53ee020af847 liboctave/ChangeLog --- a/liboctave/ChangeLog Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/ChangeLog Sat Jul 26 03:45:11 2003 +0000 @@ -1,3 +1,19 @@ +2003-07-25 John W. Eaton + + * lo-mappers.cc (xmin, xmax): Handle NaN in a Matlab-compatible + way. Handle NA in an R-compatible way. + + * lo-cieee.c (lo_ieee_is_NaN_or_NA): Also check for lo_ieee_is_NA. + (lo_ieee_is_NA): Don't call isnan unless HAVE_ISNAN is defined. + + * lo-mappers.h (octave_is_NA (const Complex&)): Provide decl. + (octave_is_NaN_or_NA (const Complex&)): Likewise. + + * dMatrix.cc (Matrix::row_min, Matrix::row_max, + Matrix::column_min, Matrix::column_max): Ignore NaNs. + * CMatrix.cc (ComplexMatrix::row_min, ComplexMatrix::row_max, + ComplexMatrix::column_min, ComplexMatrix::column_max): Likewise. + 2003-07-11 John W. Eaton * Array2-idx.h (assign (Array2&, const Array2&, const LT&)): diff -r efb6301dae80 -r 53ee020af847 liboctave/dMatrix.cc --- a/liboctave/dMatrix.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/dMatrix.cc Sat Jul 26 03:45:11 2003 +0000 @@ -2235,33 +2235,33 @@ for (int i = 0; i < nr; i++) { - int idx_j = 0; - - double tmp_min = elem (i, idx_j); - - if (xisnan (tmp_min)) - idx_j = -1; - else + int idx_j; + + double tmp_min = octave_NaN; + + for (idx_j = 0; idx_j < nc; idx_j++) { - for (int j = 1; j < nc; j++) + tmp_min = elem (i, idx_j); + + if (! octave_is_NaN_or_NA (tmp_min)) + break; + } + + for (int j = idx_j+1; j < nc; j++) + { + double tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + else if (tmp < tmp_min) { - double tmp = elem (i, j); - - if (xisnan (tmp)) - { - idx_j = -1; - break; - } - else if (tmp < tmp_min) - { - idx_j = j; - tmp_min = tmp; - } + idx_j = j; + tmp_min = tmp; } } - result.elem (i) = (idx_j < 0) ? octave_NaN : tmp_min; - index.elem (i) = idx_j; + result.elem (i) = tmp_min; + index.elem (i) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_j; } } @@ -2290,33 +2290,33 @@ for (int i = 0; i < nr; i++) { - int idx_j = 0; - - double tmp_max = elem (i, idx_j); - - if (xisnan (tmp_max)) - idx_j = -1; - else + int idx_j; + + double tmp_max = octave_NaN; + + for (idx_j = 0; idx_j < nc; idx_j++) { - for (int j = 1; j < nc; j++) + tmp_max = elem (i, idx_j); + + if (! octave_is_NaN_or_NA (tmp_max)) + break; + } + + for (int j = idx_j+1; j < nc; j++) + { + double tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + else if (tmp > tmp_max) { - double tmp = elem (i, j); - - if (xisnan (tmp)) - { - idx_j = -1; - break; - } - else if (tmp > tmp_max) - { - idx_j = j; - tmp_max = tmp; - } + idx_j = j; + tmp_max = tmp; } } - result.elem (i) = (idx_j < 0) ? octave_NaN : tmp_max; - index.elem (i) = idx_j; + result.elem (i) = tmp_max; + index.elem (i) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_j; } } @@ -2345,33 +2345,33 @@ for (int j = 0; j < nc; j++) { - int idx_i = 0; - - double tmp_min = elem (idx_i, j); - - if (xisnan (tmp_min)) - idx_i = -1; - else + int idx_i; + + double tmp_min = octave_NaN; + + for (idx_i = 0; idx_i < nr; idx_i++) { - for (int i = 1; i < nr; i++) + tmp_min = elem (idx_i, j); + + if (! octave_is_NaN_or_NA (tmp_min)) + break; + } + + for (int i = idx_i+1; i < nr; i++) + { + double tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + else if (tmp < tmp_min) { - double tmp = elem (i, j); - - if (xisnan (tmp)) - { - idx_i = -1; - break; - } - else if (tmp < tmp_min) - { - idx_i = i; - tmp_min = tmp; - } + idx_i = i; + tmp_min = tmp; } } - result.elem (j) = (idx_i < 0) ? octave_NaN : tmp_min; - index.elem (j) = idx_i; + result.elem (j) = tmp_min; + index.elem (j) = octave_is_NaN_or_NA (tmp_min) ? 0 : idx_i; } } @@ -2400,33 +2400,33 @@ for (int j = 0; j < nc; j++) { - int idx_i = 0; - - double tmp_max = elem (idx_i, j); - - if (xisnan (tmp_max)) - idx_i = -1; - else + int idx_i; + + double tmp_max = octave_NaN; + + for (idx_i = 0; idx_i < nr; idx_i++) { - for (int i = 1; i < nr; i++) + tmp_max = elem (idx_i, j); + + if (! octave_is_NaN_or_NA (tmp_max)) + break; + } + + for (int i = idx_i+1; i < nr; i++) + { + double tmp = elem (i, j); + + if (octave_is_NaN_or_NA (tmp)) + continue; + else if (tmp > tmp_max) { - double tmp = elem (i, j); - - if (xisnan (tmp)) - { - idx_i = -1; - break; - } - else if (tmp > tmp_max) - { - idx_i = i; - tmp_max = tmp; - } + idx_i = i; + tmp_max = tmp; } } - result.elem (j) = (idx_i < 0) ? octave_NaN : tmp_max; - index.elem (j) = idx_i; + result.elem (j) = tmp_max; + index.elem (j) = octave_is_NaN_or_NA (tmp_max) ? 0 : idx_i; } } diff -r efb6301dae80 -r 53ee020af847 liboctave/lo-cieee.c --- a/liboctave/lo-cieee.c Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/lo-cieee.c Sat Jul 26 03:45:11 2003 +0000 @@ -117,15 +117,22 @@ int lo_ieee_is_NA (double x) { +#if defined HAVE_ISNAN lo_ieee_double t; t.value = x; return (isnan (x) && t.word[lo_ieee_lw] == LO_IEEE_NA_LW) ? 1 : 0; +#else + return 0; +#endif } int lo_ieee_is_NaN_or_NA (double x) { - return lo_ieee_isnan (x); + // Although NA really is an IEEE NaN value, lo_ieee_isnan pretends + // it is not, so we much check both... + + return lo_ieee_isnan (x) || lo_ieee_is_NA (x); } double diff -r efb6301dae80 -r 53ee020af847 liboctave/lo-mappers.cc --- a/liboctave/lo-mappers.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/lo-mappers.cc Sat Jul 26 03:45:11 2003 +0000 @@ -133,13 +133,39 @@ double xmin (double x, double y) { - return x < y ? x : (xisnan (x) ? x : y); + if (x < y) + return x; + + if (y <= x) + return y; + + if (octave_is_NaN_or_NA (x) && ! octave_is_NaN_or_NA (y)) + return y; + else if (octave_is_NaN_or_NA (y) && ! octave_is_NaN_or_NA (x)) + return x; + else if (octave_is_NA (x) || octave_is_NA (y)) + return octave_NA; + else + return octave_NaN; } double xmax (double x, double y) { - return x > y ? x : (xisnan (x) ? x : y); + if (x > y) + return x; + + if (y >= x) + return y; + + if (octave_is_NaN_or_NA (x) && ! octave_is_NaN_or_NA (y)) + return y; + else if (octave_is_NaN_or_NA (y) && ! octave_is_NaN_or_NA (x)) + return x; + else if (octave_is_NA (x) || octave_is_NA (y)) + return octave_NA; + else + return octave_NaN; } // complex -> complex mappers. diff -r efb6301dae80 -r 53ee020af847 liboctave/lo-mappers.h --- a/liboctave/lo-mappers.h Tue Jul 15 19:18:20 2003 +0000 +++ b/liboctave/lo-mappers.h Sat Jul 26 03:45:11 2003 +0000 @@ -66,6 +66,9 @@ extern bool xfinite (const Complex& x); extern bool xisinf (const Complex& x); +extern bool octave_is_NA (const Complex& x); +extern bool octave_is_NaN_or_NA (const Complex& x); + extern Complex xmin (const Complex& x, const Complex& y); extern Complex xmax (const Complex& x, const Complex& y); diff -r efb6301dae80 -r 53ee020af847 scripts/ChangeLog --- a/scripts/ChangeLog Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/ChangeLog Sat Jul 26 03:45:11 2003 +0000 @@ -1,3 +1,12 @@ +2003-07-25 Paul Kienzle + + * signal/autocov.m: Transpose result of conj because diag returns + a column vector, not a row vector. + + * audio/playaudio.m, audio/record.m, image/image.m, + miscellaneous/bug_report.m: Protect spaces in filenames + with quotes. + 2003-07-15 John W. Eaton * io/printf.m, io/puts.m: Delete. diff -r efb6301dae80 -r 53ee020af847 scripts/audio/playaudio.m --- a/scripts/audio/playaudio.m Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/audio/playaudio.m Sat Jul 26 03:45:11 2003 +0000 @@ -50,7 +50,7 @@ num = fopen (file, "wb"); c = fwrite (num, X, "uchar"); fclose (num); - system (sprintf ("cat %s > /dev/dsp", file)); + system (sprintf ("cat \"%s\" > /dev/dsp", file)); unwind_protect_cleanup unlink (file); end_unwind_protect @@ -64,10 +64,10 @@ usage (usage_msg); endif if (strcmp (ext, "lin") || strcmp (ext, "raw")) - system (sprintf ("cat %s > /dev/dsp", name)); + system (sprintf ("cat \"%s\" > /dev/dsp", name)); elseif (strcmp (ext, "mu") || strcmp (ext, "au") || strcmp (ext, "snd") || strcmp (ext, "ul")) - system (sprintf ("cat %s > /dev/audio", name)); + system (sprintf ("cat \"%s\" > /dev/audio", name)); else error ("playaudio does not support given extension"); endif diff -r efb6301dae80 -r 53ee020af847 scripts/audio/record.m --- a/scripts/audio/record.m Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/audio/record.m Sat Jul 26 03:45:11 2003 +0000 @@ -44,7 +44,7 @@ input ("Please hit ENTER and speak afterwards!\n", 1); - cmd = sprintf ("dd if=/dev/dsp of=%s bs=%d count=%d", + cmd = sprintf ("dd if=/dev/dsp of=\"%s\" bs=%d count=%d", file, sampling_rate, sec) system (cmd); diff -r efb6301dae80 -r 53ee020af847 scripts/image/image.m --- a/scripts/image/image.m Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/image/image.m Sat Jul 26 03:45:11 2003 +0000 @@ -73,14 +73,14 @@ ## Start the viewer. Try display, xv, then xloadimage. - xv = sprintf ("xv -raw -expand %f %s", zoom, ppm_name); + xv = sprintf ("xv -raw -expand %f \"%s\"", zoom, ppm_name); - xloadimage = sprintf ("xloadimage -zoom %f %s", zoom*100, ppm_name); + xloadimage = sprintf ("xloadimage -zoom %f \"%s\"", zoom*100, ppm_name); ## ImageMagick: - im_display = sprintf ("display -geometry %f%% %s", zoom*100, ppm_name); + im_display = sprintf ("display -geometry %f%% \"%s\"", zoom*100, ppm_name); - rm = sprintf ("rm -f %s", ppm_name); + rm = sprintf ("rm -f \"%s\"", ppm_name); ## Need to let the shell clean up the tmp file because we are putting ## the viewer in the background. diff -r efb6301dae80 -r 53ee020af847 scripts/miscellaneous/bug_report.m --- a/scripts/miscellaneous/bug_report.m Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/miscellaneous/bug_report.m Sat Jul 26 03:45:11 2003 +0000 @@ -57,7 +57,7 @@ endif if (! isempty (prefs)) - cmd = sprintf ("%s %s", cmd, prefs); + cmd = sprintf ("%s \"%s\"", cmd, prefs); endif system (cmd); diff -r efb6301dae80 -r 53ee020af847 scripts/signal/autocov.m --- a/scripts/signal/autocov.m Tue Jul 15 19:18:20 2003 +0000 +++ b/scripts/signal/autocov.m Sat Jul 26 03:45:11 2003 +0000 @@ -47,7 +47,7 @@ retval = zeros (h + 1, c); for i = 0 : h - retval(i+1, :) = diag (X(i+1:n, :).' * conj (X(1:n-i, :))) / n; + retval(i+1, :) = diag (X(i+1:n, :).' * conj (X(1:n-i, :))).' / n; endfor endfunction diff -r efb6301dae80 -r 53ee020af847 src/ChangeLog --- a/src/ChangeLog Tue Jul 15 19:18:20 2003 +0000 +++ b/src/ChangeLog Sat Jul 26 03:45:11 2003 +0000 @@ -1,3 +1,10 @@ +2003-07-25 Paul Kienzle + + * help.cc (try_info, display_help_text): + Protect spaces in filenames with quotes. + * oct-hist.cc (do_edit_history): Likewise. + * pt-plot.cc (open_plot_stream): Likewise. + 2003-07-15 John W. Eaton * oct-stream.cc (get_size, octave_base_stream::error, diff -r efb6301dae80 -r 53ee020af847 src/help.cc --- a/src/help.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/src/help.cc Sat Jul 26 03:45:11 2003 +0000 @@ -508,7 +508,7 @@ OSSTREAM cmd_buf; - cmd_buf << Vinfo_prog << " --file " << Vinfo_file; + cmd_buf << "\"" << Vinfo_prog << "\" --file \"" << Vinfo_file << "\""; std::string directory_name = Vinfo_file; size_t pos = directory_name.rfind ('/'); @@ -516,7 +516,7 @@ if (pos != NPOS) { directory_name.resize (pos + 1); - cmd_buf << " --directory " << directory_name; + cmd_buf << " --directory \"" << directory_name << "\""; } if (nm.length () > 0) @@ -613,7 +613,7 @@ OSSTREAM buf; buf << "sed -e 's/^[#%][#%]* *//' -e 's/^ *@/@/' | " - << Vmakeinfo_prog + << "\"" << Vmakeinfo_prog << "\"" << " -D \"VERSION " << OCTAVE_VERSION << "\"" << " -D \"OCTAVEHOME " << OCTAVE_PREFIX << "\"" << " -D \"TARGETHOSTTYPE " << OCTAVE_CANONICAL_HOST_TYPE << "\"" diff -r efb6301dae80 -r 53ee020af847 src/oct-hist.cc --- a/src/oct-hist.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/src/oct-hist.cc Sat Jul 26 03:45:11 2003 +0000 @@ -440,8 +440,9 @@ // Call up our favorite editor on the file of commands. std::string cmd = Veditor; - cmd.append (" "); + cmd.append (" \""); cmd.append (name); + cmd.append ("\""); // Ignore interrupts while we are off editing commands. Should we // maybe avoid using system()? diff -r efb6301dae80 -r 53ee020af847 src/pt-plot.cc --- a/src/pt-plot.cc Tue Jul 15 19:18:20 2003 +0000 +++ b/src/pt-plot.cc Sat Jul 26 03:45:11 2003 +0000 @@ -132,10 +132,12 @@ plot_line_count = 0; - std::string plot_prog = Vgnuplot_binary; + std::string plot_prog; - if (plot_prog.empty ()) + if (Vgnuplot_binary.empty ()) plot_prog = "gnuplot"; + else + plot_prog = "\"" + Vgnuplot_binary + "\""; // XXX FIXME XXX -- I'm not sure this is the right thing to do, // but without it, C-c at the octave prompt will kill gnuplot...