changeset 25609:506419b5f817

maint: Strip trailing whitespace from source files.
author John W. Eaton <jwe@octave.org>
date Fri, 13 Jul 2018 14:32:23 -0400
parents a15fe773db71
children 828d3a7b5da7
files libgui/src/documentation.cc libgui/src/documentation.h liboctave/system/lo-sysdep.cc liboctave/wrappers/unistd-wrappers.c
diffstat 4 files changed, 18 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Fri Jul 13 14:30:24 2018 -0400
+++ b/libgui/src/documentation.cc	Fri Jul 13 14:32:23 2018 -0400
@@ -312,11 +312,11 @@
             QList< QPair<QString, QString> > res
               = search_engine->hits (0, search_engine->hitCount ());
 #endif
-            
+
             if (res.count ())
               {
                 QUrl url;
-                
+
                 if (res.count () == 1)
 #if defined (HAVE_QHELPSEARCHQUERYWIDGET_SEARCHINPUT)
                   url = res.front ().url ();
@@ -327,7 +327,7 @@
                   {
                     // Remove the quotes we added
                     QString search_string = m_internal_search;
-                    
+
                     for (auto r = res.begin (); r != res.end (); r++)
                       {
 #if defined (HAVE_QHELPSEARCHQUERYWIDGET_SEARCHINPUT)
@@ -348,7 +348,6 @@
                               url = tmpurl;
                           }
                       }
-                          
                   }
 
                 if (! url.isEmpty ())
@@ -356,16 +355,16 @@
                     connect (this, SIGNAL (show_single_result (const QUrl)),
                              m_doc_browser,
                              SLOT (handle_index_clicked (const QUrl)));
-                    
+
                     emit show_single_result (url);
                   }
               }
            }
-           m_internal_search = QString ();
+
+        m_internal_search = QString ();
       }
 
     qApp->restoreOverrideCursor();
-    
   }
 
   void documentation::notice_settings (const QSettings *)
@@ -389,13 +388,13 @@
     // First search in the function index
     QMap<QString, QUrl> found_links
       = m_help_engine->linksForIdentifier (ref_name);
-    
+
     QTabWidget *navi = static_cast<QTabWidget*> (widget (0));
-    
+
     if (found_links.count() > 0)
       {
         m_doc_browser->setSource (found_links.constBegin().value());
-        
+
         // Switch to function index tab
         m_help_engine->indexWidget()->filterIndices (ref_name);
         QWidget *index_tab
@@ -405,7 +404,7 @@
     else
       {
         // Use full text search to provide the best match
-        QHelpSearchEngine *search_engine = m_help_engine->searchEngine ();      
+        QHelpSearchEngine *search_engine = m_help_engine->searchEngine ();
         QHelpSearchQueryWidget *search_query = search_engine->queryWidget ();
 
 #if defined (HAVE_QHELPSEARCHQUERYWIDGET_SEARCHINPUT)
@@ -429,7 +428,6 @@
           = navi->findChild<QWidget*> ("documentation_tab_search");
         navi->setCurrentWidget (search_tab);
       }
-    
   }
 
   void documentation::filter_update (const QString& expression)
@@ -569,5 +567,4 @@
     else
       return QTextBrowser::loadResource(type, url);
   }
-
 }
--- a/libgui/src/documentation.h	Fri Jul 13 14:30:24 2018 -0400
+++ b/libgui/src/documentation.h	Fri Jul 13 14:32:23 2018 -0400
@@ -54,7 +54,6 @@
   private:
 
     QHelpEngine *m_help_engine;
-
   };
 
 
@@ -94,8 +93,9 @@
     void handle_cursor_position_change (void);
 
   signals:
+
     void show_single_result (const QUrl);
-    
+
   private:
 
     QHelpEngine *m_help_engine;
@@ -109,7 +109,6 @@
     QShortcut *m_findnext_shortcut;
     QShortcut *m_findprev_shortcut;
   };
-
 }
 
 #endif
--- a/liboctave/system/lo-sysdep.cc	Fri Jul 13 14:30:24 2018 -0400
+++ b/liboctave/system/lo-sysdep.cc	Fri Jul 13 14:32:23 2018 -0400
@@ -97,7 +97,7 @@
       // Find first file in directory.
       HANDLE hFind = FindFirstFileW (u8_to_wstring (path_name).c_str (),
                               &ffd);
-      if (INVALID_HANDLE_VALUE == hFind) 
+      if (INVALID_HANDLE_VALUE == hFind)
         {
           DWORD errCode = GetLastError ();
           char *errorText;
@@ -207,7 +207,7 @@
       // of the character encoding we are using.
 
       // 1. Check whether filename contains non-ASCII (UTF-8) characters
-      std::string::const_iterator first_non_ASCII = 
+      std::string::const_iterator first_non_ASCII =
                 std::find_if (orig_file_name.begin (), orig_file_name.end (),
                 [](char c){return (c < 0 || c >= 128);});
       if (first_non_ASCII == orig_file_name.end ())
@@ -218,11 +218,11 @@
       // get short filename (8.3) from UTF-16 filename
       long length = GetShortPathNameW (w_orig_file_name, NULL, 0);
 
-      // Dynamically allocate the correct size 
+      // Dynamically allocate the correct size
       // (terminating null char was included in length)
       wchar_t *w_short_file_name = new wchar_t[length];
       length = GetShortPathNameW (w_orig_file_name, w_short_file_name, length);
- 
+
       std::string short_file_name = u8_from_wstring (std::wstring (w_short_file_name));
 
       if (short_file_name.compare (orig_file_name) != 0)
@@ -233,7 +233,7 @@
       size_t pos = (std::string (orig_file_name.begin (), first_non_ASCII)).
                         find_last_of (octave::sys::file_ops::dir_sep_chars ());
       std::string par_dir = orig_file_name.substr (0, pos+1);
-      
+
       // create .oct_ascii directory
       // FIXME: We need to have write permission in this location.
       std::string oct_ascii_dir = par_dir + ".oct_ascii";
--- a/liboctave/wrappers/unistd-wrappers.c	Fri Jul 13 14:30:24 2018 -0400
+++ b/liboctave/wrappers/unistd-wrappers.c	Fri Jul 13 14:32:23 2018 -0400
@@ -306,7 +306,7 @@
     {
       if (strlen (retval) > len)
         return NULL;
-      
+
       memcpy (nm, retval, len);
       free (retval);
       return nm;