summaryrefslogtreecommitdiffstats
path: root/battlestar/getcom.c
diff options
context:
space:
mode:
authorjsm <jsm@NetBSD.org>2000-09-17 23:04:17 +0000
committerjsm <jsm@NetBSD.org>2000-09-17 23:04:17 +0000
commit0c5056102773ba23e89c985e185f895b7877e839 (patch)
treefc5ccd28886a95ea7a93bc11177213469e4e6dd6 /battlestar/getcom.c
parente828812cad1edfdd4b4f01f93330a6421cd816ab (diff)
downloadbsdgames-darwin-0c5056102773ba23e89c985e185f895b7877e839.tar.gz
bsdgames-darwin-0c5056102773ba23e89c985e185f895b7877e839.tar.zst
bsdgames-darwin-0c5056102773ba23e89c985e185f895b7877e839.zip
Clean up formatting; partly from OpenBSD.
Diffstat (limited to 'battlestar/getcom.c')
-rw-r--r--battlestar/getcom.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/battlestar/getcom.c b/battlestar/getcom.c
index 76e236fb..3f8f1306 100644
--- a/battlestar/getcom.c
+++ b/battlestar/getcom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: getcom.c,v 1.6 1999/02/10 01:36:50 hubertf Exp $ */
+/* $NetBSD: getcom.c,v 1.7 2000/09/17 23:04:17 jsm Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)getcom.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getcom.c,v 1.6 1999/02/10 01:36:50 hubertf Exp $");
+__RCSID("$NetBSD: getcom.c,v 1.7 2000/09/17 23:04:17 jsm Exp $");
#endif
#endif /* not lint */
@@ -84,19 +84,18 @@ getword(buf1, buf2, flag)
return (0);
}
while (*buf1 && !isspace(*buf1) && *buf1 != ',')
- if (flag < 0)
+ if (flag < 0) {
if (isupper(*buf1))
*buf2++ = tolower(*buf1++);
else
*buf2++ = *buf1++;
- else
- if (flag > 0)
- if (islower(*buf1))
- *buf2++ = toupper(*buf1++);
- else
- *buf2++ = *buf1++;
+ } else if (flag > 0) {
+ if (islower(*buf1))
+ *buf2++ = toupper(*buf1++);
else
*buf2++ = *buf1++;
+ } else
+ *buf2++ = *buf1++;
} else
*buf2++ = *buf1++;
*buf2 = 0;