Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/worms 80 column police.



details:   https://anonhg.NetBSD.org/src/rev/a3e8e5e0eb2c
branches:  trunk
changeset: 374264:a3e8e5e0eb2c
user:      kre <kre%NetBSD.org@localhost>
date:      Sat Apr 15 13:40:23 2023 +0000

description:
80 column police.

If this code were just a few chars over the limit, it might get
let off with a warning, but 214 in an 80 zone is way beyond that.

Six months loss of coding licence, and a 214000 character fine.

NFCI.

(I verified the the code was unchanged by joining the resulting
lines back into one again, and then diff'ing that line against
the original - it is identical).

diffstat:

 games/worms/worms.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r 11a683556f58 -r a3e8e5e0eb2c games/worms/worms.c
--- a/games/worms/worms.c       Sat Apr 15 13:00:30 2023 +0000
+++ b/games/worms/worms.c       Sat Apr 15 13:40:23 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: worms.c,v 1.24 2023/04/15 13:00:30 kre Exp $   */
+/*     $NetBSD: worms.c,v 1.25 2023/04/15 13:40:23 kre Exp $   */
 
 /*
  * Copyright (c) 1980, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)worms.c    8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: worms.c,v 1.24 2023/04/15 13:00:30 kre Exp $");
+__RCSID("$NetBSD: worms.c,v 1.25 2023/04/15 13:40:23 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -313,7 +313,18 @@ main(int argc, char *argv[])
                                        mvaddch(y1, x1, trail);
                                }
                        }
-                       op = &(!x ? (!y ? upleft : (y == bottom ? lowleft : left)) : (x == last ? (!y ? upright : (y == bottom ? lowright : right)) : (!y ? upper : (y == bottom ? lower : 
normal))))[w->orientation];
+
+                       op = &(!x
+                               ? (!y
+                                   ? upleft
+                                   : (y == bottom ? lowleft : left))
+                               : (x == last
+                                   ? (!y ? upright
+                                         : (y == bottom ? lowright : right))
+                                   : (!y ? upper
+                                         : (y == bottom ? lower : normal)))
+                             )[w->orientation];
+
                        switch (op->nopts) {
                        case 0:
                                refresh();



Home | Main Index | Thread Index | Old Index