# HG changeset patch # User jwe # Date 1197399346 0 # Node ID fb902b3b2a5d1405081d4d22fea2ca9b4bc07ce1 # Parent d45fc511fc5d9e5a9a0721169224ff6dbdfb83dc [project @ 2007-12-11 18:55:46 by jwe] diff --git a/scripts/plot/__patch__.m b/scripts/plot/__patch__.m --- a/scripts/plot/__patch__.m +++ b/scripts/plot/__patch__.m @@ -181,6 +181,7 @@ h = __go_patch__ (p, "xdata", x, "ydata", y, "faces", faces, "vertices", vert, cargs{:}, varargin{iarg:end}); + if (have_z) set (h, "zdata", z); endif diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-12-11 John W. Eaton + + * input.cc (Vgud_mode): New static variable. + (F__gud_mode__): New function. + (get_user_input): If debug and Vgud_mode, print location info in + format for Emacs GUD mode. + 2007-12-11 David Bateman * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.cc, diff --git a/src/input.cc b/src/input.cc --- a/src/input.cc +++ b/src/input.cc @@ -144,6 +144,9 @@ // the next user prompt. static bool Vdrawnow_requested = false; +// TRUE if we are running in the Emacs GUD mode. +static bool Vgud_mode = false; + static void do_input_echo (const std::string& input_string) { @@ -617,16 +620,25 @@ if (! nm.empty ()) { - buf << "stopped in " << nm; + if (Vgud_mode) + { + static char ctrl_z = 'Z' & 0x1f; - if (line > 0) - buf << " at line " << line; + buf << ctrl_z << ctrl_z << nm << ":" << line; + } + else + { + buf << "stopped in " << nm; + + if (line > 0) + buf << " at line " << line; + } } std::string msg = buf.str (); if (! msg.empty ()) - message ("keyboard", msg.c_str ()); + message (Vgud_mode ? 0 : "keyboard", msg.c_str ()); std::string prompt = "debug> "; @@ -1296,6 +1308,26 @@ return retval; } +DEFUN (__gud_mode__, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} __gud_mode__ ()\n\ +Undocumented internal function.\n\ +@end deftypefn") +{ + octave_value retval; + + int nargin = args.length (); + + if (nargin == 0) + retval = Vgud_mode; + else if (nargin == 1) + Vgud_mode = args(0).bool_value (); + else + print_usage (); + + return retval; +} + /* ;;; Local Variables: *** ;;; mode: C++ ***