diff options
-rw-r--r-- | FICS/utils.c | 12 | ||||
-rw-r--r-- | 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(); |