aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/utils.c36
1 files changed, 20 insertions, 16 deletions
diff --git a/FICS/utils.c b/FICS/utils.c
index c4838f2..facefab 100644
--- a/FICS/utils.c
+++ b/FICS/utils.c
@@ -70,23 +70,27 @@ PUBLIC int iswhitespace(int c)
}
}
-PUBLIC char *getword(char *str)
+PUBLIC char *
+getword(char *str)
{
- int i;
- static char word[MAX_WORD_SIZE];
-
- i = 0;
- while (*str && !iswhitespace(*str)) {
- word[i] = *str;
- str++;
- i++;
- if (i == MAX_WORD_SIZE) {
- i = i - 1;
- break;
- }
- }
- word[i] = '\0';
- return word;
+ int i;
+ static char word[MAX_WORD_SIZE];
+
+ i = 0;
+
+ while (*str && !iswhitespace(*str)) {
+ word[i] = *str;
+ str++;
+ i++;
+
+ if (i == MAX_WORD_SIZE) {
+ i = (i - 1);
+ break;
+ }
+ }
+
+ word[i] = '\0';
+ return word;
}
PUBLIC char *