Commit Graph

93 Commits

Author SHA1 Message Date
Joachim Nilsson
19f1943f6f Initial, and very poor, UTF-8 support. 2010-07-30 02:14:35 +02:00
Joachim Nilsson
f1edf7ae52 Replace previous commit for quoted chars with a much improved one.
1. Simplify code in reposition()
2. Add tty_push() for commonly used operation, reduce code duplication.
3. Fix left() so that it treats 8-bit chars as one when not in meta-mode.
4. Replace isalnum() with homegrown implementation that understands 8-bit
   and control chars.
5. Fix ceol() before introducing ANSI "kill-to-end-of-line" escape code.

This actually seems to work, previously I erronesouly used an UTF-8
terminal for testing.  Which of course broke the test on an ISO-8859-1
[only] terminal.
2010-07-30 02:03:46 +02:00
Joachim Nilsson
2a9b087bbc Update with more wish-list items, UTF-8 support is not high prio, but would be neat. 2010-07-30 01:56:25 +02:00
Joachim Nilsson
f617f84293 Fix display of quoted (contro) characters w/o breaking 8-bit display 2010-07-26 02:09:15 +02:00
Joachim Nilsson
bde0c0c9d6 Cuddle else statments, that's the way of the samurai - also minor cleanup. 2010-07-26 02:03:31 +02:00
Joachim Nilsson
02acd55b2e Support for capitalizing words (M-c) from Festival speech-tools by Alan W Black <awb()cstr!ed!ac!uk> 2010-07-26 01:44:18 +02:00
Joachim Nilsson
167059d159 Obfuscate email address 2010-07-25 22:22:56 +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
0d9ce0ce06 Refactor of variable names, for improved readline compat. 2010-07-25 22:14:14 +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
dbad0d0871 Minor. 2010-07-25 21:43:41 +02:00
Joachim Nilsson
f16cbece5a Rename Signal --> el_intr_pending. From Festival speech-tools. 2010-07-24 03:46:58 +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
83e4837f39 Remove unused CHAR type and replace SIZE_T with size_t, we check for that. 2010-07-24 03:12:45 +02:00
Joachim Nilsson
a7eea67253 Cast size_t to int, confuses some compilers otherwise. 2010-07-24 03:09:00 +02:00
Joachim Nilsson
8e13c7b5ae Fix memory leak 2010-07-24 03:05:23 +02:00
Joachim Nilsson
02ea37e4de Clarify code when CONFIG_ANSI_ARROWS is selected. 2010-07-24 02:52:51 +02:00
Joachim Nilsson
c7b78df006 Fix lingering bug, post incrementing pointers is almost never a good idea. 2010-07-24 02:46:04 +02:00
Joachim Nilsson
5a8ad742d9 Adding -Wcast-qual revealed some more interesting casts. 2010-07-24 02:39:45 +02:00
Joachim Nilsson
522e534448 Remove unnecessary casts. 2010-07-24 02:21:28 +02:00
Joachim Nilsson
d4aa5ac293 Minor cleanup 2010-07-24 02:15:18 +02:00
Joachim Nilsson
a848011073 Move strdup() fallback implementation to platform code. 2010-07-24 02:02:56 +02:00
Joachim Nilsson
ceb1995733 Add fallback backspace in case tgetstr("le") fails. 2010-07-24 02:02:14 +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
511a1a65a4 Nuke NEW, DISPOSE, RENEW, and COPYFROMTO macros, by Johan Danielsson
This is a manual merge of 98c988dd10888cfb72c4 from http://github.com/heimdal/heimdal
2010-07-23 11:01:51 +02:00
Joachim Nilsson
64219dc1f0 \? -> ? by Johan Danielsson of Heimdal project http://github.com/heimdal/heimdal 2010-07-23 09:54:08 +02:00
Joachim Nilsson
b51dad6408 Minor fixes from changeset a5f54865d41c3f181a06 from Heimdal project http://github.com/heimdal/heimdal 2010-07-23 09:46:49 +02:00
Joachim Nilsson
cc1fd1e9dc Add more TODO items. 2010-07-20 00:18:51 +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
009d3f0568 Make UNIQUE_HISTORY configurable, remove TODO items and old Minix Makefile 2010-07-19 04:13:11 +02:00
Joachim Nilsson
60245e5e51 Make sure to only export if new --enable-termcap is set. 2010-07-19 03:33:39 +02:00
Joachim Nilsson
576e437290 Bump version to 1.14.0-rc1 2010-07-18 19:00:13 +02:00
Joachim Nilsson
6d2f4c99a3 Add configurable support for using termcap library for terminal size. 2010-07-18 18:57:07 +02:00
Joachim Nilsson
8b85bab216 Improve handling of ioctl() errors, cleanup and comment on ordering.
The ordering of alternative rl_ttyset() implementations is important.
We have chosen to place the most common, most portable, code first
and then in lesser order.  Ending with the sgtty.h based code, which
I cannot test on GNU/Linux.  Will test on OpenBSD later.

Also added Emacs indentation style to make it easier to follow the
original style of Mr Turner and Salz.
2010-07-18 16:07:02 +02:00
Joachim Nilsson
a0ec848f7b Cleanup configure.ac a bit 2010-07-18 16:05:56 +02:00
Joachim Nilsson
d76ca9f1d6 Update Makefile.in's after last configure.ac change 2010-07-18 12:55:44 +02:00
Joachim Nilsson
98fbc6cd41 Spellcheck comment 2010-07-18 05:22:45 +02:00
Joachim Nilsson
4c4a7e808c Make scrollback history (HIST_SIZE) configurable 2010-07-18 05:19:03 +02:00
Joachim Nilsson
7d0aff5ba3 Remove obsolete checks, all current systems today have dirent.h 2010-07-18 03:37:23 +02:00
Joachim Nilsson
f874ad60ab Configure sets HAVE_STRDUP, check for that instead of NEED_STRDUP. 2010-07-18 03:36:05 +02:00
Joachim Nilsson
2d2ec7db98 Improve GCC warning and error triggers and also improve check of GCC version.
Configure snippets shamelessly stolen from http://www.libusb.org/browser/configure.ac
2010-07-18 02:51:25 +02:00
Joachim Nilsson
ca56b74763 Update .gitignore 2010-07-18 02:50:09 +02:00
Joachim Nilsson
89261724d2 Fix function declaration, non-ANSI style. 2010-07-18 02:42:05 +02:00
Joachim Nilsson
885475fc49 Fix invalid function pointer declarations. 2010-07-18 02:41:38 +02:00
Joachim Nilsson
ad0fee03aa Fix recently broken --enable-default-complete and simplify configure script. 2010-07-18 02:30:30 +02:00
Joachim Nilsson
da4bd00eef Fix qsort() wrapper definition, missing const directives. 2010-07-18 02:28:52 +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
00dd651835 Minor update. 2010-07-18 01:39:07 +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
4c9c71faae Cleanup and fix problems found by Sparse. 2010-07-17 22:23:21 +02:00