chiark / gitweb /
mm.c: Whitespace cleanup.
authorMark Wooding <mdw@distorted.org.uk>
Tue, 4 Sep 2018 11:40:18 +0000 (12:40 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Tue, 4 Sep 2018 11:40:18 +0000 (12:40 +0100)
mm.c

diff --git a/mm.c b/mm.c
index 7ed9b16ff0ca1bddd5ea28370d259f99b714f1a3..e8922e868ea6993e4622177bec0bef72b0e37fbd 100644 (file)
--- a/mm.c
+++ b/mm.c
@@ -1,13 +1,11 @@
 /* -*-c-*-
 /* -*-c-*-
- *
- * $Id$
  *
  * Simple mastermind game
  *
  * (c) 2006 Mark Wooding
  */
 
  *
  * Simple mastermind game
  *
  * (c) 2006 Mark Wooding
  */
 
-/*----- Licensing notice --------------------------------------------------* 
+/*----- Licensing notice --------------------------------------------------*
  *
  * This file is part of mm: a simple Mastermind game.
  *
  *
  * This file is part of mm: a simple Mastermind game.
  *
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * mm is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  * mm is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with mm; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  * You should have received a copy of the GNU General Public License
  * along with mm; if not, write to the Free Software Foundation,
  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
@@ -221,7 +219,7 @@ static void dofep(cpc *c, void (*fn)(cpc *c, const dig *g, unsigned x),
 static void foreach_proto(cpc *c, void (*fn)(cpc *c,
                                             const dig *g,
                                             unsigned x))
 static void foreach_proto(cpc *c, void (*fn)(cpc *c,
                                             const dig *g,
                                             unsigned x))
-{ 
+{
   unsigned k = c->m.k, n = c->m.n;
 
   dofep(c, fn, k, n, 0, c->x);
   unsigned k = c->m.k, n = c->m.n;
 
   dofep(c, fn, k, n, 0, c->x);
@@ -507,7 +505,7 @@ again:
     scanf("%u", &x);
     h->t[i] = x;
   }
     scanf("%u", &x);
     h->t[i] = x;
   }
-  return (h->t);    
+  return (h->t);
 }
 
 static void sp_update(void *ss, const dig *g, unsigned b, unsigned w)
 }
 
 static void sp_update(void *ss, const dig *g, unsigned b, unsigned w)
@@ -541,7 +539,7 @@ static void dorunone(allstats *a, dig *s)
     fputs(": ", stdout);
     fflush(stdout);
   }
     fputs(": ", stdout);
     fflush(stdout);
   }
-    
+
   c = cpc_new(a->m, CPCF_QUIET);
   for (;;) {
     t0 = clock();
   c = cpc_new(a->m, CPCF_QUIET);
   for (;;) {
     t0 = clock();
@@ -556,7 +554,7 @@ static void dorunone(allstats *a, dig *s)
     t0 = clock();
     cp_update(c, g, b, w);
     t1 = clock();
     t0 = clock();
     cp_update(c, g, b, w);
     t1 = clock();
-    t += t1 - t0;    
+    t += t1 - t0;
   }
   a->t += t;
   a->g += n;
   }
   a->t += t;
   a->g += n;
@@ -702,7 +700,7 @@ int main(int argc, char *argv[])
     } break;
     case 0: {
       cpc *cc = cpc_new(&m, 0);
     } break;
     case 0: {
       cpc *cc = cpc_new(&m, 0);
-      if (rr) 
+      if (rr)
        n = play(&m, ratefn, rr, cp_guess, cp_update, cc);
       else
        n = play(&m, hp_rate, &m, cp_guess, cp_update, cc);
        n = play(&m, ratefn, rr, cp_guess, cp_update, cc);
       else
        n = play(&m, hp_rate, &m, cp_guess, cp_update, cc);