aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-15 00:01:17 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-15 00:01:17 +0100
commit70720a559069755781e5ca89b5118ac83aa5e7a4 (patch)
tree2399857c97696617cc0fc3ed29b21df2da8ac224
parent1f56d405e76695923a992d9b99c440b8d7675a20 (diff)
Reformatted list_channels()
-rw-r--r--FICS/lists.c43
1 files changed, 24 insertions, 19 deletions
diff --git a/FICS/lists.c b/FICS/lists.c
index dc6b99f..54990f3 100644
--- a/FICS/lists.c
+++ b/FICS/lists.c
@@ -415,28 +415,33 @@ PUBLIC int com_showlist(int p, param_list param)
return COM_OK;
}
-PUBLIC int list_channels(int p,int p1)
+PUBLIC int
+list_channels(int p, int p1)
{
- List *gl;
- int i, rights;
+ List *gl;
+ int rights;
- gl = list_findpartial(p1, "channel", 0);
- if (!gl) {
- return 1;
- }
- rights = ListArray[gl->which].rights;
- /* display the list */
- if (gl->numMembers == 0)
- return 1;
- {
- multicol *m = multicol_start(gl->numMembers);
+ if ((gl = list_findpartial(p1, "channel", 0)) == NULL)
+ return 1;
- for (i = 0; i < gl->numMembers; i++)
- multicol_store_sorted(m, gl->member[i]);
- multicol_pprint(m, p, 78, 1);
- multicol_end(m);
- }
- return 0;
+ rights = ListArray[gl->which].rights;
+
+ // XXX: unused
+ (void) rights;
+
+ if (gl->numMembers == 0)
+ return 1;
+
+ {
+ multicol *m = multicol_start(gl->numMembers);
+
+ for (int i = 0; i < gl->numMembers; i++)
+ multicol_store_sorted(m, gl->member[i]);
+ multicol_pprint(m, p, 78, 1);
+ multicol_end(m);
+ }
+
+ return 0;
}
/* free the memory used by a list */