Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/ftp only enable editing by default if stdin is a tty.
details: https://anonhg.NetBSD.org/src/rev/18c61951cb57
branches: trunk
changeset: 473021:18c61951cb57
user: lukem <lukem%NetBSD.org@localhost>
date: Mon May 17 04:26:45 1999 +0000
description:
only enable editing by default if stdin is a tty.
noticed by Onno van der Linden <onno%simplex.nl@localhost>
diffstat:
usr.bin/ftp/main.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r a9a752d775f5 -r 18c61951cb57 usr.bin/ftp/main.c
--- a/usr.bin/ftp/main.c Mon May 17 03:35:55 1999 +0000
+++ b/usr.bin/ftp/main.c Mon May 17 04:26:45 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.40 1999/03/31 02:00:42 lukem Exp $ */
+/* $NetBSD: main.c,v 1.41 1999/05/17 04:26:45 lukem Exp $ */
/*
* Copyright (c) 1985, 1989, 1993, 1994
@@ -43,7 +43,7 @@
#if 0
static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94";
#else
-__RCSID("$NetBSD: main.c,v 1.40 1999/03/31 02:00:42 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.41 1999/05/17 04:26:45 lukem Exp $");
#endif
#endif /* not lint */
@@ -177,10 +177,11 @@
fromatty = isatty(fileno(stdin));
ttyout = stdout;
if (isatty(fileno(ttyout))) {
- verbose = 1; /* verbose if from a tty */
+ verbose = 1; /* verbose if to a tty */
#ifndef SMALL
if (! dumbterm) {
- editing = 1; /* editing mode on if tty is usable */
+ if (fromatty) /* editing mode on if tty is usable */
+ editing = 1;
if (foregroundproc())
progress = 1; /* progress bar on if fg */
}
Home |
Main Index |
Thread Index |
Old Index