# HG changeset patch # User jwe # Date 1194024264 0 # Node ID e8c94e473c6861455f34eddc7ae1070ac32524b0 # Parent 81bed50b9feba2e225dc236fee901a65bc0e0ba8 [project @ 2007-11-02 17:24:23 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2007-11-02 Olli Saarela + + * time/asctime.m, general/structfun.m: Fix broken @examples in + help texts. + 2007-11-02 Kai Habel * plot/bar.m, plot/barh.m: Doc fix. diff --git a/scripts/general/structfun.m b/scripts/general/structfun.m --- a/scripts/general/structfun.m +++ b/scripts/general/structfun.m @@ -42,7 +42,7 @@ ## @group ## s.name1 = "John Smith"; ## s.name2 = "Jill Jones"; -## structfun (@{x@} regexp (x, '(\w+)$', 'matches')@{1@}, s, +## structfun (@@(x) regexp (x, '(\w+)$', 'matches')@{1@}, s, ## 'UniformOutput', false) ## @end group ## @end example diff --git a/scripts/time/asctime.m b/scripts/time/asctime.m --- a/scripts/time/asctime.m +++ b/scripts/time/asctime.m @@ -24,7 +24,7 @@ ## ## @example ## @group -## asctime (localtime (time ()) +## asctime (localtime (time ())) ## @result{} "Mon Feb 17 01:15:06 1997\n" ## @end group ## @end example diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,13 @@ +2007-11-02 John W. Eaton + + * file-io.cc (fopen_mode_to_ios_mode): Use std::ios::app instead + of std::ios::ate. + +2007-11-02 Olli Saarela + + * input.cc, pr-output.cc, bitfcns.cc, DLD-FUNCTIONS/time.cc: + Fix broken @examples in help texts. + 2007-10-31 John W. Eaton * data.cc (Fnorm): Avoid warning about p_val possibly being used diff --git a/src/DLD-FUNCTIONS/time.cc b/src/DLD-FUNCTIONS/time.cc --- a/src/DLD-FUNCTIONS/time.cc +++ b/src/DLD-FUNCTIONS/time.cc @@ -188,7 +188,7 @@ \n\ @example\n\ @group\n\ -mktime (localtime (time ())\n\ +mktime (localtime (time ()))\n\ @result{} 856163706\n\ @end group\n\ @end example\n\ diff --git a/src/bitfcns.cc b/src/bitfcns.cc --- a/src/bitfcns.cc +++ b/src/bitfcns.cc @@ -393,7 +393,7 @@ @var{n} must be in range [1,log2(bitmax)+1] usually [1,33]\n\ \n\ @example\n\ -bitshift (eye (3), 1))\n\ +bitshift (eye (3), 1)\n\ @result{}\n\ @group\n\ 2 0 0\n\ diff --git a/src/file-io.cc b/src/file-io.cc --- a/src/file-io.cc +++ b/src/file-io.cc @@ -188,7 +188,7 @@ else if (mode == "w+t") retval = std::ios::in | std::ios::out | std::ios::trunc; else if (mode == "a+t") - retval = std::ios::in | std::ios::out | std::ios::ate; + retval = std::ios::in | std::ios::out | std::ios::app; else if (mode == "rb" || mode == "r") retval = std::ios::in | std::ios::binary; else if (mode == "wb" || mode == "w") @@ -201,7 +201,7 @@ retval = (std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary); else if (mode == "a+b" || mode == "a+") - retval = (std::ios::in | std::ios::out | std::ios::ate + retval = (std::ios::in | std::ios::out | std::ios::app | std::ios::binary); else ::error ("invalid mode specified"); diff --git a/src/input.cc b/src/input.cc --- a/src/input.cc +++ b/src/input.cc @@ -1189,7 +1189,7 @@ To change it, use a command like\n\ \n\ @example\n\ -octave:13> PS1 = \"\\\\u@@\\\\H> \"\n\ +octave:13> PS1 (\"\\\\u@@\\\\H> \")\n\ @end example\n\ \n\ @noindent\n\ diff --git a/src/pr-output.cc b/src/pr-output.cc --- a/src/pr-output.cc +++ b/src/pr-output.cc @@ -2732,7 +2732,8 @@ You can convert the string back into a matrix as follows:\n\ \n\ @example\n\ - eval(['[',rats(hilb(4)),'];'])\n\ + r = rats(hilb(4));\n\ + x = str2num(r)\n\ @end example\n\ \n\ The optional second argument defines the maximum length of the string\n\ @@ -3127,7 +3128,6 @@ @group\n\ ans =\n\ \n\ - 3.1416\n\ 9.8696\n\ 97.409\n\ 9488.5\n\ @@ -3146,7 +3146,6 @@ @group\n\ ans =\n\ \n\ - 3.1416\n\ 9.8696\n\ 97.409\n\ 9488.5\n\