christos
b71bed95b3
KNF return (\1); -> return \1;
2011-07-29 15:16:33 +00:00
christos
a13cd75612
kill ptr_t and ioctl_t, add * sizeof(*foo) to all allocations.
2011-07-28 20:50:55 +00:00
christos
d47f958456
Rename key to keymacro to avoid conflicts with term.h. The renaming of term
...
to terminal was again to avoid conflicts with term.h. term.h is a moving
namespace violation.
2011-07-28 01:56:26 +00:00
christos
adb2121e55
term -> terminal
...
fix wide function confusion
2011-07-28 00:44:35 +00:00
christos
047570cb9a
make obvious what we are trying to do...
2011-07-09 23:54:39 +00:00
tron
f5c0fd2c7b
Try to fix build of port where "char" is unsigned.
2011-07-09 16:04:34 +00:00
christos
c6c51b75eb
Support other non-latin1 single byte character sets.
...
From: Alexander Barkov and Nirbhay Choubey at oracle dot com
2011-07-08 15:54:56 +00:00
christos
01d6c84859
PR/44599: Steven Vernon: libedit acts as if no data read if editmode is turned
...
off because nread is uninitialized in the edit disabled case.
2011-02-18 20:53:05 +00:00
christos
0ccb4e68f8
refresh only on SIGCONT not SIGWINCH from Edward Sheldrake
2010-07-21 18:18:52 +00:00
christos
c157529beb
retry the read after sigwinch too, from Edward Sheldrake
2010-07-19 17:18:13 +00:00
christos
f576147073
https://bugzilla.redhat.com/show_bug.cgi?id=575383
...
Handle EINTR properly.
2010-03-22 22:59:06 +00:00
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