diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-29 00:51:23 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-29 00:51:23 +0100 |
commit | 51529fdd67e0dd9f72d2d7a559b498c2ff6b0d3e (patch) | |
tree | 959ec818276ce82d90013db7d4206ad1c043e3d1 /FICS/playerdb.c | |
parent | e2be71861b32e4ef04bb79194dd7a7d4d939b0f6 (diff) |
Reformatted functions
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r-- | FICS/playerdb.c | 61 |
1 files changed, 32 insertions, 29 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index fad68b6..f01b5bf 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -2205,45 +2205,48 @@ ShowMsgsBySender(int p, param_list param) return (nFrom > 0 || nTo > 0); } -PUBLIC int ShowMsgRange (int p, int start, int end) +PUBLIC int +ShowMsgRange(int p, int start, int end) { - textlist *Head; - int n; + int n; + textlist *Head; - n = LoadMsgRange (p, start, end, &Head); - if (n > 0) { - ShowTextList (p, Head, 1); - ClearTextList (Head); - } - return n; + if ((n = LoadMsgRange(p, start, end, &Head)) > 0) { + ShowTextList(p, Head, 1); + ClearTextList(Head); + } + + return n; } -PUBLIC int ClrMsgRange (int p, int start, int end) +PUBLIC int +ClrMsgRange(int p, int start, int end) { - textlist *Head; - int n; + int n; + textlist *Head; - n = LoadMsgRange (p, -start, -end, &Head); - if (n > 0) { -/* You can use ShowTextList to see what's left after the real code. */ -/* ShowTextList (p, Head, 1); */ - if (WriteMsgFile (p, Head)) - pprintf (p, "Message %d cleared.\n", start); - } - if (n >= 0) - ClearTextList (Head); - return n; + n = LoadMsgRange(p, -start, -end, &Head); + + if (n > 0) { + if (WriteMsgFile(p, Head)) + pprintf(p, "Message %d cleared.\n", start); + } + + if (n >= 0) + ClearTextList(Head); + return n; } -PUBLIC int player_clear_messages(int p) +PUBLIC int +player_clear_messages(int p) { - char fname[MAX_FILENAME_SIZE]; + char fname[MAX_FILENAME_SIZE]; - if (!parray[p].registered) - return -1; - GetMsgFile (p, fname); - unlink(fname); - return 0; + if (!parray[p].registered) + return -1; + GetMsgFile(p, fname); + unlink(fname); + return 0; } /* |