From 0a7ac3f4acb9d3de00eb2160279ecf5a5041e133 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Thu, 28 Dec 2023 00:25:17 +0100 Subject: Moved comments and added argument lists --- FICS/utils.c | 12 ++++++++++++ FICS/utils.h | 12 ++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/FICS/utils.c b/FICS/utils.c index c9e89d4..bd1a213 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -92,6 +92,9 @@ getword(char *str) return word; } +/* + * Returns a pointer to the first whitespace in the argument. + */ PUBLIC char * eatword(char *str) { @@ -100,6 +103,9 @@ eatword(char *str) return str; } +/* + * Returns a pointer to the first non-whitespace char in the argument. + */ PUBLIC char * eatwhite(char *str) { @@ -108,6 +114,9 @@ eatwhite(char *str) return str; } +/* + * Returns a pointer to the same string with trailing spaces removed. + */ PUBLIC char * eattailwhite(char *str) { @@ -125,6 +134,9 @@ eattailwhite(char *str) return str; } +/* + * Returns the next word in a given string. + */ PUBLIC char * nextword(char *str) { diff --git a/FICS/utils.h b/FICS/utils.h index 179385e..ff7110b 100644 --- a/FICS/utils.h +++ b/FICS/utils.h @@ -50,14 +50,10 @@ extern int count_lines(FILE *); extern int iswhitespace( ); extern char *getword( ); -/* Returns a pointer to the first whitespace in the argument */ -extern char *eatword( ); -/* Returns a pointer to the first non-whitespace char in the argument */ -extern char *eatwhite( ); -/* Returns a pointer to the same string with trailing spaces removed */ -extern char *eattailwhite( ); -/* Returns the next word in a given string >eatwhite(eatword(foo))< */ -extern char *nextword( ); +extern char *eatword(char *); +extern char *eatwhite(char *); +extern char *eattailwhite(char *); +extern char *nextword(char *); extern int mail_string_to_address(); extern int mail_string_to_user(); -- cgit v1.2.3