summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-11-17 16:11:03 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-11-17 16:11:03 +0100
commit5cb72ef065f53d8f8759a6b6cccd35a2f367f290 (patch)
tree31c76e99f59639c2ca2a9443c4e5806cd163726c
parent2931c29689a91375e610a6a8bca28fe2b10b268f (diff)
Fix whitespace and minor formatting issues
-rw-r--r--FL/Fl_PostScript.H2
-rw-r--r--fluid/StyleParse.cxx2
-rw-r--r--fluid/alignment_panel.fl4
-rw-r--r--fluid/factory.cxx21
-rw-r--r--src/Fl_cocoa.mm2
-rw-r--r--src/drivers/PostScript/Fl_PostScript.cxx10
-rw-r--r--src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx4
7 files changed, 20 insertions, 25 deletions
diff --git a/FL/Fl_PostScript.H b/FL/Fl_PostScript.H
index 7b2b3ac8e..fbef51251 100644
--- a/FL/Fl_PostScript.H
+++ b/FL/Fl_PostScript.H
@@ -68,7 +68,7 @@ class Fl_PostScript_Graphics_Driver;
<tr><td>‘</td><td>U+2018</td><td>quoteleft</td><td>/</td><td>U+2044</td><td>fraction</td><td>fl</td><td>U+FB02</td><td>fl</td></tr>
<tr><td>’</td><td>U+2019</td><td>quoteright</td><td>€</td><td>U+20AC</td><td>Euro</td><td></td><td>U+F8FF</td><td>apple (Mac OS only)</td></tr>
</table>
-
+
*/
class FL_EXPORT Fl_PostScript_File_Device : public Fl_Paged_Device {
protected:
diff --git a/fluid/StyleParse.cxx b/fluid/StyleParse.cxx
index abbb33fcf..5d0dd5e5d 100644
--- a/fluid/StyleParse.cxx
+++ b/fluid/StyleParse.cxx
@@ -206,7 +206,7 @@ void StyleParse::buffer_keyword() {
char *key = keyword;
char *kend = key + sizeof(keyword) - 1; // end of buffer
for ( const char *s=tbuff;
- (islower(*s) || *s=='_') && (key < kend);
+ (islower(*s) || *s=='_') && (key < kend);
*key++ = *s++ ) { }
*key = 0; // terminate
}
diff --git a/fluid/alignment_panel.fl b/fluid/alignment_panel.fl
index 588b27c9a..cb9b1112f 100644
--- a/fluid/alignment_panel.fl
+++ b/fluid/alignment_panel.fl
@@ -764,7 +764,7 @@ Default is on.} xywh {245 366 100 25} down_box BORDER_BOX
}
}
}
-
+
Fl_Group {} {
label {Scaling Factor Options} open
xywh {10 421 380 66} box GTK_DOWN_BOX labelfont 2 align 21
@@ -797,7 +797,7 @@ Default is on.} xywh {245 442 100 25} down_box BORDER_BOX
}
}
}
-
+
Fl_Choice wUserOrSystem {
callback {refreshUI();} open
tooltip {Change settings for the current user, or default values for all users of this computer. Individual users can override system options, if they set their options to specific values (not 'default').} xywh {10 496 141 25} down_box BORDER_BOX
diff --git a/fluid/factory.cxx b/fluid/factory.cxx
index 23f903498..72ad7737c 100644
--- a/fluid/factory.cxx
+++ b/fluid/factory.cxx
@@ -188,8 +188,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@@ -236,8 +235,7 @@ public:
w -= Fl::box_dw(o->box()) - fl_height();
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@@ -311,8 +309,7 @@ public:
w -= Fl::box_dw(o->box()) + fl_height();
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@@ -403,7 +400,8 @@ public:
virtual const char *alt_type_name() {return "fltk::Spinner";}
int is_spinner() const { return 1; }
Fl_Widget *widget(int x,int y,int w,int h) {
- return new Fl_Spinner(x,y,w,h,"spinner:");}
+ return new Fl_Spinner(x,y,w,h,"spinner:");
+ }
Fl_Widget_Type *_make() {return new Fl_Spinner_Type();}
};
static Fl_Spinner_Type Fl_Spinner_type;
@@ -532,8 +530,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@@ -574,8 +571,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
@@ -654,8 +650,7 @@ public:
w -= Fl::box_dw(o->box());
int ww = (int)fl_width('m');
w = ((w + ww - 1) / ww) * ww + Fl::box_dw(o->box());
- h = ((h + fl_height() - 1) / fl_height()) * fl_height() +
- Fl::box_dh(o->box());
+ h = ((h + fl_height() - 1) / fl_height()) * fl_height() + Fl::box_dh(o->box());
if (h < 30) h = 30;
if (w < 50) w = 50;
}
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index def25c8bf..800041c8a 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -4366,7 +4366,7 @@ void Fl_Cocoa_Window_Driver::draw_titlebar_to_context(CGContextRef gc, int w, in
{
FLWindow *nswin = fl_xid(pWindow);
[nswin makeMainWindow];
- [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
+ [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:nil inMode:NSDefaultRunLoopMode dequeue:NO];
CGImageRef img;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
if (fl_mac_os_version >= 100600) { // verified OK from 10.6
diff --git a/src/drivers/PostScript/Fl_PostScript.cxx b/src/drivers/PostScript/Fl_PostScript.cxx
index 755185ec8..15b66563a 100644
--- a/src/drivers/PostScript/Fl_PostScript.cxx
+++ b/src/drivers/PostScript/Fl_PostScript.cxx
@@ -1622,7 +1622,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
if(dashes){
if(dashes != linedash_)
strcpy(linedash_,dashes);
-
+
} else
linedash_[0]=0;
char width0 = 0;
@@ -1631,10 +1631,10 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
width0=1;
}
cairo_set_line_width(cairo_, width);
-
+
if(!style && (!dashes || !(*dashes)) && width0) //system lines
style = FL_CAP_SQUARE;
-
+
int cap = (style &0xf00);
cairo_line_cap_t c_cap;
if (cap == FL_CAP_SQUARE) c_cap = CAIRO_LINE_CAP_SQUARE;
@@ -1642,7 +1642,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
else if (cap == FL_CAP_ROUND) c_cap = CAIRO_LINE_CAP_ROUND;
else c_cap = CAIRO_LINE_CAP_BUTT;
cairo_set_line_cap(cairo_, c_cap);
-
+
int join = (style & 0xf000);
cairo_line_join_t c_join;
if (join == FL_JOIN_MITER) c_join = CAIRO_LINE_JOIN_MITER;
@@ -1650,7 +1650,7 @@ void Fl_PostScript_Graphics_Driver::line_style(int style, int width, char* dashe
else if (join == FL_JOIN_BEVEL) c_join = CAIRO_LINE_JOIN_BEVEL;
else c_join = CAIRO_LINE_JOIN_MITER;
cairo_set_line_join(cairo_, c_join);
-
+
double *ddashes = NULL;
int l = 0;
if (dashes && *dashes){
diff --git a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
index 873e76a4c..440bf2762 100644
--- a/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
+++ b/src/drivers/WinAPI/Fl_WinAPI_Screen_Driver.cxx
@@ -504,7 +504,7 @@ Fl_WinAPI_Screen_Driver::read_win_rectangle(
Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y, int w, int h, Fl_Window *win)
{
// Depth of image is always 3 here
-
+
// Grab all of the pixels in the image...
// Assure that we are not trying to read non-existing data. If it is so, the
@@ -528,7 +528,7 @@ Fl_RGB_Image *Fl_WinAPI_Screen_Driver::read_win_rectangle_unscaled(int X, int Y,
}
if (h < 1 || w < 1) return 0; // nothing to copy
-
+
// Allocate and initialize the image data array
size_t arraySize = ((size_t)w * h) * 3;
uchar *p = new uchar[arraySize];