Commit Graph

621 Commits

Author SHA1 Message Date
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
msaitoh
150e7551ec fix mis-evaluating whether a char is digit or not. 2009-02-27 04:18:45 +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
954af9bb67 more size_t stuff. 2009-02-21 23:31:56 +00:00
christos
41907725b6 use the VEOF character from the terminal, instead of hard-coding 4. 2009-02-21 23:31:29 +00:00
wiz
6c890a7983 Restore markup changes (probably accidentally) reverted in previous. 2009-02-21 07:58:58 +00:00
christos
c51877c3f4 back out all prompt changes. they are not needed. 2009-02-21 00:05:23 +00:00
cube
0931c75c7a Order of evaluation of arguments is undefined, so call va_arg() in an
explicit order.  Fixes a segfault with bc reported by Patrick Welche on
current-users.
2009-02-19 20:27:11 +00:00
christos
e8bbf84cd0 reset and redraw on sigcont. From Anon Ymous. 2009-02-19 15:20:22 +00:00
wiz
dfe59495b1 Fix wordo, use more markup. 2009-02-19 09:48:08 +00:00
christos
f072c3f1a4 bump version for prompt arg. 2009-02-19 01:18:24 +00:00
christos
963ecab70c document extra argument. 2009-02-19 01:18:02 +00:00
christos
ec70918ed3 SA_RESTART for all signals but SIGINT. From Anon Ymous. 2009-02-18 15:04:40 +00:00
christos
62dbbc55bc allow for a prompt argument. 2009-02-17 21:34:26 +00:00
christos
7939d24e16 fix sign compare issues. 2009-02-16 00:15:45 +00:00
christos
5c894153a3 pass lint on _LP64. 2009-02-15 21:55:23 +00:00
christos
d25b6758ed in order for read() to return EINTR we need to use sigaction, not signal,
otherwise SA_RESTART is set.
2009-02-15 21:25:01 +00:00
christos
6ed9cd5e69 don't restart on EINTR, instead return NULL immediately. From Anon Ymous 2009-02-15 21:24:13 +00:00
sketch
fc16547f5e More fixes for existing portability stuff. 2009-02-12 13:39:49 +00:00
sketch
2157800b5b SUNOS is spelt __SunOS. Add missing prototypes. 2009-02-06 20:08:13 +00:00
sketch
957effbd58 Needs errno.h 2009-02-06 19:53:23 +00:00
sketch
fe96b18c3f Plug memory leak, from MySQL. 2009-02-06 14:40:32 +00:00
sketch
5e72d51013 Portability fix. 2009-02-06 13:14:37 +00:00
sketch
fe3391bda5 de-__P() 2009-02-06 12:45:25 +00:00
christos
1dc5f9b89b match documentation in el_push 2009-02-05 19:15:44 +00:00
christos
d052ee7b7f add rl_set_prompt 2009-02-05 19:15:26 +00:00
apb
69a442fa50 Define HAVE_STRUCT_DIRENT_D_NAMLEN in config,h, and test it when
deciding whether to use entry->d_namlen or strlen(entry->d_name).
Addresses PR 40477 by Robert Millan.
2009-01-26 17:32:41 +00:00
lukem
c17aaf60c9 WARNS=4 2009-01-18 12:17:49 +00:00
lukem
a06595c27b fix -Wsign-compare issues 2009-01-18 12:14:16 +00:00
christos
2d18fd40a7 - insert a space after the recognized string if it was an exact match
- initialize properly the string used for completion.
From Alex Bligh alex at alex dot org dot uk
- Make char constants consistent
2009-01-11 15:00:23 +00:00
christos
46edb91e9f bump shared libraries. 2009-01-11 03:07:47 +00:00
aymeric
e56ab6501a have '$' include the last character in the line when embedded in a command.
This fixes c$, d$, y$, and so on in vi mode.
2008-09-30 08:37:42 +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
365dab42f3 handle EINTR in the termios operations, reported by the GHC folks 2008-07-30 13:00:46 +00:00
christos
df0a282e52 Don't bother with SIGSTOP it cannot be caught or ignored. From Jess Thrysoee 2008-07-12 15:27:14 +00:00
martin
11a6dbe728 Convert TNF licenses to new 2 clause variant 2008-04-30 13:10:46 +00:00
martin
3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
christos
4652e1fb8f bump minor. 2008-04-05 23:53:26 +00:00
christos
0cb4d42e16 add EL_REFRESH for the benefit of readline 2008-04-05 15:53:28 +00:00
christos
3bbc95f39d Add rl_forced_update_display() from Gerry Swislow 2008-04-04 21:18:34 +00:00
christos
5f3802ca6e patches from Axel Thimm 2007-08-12 07:41:51 +00:00
christos
07186f02e2 Fix tab/space confusion; from Stefan Farfeleder 2007-06-10 20:20:28 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos
2d9dad6f00 Add rl_completion_matches, fix remove_history 2007-05-27 19: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
754eed8af3 PR/35411: Matthew Wala: inconsistency in editline(3): rename "num" to the
appropriate parameter names.
2007-01-12 16:31:13 +00:00
wiz
77171fb3a0 Fix xref section. Whitespace cleanups.. 2006-12-18 00:03:43 +00:00
christos
3a1928de28 add EL_GETFP, and EL_SETFP. 2006-12-15 22:13:33 +00:00
freza
37b5672028 s/el->errfile/el->el_errfile/g in debug code, fixes MKDEBUGLIB build. 2006-11-25 17:54:38 +00:00
christos
3bf701820f bump minor. 2006-11-24 00:03:06 +00:00
christos
6b8a793080 - Add more readline functions, enough for gdb-6.5
- Make el_get varyadic, and implement EL_GETTC.
- XXX: the EL_SETTC api will change in the future.
2006-11-24 00:01:17 +00:00
christos
72301cb079 don't use alloca with ssp. 2006-11-09 16:58:38 +00:00
mrg
d257e1e9bd __weakref__ attribute can not be applied to anything when inside function
scope, so, move the extern of get_alias_text outside vi_alias().

fixes build problems with GCC 4.1-20061021.
2006-10-22 07:48:13 +00:00
christos
d9590bcae9 Fix memory leak found by valgrind (Julien Torres) 2006-09-28 13:52:51 +00:00
rpaulo
1399def216 Rename TEST/test.c to avoid problems when doing a cleandir on case-insensitive
file systems.
ok'ed christos.
2006-08-31 20:20:38 +00:00
christos
f1fff5b02e Change to a 3 clause copyright after permission of the holders. 2006-08-21 12:45:30 +00:00
christos
213f1e2476 PR/34062: Tanaka Akira: rl_deprep_term_function is NULL in libedit.
Default to rl_deprep_terminal as suggested; do the same for
rl_prep_term_function
2006-07-23 20:21:45 +00:00
christos
96473fa808 change __weak_extern to __weak_reference so that gcc4 works. 2006-05-18 17:54:19 +00:00
christos
5bba7270fa fix debugging printf format. 2006-04-09 01:36:51 +00:00
rtr
596eb336c9 remove if/free block checking known condition
coverity 2762 / run 11
2006-03-25 13:00:11 +00:00
christos
9363fb8b44 move declaration to header file. 2006-03-23 20:22:51 +00:00
christos
4baec30349 Coverity CID 2743: Not really a memory leak, but make it obvious that we
always free tmp.
2006-03-21 17:52:50 +00:00
christos
ec39c1a649 Fix compilation. 2006-03-18 19:23:14 +00:00
christos
5900226fad Lint comment. 2006-03-18 19:22:59 +00:00
christos
a46f31170d Coverity CID 1668: Plug memory leak. 2006-03-18 09:31:36 +00:00
christos
c66ab9a1d0 Coverity CID 1666: Plug memory leak. 2006-03-18 09:28:23 +00:00
christos
c5f39d86c2 Coverity CID 1667: Plug memory leak 2006-03-18 09:19:02 +00:00
christos
53c1263c37 Coverity CID 1662: Memory leak. 2006-03-18 09:15:57 +00:00
christos
87113ce74b Coverity CID 597: remove dead code. 2006-03-18 09:09:41 +00:00
christos
78f7dbe212 Coverity CID 1216: Prevent negative index use. 2006-03-18 09:07:05 +00:00
christos
62bb88223c Coverity CID 806: Prevent NULL deref 2006-03-18 09:02:08 +00:00
christos
230c3d4ed6 Print the actual eofc, instead of ^D\b\b.
Change internal character decoding to prevent buffer oveflows.
2006-03-06 21:11:56 +00:00
christos
0fd1bd6295 use the tty chars for reprint and eof instead of hard-coded ^R and ^D 2006-03-06 21:11:03 +00:00
christos
10f8fe2052 PR/32817: Magnus Svensson: write_history and read_history returncode is not
readline compatible.
2006-02-13 14:12:04 +00:00
christos
fd2c82a86e Partial rl_getc_function support from Jess Thrysoee. 2006-02-12 16:15:07 +00:00
christos
fff4889f5c Refresh bug reported by Julien Torres:
going from:
    activate -verbose
to:
    reset -activation
results in:
    reset -activationverbose"
instead of:
    reset -activation

This is because we choose to insert "reset -" before the current line,
and the delete "e -" and insert "ion" in the appropriate place. The
cleareol code did not handle this case properly; we now cleareol to
the maximum number of characters of the first difference, the second
difference and the difference in line length.
2005-11-09 22:11:10 +00:00
christos
41a71d9929 change tr '[a-z]' '[A-Z]' to tr '[:lower:]' '[:upper:]' so that POSIX systems
work properly regardless of environment variable settings.
2005-10-22 16:45:03 +00:00
wiz
59a1fe13eb Add el_get to SYNOPSIS. From jmc@openbsd. 2005-10-12 09:29:43 +00:00
wiz
416b7d49ec Fix double if (from Alexey E. Suslikov via jmc@openbsd).
While here, re-word both H_[GS]ETUNIQUE descriptions so they make
more sense. Bump date.
2005-09-09 22:32:56 +00:00
christos
af079a3097 PR/31012: Barry Naujok: libedit el_get with EL_EDITOR op does not work
Fixed as suggested.
2005-08-19 04:21:47 +00:00
christos
55ca57f0a2 Don't save the el->el_line.cursor over a cv_insert call and use it later
because it might change. From Stefan Farfedeler.
2005-08-10 12:46:24 +00:00
christos
fda9b4f722 Don't delete the current line in vi mode when typing 'yy'.
From Stefan Farfeleder.
2005-08-09 16:40:12 +00:00
christos
b779ac8673 Fix two more help iterators. Thanks Stefan Farfeleder! 2005-08-09 13:58:44 +00:00
christos
2ecb0fb73d Spelling mistakes and comment errors (from FreeBSD via Stefan Farfeleder; many
thanks)
2005-08-08 14:05:37 +00:00
christos
d8f117745d Don't add an extra { NULL, 0, NULL } element to the help array. Instead keep
it always the same size as the function array for consistency. Reported in
FreeBSD PR 82381, but fixed differently.
2005-08-08 14:04:49 +00:00
christos
76b5907b5f The previous commit removed too much and forgot to reset the history event
number. From Kouichirou Hiratsuka, many thanks!
2005-08-08 01:41:30 +00:00
christos
262f96a2f6 Fix reversed test; from Gerry Swislow 2005-08-03 13:41:38 +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
christos
ee399edc73 Don't forget to initialize h_del; from Julien Torres. 2005-08-01 14:34:06 +00:00
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
lukem
a9beb0e443 Tokenization function enhancements:
* Make tok_init(), tok_end(), tok_reset(), tok_line() and tok_str()
  publically available in <histedit.h>
* Documented the public functions in editline(3)
* Renamed tok_line() -> tok_str()
* Added new tok_line() which takes a "const LineInfo *" instead of
  "const char *" (the former has "cursor" information), and optionally
  return the argv index ("int *cursorc") and offset within that index
  ("int *cursorv").  This means that completion routines can use the
  tokenization code to crack the line and easily find which word the
  cursor is at.  (mmm, context sensitive completion :)
* Fixed TEST/test.c when using "continuation" lines (unmatched quote
  or \ at EOL), and added some more DEBUG messages including highlighting
  where the cursor is (with a `_').
2003-12-05 13:37:48 +00:00
christos
30278e9a57 s/wth/with/ 2003-11-04 13:22:19 +00:00
christos
1b8a2beb0c Fix uninitialized variable. 2003-11-03 03:22:55 +00:00
christos
62a5c8a602 Always use el->el_buffer, because newbuffer could have moved. From
Gerry Swislow gerry at certif dot com
2003-11-02 20:08:41 +00:00
christos
72dc1c2ac9 If the kill buffer is empty return normal. From Gerry Swislow gerry at certif
dot com
2003-11-02 20:07:58 +00:00
christos
d67d488ee2 Handle M- as escape. XXX: should probably select the meta-map instead.
From Gerry Swislow  gerry at certif com
2003-11-02 20:06:57 +00:00
christos
8467a84273 From: Gerry Swislow gerry at certif dot com
1) File name completion should list the files in the current directory
if no text is entered.  The previous version wouldn't list anything if
the text to complete was empty.

2) When listing directories, the entries "." and ".." shouldn't be
shown.

3) The filename completion should be used if the user's
rl_attempted_completion_function doesn't return any matches.  The
previous version didn't do that.
2003-11-02 01:45:14 +00:00
christos
391b46bc7f initialize ptr. 2003-11-01 23:39:22 +00:00
christos
bd39b60424 Explain H_ADD better. from Otto Moerbeek otto at drijf dot net 2003-11-01 23:37:30 +00:00
christos
487a7c2a6c Fixes from Otto Moerbeek otto at drijf dot net 2003-11-01 23:36:39 +00:00
christos
4c93d52c09 Document history builtin commands. 2003-11-01 23:35:33 +00:00
christos
8b40dcaecf Make readline csh-like history work.
From Gerry Swislow <gerry at certif dot com>.
2003-10-27 22:26:35 +00:00
christos
9ee15c697a Another fix for incremental search prev. 2003-10-25 06:42:41 +00:00
christos
52215a07e7 add rl_catch_signals 2003-10-19 06:28:35 +00:00
wiz
2af5f10bcc Bump date for previous. 2003-10-19 01:26:11 +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
acc8915b44 make forward incremental search work better. 2003-10-18 23:27:36 +00:00
christos
e7c6d717ff remove debugging printf. 2003-10-18 22:37:24 +00:00
christos
730f23e551 Allow setty to set chars using char=value 2003-10-18 22:24:34 +00:00
christos
7bd301151f When searching backwards don't include the characters after the cursor in
the search.
2003-10-17 18:49:11 +00:00
wiz
432d3289ba Bump date for previous. Replace > with \*[Gt]. 2003-10-17 15:33:23 +00:00
christos
5d79eff8f5 More libedit readline emulation functions from: Gerry Swislow
<gerry at certif dot com>
2003-10-16 22:26:32 +00:00
christos
99e15c71d0 I got tired of typing a cc line. 2003-10-16 21:41:46 +00:00
christos
a246b45de2 Fix incremental search which was badly busted. 2003-10-16 21:41:26 +00:00
christos
378865a426 don't limit ^c to alpha c, and add VIS_NOSLASH so that vis(3) does not
produce \^c
2003-10-15 18:08:40 +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
wiz
6a6ecd3246 New sentence, new line; bump date for previous. 2003-09-26 21:09:13 +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
tron
e9c2e92b36 Include "sys/ttydefaults.h" to get standard definition of "CTRL" macro
which avoids clash with custom one.
2003-09-15 11:33:33 +00:00
christos
2e7dfdfa24 kludge around CTRL redef. 2003-09-15 01:29:36 +00:00
christos
7fb5c922f1 Match the stupid function pointer declarations with actual readline's 4.0.
This is gross.
2003-09-14 22:15:23 +00:00
christos
7bb332f70b make this compile. 2003-09-14 21:55:39 +00:00
christos
705c04f0bc Avoid pre-ansi warning. 2003-09-14 21:55:19 +00:00
christos
166e18a7fd - provide enough hooks to compile gdb-5.3
- fix el_get(e, EL_TERMINAL, (char **))
2003-09-14 21:48:54 +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
lukem
64b5a0fe7b Add INCSYMLINKS to <bsd.inc.mk> and <bsd.kinc.mk>, and use that instead of
SYMLINKS to install symlinked header files.  INCSYMLINKS are installed with
'make includes'.  This avoids using SYMLINKS and hacks with the 'linkinstall'
target in <bsd.links.mk>, as linksinstall occurs in 'make install' and hacks
to get it to occur in 'make includes' weren't robust, as seen in lib/libdes.

Yet more improvements to bsd.README.
2003-08-03 09:23:14 +00:00
lukem
a93ea220fc Rework how dependency generation is performed:
* DPSRCS contains extra dependencies, but is _NOT_ added to CLEANFILES.
  This is a change of behaviour.  If a Makefile wants the clean semantics
  it must specifically append to CLEANFILES.
  Resolves PR toolchain/5204.

* To recap: .d (depend) files are generated for all files in SRCS and DPSRCS
  that have a suffix of: .c .m .s .S .C .cc .cpp .cxx

* If YHEADER is set, automatically add the .y->.h to DPSRCS & CLEANFILES

* Ensure that ${OBJS} ${POBJS} ${LOBJS} ${SOBJS} *.d  depend upon ${DPSRCS}

* Deprecate the (short lived) DEPENDSRCS


Update the various Makefiles to these new semantics; generally either
adding to CLEANFILES (because DPSRCS doesn't do that anymore), or replacing
specific .o dependencies with DPSRCS entries.

Tested with "make -j 8 distribution" and "make distribution".
2003-08-01 17:03:41 +00:00
lukem
7b3a8b8486 tweak this unconventional (some might say "baroque") Makefile to work
with the new <bsd.dep.mk> *.d semantics.
fixes problems highlighted by Martin Husemann <martin@>
2003-07-31 12:46:00 +00:00
wiz
19aedbe869 Bump date for last. 2003-07-16 11:54:44 +00:00
jeremy
be8ce1d30b Documented the return values from el_get(). 2003-07-14 22:36:22 +00:00
wiz
a8f1dff65a Add Ns. 2003-06-27 18:57:09 +00:00
christos
96759472a4 provide a definition for __attribute__ 2003-06-19 16:19:42 +00:00
christos
9b8791db6c From michael@moria.de:
Fix realloc case where we could be running out of space if too many matches.
2003-06-19 16:04:57 +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
wiz
4ed8aa82ed Use Aq Pa instead of Fd \*[Lt]...\*[Gt]. From jmc@openbsd. 2003-06-06 13:33:17 +00:00
matt
362ac6119e Only return CC_EOF if ^D (VEOF) was the only thing on the line. Otherwise
beep and don't do anything else.  This mimics the behavor of ^D outside in
normal terminal mode.  (^D in vi scrolls forwards and as such isn't
appropriate to emulation)
2003-06-04 20:14:05 +00:00
wiz
f30ce359ce setup -> set up, from jmc@openbsd. 2003-05-14 07:24:21 +00:00
christos
23e52df103 add a missing dependency (John Gordon) 2003-05-08 13:22:05 +00:00
christos
3a7857f16d Use ${HOST_SH} 2003-05-08 13:20:44 +00:00
wiz
472351e13d Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.
2003-04-16 13:34:34 +00:00
perry
702861031b em-gosmacs-traspose->em-gosmacs-transpose (Igor Sobrado, PR misc/19909) 2003-03-31 16:52:42 +00:00
wiz
0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +00:00
christos
80a839beda don't use the path for awk 2003-03-10 21:21:10 +00:00
christos
687b5d51e3 s/u_int32_t/unsigned int/ 2003-03-10 21:18:49 +00:00
dsl
25456aecdb Put the __weak_extern() back inside vi_alias, but after the extern for
get_alias_text().
2003-03-10 11:09:25 +00:00
he
d5428a2906 Move the __weak_extern() (ifdef'ed) outside of the vi_alias()
function, so that this compiles again.
2003-03-10 09:55:10 +00:00
christos
1d6595e599 null is not 0 2003-03-10 01:14:54 +00:00
christos
2ffae6453d if no __weak_extern, don't even try to do vi_alias. 2003-03-10 01:14:07 +00:00
christos
61c24e2c2a fix uninitialized variable.
grr, I want gcc-3.3
2003-03-10 01:05:12 +00:00
christos
5f1f221c24 sig_t is non portable 2003-03-10 00:58:05 +00:00
christos
23dbd749a2 - include cdefs.h early in the game
- ifdef notdef the sunos stuff
- no need for sig_t
2003-03-10 00:57:38 +00:00
christos
bdc91aaf9a include alloca.h for systems that need it. 2003-03-10 00:56:38 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
wiz
831ba492c3 Replace -1 with \-1 for PostScript output; drop a trailing space and fix two typos. 2003-01-21 23:00:56 +00:00
christos
f24857bf36 Add a uniquefier for the history function. 2003-01-21 18:40:23 +00:00
christos
98e93eb66e fix directory descriptor leak [from michael at moria dot de] 2003-01-21 17:41:38 +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
d10066b927 de-lint 2002-11-15 14:33:53 +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
thorpej
f53bc0b607 Fix signed/unsigned comparison warnings. 2002-11-12 00:01:21 +00:00
thorpej
aa27d116a6 Avoid strict alias warning. 2002-11-12 00:00:23 +00:00
christos
905b699ab7 support for % command [matching parens/brackets/braces] on vi modes.
From David Laight, thanks!
2002-10-31 02:01:46 +00:00
christos
05e3eaeb34 remove unused variables. 2002-10-27 21:43:35 +00:00
christos
a17c7fe4a6 vi mode and memory fixes from david laight. 2002-10-27 21:41:50 +00:00
christos
e6ee03013b don't crash in memory shortage conditions. 2002-10-27 20:24:28 +00:00
christos
8572d89c2c PR/17954: SAITOH Masanobu: since we have opost and onlcr set, we don't need
to output \r to go to the end of line; \n is enough. From David Laight.
2002-10-27 20:04:36 +00:00
christos
4a964eaf87 write the vis(3) converted string into the file, not the original one.
Noted by Tim Robbins. Hi luke!
2002-10-13 17:15:53 +00:00
wiz
489a979d23 empty, not emptry. By Adrian Mrva. 2002-10-02 11:06:11 +00:00
wiz
28128e0592 New sentence, new line. From Robert Elz. 2002-10-01 19:03:15 +00:00
lukem
ec5dbc56b8 Explicitly move setting of NOxxx and USE_SHLIBDIR to the top of the
Makefile (before including <bsd.own.mk>)
2002-08-19 14:55:14 +00:00
lukem
91d06a031b More use of ${NETBSDSRCDIR}/some/path instead of ${.CURDIR}/../../some/path 2002-08-19 13:35:05 +00:00
yamt
de6b808960 reflect reality.
(3rd arg of el_parse is const.)
2002-08-18 07:23:21 +00:00
soren
642c31b4a3 Remove extraneous \n's in {err,warn}{,x}. 2002-08-09 10:01:53 +00:00
thorpej
4f7523a4cc _rl_qsort_string_compare(): Fix casts. This makes gcc 3.2 happy,
and also allows both LINTED comments to be removed.
2002-04-09 01:57:34 +00:00
christos
8a47c9318b make sure this compiles cleanly and works. 2002-03-23 23:39:18 +00:00
christos
b2b9c150ac Add a couple linted comment and enable WARNS=3 2002-03-18 16:20:36 +00:00
christos
aef033dfd3 oops, we need config.h now. 2002-03-18 16:19:03 +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
wiz
fba3aac827 Close quoting. 2002-02-20 11:54:16 +00:00
ross
814f296b77 Generate <>& symbolically. 2002-02-07 07:00:09 +00:00
christos
daf8abfc47 Fixed an __P remnant 2002-02-03 23:37:53 +00:00
christos
e09118a532 Don't use HAVE_ yet. 2002-02-03 23:37:19 +00:00
christos
06968e10a6 Fix a warning. 2002-02-03 23:30:03 +00:00
christos
910773a8f9 don't forget to re-adjust the limit. 2002-01-31 02:27:31 +00:00
christos
a4b0370f1d make pointer arithmetic more palatable. 2002-01-31 00:25:33 +00:00
wiz
2fc1ec38f2 Punctuation nits. 2002-01-15 02:46:44 +00:00
wiz
a0d025c5d3 Punctuation and whitespace nits, fix a typo. 2002-01-15 02:46:22 +00:00