Subject: bin/6647: ftp(1) of 1.3.3 can not edit/complete command line
To: None <gnats-bugs@gnats.netbsd.org>
From: Kouichi Matsuda <kmatsuda@egg.math.sci.hokudai.ac.jp>
List: netbsd-bugs
Date: 12/24/1998 15:04:52
>Number:         6647
>Category:       bin
>Synopsis:       ftp(1) of 1.3.3 can not edit/complete command line
>Confidential:   yes
>Severity:       critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 23 22:20:00 1998
>Last-Modified:
>Originator:     Kouichi Matsuda
>Organization:
Laboratory of Signal Processing, Section of Informatics and Processing
Research Institute for Electronic Science, Hokkaido University
>Release:        NetBSD/i386 1.3.3
>Environment:
System: NetBSD egg 1.3.3 NetBSD 1.3.3 (COMMON) #0: Wed Dec 23 21:37:27 JST 1998 root@Kururu:/usr/src/sys/arch/i386/compile/COMMON i386


>Description:
	ftp(1) in NetBSD 1.3.3 can not edit and complete command line,
	even if editing mode is on.
>How-To-Repeat:
	Use /usr/bin/ftp of NetBSD 1.3.3
	and edit command line or complete something.

	(NetBSD-current's ftp works well, this problem lies 1.3.3 only)
>Fix:
	Quick fix as follows:

diff -cr src.133/usr.bin/ftp/util.c src/usr.bin/ftp/util.c
*** src.133/usr.bin/ftp/util.c	Mon Dec 21 16:18:04 1998
--- src/usr.bin/ftp/util.c	Thu Dec 24 11:37:32 1998
***************
*** 1061,1067 ****
--- 1061,1069 ----
  #ifdef H_SETSIZE
  		HistEvent ev;
  #endif
+ #ifdef	NO_HACK_EDIT_MODE
  		int editmode = 0;
+ #endif	/* NO_HACK_EDIT_MODE */
  
  #ifdef EL_EDITMODE /* hack */
  		el = el_init(__progname, stdin, ttyout, stderr);
***************
*** 1092,1102 ****
--- 1094,1108 ----
  		else
  			el_set(el, EL_SIGNAL, 1);
  #else
+ #ifdef	NO_HACK_EDIT_MODE
  		if (editmode == 0) {
  			editing = 0;
  		} else {
+ #endif	/* NO_HACK_EDIT_MODE */
  			el_set(el, EL_SIGNAL, 1);
+ #ifdef	NO_HACK_EDIT_MODE
  		}
+ #endif	/* NO_HACK_EDIT_MODE */
  #endif
  	}
  	if (!editing) {
>Audit-Trail:
>Unformatted: