Commit Graph

15 Commits

Author SHA1 Message Date
Joachim Nilsson
0a75b182b1 Improve GNU readline compat, patch by Steve Tell in 1997 and 1998
This changeset adds support for:
   * rl_prep_terminal(),
   * rl_deprep_terminal(), both of which are only wrappers to rl_ttyset().
   * rl_getc()

and:
   * (*rl_getc_function), defaults to rl_getc()
   * (*rl_event_hook)
   * (*rl_prep_term_function), defaults to rl_prep_terminal()
   * (*rl_deprep_term_function), defaults to rl_deprep_terminal()

For further details, see http://www.cs.unc.edu/~tell/dist/magic-readline.README

Differences from Steve's commit include: signal safety in rl_getc(), restart
read() on EINTR, and make sure to support "int meta_flag" to rl_prep_terminal()
which is the GNU syntax.  To that end I reused the inverse of rl_meta_chars.
2010-08-05 01:08:30 +02:00
Joachim Nilsson
d04bdaf38f Add support for read_history(char *filename) and write_history(char *filename) 2010-08-04 02:23:05 +02:00
Joachim Nilsson
04a0cbd902 Allocate history scrollback buffer at runtime instead of at configure.
Also make sure "unique history" is enabled by default in configure.
2010-08-04 02:12:19 +02:00
Joachim Nilsson
55aaddbc54 Restore add_history(), for compat and simplify code. 2010-08-03 21:01:01 +02:00
Joachim Nilsson
20c55a58da Add el_bind_key_in_metamap() from Festival speech-tools.
Support for Meta key binding imported from Festival speech-tools, author
Alan W Black <awb()cstr!ed!ac!uk>.  Code released under the original license.
2010-07-25 22:17:10 +02:00
Joachim Nilsson
67e9aa3f2b Revert broken Debian patch for 8-bit char input, fix tty_show() instead.
This changeset fixes an old Debian patch that attempted to fix the display
of 8-bit characters in the function emacs().  It accidentally crippled the
function of M-d and M-DEL.  The latter was however also broken by being
mapped to wipe(), more on that below.

The real fix is to set rl_meta_chars to 0 by default and in the tty_show()
function, which tried to be smart and output control and meta characters
(in the wrong order as well).  Simply disabling the special code for output
of control characters fixes 8-bit input.

We also nuke the old and broken wipe() function that was mapped to M-DEL,
instead we map that key binding to bk_kill_word(), which works.
2010-07-25 22:01:04 +02:00
Joachim Nilsson
be921400bb Merge el_no_echo patch from Festival speech-tools editline fork 2010-07-24 03:38:25 +02:00
Joachim Nilsson
98b846c8b1 Revert function pointers for rl_complete() and rl_list_possib() introduced in 0.2.2.
Instead merge afd8b4de9dca8ec6afc3 from http://github.com/heimdal/heimdal.git project.
This lets rl_complete() and rl_list_possib() become wrapper functions calling a set of
function pointers, set using rl_set_complete_func() and rl_set_list_possib_funct().

Each wrapper has a fallback to do filename completion, which in turn can be disabled
by leaving out --enable-default-complete from the configure line.

This change, admittedly quite intrusive for a library, is a better implementation in
many ways.  For one it is much more readable, but it also enables further adoption of
other editline forks as well as a simpler implementation of GNU Readline function
pointers rl_completion_entry_function and rl_attempted_completion_function at a later
stage.

My apologies to everyone for whom this change breaks backwards compatibility.  For
help on converting your code, please see examples/cli.c.
2010-07-24 00:50:40 +02:00
Joachim Nilsson
536dcacb06 Rename and globalize internal data structures to make more similar to GNU Readline 2010-07-20 00:18:20 +02:00
Joachim Nilsson
3c4cf96bfc More cleanup. Added license blurb to top of all source files.
Remove all old $Id:$ and similar constructs, they don't provide any
additional benefit anymore.

Add configure options for toggling terminal bell and  toying with
SIGSTOP using Ctrl-Z.  Rename config option for ANSI keys to get
a consistent namespace.

Also did some work on ANSI-fication of function definitions, lot's
of that was still lingering around.
2010-07-18 01:41:18 +02:00
Joachim Nilsson
34a314c8e7 ANSI-fication and lots of minor fixes inspired by Sparse warnings. 2010-07-17 22:38:05 +02:00
Joachim Nilsson
6d8d857dd4 More build fixes, some code cleanup and untabify. 2008-12-02 21:58:55 +01:00
Joachim Nilsson
62e900a061 Change rl_complete() and rl_list_possib() to be function pointers instead.
This is a much cleaner design and also works with or without the configure
--enable-default-complete option.

See the examples for details.
2008-10-02 09:09:09 +02:00
Joachim Nilsson
cab8f18472 Fix return type of rl_reset_terminal() 2008-06-09 00:30:45 +02:00
Joachim Nilsson
5ffe54c277 Minix editline v0.1.1
=====================

Lots of minor fixes and additions:

	* Bump version info in configure.ac
	* User editline.h added, installs to $prefix/include/editline.h
		- Based on Debian package version, but heavily updated.
	* Manpage installs to $prefix/share/man/man3/editline.3
		- Also slightly updated with contents from Debian package.
	* Revised README to mention existing Debian package, also cleaned
	  out the old README, which now lives in doc/README
	* Add TODO file.
	* Fix package description and make dist to bzip2 tarballs.
2008-06-08 00:32:45 +02:00