Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp when using editline, work on the correct buffer....



details:   https://anonhg.NetBSD.org/src/rev/c5b478a1b81c
branches:  trunk
changeset: 467915:c5b478a1b81c
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Mar 31 02:00:42 1999 +0000

description:
when using editline, work on the correct buffer.  fixes problem where blank
input lines were being added to the history buffer.

diffstat:

 usr.bin/ftp/main.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a527ff3ad2f1 -r c5b478a1b81c usr.bin/ftp/main.c
--- a/usr.bin/ftp/main.c        Wed Mar 31 01:50:25 1999 +0000
+++ b/usr.bin/ftp/main.c        Wed Mar 31 02:00:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.39 1999/03/22 07:36:41 lukem Exp $  */
+/*     $NetBSD: main.c,v 1.40 1999/03/31 02:00:42 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.39 1999/03/22 07:36:41 lukem Exp $");
+__RCSID("$NetBSD: main.c,v 1.40 1999/03/31 02:00:42 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -442,7 +442,7 @@
 
                        if ((buf = el_gets(el, &num)) == NULL || num == 0)
                                quit(0, 0);
-                       if (line[--num] == '\n') {
+                       if (buf[--num] == '\n') {
                                if (num == 0)
                                        break;
                        } else if (num >= sizeof(line)) {



Home | Main Index | Thread Index | Old Index