]> git.pond.sub.org Git - empserver/blobdiff - src/lib/commands/head.c
Update copyright notice
[empserver] / src / lib / commands / head.c
index faa0d3a075d6b7cbe548b015ddd005b6d9dbf796..00ce25cce9f1a1ddc2258f0027cdb843e90b2617 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
@@ -27,7 +27,7 @@
  *  head.c: Print headlines of the Empire News
  *
  *  Known contributors to this file:
- *
+ *     Markus Armbruster, 2006-2013
  */
 
 #include <config.h>
@@ -137,18 +137,10 @@ head_printscoop(struct histstr (*hist)[MAXNOC], natid ano, natid vno)
 static char *
 head_meanwhile(int val)
 {
-    switch (val & 03) {
-    case 0:
-       return "Meanwhile";
-    case 1:
-       return "On the other hand";
-    case 2:
-       return "At the same time";
-    case 3:
-       return "Although";
-    }
-    /*NOTREACHED*/
-    return "";
+    static char *meanwhile[4] = {
+       "Meanwhile", "On the other hand", "At the same time", "Although"
+    };
+    return meanwhile[val % 4];
 }
 
 static void
@@ -164,7 +156,7 @@ head_describe(struct histstr *hp, int what, char *aname, char *vname)
        break;
     case 1:
        if (hp->h_recent < -16)
-           pr("%s agression against %s has lessened slightly",
+           pr("%s aggression against %s has lessened slightly",
               aname, vname);
        else
            pr("Peace talks may occur between %s & %s", aname, vname);