Commit Graph

151 Commits

Author SHA1 Message Date
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
lukem 78b73237b4 fix compile errors if FIONREAD is defined. noted by
David Holland <dholland@bordeaux.eecs.harvard.edu> in [bin/4012].
1998-01-21 10:12:22 +00:00
perry 93db5caa95 RCSID Police. 1998-01-05 07:41:06 +00:00
christos c49189ae41 Small optimization. Don't call isatty() on every invocation of el_gets, but
remember if the tty setup failed... Also trim the input line of trailing \r's.
1997-12-20 19:15:50 +00:00
thorpej c8160e6ecd Un-"protect" term_beep() and rename it to __term_beep() to keep it out
of the user's namespace.  We need to do this because the readline
emulation functions call term_beep(), but readline isn't built using
the same (funky) namespace-protection method as the rest of libedit (it's
included like a normal library object).

Without this (fairly disgusting) hack, any program linked against
libedit will fail to link with an unresolved reference to term_beep()
if using an Elf toolchain (e.g. on the Alpha).

XXX Why this doesn't happen with NetBSD's a.out toolchain is a mystery
XXX to me, and I'm not sure I really want to know (given that a.out
XXX _should_ break the same way as Elf does in this case).
1997-11-13 04:48:48 +00:00
thorpej 285ed31737 Build readline.o into debugging versions of libedit, too. 1997-11-13 04:43:07 +00:00
thorpej 142a4c50c4 el_gets() takes an int *, not a size_t *. 1997-11-12 21:56:05 +00:00
lukem 94c2aad7df move description of history() return value 1997-11-09 00:13:52 +00:00
christos cc6167153e Make el_gets() work when the input is not a tty. 1997-10-26 20:19:48 +00:00
christos 40ea82f3d5 Make a link for history.h -> readline.h 1997-10-26 20:17:48 +00:00
christos bc7956dee1 Const de-poisoning :-( Unfortunately the default gnu readline does not
have full prototypes... With those changes, and a single line change in
gdb/top.c, gdb links with -ledit
1997-10-23 22:51:59 +00:00
christos f7de801d6c PR/4301: Jaromir Dolecek. Add gnu-readline wrapper for editline. 1997-10-23 22:24:09 +00:00
lukem 3431200c6f make this compile with the new libedit history() 1997-10-23 06:35:42 +00:00
lukem f72bbf3895 use CPPFLAGS instead of CFLAGS, fix building of test 1997-10-23 03:26:27 +00:00
scottr 94cf433266 Add support for DTR/CTS flow control, from Bill Studenmund. 1997-10-20 08:07:47 +00:00
christos a7db9a7942 PR/4257: Jaromir Dolecek: history() has no generic error handling and isn't
reentrant. This changes the interface of the history function, so we need
a major number bump.
1997-10-14 15:05:49 +00:00
lukem 55c1036e4f use <termcap.h> instead of "termcap.h" (which was repository copied to libterm) 1997-10-13 16:09:01 +00:00
mrg 9d66e20f61 termcap.h moves to libterm. 1997-10-13 15:46:30 +00:00
christos e603ef8879 PR/4211: Dave Huang: don't lose VSTATUS and VEOL and any other characters that
are VDISABLED by default.
1997-10-09 19:16:04 +00:00
lukem 5542a7ca43 - define WARNS?=1 in the top-level Makefile.inc, and don't define
anywhere else.
- for now, override WARNS=0 in librpcsvc and libwrap, until they're
  cleaned up
- rcsid police

lib is now clean (except for librpcsvc and libwrap) on the i386, and
this should motivate the other ports to fix any other minor problems
that their compilers pick up that the i386 version doesn't.
1997-10-09 14:36:17 +00:00
jtc 990a11b9c6 Fix files using old TNF copyright notice 1997-07-30 23:53:32 +00:00
christos 54fac6850e Fix compiler warnings. 1997-07-06 18:25:21 +00:00
mycroft cc4a1553a1 Eliminate bogus redefinitions of standard targets. 1997-05-09 07:50:03 +00:00
christos 6e4fef04ce editrc -> editline 1997-04-24 20:20:31 +00:00
christos 753977f439 Handle properly the case where the last line in the sourced file does
not have a trailing '\n'. From Jeffrey C Honig.
1997-04-24 18:54:16 +00:00
christos 9593d7acb3 Return -1 if the terminal set operation resulted in dumb terminal settings. 1997-04-11 22:40:06 +00:00
christos 5b7cd46de3 Don't allow CSWTCH to interfere with CSUSP on __SVR4 systems. 1997-04-11 21:38:02 +00:00
christos eb54427340 Portability fixes:
__const		-> const
BADSIG		-> SIG_ERR
int flags	-> u_int flags
#if __STDC__	-> #ifdef __STDC__
1997-04-11 17:52:44 +00:00
christos 8259dd08d6 Makefile cleanups:
use INCS variable to install includes and FILES to install objects.
1997-03-24 22:11:48 +00:00
christos 3ff63340c3 Fix potential stack overflow; from Keith Bostic. 1997-03-20 16:42:32 +00:00
mrg 9cd5492c02 - convert unsafe strcpy(), strcat() and sprintf() to the `n' versions.
- some KNF.
1997-01-23 14:01:45 +00:00
lukem e69e9fbfa5 fix el_source() - a block needed braces around it (the indenting fooled me) 1997-01-17 01:03:33 +00:00
lukem 730be84dfc Implement CC_REDISPLAY, which (unlink CC_REFRESH) redraws the entire input
line (a la ^R). This is useful if the binding outputs information and
mucks up the input line. To be used in ``list-choices'' bindings (refer
to the ^D binding in csh when filec is set)
1997-01-14 04:17:22 +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
thorpej 7f9ea0f2ed Use ${INSTALL}. 1996-10-18 05:45:01 +00:00
jtk ab5dfe6dc8 merge bugfix from 1.2 branch: use includes target for include files 1996-06-01 19:59:30 +00:00
christos 95b0e87b48 Added history load and save to file functions. 1995-10-15 19:42:05 +00:00
cgd ac2f3dfca6 be a bit more careful when splitting pathnames 1995-06-07 05:52:12 +00:00
christos 42c2892cc9 Fixed the key mapping code and reverted Charles' changes. 1995-04-29 20:44:00 +00:00
mycroft c1a3077d03 Remove dead code that can't possibly work. 1995-04-27 04:49:26 +00:00
mycroft 4d13217262 Trivial code ordering change. 1995-04-27 03:59:38 +00:00
mycroft e94c4d1ac4 Fix typo. 1994-10-07 11:40:53 +00:00
mycroft 5251d09ee1 Don't even *try* to print out the name of the termcap file; it's hidden
in libtermcap, and it normally uses the DB file anyway.
1994-10-02 04:27:28 +00:00
mycroft 5e53b2b629 Nuke bogus baud rate conversion code. 1994-10-02 04:23:08 +00:00
jtc 68523b5d88 Added code so that POSIX.2 regular expresion functions are used if REGEX
is defined, V8 regular expresion functions are used if REGEXP is defined,
and BSD regular expression functions are used if neither are defined.
And defined REGEX in sys.h so that programs using libedit don't have
to link with libcompat.
1994-10-02 02:10:48 +00:00
cgd b7cc0db103 fix for pr 420, from Christos. 1994-08-30 15:16:44 +00:00
cgd 139cb3d7c5 local 1994-05-06 06:17:44 +00:00
cgd 6dc2f1db52 libedit! 1994-05-06 06:01:42 +00:00