From: Mark Wooding Date: Tue, 4 Sep 2018 11:40:18 +0000 (+0100) Subject: mm.c: Whitespace cleanup. X-Git-Tag: 0.9.0-dev~1 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mm/commitdiff_plain/1c91cf29eaa87b976a7c16824833a4701e6c316c?hp=4688add4e314f3c3c6092950e7bee28307be672c mm.c: Whitespace cleanup. --- diff --git a/mm.c b/mm.c index 7ed9b16..e8922e8 100644 --- a/mm.c +++ b/mm.c @@ -1,13 +1,11 @@ /* -*-c-*- - * - * $Id$ * * Simple mastermind game * * (c) 2006 Mark Wooding */ -/*----- Licensing notice --------------------------------------------------* +/*----- Licensing notice --------------------------------------------------* * * This file is part of mm: a simple Mastermind game. * @@ -15,12 +13,12 @@ * 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. - * + * * 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)) -{ +{ 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; } - return (h->t); + return (h->t); } 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); } - + 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(); - t += t1 - t0; + t += t1 - t0; } 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); - 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);