Commit Graph

319 Commits

Author SHA1 Message Date
wiz 6220c813a6 Drop trailing whitespace. 2005-07-14 15:02:37 +00:00
christos 45542456a5 PR/30747: David N. Williams: libedit is missing remove_history()
Added, please test.
2005-07-14 15:00:58 +00:00
christos 32bff6afc2 Fix memory leaks found by valgrind. From Julien Torres 2005-07-06 21:13:02 +00:00
christos 54e7bf907a make this useable from c++. 2005-06-12 06:58:21 +00:00
christos 19c38590ee PR/30500: Paul Shupak: Inconsistent definition of tilde_expand().
Provide a layer of indirection between the readline compatibility functions
and our internal implementation, so that we have the freedom to change the
function signature.
2005-06-11 18:18:59 +00:00
christos 3cfbfdb2ef Bug reported from Martin Dietze:
The place to change the completion_append_character is
    usually somewhere in the `rl_completion_entry_function'
    callback which is where one usually can distinguish between
    file- or dir-like entries to append a slash for dirs etc.

    This does no longer work since `fn_complete()' takes the
    `append_character' as argument before the callback is executed,
    so that changes to the variable `rl_completion_append_character'
    have in fact no effect for the current completion.

Fix by adding a function that returns the rl_completion_append_character,
when it gets passed in a filename in readline emulation.
2005-06-10 20:21:00 +00:00
christos 0320b64715 tilde expand should take a const argument. 2005-06-10 20:18:11 +00:00
lukem ac636bd17a Don't use non-standard uint or u_int. 2005-06-01 11:37:52 +00:00
lukem 48753fbc85 Update for recent parse__escape() prototype change 2005-05-29 04:58:15 +00:00
christos 917b5f36b1 PR/25694: Luke Mewburn: Don't abuse unconstify'ing a string and writing to
it, because you'll core dump. Also remove extra const that gives pain to
the irix compiler.
2005-05-29 03:55:37 +00:00
lukem beb8208a11 fix for WARNS=3 2005-05-28 12:03:22 +00:00
lukem 8e4107254f clean up build of "test" 2005-05-28 12:02:53 +00:00
lukem d0117e1043 MAKEVERBOSE support 2005-05-28 11:55:30 +00:00
agc 305f170238 Use the correct type for the stored callback function 2005-05-27 14:01:46 +00:00
agc 26abf58dee Sync the alternative readline interface with reality:
+ the rl_callback_handler_install takes a pointer to a void function
  which has one char * argument (it's called that way in the readline
  emulation source, otherwise there's no way to pass the line buffer
  to the function which processes the line when EOL is encountered)

+ provide a prototype for that function signature and use it

Makes the callback readline interface work now.
2005-05-27 11:35:07 +00:00
christos eda876c9d5 Libedit depends on libterm. From Patrick Welche 2005-05-18 22:36:20 +00:00
christos 33b0562908 Make completion_matches non-static since readline wants it. 2005-05-18 22:34:41 +00:00
christos 308097fac3 Make signal handler safe. From Michael Knudsen, many thanks. 2005-05-18 00:50:24 +00:00
lukem 78745cde09 Remove clause 3 from the UCB license. 2005-05-16 13:14:43 +00:00
christos 182beb15f2 PR/30215: Kouichirou Hiratsuka: /bin/sh dumps core with tabcomplete
Don't core-dump when trying to complete an empty line; instead assume ./
2005-05-12 15:48:40 +00:00
dsl 2e685ade80 Use getpwuid_r(getuid(), ...) to expand ~/....
Don't replace ~xyz with /home/xyz when expanding ~
2005-05-09 20:10:33 +00:00
dsl 6ddc453ece gdb directly calls filename_completion_function() 2005-05-07 16:28:32 +00:00
dsl 76a1f02b41 Make everything that uses makelist depend on Makefile - that way the
created files pick up new entries.
2005-05-07 16:22:59 +00:00
dsl 41a59814ed Separate out the filename completion functions from the readline() code.
Pass in loads of parameters instead of relying on shed-loads of global
variables to modify the behaviour.
The filename completion code can now be enabled by code that uses el_gets().
(eg /bin/sh)
2005-05-07 16:01:25 +00:00
matt 35f4d7fe23 Terminate the arglist with a NULL instead of 0. (Shuts up gcc4.x) 2005-04-25 01:06:03 +00:00
christos b9b92f846c check for pwd != NULL, fix a missed getpwnam. 2005-04-19 03:29:18 +00:00
christos a76abbed58 PR/29958: Peter Bex: add rl_variable_bind and rl_attempted_completion_over 2005-04-12 22:01:40 +00:00
christos bf7832efc6 use getpwent_r 2005-04-02 06:28:10 +00:00
christos 35d638917d PR/29738: Rui Paulo: Incorrect tok_line and tok_str declarations. 2005-03-19 17:36:02 +00:00
christos 476e930172 Add missing define, needed for debugging (from Rob Rodgers) 2005-03-15 00:10:40 +00:00
christos af62817ea3 Always update the position variables before the map function is called.
From Rob Rodgers, thanks!
2005-03-10 19:34:46 +00:00
christos f96c72ee24 set UNBUFFERED again after you do the line callback so that the new line
gets refreshed.
2005-03-09 23:55:35 +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 3bca82ec33 PR/26785: Jess Thrysoee: libedit - H_NEXT and H_PREV shifts cursor on failure 2004-11-27 18:31:45 +00:00
christos defca69e1a Make EM_DELETE_PREV_CHAR behave like ED_DELETE_PREV_CHAR in incremental
search. From Gerry Swislow.
2004-11-04 01:16:03 +00:00
dsl 1793b7dd69 Use (unsigned char) cast to sanitise arguments to ctype functions. 2004-10-28 21:14:52 +00:00
dsl d349cd6749 Fix a load of international alphabet problems with isxxx() and toupper()
Change isspace(*char_ptr) to isspace(*char_ptr & 0xff) so that the correct
piece of memory is looked at for the bit mask.
gcc optimises out the '& 0xff' (on i386 at least).
Fixes problems found by gcc when the splurious (int) cast is removed
from the #defines in ctype.h
2004-10-27 19:59:24 +00:00
christos 0d0ad08914 cut out the middle-man and use el_insertstr() directly. 2004-09-08 18:15:57 +00:00
christos 742c0a6b61 make rl_inhibit_completion visible. 2004-09-08 18:15:37 +00:00
christos 9b6268f92e make sure that we round up to 1K. 2004-08-24 12:41:06 +00:00
christos 848a98512e PR/26725: Sergey S. Kostyliov: Typo in libedit, possible buffer overflow in src/lib/libedit/history.c:history_save() 2004-08-20 12:54:05 +00:00
mycroft 6360c4b0f8 Delete-previous-char and delete-next-char without an argument are not supposed
to modify the yank buffer in Emacs.  Make it so.
2004-08-13 12:10:38 +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 b6b34b8065 fix memory leak; thanks to Logan Gabriel 2004-05-22 23:21:28 +00:00
wiz 962fdd9cb4 Remove duplicate word, from jfb@openbsd via jmc@openbsd. 2004-04-15 08:13:29 +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
lukem cbb69f7013 update for function name change 2003-12-08 12:03:01 +00:00
wiz 312a9703d5 Use Aq instead of <>, quote a minus, drop trailing space. 2003-12-05 13:46:39 +00:00