[master] 3b40d7a - Fix trailing whitespace and formatting

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 3b40d7a - Fix trailing whitespace and formatting "Albrecht Schlosser" May 26, 2021 top right image
 
commit 3b40d7a07fe7ee57765e02459aef1c416aace01b
Author:     Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Wed May 26 22:01:35 2021 +0200
Commit:     Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Wed May 26 22:01:35 2021 +0200

    Fix trailing whitespace and formatting

 .../PostScript/Fl_PostScript_Graphics_Driver.H     |  2 +-
 src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx     | 32 +++++++++-------------
 src/drivers/X11/Fl_X11_System_Driver.cxx           |  4 +--
 3 files changed, 16 insertions(+), 22 deletions(-)

diff --git src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H
index 5c15e0e..84ac2e4 100644
--- src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H
+++ src/drivers/PostScript/Fl_PostScript_Graphics_Driver.H
@@ -48,7 +48,7 @@ public:
   enum Fl_Paged_Device::Page_Format page_format_;
   char *ps_filename_;
   int nPages;
-  
+
   Fl_PostScript_Graphics_Driver();
   ~Fl_PostScript_Graphics_Driver();
   void close_command(Fl_PostScript_Close_Command cmd){close_cmd_=cmd;};
diff --git src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
index 97a31cd..61e18d9 100644
--- src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
+++ src/drivers/WinAPI/Fl_WinAPI_System_Driver.cxx
@@ -149,8 +149,7 @@ static char *wchar_to_utf8(const wchar_t *wstr, char *&utf8) {
 
  This function must be implemented once for every platform.
  */
-Fl_System_Driver *Fl_System_Driver::newSystemDriver()
-{
+Fl_System_Driver *Fl_System_Driver::newSystemDriver() {
   return new Fl_WinAPI_System_Driver();
 }
 
@@ -159,7 +158,6 @@ void Fl_WinAPI_System_Driver::warning(const char *format, va_list args) {
 }
 
 void Fl_WinAPI_System_Driver::error(const char *format, va_list args) {
-
   char buf[1024];
   vsnprintf(buf, 1024, format, args);
   MessageBox(0, buf, "Error", MB_ICONEXCLAMATION | MB_SYSTEMMODAL);
@@ -358,8 +356,7 @@ unsigned Fl_WinAPI_System_Driver::utf8towc(const char *src, unsigned srclen, wch
   return fl_utf8toUtf16(src, srclen, (unsigned short*)dst, dstlen);
 }
 
-unsigned Fl_WinAPI_System_Driver::utf8fromwc(char *dst, unsigned dstlen, const wchar_t *src, unsigned srclen)
-{
+unsigned Fl_WinAPI_System_Driver::utf8fromwc(char *dst, unsigned dstlen, const wchar_t *src, unsigned srclen) {
   unsigned i = 0;
   unsigned count = 0;
   if (dstlen) for (;;) {
@@ -649,8 +646,7 @@ int Fl_WinAPI_System_Driver::filename_absolute(char *to, int tolen, const char *
   return 1;
 }
 
-int Fl_WinAPI_System_Driver::filename_isdir(const char *n)
-{
+int Fl_WinAPI_System_Driver::filename_isdir(const char *n) {
   char fn[4]; // used for drive letter only: "X:/"
   int length = (int)strlen(n);
   // Strip trailing slash from name...
@@ -677,8 +673,7 @@ int Fl_WinAPI_System_Driver::filename_isdir(const char *n)
   return (fa != INVALID_FILE_ATTRIBUTES) && (fa & FILE_ATTRIBUTE_DIRECTORY);
 }
 
-int Fl_WinAPI_System_Driver::filename_isdir_quick(const char *n)
-{
+int Fl_WinAPI_System_Driver::filename_isdir_quick(const char *n) {
   // Do a quick optimization for filenames with a trailing slash...
   if (*n && isdirsep(n[strlen(n) - 1])) return 1;
   return filename_isdir(n);
@@ -694,16 +689,15 @@ const char *Fl_WinAPI_System_Driver::filename_ext(const char *buf) {
   return q ? q : p;
 }
 
-int Fl_WinAPI_System_Driver::open_uri(const char *uri, char *msg, int msglen)
-{
+int Fl_WinAPI_System_Driver::open_uri(const char *uri, char *msg, int msglen) {
   if (msg) snprintf(msg, msglen, "open %s", uri);
   return (int)(ShellExecute(HWND_DESKTOP, "open", uri, NULL, NULL, SW_SHOW) > (void *)32);
 }
 
-int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser, char *filename, int lname, Fl_File_Icon *icon)
-{
+int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *browser, char *filename,
+                                                          int lname, Fl_File_Icon *icon) {
   int num_files = 0;
-#  ifdef __CYGWIN__
+# ifdef __CYGWIN__
   //
   // Cygwin provides an implementation of setmntent() to get the list
   // of available drives...
@@ -715,15 +709,14 @@ int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *brows
     num_files ++;
   }
   endmntent(m);
-#  else
+# else
   //
   // Normal Windows code uses drive bits...
   //
   DWORD drives;         // Drive available bits
   drives = GetLogicalDrives();
-  for (int i = 'A'; i <= 'Z'; i ++, drives >>= 1)
-    if (drives & 1)
-    {
+  for (int i = 'A'; i <= 'Z'; i ++, drives >>= 1) {
+    if (drives & 1) {
       sprintf(filename, "%c:/", i);
       if (i < 'C') // see also: GetDriveType and GetVolumeInformation in Windows
         browser->add(filename, icon);
@@ -731,7 +724,8 @@ int Fl_WinAPI_System_Driver::file_browser_load_filesystem(Fl_File_Browser *brows
         browser->add(filename, icon);
       num_files ++;
     }
-#  endif // __CYGWIN__
+  }
+# endif // __CYGWIN__
   return num_files;
 }
 
diff --git src/drivers/X11/Fl_X11_System_Driver.cxx src/drivers/X11/Fl_X11_System_Driver.cxx
index 100a72e..405be9e 100644
--- src/drivers/X11/Fl_X11_System_Driver.cxx
+++ src/drivers/X11/Fl_X11_System_Driver.cxx
@@ -633,10 +633,10 @@ void Fl_X11_System_Driver::make_transient(void *ptr_gtk, void *gtkw_window, Fl_W
 
   typedef Window (*gdk_to_X11_t)(GdkWindow*);
   static gdk_to_X11_t fl_gdk_to_X11 = NULL;
-  
+
   typedef GdkWindow* (*XX_gtk_widget_get_window)(GtkWidget *);
   static XX_gtk_widget_get_window fl_gtk_widget_get_window = NULL;
-  
+
   if (!fl_gdk_to_X11) {
     fl_gdk_to_X11 = (gdk_to_X11_t)dlsym(ptr_gtk, "gdk_x11_drawable_get_xid");
     if (!fl_gdk_to_X11) fl_gdk_to_X11 = (gdk_to_X11_t)dlsym(ptr_gtk, "gdk_x11_window_get_xid");
Direct Link to Message ]
 
bottom left image   bottom right image
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.