blob: cbf49e41c364354275a229febee607c4509d422d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
--- src/screen.c.orig 2002-11-03 17:35:17.000000000 -0600
+++ src/screen.c 2002-11-03 17:36:41.000000000 -0600
@@ -1552,10 +1552,27 @@
if (rows <= 0 && cols <= 0)
cols = num_workspaces;
- if (rows <= 0)
- rows = num_workspaces / cols + ((num_workspaces % cols) > 0 ? 1 : 0);
- if (cols <= 0)
- cols = num_workspaces / rows + ((num_workspaces % rows) > 0 ? 1 : 0);
+ if (rows <= 0) {
+ /* fix PPC compile issue
+ * ICE occurs using embedded macro in calculation, split
+ * into if statements
+ */
+ if ((num_workspaces % cols) > 0) {
+ rows = num_workspaces / cols + 1;
+ } else {
+ rows = num_workspaces / cols;
+ }
+ }
+ if (cols <= 0) {
+ /* another fix for PPC compile issue */
+ if ((num_workspaces % rows) > 0) {
+ cols = num_workspaces / rows + 1;
+ } else {
+ cols = num_workspaces / rows;
+ }
+ }
+
+
/* paranoia */
if (rows < 1)
@@ -1563,8 +1580,8 @@
if (cols < 1)
cols = 1;
- *r = rows;
- *c = cols;
+ r[0] = rows;
+ c[0] = cols;
}
static void
|