shithub: plan9front

Download patch

ref: 3c1022a3deee758ab1cac307a1b0b46e4a5d0d52
parent: 49d7ca8d92e5667f3e5ece4c6acbc1064701e2f8
parent: 3ff21a0e93cd4daa598333c67aff5483b998bb91
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Feb 2 10:21:47 EST 2021

merge

--- a/sys/games/lib/fortunes
+++ b/sys/games/lib/fortunes
@@ -5253,3 +5253,4 @@
 On the Internet, we are all Poland. -- Michael Hayden
 By the way, BBCNews site makes corrupt the browser. -- Kenji
 As much as I'd love to I feel I have to let it go -- rminnich
+You need a UNIX system to run SATAN.
--- a/sys/src/cmd/winwatch.c
+++ b/sys/src/cmd/winwatch.c
@@ -185,19 +185,21 @@
 int
 geometry(void)
 {
-	int i, ncols, z;
+	int i, nrows, ncols, z;
 	Rectangle r;
 
 	z = 0;
-	rows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD);
-	if(rows <= 0)
-		rows = 1;
-	if(rows*cols < nwin || rows*cols >= nwin*2){
-		ncols = nwin <= 0 ? 1 : (nwin+rows-1)/rows;
-		if(ncols != cols){
-			cols = ncols;
-			z = 1;
-		}
+	nrows = (Dy(screen->r)-2*MARGIN+PAD)/(font->height+PAD);
+	if(nrows <= 0)
+		nrows = 1;
+	if(nrows != rows){
+		rows = nrows;
+		z = 1;
+	}
+	ncols = nwin <= 0 ? 1 : (nwin+rows-1)/rows;
+	if(ncols != cols){
+		cols = ncols;
+		z = 1;
 	}
 
 	r = Rect(0,0,(Dx(screen->r)-2*MARGIN+PAD)/cols-PAD, font->height);