Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-5]: src/usr.bin/wall Pullup revision 1.14 -> 1.16, approved by ...
details: https://anonhg.NetBSD.org/src/rev/e9b1413cb966
branches: netbsd-1-5
changeset: 489711:e9b1413cb966
user: taca <taca%NetBSD.org@localhost>
date: Sun Oct 08 03:43:07 2000 +0000
description:
Pullup revision 1.14 -> 1.16, approved by jhawk:
> 1.14 -> 1.15 (by mjl)
> - Increase temporary buffer size not to truncate temp file template.
>
> 1.15 -> 1.16
> - Knf auto variables in modified line by me.
> - Print "??" as tty name instead of print nothing. Suggested by jhawk.
diffstat:
usr.bin/wall/wall.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)
diffs (45 lines):
diff -r e020db921fcd -r e9b1413cb966 usr.bin/wall/wall.c
--- a/usr.bin/wall/wall.c Sun Oct 08 03:40:06 2000 +0000
+++ b/usr.bin/wall/wall.c Sun Oct 08 03:43:07 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wall.c,v 1.13.4.1 2000/10/01 04:29:18 taca Exp $ */
+/* $NetBSD: wall.c,v 1.13.4.2 2000/10/08 03:43:07 taca Exp $ */
/*
* Copyright (c) 1988, 1990, 1993
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)wall.c 8.2 (Berkeley) 11/16/93";
#endif
-__RCSID("$NetBSD: wall.c,v 1.13.4.1 2000/10/01 04:29:18 taca Exp $");
+__RCSID("$NetBSD: wall.c,v 1.13.4.2 2000/10/08 03:43:07 taca Exp $");
#endif /* not lint */
/*
@@ -138,7 +138,7 @@
FILE *fp;
int fd;
const char *whom;
- char *p, *tty, hostname[MAXHOSTNAMELEN+1], lbuf[100], tmpname[15];
+ char *p, *tty, tmpname[32], lbuf[100], hostname[MAXHOSTNAMELEN+1];
(void)snprintf(tmpname, sizeof tmpname, "%s/wall.XXXXXX", _PATH_TMP);
if ((fd = mkstemp(tmpname)) == -1 || !(fp = fdopen(fd, "r+")))
@@ -166,13 +166,10 @@
(void)fprintf(fp, "%-79.79s\007\007\r\n", lbuf);
tty = ttyname(STDERR_FILENO);
if (tty == NULL)
- (void)snprintf(lbuf, sizeof lbuf,
- " at %d:%02d ...",
- lt->tm_hour, lt->tm_min);
- else
- (void)snprintf(lbuf, sizeof lbuf,
- " (%s) at %d:%02d ...",
- tty, lt->tm_hour, lt->tm_min);
+ tty = "??";
+ (void)snprintf(lbuf, sizeof lbuf,
+ " (%s) at %d:%02d ...", tty, lt->tm_hour,
+ lt->tm_min);
(void)fprintf(fp, "%-79.79s\r\n", lbuf);
}
(void)fprintf(fp, "%79s\r\n", " ");
Home |
Main Index |
Thread Index |
Old Index