From 005dbdc2bead1b0f265e9421cc94ecb52d0109bf Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 26 Dec 2023 16:40:53 +0100 Subject: Reformatted ExplainFormula() --- FICS/formula.c | 35 ++++++++++++++++++----------------- 1 file 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; + } } /* -- cgit v1.2.3