changeset 18694:1a5dabbaa559 gui-release

maint: Periodic merge of stable to gui-release.
author Rik <rik@octave.org>
date Mon, 28 Apr 2014 10:43:44 -0700
parents 834f6e604dc3 (current diff) 0b95b9c5ac71 (diff)
children 7c78430535db 92f91183630b
files libinterp/corefcn/input.cc
diffstat 6 files changed, 32 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/corefcn/input.cc	Sun Apr 27 20:12:07 2014 +0200
+++ b/libinterp/corefcn/input.cc	Mon Apr 28 10:43:44 2014 -0700
@@ -732,7 +732,9 @@
        "-*- texinfo -*-\n\
 @deftypefn  {Built-in Function} {@var{ans} =} input (@var{prompt})\n\
 @deftypefnx {Built-in Function} {@var{ans} =} input (@var{prompt}, \"s\")\n\
-Print a prompt and wait for user input.  For example,\n\
+Print @var{prompt} and wait for user input.\n\
+\n\
+For example,\n\
 \n\
 @example\n\
 input (\"Pick a number, any number! \")\n\
@@ -762,7 +764,7 @@
 a good idea to always call @code{fflush (stdout)} before calling\n\
 @code{input}.  This will ensure that all pending output is written to\n\
 the screen before your prompt.\n\
-@seealso{yes_or_no, kbhit}\n\
+@seealso{yes_or_no, kbhit, pause, menu, listdlg}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -800,12 +802,13 @@
 DEFUN (yes_or_no, args, ,
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {@var{ans} =} yes_or_no (\"@var{prompt}\")\n\
-Ask the user a yes-or-no question.  Return logical true if the answer is yes\n\
-or false if the answer is no.  Takes one argument, @var{prompt}, which is\n\
-the string to display when asking the question.  @var{prompt} should end in\n\
-a space; @code{yes-or-no} adds the string @samp{(yes or no) } to it.  The\n\
-user must confirm the answer with @key{RET} and can edit it until it has\n\
-been confirmed.\n\
+Ask the user a yes-or-no question.\n\
+\n\
+Return logical true if the answer is yes or false if the answer is no.\n\
+Takes one argument, @var{prompt}, which is the string to display when asking\n\
+the question.  @var{prompt} should end in a space; @code{yes-or-no} adds the\n\
+string @samp{(yes or no) } to it.  The user must confirm the answer with\n\
+@key{RET} and can edit it until it has been confirmed.\n\
 @seealso{input}\n\
 @end deftypefn")
 {
@@ -889,7 +892,7 @@
 \n\
 If @code{keyboard} is invoked without arguments, a default prompt of\n\
 @samp{debug> } is used.\n\
-@seealso{dbcont, dbquit}\n\
+@seealso{dbstop, dbcont, dbquit}\n\
 @end deftypefn")
 {
   octave_value_list retval;
--- a/libinterp/corefcn/sysdep.cc	Sun Apr 27 20:12:07 2014 +0200
+++ b/libinterp/corefcn/sysdep.cc	Mon Apr 28 10:43:44 2014 -0700
@@ -641,7 +641,7 @@
 @noindent\n\
 is identical to the above example, but doesn't wait for a keypress,\n\
 returning the empty string if no key is available.\n\
-@seealso{input}\n\
+@seealso{input, pause}\n\
 @end deftypefn")
 {
   octave_value retval;
@@ -667,12 +667,16 @@
 
 DEFUN (pause, args, ,
        "-*- texinfo -*-\n\
-@deftypefn {Built-in Function} {} pause (@var{seconds})\n\
-Suspend the execution of the program.  If invoked without any arguments,\n\
-Octave waits until you type a character.  With a numeric argument, it\n\
-pauses for the given number of seconds.  For example, the following\n\
-statement prints a message and then waits 5 seconds before clearing the\n\
-screen.\n\
+@deftypefn  {Built-in Function} {} pause ()\n\
+@deftypefnx {Built-in Function} {} pause (@var{n})\n\
+Suspend the execution of the program for @var{n} seconds.\n\
+\n\
+@var{n} is a positive real value and may be a fraction of a second.\n\
+If invoked without an input arguments then the program is suspended until a\n\
+character is typed.\n\
+\n\
+The following example prints a message and then waits 5 seconds before\n\
+clearing the screen.\n\
 \n\
 @example\n\
 @group\n\
@@ -681,6 +685,7 @@
 clc;\n\
 @end group\n\
 @end example\n\
+@seealso{kbhit, sleep}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -736,6 +741,7 @@
        "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} sleep (@var{seconds})\n\
 Suspend the execution of the program for the given number of seconds.\n\
+@seealso{usleep, pause}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -776,6 +782,7 @@
 microseconds.  On systems where it is not possible to sleep for periods\n\
 of time less than one second, @code{usleep} will pause the execution for\n\
 @code{round (@var{microseconds} / 1e6)} seconds.\n\
+@seealso{sleep, pause}\n\
 @end deftypefn")
 {
   octave_value_list retval;
@@ -915,8 +922,8 @@
 DEFUN (have_window_system, , ,
   "-*- texinfo -*-\n\
 @deftypefn {Built-in Function} {} have_window_system ()\n\
-Return true if Octave a window system is available (X11, Windows,\n\
-or Apple OS X) and false otherwise.\n\
+Return true if a window system is available (X11, Windows, or Apple OS X)\n\
+and false otherwise.\n\
 @end deftypefn")
 {
   return octave_value (display_info::display_available ());
--- a/scripts/gui/listdlg.m	Sun Apr 27 20:12:07 2014 +0200
+++ b/scripts/gui/listdlg.m	Mon Apr 28 10:43:44 2014 -0700
@@ -74,7 +74,7 @@
 ## @end group
 ## @end example
 ##
-## @seealso{errordlg, helpdlg, inputdlg, msgbox, questdlg, warndlg}
+## @seealso{menu, errordlg, helpdlg, inputdlg, msgbox, questdlg, warndlg}
 ## @end deftypefn
 
 function [sel, ok] = listdlg (varargin)
--- a/scripts/miscellaneous/menu.m	Sun Apr 27 20:12:07 2014 +0200
+++ b/scripts/miscellaneous/menu.m	Mon Apr 28 10:43:44 2014 -0700
@@ -24,7 +24,7 @@
 ## programs.  There is no limit to the number of options that may be passed
 ## in, but it may be confusing to present more than will fit easily on one
 ## screen.
-## @seealso{disp, printf, input}
+## @seealso{input, listdlg}
 ## @end deftypefn
 
 ## Author: jwe
--- a/scripts/plot/util/private/__gnuplot_get_var__.m	Sun Apr 27 20:12:07 2014 +0200
+++ b/scripts/plot/util/private/__gnuplot_get_var__.m	Mon Apr 28 10:43:44 2014 -0700
@@ -27,7 +27,7 @@
 function gp_var_value = __gnuplot_get_var__ (h, gp_var_name, fmt = "")
 
   if (numel (h) == 1 && isfigure (h))
-    if (isempty (get (gcf, "__plot_stream__")))
+    if (isempty (get (h, "__plot_stream__")))
       ostream = __gnuplot_open_stream__ (2, h);
     else
       ostream = get (h, "__plot_stream__");
--- a/scripts/sparse/spy.m	Sun Apr 27 20:12:07 2014 +0200
+++ b/scripts/sparse/spy.m	Mon Apr 28 10:43:44 2014 -0700
@@ -34,7 +34,7 @@
   endif
 
   markersize = NaN;
-  if (numel (x) < 1000)
+  if (nnz (x) < 1000)
     line_spec = "*";
   else
     line_spec = ".";