changeset 26479:11cef718fcbc

maint: Merge stable to default.
author John W. Eaton <jwe@octave.org>
date Mon, 07 Jan 2019 08:08:47 -0500
parents 04e7b115e69d (current diff) 6f22d0c91beb (diff)
children 10f648516d5b
files libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/graphics.cc libinterp/corefcn/graphics.in.h test/bug-45969/bug-45969.tst test/bug-45969/module.mk test/bug-45972/bug-45972.tst test/bug-45972/module.mk test/bug-55308/bug-55308.tst test/bug-55308/module.mk test/bug-55321/bug-55321.tst test/bug-55321/module.mk test/bug-55322/bug-55322.tst test/bug-55322/module.mk
diffstat 33 files changed, 300 insertions(+), 278 deletions(-) [+]
line wrap: on
line diff
--- a/doc/interpreter/mkoctfile.1	Sun Jan 06 07:37:48 2019 -0800
+++ b/doc/interpreter/mkoctfile.1	Mon Jan 07 08:08:47 2019 -0500
@@ -162,12 +162,12 @@
     EXEEXT                      MANDIR
     FCNFILEDIR                  OCTAVE_EXEC_HOME
     IMAGEDIR                    OCTAVE_HOME
-    INFODIR                     OCTDATADIR
-    INFOFILE                    OCTDOCDIR
-    LIBEXECDIR                  OCTFILEDIR
-    LOCALAPIARCHLIBDIR          OCTFONTSDIR
-    LOCALAPIFCNFILEDIR          STARTUPFILEDIR
-    LOCALAPIOCTFILEDIR          VERSION
+    INFODIR                     OCTAVE_VERSION
+    INFOFILE                    OCTDATADIR
+    LIBEXECDIR                  OCTDOCDIR
+    LOCALAPIARCHLIBDIR          OCTFILEDIR
+    LOCALAPIFCNFILEDIR          OCTFONTSDIR
+    LOCALAPIOCTFILEDIR          STARTUPFILEDIR
     LOCALARCHLIBDIR
 .Ve
 .RE
--- a/libgui/graphics/Figure.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libgui/graphics/Figure.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -295,12 +295,12 @@
         m_blockUpdates = false;
       }
   }
-  
+
   void
   Figure::set_geometry (QRect r)
   {
     QMainWindow *win = qWidget<QMainWindow> ();
-    
+
     if (! m_resizable)
       {
         win->setSizePolicy (QSizePolicy::Preferred, QSizePolicy::Preferred);
@@ -308,7 +308,7 @@
       }
 
     win->setGeometry (r);
-    
+
     if (! m_resizable)
       {
         win->setSizePolicy (QSizePolicy::Fixed, QSizePolicy::Fixed);
@@ -328,10 +328,7 @@
     Canvas *canvas = m_container->canvas (m_handle);
 
     if (canvas)
-      {
-        canvas->redraw ();
-        //canvas->setMouseMode (RotateMode);
-      }
+      canvas->redraw ();
 
     foreach (QFrame *frame,
              qWidget<QWidget> ()->findChildren<QFrame*> ())
@@ -596,34 +593,15 @@
   };
 
   void
-  Figure::updateBoundingBoxHelper (void *data)
-  {
-    gh_manager::auto_lock lock;
-
-    UpdateBoundingBoxData *d = reinterpret_cast<UpdateBoundingBoxData *> (data);
-    graphics_object go = gh_manager::get_object (d->m_handle);
-
-    if (go.valid_object ())
-      {
-        figure::properties& fp = Utils::properties<figure> (go);
-
-        fp.set_boundingbox (d->m_bbox, d->m_internal, false);
-
-        if (d->m_internal)
-          emit d->m_figure->asyncUpdate ();
-      }
-
-    delete d;
-  }
-
-  void
   Figure::updateBoundingBox (bool internal, int flags)
   {
     QWidget *win = qWidget<QWidget> ();
     Matrix bb (1, 4);
+    std::string prop;
 
     if (internal)
       {
+        prop = "position";
         QRect r = m_innerRect;
 
         if (flags & UpdateBoundingBoxPosition)
@@ -645,6 +623,7 @@
       }
     else
       {
+        prop = "outerposition";
         QRect r = m_outerRect;
 
         if (flags & UpdateBoundingBoxPosition)
@@ -665,14 +644,10 @@
           return;
       }
 
-    UpdateBoundingBoxData *d = new UpdateBoundingBoxData ();
+    figure::properties& fp = properties<figure> ();
 
-    d->m_bbox = bb;
-    d->m_internal = internal;
-    d->m_handle = m_handle;
-    d->m_figure = this;
-
-    gh_manager::post_function (Figure::updateBoundingBoxHelper, d);
+    gh_manager::post_set (m_handle, prop, fp.bbox2position (bb), false,
+                          prop == "position");
   }
 
   void
--- a/libgui/graphics/Figure.h	Sun Jan 06 07:37:48 2019 -0800
+++ b/libgui/graphics/Figure.h	Mon Jan 07 08:08:47 2019 -0500
@@ -108,8 +108,6 @@
     void updateFigureToolBarAndMenuBar (void);
     void set_geometry (QRect r);
 
-    static void updateBoundingBoxHelper (void*);
-
     void close_figure_callback (void);
 
     void enableMouseTracking (void);
--- a/libgui/graphics/Table.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libgui/graphics/Table.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -353,7 +353,8 @@
     {                                                  \
       ctype val;                                       \
       int n;                                           \
-      const char *c_str = ov.string_value ().c_str (); \
+      const std::string cxx_str = ov.string_value ();  \
+      const char *c_str = cxx_str.c_str ();            \
       int error = sscanf (c_str, format, &val, &n);    \
       if (error != 1 || c_str[n])                      \
         {                                              \
@@ -364,14 +365,14 @@
 
     if (old_value.is_string ())
       retval = ov;
-    SCANF_AND_CONVERT(int8, int64_t, "%jd %n")
-    SCANF_AND_CONVERT(uint8, uint64_t, "%ju %n")
-    SCANF_AND_CONVERT(int16, int64_t, "%jd %n")
-    SCANF_AND_CONVERT(uint16, uint64_t, "%ju %n")
-    SCANF_AND_CONVERT(int32, int64_t, "%jd %n")
-    SCANF_AND_CONVERT(uint32, uint64_t, "%ju %n")
-    SCANF_AND_CONVERT(int64, int64_t, "%jd %n")
-    SCANF_AND_CONVERT(uint64, uint64_t, "%ju %n")
+    SCANF_AND_CONVERT(int8, int64_t, "%" PRId64 " %n")
+    SCANF_AND_CONVERT(uint8, uint64_t, "%" PRIu64 " %n")
+    SCANF_AND_CONVERT(int16, int64_t, "%" PRId64 " %n")
+    SCANF_AND_CONVERT(uint16, uint64_t, "%" PRIu64 " %n")
+    SCANF_AND_CONVERT(int32, int64_t, "%" PRId64 " %n")
+    SCANF_AND_CONVERT(uint32, uint64_t, "%" PRIu64 " %n")
+    SCANF_AND_CONVERT(int64, int64_t, "%" PRId64 " %n")
+    SCANF_AND_CONVERT(uint64, uint64_t, "%" PRIu64 " %n")
 
   #undef SCANF_AND_CONVERT
 
@@ -1286,7 +1287,7 @@
   {
     uitable::properties& tp = properties<uitable> ();
     bool enabled = tp.is_enable ();
-    m_tableWidget->setEnabled (! enabled);
+    m_tableWidget->setEnabled (enabled);
 
     bool rearrangeableColumns = tp.is_rearrangeablecolumns ();
 
--- a/libgui/graphics/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ b/libgui/graphics/module.mk	Mon Jan 07 08:08:47 2019 -0500
@@ -174,6 +174,8 @@
 
 OCT_FILE_LIBS += $(LIBOCTGUI_GRAPHICS_LIB)
 
+OCT_FILES += $(GRAPHICS_OCT_FILES)
+
 ## Use stamp files to avoid problems with checking timestamps
 ## of symbolic links
 
--- a/libinterp/corefcn/ft-text-renderer.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/corefcn/ft-text-renderer.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -367,8 +367,8 @@
     ft_text_renderer (void)
       : base_text_renderer (), font (), bbox (1, 4, 0.0), halign (0),
         xoffset (0), line_yoffset (0), yoffset (0), mode (MODE_BBOX),
-        color (dim_vector (1, 3), 0), m_ymin (0), m_ymax (0), m_deltax (0),
-        m_max_fontsize (0)
+        color (dim_vector (1, 3), 0), line_xoffset (0), m_ymin (0), m_ymax (0),
+        m_deltax (0), m_max_fontsize (0)
     { }
 
     // No copying!
@@ -831,6 +831,7 @@
                                         m_ymin);
                     m_ymax = math::max ((glyph_bbox.yMax >> 6) + yoffset,
                                         m_ymax);
+                    FT_Done_Glyph (glyph);
                     update_line_bbox ();
                   }
                 break;
--- a/libinterp/corefcn/gl-render.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/corefcn/gl-render.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -2489,6 +2489,7 @@
         if (fa_mode == 0)
           {
             fa = props.get_facealpha_double ();
+            cb[3] = fa;
             if (fc_mode == UNIFORM || fc_mode == TEXTURE)
               {
                 m_glfcns.glColor4d (fcolor(0), fcolor(1), fcolor(2), fa);
@@ -2562,7 +2563,6 @@
                         // FIXME: is there a smarter way to do this?
                         for (int k = 0; k < 3; k++)
                           cb[k] = c(j-1, i-1, k);
-                        cb[3] = fa;
                         m_glfcns.glColor4fv (cb);
 
                         if (fl_mode > 0)
@@ -2593,7 +2593,6 @@
                       {
                         for (int k = 0; k < 3; k++)
                           cb[k] = c(j-1, i, k);
-                        cb[3] = fa;
                         m_glfcns.glColor4fv (cb);
 
                         if (fl_mode > 0)
@@ -2624,7 +2623,6 @@
                       {
                         for (int k = 0; k < 3; k++)
                           cb[k] = c(j, i, k);
-                        cb[3] = fa;
                         m_glfcns.glColor4fv (cb);
 
                         if (fl_mode > 0)
@@ -2654,7 +2652,6 @@
                       {
                         for (int k = 0; k < 3; k++)
                           cb[k] = c(j, i-1, k);
-                        cb[3] = fa;
                         m_glfcns.glColor4fv (cb);
 
                         if (fl_mode > 0)
@@ -2698,6 +2695,7 @@
       {
         if (props.get_edgealpha_double () == 1)
           {
+            cb[3] = 1.0; // edgealpha isn't implemented yet
             if (ec_mode == UNIFORM)
               {
                 m_glfcns.glColor3dv (ecolor.data ());
--- a/libinterp/corefcn/graphics.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/corefcn/graphics.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -4081,9 +4081,8 @@
   return pos;
 }
 
-void
-figure::properties::set_boundingbox (const Matrix& bb, bool internal,
-                                     bool do_notify_toolkit)
+Matrix
+figure::properties::bbox2position (const Matrix& bb) const
 {
   Matrix screen_size = screen_size_pixels ();
   Matrix pos = bb;
@@ -4092,6 +4091,15 @@
   pos(1)++;
   pos(0)++;
   pos = convert_position (pos, "pixels", get_units (), screen_size);
+  return pos;
+}
+
+void
+figure::properties::set_boundingbox (const Matrix& bb, bool internal,
+                                     bool do_notify_toolkit)
+{
+  Matrix screen_size = screen_size_pixels ();
+  Matrix pos = bbox2position (bb);
 
   if (internal)
     set_position (pos, do_notify_toolkit);
@@ -11384,9 +11392,12 @@
 {
 public:
   set_event (const graphics_handle& h, const std::string& name,
-             const octave_value& value, bool do_notify_toolkit = true)
+             const octave_value& value, bool do_notify_toolkit = true,
+             bool redraw_figure = false)
     : base_graphics_event (), handle (h), property_name (name),
-      property_value (value), notify_toolkit (do_notify_toolkit) { }
+      property_value (value), notify_toolkit (do_notify_toolkit),
+      m_redraw_figure (redraw_figure)
+  { }
 
   void execute (void)
   {
@@ -11399,7 +11410,41 @@
         property p = go.get_properties ().get_property (property_name);
 
         if (p.ok ())
-          p.set (property_value, true, notify_toolkit);
+          {
+            // FIXME: figure position and outerposition properties set_xxx have
+            // a signature that allows passing the notify_toolkit argument.
+            // Should we change all set_xxx signatures and allow
+            // base_properties::set to accept this also? This would allow for
+            // the use of high level set_xxx instead of directly changing the
+            // property value.
+            if (go.isa ("figure") && property_name == "position")
+              {
+                figure::properties& fprops
+                  = dynamic_cast<figure::properties&> (go.get_properties ());
+                fprops.set_position (property_value, notify_toolkit);
+              }
+            else if (go.isa ("figure") && property_name == "outerposition")
+              {
+                figure::properties& fprops
+                  = dynamic_cast<figure::properties&> (go.get_properties ());
+                fprops.set_outerposition (property_value, notify_toolkit);
+              }
+            else
+              p.set (property_value, true, notify_toolkit);
+
+            if (m_redraw_figure)
+              {
+                if (! go.isa ("figure"))
+                  go = go.get_ancestor ("figure");
+
+                if (go.valid_object ())
+                  {
+                    figure::properties& fprops
+                      = dynamic_cast<figure::properties&> (go.get_properties ());
+                    fprops.get_toolkit ().redraw_figure (go);
+                  }
+              }
+          }
       }
   }
 
@@ -11413,6 +11458,7 @@
   std::string property_name;
   octave_value property_value;
   bool notify_toolkit;
+  bool m_redraw_figure;
 };
 
 graphics_event
@@ -11444,9 +11490,10 @@
 graphics_event::create_set_event (const graphics_handle& h,
                                   const std::string& name,
                                   const octave_value& data,
-                                  bool notify_toolkit)
-{
-  return graphics_event (new set_event (h, name, data, notify_toolkit));
+                                  bool notify_toolkit, bool redraw_figure)
+{
+  return graphics_event (new set_event (h, name, data, notify_toolkit,
+                                        redraw_figure));
 }
 
 static void
@@ -11641,12 +11688,14 @@
 
 void
 gh_manager::do_post_set (const graphics_handle& h, const std::string& name,
-                         const octave_value& value, bool notify_toolkit)
+                         const octave_value& value, bool notify_toolkit,
+                         bool redraw_figure)
 {
   gh_manager::auto_lock guard;
 
   do_post_event (graphics_event::create_set_event (h, name, value,
-                                                   notify_toolkit));
+                                                   notify_toolkit,
+                                                   redraw_figure));
 }
 
 int
--- a/libinterp/corefcn/graphics.in.h	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/corefcn/graphics.in.h	Mon Jan 07 08:08:47 2019 -0500
@@ -3091,6 +3091,8 @@
     void set_outerposition (const octave_value& val,
                             bool do_notify_toolkit = true);
 
+    Matrix bbox2position (const Matrix& bbox) const;
+
     Matrix get_boundingbox (bool internal = false,
                             const Matrix& parent_pix_size = Matrix ()) const;
 
@@ -3878,7 +3880,7 @@
       update_ytick ();
       update_ztick ();
     }
-    
+
     void update_xtick (void)
     {
       calc_ticks_and_lims (xlim, xtick, xminortickvalues, xlimmode.is ("auto"),
@@ -6132,8 +6134,8 @@
 
   static graphics_event
   create_set_event (const graphics_handle& h, const std::string& name,
-                    const octave_value& value,
-                    bool notify_toolkit = true);
+                    const octave_value& value, bool notify_toolkit = true,
+                    bool redraw_figure = false);
 private:
 
   std::shared_ptr <base_graphics_event> rep;
@@ -6326,10 +6328,11 @@
   }
 
   static void post_set (const graphics_handle& h, const std::string& name,
-                        const octave_value& value, bool notify_toolkit = true)
+                        const octave_value& value, bool notify_toolkit = true,
+                        bool redraw_figure = false)
   {
     if (instance_ok ())
-      instance->do_post_set (h, name, value, notify_toolkit);
+      instance->do_post_set (h, name, value, notify_toolkit, redraw_figure);
   }
 
   static int process_events (void)
@@ -6521,7 +6524,8 @@
   void do_post_function (graphics_event::event_fcn fcn, void *fcn_data);
 
   void do_post_set (const graphics_handle& h, const std::string& name,
-                    const octave_value& value, bool notify_toolkit = true);
+                    const octave_value& value, bool notify_toolkit = true,
+                    bool redraw_figure = false);
 
   int do_process_events (bool force = false);
 
--- a/libinterp/corefcn/regexp.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/corefcn/regexp.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -479,7 +479,7 @@
       octave_value_list new_retval;
       new_retval.resize (nargout);
 
-      int arg_used[7] {};
+      bool arg_used[7] {};
 
       for (int j = 2; j < nargin; j++)
         {
--- a/libinterp/dldfcn/config-module.awk	Sun Jan 06 07:37:48 2019 -0800
+++ b/libinterp/dldfcn/config-module.awk	Mon Jan 07 08:08:47 2019 -0500
@@ -104,6 +104,9 @@
   print "OCT_FILE_LIBS += \\";
   print " $(DLDFCN_LIBS)";
   print "";
+  print "OCT_FILES += \\";
+  print " $(DLDFCN_OCT_FILES)";
+  print "";
   print "DIRSTAMP_FILES += %reldir%/$(octave_dirstamp)";
 
   print "";
--- a/liboctave/array/Array-d.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/liboctave/array/Array-d.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -135,7 +135,7 @@
         }
 
     }
-  else if (mode == ASCENDING)
+  else  // mode == ASCENDING
     {
       // Sort out NaNs.
       while (n > 0 && octave::math::isnan (el[n-1]))
--- a/liboctave/array/Array-f.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/liboctave/array/Array-f.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -135,7 +135,7 @@
         }
 
     }
-  else if (mode == ASCENDING)
+  else  // mode == ASCENDING
     {
       // Sort out NaNs.
       while (n > 0 && octave::math::isnan (el[n-1]))
--- a/liboctave/operators/mx-inlines.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/liboctave/operators/mx-inlines.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -672,7 +672,7 @@
 
 #define OP_RED_SUM(ac, el) ac += el
 #define OP_RED_PROD(ac, el) ac *= el
-#define OP_RED_SUMSQ(ac, el) ac += (el*el)
+#define OP_RED_SUMSQ(ac, el) ac += ((el)*(el))
 #define OP_RED_SUMSQC(ac, el) ac += cabsq (el)
 
 inline void
--- a/liboctave/wrappers/uniconv-wrappers.c	Sun Jan 06 07:37:48 2019 -0800
+++ b/liboctave/wrappers/uniconv-wrappers.c	Mon Jan 07 08:08:47 2019 -0500
@@ -76,9 +76,14 @@
 
   // result might not be 0 terminated
   char *retval = malloc (length + 1);
-  memcpy (retval, mbchar, length);
-  free ((void *) mbchar);
-  retval[length] = 0; // 0 terminate string
+  if (retval)
+    {
+      memcpy (retval, mbchar, length);
+      free ((void *) mbchar);
+      retval[length] = 0; // 0 terminate string
+    }
+  else
+    free ((void *) mbchar);
 
   return retval;
 }
@@ -98,9 +103,15 @@
                                      src, srclen, NULL, NULL, &length);
   // result might not be 0 terminated
   wchar_t *retval = malloc (length + 1 * sizeof (wchar_t));
-  memcpy (retval, wchar, length);
-  free ((void *) wchar);
-  retval[length / sizeof (wchar_t)] = 0; // 0 terminate string
+  if (retval)
+    {
+      memcpy (retval, wchar, length);
+      free ((void *) wchar);
+      retval[length / sizeof (wchar_t)] = 0; // 0 terminate string
+    }
+
+  else
+    free ((void *) wchar);
 
   return retval;
 }
--- a/scripts/miscellaneous/mkoctfile.m	Sun Jan 06 07:37:48 2019 -0800
+++ b/scripts/miscellaneous/mkoctfile.m	Mon Jan 07 08:08:47 2019 -0500
@@ -146,12 +146,12 @@
 ##    EXEEXT                      MANDIR
 ##    FCNFILEDIR                  OCTAVE_EXEC_HOME
 ##    IMAGEDIR                    OCTAVE_HOME
-##    INFODIR                     OCTDATADIR
-##    INFOFILE                    OCTDOCDIR
-##    LIBEXECDIR                  OCTFILEDIR
-##    LOCALAPIARCHLIBDIR          OCTFONTSDIR
-##    LOCALAPIFCNFILEDIR          STARTUPFILEDIR
-##    LOCALAPIOCTFILEDIR          VERSION
+##    INFODIR                     OCTAVE_VERSION
+##    INFOFILE                    OCTDATADIR
+##    LIBEXECDIR                  OCTDOCDIR
+##    LOCALAPIARCHLIBDIR          OCTFILEDIR
+##    LOCALAPIFCNFILEDIR          OCTFONTSDIR
+##    LOCALAPIOCTFILEDIR          STARTUPFILEDIR
 ##    LOCALARCHLIBDIR
 ## @end group
 ## @end example
--- a/src/mkoctfile.in.cc	Sun Jan 06 07:37:48 2019 -0800
+++ b/src/mkoctfile.in.cc	Mon Jan 07 08:08:47 2019 -0500
@@ -156,7 +156,7 @@
   vars["DEFAULT_PAGER"] = %OCTAVE_DEFAULT_PAGER%;
   vars["EXEEXT"] = %OCTAVE_EXEEXT%;
   vars["MAN1EXT"] = %OCTAVE_MAN1EXT%;
-  vars["VERSION"] = %OCTAVE_VERSION%;
+  vars["OCTAVE_VERSION"] = %OCTAVE_VERSION%;
 
   vars["ARCHLIBDIR"] = prepend_octave_exec_home (%OCTAVE_ARCHLIBDIR%);
   vars["BINDIR"] = prepend_octave_exec_home (%OCTAVE_BINDIR%);
@@ -446,12 +446,12 @@
 "                            EXEEXT                      MANDIR\n"
 "                            FCNFILEDIR                  OCTAVE_EXEC_HOME\n"
 "                            IMAGEDIR                    OCTAVE_HOME\n"
-"                            INFODIR                     OCTDATADIR\n"
-"                            INFOFILE                    OCTDOCDIR\n"
-"                            LIBEXECDIR                  OCTFILEDIR\n"
-"                            LOCALAPIARCHLIBDIR          OCTFONTSDIR\n"
-"                            LOCALAPIFCNFILEDIR          STARTUPFILEDIR\n"
-"                            LOCALAPIOCTFILEDIR          VERSION\n"
+"                            INFODIR                     OCTAVE_VERSION\n"
+"                            INFOFILE                    OCTDATADIR\n"
+"                            LIBEXECDIR                  OCTDOCDIR\n"
+"                            LOCALAPIARCHLIBDIR          OCTFILEDIR\n"
+"                            LOCALAPIFCNFILEDIR          OCTFONTSDIR\n"
+"                            LOCALAPIOCTFILEDIR          STARTUPFILEDIR\n"
 "                            LOCALARCHLIBDIR\n"
 "\n"
 "  --link-stand-alone      Link a stand-alone executable file.\n"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-45969.tst	Mon Jan 07 08:08:47 2019 -0500
@@ -0,0 +1,36 @@
+%!test
+%! ascii_filename = tempname ();
+%! binary_filename = tempname ();
+%! a = 2;
+%! b = 10;
+%! c = 20;
+%! f1 = @ (f, x) f (x) + a;
+%! f2 = @ (y) f1 (@ (z) z^2 + b * y, y) + c;
+%! f2_arg = 5;
+%! unwind_protect
+%!   save (ascii_filename, "f2");
+%!   save ("-binary", binary_filename, "f2");
+%!   ascii = load (ascii_filename);
+%!   binary = load (binary_filename);
+%!   assert (f2 (f2_arg), ascii.f2 (f2_arg));
+%!   assert (f2 (f2_arg), binary.f2 (f2_arg));
+%! unwind_protect_cleanup
+%!   unlink (ascii_filename);
+%!   unlink (binary_filename);
+%! end_unwind_protect
+
+%!testif HAVE_HDF5
+%! hdf5_filename = tempname ();
+%! a = 2;
+%! b = 10;
+%! c = 20;
+%! f1 = @ (f, x) f (x) + a;
+%! f2 = @ (y) f1 (@ (z) z^2 + b * y, y) + c;
+%! f2_arg = 5;
+%! unwind_protect
+%!   save ("-hdf5", hdf5_filename, "f2");
+%!   hdf5 = load (hdf5_filename);
+%!   assert (f2 (f2_arg), hdf5.f2 (f2_arg));
+%! unwind_protect_cleanup
+%!   unlink (hdf5_filename);
+%! end_unwind_protect
--- a/test/bug-45969/bug-45969.tst	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-%!test
-%! ascii_filename = tempname ();
-%! binary_filename = tempname ();
-%! a = 2;
-%! b = 10;
-%! c = 20;
-%! f1 = @ (f, x) f (x) + a;
-%! f2 = @ (y) f1 (@ (z) z^2 + b * y, y) + c;
-%! f2_arg = 5;
-%! unwind_protect
-%!   save (ascii_filename, "f2");
-%!   save ("-binary", binary_filename, "f2");
-%!   ascii = load (ascii_filename);
-%!   binary = load (binary_filename);
-%!   assert (f2 (f2_arg), ascii.f2 (f2_arg));
-%!   assert (f2 (f2_arg), binary.f2 (f2_arg));
-%! unwind_protect_cleanup
-%!   unlink (ascii_filename);
-%!   unlink (binary_filename);
-%! end_unwind_protect
-
-%!testif HAVE_HDF5
-%! hdf5_filename = tempname ();
-%! a = 2;
-%! b = 10;
-%! c = 20;
-%! f1 = @ (f, x) f (x) + a;
-%! f2 = @ (y) f1 (@ (z) z^2 + b * y, y) + c;
-%! f2_arg = 5;
-%! unwind_protect
-%!   save ("-hdf5", hdf5_filename, "f2");
-%!   hdf5 = load (hdf5_filename);
-%!   assert (f2 (f2_arg), hdf5.f2 (f2_arg));
-%! unwind_protect_cleanup
-%!   unlink (hdf5_filename);
-%! end_unwind_protect
--- a/test/bug-45969/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-bug_45969_TEST_FILES = \
-  test/bug-45969/bug-45969.tst
-
-TEST_FILES += $(bug_45969_TEST_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-45972.tst	Mon Jan 07 08:08:47 2019 -0500
@@ -0,0 +1,26 @@
+%!test
+%! ascii_filename = tempname ();
+%! binary_filename = tempname ();
+%! f = @ (x, y, varargin) x + y + varargin{1};
+%! unwind_protect
+%!   save ("-text", ascii_filename, "f");
+%!   save ("-binary", binary_filename, "f");
+%!   ascii = load (ascii_filename);
+%!   binary = load (binary_filename);
+%!   assert (f (1, 2, 3), ascii.f (1, 2, 3));
+%!   assert (f (1, 2, 3), binary.f (1, 2, 3));
+%! unwind_protect_cleanup
+%!   unlink (ascii_filename);
+%!   unlink (binary_filename);
+%! end_unwind_protect
+
+%!testif HAVE_HDF5
+%! hdf5_filename = tempname ();
+%! f = @ (x, y, varargin) x + y + varargin{1};
+%! unwind_protect
+%!   save ("-hdf5", hdf5_filename, "f");
+%!   hdf5 = load (hdf5_filename);
+%!   assert (f (1, 2, 3), hdf5.f (1, 2, 3));
+%! unwind_protect_cleanup
+%!   unlink (hdf5_filename);
+%! end_unwind_protect
--- a/test/bug-45972/bug-45972.tst	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-%!test
-%! ascii_filename = tempname ();
-%! binary_filename = tempname ();
-%! f = @ (x, y, varargin) x + y + varargin{1};
-%! unwind_protect
-%!   save ("-text", ascii_filename, "f");
-%!   save ("-binary", binary_filename, "f");
-%!   ascii = load (ascii_filename);
-%!   binary = load (binary_filename);
-%!   assert (f (1, 2, 3), ascii.f (1, 2, 3));
-%!   assert (f (1, 2, 3), binary.f (1, 2, 3));
-%! unwind_protect_cleanup
-%!   unlink (ascii_filename);
-%!   unlink (binary_filename);
-%! end_unwind_protect
-
-%!testif HAVE_HDF5
-%! hdf5_filename = tempname ();
-%! f = @ (x, y, varargin) x + y + varargin{1};
-%! unwind_protect
-%!   save ("-hdf5", hdf5_filename, "f");
-%!   hdf5 = load (hdf5_filename);
-%!   assert (f (1, 2, 3), hdf5.f (1, 2, 3));
-%! unwind_protect_cleanup
-%!   unlink (hdf5_filename);
-%! end_unwind_protect
--- a/test/bug-45972/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-bug_45972_TEST_FILES = \
-  %reldir%/bug-45972.tst
-
-TEST_FILES += $(bug_45972_TEST_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-55308.tst	Mon Jan 07 08:08:47 2019 -0500
@@ -0,0 +1,28 @@
+## Copyright (C) 2018-2019 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <https://www.gnu.org/licenses/>.
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hg = hggroup ();
+%!   axis ([-2, 2, -2, 2]);
+%!   hl = line ([0;1], [0;0], "color", "r");
+%!   set (hl, "parent", hg);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
--- a/test/bug-55308/bug-55308.tst	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-## Copyright (C) 2018-2019 Rik Wehbring
-##
-## This file is part of Octave.
-##
-## Octave is free software: you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <https://www.gnu.org/licenses/>.
-
-%!test
-%! hf = figure ("visible", "off");
-%! unwind_protect
-%!   hg = hggroup ();
-%!   axis ([-2, 2, -2, 2]);
-%!   hl = line ([0;1], [0;0], "color", "r");
-%!   set (hl, "parent", hg);
-%! unwind_protect_cleanup
-%!   close (hf);
-%! end_unwind_protect
--- a/test/bug-55308/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-bug_55308_TEST_FILES = \
-  %reldir%/bug-55308.tst
-
-TEST_FILES += $(bug_55308_TEST_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-55321.tst	Mon Jan 07 08:08:47 2019 -0500
@@ -0,0 +1,35 @@
+## Copyright (C) 2018-2019 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <https://www.gnu.org/licenses/>.
+
+%!function cb_children (hg)
+%!  hl = get (hg, "children");
+%!  color = get (hl, "color");
+%!  set (hl, "userdata", isequal (color, [1 0 0]));
+%!endfunction
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ("parent", hf);
+%!   hg = hggroup ();
+%!   addlistener (hg, "children", @cb_children);
+%!   hl = line ([0, 1], [1, 1], "color", "r", "parent", hg);
+%!   assert (get (hl, "userdata"), true);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
--- a/test/bug-55321/bug-55321.tst	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-## Copyright (C) 2018-2019 Rik Wehbring
-##
-## This file is part of Octave.
-##
-## Octave is free software: you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <https://www.gnu.org/licenses/>.
-
-%!function cb_children (hg)
-%!  hl = get (hg, "children");
-%!  color = get (hl, "color");
-%!  set (hl, "userdata", isequal (color, [1 0 0]));
-%!endfunction
-
-%!test
-%! hf = figure ("visible", "off");
-%! unwind_protect
-%!   hax = axes ("parent", hf);
-%!   hg = hggroup ();
-%!   addlistener (hg, "children", @cb_children);
-%!   hl = line ([0, 1], [1, 1], "color", "r", "parent", hg);
-%!   assert (get (hl, "userdata"), true);
-%! unwind_protect_cleanup
-%!   close (hf);
-%! end_unwind_protect
--- a/test/bug-55321/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-bug_55321_TEST_FILES = \
-  %reldir%/bug-55321.tst
-
-TEST_FILES += $(bug_55321_TEST_FILES)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/bug-55322.tst	Mon Jan 07 08:08:47 2019 -0500
@@ -0,0 +1,29 @@
+## Copyright (C) 2018-2019 Rik Wehbring
+##
+## This file is part of Octave.
+##
+## Octave is free software: you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, see
+## <https://www.gnu.org/licenses/>.
+
+%!test
+%! hf = figure ("visible", "off");
+%! unwind_protect
+%!   hax = axes ("parent", hf);
+%!   hg = hggroup ();
+%!   hl = line (hax, [0, 1], [1, 1], "parent", hax, "parent", hg);
+%!   assert (get (hax, "children"), hg);
+%!   assert (get (hg, "children"), hl);
+%! unwind_protect_cleanup
+%!   close (hf);
+%! end_unwind_protect
--- a/test/bug-55322/bug-55322.tst	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-## Copyright (C) 2018-2019 Rik Wehbring
-##
-## This file is part of Octave.
-##
-## Octave is free software: you can redistribute it and/or modify it
-## under the terms of the GNU General Public License as published by
-## the Free Software Foundation, either version 3 of the License, or
-## (at your option) any later version.
-##
-## Octave is distributed in the hope that it will be useful, but
-## WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-## GNU General Public License for more details.
-##
-## You should have received a copy of the GNU General Public License
-## along with Octave; see the file COPYING.  If not, see
-## <https://www.gnu.org/licenses/>.
-
-%!test
-%! hf = figure ("visible", "off");
-%! unwind_protect
-%!   hax = axes ("parent", hf);
-%!   hg = hggroup ();
-%!   hl = line (hax, [0, 1], [1, 1], "parent", hax, "parent", hg);
-%!   assert (get (hax, "children"), hg);
-%!   assert (get (hg, "children"), hl);
-%! unwind_protect_cleanup
-%!   close (hf);
-%! end_unwind_protect
--- a/test/bug-55322/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-bug_55322_TEST_FILES = \
-  %reldir%/bug-55322.tst
-
-TEST_FILES += $(bug_55322_TEST_FILES)
--- a/test/module.mk	Sun Jan 06 07:37:48 2019 -0800
+++ b/test/module.mk	Mon Jan 07 08:08:47 2019 -0500
@@ -10,11 +10,16 @@
   %reldir%/bug-31371.tst \
   %reldir%/bug-38565.tst \
   %reldir%/bug-38576.tst \
+  %reldir%/bug-45969.tst \
+  %reldir%/bug-45972.tst \
   %reldir%/bug-46330.tst \
   %reldir%/bug-49904.tst \
   %reldir%/bug-53579.tst \
   %reldir%/bug-53599.tst \
   %reldir%/bug-54490.tst \
+  %reldir%/bug-55308.tst \
+  %reldir%/bug-55321.tst \
+  %reldir%/bug-55322.tst \
   %reldir%/colormaps.tst \
   %reldir%/command.tst \
   %reldir%/complex.tst \
@@ -58,8 +63,6 @@
 include %reldir%/bug-38691/module.mk
 include %reldir%/bug-41723/module.mk
 include %reldir%/bug-44940/module.mk
-include %reldir%/bug-45969/module.mk
-include %reldir%/bug-45972/module.mk
 include %reldir%/bug-46660/module.mk
 include %reldir%/bug-49379/module.mk
 include %reldir%/bug-50014/module.mk
@@ -72,9 +75,6 @@
 include %reldir%/bug-52075/module.mk
 include %reldir%/bug-52722/module.mk
 include %reldir%/bug-53027/module.mk
-include %reldir%/bug-55308/module.mk
-include %reldir%/bug-55321/module.mk
-include %reldir%/bug-55322/module.mk
 include %reldir%/class-concat/module.mk
 include %reldir%/classdef/module.mk
 include %reldir%/classdef-multiple-inheritance/module.mk