diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-26 16:40:53 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-26 16:40:53 +0100 |
commit | 005dbdc2bead1b0f265e9421cc94ecb52d0109bf (patch) | |
tree | efd198580022023b2287b1c27d6e3e98b44930b9 /FICS/formula.c | |
parent | 8fb54e5c695ae1fbc438f2097ab5ec4e71d61318 (diff) |
Reformatted ExplainFormula()
Diffstat (limited to 'FICS/formula.c')
-rw-r--r-- | FICS/formula.c | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/FICS/formula.c b/FICS/formula.c index 0a06026..516534b 100644 --- a/FICS/formula.c +++ b/FICS/formula.c @@ -462,24 +462,25 @@ PRIVATE int ChooseClauses(player *who, char *formula) return ret; } /* end of function ChooseClauses. */ -void ExplainFormula (game *g, textlist **clauses) +void +ExplainFormula(game *g, textlist **clauses) { - int i, which, dummy_index, value; - char txt[20]; - player *challenged = &parray[g->black]; - textlist **Cur = clauses; - - which = ChooseClauses(challenged, challenged->formula); - - for (i = 0; i < MAX_FORMULA; i++) { - if ((which & (1 << i)) == 0) - continue; - dummy_index = 0; - CheckFormula (g, i, &dummy_index, OPTYPE_NONE, &value, 1); - sprintf(txt, "%d", value); - SaveTextListEntry (Cur, txt, i); - Cur = &(*Cur)->next; - } + char txt[20]; + int i, which, dummy_index, value; + player *challenged = &parray[g->black]; + textlist **Cur = clauses; + + which = ChooseClauses(challenged, challenged->formula); + + for (i = 0; i < MAX_FORMULA; i++) { + if ((which & (1 << i)) == 0) + continue; + dummy_index = 0; + CheckFormula(g, i, &dummy_index, OPTYPE_NONE, &value, 1); + sprintf(txt, "%d", value); + SaveTextListEntry(Cur, txt, i); + Cur = &(*Cur)->next; + } } /* |