Mercurial > hg > octave-avbm
changeset 7294:fb902b3b2a5d
[project @ 2007-12-11 18:55:46 by jwe]
author | jwe |
---|---|
date | Tue, 11 Dec 2007 18:55:46 +0000 |
parents | d45fc511fc5d |
children | e00828759d1b |
files | scripts/plot/__patch__.m src/ChangeLog src/input.cc |
diffstat | 3 files changed, 44 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2007-12-11 John W. Eaton <jwe@octave.org> + + * 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 <dbateman@free.fr> * OPERATORS/op-bm-sbm.cc, OPERATORS/op-b-sbm.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++ ***