1
#!/bin/sh /usr/share/dpatch/dpatch-run
2
## 03-parantheses-warnings.dpatch by Patrick Matthäi <patrick.matthaei@web.de>
4
## DP: This patch adds some parantheses in the code to avoid some compiler
9
diff -Naur flwm-1.02+cvs20080422.orig/Frame.C flwm-1.02+cvs20080422/Frame.C
10
--- flwm-1.02+cvs20080422.orig/Frame.C 2008-05-14 14:40:28.000000000 +0200
11
+++ flwm-1.02+cvs20080422/Frame.C 2008-05-14 14:43:34.000000000 +0200
13
// preserving stacking order:
14
for (p = &first; *p;) {
16
- if (f == this || f->is_transient_for(this) && f->state() != UNMAPPED) {
17
+ if (f == this || (f->is_transient_for(this) && f->state() != UNMAPPED)) {
18
*p = f->next; // remove it from list
23
void Frame::iconize() {
24
for (Frame* c = first; c; c = c->next) {
25
- if (c == this || c->is_transient_for(this) && c->state() != UNMAPPED)
26
+ if (c == this || (c->is_transient_for(this) && c->state() != UNMAPPED))
33
if (min_h == max_h || flag(KEEP_ASPECT|NO_RESIZE) ||
34
- !max_h_button.value() && by+label_w+2*BUTTON_H > h()-BUTTON_BOTTOM) {
35
+ (!max_h_button.value() && by+label_w+2*BUTTON_H > h()-BUTTON_BOTTOM)) {
38
max_h_button.position(BUTTON_LEFT,by);
42
if (min_w == max_w || flag(KEEP_ASPECT|NO_RESIZE) ||
43
- !max_w_button.value() && by+label_w+2*BUTTON_H > h()-BUTTON_BOTTOM) {
44
+ (!max_w_button.value() && by+label_w+2*BUTTON_H > h()-BUTTON_BOTTOM)) {
47
max_w_button.position(BUTTON_LEFT,by);
49
nh = iy+ih-(Fl::event_y_root()-dy);
50
else {ny = y(); nh = h();}
51
if (flag(KEEP_ASPECT)) {
52
- if (nw-dwidth > nh-dwidth
53
- && (what&(FL_ALIGN_LEFT|FL_ALIGN_RIGHT))
54
+ if ((nw-dwidth > nh-dwidth
55
+ && (what&(FL_ALIGN_LEFT|FL_ALIGN_RIGHT)))
56
|| !(what&(FL_ALIGN_TOP|FL_ALIGN_BOTTOM)))
57
nh = nw-dwidth+dheight;
59
diff -Naur flwm-1.02+cvs20080422.orig/Hotkeys.C flwm-1.02+cvs20080422/Hotkeys.C
60
--- flwm-1.02+cvs20080422.orig/Hotkeys.C 2008-05-14 14:40:28.000000000 +0200
61
+++ flwm-1.02+cvs20080422/Hotkeys.C 2008-05-14 14:46:58.000000000 +0200
64
for (int i = 0; keybindings[i].key; i++) {
65
if (Fl::test_shortcut(keybindings[i].key) ||
66
- (keybindings[i].key & 0xFFFF) == FL_Delete
67
- && Fl::event_key() == FL_BackSpace// fltk bug?
68
+ ((keybindings[i].key & 0xFFFF) == FL_Delete
69
+ && Fl::event_key() == FL_BackSpace)// fltk bug?
71
keybindings[i].func();
73
diff -Naur flwm-1.02+cvs20080422.orig/Menu.C flwm-1.02+cvs20080422/Menu.C
74
--- flwm-1.02+cvs20080422.orig/Menu.C 2008-05-14 14:40:28.000000000 +0200
75
+++ flwm-1.02+cvs20080422/Menu.C 2008-05-14 14:45:50.000000000 +0200
77
if (d == Desktop::current()) first_on_desk = menu+n;
78
for (c = Frame::first; c; c = c->next) {
79
if (c->state() == UNMAPPED || c->transient_for()) continue;
80
- if (c->desktop() == d || !c->desktop() && d == Desktop::current()) {
81
+ if (c->desktop() == d || (!c->desktop() && d == Desktop::current())) {
82
init(menu[n],(char*)c);
83
#if FL_MAJOR_VERSION < 2
84
init(menu[n],(char*)c);