Package: libedit2
Version: 2.9.cvs.20050518-2.2
Severity: normal
a linefeed is always increased whenever
read_history/write_history is invoked. please try an
attached code. on GNU readline, foo.his has only "input
word" in the line. but on libedit, three \012 will be added
after "input word" so that read_history/write_history is
invoked three times intentionally.
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15.6
Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8)
Versions of packages libedit2 depends on:
ii libc6 2.3.6-3 GNU C Library: Shared libraries an
ii libncurses5 5.5-1 Shared libraries for terminal hand
libedit2 recommends no packages.
-- no debconf information
#include <editline/readline.h>
int
main(void)
{
char *foo = NULL;
foo = readline("input something:");
add_history(foo);
write_history("foo.his");
clear_history();
read_history("foo.his");
foo = readline("input ctrl+d:");
write_history("foo.his");
clear_history();
read_history("foo.his");
foo = readline("input ctrl+d:");
write_history("foo.his");
clear_history();
read_history("foo.his");
foo = readline("input ctrl+d:");
write_history("foo.his");
return 0;
}