changeset 18409:1e148ecdeedd

maint: Periodic merge of gui-release to default.
author John W. Eaton <jwe@octave.org>
date Wed, 29 Jan 2014 15:28:35 -0500
parents 4c064d3d2750 (current diff) a9cec5517d92 (diff)
children f8f37595c29f
files configure.ac examples/fortdemo.cc examples/fortsub.f libgui/languages/pt_BR.ts libinterp/octave-value/ov-cell.cc libinterp/octave-value/ov-class.cc libinterp/octave-value/ov-fcn-handle.cc
diffstat 39 files changed, 377 insertions(+), 188 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Jan 27 09:50:53 2014 -0800
+++ b/configure.ac	Wed Jan 29 15:28:35 2014 -0500
@@ -2719,9 +2719,14 @@
     case $host_os in
       *darwin*)
         ## Qt might be installed in framework
-        QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
-        QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
-        AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS], [test $link_all_deps = yes || test -n $QT_LDFLAGS])
+        if test -z "$QT_LIBS"; then
+          QT_LDFLAGS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -e '-F' | uniq | tr '\n' ' '`"
+          QT_LIBS="`$PKG_CONFIG --libs-only-other QtCore QtGui QtNetwork | tr ' ' '\n' | $GREP -v -e '-F' | uniq | tr '\n' ' '`"
+          ## Enabling link_all_deps works around libtool's imperfect handling
+          ## of the -F flag
+          AM_CONDITIONAL([AMCOND_LINK_ALL_DEPS],
+                         [test $link_all_deps = yes || test -n "$QT_LDFLAGS"])
+        fi
       ;;
     esac
 
--- a/doc/interpreter/Makefile.am	Mon Jan 27 09:50:53 2014 -0800
+++ b/doc/interpreter/Makefile.am	Wed Jan 29 15:28:35 2014 -0500
@@ -59,8 +59,8 @@
   $(top_srcdir)/examples/addtwomatrices.cc \
   $(top_srcdir)/examples/celldemo.cc \
   $(top_srcdir)/examples/embedded.cc \
-  $(top_srcdir)/examples/fortdemo.cc \
-  $(top_srcdir)/examples/fortsub.f \
+  $(top_srcdir)/examples/fortrandemo.cc \
+  $(top_srcdir)/examples/fortransub.f \
   $(top_srcdir)/examples/funcdemo.cc \
   $(top_srcdir)/examples/globaldemo.cc \
   $(top_srcdir)/examples/helloworld.cc \
--- a/doc/interpreter/debug.txi	Mon Jan 27 09:50:53 2014 -0800
+++ b/doc/interpreter/debug.txi	Wed Jan 29 15:28:35 2014 -0500
@@ -44,10 +44,10 @@
 
 There are two basic means of interrupting the execution of an Octave
 script.  These are breakpoints (@pxref{Breakpoints}), discussed in the next
-section and interruption based on some condition.
+section, and interruption based on some condition.
 
 Octave supports three means to stop execution based on the values set in
-the functions @code{debug_on_interrupt}, @code{debug_on_warning} and
+the functions @code{debug_on_interrupt}, @code{debug_on_warning}, and
 @code{debug_on_error}.
 
 @DOCSTRING(debug_on_interrupt)
@@ -59,13 +59,13 @@
 @node Leaving Debug Mode
 @section Leaving Debug Mode
 
-To leave the debug mode, use either @code{dbcont} 
-or @code{return}.
+Use either @code{dbcont} or @code{return} to leave the debug mode and
+continue the normal execution of the script.
 
 @DOCSTRING(dbcont)
 
-To quit debug mode and return directly to the prompt @code{dbquit}
-should be used instead
+To quit debug mode and return directly to the prompt without executing
+any additional code use @code{dbquit}.
 
 @DOCSTRING(dbquit)
 
@@ -75,21 +75,21 @@
 @node Breakpoints
 @section Breakpoints
 
-Breakpoints can be set in any Octave function, using the @code{dbstop}
+Breakpoints can be set in any m-file function by using the @code{dbstop}
 function.
 
 @DOCSTRING(dbstop)
 
 @noindent
 Breakpoints in class methods are also supported (e.g.,
-@code{dbstop("@@class/method")}).  However, breakpoints cannot be set in
-built-in functions (e.g., @code{sin}, etc.) or dynamically loaded function
+@code{dbstop ("@@class/method")}).  However, breakpoints cannot be set in
+built-in functions (e.g., @code{sin}, etc.) or dynamically loaded functions
 (i.e., oct-files).
 
-To set a breakpoint immediately on entering a function, the breakpoint
-should be set to line 1. The leading comment block will be ignored and
-the breakpoint will be set to the first executable statement in the
-function.  For example:
+To set a breakpoint immediately upon entering a function use line number 1, or
+omit the line number entirely and just give the function name.  When setting
+the breakpoint Octave will ignore the leading comment block, and the breakpoint
+will be set on the first executable statement in the function.  For example:
 
 @example
 @group
@@ -101,7 +101,7 @@
 @noindent
 Note that the return value of @code{29} means that the breakpoint was
 effectively set to line 29.  The status of breakpoints in a function can
-be queried with the @code{dbstatus} function.
+be queried with @code{dbstatus}.
 
 @DOCSTRING(dbstatus)
 
@@ -113,12 +113,6 @@
 @DOCSTRING(dbclear)
 
 @noindent
-These functions can be used together to clear all the breakpoints in a
-particular function.  For example:
-
-@example
-dbclear ("asind", dbstatus ("asind"));
-@end example
 
 A breakpoint may also be set in a subfunction.  For example, if a file contains
 the functions
@@ -135,8 +129,7 @@
 @end example
 
 @noindent
-then a breakpoint can be set at the start of the subfunction directly
-with
+then a breakpoint can be set at the start of the subfunction directly with
 
 @example
 @group
@@ -145,8 +138,14 @@
 @end group
 @end example
 
-Note that @code{filemarker} returns a character that marks the
-subfunctions from the file containing them.
+Note that @code{filemarker} returns the character that marks subfunctions from
+the file containing them.  Unless the default has been changed this character
+is @samp{>}.  Thus, a quicker and more normal way to set the breakpoint would
+be
+
+@example
+dbstop func1>func2
+@end example
 
 Another simple way of setting a breakpoint in an Octave script is the
 use of the @code{keyboard} function.
@@ -154,16 +153,16 @@
 @DOCSTRING(keyboard)
 
 @noindent
-The @code{keyboard} function is typically placed in a script at the
-point where the user desires that the execution be stopped.  It
-automatically sets the running script into the debug mode.
+The @code{keyboard} function is placed in a script at the point where the user
+desires that the execution be stopped.  It automatically sets the running
+script into the debug mode.
 
 @node Debug Mode
 @section Debug Mode
 
 There are three additional support functions that allow the user to
-interrogate where in the execution of a script Octave entered the debug
-mode and to print the code in the script surrounding the point where
+find out where in the execution of a script Octave entered the debug
+mode, and to print the code in the script surrounding the point where
 Octave entered debug mode.
 
 @DOCSTRING(dbwhere)
@@ -182,14 +181,21 @@
 
 @DOCSTRING(dbstep)
 
-When in debug mode the @key{RETURN} will execute the last entered command.
+When in debug mode the @key{RETURN} key will execute the last entered command.
 This is useful, for example, after hitting a breakpoint and entering
-@code{dbstep}.  After that one can advance line by line through the code
+@code{dbstep} once.  After that, one can advance line by line through the code
 with only a single key stroke.
 
 @node Call Stack
 @section Call Stack
 
+The function being debugged may be the leaf node of a series of function calls.
+After examining values in the current subroutine it may turn out that the
+problem occurred in earlier pieces of code.  Use @code{dbup} and @code{dbdown}
+to move up and down through the series of function calls to locate where
+variables first took on the wrong values.  @code{dbstack} shows the entire
+series of function calls and at what level debugging is currently taking place.
+
 @DOCSTRING(dbstack)
 
 @DOCSTRING(dbup)
--- a/doc/interpreter/external.txi	Mon Jan 27 09:50:53 2014 -0800
+++ b/doc/interpreter/external.txi	Wed Jan 29 15:28:35 2014 -0500
@@ -1037,14 +1037,14 @@
 given in the following example, where the C++ wrapper is
 
 @example
-@EXAMPLEFILE(fortdemo.cc)
+@EXAMPLEFILE(fortrandemo.cc)
 @end example
 
 @noindent
 and the Fortran function is
 
 @example
-@EXAMPLEFILE(fortsub.f)
+@EXAMPLEFILE(fortransub.f)
 @end example
 
 This example demonstrates most of the features needed to link to an
@@ -1054,13 +1054,13 @@
 
 @example
 @group
-mkoctfile fortdemo.cc fortsub.f
-[b, s] = fortdemo (1:3)
+mkoctfile fortrandemo.cc fortransub.f
+[b, s] = fortrandemo (1:3)
 @result{}
   b = 1.00000   0.50000   0.33333
   s = There are   3 values in the input vector
-[b, s] = fortdemo (0:3)
-error: fortdemo: fortsub: divide by zero
+[b, s] = fortrandemo (0:3)
+error: fortrandemo: fortransub: divide by zero
 @end group
 @end example
 
@@ -1712,12 +1712,11 @@
 
 @example
 @group
-myfeval ("sin", 1)
 a = myfeval ("sin", 1)
-@result{} Hello, World!
-    I have 2 inputs and 1 outputs
-    I'm going to call the interpreter function sin
-    a =  0.84147
+@result{} Starting file myfeval.mex
+   I have 2 inputs and 1 outputs
+   I'm going to call the interpreter function sin
+   a =  0.84147
 @end group
 @end example
 
@@ -1811,8 +1810,7 @@
 
 This is the norm of the matrix:
 34.4952
-
+$
 @end group
 @end example
 
-
--- a/doc/interpreter/linalg.txi	Mon Jan 27 09:50:53 2014 -0800
+++ b/doc/interpreter/linalg.txi	Wed Jan 29 15:28:35 2014 -0500
@@ -20,10 +20,19 @@
 @chapter Linear Algebra
 @cindex linear algebra
 
-This chapter documents the linear algebra functions of Octave.
-Reference material for many of these functions may be found in
-Golub and Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins,
-1989, and in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992.
+This chapter documents the linear algebra functions provided in Octave.
+Reference material for many of these functions may be found in Golub and
+Van Loan, @cite{Matrix Computations, 2nd Ed.}, Johns Hopkins, 1989, and
+in the @cite{@sc{lapack} Users' Guide}, SIAM, 1992. The
+@cite{@sc{lapack} Users' Guide} is available at:
+@cite{http://www.netlib.org/lapack/lug/}
+
+A common text for engineering courses is G. Strang, @cite{Linear Algebra
+and Its Applications, 4th Edition}. It has become a widespread reference
+for linear algebra. An alternative is P. Lax @cite{Linear Algebra and
+Its Applications}, and also is a good choice. It claims to be suitable
+for high school students with substantial mathematical interests as well
+as first-year undergraduates.
 
 @menu
 * Techniques Used for Linear Algebra::
@@ -37,18 +46,18 @@
 @section Techniques Used for Linear Algebra
 @cindex linear algebra, techniques
 
-Octave includes a polymorphic solver, that selects an appropriate
-matrix factorization depending on the properties of the matrix itself. 
-Generally, the cost of determining the matrix type is small relative to 
-the cost of factorizing the matrix itself, but in any case the matrix 
-type is cached once it is calculated, so that it is not re-determined 
-each time it is used in a linear equation.
+Octave includes a polymorphic solver that selects an appropriate matrix
+factorization depending on the properties of the matrix itself.
+Generally, the cost of determining the matrix type is small relative to
+the cost of factorizing the matrix itself. In any case the matrix type
+is cached once it is calculated so that it is not re-determined each
+time it is used in a linear equation.
 
-The selection tree for how the linear equation is solve or a matrix
-inverse is form is given by
+The selection tree for how the linear equation is solved or a matrix
+inverse is formed is given by:
 
 @enumerate 1
-@item If the matrix is upper or lower triangular sparse a forward or
+@item If the matrix is upper or lower triangular sparse use a forward or
 backward substitution using the @sc{lapack} xTRTRS function, and goto 4.
 
 @c Permuted triangular matrices currently disabled in the code
@@ -76,10 +85,10 @@
 used with care.
 
 It should be noted that the test for whether a matrix is a candidate for
-Cholesky@tie{}factorization, performed above and by the @code{matrix_type}
-function, does not give a certainty that the matrix is
+Cholesky@tie{}factorization, performed above, and by the @code{matrix_type}
+function, does not make certain that the matrix is
 Hermitian.  However, the attempt to factorize the matrix will quickly
-flag a non-Hermitian matrix.
+detect a non-Hermitian matrix.
 
 @node Basic Matrix Functions
 @section Basic Matrix Functions
--- a/examples/Makefile.am	Mon Jan 27 09:50:53 2014 -0800
+++ b/examples/Makefile.am	Wed Jan 29 15:28:35 2014 -0500
@@ -34,8 +34,8 @@
   addtwomatrices.cc \
   celldemo.cc \
   embedded.cc \
-  fortdemo.cc \
-  fortsub.f \
+  fortrandemo.cc \
+  fortransub.f \
   funcdemo.cc \
   globaldemo.cc \
   helloworld.cc \
--- a/examples/fortdemo.cc	Mon Jan 27 09:50:53 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#include <octave/oct.h>
-#include <octave/f77-fcn.h>
-
-extern "C"
-{
-  F77_RET_T
-  F77_FUNC (fortsub, FORTSUB)
-    (const int&, double*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL);
-}
-
-DEFUN_DLD (fortdemo, args, , "Fortran Demo")
-{
-  octave_value_list retval;
-  int nargin = args.length ();
-
-  if (nargin != 1)
-    print_usage ();
-  else
-    {
-      NDArray a = args(0).array_value ();
-      if (! error_state)
-        {
-          double *av = a.fortran_vec ();
-          octave_idx_type na = a.numel ();
-          OCTAVE_LOCAL_BUFFER (char, ctmp, 128);
-
-          F77_XFCN (fortsub, FORTSUB,
-                    (na, av, ctmp F77_CHAR_ARG_LEN (128)));
-
-          retval(1) = std::string (ctmp);
-          retval(0) = a;
-        }
-    }
-  return retval;
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/fortrandemo.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -0,0 +1,35 @@
+#include <octave/oct.h>
+#include <octave/f77-fcn.h>
+
+extern "C"
+{
+  F77_RET_T
+  F77_FUNC (fortransub, FORTSUB)
+    (const int&, double*, F77_CHAR_ARG_DECL F77_CHAR_ARG_LEN_DECL);
+}
+
+DEFUN_DLD (fortrandemo, args, , "Fortran Demo")
+{
+  octave_value_list retval;
+  int nargin = args.length ();
+
+  if (nargin != 1)
+    print_usage ();
+  else
+    {
+      NDArray a = args(0).array_value ();
+      if (! error_state)
+        {
+          double *av = a.fortran_vec ();
+          octave_idx_type na = a.numel ();
+          OCTAVE_LOCAL_BUFFER (char, ctmp, 128);
+
+          F77_XFCN (fortransub, FORTSUB,
+                    (na, av, ctmp F77_CHAR_ARG_LEN (128)));
+
+          retval(1) = std::string (ctmp);
+          retval(0) = a;
+        }
+    }
+  return retval;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/fortransub.f	Wed Jan 29 15:28:35 2014 -0500
@@ -0,0 +1,21 @@
+      subroutine fortransub (n, a, s)
+      implicit none
+      character*(*) s
+      real*8 a(*)
+      integer*4 i, n, ioerr
+      do i = 1, n
+        if (a(i) .eq. 0d0) then
+          call xstopx ('fortransub: divide by zero')
+        else
+          a(i) = 1d0 / a(i)
+        endif
+      enddo
+      write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr)
+     $       'There are ', n,
+     $       ' values in the input vector', char(0)
+      if (ioerr .ne. 0) then
+        call xstopx ('fortransub: error writing string')
+      endif
+      return
+      end
+
--- a/examples/fortsub.f	Mon Jan 27 09:50:53 2014 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-      subroutine fortsub (n, a, s)
-      implicit none
-      character*(*) s
-      real*8 a(*)
-      integer*4 i, n, ioerr
-      do i = 1, n
-        if (a(i) .eq. 0d0) then
-          call xstopx ('fortsub: divide by zero')
-        else
-          a(i) = 1d0 / a(i)
-        endif
-      enddo
-      write (unit = s, fmt = '(a,i3,a,a)', iostat = ioerr)
-     $       'There are ', n,
-     $       ' values in the input vector', char(0)
-      if (ioerr .ne. 0) then
-        call xstopx ('fortsub: error writing string')
-      endif
-      return
-      end
-
--- a/examples/mex_demo.c	Mon Jan 27 09:50:53 2014 -0800
+++ b/examples/mex_demo.c	Wed Jan 29 15:28:35 2014 -0500
@@ -10,13 +10,13 @@
 //
 // To compile this file, type the command
 //
-//   mkoctfile mex_demo.c
+//   mkoctfile --mex mex_demo.c
 //
 // from within Octave or from the shell prompt.  This will create a file
 // called mex_demo.mex that can be loaded by Octave.  To test the mex_demo.mex
 // file, start Octave and type the command
 //
-// [d] = mex_demo ("easy as", 1, 2, 3)
+// d = mex_demo ("easy as", 1, 2, 3)
 //
 // at the Octave prompt.  Octave should respond by printing
 //
--- a/examples/myfeval.c	Mon Jan 27 09:50:53 2014 -0800
+++ b/examples/myfeval.c	Wed Jan 29 15:28:35 2014 -0500
@@ -6,7 +6,7 @@
 {
   char *str;
 
-  mexPrintf ("Hello, World!\n");
+  mexPrintf ("Starting file myfeval.mex\n");
 
   mexPrintf ("I have %d inputs and %d outputs\n", nrhs, nlhs);
 
@@ -17,7 +17,11 @@
 
   mexPrintf ("I'm going to call the function %s\n", str);
 
-  mexCallMATLAB (nlhs, plhs, nrhs-1, (mxArray*)prhs+1, str);
+  if (nlhs == 0)
+    nlhs = 1;  // Octave's automatic 'ans' variable
+
+  /* Cast prhs just to get rid of 'const' qualifier and stop compile warning */
+  mexCallMATLAB (nlhs, plhs, nrhs-1, (mxArray**)prhs+1, str);
 
   mxFree (str);
 }
--- a/libgui/languages/be_BY.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/be_BY.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -898,7 +898,7 @@
     </message>
     <message>
         <location line="+71"/>
-        <source>Print To File ...</source>
+        <source>Print To File...</source>
         <translation>Друк у файл...</translation>
     </message>
     <message>
@@ -2065,7 +2065,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation>Шукаць файлы...</translation>
     </message>
     <message>
@@ -2111,6 +2111,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Шукаць каталог...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Шукаць файлы...</translation>
     </message>
--- a/libgui/languages/de_DE.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/de_DE.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -525,8 +525,8 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
-        <translation>Dateien suchen ...</translation>
+        <source>Find Files...</source>
+        <translation>Dateien suchen...</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -571,9 +571,14 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Verzeichnis suchen...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translatorcomment>Dateien suchen...</translatorcomment>
-        <translation>Suche Dateien...</translation>
+        <translation>Dateien suchen...</translation>
     </message>
     <message>
         <location line="+4"/>
@@ -914,7 +919,7 @@
     <message>
         <location line="+3"/>
         <source>Browse...</source>
-        <translation>Suche ...</translation>
+        <translation>Suche...</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1024,7 +1029,7 @@
     <message>
         <location line="+105"/>
         <source>Searching...</source>
-        <translation>Suche ...</translation>
+        <translation>Suche...</translation>
     </message>
     <message>
         <location line="+23"/>
--- a/libgui/languages/en_US.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/en_US.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -508,7 +508,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -554,6 +554,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
--- a/libgui/languages/es_ES.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/es_ES.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -508,8 +508,8 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
-        <translation>Buscar archivos ...</translation>
+        <source>Find Files...</source>
+        <translation>Buscar archivos...</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -554,6 +554,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Buscar directorio...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Buscar archivos...</translation>
     </message>
--- a/libgui/languages/fr_FR.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/fr_FR.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -524,7 +524,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation>Rechercher des fichiers...</translation>
     </message>
     <message>
@@ -570,6 +570,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Rechercher dans le répertoire...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Rechercher des fichiers...</translation>
     </message>
--- a/libgui/languages/nl_NL.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/nl_NL.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -897,7 +897,7 @@
     </message>
     <message>
         <location line="+71"/>
-        <source>Print To File ...</source>
+        <source>Print To File...</source>
         <translation>Druk af naar bestand...</translation>
     </message>
     <message>
@@ -2063,8 +2063,8 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
-        <translation>Zoek bestanden ...</translation>
+        <source>Find Files...</source>
+        <translation>Zoek bestanden...</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -2109,6 +2109,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Zoek in map...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Zoek bestanden...</translation>
     </message>
@@ -2453,7 +2458,7 @@
     <message>
         <location line="+3"/>
         <source>Browse...</source>
-        <translation>Bladeren ...</translation>
+        <translation>Bladeren...</translation>
     </message>
     <message>
         <location line="+1"/>
--- a/libgui/languages/pt_BR.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/pt_BR.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -388,7 +388,7 @@
     <message>
         <location filename="../src/m-editor/file-editor-tab.cc" line="+824"/>
         <source>Goto line</source>
-        <translation>Vá para linha...</translation>
+        <translation>Vá para linha</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -522,7 +522,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation>Buscar Arquivos...</translation>
     </message>
     <message>
@@ -554,20 +554,25 @@
     <message>
         <location line="+5"/>
         <source>Set Octave directory</source>
-        <translation>Definir o diretório do Octave</translation>
+        <translation>Escolher o diretório do Octave</translation>
     </message>
     <message>
         <location line="+2"/>
         <source>Set Octave directroy to current browser directory</source>
-        <translation>Definir diretório do Octave igual ao diretório atual no navegador</translation>
+        <translation>Configurar o diretório do Octave igual ao diretório atual no navegador</translation>
     </message>
     <message>
         <location line="+7"/>
         <source>Show Home Directory</source>
-        <translation>Exibir diretório pessoal</translation>
+        <translation>Exibir Diretório Pessoal</translation>
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Buscar no Diretório...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Buscar Arquivos...</translation>
     </message>
@@ -629,7 +634,7 @@
     <message>
         <location line="+6"/>
         <source>Set Current Directory</source>
-        <translation>Definir Diretório Atual</translation>
+        <translation>Escolher Diretório Atual</translation>
     </message>
     <message>
         <location line="+8"/>
@@ -679,7 +684,7 @@
     <message>
         <location line="+144"/>
         <source>Set directory of file browser</source>
-        <translation>Definir diretório do Navegador de Arquivos</translation>
+        <translation>Escolher diretório do Navegador de Arquivos</translation>
     </message>
     <message>
         <location line="+29"/>
@@ -743,9 +748,9 @@
 You can find more information about each of these by visiting &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
-&lt;p&gt;Esperamos que o Octave seja uma ferramenta últil.&lt;/p&gt;
-&lt;p&gt;Se encontrar problemas, existem várias maneiras de pedir ajuda incluindo suporte comercial, lista de email, wiki, e outros canais de suporte da comunidade.
-Você pode encontrar mais informações sobre cada um deles visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (opens in external browser).&lt;/p&gt;
+&lt;p&gt;Esperamos que você ache o Octave uma ferramenta útil.&lt;/p&gt;
+&lt;p&gt;Se encontrar dificuldades, existem várias formas de obter assistência, incluindo suporte comercial, listas de email, wiki, e outros canais de suporte comunitários.
+Você pode encontrar mais informações sobre cada um deles visitando &lt;a href=&quot;http://octave.org/support.html&quot;&gt;http://octave.org/support.html&lt;/a&gt; (link abre em navegador externo).&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
@@ -831,7 +836,7 @@
     <message>
         <location line="+2"/>
         <source>&amp;More...</source>
-        <translation>&amp;Mais...</translation>
+        <translation>&amp;Mais opções...</translation>
     </message>
     <message>
         <location line="+13"/>
@@ -846,7 +851,7 @@
     <message>
         <location line="+1"/>
         <source>Search &amp;backward</source>
-        <translation>Buscar de trás para frente</translation>
+        <translation>Buscar de &amp;trás para frente</translation>
     </message>
     <message>
         <location line="+1"/>
@@ -1109,7 +1114,7 @@
 &lt;/body&gt;&lt;/html&gt;</source>
         <translation>&lt;html&gt;&lt;body&gt;
 &lt;p&gt;Parece que você está usando a interface gráfica pela primeira vez neste computador.
-Clique em próximo para criar um arquivo de configuração e lançar o Octave.&lt;/p&gt;
+Clique em &apos;Avançar&apos; para criar um arquivo de configuração e iniciar o Octave.&lt;/p&gt;
 &lt;p&gt;O arquivo de configuração é armazenado em&lt;br&gt;%1.&lt;/p&gt;
 &lt;/body&gt;&lt;/html&gt;</translation>
     </message>
@@ -1119,7 +1124,7 @@
     <message>
         <location filename="../src/main-window.cc" line="-1758"/>
         <source>Load Workspace</source>
-        <translation>Carregar Ambiente de Trabalho...</translation>
+        <translation>Carregar Ambiente de Trabalho</translation>
     </message>
     <message>
         <location line="+678"/>
@@ -1180,7 +1185,7 @@
     <message>
         <location line="-1327"/>
         <source>Save Workspace As</source>
-        <translation>Salvar Ambiente de Trabalho Como...</translation>
+        <translation>Salvar Ambiente de Trabalho Como</translation>
     </message>
     <message>
         <location line="+84"/>
@@ -1286,7 +1291,7 @@
     <message>
         <location line="+1160"/>
         <source>Load Workspace...</source>
-        <translation>Carregar ambiente de trabalho...</translation>
+        <translation>Carregar Ambiente de Trabalho...</translation>
     </message>
     <message>
         <location line="+3"/>
@@ -1777,7 +1782,7 @@
     <message>
         <location line="+17"/>
         <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Select font, font size (as a difference from the default size), font style (&lt;b&gt;b&lt;/b&gt;old, &lt;b&gt;i&lt;/b&gt;talic, &lt;b&gt;u&lt;/b&gt;nderline), text color and background color (for the latter, the color pink (255,0,255) is a placeholder for the default background color).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
-        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecionar fonte, tamanho da fonte (como uma diferença do tamanho padrão), estilo da fonte (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor de texto e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
+        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Selecionar fonte, tamanho da fonte (variacão com relacão ao tamanho padrão), estilo da fonte (&lt;b&gt;n&lt;/b&gt;egrito, &lt;b&gt;i&lt;/b&gt;tálico, &lt;b&gt;s&lt;/b&gt;ublinhado), cor da fonte e cor de fundo (a cor rosa (255,0,255) é a cor de fundo padrão).&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
     </message>
     <message>
         <location line="+191"/>
--- a/libgui/languages/pt_PT.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/pt_PT.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -1191,7 +1191,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation>Procurar Ficheiros...</translation>
     </message>
     <message>
@@ -1237,6 +1237,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation>Procurar no directório...</translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Encontrar Ficheiros...</translation>
     </message>
--- a/libgui/languages/ru_RU.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/ru_RU.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -524,7 +524,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation>Найти файлы...</translation>
     </message>
     <message>
@@ -570,6 +570,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation>Найти файлы...</translation>
     </message>
--- a/libgui/languages/uk_UA.ts	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/languages/uk_UA.ts	Wed Jan 29 15:28:35 2014 -0500
@@ -1174,7 +1174,7 @@
     </message>
     <message>
         <location line="+379"/>
-        <source>Find Files ...</source>
+        <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
@@ -1220,6 +1220,11 @@
     </message>
     <message>
         <location line="+16"/>
+        <source>Search Directory...</source>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location line="+4"/>
         <source>Find Files...</source>
         <translation type="unfinished"></translation>
     </message>
--- a/libgui/src/dialog.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/dialog.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -491,8 +491,20 @@
   for (int i = 0; i < string_result.size (); i++)
     string_result[i] = QFileInfo (string_result[i]).fileName ();
 
+  path = directory ().absolutePath ();
 
-  path = directory ().absolutePath ();
+  // if not showing only dirs, add end slash for the path component
+  if (testOption (QFileDialog::ShowDirsOnly)  == false)
+    path = path + "/";
+  else
+    {
+      // if name was provided in uigetdir, add to path
+      if (string_result.size() > 0)
+        path = path + "/" + string_result[0];
+    }
+
+  // convert to native slashes
+  path = QDir::toNativeSeparators (path);
 
   QStringList name_filters = nameFilters ();
   idx = name_filters.indexOf (selectedNameFilter ()) + 1;
--- a/libgui/src/files-dock-widget.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/files-dock-widget.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -477,12 +477,23 @@
   QMenu menu (this);
 
   QModelIndex index = _file_tree_view->indexAt (mpos);
-  //QAbstractItemModel *m = _file_tree_view->model ();
 
   if (index.isValid ())
     {
       QFileInfo info = _file_system_model->fileInfo (index);
 
+      QItemSelectionModel *m = _file_tree_view->selectionModel ();
+      QModelIndexList sel = m->selectedRows ();
+
+      // check if item at mouse position is seleccted
+      if (! sel.contains (index))
+        { // is not selected -> clear actual selection and select this item
+          m->setCurrentIndex(index,
+                  QItemSelectionModel::Clear | QItemSelectionModel::Select |
+                  QItemSelectionModel::Rows);
+        }
+
+      // construct the context menu depending on item
       menu.addAction (QIcon (":/actions/icons/fileopen.png"), tr ("Open"),
                       this, SLOT (contextmenu_open (bool)));
 
@@ -506,26 +517,28 @@
                           tr ("Set Current Directory"),
                           this, SLOT (contextmenu_setcurrentdir (bool)));
           menu.addSeparator ();
-          menu.addAction (tr ("Find Files ..."), this,
+          menu.addAction (QIcon (":/actions/icons/findf.png"),
+                          tr ("Find Files..."), this,
                           SLOT (contextmenu_findfiles (bool)));
         }
 
       menu.addSeparator ();
-      menu.addAction (tr ("Rename"), this, SLOT (contextmenu_rename (bool)));
-      menu.addAction (QIcon (":/actions/icons/editdelete.png"), tr ("Delete"),
-                      this, SLOT (contextmenu_delete (bool)));
+      menu.addAction (tr ("Rename..."), this, SLOT (contextmenu_rename (bool)));
+      menu.addAction (QIcon (":/actions/icons/editdelete.png"),
+                      tr ("Delete..."), this, SLOT (contextmenu_delete (bool)));
 
       if (info.isDir ())
         {
           menu.addSeparator ();
           menu.addAction (QIcon (":/actions/icons/filenew.png"),
-                          tr ("New File"),
+                          tr ("New File..."),
                           this, SLOT (contextmenu_newfile (bool)));
           menu.addAction (QIcon (":/actions/icons/folder_new.png"),
-                          tr ("New Directory"),
+                          tr ("New Directory..."),
                           this, SLOT (contextmenu_newdir (bool)));
         }
 
+      // show the menu
       menu.exec (_file_tree_view->mapToGlobal (mpos));
 
     }
@@ -540,7 +553,14 @@
 
   for ( QModelIndexList::iterator it = rows.begin (); it != rows.end (); it++)
     {
-      item_double_clicked (*it);
+      QFileInfo file = _file_system_model->fileInfo (*it);
+      if (file.exists ())
+        {
+          if (file.isFile ())
+            emit open_file (file.absoluteFilePath ());
+          else
+            set_current_directory (file.absoluteFilePath ());
+        }
     }
 }
 
--- a/libgui/src/m-editor/file-editor-interface.h	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/m-editor/file-editor-interface.h	Wed Jan 29 15:28:35 2014 -0500
@@ -61,6 +61,8 @@
 
   virtual void set_focus () = 0;
 
+  virtual void empty_script (bool, bool) = 0;
+
 public slots:
   virtual void request_new_file (const QString& command = QString ()) = 0;
   virtual void request_new_script (const QString& command = QString ()) = 0;
--- a/libgui/src/m-editor/file-editor.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/m-editor/file-editor.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -36,6 +36,7 @@
 #include <QMessageBox>
 #include <QStyle>
 #include <QTextStream>
+#include <QTabBar>
 #include <QProcess>
 #include <QInputDialog>
 
@@ -1547,5 +1548,67 @@
   _redo_action->setEnabled (have_tabs);
 }
 
+// empty_script determines whether we have to create an empty script
+// 1. At startup, when the editor has to be (really) visible
+//    (Here we can not use the visibility changed signal)
+// 2. When the editor becomes visible when octave is running
+void
+file_editor::empty_script (bool startup, bool visible)
+{
+  bool real_visible;
+
+  if (startup)
+    real_visible = isVisible ();
+  else
+    real_visible = visible;
+
+  if (! real_visible || _tab_widget->count () > 0)
+    return;
+
+  if (startup && ! isFloating ())
+    {
+      // check is editor is really visible or hidden between tabbed widgets
+      QList<QTabBar *> tab_list = main_win ()->findChildren<QTabBar *>();
+
+      bool in_tab = false;
+      int i = 0;
+      while ((i < tab_list.count ()) && (! in_tab))
+        {
+          QTabBar *tab = tab_list.at (i);
+          i++;
+
+          int j = 0;
+          while ((j < tab->count ()) && (! in_tab))
+            {
+              // check all tabs for the editor
+              if (tab->tabText (j) == windowTitle ())
+                {
+                  // editor is in this tab widget
+                  in_tab = true;
+                  int top = tab->currentIndex ();
+                  if (top > -1 && tab->tabText (top) == windowTitle ())
+                    real_visible = true;  // and is the current tab
+                  else
+                    return; // not current tab -> not visible
+                }
+              j++;
+            }
+        }
+    }
+
+  request_new_file ("");
+}
+
+// This slot is a reimplementation of the virtual slot in octave_dock_widget.
+// We need this for creating an empty script when the editor has no open files
+// and is made visible
+void
+file_editor::handle_visibility (bool visible)
+  {
+    empty_script (false, visible);
+
+    if (visible && ! isFloating ())
+      focus ();
+  }
 
 #endif
--- a/libgui/src/m-editor/file-editor.h	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/m-editor/file-editor.h	Wed Jan 29 15:28:35 2014 -0500
@@ -58,6 +58,8 @@
   void handle_exit_debug_mode (void);
 
   void check_actions (void);
+  void empty_script (bool startup, bool visible);
+
 signals:
 
   void fetab_settings_changed (const QSettings *settings);
@@ -172,6 +174,8 @@
   // Tells the ditor to dis- or enable some shortcuts
   void set_shortcuts (bool set_shortcuts);
 
+  void handle_visibility (bool visible);
+
 
 protected slots:
   void copyClipboard ();
--- a/libgui/src/main-window.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libgui/src/main-window.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -1010,6 +1010,9 @@
 {
   foreach (octave_dock_widget *widget, dock_widget_list ())
     widget->connect_visibility_changed ();
+
+  // Main window completely shown, determine whether to create an empty script
+  editor_window->empty_script (true, false);
 }
 
 void
--- a/libinterp/corefcn/ls-mat4.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/corefcn/ls-mat4.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -585,5 +585,5 @@
   else
     gripe_wrong_type_arg ("save", tc, false);
 
-  return os;
+  return ! os.fail ();
 }
--- a/libinterp/corefcn/urlwrite.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/corefcn/urlwrite.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -418,7 +418,7 @@
 
   url_transfer curl = url_transfer (url, ofile);
 
-  if (! curl.is_valid ())
+  if (curl.is_valid ())
     {
       curl.http_action (param, method);
 
--- a/libinterp/octave-value/ov-cell.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/octave-value/ov-cell.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -780,7 +780,7 @@
           bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0);
 
           if (! b)
-            return os;
+            return ! os.fail ();
         }
     }
   else
@@ -802,7 +802,7 @@
               bool b = save_ascii_data (os, o_val, CELL_ELT_TAG, false, 0);
 
               if (! b)
-                return os;
+                return ! os.fail ();
             }
 
           os << "\n";
--- a/libinterp/octave-value/ov-class.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/octave-value/ov-class.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -1251,7 +1251,7 @@
       bool b = save_ascii_data (os, val, m.key (i), false, 0);
 
       if (! b)
-        return os;
+        return ! os.fail ();
 
       i++;
     }
@@ -1380,7 +1380,7 @@
       bool b = save_binary_data (os, val, m.key (i), "", 0, save_as_floats);
 
       if (! b)
-        return os;
+        return ! os.fail ();
 
       i++;
     }
--- a/libinterp/octave-value/ov-fcn-handle.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/octave-value/ov-fcn-handle.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -380,7 +380,7 @@
                p = vars.begin (); p != vars.end (); p++)
             {
               if (! save_ascii_data (os, p->varval (0), p->name (), false, 0))
-                return os;
+                return ! os.fail ();
             }
         }
     }
@@ -556,7 +556,7 @@
             {
               if (! save_binary_data (os, p->varval (0), p->name (),
                                       "", 0, save_as_floats))
-                return os;
+                return ! os.fail ();
             }
         }
     }
--- a/libinterp/octave-value/ov-struct.cc	Mon Jan 27 09:50:53 2014 -0800
+++ b/libinterp/octave-value/ov-struct.cc	Wed Jan 29 15:28:35 2014 -0500
@@ -769,7 +769,7 @@
       bool b = save_ascii_data (os, val, key, false, 0);
 
       if (! b)
-        return os;
+        return ! os.fail ();
     }
 
   return true;
@@ -894,7 +894,7 @@
       bool b = save_binary_data (os, val, key, "", 0, save_as_floats);
 
       if (! b)
-        return os;
+        return ! os.fail ();
     }
 
   return true;
@@ -1471,7 +1471,7 @@
       bool b = save_ascii_data (os, val, key, false, 0);
 
       if (! b)
-        return os;
+        return ! os.fail ();
     }
 
   return true;
@@ -1555,7 +1555,7 @@
       bool b = save_binary_data (os, val, key, "", 0, save_as_floats);
 
       if (! b)
-        return os;
+        return ! os.fail ();
     }
 
   return true;
--- a/scripts/help/__makeinfo__.m	Mon Jan 27 09:50:53 2014 -0800
+++ b/scripts/help/__makeinfo__.m	Wed Jan 29 15:28:35 2014 -0500
@@ -129,10 +129,10 @@
     ## Take action depending on output type
     switch (lower (output_type))
       case "plain text"
-        cmd = sprintf ("%s --no-headers --no-warn --force --no-validate %s",
+        cmd = sprintf ("%s --no-headers --no-warn --force --no-validate --output=- %s",
                        makeinfo_program (), name);
       case "html"
-        cmd = sprintf ("%s --no-headers --html --no-warn --no-validate --force %s",
+        cmd = sprintf ("%s --no-headers --html --no-warn --no-validate --force --output=- %s",
                        makeinfo_program (), name);
       otherwise
         error ("__makeinfo__: unsupported output type: '%s'", output_type);
--- a/scripts/miscellaneous/debug.m	Mon Jan 27 09:50:53 2014 -0800
+++ b/scripts/miscellaneous/debug.m	Wed Jan 29 15:28:35 2014 -0500
@@ -37,9 +37,13 @@
 ## Report the current file and line number where execution is stopped.
 ##
 ## @item dbtype
-## List the function where execution is currently stopped, enumerating
+## Display the code of the function being debugged, enumerating
 ## the line numbers.
 ##
+## @item dblist
+## List 10 lines of code centered around the line number where execution is
+## stopped.
+##
 ## @item  dbstep
 ## @itemx dbnext
 ## Execute (step) one or more lines, follow execution into (step into) a
--- a/scripts/plot/util/graphics_toolkit.m	Mon Jan 27 09:50:53 2014 -0800
+++ b/scripts/plot/util/graphics_toolkit.m	Wed Jan 29 15:28:35 2014 -0500
@@ -66,6 +66,10 @@
     endif
   endif
 
+  if (! any (strcmp (available_graphics_toolkits (), name)))
+    error ("graphics_toolkit: %s toolkit is not available", name);
+  endif
+
   if (! any (strcmp (loaded_graphics_toolkits (), name)))
     feval (["__init_", name, "__"]);
     if (! any (strcmp (loaded_graphics_toolkits (), name)))
--- a/scripts/testfun/assert.m	Mon Jan 27 09:50:53 2014 -0800
+++ b/scripts/testfun/assert.m	Wed Jan 29 15:28:35 2014 -0500
@@ -56,7 +56,7 @@
 
 function assert (cond, varargin)
 
-  if (nargin == 0 || nargin > 3)
+  if (nargin == 0)
     print_usage ();
   endif
 
@@ -84,8 +84,10 @@
     expected = varargin{1};
     if (nargin < 3)
       tol = 0;
+    elseif (nargin == 3)
+      tol = varargin{2};
     else
-      tol = varargin{2};
+      print_usage ();
     endif
 
     ## Add to list as the errors accumulate.  If empty at end then no errors.
@@ -396,6 +398,8 @@
 %!error assert ([1,0,1])
 %!error assert ([1;1;0])
 %!error assert ([1,0;1,1])
+%!error <2-part error> assert (false, "%s %s", "2-part", "error")
+%!error <2-part error> assert (false, "TST:msg_id", "%s %s", "2-part", "error")
 
 ## scalars
 %!error <Dimensions don't match> assert (3, [3,3])
--- a/src/shared-fcns.h	Mon Jan 27 09:50:53 2014 -0800
+++ b/src/shared-fcns.h	Wed Jan 29 15:28:35 2014 -0500
@@ -23,6 +23,7 @@
 #if defined (__WIN32__) && ! defined (_POSIX_VERSION)
 
 #include <windows.h>
+#include <tlhelp32.h>
 
 #ifdef _MSC_VER
 #define popen _popen