From 879ab52d0bc65747a41d27a0c3cb07717d614715 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Fri, 29 Dec 2023 01:13:32 +0100 Subject: Reformatted functions --- FICS/playerdb.c | 48 +++++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/FICS/playerdb.c b/FICS/playerdb.c index f01b5bf..a27c84b 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -2131,35 +2131,37 @@ PUBLIC int ClearMsgsBySender(int p, param_list param) return nFound; } -PRIVATE void ShowTextList (int p, textlist *Head, int ShowIndex) +PRIVATE void +ShowTextList(int p, textlist *Head, int ShowIndex) { - textlist *CurMsg; + textlist *CurMsg; - if (ShowIndex) { - for (CurMsg = Head; CurMsg != NULL; CurMsg = CurMsg->next) - pprintf(p, "%2d. %s", CurMsg->index, CurMsg->text); - } - else { - for (CurMsg = Head; CurMsg != NULL; CurMsg = CurMsg->next) - pprintf(p, "%s", CurMsg->text); - } + if (ShowIndex) { + for (CurMsg = Head; CurMsg != NULL; CurMsg = CurMsg->next) + pprintf(p, "%2d. %s", CurMsg->index, CurMsg->text); + } else { + for (CurMsg = Head; CurMsg != NULL; CurMsg = CurMsg->next) + pprintf(p, "%s", CurMsg->text); + } } -PUBLIC int player_show_messages(int p) +PUBLIC int +player_show_messages(int p) { - textlist *Head; - int n; + int n; + textlist *Head; - n = LoadMsgs (p, 0, &Head); - if (n <= 0) { - pprintf (p, "You have no messages.\n"); - return -1; - } else { - pprintf (p, "Messages:\n"); - ShowTextList (p, Head, 1); - ClearTextList (Head); - return 0; - } + n = LoadMsgs (p, 0, &Head); + + if (n <= 0) { + pprintf(p, "You have no messages.\n"); + return -1; + } else { + pprintf(p, "Messages:\n"); + ShowTextList(p, Head, 1); + ClearTextList(Head); + return 0; + } } PUBLIC int -- cgit v1.2.3