Minor cleanup before release.

This commit is contained in:
Joachim Nilsson 2010-03-09 21:18:03 +01:00
parent 8ff3272698
commit 87edc33897
4 changed files with 33 additions and 37 deletions

51
README
View File

@ -1,39 +1,36 @@
README -*-text-*- README -*-text-*-
This is a line-editing library. It can be linked into almost any program to This is a line editing library. It can be linked into almost any program to provide
provide command-line editing and history. command-line editing and history.
It is call-compatible with the FSF readline library, but it is a fraction of It is call-compatible with the FSF readline library, but it is a fraction of the size
the size (and offers fewer features). It does not use standard I/O. It is (and offers fewer features). It does not use standard I/O. It is distributed under
distributed under a "C News-like" copyright, see the file LICENSE for a "C News-like" copyright, see the file LICENSE for details.
details.
Configuration is made by supplying different options to the GNU configure Configuration is made by supplying different options to the GNU configure script. In
script. In the examples/ directory you can find a couple of small & slow the examples/ directory you can find a couple of small & slow shell implementations
shell implementations used for testing. used for testing.
Before finding out about the Debian version I was on the lookout for a Before finding out about the Debian version I was on the lookout for a really small
really small replacement for the GNU readline package. Not only was it large replacement for the GNU readline package. Not only was it large and GPL:ed (instead
and GPL:ed (instead of LGPL:ed), it also depended on libncurses, so the of LGPL:ed), it also depends on libncurses, so the resulting size was a bit too much
resulting size was a bit too much for my embedded system. I eventually for my embedded system. I eventually stubmled upon the BSD libedit library, which
stubmled upon the BSD libedit library, which was sufficient for a while, was sufficient for a while, even though it too depends on libncurses. I searched my
even though it too depended upon libncurses. I searched my soul and went soul and went back to where I, back in 1996, started out -- Minix. And there it was,
back to where I, back in 1996, started out -- Minix. And there it was, a a really small readline replacement!
really small readline replacement!
In 2000 Jim Studt packaged libeditline for Debian[1], the exact origin of In 2000 Jim Studt packaged libeditline for Debian[1], the exact origin of the Debian
the Debian code base is unclear, see the Sid package[2] for details. There code base is unclear, see the Sid package[2] for details. There were some notable
were some notable differences between that version and the upstream Minix differences between that version and the upstream Minix sources, all of which have
sources, all of which have now been merged here. now been merged here.
An explanation of the version numbering may be in order. I didn't know An explanation of the version numbering may be in order. I didn't know about the
about the Debian version for quite some time, so I kept a different name for Debian version for quite some time, so I kept a different name for the package and a
the package and a different versioning scheme. Now, in June 2009, I decided different versioning scheme. In June 2009, I decided to line up alongside Debian,
to line up alongside Debian, with the intent of merging the efforts. Sorry with the intent of merging the efforts. Sorry for any confusion this might cause.
for any confusion this might cause.
Enjoy, Enjoy,
Joachim Nilsson <joachim.nilsson@vmlinux.org> Joachim Nilsson <troglobit()vmlinux!org>
[1] - http://lists.debian.org/debian-devel/2000/05/msg00548.html [1] - http://lists.debian.org/debian-devel/2000/05/msg00548.html
[2] - http://packages.debian.org/sid/libeditline0 [2] - http://packages.debian.org/sid/libeditline0

3
TODO
View File

@ -1,5 +1,6 @@
TODO TODO
* Add --enable-FEATURE for features defined in Makefile-minix.in * Add --enable-FEATURE for remaining features defined in Makefile-minix.in
* Add support for rl_bind_key(), currently one needs to "hack" the Map[]
* Add support for inhibiting completion: rl_inhibit_completion * Add support for inhibiting completion: rl_inhibit_completion

View File

@ -22,7 +22,7 @@ a small slow shell for testing.
An earlier version was distributed with Byron's rc. Principal An earlier version was distributed with Byron's rc. Principal
changes over that version include: changes over that version include:
Faster. Faster.
Is eight-bit clean (thanks to brendan@cs.widener.edu) Is eight-bit clean (thanks to brendan()cs!widener!edu)
Written in K&R C, but ANSI compliant (gcc all warnings) Written in K&R C, but ANSI compliant (gcc all warnings)
Propagates EOF properly; rc trip test now passes Propagates EOF properly; rc trip test now passes
Doesn't need or use or provide memmove. Doesn't need or use or provide memmove.
@ -44,7 +44,7 @@ There is one known bug:
Enjoy, Enjoy,
Rich $alz Rich $alz
<rsalz@osf.org> <rsalz()osf!org>
Copyright 1992,1993 Simmule Turner and Rich Salz. All rights reserved. Copyright 1992,1993 Simmule Turner and Rich Salz. All rights reserved.

View File

@ -20,8 +20,6 @@
#define META(x) ((x) | 0x80) #define META(x) ((x) | 0x80)
#define ISMETA(x) ((x) & 0x80) #define ISMETA(x) ((x) & 0x80)
#define UNMETA(x) ((x) & 0x7F) #define UNMETA(x) ((x) & 0x7F)
#define MAPSIZE 33
#define METAMAPSIZE 17
#if !defined(HIST_SIZE) #if !defined(HIST_SIZE)
#define HIST_SIZE 20 #define HIST_SIZE 20
#endif /* !defined(HIST_SIZE) */ #endif /* !defined(HIST_SIZE) */
@ -86,8 +84,8 @@ static int Point;
static int PushBack; static int PushBack;
static int Pushed; static int Pushed;
static int Signal; static int Signal;
static el_keymap_t Map[MAPSIZE]; static el_keymap_t Map[];
static el_keymap_t MetaMap[METAMAPSIZE]; static el_keymap_t MetaMap[];
static SIZE_T Length; static SIZE_T Length;
static SIZE_T ScreenCount; static SIZE_T ScreenCount;
static SIZE_T ScreenSize; static SIZE_T ScreenSize;
@ -1018,7 +1016,7 @@ char *readline(const char *prompt)
int s; int s;
/* Unless called by the user already. */ /* Unless called by the user already. */
rl_initialize (); rl_initialize();
if (!isatty(0)) { if (!isatty(0)) {
tty_flush(); tty_flush();
@ -1401,7 +1399,7 @@ static el_status_t last_argument(void)
return s; return s;
} }
static el_keymap_t Map[33] = { static el_keymap_t Map[] = {
{ CTL('@'), mk_set }, { CTL('@'), mk_set },
{ CTL('A'), beg_line }, { CTL('A'), beg_line },
{ CTL('B'), bk_char }, { CTL('B'), bk_char },
@ -1435,7 +1433,7 @@ static el_keymap_t Map[33] = {
{ 0, NULL } { 0, NULL }
}; };
static el_keymap_t MetaMap[17]= { static el_keymap_t MetaMap[]= {
{ CTL('H'), wipe }, { CTL('H'), wipe },
{ DEL, wipe }, { DEL, wipe },
{ ' ', mk_set }, { ' ', mk_set },