chiark
/
gitweb
/
~mdw
/
mm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a86904
)
Various small whitespace cleanups.
author
Mark Wooding
<mdw@distorted.org.uk>
Sun, 12 Mar 2006 17:02:29 +0000
(17:02 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sun, 12 Mar 2006 17:02:29 +0000
(17:02 +0000)
mm.c
patch
|
blob
|
blame
|
history
diff --git
a/mm.c
b/mm.c
index e25f5d44261bcbd8975ae2000c9154800c9890eb..df6899206b4793b3bf9fab0f6c58a748ea67f52d 100644
(file)
--- a/
mm.c
+++ b/
mm.c
@@
-115,6
+115,7
@@
static void rate_init(ratectx *r, const dig *s)
static ratectx *rate_new(const mm *m, const dig *s)
{
ratectx *r = rate_alloc(m);
static ratectx *rate_new(const mm *m, const dig *s)
{
ratectx *r = rate_alloc(m);
+
rate_init(r, s);
return (r);
}
rate_init(r, s);
return (r);
}
@@
-144,11
+145,7
@@
static void rate(const ratectx *r, const dig *g, unsigned *b, unsigned *w)
*w = ww;
}
*w = ww;
}
-static void rate_free(ratectx *r)
-{
- xfree(r->v);
- DESTROY(r);
-}
+static void rate_free(ratectx *r) { xfree(r->v); DESTROY(r); }
/*----- Computer player ---------------------------------------------------*/
/*----- Computer player ---------------------------------------------------*/
@@
-222,6
+219,7
@@
static void foreach_proto(cpc *c, void (*fn)(cpc *c,
unsigned x))
{
unsigned k = c->m.k, n = c->m.n;
unsigned x))
{
unsigned k = c->m.k, n = c->m.n;
+
dofep(c, fn, k, n, 0, c->x);
}
dofep(c, fn, k, n, 0, c->x);
}
@@
-351,9
+349,7
@@
static void cpc_free(cpc *c)
}
static void cp_rate(void *r, const dig *g, unsigned *b, unsigned *w)
}
static void cp_rate(void *r, const dig *g, unsigned *b, unsigned *w)
-{
- rate(r, g, b, w);
-}
+ { rate(r, g, b, w); }
static const dig *cp_guess(void *cc)
{
static const dig *cp_guess(void *cc)
{
@@
-497,10
+493,7
@@
again:
}
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)
-{
- spc *s = ss;
- cp_update(s->c, g, b, w);
-}
+ { spc *s = ss; cp_update(s->c, g, b, w); }
/*----- Main game logic ---------------------------------------------------*/
/*----- Main game logic ---------------------------------------------------*/