From 8aed61dadfb0b8f5e6ea8d25705a63c90671803f Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 24 Mar 2024 00:33:10 +0100 Subject: Reformatted com_pending() --- FICS/matchproc.c | 53 +++++++++++++++++++++++++++++++---------------------- 1 file changed, 31 insertions(+), 22 deletions(-) (limited to 'FICS/matchproc.c') diff --git a/FICS/matchproc.c b/FICS/matchproc.c index 6e7a4c9..d52fbd5 100644 --- a/FICS/matchproc.c +++ b/FICS/matchproc.c @@ -1093,28 +1093,37 @@ PUBLIC int com_withdraw(int p, param_list param) return COM_OK; } -PUBLIC int com_pending(int p, param_list param) +PUBLIC int +com_pending(int p, param_list param) { - int i; + int i; - if (!parray[p].num_to) { - pprintf(p, "There are no offers pending TO other players.\n"); - } else { - pprintf(p, "Offers TO other players:\n"); - for (i = 0; i < parray[p].num_to; i++) { - pprintf(p, " "); - player_pend_print(p, &parray[p].p_to_list[i]); - } - } - if (!parray[p].num_from) { - pprintf(p, "\nThere are no offers pending FROM other players.\n"); - } else { - pprintf(p, "\nOffers FROM other players:\n"); - for (i = 0; i < parray[p].num_from; i++) { - pprintf(p, " %d: ", i + 1); - player_pend_print(p, &parray[p].p_from_list[i]); - } - pprintf(p, "\nIf you wish to accept any of these offers type 'accept n'\nor just 'accept' if there is only one offer.\n"); - } - return COM_OK; + if (!parray[p].num_to) { + pprintf(p, "There are no offers pending TO other players.\n"); + } else { + pprintf(p, "Offers TO other players:\n"); + + for (i = 0; i < parray[p].num_to; i++) { + pprintf(p, " "); + player_pend_print(p, &parray[p].p_to_list[i]); + } + } + + if (!parray[p].num_from) { + pprintf(p, "\nThere are no offers pending FROM other players." + "\n"); + } else { + pprintf(p, "\nOffers FROM other players:\n"); + + for (i = 0; i < parray[p].num_from; i++) { + pprintf(p, " %d: ", i + 1); + player_pend_print(p, &parray[p].p_from_list[i]); + } + + pprintf(p, "\nIf you wish to accept any of these offers type " + "'accept n'\nor just 'accept' if there is only one offer." + "\n"); + } + + return COM_OK; } -- cgit v1.2.3