changeset 26617:98afb8bbd1f6 stable

maint: Strip trailing whitespace from source files. * NEWS, GLCanvas.cc, dialog.cc, error.cc, ft-text-renderer.cc, sysdep.cc, utils.cc, pt-jit.cc, oct-rl-hist.c, makeUniqueStrings.m, randi.m, waitbar.m, clearvars.m, sqp.m, fplot.m, openfig.m, __print_parse_opts__.m, octave-svgconvert.cc: Strip trailing whitespace.
author John W. Eaton <jwe@octave.org>
date Thu, 24 Jan 2019 19:18:51 +0000
parents d3600d0511d8
children 361f7ce80f85
files NEWS libgui/graphics/GLCanvas.cc libgui/src/dialog.cc libinterp/corefcn/error.cc libinterp/corefcn/ft-text-renderer.cc libinterp/corefcn/sysdep.cc libinterp/corefcn/utils.cc libinterp/parse-tree/pt-jit.cc liboctave/util/oct-rl-hist.c scripts/+matlab/+lang/makeUniqueStrings.m scripts/general/randi.m scripts/gui/waitbar.m scripts/miscellaneous/clearvars.m scripts/optimization/sqp.m scripts/plot/draw/fplot.m scripts/plot/util/openfig.m scripts/plot/util/private/__print_parse_opts__.m src/octave-svgconvert.cc
diffstat 18 files changed, 42 insertions(+), 42 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Jan 24 19:06:40 2019 +0000
+++ b/NEWS	Thu Jan 24 19:18:51 2019 +0000
@@ -12,7 +12,7 @@
     results are equally likely) sample of integers.  This may produce
     different results in existing code.  If it is necessary to reproduce
     the exact random integer sequence as in previous versions use
-    
+
       ri = imin + floor ((imax - imin + 1) * rand ());
 
  ** A new core function movfun will apply a function to a sliding
@@ -21,7 +21,7 @@
     scheme movXXX where "XXX" is the function that will be applied.
     For example, the moving average over a dataset is movmean.
     New moving window functions:
-   
+
     movfun   movslice
     movmad   movmax   movmean   movmedian   movmin   movprod
     movstd   movsum   movvar
--- a/libgui/graphics/GLCanvas.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libgui/graphics/GLCanvas.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -140,11 +140,11 @@
     if (obj.valid_object ())
       {
         graphics_object figObj (obj.get_ancestor ("figure"));
-        
+
         // Make sure we have a valid current context
         if (! begin_rendering ())
           error ("print: no valid OpenGL offscreen context");
-        
+
         try
           {
             octave::gl2ps_print (m_glfcns, figObj, file_cmd.toStdString (),
@@ -154,7 +154,7 @@
           {
             octave_link::post_exception (std::current_exception ());
           }
-        
+
         end_rendering ();
       }
   }
--- a/libgui/src/dialog.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libgui/src/dialog.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -463,7 +463,7 @@
 
     setWindowTitle (title.isEmpty () ? " " : title);
     setDirectory (dirname);
-    
+
     // FIXME: Remove, if for all common KDE versions (bug #54607) is resolved.
     if (! resource_manager::get_settings ()->value ("use_native_file_dialogs",
                                                     true).toBool ())
--- a/libinterp/corefcn/error.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libinterp/corefcn/error.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -993,7 +993,7 @@
           else if (arg.is_string ())
             {
               tmpstr = arg.string_value ();  // 2-stage assignment required
-              msg = tmpstr.c_str ();         // in order to generate pointer  
+              msg = tmpstr.c_str ();         // in order to generate pointer
                                              // to valid memory.
             }
         }
--- a/libinterp/corefcn/ft-text-renderer.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libinterp/corefcn/ft-text-renderer.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -536,7 +536,7 @@
 
     // The X offset of the baseline for the current line.
     int line_xoffset;
-     
+
     // Min and max y coordinates of all glyphs in a line.
     FT_Pos m_ymin;
     FT_Pos m_ymax;
@@ -865,12 +865,12 @@
     // First run text_to_pixels which will also build the string list
 
     m_strlist = std::list<text_renderer::string> ();
-    
+
     octave::unwind_protect frame;
     frame.protect_var (m_do_strlist);
     frame.protect_var (m_strlist);
     m_do_strlist = true;
-    
+
     text_to_pixels (txt, pxls, box, ha, va, rot, interp, false);
 
     lst = m_strlist;
@@ -887,7 +887,7 @@
         std::string str = e.string_value ();
         const uint8_t *c = reinterpret_cast<const uint8_t *> (str.c_str ());
         uint32_t u32_c;
-        
+
         size_t n = str.size ();
         size_t icurr = 0;
         size_t ibegin = 0;
@@ -912,7 +912,7 @@
                     // the newline character
                     fs.set_y (line_yoffset + yoffset);
                     fs.set_color (color);
-                
+
                     std::string s = str.substr (ibegin, icurr - ibegin);
                     if (! s.empty ())
                       {
@@ -932,7 +932,7 @@
             if (u32_c == 10)
               {
                 previous = 0;
-                
+
                 if (m_do_strlist && mode == MODE_RENDER)
                   {
                     // Start a new string in m_strlist
--- a/libinterp/corefcn/sysdep.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libinterp/corefcn/sysdep.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -1110,9 +1110,9 @@
 @end deftypefn */)
 {
   octave_value_list retval;
-  
+
   int nargin = args.length ();
-  
+
   if (nargin > 1)
     print_usage ();
 
@@ -1120,7 +1120,7 @@
     {
       bool saved_state = Vpause_enabled;
       std::string state = args(0).string_value ();
-      
+
       if (state == "on")
         Vpause_enabled = true;
       else if (state == "off")
@@ -1129,14 +1129,14 @@
         ;// Do nothing
       else
         error ("pause: first argument must be \"on\", \"off\" or \"query\"");
-      
+
       if (nargout > 0 || state == "query")
         retval.append (saved_state ? "on" : "off");
     }
   else if (Vpause_enabled)
     {
       double dval;
-  
+
       if (nargin == 0)
         dval = octave_Inf;
       else
@@ -1147,7 +1147,7 @@
       else
         {
           Fdrawnow ();
-      
+
           octave::sleep (dval, true);
         }
     }
--- a/libinterp/corefcn/utils.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libinterp/corefcn/utils.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -1283,15 +1283,15 @@
     // is asleep
     if (do_graphics_events)
       gh_manager::unlock ();
-    
+
     if (octave::math::isinf (seconds))
       {
         // Wait for kbhit
         int c = -1;
         octave::flush_stdout ();
-        
+
         struct timespec one_tenth = { 0, 100000000 };
-        
+
         while (c < 0)
           {
             octave_nanosleep_wrapper (&one_tenth, nullptr);
--- a/libinterp/parse-tree/pt-jit.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/libinterp/parse-tree/pt-jit.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -137,7 +137,7 @@
 namespace octave
 {
   namespace jit
-  {    
+  {
 #if defined (LEGACY_PASSMANAGER)
     typedef llvm::legacy::PassManager PassManager;
     typedef llvm::legacy::FunctionPassManager FunctionPassManager;
@@ -2447,7 +2447,7 @@
     // FIXME: Provide a meaningful replacement instead of simply skipping it?
     module_pass_manager->add (llvm::createAlwaysInlinerPass ());
 #endif
-    
+
     // In 3.6, a pass was inserted in the pipeline to make the DataLayout accessible:
     //    MyPassManager->add(new DataLayoutPass(MyTargetMachine->getDataLayout()));
     // In 3.7, you don’t need a pass, you set the DataLayout on the Module:
--- a/liboctave/util/oct-rl-hist.c	Thu Jan 24 19:06:40 2019 +0000
+++ b/liboctave/util/oct-rl-hist.c	Thu Jan 24 19:18:51 2019 +0000
@@ -280,7 +280,7 @@
       // FIXME: Should this call current_liboctave_error_handler instead?
       if (! retval)
         return retval;
-      
+
       k = 0;
       for (i = beg; i < end; i++)
         {
--- a/scripts/+matlab/+lang/makeUniqueStrings.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/+matlab/+lang/makeUniqueStrings.m	Thu Jan 24 19:18:51 2019 +0000
@@ -41,7 +41,7 @@
 ## The optional input @var{maxlength} specifies the maximum length of any
 ## string in @var{uniqstr}.  If an input string cannot be made unique without
 ## exceeding @var{maxlength} an error is emitted.
-## 
+##
 ## The optional output @var{ismodified} is a logical array indicating whether
 ## each element in @var{str} was modified to make it unique.
 ##
--- a/scripts/general/randi.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/general/randi.m	Thu Jan 24 19:18:51 2019 +0000
@@ -102,20 +102,20 @@
   elseif (nargin == 2 && isscalar (varargin{1}))
     varargin(2) = varargin(1);
   endif
-    
+
   ## Rejection Algorithm to guarantee unbiased results.  See bug #54619.
   rng = (imax - imin) + 1;              # requested range
   N = prod ([varargin{:}]);             # number of requested elements
   K = floor ((flintmax () + 1) / rng);  # number of primary integers ...
                                         # mapped to single output
   p = (K*rng) / (flintmax () + 1);      # expected proportion of used primaries
-  
-  do  
+
+  do
     M = ceil (N/p + 10*sqrt (N/p - N)); # number of requested primary integers
     r_prim = floor (rand (M,1) * (flintmax () + 1));
     r_prim = r_prim(r_prim < K*rng);
   until (numel (r_prim) >= N)           # should practically always be true
-  
+
   ri = imin + floor (reshape (r_prim(1:N), varargin{:}) / K);
 
   if (! strcmp (rclass, "double"))
--- a/scripts/gui/waitbar.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/gui/waitbar.m	Thu Jan 24 19:18:51 2019 +0000
@@ -278,10 +278,10 @@
 %! disp ("Push the <cancel> button to stop the process.");
 %! hf = waitbar (0,"0","Name","Building Koch curve ...",...
 %!               "createcancelbtn", "setappdata (gcbf,'interrupt', true)");
-%! 
+%!
 %! pos2 = get (hf, "position");
 %! set (hf, "position", [pos1(1)+(pos1(3)-pos2(3))/2, pos1(2)+pos1(4), pos2(3:4)]);
-%! 
+%!
 %! for ii = 1:niter
 %!   ## Check cancel request
 %!   if (! ishghandle (hf))
--- a/scripts/miscellaneous/clearvars.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/miscellaneous/clearvars.m	Thu Jan 24 19:18:51 2019 +0000
@@ -147,7 +147,7 @@
   if (numvar > 0 && any ([vars.except]))
     ptn = strjoin ({ vars([vars.except]).var_name }, '|');
     idx_except = ! cellfun (@isempty, regexp (varlist, ptn));
-    idx_clear(idx_except) = false; 
+    idx_clear(idx_except) = false;
   endif
 
   varlist = varlist(idx_clear);
--- a/scripts/optimization/sqp.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/optimization/sqp.m	Thu Jan 24 19:18:51 2019 +0000
@@ -441,7 +441,7 @@
     [x_new, alpha, obj_new, globals] = ...
         linesearch_L1 (x, p, obj_fun, obj_grd, ce_fun, ci_fun, lambda, ...
                        obj, c, globals);
-    
+
     delx = x_new - x;
 
     ## Check if step size has become too small (indicates lack of progress).
--- a/scripts/plot/draw/fplot.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/plot/draw/fplot.m	Thu Jan 24 19:18:51 2019 +0000
@@ -123,14 +123,14 @@
   while (i <= numel (varargin))
     arg = varargin{i};
     if (ischar (arg))
-      [~, valid_fmt] = __pltopt__ ("fplot", arg, false); 
+      [~, valid_fmt] = __pltopt__ ("fplot", arg, false);
       if (valid_fmt)
         fmt(end+1) = arg;
       else
         if (i == numel (varargin))
           error ("fplot: bad input in position %d", i);
         endif
-        fmt(end+(1:2)) = varargin([i, i+1]); 
+        fmt(end+(1:2)) = varargin([i, i+1]);
         i++;  # Skip PROPERTY.
       endif
     elseif (isnumeric (arg) && isscalar (arg) && arg > 0)
--- a/scripts/plot/util/openfig.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/plot/util/openfig.m	Thu Jan 24 19:18:51 2019 +0000
@@ -145,7 +145,7 @@
 %!   h = figure ("visible", "off");
 %!   ftmp = [tempname() ".ofig"];
 %!   hgsave (h, ftmp);
-%!   openfig (ftmp, "new", [1, 2, 3]); 
+%!   openfig (ftmp, "new", [1, 2, 3]);
 %! unwind_protect_cleanup
 %!   unlink (ftmp);
 %!   close (h);
@@ -155,7 +155,7 @@
 %!   h = figure ("visible", "off");
 %!   ftmp = [tempname() ".ofig"];
 %!   hgsave (h, ftmp);
-%!   openfig (ftmp, "foobar"); 
+%!   openfig (ftmp, "foobar");
 %! unwind_protect_cleanup
 %!   unlink (ftmp);
 %!   close (h);
--- a/scripts/plot/util/private/__print_parse_opts__.m	Thu Jan 24 19:06:40 2019 +0000
+++ b/scripts/plot/util/private/__print_parse_opts__.m	Thu Jan 24 19:18:51 2019 +0000
@@ -253,7 +253,7 @@
              graphics_toolkit (arg_st.figure));
   endif
 
-  
+
   if (arg_st.use_color == 0)
     if (any (strcmp ({"ps", "ps2", "eps", "eps2"}, arg_st.devopt)))
       arg_st.use_color = -1;
@@ -615,7 +615,7 @@
     if (isempty (bindir))
       bindir = __octave_config_info__ ("archlibdir");
     endif
-    
+
     binary = fullfile (bindir, "octave-svgconvert");
 
     if (! exist (binary, "file"))
--- a/src/octave-svgconvert.cc	Thu Jan 24 19:06:40 2019 +0000
+++ b/src/octave-svgconvert.cc	Thu Jan 24 19:18:51 2019 +0000
@@ -718,7 +718,7 @@
 * font: specify a file name for the default FreeSans font\n\
 * reconstruct: specify wether to reconstruct triangle to polygons (0 or 1)\n\
 * outfile: output file name\n";
-  
+
   if (strcmp (argv[1], "-h") == 0)
     {
       std::cout << help;
@@ -804,7 +804,7 @@
             {
               int id = QFontDatabase::addApplicationFont (fontpath);
               if (id < 0)
-                std::cerr << "warning: print: " 
+                std::cerr << "warning: print: "
                   "Unable to add default font to database\n";
             }
           else