Commit Graph

20 Commits

Author SHA1 Message Date
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 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 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
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
christos f24857bf36 Add a uniquefier for the history function. 2003-01-21 18:40:23 +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
jdolecek 86ebf640b0 sprinkle couple const 2001-01-23 15:55:30 +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
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
simonb 1528b77539 More trailing white space. 1999-07-02 15:14:07 +00:00
christos 0d4dea9233 M-X:<enter> core-dumped. 1999-02-05 20:38:01 +00:00
christos a6d4afba22 delint 1998-12-12 20:08:21 +00:00
lukem f87d250404 * add more checks for NULL pointers in passed arguments
* implement el_get(EditLine *, int op, void *result), which does the
  inverse of el_set()
* add EL_EDITMODE operation to el_set and el_get; if non zero editing
  is enabled (the default).
* add "edit  on | off" editrc command, which modifies EL_EDITMODE.
  users can now add '*:edit off' in ~/.editrc as an advisory to
  disable editing.

NOTE: at this time EL_EDITMODE is just an indication of the
state of the 'edit' command. It's up to the application to check
this after el_source() or el_parse() to determine if editing is still
required.
1998-07-29 02:26:00 +00:00
lukem 63177b84ae in el_parse(), use a temporary buffer to store the program name when
comparing, preventing trashing of argv[0]. remove note in man page
warning of former behaviour.
1998-01-21 11:12:34 +00:00
christos 54fac6850e Fix compiler warnings. 1997-07-06 18:25:21 +00:00
lukem 5785f63611 * document ^char and \ escape sequences
* when parsing ^char control chars, check the correct char when determining
  validity (previously, ^char was a NOP interpreted as the literal string
  because of this bug)
1997-01-11 09:57:06 +00:00
lukem 2543e3e651 RCSid police
editline first appeared in 4.4BSD not NetBSD1.0
1997-01-11 06:47:47 +00:00
lukem 258ebfd268 * in el_parse(), don't reference argv[0] if argc < 1 (return -1 instead)
* clarify return value of el_parse()
1997-01-11 06:26:30 +00:00
lukem b59d3eaf10 * add a man page for the editline routines
* add a man page describing editrc
* fix bugs in el_parse():
	* didn't execute command when program name matched (test reversed)
	* was checking against empty string instead of program name
	* after checks, command to run also pointed to empty string

[christos - the author of libedit - ok-ed the man pages in general (which I
 wrote from scratch by RTFS) as well as the bugfix]
1997-01-09 13:12:14 +00:00
cgd 6dc2f1db52 libedit! 1994-05-06 06:01:42 +00:00