aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-29 01:13:32 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-29 01:13:32 +0100
commit879ab52d0bc65747a41d27a0c3cb07717d614715 (patch)
tree6bcc9bddfa79eb8ab5b235032e3de2b7351ad9af /FICS/playerdb.c
parent51529fdd67e0dd9f72d2d7a559b498c2ff6b0d3e (diff)
Reformatted functions
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c48
1 files 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