Commit Graph

759 Commits

Author SHA1 Message Date
christos b52bce6ba8 set some readline compatibility default key settings.
https://bugzilla.redhat.com/attachment.cgi?id=1001895
2015-03-24 21:29:52 +00:00
christos 9a8795cdcd save and restore IGNORE_EXTCHARS like we do in the getc case. From:
https://bugzilla.redhat.com/attachment.cgi?id=1001894
2015-03-24 21:26:50 +00:00
christos 21ea10bd7a split the allocation functions, their mixed usage was too confusing. 2015-02-22 02:16:19 +00:00
christos aecf67a262 PR/49683: Amir Plivatsky: Off-by-one comparison in ct_decode_string() leading
to out of bounds referrence.
XXX: pullup-7
2015-02-22 00:46:58 +00:00
christos 71cf54e71e OpenBSD is like us. 2015-02-17 22:49:26 +00:00
joerg d5e00695c3 Disable -Wcast-qual for clang for now. 2015-01-29 20:30:02 +00:00
wiz 724c4ed029 Bump date for previous. 2014-12-25 13:39:41 +00:00
wiz eb157f70b1 From Ingo Schwarze, based on changes from Kaspars Bankovskis:
* Document error handling of el_init(), el_set(), el_source(),
   and history_init().
 * Fix a typo an improve punctuation below H_SETUNIQUE.
 * The ellipsis already implies "optional", no need for [].
 * Sort options in editrc(5).
 * Prevent e.g. rom being misconstrued as the end of a sentence.
 * Drop a useless duplicate .Ar macro.
 * Put telltc in its proper place in the alphabetical order.
 * A few typos in vi editor command names.
 * Some missing vi editor command names.
 * Some missing author macros.
2014-12-25 13:39:05 +00:00
riz 41482d7745 callers's -> caller's 2014-10-18 15:07:02 +00:00
snj f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
christos 3ea928643b Fix typo in comment (Tobias Stoeckmann) 2014-08-15 13:32:53 +00:00
christos 80e781ab85 Bounds search for reallocated index, from OpenBSD via Andreas Fett 2014-07-06 18:15:34 +00:00
christos 0fb55ca669 PR/48957: Federico G. Schwindt: Restore commented out code that broke
rl_callback_handler.
2014-07-06 18:09:04 +00:00
christos 20efb692ab cast gotsig because it is long on some systems. 2014-06-18 20:12:15 +00:00
christos cc52c7c3a4 Add stdlib.h for abort() (Jess Thrysoee) 2014-06-18 18:52:49 +00:00
christos e06822a79d Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.
2014-06-18 18:12:28 +00:00
christos 0bd5e60967 accomodate FreeBSD's flavor of weak references. 2014-06-18 13:03:08 +00:00
mrg ac641cb906 remove remaining makefile support for GCC < 45 that i found. 2014-06-14 20:49:36 +00:00
christos 78dc8159da PR/48876: Dmitriy Grigoryev: Core dump in readline lib on attempted expansion
Make sure we have 2 matches before calling strcmp().
2014-06-05 22:07:42 +00:00
christos 368fe5a982 Always NULL terminate the argv[] array. From OpenBSD. 2014-05-20 15:05:08 +00:00
christos 72aae1aa72 PR/48821: If called from tty_stty(), recalculate flags. 2014-05-19 21:01:48 +00:00
christos 75ef7650b2 more tty modes refactoring, no functional change intended. 2014-05-19 19:54:12 +00:00
christos ed36ef9858 Factor out some common code (more to be done) from PR/48821 2014-05-19 17:14:41 +00:00
wiz 8c54f70a11 Add An to authors. Wording. 2014-05-11 09:01:42 +00:00
christos 58ced3d761 Add a history function that takes a FILE pointer; needed for Capsicum.
From Eitan Adler
2014-05-11 01:05:17 +00:00
christos 0680d7215e Add missing EL_REFRESH 2014-02-26 13:50:29 +00:00
christos 7683f26e31 ... if called prior to using_history(). This needed to be worked around
in PHP: http://git.php.net/?p=php-src.git;a=commitdiff;h=31d67bd3

Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1055409
2014-01-21 13:51:44 +00:00
christos efab425d4c get rid of PATH_MAX. 2013-08-28 08:05:21 +00:00
christos 53fbf02908 cast to avoid warning. 2013-07-12 22:39:50 +00:00
christos 255f657e8d Add a function to move the cursor. 2013-07-12 17:48:29 +00:00
christos 45fd2d25ac expose rl_catch_signals and explain what we are doing. 2013-05-28 00:10:34 +00:00
christos 3cf221a53b Test early for EOF to avoid infinite loop in the wide char case. From
Linas Vepstas: linasvepstas at gmail dot com
2013-05-27 23:55:55 +00:00
christos 40b42dfe79 provide an el_init_fd function. 2013-01-22 20:23:21 +00:00
christos e861b2b079 explicitly pass (void *)0 instead of NULL. 2013-01-13 15:46:57 +00:00
wiz ec73a081d2 Add FILES section.
From jmc@OpenBSD.
2013-01-10 16:03:42 +00:00
wiz 56a5e44fef In 2000, .editrc reading from $PWD was removed. Update the man page.
From LEVAI Daniel via jmc@OpenBSD.
2013-01-10 16:03:06 +00:00
christos 07ea4685bd remove dead assignment (Christoph Mallon) 2013-01-01 15:34:02 +00:00
christos 1da7b96282 Fix pasto that affected bind -k (Christoph Mallon) 2013-01-01 15:33:06 +00:00
christos 7417d4b468 Add trailing NULL's to the varargs functions as required. (John Spencer) 2012-10-12 23:35:02 +00:00
christos d3a9c484a4 PR/46945: Steffen Nurpmeso; el_getc() doesn't document it's setting errno 2012-09-11 20:29:58 +00:00
christos 27afcf74cb return !OKCMD on error. 2012-09-11 12:31:08 +00:00
christos 82f197ec94 PR/46942: Steffen Nurpmeso: editline(3): el_get(): fix UNBUFFERED return 2012-09-11 11:58:53 +00:00
christos 2e9d696349 PR/46941: Steffen Nurpmeso: document EL_BUFFERED 2012-09-11 11:57:18 +00:00
christos 85bde018fb PR/46935: Steffen Nurpmeso: editline(3) (libedit): faulty errno handling,
faulty reuse of val in wrong context
2012-09-10 20:53:18 +00:00
joerg e16a720f89 Don't depend on HAVE_GCC being always defined. 2012-08-10 12:20:10 +00:00
christos 1f432e4501 From Kamil Dudka: fix crash of el_insertstr() on incomplete multi-byte 2012-07-18 17:12:39 +00:00
christos c046613e5b PR/46678: Ian Wienand: Add stub implementation for rl_free_line_state() 2012-07-12 18:46:20 +00:00
christos f2d8e54f16 don't crash if add_history is called from an empty line. Called from
nslookup in new bind.
XXX: pullup to 6
2012-06-05 00:30:22 +00:00
njoly fd5f5a6e67 Switch from Op to Oo/Oc for nested block. 2012-06-02 14:19:20 +00:00
christos a6b4b4578e remove stdint.h; it is not used. 2012-05-31 13:16:39 +00:00
christos d22248f82d don't include both term.h and termcap.h 2012-05-30 18:21:14 +00:00
christos 186f51e0f1 define the new variable 2012-05-15 19:07:25 +00:00
christos f5b586b16d Add rl_completion_word_break_hook from:
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/\
5ec6a45fa762b8cbd0305ca06acb8780335a486a
2012-05-15 17:30:04 +00:00
christos 83bcb34124 save and restore the tty settings on entry and exit respectively.
cleanup debugging printfs.
2012-05-15 15:59:01 +00:00
christos fac360ff28 From: Jilles Tjoelker: Add a mapping for the cursor delete key 2012-03-24 20:09:30 +00:00
christos d067817eea From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.
Behaviour in vi mode is unchanged (for 'x').
2012-03-24 20:08:43 +00:00
matt fa835e8c8b These directories default to WARNS?=5 2012-03-21 05:37:42 +00:00
matt 6fb2a3179f Use C89 functions definitions. 2012-03-21 05:34:54 +00:00
matt f9113d007b Use C89 functions definitions.
Remove use of __P
2012-03-21 05:33:26 +00:00
christos 9b25b03245 include the NULL in the argv conversion 2012-03-11 21:15:25 +00:00
christos 75b1bb5aad use arraycount 2012-03-11 21:14:56 +00:00
christos 3c15bad9a7 PR/45843: Henning Petersen: Fix resource leak on error. 2012-01-16 14:57:45 +00:00
christos ae5295ee5d Add coverity annotations about unreachable code (Kamil Dudka) 2011-11-18 20:39:18 +00:00
christos e83c752c92 Add missing * 2011-11-18 20:38:42 +00:00
christos 36e7768bff Initialize termbuf (Kamil Dudka) 2011-11-18 20:32:00 +00:00
christos cfca73c1f8 Initialize res (Kamil Dudka) 2011-11-18 20:30:01 +00:00
christos d24c721eac check for negative return of ct_visual_char (Kamil Dudka) 2011-11-18 20:25:48 +00:00
christos e09907eccd Off by one in allocation could cause buffer overflow (Kamil Dudka) 2011-11-18 20:24:21 +00:00
christos 9bee9dd870 remove unrecheable code (Kamil Dudka) 2011-11-18 20:22:03 +00:00
christos 872b7bf4a3 easier with an int for now. 2011-11-16 01:45:10 +00:00
christos 749960097c Since Width() is used only for display purposes we don't want to pass -1 for
unprintable characters.
2011-11-15 23:54:14 +00:00
christos 6a96f344c7 Fixed misplaced parenthesis (Nirbhay Choubey) 2011-10-23 17:37:55 +00:00
christos b6f308812d fixed warnings where wint_t is unsigned. 2011-10-04 15:27:04 +00:00
christos 8c9fc8838c fix broken change (parenthesis in the wrong place). From Nirbhay Choubey 2011-10-03 14:09:38 +00:00
christos f02b490980 include <wchar.h> if we don't have wcsdup() 2011-09-28 14:08:04 +00:00
plunky 2b8aaed8cd NULL does not need a cast, here 2011-09-16 16:13:16 +00:00
christos 3d802cf59d re-enable -Wconversion 2011-08-16 16:25:15 +00:00
christos 436299cdac need err.h now 2011-08-04 14:33:05 +00:00
joerg 98ea74e048 Only use -Wconversion if GCC is actually the active compiler. 2011-08-02 17:22:02 +00:00
tron 67fb973487 Don't use "-Wconversion" with GCC 4.5 which will complain about all the
expressions where signed variables are converted to unsigned in an
expression e.g. "size_t foo = sizeof(something) * int_var;".
2011-07-30 10:07:27 +00:00
christos c11bd863f5 pass -Wconversion 2011-07-29 23:44:44 +00:00
christos 1237974a30 - fix unused params
- unconditionalize vis.h
2011-07-29 20:58:07 +00:00
christos f46176b9a9 better autoconf results 2011-07-29 20:57:34 +00:00
christos f4bf097e85 add -Wunused-parameter
Is that the right way? Perhaps WARNS=5?
2011-07-29 20:56:58 +00:00
christos 7ecb1ef25e kill ifdef notdef 2011-07-29 15:20:39 +00:00
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 56eac9ea53 fix unused variable warnings on systems without _r functions 2011-07-28 17:33:55 +00:00
christos df86a66a1c handle systems without getpwent_r 2011-07-28 17:33:39 +00:00
joerg 4104b0e782 Sync compat defines to unbreak build.
XXX Do a proper config.h update from configure
2011-07-28 05:18:43 +00:00
christos 7da8639ecc whitespace 2011-07-28 03:52:19 +00:00
christos 02479cacb5 whitespace 2011-07-28 03:48:46 +00:00
christos 47b4c27f8c whitespace and comments 2011-07-28 03:44:36 +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 8cf227343c - check and don't cast malloc return
- more wide function use
2011-07-28 01:08:58 +00:00
christos 98c7cbebbc term -> terminal
XXX: need to rename key_ too.
2011-07-28 01:05:20 +00:00
christos 78cb86e064 regen 2011-07-28 01:05:00 +00:00
christos fd46b57ee4 avoid shadowed variable 2011-07-28 01:04:41 +00:00
christos 5fc21e9736 use vis.h from . 2011-07-28 00:54:26 +00:00
christos b210596944 eliminate alloca for portability
portable getpw{nam,uid}
2011-07-28 00:50:23 +00:00
christos 82edb784c6 term -> terminal
eliminate MAXPATHLEN
2011-07-28 00:49:18 +00:00
christos 0c0f23399c - fix memory allocation botch in wide strings
- check mbstowcs return code
2011-07-28 00:48:21 +00:00
christos e63c844a17 term -> terminal 2011-07-28 00:45:50 +00:00
christos 885062da0b more portability defines 2011-07-28 00:45:30 +00:00
christos c2c011fc82 term -> terminal 2011-07-28 00:45:14 +00:00
christos adb2121e55 term -> terminal
fix wide function confusion
2011-07-28 00:44:35 +00:00
christos f375da6e14 include config.h for all c files. 2011-07-28 00:43:53 +00:00
christos b723d6a65c include vis.h from dot. 2011-07-28 00:43:33 +00:00
christos df2309ca73 fix confusion with wide functions. 2011-07-28 00:43:12 +00:00
christos 5bf2e3dbda fix narrow compilation 2011-07-27 13:18:20 +00:00
christos 32d7653d74 - don't leave cursor dangling on memory failure or after clearing the list
- compute the string length to be strvis'ed after the string is encoded
2011-07-27 02:23:29 +00:00
christos c76d71fc1a fix buffer growing code. 2011-07-27 02:18:30 +00:00
christos 0da54e076e add history testing code. 2011-07-27 02:18:00 +00:00
christos 3021376b9c don't stop reading after empty lines from: Nirbhay Choubey 2011-07-26 21:03:17 +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
mrg 0a0dd75b65 add some XXX'd -Wno-foo if HAVE_GCC >= 45.
XXX: someone should look at these.
2011-06-21 02:32:55 +00:00
mrg 493d341048 various build fixes for gcc 4.5. from chuq. XXX i'm not sure all of
these work properly wtf pointer aliasing, but there are no casts at
least...

the lib/libpuffs/puffs_priv.h is definately a real bug fix.

from chuq.
2011-06-20 09:11:16 +00:00
wiz d489035474 Markup consistency, from YOMURA Masanori. Add serial comma. 2011-04-25 22:47:27 +00:00
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
christos 5aa87ec494 use __sun || sun instead of _SunOS, from Jess Thrysoee 2009-08-30 15:41:05 +00:00
christos 085c78fd1f Ignore comment lines in .editrc from Jess Thrysoee 2009-07-25 21:19:23 +00:00
christos bafe66c2cc Only need path if we have issetugid... From Anon Ymous 2009-07-22 18:25:26 +00:00
christos e304eddfd2 Don't depend on side effects inside an assert
From Michael Cook mcook at bbn dot com
2009-07-22 15:58:09 +00:00
christos cfa16c6369 Fix memory leaks in error paths.
From Michael Cook mcook at bbn dot com
2009-07-22 15:57: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 17a17e3aeb Move filename to the scope it is being used.
From Michael Cook mcook at bbn dot com
2009-07-22 15:56:29 +00:00
christos cfb4e5f917 Simplify the code. No functional change. 2009-07-17 12:28:27 +00:00
christos e2d0108bb8 - off by one in the term.h case.
- make code more similar to tcsh (if we want to handle wide chars, this is
  needed; for now it is a no-op)
2009-07-17 12:27:57 +00:00
christos 59a88754a7 handle prompt_esc properly. 2009-07-17 12:26:26 +00:00
christos 537657ed45 Use the proper prompt printing function. 2009-07-17 12:25:52 +00:00
christos 8e714f4b6e add stdio.h since we are using FILE. From Grant Erickson 2009-07-09 19:02:04 +00:00
perry eb247ff739 note that the return value of el_gets doesn't remain valid across
calls.
2009-07-05 21:55:24 +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 189ce7898b always scroll when we advance past bottom. From Caleb Welton
cwelton at greenplum dot com
2009-05-19 21:45:14 +00:00
wiz 35cf287cb8 Punctuation nit. 2009-05-12 08:14:07 +00:00
christos b627b61f7f restore binary compatibility by providing new prompt functions that take
an extra literal character.
2009-05-11 18:33:30 +00:00
christos b203bfe74f PR/41230: -current: sh(1) endlessly looping in interactive
Fix proposed from Matthew Mondor
2009-04-16 19:39:37 +00:00
wiz 55a1b57943 Drop trailing whitespace. 2009-04-11 22:17:52 +00:00
joerg dab0ac3098 Don't use .Xo/.Xc to work around ancient macro argument limit in groff. 2009-04-11 20:53:15 +00:00
joerg 22ce33e2aa Don't use .Xo/.Xc to avoid ancient macro argument limit. 2009-04-11 20:48:26 +00:00
christos 46db7d011d Fix off by one error reported by: Caleb Welton cwelton at greenplum dot com 2009-04-08 21:31:31 +00:00
wiz 3a9e7e68ee Readability improvement. Whitespace nits. 2009-04-01 08:58:47 +00:00
christos 097860c04e cast to size_t to avoid sign / unsigned comparison warning. 2009-03-31 21:33:17 +00:00
christos e6ec3d065c implement RL_PROMPT_{START,END}_IGNORE 2009-03-31 17:53:03 +00:00
christos c8754a5b44 Implement literal prompt sequences. Now someone can implement
RL_PROMPT_START_LITERAL/RL_PROMPT_END_LITERAL :-)
2009-03-31 17:38:27 +00:00
wiz 097d2fd1a6 -1 is not a defined value, it is just a value.
On the other hand, minuses need backslashes, otherwise they become hyphens.
2009-03-10 22:55:14 +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
joerg 997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00