changeset 19410:302eef6de090 gui-release

maint: Periodic merge of stable to gui-release.
author John W. Eaton <jwe@octave.org>
date Tue, 02 Dec 2014 10:00:48 -0500
parents 264ff6bf7475 (current diff) 7759e4d62f04 (diff)
children 9ef286208da1 f7ccd02bc060
files
diffstat 3 files changed, 20 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/util/private/__fltk_ginput__.m	Tue Dec 02 09:56:50 2014 -0500
+++ b/scripts/plot/util/private/__fltk_ginput__.m	Tue Dec 02 10:00:48 2014 -0500
@@ -47,7 +47,14 @@
       sleep (0.01);
 
       [x, y, n0, button] = ginput_accumulator (-1, 0, 0, 0);
-    until (n0 == n || n0 < 0)
+    until ((n > -1 && n0 >= n) || n0 < 0)
+
+    if (n0 > n)
+      ## More clicks than requested due to double-click or too fast clicking
+      x = x(1:n);
+      y = y(1:n);
+      button = button(1:n);
+    endif
 
   unwind_protect_cleanup
     set (f, "windowbuttondownfcn", orig_windowbuttondownfcn);
--- a/scripts/testfun/__run_test_suite__.m	Tue Dec 02 09:56:50 2014 -0500
+++ b/scripts/testfun/__run_test_suite__.m	Tue Dec 02 10:00:48 2014 -0500
@@ -31,8 +31,10 @@
     fcndirs = { liboctavetestdir, libinterptestdir, fcnfiledir };
     fixedtestdirs = { fixedtestdir };
   endif
-  global files_with_no_tests = {};
-  global files_with_tests = {};
+  global files_with_no_tests;
+  global files_with_tests;
+  files_with_no_tests = {};
+  files_with_tests = {};
   ## FIXME: These names don't really make sense if we are running
   ##        tests for an installed copy of Octave.
   global topsrcdir = fcnfiledir;
@@ -40,12 +42,13 @@
   pso = page_screen_output ();
   warn_state = warning ("query", "quiet");
   warning ("on", "quiet");
+  logfile = make_absolute_filename ("fntests.log");
   try
     page_screen_output (false);
     warning ("off", "Octave:deprecated-function");
-    fid = fopen ("fntests.log", "wt");
+    fid = fopen (logfile, "wt");
     if (fid < 0)
-      error ("could not open fntests.log for writing");
+      error ("could not open %s for writing", logfile);
     endif
     test ("", "explain", fid);
     dp = dn = dxf = dsk = 0;
@@ -76,7 +79,7 @@
       printf ("  SKIPPED %6d\n", dsk);
     endif
     puts ("\n");
-    puts ("See the file test/fntests.log for additional details.\n");
+    printf ("See the file %s for additional details.\n", logfile);
     if (dxf > 0)
       puts ("\n");
       puts ("Expected failures (listed as XFAIL above) are known bugs.\n");
@@ -99,8 +102,8 @@
 
     report_files_with_no_tests (files_with_tests, files_with_no_tests, ".m");
 
-    puts ("\nPlease help improve Octave by contributing tests for\n");
-    puts ("these files (see the list in the file fntests.log).\n\n");
+    puts ("\nPlease help improve Octave by contributing tests for these files\n");
+    printf ("(see the list in the file %s).\n\n", logfile);
 
     fprintf (fid, "\nFiles with no tests:\n\n%s",
                   list_in_columns (files_with_no_tests, 80));
--- a/src/mkoctfile.in.cc	Tue Dec 02 09:56:50 2014 -0500
+++ b/src/mkoctfile.in.cc	Tue Dec 02 10:00:48 2014 -0500
@@ -70,11 +70,11 @@
 {
   static std::vector<char> buf (100);
   unsigned int idx = 0;
-  char c;
+  int c;
 
   while (true)
     {
-      c = static_cast<char> (gnulib::fgetc (fp));
+      c = gnulib::fgetc (fp);
       if (c == '\n' || c == EOF)
         break;
       if (buf.size () <= idx)