Commit Graph

126 Commits

Author SHA1 Message Date
lukem 6592086aee - generate ansi prototypes instead of using __P(). noted by christos
- fix a couple of comments
2000-09-04 23:45:18 +00:00
lukem e4b166ade0 convert to new style guide 2000-09-04 23:36:41 +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
lukem f5e2e0bfea history_def_set has a `const int' as a third arg, not an `int'.
picked up by the ultrix compiler, reported by simonb@ ...
2000-08-29 07:04:32 +00:00
mrg 7f59d8e891 use .tmp temporaries for generated files, to avoid having failed generated
output being used.
2000-08-15 12:01:40 +00:00
chuck c23199d5e1 make xxgdb and a gdb linked with libedit's readline emulation work
properly together.   xxgdb communicates with a gdb running on a pty
that it sets to -echo,-onlcr prior to forking the gdb process.
GNU readline preserves the -echo setting while libedit was undoing it
(setting the tty to a sane state and totally confusing xxgdb's parser).

this diff simply disables libedit if both readline emulation and
"stty -echo" are used/set.   that is enough to make xxgdb work once
again, but (XXX) this is not how GNU readline handles stty -echo (it
does not echo anything, but editing commands like ^A,^K, etc.
still work), so the readline emulation isn't perfect.

change reviewed by christos.
2000-08-02 03:36:39 +00:00
sommerfeld 01d7e8693f Only look in home directory for .editrc. (Discussed with Christos.) 2000-06-28 20:37:44 +00:00
lukem 78dc0c22fa * add -m option to makelist, which generates an mdoc table with the key
bindings and their descriptions
* manually add the output of 'sh ./makelist -m vi.c ed.c common.c' to
  a new section in editrc(5) called `EDITOR COMMANDS'
2000-06-21 03:21:28 +00:00
lukem fd194fea27 use strtol() (instead of atoi()) for sane error detection 2000-06-02 13:37:12 +00:00
christos cd8eacbb27 don't dump core on empty files. 2000-05-15 12:15:38 +00:00
soren 89c5a767f8 Fix doubled 'the's. 2000-03-13 22:55:05 +00:00
jdolecek 371967cec8 Fix _rl_compat_sub() to really honour 'globally' flag instead
of making the substitution always globally - affects
	_history_expand_command() and in turn history_expand()

All praise lint :)
2000-03-10 13:06:43 +00:00
jdolecek 833166a288 readline(): don't dereference NULL pointer if prompt is NULL
history_tokenize(): avoid stepping too far if backslash is last character
	on the passed string
update some comments

This makes gdb \ escaping work reliably and fixes lib/9511 by Assar Westerlund.
2000-03-10 12:55:15 +00:00
jdolecek 1f0ecc5ce4 include <stdlib.h> to get definition of malloc() and free(), so it's
possible to compile this file separately when debugging
2000-03-10 12:25:47 +00:00
chopps fe7be4eb7b el_insertstr takes a "const char *" not "char *" now as it doesn't modify
the argument.
2000-02-28 17:41:04 +00:00
mycroft 05fc321ebf Fix refresh glitches when using auto-margin. 2000-02-19 09:08:16 +00:00
christos 0dded5f65c Add support for automatic and magic margins (from tcsh)
This makes the rightmost column usable on all programs
that use editline.
2000-01-20 22:56:21 +00:00
christos 6c14e6198e PR/9244: Kevin Schoedel: libedit dumps bindings inconsistently 2000-01-19 18:31:10 +00:00
christos b2309a74ae PR/9243: Kevin Schoedel: libedit ignores repeat count 2000-01-19 18:30:19 +00:00
lukem 850279f2b9 missing , 1999-11-26 18:38:27 +00:00
lukem 1f11bc4cc8 instead of using a private coord_t global variable to store the size of the
rprompt, use the previously unused coord_t el->el_rprompt.p_pos
1999-11-13 11:32:12 +00:00
lukem 509864fa8f - implement printing a right-side prompt. code derived from similar work
I wrote for tcsh(1) three years ago.
- implement EL_RPROMPT, which allows a setting/getting of a function which
  returns a string to be used as the right-side prompt.
- improve HISTORY and AUTHORS sections in editline(3).
- bump shlib minor version for EL_RPROMPT.

XXX: due to an implementation issue, the rprompt has a 1 space gap before the
     edge of the logical screen. editline's logical screen is 1 space less
     than the full screen width, so there's a 2 space gap between the rprompt
     and the right end of the physical screen. i'm not concerned about this.
1999-11-12 01:05:07 +00:00
lukem e7d4e16bdf Fix pointer arithmatic (caused problems on LP64, including ftp dumping
core when `edit' was turned off then on).
Problem solved by David Huggins-Daines <dhd@eradicator.org>
1999-10-24 04:04:13 +00:00
jdolecek 7c714abab4 don't assume locales are not working - it may not be the case
re_refresh(): cast the character passed to re_addc() to unsigned char,
        so we don't end up calling isprint() with negative value
        when chars are signed and character value is >= 128
1999-10-15 17:01:19 +00:00
lukem 332ab876a2 update post change to return value of tputs() third argument 1999-10-04 23:24:04 +00:00
lukem 65c98beb1a remove some lint 1999-10-04 23:23:21 +00:00
lukem 9962715a2e apparantly need <unistd.h> for portable way of getting _POSIX_VDISABLE 1999-09-26 14:37:47 +00:00
lukem 8494e0e800 * in el_source():
- don't reopen fp if it was successfully opened in a previous check
	- use strlcpy()/strlcat() instead of snprintf() to build a pathname,
	  since the former are more portable to other systems than the latter
* whitespace fascism
1999-09-21 00:55:55 +00:00
lukem 250f2917a0 fix id header... 1999-09-21 00:07:03 +00:00
lukem 1dbb61e63e more whitespace fascism 1999-09-20 23:43:42 +00:00
sommerfeld 15b8b5a50b minor tweak to previous fix: don't spuriously truncate final newline
under emacs.
1999-08-08 01:25:05 +00:00
sommerfeld 3e32553f0b Fix PR7685 (gdb under emacs prints spurious ^M and messes up terminal)
plus a few bogons noted along the way:
	1) Set EDIT_DISABLED if terminal type is emacs.
	2) fix bug in NO_TTY mode which caused it to not notice CR or LF
	3) implement EDIT_DISABLED within libedit to be somewhat like NO_TTY,
		except that a prompt is printed first.
1999-08-02 01:01:55 +00:00
christos 9453db6b2d Use LIBEDITDIR instead of CURDIR so we can use that Makefile to compile
libedit from another directory.
1999-07-06 14:10:21 +00:00
lukem 87c1844d34 don't try to free() something allocated with alloca() in rl_complete_internal().
(noticed while using completion in gdb and getting inundated with warnings from
the new free())
1999-07-03 11:55:51 +00:00
simonb 1528b77539 More trailing white space. 1999-07-02 15:14:07 +00:00
christos c3f0ff041d Make this compile under linux 1999-06-12 18:58:05 +00:00
garbled 38c96853cf Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Wheee!
1999-03-22 19:44:33 +00:00
mycroft b59b039954 Add missing , in he_errlist[] initializer. Yay lint. 1999-03-06 00:17:25 +00:00
itohy 0abd947255 Add minimal dependency to make "make depend" optional
after cleandir.
1999-03-04 11:45:22 +00:00
abs edc1a24a56 Add a note to update src/distrib/sets/lists/base/shl.*, and add a missing
RCS Id.
1999-02-25 08:02:19 +00:00
christos 468bdc50fc PR/6957: Wolfgang Helbig: libedit swaps CR and LF control chars. 1999-02-07 14:34:05 +00:00
christos 571b899770 delint. 1999-02-05 20:53:49 +00:00
christos 84ee55f13e Encode the history lines using strvis() before saving it. Fixes gdb history
problem with missing newlines.
1999-02-05 20:52:23 +00:00
christos 0d4dea9233 M-X:<enter> core-dumped. 1999-02-05 20:38:01 +00:00
kleink 3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
lukem ddfeeeebfd fix history() prototype. (d@openbsd.org) 1999-01-05 22:46:22 +00:00
kleink 37709da758 Change multiple inclusion protection symbol name to NetBSD convention which
doesn't violate namespace rules.
1998-12-20 17:52:01 +00:00
christos a6d4afba22 delint 1998-12-12 20:08:21 +00:00
christos a0be074d8b many problems; variables hidden by others, size_t <-> confusion 1998-12-12 19:54:16 +00:00
christos 61df62e6a8 - missing error message from array could cause core dump
- delint
1998-12-12 19:52:51 +00:00