summaryrefslogtreecommitdiff
path: root/usr.bin/tip/tip.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1997-04-02 01:47:09 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1997-04-02 01:47:09 +0000
commit030dcde987345aefe1f3a302590b3bea15bb9d9f (patch)
tree131fa6470d49f58f09aadf2d0a48750242c5ff14 /usr.bin/tip/tip.c
parent7bb2316828ce1d059124018af00067d5020f2397 (diff)
Merge in good changes from NetBSD:
Compile in strcict ansi (some day I'll get around to -Wall) use set* functions instead of modifying the lvalue Change a few sprintf() to snprintf() where it coudl possibly matter. Replace zzhack stuff with something saner to make tip work on alpha
Diffstat (limited to 'usr.bin/tip/tip.c')
-rw-r--r--usr.bin/tip/tip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/tip/tip.c b/usr.bin/tip/tip.c
index f7084050a25..f208c15c662 100644
--- a/usr.bin/tip/tip.c
+++ b/usr.bin/tip/tip.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: tip.c,v 1.3 1996/06/26 05:40:47 deraadt Exp $ */
-/* $NetBSD: tip.c,v 1.8 1995/10/29 00:49:42 pk Exp $ */
+/* $OpenBSD: tip.c,v 1.4 1997/04/02 01:47:03 millert Exp $ */
+/* $NetBSD: tip.c,v 1.11 1997/02/11 09:24:06 mrg Exp $ */
/*
* Copyright (c) 1983, 1993
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)tip.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: tip.c,v 1.3 1996/06/26 05:40:47 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: tip.c,v 1.4 1997/04/02 01:47:03 millert Exp $";
#endif /* not lint */
/*
@@ -136,7 +136,7 @@ main(argc, argv)
for (p = system; *p; p++)
*p = '\0';
PN = PNbuf;
- (void)sprintf(sbuf, "tip%d", BR);
+ (void)snprintf(sbuf, sizeof(sbuf), "tip%d", BR);
system = sbuf;
notnumber:
@@ -361,7 +361,7 @@ tipin()
if (!(gch = escape()))
continue;
} else if (!cumode && gch == character(value(RAISECHAR))) {
- boolean(value(RAISE)) = !boolean(value(RAISE));
+ setboolean(value(RAISE), !boolean(value(RAISE)));
continue;
} else if (gch == '\r') {
bol = 1;
@@ -575,7 +575,7 @@ setparity(defparity)
{
register int i, flip, clr, set;
char *parity;
- extern char evenpartab[];
+ extern const unsigned char evenpartab[];
if (value(PARITY) == NOSTR)
value(PARITY) = defparity;