Subject: lib/9244: libedit dumps bindings inconsistently
To: None <gnats-bugs@gnats.netbsd.org>
From: Kevin Schoedel <schoedel@kw.igs.net>
List: netbsd-bugs
Date: 01/19/2000 10:23:18
>Number: 9244
>Category: lib
>Synopsis: libedit dumps bindings inconsistently
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: lib-bug-people (Library Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Jan 19 10:21:01 2000
>Last-Modified:
>Originator: Kevin Schoedel
>Organization:
>Release: 1.4.1
>Environment:
>Description:
The editrc(5) command 'bind' displays most bindings to the output file,
but displays multi-key and arrow key bindings to the error file.
(Other editrc(5) commands that generate output write to the output file.)
>How-To-Repeat:
Run the editrc command 'bind', with output and error directed to
different files.
>Fix:
*** key.c Sat Jul 3 07:10:01 1999
--- key.c Wed Jan 19 11:56:36 2000
***************
*** 614,620 ****
switch (ntype) {
case XK_STR:
case XK_EXE:
! (void) fprintf(el->el_errfile, fmt, key,
key__decode_str(val->str, unparsbuf,
ntype == XK_STR ? "\"\"" : "[]"));
break;
--- 614,620 ----
switch (ntype) {
case XK_STR:
case XK_EXE:
! (void) fprintf(el->el_outfile, fmt, key,
key__decode_str(val->str, unparsbuf,
ntype == XK_STR ? "\"\"" : "[]"));
break;
***************
*** 621,632 ****
case XK_CMD:
for (fp = el->el_map.help; fp->name; fp++)
if (val->cmd == fp->func) {
! (void) fprintf(el->el_errfile, fmt, key, fp->name);
break;
}
#ifdef DEBUG_KEY
if (fp->name == NULL)
! (void) fprintf(el->el_errfile, "BUG! Command not found.\n");
#endif
break;
--- 621,632 ----
case XK_CMD:
for (fp = el->el_map.help; fp->name; fp++)
if (val->cmd == fp->func) {
! (void) fprintf(el->el_outfile, fmt, key, fp->name);
break;
}
#ifdef DEBUG_KEY
if (fp->name == NULL)
! (void) fprintf(el->el_outfile, "BUG! Command not found.\n");
#endif
break;
***************
*** 635,641 ****
break;
}
else
! (void) fprintf(el->el_errfile, fmt, key, "no input");
}
--- 635,641 ----
break;
}
else
! (void) fprintf(el->el_outfile, fmt, key, "no input");
}
--
Kevin Schoedel
schoedel@kw.igs.net
>Audit-Trail:
>Unformatted: