summaryrefslogtreecommitdiff
path: root/games/ppt/ppt.c
diff options
context:
space:
mode:
authorPaul Janzen <pjanzen@cvs.openbsd.org>1998-08-19 08:18:16 +0000
committerPaul Janzen <pjanzen@cvs.openbsd.org>1998-08-19 08:18:16 +0000
commit0f7c1a422984a87f90499adff1d66261c7f87555 (patch)
treeaecc71f3de1aad4f70fcf7801bd872d8efc1f439 /games/ppt/ppt.c
parentf39ea58f043a480bf6c5f77025131d419762bd0d (diff)
print spaces correctly when input is on the command line
Diffstat (limited to 'games/ppt/ppt.c')
-rw-r--r--games/ppt/ppt.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/games/ppt/ppt.c b/games/ppt/ppt.c
index 717c760914b..c4b121cd081 100644
--- a/games/ppt/ppt.c
+++ b/games/ppt/ppt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppt.c,v 1.4 1998/08/19 07:40:51 pjanzen Exp $ */
+/* $OpenBSD: ppt.c,v 1.5 1998/08/19 08:18:15 pjanzen Exp $ */
/* $NetBSD: ppt.c,v 1.4 1995/03/23 08:35:40 cgd Exp $ */
/*
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)ppt.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$OpenBSD: ppt.c,v 1.4 1998/08/19 07:40:51 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: ppt.c,v 1.5 1998/08/19 08:18:15 pjanzen Exp $";
#endif
#endif /* not lint */
@@ -68,9 +68,12 @@ main(argc, argv)
(void) puts("___________");
if (argc > 1)
- while ((p = *++argv))
+ while ((p = *++argv)) {
for (; *p; ++p)
putppt((int)*p);
+ if ((*(argv + 1)))
+ putppt((int)' ');
+ }
else while ((c = getchar()) != EOF)
putppt(c);
(void) puts("___________");