bouyer
6d537d7313
Fix use-after-free. Discovered by running tests with MALLOC_OPTIONS=J
...
(should this be the default for tests ?), pointed out by njoly@
2011-03-20 12:36:14 +00:00
christos
c0ee155271
Fix argument for EL_EDITOR from Jess Thrysoee
2011-02-27 01:51:37 +00:00
joerg
9674b81ed9
Introduce __weakref_visible to handle the different required visibility
...
for weak references. GCC 4.2+ and Clang require static, older GCC wants
extern. Change __weak_reference to include sym. This requires changes
the existing users to not reuse the name of the symbol, but avoids
further differences between GCC 4.1 and GCC 4.2+/clang.
2011-02-22 05:45:05 +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
joerg
6f7bc0c1ed
Deal with changes in the weak_reference semantic in GCC 4.2 and later.
2011-02-17 16:44:48 +00:00
christos
28ef40ccbd
fix pasto
2011-01-28 03:41:52 +00:00
christos
b2ce31d086
don't turn on editing if stdout is not a tty.
2011-01-27 23:11:40 +00:00
christos
7350622ee8
off by one in fetching history data. From: Gerry Swislow
2011-01-16 03:05:51 +00:00
wiz
3d3c5d42cb
Observe the following spelling:
...
- wide character (noun)
- wide-character (adjective)
Inspired by jmc@OpenBSD.
2010-12-16 17:42:25 +00:00
dholland
eb1ab8ee50
Improve previous to avoid changing the interface of an externally
...
exposed function. (But note that this function is neither documented
nor declared in any installed header file, and it probably should not
be externally exposed.) Related to PR 44183, closes PR 44186.
2010-12-06 00:05:38 +00:00
dholland
574c2fc5a2
add const, from PR 44183.
2010-12-02 04:42:46 +00:00
dholland
92417c82c1
Fix up bodgy code for printing completion matches; it used to sometimes
...
skip entries, print (null), run off the end of the array, or occasionally
receive SIGSEGV, and now will, hopefully at least, do none of that.
Based in part on the patch in PR 44183 from Sergio Acereda; I also
did some tidyup and fixed it to print top-to-bottom first like ls(1).
2010-12-02 04:35:17 +00:00
christos
a85c37d8d9
don't increment i twice in the loop. From Michael Byrnes
2010-11-15 21:24:31 +00:00
christos
9bc86f7706
PR/43998, PR/44021: In narrow history emulation, don't treat UTF-8 character
...
sets specially as far as history goes since we always need to do the conversion
from narrow [history] to wide [editline].
2010-11-04 13:53:12 +00:00
christos
f70a466a92
fix fd leak found by Igor Zinovik
2010-10-23 23:27:40 +00:00
christos
b354315033
unbreak readline history.
2010-09-16 20:08:51 +00:00
christos
7741aae941
setup a callback to be invoked on resize buffers so that readline can
...
reset rl_line_buffer which unfortunately some applications use it directly.
2010-08-28 15:44:59 +00:00
christos
6e1c968db3
provide rl_on_newline
2010-08-04 20:29:18 +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
cbd798c94b
tidy up memory allocation and don't unnecessarily print "./" before names.
2010-06-01 18:20:26 +00:00
christos
ca8b6091c1
Use the same hack for Solaris and MacOS/X. This is not right, we only really
...
support UTF-8, but it will get us going until this is fixed properly.
From Jess Thrysoee
2010-04-20 02:01:13 +00:00
christos
72c00e4a7a
\033 is more portable than \e still.
2010-04-18 21:17:47 +00:00
christos
df810c5405
ffs needs strings.h
2010-04-18 21:17:22 +00:00
christos
d29e250074
shame on solaris that is the last OS not supporting $()
2010-04-18 21:17:05 +00:00
christos
839bac947e
From Jess Thrysoee
...
- Fix wint_t to Int confusion
2010-04-15 00:57:33 +00:00
christos
5443e9b772
From Jess Thrysoee
...
- use nl_langinfo to test for UTF-8, because some locales are UTF-8 without
reflecting it in their names.
2010-04-15 00:56:40 +00:00
christos
a5b37ffc65
From Jess Thrysoee
...
expose ct_enc_width()
2010-04-15 00:55:57 +00:00
christos
939651fa2b
From Jess Thrysoee
...
- NARROW_HISTORY and IGNORE_EXTCHARS should not take effect if locale is UTF-8
- account for multi byte char length in
2010-04-15 00:52:48 +00:00
christos
b77d4fa5c5
From Jess Thrysoee: call setlocale so we can test UTF-8
2010-04-15 00:50:46 +00:00
christos
a9dd944f6b
From Jess Thrysoee: add ifndef around def of _GNU_SOURCE
2010-04-15 00:50:03 +00:00
christos
f576147073
https://bugzilla.redhat.com/show_bug.cgi?id=575383
...
Handle EINTR properly.
2010-03-22 22:59:06 +00:00
roy
98eb889579
Userland now builds and uses terminfo instead of termcap.
...
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
christos
6fbbcd94ce
PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
...
(SIGWINCH). Return NULL if el_gets() gets interrupted.
2010-01-20 01:15:52 +00:00
christos
654f9c04e7
Fix wrapper for EL_EDITOR, from Michael L. Hitch
2010-01-19 22:38:08 +00:00
christos
081c24c702
PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack
...
smashing
2010-01-18 19:17:42 +00:00
christos
139d3d5a3b
- call the mapping function directly instead of el_wset().
...
- save the strings passed to the mapping function so that they don't get
re-used. This leaks. To fix it properly we could either pass a flag to
free particular entries before re-using, or allocate all of them.
Allocating all of them wastes memory, allocating some of them makes
the code more complex.
This fixes compatibility binding (shell tab completion for example)
2010-01-12 19:40:50 +00:00
christos
c9043bbf6e
- in the argv conversion, handle NULL as NULL
...
- when printing tab/nl print them, don't handle them specially.
2010-01-12 19:37:18 +00:00
wiz
0d3270a169
Bump date for historyw -> history_w.
2010-01-03 19:05:26 +00:00
christos
73eda9fe27
rename historyw -> history_w for consistency.
...
add wide tst code and make it the default.
2010-01-03 18:27:10 +00:00
christos
4168f34493
expose the encode and decode string functions for the benefit of history
...
and readline.
2009-12-31 18:32:37 +00:00
christos
dc8498bec8
- Document and enable wide character support.
...
- Fix read function compatibility.
2009-12-31 15:58:26 +00:00
christos
0b9ae3fdf0
Fix wide build, test it, but don't turn it on yet.
2009-12-30 23:54:52 +00:00
christos
34e53048e6
Wide character support (UTF-8) from Johny Mattsson; currently disabled.
2009-12-30 22:37:40 +00:00
christos
8106943a02
reduce diff with tcsh
2009-12-28 22:15:36 +00:00
christos
b90e7198e7
improve on the listing display by printing only one character after the
...
filename not two, and no trailing blanks. I will revisit this when I write
the ls-F code.
2009-12-28 21:55:38 +00:00
christos
c8b67cd8d5
Reduce diff with tcsh's editor. No functional change intended.
2009-12-28 21:54:21 +00:00
christos
969676ec74
Fix bug where tab completion on the second or > line that caused listing
...
ended up corrupting the display by an extra space in the beginning. Reported
by Mac Chan.
2009-12-28 21:52:43 +00:00
christos
ea3813ed2f
apply apple patches from:
...
http://opensource.apple.com/source/libedit/libedit-11/patches/
2009-09-07 21:24:33 +00:00
christos
461d0372fd
delete defined(sun), it could be invaded in the user namespace. Suggested
...
by mrg@
2009-08-31 00:05:43 +00:00