From 5725dd85813a9c15a8e1bce85580408aab122744 Mon Sep 17 00:00:00 2001 From: cgd Date: Sat, 22 Apr 1995 08:07:59 +0000 Subject: [PATCH] un-munge import; it apparently didn't import properly. --- games/worms/worms.6 | 9 ++++---- games/worms/worms.c | 52 ++++++++++++++++++++++----------------------- 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/games/worms/worms.6 b/games/worms/worms.6 index f2f68158c569..4a757bedba34 100644 --- a/games/worms/worms.6 +++ b/games/worms/worms.6 @@ -1,4 +1,4 @@ -.\" $NetBSD: worms.6,v 1.5 1995/04/22 08:00:57 cgd Exp $ +.\" $NetBSD: worms.6,v 1.6 1995/04/22 08:07:59 cgd Exp $ .\" .\" Copyright (c) 1989, 1993 .\" The Regents of the University of California. All rights reserved. @@ -34,16 +34,15 @@ .\" @(#)worms.6 8.1 (Berkeley) 5/31/93 .\" .Dd May 31, 1993 -.Dt WORMS 6 -.Os +.Dt WORMS 6 .Sh NAME .Nm worms .Nd animate worms on a display terminal .Sh SYNOPSIS .Nm worms .Op Fl ft -.Op Fl l Ar # -.Op Fl n Ar # +.Op Fl l Ar length +.Op Fl n Ar number .Sh DESCRIPTION A .Tn UNIX diff --git a/games/worms/worms.c b/games/worms/worms.c index 2f2e3272ea2b..cc39b28ea550 100644 --- a/games/worms/worms.c +++ b/games/worms/worms.c @@ -1,4 +1,4 @@ -/* $NetBSD: worms.c,v 1.6 1995/04/22 08:00:58 cgd Exp $ */ +/* $NetBSD: worms.c,v 1.7 1995/04/22 08:08:05 cgd Exp $ */ /* * Copyright (c) 1980, 1993 @@ -43,7 +43,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)worms.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: worms.c,v 1.6 1995/04/22 08:00:58 cgd Exp $"; +static char rcsid[] = "$NetBSD: worms.c,v 1.7 1995/04/22 08:08:05 cgd Exp $"; #endif #endif /* not lint */ @@ -165,7 +165,7 @@ static struct options { { 0, { 0, 0, 0 } } }; -#define cursor(c, r) tputs(tgoto(CM, c, r), 1, putchar) +#define cursor(c, r) tputs(tgoto(CM, c, r), 1, fputchar) char *tcp; static char flavor[] = { @@ -317,67 +317,67 @@ main(argc, argv) (void)signal(SIGTSTP, onsig); (void)signal(SIGTERM, onsig); - tputs(tgetstr("ti", &tcp), 1, putchar); - tputs(tgetstr("cl", &tcp), 1, putchar); + tputs(tgetstr("ti", &tcp), 1, fputchar); + tputs(tgetstr("cl", &tcp), 1, fputchar); if (field) { register char *p = field; for (y = bottom; --y >= 0;) { for (x = CO; --x >= 0;) { - putchar(*p++); + fputchar(*p++); if (!*p) p = field; } if (!Wrap) - putchar('\n'); + fputchar('\n'); (void)fflush(stdout); } if (Wrap) { if (IM && !IN) { for (x = last; --x > 0;) { - putchar(*p++); + fputchar(*p++); if (!*p) p = field; } y = *p++; if (!*p) p = field; - putchar(*p); + fputchar(*p); if (BC) - tputs(BC, 1, putchar); + tputs(BC, 1, fputchar); else cursor(last - 1, bottom); - tputs(IM, 1, putchar); + tputs(IM, 1, fputchar); if (IC) - tputs(IC, 1, putchar); - putchar(y); + tputs(IC, 1, fputchar); + fputchar(y); if (IP) - tputs(IP, 1, putchar); - tputs(EI, 1, putchar); + tputs(IP, 1, fputchar); + tputs(EI, 1, fputchar); } else if (SR || AL) { if (HO) - tputs(HO, 1, putchar); + tputs(HO, 1, fputchar); else cursor(0, 0); if (SR) - tputs(SR, 1, putchar); + tputs(SR, 1, fputchar); else - tputs(AL, LI, putchar); + tputs(AL, LI, fputchar); for (x = CO; --x >= 0;) { - putchar(*p++); + fputchar(*p++); if (!*p) p = field; } } else for (x = last; --x >= 0;) { - putchar(*p++); + fputchar(*p++); if (!*p) p = field; } } else for (x = CO; --x >= 0;) { - putchar(*p++); + fputchar(*p++); if (!*p) p = field; } @@ -388,7 +388,7 @@ main(argc, argv) if ((x = w->xpos[h = w->head]) < 0) { cursor(x = w->xpos[h] = 0, y = w->ypos[h] = bottom); - putchar(flavor[n % sizeof(flavor)]); + fputchar(flavor[n % sizeof(flavor)]); ref[y][x]++; } else @@ -403,7 +403,7 @@ main(argc, argv) if (--ref[y1][x1] == 0) { cursor(x1, y1); if (trail) - putchar(trail); + fputchar(trail); } } op = &(!x ? (!y ? upleft : (y == bottom ? lowleft : left)) : (x == last ? (!y ? upright : (y == bottom ? lowright : right)) : (!y ? upper : (y == bottom ? lower : normal))))[w->orientation]; @@ -422,7 +422,7 @@ main(argc, argv) cursor(x += xinc[w->orientation], y += yinc[w->orientation]); if (!Wrap || x != last || y != bottom) - putchar(flavor[n % sizeof(flavor)]); + fputchar(flavor[n % sizeof(flavor)]); ref[w->ypos[h] = y][w->xpos[h] = x]++; } } @@ -432,8 +432,8 @@ void onsig(signo) int signo; { - tputs(tgetstr("cl", &tcp), 1, putchar); - tputs(tgetstr("te", &tcp), 1, putchar); + tputs(tgetstr("cl", &tcp), 1, fputchar); + tputs(tgetstr("te", &tcp), 1, fputchar); exit(0); }