diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 13:21:41 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 13:21:41 +0100 |
commit | 7ff43967bd7748b611f3eb44cf9707a445e3de9d (patch) | |
tree | 6aa0aed36233c6ba26dfb0b6f840530ee90102c5 /FICS | |
parent | e971eb6745177f3d5b626e2387d74cb712c24e0f (diff) |
Reformatted SaveThisMsg()
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/playerdb.c | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index a51dbb4..d68a3a4 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1994,24 +1994,29 @@ PUBLIC void ClearTextList(textlist *head) for (cur = head; cur != NULL; cur = ClearTextListEntry(cur)); } -/* if which=0 load all messages; if it's (p1+1) load messages only from - p1; if it's -(p1+1) load all messages EXCEPT those from p1. */ -PRIVATE int SaveThisMsg (int which, char *line) +/* + * if which = 0 load all messages; + * if it's (p1 + 1) load messages only from p1; + * if it's -(p1 + 1) load all messages EXCEPT those from p1. + */ +PRIVATE int +SaveThisMsg(int which, char *line) { - char Sender[MAX_LOGIN_NAME]; - int p1; + char Sender[MAX_LOGIN_NAME]; + int p1; - if (which == 0) return 1; + if (which == 0) + return 1; - sscanf (line, "%s", Sender); - if (which < 0) { - p1 = -which - 1; - return strcmp(Sender, parray[p1].name); - } - else { - p1 = which - 1; - return !strcmp(Sender, parray[p1].name); - } + sscanf(line, "%s", Sender); + + if (which < 0) { + p1 = (-which) - 1; + return strcmp(Sender, parray[p1].name); + } + + p1 = (which - 1); + return !strcmp(Sender, parray[p1].name); } /* |