changeset 26605:5224600b1b20

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Tue, 22 Jan 2019 23:54:51 +0000
parents 10b824cf2b18 (current diff) 8af641520aa9 (diff)
children 884fdd6c9210
files libinterp/corefcn/graphics.cc
diffstat 34 files changed, 170 insertions(+), 166 deletions(-) [+]
line wrap: on
line diff
--- a/build-aux/subst-config-vals.in.sh	Tue Jan 22 23:27:43 2019 +0000
+++ b/build-aux/subst-config-vals.in.sh	Tue Jan 22 23:54:51 2019 +0000
@@ -118,7 +118,6 @@
 DEPEND_EXTRA_SED_PATTERN="@DEPEND_EXTRA_SED_PATTERN@"
 DL_LD="@DL_LD@"
 DL_LDFLAGS="@DL_LDFLAGS@"
-DL_LIBS="@DL_LIBS@"
 EXEEXT="@EXEEXT@"
 GCC_VERSION="@GCC_VERSION@"
 GXX_VERSION="@GXX_VERSION@"
@@ -183,9 +182,6 @@
 OCT_LINK_DEPS="@OCT_LINK_DEPS@"
 OCT_LINK_OPTS="@OCT_LINK_OPTS@"
 OPENGL_LIBS="@OPENGL_LIBS@"
-OSMESA_CPPFLAGS="@OSMESA_CPPFLAGS@"
-OSMESA_LDFLAGS="@OSMESA_LDFLAGS@"
-OSMESA_LIBS="@OSMESA_LIBS@"
 PCRE_CPPFLAGS="@PCRE_CPPFLAGS@"
 PCRE_LDFLAGS="@PCRE_LDFLAGS@"
 PCRE_LIBS="@PCRE_LIBS@"
@@ -283,7 +279,6 @@
   -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
   -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
   -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_EXEC_PREFIX%|\"${exec_prefix}\"|" \
   -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
   -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
@@ -354,9 +349,6 @@
   -e "s|%OCTAVE_CONF_OCT_LINK_DEPS%|\"${OCT_LINK_DEPS}\"|" \
   -e "s|%OCTAVE_CONF_OCT_LINK_OPTS%|\"${OCT_LINK_OPTS}\"|" \
   -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_CPPFLAGS%|\"${OSMESA_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_LDFLAGS%|\"${OSMESA_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_LIBS%|\"${OSMESA_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_CPPFLAGS%|\"${PCRE_CPPFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_LDFLAGS%|\"${PCRE_LDFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_LIBS%|\"${PCRE_LIBS}\"|" \
--- a/build-aux/subst-cross-config-vals.in.sh	Tue Jan 22 23:27:43 2019 +0000
+++ b/build-aux/subst-cross-config-vals.in.sh	Tue Jan 22 23:54:51 2019 +0000
@@ -130,7 +130,6 @@
 DEPEND_EXTRA_SED_PATTERN="@DEPEND_EXTRA_SED_PATTERN@"
 DL_LD="@DL_LD@"
 DL_LDFLAGS="@DL_LDFLAGS@"
-DL_LIBS="@DL_LIBS@"
 EXEEXT="@EXEEXT@"
 GCC_VERSION="@GCC_VERSION@"
 GXX_VERSION="@GXX_VERSION@"
@@ -187,9 +186,6 @@
 OCT_LINK_DEPS="@OCT_LINK_DEPS@"
 OCT_LINK_OPTS="@OCT_LINK_OPTS@"
 OPENGL_LIBS="@OPENGL_LIBS@"
-OSMESA_CPPFLAGS="@OSMESA_CPPFLAGS@"
-OSMESA_LDFLAGS="@OSMESA_LDFLAGS@"
-OSMESA_LIBS="@OSMESA_LIBS@"
 PCRE_CPPFLAGS="@PCRE_CPPFLAGS@"
 PCRE_LDFLAGS="@PCRE_LDFLAGS@"
 PCRE_LIBS="@PCRE_LIBS@"
@@ -287,7 +283,6 @@
   -e "s|%OCTAVE_CONF_DEPEND_FLAGS%|\"${DEPEND_FLAGS}\"|" \
   -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \
   -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_EXEC_PREFIX%|\"${exec_prefix}\"|" \
   -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \
   -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \
@@ -358,9 +353,6 @@
   -e "s|%OCTAVE_CONF_OCT_LINK_DEPS%|\"${OCT_LINK_DEPS}\"|" \
   -e "s|%OCTAVE_CONF_OCT_LINK_OPTS%|\"${OCT_LINK_OPTS}\"|" \
   -e "s|%OCTAVE_CONF_OPENGL_LIBS%|\"${OPENGL_LIBS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_CPPFLAGS%|\"${OSMESA_CPPFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_LDFLAGS%|\"${OSMESA_LDFLAGS}\"|" \
-  -e "s|%OCTAVE_CONF_OSMESA_LIBS%|\"${OSMESA_LIBS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_CPPFLAGS%|\"${PCRE_CPPFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_LDFLAGS%|\"${PCRE_LDFLAGS}\"|" \
   -e "s|%OCTAVE_CONF_PCRE_LIBS%|\"${PCRE_LIBS}\"|" \
--- a/doc/interpreter/octave.texi	Tue Jan 22 23:27:43 2019 +0000
+++ b/doc/interpreter/octave.texi	Tue Jan 22 23:54:51 2019 +0000
@@ -29,6 +29,11 @@
 * Octave: (octave).             Interactive language for numerical computations.
 @end direntry
 
+@c Settings for appearance of example blocks
+@c --------------------------------------------------------
+
+@exampleindent 2
+
 @c Settings for printing on 8-1/2 by 11 inch paper (default):
 @c --------------------------------------------------------
 
@@ -41,21 +46,20 @@
 @c Settings for small book format:
 @c ------------------------------
 
-@ignore
-@smallbook
-@setchapternewpage odd
-@finalout
-@iftex
-@cropmarks
-@end iftex
-@end ignore
+@c @smallbook
+@c @setchapternewpage odd
+@c @finalout
+@c @iftex
+@c @cropmarks
+@c @end iftex
+
+@c ------------------------------
 
 @defindex op
 @defindex pr
 
-@c The version.texi file doesn't include a chapter, so it must not be
-@c included if you want to run the Emacs function
-@c texinfo-multiple-files-update.
+@c The version.texi file doesn't include a chapter, so it must not be included
+@c if you want to run the Emacs function texinfo-multiple-files-update.
 @include version-octave.texi
 
 @settitle GNU Octave (version @value{VERSION})
@@ -927,6 +931,7 @@
 @end menu
 
 @c ------------------------------------------------------------------------
+@c Chapters of manual.
 
 @include preface.texi
 @include intro.texi
--- a/libinterp/build-env.h	Tue Jan 22 23:27:43 2019 +0000
+++ b/libinterp/build-env.h	Tue Jan 22 23:54:51 2019 +0000
@@ -73,7 +73,6 @@
     extern const char *DEFS;
     extern const char *DL_LD;
     extern const char *DL_LDFLAGS;
-    extern const char *DL_LIBS;
     extern const char *EXEEXT;
     extern const char *GCC_VERSION;
     extern const char *GXX_VERSION;
@@ -132,9 +131,6 @@
     extern const char *OCT_LINK_DEPS;
     extern const char *OCT_LINK_OPTS;
     extern const char *OPENGL_LIBS;
-    extern const char *OSMESA_CPPFLAGS;
-    extern const char *OSMESA_LDFLAGS;
-    extern const char *OSMESA_LIBS;
     extern const char *PCRE_CPPFLAGS;
     extern const char *PCRE_LDFLAGS;
     extern const char *PCRE_LIBS;
--- a/libinterp/build-env.in.cc	Tue Jan 22 23:27:43 2019 +0000
+++ b/libinterp/build-env.in.cc	Tue Jan 22 23:54:51 2019 +0000
@@ -111,8 +111,6 @@
 
     const char *DL_LDFLAGS = %OCTAVE_CONF_DL_LDFLAGS%;
 
-    const char *DL_LIBS = %OCTAVE_CONF_DL_LIBS%;
-
     const char *EXEEXT = %OCTAVE_CONF_EXEEXT%;
 
     const char *GCC_VERSION = %OCTAVE_CONF_GCC_VERSION%;
@@ -229,12 +227,6 @@
 
     const char *OPENGL_LIBS = %OCTAVE_CONF_OPENGL_LIBS%;
 
-    const char *OSMESA_CPPFLAGS = %OCTAVE_CONF_OSMESA_CPPFLAGS%;
-
-    const char *OSMESA_LDFLAGS = %OCTAVE_CONF_OSMESA_LDFLAGS%;
-
-    const char *OSMESA_LIBS = %OCTAVE_CONF_OSMESA_LIBS%;
-
     const char *PCRE_CPPFLAGS = %OCTAVE_CONF_PCRE_CPPFLAGS%;
 
     const char *PCRE_LDFLAGS = %OCTAVE_CONF_PCRE_LDFLAGS%;
--- a/libinterp/corefcn/graphics.cc	Tue Jan 22 23:27:43 2019 +0000
+++ b/libinterp/corefcn/graphics.cc	Tue Jan 22 23:54:51 2019 +0000
@@ -12215,12 +12215,12 @@
 @group
 hf = figure ();
 set (hf, "paperorientation")
-@result{}  paperorientation:  [ landscape | @{portrait@} | rotated ]
+@result{}  [ landscape | @{portrait@} ]
 @end group
 @end example
 
 @noindent
-shows the paperorientation property can take three values with the default
+shows the paperorientation property can take two values with the default
 being @qcode{"portrait"}.
 @seealso{get}
 @end deftypefn */)
--- a/libinterp/corefcn/sparse.cc	Tue Jan 22 23:27:43 2019 +0000
+++ b/libinterp/corefcn/sparse.cc	Tue Jan 22 23:54:51 2019 +0000
@@ -120,10 +120,10 @@
 @var{i} = [1 1 2]; @var{j} = [1 1 2]; @var{sv} = [3 4 5];
 sparse (@var{i}, @var{j}, @var{sv}, 3, 4)
 @result{}
-Compressed Column Sparse (rows = 3, cols = 4, nnz = 2 [17%])
+   Compressed Column Sparse (rows = 3, cols = 4, nnz = 2 [17%])
 
-  (1, 1) ->  7
-  (2, 2) ->  5
+     (1, 1) ->  7
+     (2, 2) ->  5
 @end group
 @end example
 
@@ -134,10 +134,10 @@
 @var{i} = [1 1 2]; @var{j} = [1 1 2]; @var{sv} = [3 4 5];
 sparse (@var{i}, @var{j}, @var{sv}, 3, 4, "unique")
 @result{}
-Compressed Column Sparse (rows = 3, cols = 4, nnz = 2 [17%])
+   Compressed Column Sparse (rows = 3, cols = 4, nnz = 2 [17%])
 
-  (1, 1) ->  4
-  (2, 2) ->  5
+     (1, 1) ->  4
+     (2, 2) ->  5
 @end group
 @end example
 @seealso{full, accumarray, spalloc, spdiags, speye, spones, sprand, sprandn, sprandsym, spconvert, spfun}
--- a/libinterp/corefcn/toplev.cc	Tue Jan 22 23:27:43 2019 +0000
+++ b/libinterp/corefcn/toplev.cc	Tue Jan 22 23:54:51 2019 +0000
@@ -477,7 +477,6 @@
            { "DEFS", octave::build_env::DEFS },
            { "DL_LD", octave::build_env::DL_LD },
            { "DL_LDFLAGS", octave::build_env::DL_LDFLAGS },
-           { "DL_LIBS", octave::build_env::DL_LIBS },
            { "GCC_VERSION", octave::build_env::GCC_VERSION },
            { "GXX_VERSION", octave::build_env::GXX_VERSION },
            { "EXEEXT", octave::build_env::EXEEXT },
@@ -530,9 +529,6 @@
            { "OCT_LINK_DEPS", octave::build_env::OCT_LINK_DEPS },
            { "OCT_LINK_OPTS", octave::build_env::OCT_LINK_OPTS },
            { "OPENGL_LIBS", octave::build_env::OPENGL_LIBS },
-           { "OSMESA_CPPFLAGS", octave::build_env::OSMESA_CPPFLAGS },
-           { "OSMESA_LDFLAGS", octave::build_env::OSMESA_LDFLAGS },
-           { "OSMESA_LIBS", octave::build_env::OSMESA_LIBS },
            { "PCRE_CPPFLAGS", octave::build_env::PCRE_CPPFLAGS },
            { "PCRE_LDFLAGS", octave::build_env::PCRE_LDFLAGS },
            { "PCRE_LIBS", octave::build_env::PCRE_LIBS },
--- a/scripts/general/bitset.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/bitset.m	Tue Jan 22 23:54:51 2019 +0000
@@ -31,7 +31,7 @@
 ## @example
 ## @group
 ## x = bitset (1, 3:5)
-## x =
+##   @result{} x =
 ##
 ##    5    9   17
 ##
@@ -48,7 +48,7 @@
 ## @example
 ## @group
 ## x = bitset ([15 14], 1, [0 1])
-## x =
+##   @result{} x =
 ##
 ##    14    15
 ## @end group
--- a/scripts/general/circshift.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/circshift.m	Tue Jan 22 23:54:51 2019 +0000
@@ -39,24 +39,28 @@
 ##      7, 8, 9];
 ## ## positive shift on rows (1st non-singular dim)
 ## circshift (x, 1)
-##  @result{}  7, 8, 9
-##      1, 2, 3
-##      4, 5, 6
+##   @result{}
+##        7   8   9
+##        1   2   3
+##        4   5   6
 ## ## negative shift on rows (1st non-singular dim)
 ## circshift (x, -2)
-##  @result{}  7, 8, 9
-##      1, 2, 3
-##      4, 5, 6
+##   @result{}
+##        7   8   9
+##        1   2   3
+##        4   5   6
 ## ## no shift of rows, shift columns by 1 (2nd dimension)
 ## circshift (x, [0,1])
-##  @result{}  3, 1, 2
-##      6, 4, 5
-##      9, 7, 8
+##   @result{}
+##        3   1   2
+##        6   4   5
+##        9   7   8
 ## ## shift columns (2nd dimension)
 ## circshift (x, 1, 2)
-##  @result{}  3, 1, 2
-##      6, 4, 5
-##      9, 7, 8
+##   @result{}
+##        3   1   2
+##        6   4   5
+##        9   7   8
 ## @end example
 ## @seealso{permute, ipermute, shiftdim}
 ## @end deftypefn
--- a/scripts/general/idivide.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/idivide.m	Tue Jan 22 23:54:51 2019 +0000
@@ -52,13 +52,13 @@
 ## @example
 ## @group
 ## idivide (int8 ([-3, 3]), int8 (4), "fix")
-##   @result{} int8 ([0, 0])
+##   @result{}   0   0
 ## idivide (int8 ([-3, 3]), int8 (4), "round")
-##   @result{} int8 ([-1, 1])
+##   @result{}  -1   1
 ## idivide (int8 ([-3, 3]), int8 (4), "floor")
-##   @result{} int8 ([-1, 0])
+##   @result{}  -1   0
 ## idivide (int8 ([-3, 3]), int8 (4), "ceil")
-##   @result{} int8 ([0, 1])
+##   @result{}   0   1
 ## @end group
 ## @end example
 ##
--- a/scripts/general/int2str.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/int2str.m	Tue Jan 22 23:54:51 2019 +0000
@@ -24,18 +24,19 @@
 ## @example
 ## @group
 ## int2str (123)
-##      @result{} "123"
+##   @result{} 123
 ##
 ## s = int2str ([1, 2, 3; 4, 5, 6])
-##      @result{} s =
+##   @result{} s =
 ##         1  2  3
 ##         4  5  6
 ##
 ## whos s
-##      @result{}
-##       Attr Name        Size                     Bytes  Class
-##       ==== ====        ====                     =====  =====
-##            s           2x7                         14  char
+##   @result{} Variables in the current scope:
+##         Attr Name        Size                     Bytes  Class
+##         ==== ====        ====                     =====  =====
+##              s           2x7                         14  char
+##      Total is 14 elements using 14 bytes
 ## @end group
 ## @end example
 ##
--- a/scripts/general/integral3.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/integral3.m	Tue Jan 22 23:54:51 2019 +0000
@@ -84,7 +84,7 @@
 ## @group
 ## @var{f} = @@(@var{x},@var{y},@var{z}) ones (size (@var{x}));
 ## @var{q} = integral3 (@var{f}, 0, 1, 0, 1, 0, 1)
-##   @result{} @var{q} =  1
+##   @result{} @var{q} =  1.00000
 ## @end group
 ## @end example
 ##
@@ -97,8 +97,8 @@
 ## @group
 ## @var{f} = @@(@var{x},@var{y}) ones (size (@var{x}));
 ## @var{ymax} = @@(@var{x}) sqrt (1 - @var{x}.^2);
-## @var{zmax} = @@(@var{x}) sqrt (1 - @var{x}.^2 - @var{y}.^2);
-## @var{q} = integral3 (@var{f}, 0, 1, 0, @var{ymax})
+## @var{zmax} = @@(@var{x},@var{y}) sqrt (1 - @var{x}.^2 - @var{y}.^2);
+## @var{q} = integral3 (@var{f}, 0, 1, 0, @var{ymax}, 0, @var{zmax})
 ##   @result{} @var{q} =  0.52360
 ## @end group
 ## @end example
--- a/scripts/general/num2str.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/num2str.m	Tue Jan 22 23:54:51 2019 +0000
@@ -32,23 +32,24 @@
 ## @example
 ## @group
 ## num2str (123.456)
-##      @result{} "123.46"
+##   @result{} 123.456
 ##
 ## num2str (123.456, 4)
-##      @result{} "123.5"
+##   @result{} 123.5
 ##
 ## s = num2str ([1, 1.34; 3, 3.56], "%5.1f")
-##      @result{} s =
-##         1.0  1.3
-##         3.0  3.6
+##   @result{} s =
+##        1.0  1.3
+##        3.0  3.6
 ## whos s
-##      @result{}
-##       Attr Name        Size                     Bytes  Class
-##       ==== ====        ====                     =====  =====
-##            s           2x8                         16  char
+##   @result{} Variables in the current scope:
+##         Attr Name        Size                     Bytes  Class
+##         ==== ====        ====                     =====  =====
+##              s           2x8                         16  char
+##      Total is 16 elements using 16 bytes
 ##
 ## num2str (1.234 + 27.3i)
-##      @result{} "1.234+27.3i"
+##   @result{} 1.234+27.3i
 ## @end group
 ## @end example
 ##
--- a/scripts/general/rat.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/rat.m	Tue Jan 22 23:54:51 2019 +0000
@@ -38,14 +38,14 @@
 ##
 ## @example
 ## @group
-## @var{s} = rat (pi)
+## s = rat (pi)
 ## @result{} s = 3 + 1/(7 + 1/16)
 ##
-## [@var{n}, @var{d}] = rat (pi)
-## @result{} @var{n} =  355
-## @result{} @var{d} =  113
+## [n, d] = rat (pi)
+## @result{} n =  355
+## @result{} d =  113
 ##
-## @var{n}/@var{d} - pi
+## n / d - pi
 ## @result{} 0.00000026676
 ## @end group
 ## @end example
--- a/scripts/general/repelem.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/repelem.m	Tue Jan 22 23:54:51 2019 +0000
@@ -54,7 +54,8 @@
 ## @example
 ## @group
 ## A = magic (3)
-##   @result{}   8   1   6
+##   @result{} A =
+##        8   1   6
 ##        3   5   7
 ##        4   9   2
 ## B1 = [1 2 3];
--- a/scripts/general/shiftdim.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/shiftdim.m	Tue Jan 22 23:54:51 2019 +0000
@@ -37,12 +37,14 @@
 ## @group
 ## x = ones (1, 2, 3);
 ## size (shiftdim (x, -1))
-##    @result{} [1, 1, 2, 3]
+##   @result{}   1   1   2   3
 ## size (shiftdim (x, 1))
-##    @result{} [2, 3]
+##   @result{}   2   3
 ## [b, ns] = shiftdim (x)
-##    @result{} b = [1, 1, 1; 1, 1, 1]
-##    @result{} ns = 1
+##   @result{} b =
+##         1   1   1
+##         1   1   1
+##   @result{} ns = 1
 ## @end group
 ## @end example
 ## @seealso{reshape, permute, ipermute, circshift, squeeze}
--- a/scripts/general/structfun.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/structfun.m	Tue Jan 22 23:54:51 2019 +0000
@@ -45,11 +45,9 @@
 ## s.name2 = "Jill Jones";
 ## structfun (@@(x) regexp (x, '(\w+)$', "matches")@{1@}, s,
 ##            "UniformOutput", false)
-## @result{}
-##    @{
-##      name1 = Smith
-##      name2 = Jones
-##    @}
+##   @result{} scalar structure containing the fields:
+##        name1 = Smith
+##        name2 = Jones
 ## @end group
 ## @end example
 ##
--- a/scripts/general/trapz.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/general/trapz.m	Tue Jan 22 23:54:51 2019 +0000
@@ -43,12 +43,15 @@
 ## @group
 ## x = 0:0.1:1;
 ## y = x.^3;
+## ## No scaling
 ## q = trapz (y)
-##   @result{} q = 2.525   # No scaling
+##   @result{} q = 2.5250
+## ## Approximation to integral by scaling
 ## q * 0.1
-##   @result{} q = 0.2525  # Approximation to integral by scaling
+##   @result{} 0.25250
+## ## Same result by specifying @var{x}
 ## trapz (x, y)
-##   @result{} q = 0.2525  # Same result by specifying @var{x}
+##   @result{} 0.25250
 ## @end group
 ## @end example
 ##
--- a/scripts/linear-algebra/condeig.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/linear-algebra/condeig.m	Tue Jan 22 23:54:51 2019 +0000
@@ -50,7 +50,9 @@
 ## @group
 ## a = [1, 2; 3, 4];
 ## c = condeig (a)
-## @result{} [1.0150; 1.0150]
+##   @result{} c =
+##        1.0150
+##        1.0150
 ## @end group
 ## @end example
 ## @seealso{eig, cond, balance}
--- a/scripts/linear-algebra/cross.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/linear-algebra/cross.m	Tue Jan 22 23:54:51 2019 +0000
@@ -32,8 +32,9 @@
 ##
 ## @example
 ## @group
-## cross ([1,1,0], [0,1,1])
-##      @result{} [ 1; -1; 1 ]
+## cross ([1, 1, 0], [0, 1, 1])
+##   @result{}
+##        1   -1   1
 ## @end group
 ## @end example
 ##
--- a/scripts/linear-algebra/qzhess.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/linear-algebra/qzhess.m	Tue Jan 22 23:54:51 2019 +0000
@@ -29,10 +29,19 @@
 ## @example
 ## @group
 ## [aa, bb, q, z] = qzhess ([1, 2; 3, 4], [5, 6; 7, 8])
-##      @result{} aa = [ -3.02244, -4.41741;  0.92998,  0.69749 ]
-##      @result{} bb = [ -8.60233, -9.99730;  0.00000, -0.23250 ]
-##      @result{}  q = [ -0.58124, -0.81373; -0.81373,  0.58124 ]
-##      @result{}  z = [ 1, 0; 0, 1 ]
+##   @result{} aa =
+##       -3.02244  -4.41741
+##        0.92998   0.69749
+##   @result{} bb =
+##       -8.60233  -9.99730
+##        0.00000  -0.23250
+##   @result{} q =
+##       -0.58124  -0.81373
+##       -0.81373   0.58124
+##   @result{} z =
+##      Diagonal Matrix
+##        1   0
+##        0   1
 ## @end group
 ## @end example
 ##
--- a/scripts/miscellaneous/computer.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/miscellaneous/computer.m	Tue Jan 22 23:54:51 2019 +0000
@@ -31,10 +31,10 @@
 ## @example
 ## @group
 ## computer ()
-##    @print{} i586-pc-linux-gnu
+##    @print{} x86_64-pc-linux-gnu
 ##
 ## mycomp = computer ()
-##    @result{} mycomp = "i586-pc-linux-gnu"
+##    @result{} mycomp = x86_64-pc-linux-gnu
 ## @end group
 ## @end example
 ##
--- a/scripts/miscellaneous/fullfile.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/miscellaneous/fullfile.m	Tue Jan 22 23:54:51 2019 +0000
@@ -32,9 +32,12 @@
 ## @example
 ## @group
 ## fullfile ("/home/username", "data", @{"f1.csv", "f2.csv", "f3.csv"@})
-## @result{}  /home/username/data/f1.csv
-##     /home/username/data/f2.csv
-##     /home/username/data/f3.csv
+##   @result{}
+##       @{
+##         [1,1] = /home/username/data/f1.csv
+##         [1,2] = /home/username/data/f2.csv
+##         [1,3] = /home/username/data/f3.csv
+##       @}
 ## @end group
 ## @end example
 ##
--- a/scripts/miscellaneous/orderfields.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/miscellaneous/orderfields.m	Tue Jan 22 23:54:51 2019 +0000
@@ -41,13 +41,12 @@
 ## @group
 ## s = struct ("d", 4, "b", 2, "a", 1, "c", 3);
 ## t1 = orderfields (s)
-##      @result{} t1 =
-##         @{
-##           a =  1
-##           b =  2
-##           c =  3
-##           d =  4
-##         @}
+##   @result{} t1 =
+##        scalar structure containing the fields:
+##          a =  1
+##          b =  2
+##          c =  3
+##          d =  4
 ## @end group
 ## @end example
 ##
@@ -55,44 +54,41 @@
 ## @group
 ## t = struct ("d", @{@}, "c", @{@}, "b", @{@}, "a", @{@});
 ## t2 = orderfields (s, t)
-##      @result{} t2 =
-##         @{
-##           d =  4
-##           c =  3
-##           b =  2
-##           a =  1
-##         @}
+##   @result{} t2 =
+##        scalar structure containing the fields:
+##          d =  4
+##          c =  3
+##          b =  2
+##          a =  1
 ## @end group
 ## @end example
 ##
 ## @example
 ## @group
 ## t3 = orderfields (s, [3, 2, 4, 1])
-##      @result{} t3 =
-##         @{
-##           a =  1
-##           b =  2
-##           c =  3
-##           d =  4
-##         @}
+##   @result{} t3 =
+##        scalar structure containing the fields:
+##          a =  1
+##          b =  2
+##          c =  3
+##          d =  4
 ## @end group
 ## @end example
 ##
 ## @example
 ## @group
 ## [t4, p] = orderfields (s, @{"d", "c", "b", "a"@})
-##      @result{} t4 =
-##         @{
-##           d =  4
-##           c =  3
-##           b =  2
-##           a =  1
-##         @}
-##         p =
-##            1
-##            4
-##            2
-##            3
+##   @result{} t4 =
+##        scalar structure containing the fields:
+##          d =  4
+##          c =  3
+##          b =  2
+##          a =  1
+##      p =
+##         1
+##         4
+##         2
+##         3
 ## @end group
 ## @end example
 ##
--- a/scripts/miscellaneous/substruct.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/miscellaneous/substruct.m	Tue Jan 22 23:54:51 2019 +0000
@@ -26,21 +26,19 @@
 ## @example
 ## @group
 ## idx = substruct ("()", @{3, ":"@})
-##      @result{}
-##        idx =
-##        @{
+##   @result{} idx =
+##        scalar structure containing the fields:
 ##          type = ()
 ##          subs =
 ##          @{
 ##            [1,1] =  3
 ##            [1,2] = :
 ##          @}
-##        @}
 ## x = [1, 2, 3;
 ##      4, 5, 6;
 ##      7, 8, 9];
 ## subsref (x, idx)
-##    @result{} 7  8  9
+##   @result{}   7   8   9
 ## @end group
 ## @end example
 ## @seealso{subsref, subsasgn}
--- a/scripts/miscellaneous/swapbytes.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/miscellaneous/swapbytes.m	Tue Jan 22 23:54:51 2019 +0000
@@ -26,7 +26,7 @@
 ## @example
 ## @group
 ## swapbytes (uint16 (1:4))
-## @result{} [   256   512   768  1024]
+## @result{}   256   512   768  1024
 ## @end group
 ## @end example
 ##
--- a/scripts/plot/draw/contourc.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/plot/draw/contourc.m	Tue Jan 22 23:54:51 2019 +0000
@@ -59,9 +59,10 @@
 ## x = 0:2;
 ## y = x;
 ## z = x' * y;
-## contourc (x, y, z, 2:3)
-##    @result{}   2.0000   2.0000   1.0000   3.0000   1.5000   2.0000
-##         2.0000   1.0000   2.0000   2.0000   2.0000   1.5000
+## c = contourc (x, y, z, 2:3)
+##   @result{} c =
+##         2.0000   1.0000   1.0000   2.0000   2.0000   3.0000   1.5000   2.0000
+##         4.0000   2.0000   2.0000   1.0000   1.0000   2.0000   2.0000   1.5000
 ## @end group
 ## @end example
 ## @seealso{contour, contourf, contour3, clabel}
--- a/scripts/plot/util/shg.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/plot/util/shg.m	Tue Jan 22 23:54:51 2019 +0000
@@ -39,7 +39,7 @@
   hf = get (0, "currentfigure");
   if (! isempty (hf))
     set (hf, "visible", "on");
-    __show_figure__ (hf));
+    __show_figure__ (hf);
   endif
 
 endfunction
--- a/scripts/sparse/ilu.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/sparse/ilu.m	Tue Jan 22 23:54:51 2019 +0000
@@ -313,6 +313,13 @@
 %! assert (norm (L1 - L2, "fro") / norm (L1, "fro"), 0, eps);
 %! assert (norm (U1 - U2, "fro") / norm (U1, "fro"), 0, eps);
 
+## Restore rand "state" value
+%!shared old_rand_state, restore_state
+%! ## Save and restore the state of the random number generator that is used by
+%! ## the unit tests in this file.
+%! old_rand_state = rand ("state");
+%! restore_state = onCleanup (@() rand ("state", old_rand_state));
+
 ## Tests for real matrices of different sizes for ilu0, iluc and ilutp.
 ## The difference A - L*U should be not greater than eps because with droptol
 ## equal to 0, the LU complete factorization is performed.
@@ -322,6 +329,8 @@
 %! n_medium = 600;
 %! n_large = 10000;
 %! A_tiny = spconvert ([1 4 2 3 3 4 2 5; 1 1 2 3 4 4 5 5; 1 2 3 4 5 6 7 8]');
+%! ## initialize generator to make behavior reproducible
+%! rand ("state", 42);
 %! A_small = sprand (n_small, n_small, 1/n_small) + speye (n_small);
 %! A_medium = sprand (n_medium, n_medium, 1/n_medium) + speye (n_medium);
 %! A_large = sprand (n_large, n_large, 1/n_large/10) + speye (n_large);
@@ -393,6 +402,8 @@
 %! n_large = 10000;
 %! A_tiny = spconvert ([1 4 2 3 3 4 2 5; 1 1 2 3 4 4 5 5; 1 2 3 4 5 6 7 8]');
 %! A_tiny(1,1) += 1i;
+%! ## initialize generator to make behavior reproducible
+%! rand ("state", 42);
 %! A_small = sprand (n_small, n_small, 1/n_small) + ...
 %!   i * sprand (n_small, n_small, 1/n_small) + speye (n_small);
 %! A_medium = sprand (n_medium, n_medium, 1/n_medium) + ...
--- a/scripts/specfun/isprime.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/specfun/isprime.m	Tue Jan 22 23:54:51 2019 +0000
@@ -41,14 +41,14 @@
 ## @example
 ## @group
 ## isprime (1:6)
-##     @result{} [0, 1, 1, 0, 1, 0]
+##   @result{}  0  1  1  0  1  0
 ## @end group
 ## @end example
 ##
 ## @example
 ## @group
 ## isprime ([i, 2, 3, 5])
-##     @result{} [0, 0, 1, 0]
+##   @result{}  0  0  1  0
 ## @end group
 ## @end example
 ##
--- a/scripts/statistics/runlength.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/statistics/runlength.m	Tue Jan 22 23:54:51 2019 +0000
@@ -29,7 +29,7 @@
 ## @example
 ## @group
 ## runlength ([2, 2, 0, 4, 4, 4, 0, 1, 1, 1, 1])
-## @result{}  [2, 1, 3, 1, 4]
+## @result{}   2   1   3   1   4
 ## @end group
 ## @end example
 ## @seealso{run_count}
--- a/scripts/time/clock.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/time/clock.m	Tue Jan 22 23:54:51 2019 +0000
@@ -29,7 +29,7 @@
 ## @example
 ## @group
 ## fix (clock ())
-##      @result{} [ 1993, 8, 20, 4, 56, 1 ]
+##   @result{}   1993      8     20      4     56      1
 ## @end group
 ## @end example
 ##
--- a/scripts/time/date.m	Tue Jan 22 23:27:43 2019 +0000
+++ b/scripts/time/date.m	Tue Jan 22 23:54:51 2019 +0000
@@ -25,7 +25,7 @@
 ## @example
 ## @group
 ## date ()
-##   @result{} "20-Aug-1993"
+##   @result{} 20-Aug-1993
 ## @end group
 ## @end example
 ## @seealso{now, clock, datestr, localtime}