aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/command.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-19 23:55:18 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-19 23:55:18 +0100
commitcd4023684f743b44c5be466ff1d3f6e8e24811b9 (patch)
tree7880914e2205137c6f67d3e64fc7a466e93c8705 /FICS/command.c
parent32ef928c95648dbb2430254fa0544fb96aab5981 (diff)
Reformatted parse_command()
Diffstat (limited to 'FICS/command.c')
-rw-r--r--FICS/command.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/FICS/command.c b/FICS/command.c
index 53bffaa..c61b75a 100644
--- a/FICS/command.c
+++ b/FICS/command.c
@@ -92,24 +92,24 @@ PRIVATE int lastCommandFound = -1;
int player_notify_departure(int p);
/* added for warnings */
-/* Copies command into comm, and returns pointer to parameters in
- * parameters
+/*
+ * Copies command into 'comm'.
*/
-PRIVATE int parse_command(char *com_string,
- char **comm,
- char **parameters)
+PRIVATE int
+parse_command(char *com_string, char **comm, char **parameters)
{
- *comm = com_string;
- *parameters = eatword(com_string);
- if (**parameters != '\0') {
- **parameters = '\0';
- (*parameters)++;
- *parameters = eatwhite(*parameters);
- }
- if (strlen(*comm) >= MAX_COM_LENGTH) {
- return COM_BADCOMMAND;
- }
- return COM_OK;
+ *comm = com_string;
+ *parameters = eatword(com_string);
+
+ if (**parameters != '\0') {
+ **parameters = '\0';
+ (*parameters)++;
+ *parameters = eatwhite(*parameters);
+ }
+
+ if (strlen(*comm) >= MAX_COM_LENGTH)
+ return COM_BADCOMMAND;
+ return COM_OK;
}
PUBLIC int alias_lookup(char *tmp, alias_type *alias_list, int numalias)