christos
dc8498bec8
- Document and enable wide character support.
...
- Fix read function compatibility.
2009-12-31 15:58:26 +00:00
christos
34e53048e6
Wide character support (UTF-8) from Johny Mattsson; currently disabled.
2009-12-30 22:37:40 +00:00
christos
83965485c1
Always initialize nread since it is an out param.
...
From Michael Cook mcook at bbn dot com
2009-07-22 15:57:00 +00:00
christos
287bd18049
decrement the number of levels after the loop (Julien Torres)
2009-06-09 13:04:33 +00:00
christos
e55354196b
from Julien Torres, flip the order we pop in the macro array.
2009-06-08 15:10:53 +00:00
christos
ae87843e53
make el_gets set the count to -1 on error to distinguish between EOF and
...
error.
2009-03-10 20:46:15 +00:00
christos
07e886c39c
remove VEOF test. the tty is in cooked mode when we are not editing and
...
the tty driver does the check for us.
2009-02-21 23:35:10 +00:00
christos
41907725b6
use the VEOF character from the terminal, instead of hard-coding 4.
2009-02-21 23:31:29 +00:00
christos
e8bbf84cd0
reset and redraw on sigcont. From Anon Ymous.
2009-02-19 15:20:22 +00:00
christos
5c894153a3
pass lint on _LP64.
2009-02-15 21:55:23 +00:00
christos
6ed9cd5e69
don't restart on EINTR, instead return NULL immediately. From Anon Ymous
2009-02-15 21:24:13 +00:00
christos
1dc5f9b89b
match documentation in el_push
2009-02-05 19:15:44 +00:00
lukem
a06595c27b
fix -Wsign-compare issues
2009-01-18 12:14:16 +00:00
christos
872a7369cc
Allow a single process to control multiple ttys (for pthreads using _REENTRANT)
...
using multiple EditLine objects. Mostly from Preston A. Elder.
2008-09-10 15:45:37 +00:00
christos
bd6c2075f1
Fix bug with multiple pending el_pushes. Reported by Julien Torres.
2007-03-01 21:41:45 +00:00
christos
68d7e34555
On a fatal error, we want to stop processing the macro buffers.
2005-08-02 12:11:14 +00:00
tron
4e72290930
Add missing second argument to another call of ch_reset().
2005-08-02 10:20:33 +00:00
christos
0895008a17
Don't reset the macro strings each time we enter el_gets(), otherwise
...
el_push() is unusable programmatically.
2005-08-01 23:00:15 +00:00
lukem
ac636bd17a
Don't use non-standard uint or u_int.
2005-06-01 11:37:52 +00:00
christos
04a4f22437
Make sure we flush after we prepare when we are unbuffered otherwise the
...
prompt will not appear immediately.
2005-03-09 23:55:02 +00:00
christos
18c8edba4d
PR/23486: Andreas Gustafsson: gdb no longer works with emacs
...
- make sure that we keep previous contents of the buffer in unbuffered mode.
- when turning editing on and off keep tty consistent.
2004-07-08 00:51:36 +00:00
christos
ac4e17d0c7
Better fix for rl_prep_terminal() from Gerry Swislow.
2004-02-27 14:52:18 +00:00
christos
9f2ccd7938
Separate tty separation from the prompt printing function. From Gerry Swislow.
2004-02-21 16:42:30 +00:00
christos
c8d67a7da2
portability fixes.
2004-01-17 17:57:40 +00:00
christos
6e782349a3
change allocation policy in el_push to allocate the string itself.
...
fix issues with strdup.
2003-10-18 23:48:42 +00:00
christos
5eda4a7d47
PR/23107: Nathan Williams: ^D as the first char on the command line does
...
not DTRT in readline compatibility mode
2003-10-09 00:42:28 +00:00
christos
552716dcff
Implement enough of readline's 4.0 async mode to make gdb happy. This is
...
not complete yet, but it seems to work...
This required to introduce an unbuffered mode to el_gets(), but that was
a minor change.
2003-09-26 17:44:51 +00:00
mycroft
ec5dc2be24
Fix something that's been annoying me for a while...
...
Pull in <fcntl.h>, so that the fcntl #defines are present, and we build in the
automatic reset of non-blocking mode, rather than beeping like mad.
2003-09-13 04:18:00 +00:00
agc
eb7c1594f1
Move UCB-licensed code from 4-clause to 3-clause licence.
...
Patches provided by Joel Baker in PR 22280, verified by myself.
2003-08-07 16:42:00 +00:00
christos
839ca00b3c
From michael@moria.de:
...
- use __attribute__((__unused__)) in arguments where appropriate.
- some int -> size_t and char * to const char * conversions.
2003-06-19 15:55:05 +00:00
christos
4a97685c19
Fix problem with previous patches that broke vi history.
...
- c_gets() was usually returning a length, but sometimes
one of the CC_xxx values (which are small +ve integers)!
- fixed c_gets() by putting a ' ' under the cursor.
From David Laight.
2002-11-20 16:50:08 +00:00
christos
39f224af48
PR/18995: David Laight: libedit fixes for posix conformant sh
...
The posix 'sh' specification defines vi-mode editing quite tightly.
The netbsd libedit code (used by sh to do this) was missing several
features, there were also minor errors in others.
Compare netbsd sh to the definition available from:
http://www.opengroup.org/onlinepubs/007904975/utilities/sh.html
In particular the following were not supported:
U - undo all changes to line
| - goto column
Y - yank to end of line
y - yank
# - comment out current line
@ - take input from shell alias [1]
G - goto numbered line in history buffer
v - edit history line with vi
_ - append word from last input line
. - redo last command
Other minor changes have also been made.
[1] This needs the shell to define an appropriate routine to
return the text of the alias. There is no requirement that
such a function exist.
2002-11-15 14:32:32 +00:00
christos
a17c7fe4a6
vi mode and memory fixes from david laight.
2002-10-27 21:41:50 +00:00
christos
0e0ac6b723
- constify; passes all gcc and lint strict checks.
...
- add config.h [Jason Evans], to create a portable version of libedit that
can be easily compiled on other OS's.
2002-03-18 16:00:50 +00:00
christos
eabba8b507
PR/14067: Anthony Mallet: Provide a programmatic way to set the read_char
...
function via a new el_set() operation.
Thanks, nicely done :-)
2001-09-27 19:29:50 +00:00
jdolecek
00ff7cacf5
Enlarge editline buffers as needed to support arbitrary length lines.
...
This also addresses lib/9712 by Phil Nelson.
2001-01-10 07:45:41 +00:00
christos
ff59a2fadd
- add support for home and end keys.
...
- improve debugging support
2000-11-11 22:18:57 +00:00
lukem
d30d584a91
convert to new style guide, which includes:
...
- ansi prototypes & features (such as stdargs)
- 8 space indents
2000-09-04 22:06:28 +00:00
christos
b2309a74ae
PR/9243: Kevin Schoedel: libedit ignores repeat count
2000-01-19 18:30:19 +00:00
lukem
65c98beb1a
remove some lint
1999-10-04 23:23:21 +00:00
sommerfeld
15b8b5a50b
minor tweak to previous fix: don't spuriously truncate final newline
...
under emacs.
1999-08-08 01:25:05 +00:00
sommerfeld
3e32553f0b
Fix PR7685 (gdb under emacs prints spurious ^M and messes up terminal)
...
plus a few bogons noted along the way:
1) Set EDIT_DISABLED if terminal type is emacs.
2) fix bug in NO_TTY mode which caused it to not notice CR or LF
3) implement EDIT_DISABLED within libedit to be somewhat like NO_TTY,
except that a prompt is printed first.
1999-08-02 01:01:55 +00:00
simonb
1528b77539
More trailing white space.
1999-07-02 15:14:07 +00:00
kleink
3ed4fcf61e
In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
...
of errno.
1999-01-11 22:39:59 +00:00
christos
a6d4afba22
delint
1998-12-12 20:08:21 +00:00
lukem
fe1a16ac05
* implement CC_REFRESH_BEEP; as per CC_REFRESH but beep as well. this
...
is useful in completion when a partial completion is found
* remove entry in BUGS about el_parse(); that was fixed a while ago
1998-06-01 14:31:26 +00:00
lukem
78b73237b4
fix compile errors if FIONREAD is defined. noted by
...
David Holland <dholland@bordeaux.eecs.harvard.edu> in [bin/4012].
1998-01-21 10:12:22 +00:00
christos
c49189ae41
Small optimization. Don't call isatty() on every invocation of el_gets, but
...
remember if the tty setup failed... Also trim the input line of trailing \r's.
1997-12-20 19:15:50 +00:00
christos
cc6167153e
Make el_gets() work when the input is not a tty.
1997-10-26 20:19:48 +00:00
christos
54fac6850e
Fix compiler warnings.
1997-07-06 18:25:21 +00:00