Age | Commit message (Collapse) | Author |
|
6.4-20230826 (from 5.7-20081102).
Based on result from Thomas Dickey's ncu2openbsd script and then
modified. Switches to the upstream tput. Major bump for the ncurses
libraries and for libedit and libreadline.
Help from tb, millert.
ok deraadt sthen
|
|
ok miod@ millert@
|
|
jmc@ dislikes a comma before "then" in a conditional, so leave those
untouched.
ok jmc@
|
|
in the most concise way i managed to come up with;
suggested by martijn@ and OK millert@ martijn@
|
|
and garbage collect an automatic variable that is no longer needed
and a comment that was probably contributed by Capt. Obvious.
No functional change.
OK millert@ martijn@
|
|
If the calling program sets this flag, that is (1) either a bug
(or at least needless) (2) or clearing it in el_wgets(3) will break
other functionality of the calling program if it really requires it.
In both cases, treating EAGAIN as a fatal error in el_wgets(3) is
better than brushing the issue under the carpet: at least it tells
the program author that something is amiss.
Instead of attempting automatic repairs that will almost never do
the right thing, clearly state in the manual page that the editline(3)
library is not designed to work with non-blocking I/O.
The problem was found while investigating a bug report
from deraadt@ in sftp(1).
OK millert@ and "mostly OK" martijn@
|
|
errno == EINTR. There was a race here where read(2) can return with a
different errno, but the signal handler enters between the read return and
the switch, which could result in handling a signal, while we should be
handling the error.
This fix assumes that signal handlers don't clobber our errno, but doing
that would open a whole other can of worms.
OK schwarze@, millert@
|
|
the first signal received. No change for SIGCONT and SIGWINCH, but for
other signals, return to the application program and let that program
decide what to do, typically either exit or provide a fresh prompt.
Bug originally reported by deraadt@ regarding behaviour of Ctrl-C
in sftp(1). With this patch, sftp(1) no longer ignores Ctrl-C but
exists, and the same applies to a few other programs. Some others
that used to ignore Ctrl-C now provide a fresh prompt instead.
For several, behaviour is unchanged. At this point, i'm not aware
of a serious regression in any program.
OK deraadt@ martijn@ and no objection from millert@.
Patch also tested by claudio@ with bgplgsh(8).
|
|
Also, no need to clear O_NDELAY with fcntl(F_SETFL)
when ioctl(FIONBIO) is called right afterwards.
No functional change intended.
OK martijn@
|
|
|
|
terminate to read buffer. This fix the bug that does not run input
command entered by vi editor. This fix is come from NetBSD
lib/libedit/vi.c 1.46 and 1.47.
ok schwarze@ deraadt@
|
|
when launch the vi editor in vi mode. This fix is similar 1.63 from
NetBSD lib/libedit/vi.c.
OK schwarze@ yasuoka@
|
|
ok yasuoka@
|
|
problem a crash happens after the window size change.
Worked and discussed with asou and schwarze.
ok schwarze
|
|
value < 0. errno is only updated in this case. Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.
|
|
|
|
lib/libedit/chartype.c via FreeBSD. From tj@
ok tb
|
|
Previously they tried to depend on libtermcap which actually doesn't
exist in the objdir.
ok jca
|
|
avoiding runtime failures on architectures using ld.lld. Also add a note to
libcurses shlib_version reminding about bumps (as done with libcrypto/libssl).
Thanks guenther@ for suggestions of tests involving library bumps and jca@
for doing these tests and hint about DPADD.
Looks good kettenis@, ok jca@
|
|
line so it gets initialized properly. Fixes a crash in bc with
MALLOC_OPTIONS=UJ. OK deraadt@, committing on behalf of yasuoka@
|
|
any longer; ok espie@ deraadt@
|
|
never get NUL-terminated and cause read buffer overruns.
This fixes for example segfaults in sftp(1) that could be triggered
by typing in an extremely long string (more than one line - the longer,
the likelier to crash), then hitting backspace once.
Problem reported and patch OK'ed by sthen@.
|
|
okay millert@
|
|
OK espie@
|
|
programs will build even without a make depend first.
okay tb@ millert@
|
|
ok deraadt
|
|
contained more than twice as many entries as the new limit: The
argument of remove_history() only counts existing elements, not
those previously deleted.
Crash found by bentley@ when exiting sqlite3(1).
|
|
OK czarkoff@
|
|
Restoring the original errno found in el_wgetc() after
el_wgets() did some cleanup that may have changed errno.
Improve clarity and robustness of the code by not setting and
inspecting el_errno where it isn't needed; in particular, let
keymacro_get() properly report read failure to read_getcmd().
Move el_errno to el_read_t because it's only used in read.c.
Never set errno back to zero.
Checked with a test program installing a USR1 signal handler
without SA_RESTART, for the cases read_getcmd(), ed_quoted_insert(),
keymacro_get(), ed_command(), and EL_EDITMODE=0.
OK czarkoff@
|
|
I'm debugging the read module for weeks now,
but these ifdefs aren't helpful.
OK cpp(1).
|
|
Stop the read.c module from poking the el_chared.c_macro data
structure that used to belong to the chared.c module. Given that
no other module, not even chared itself, is using that data, move it
into the read modules's own opaque data structure, struct el_read_t.
That gets rid of one struct, one #define, one struct member, and one
function argument in the chared.h interface.
OK czarkoff@
|
|
Improve precision in the description of the "bind" builtin command.
Tweak terminology to better match editline(7).
|
|
return values.
|
|
document the return values, expand the list of affected functions, warn
against using EL_GETCFN, and clarify some wording and notation.
|
|
from the private header "read.h" to the public header <histedit.h>.
That's not an interface change, it was already used and documented
publicly, merely not properly declared.
Improve encapsulation: Make el_read a pointer to an opaque struct
in struct editline, such that "read.h" no longer needs to be included
from "el.h" but only from the two files using it, read.c and el.c.
Only pass the required el_read_t to el_read_{s,g}etfn(),
do not pass the full struct editline.
OK czarkoff@,
also proofread by Christian Heckendorf <mbie at ulmus dot me>.
|
|
Simplifies the build system and prevents modules
from stomping on each other's static symbols.
Based on a hint from guenther@,
using feedback from kettenis@ and deraadt@.
|
|
* The meaning of "next" and "previous" is exchanged in readline(3) with
respect to editline(3); this part of the patch from Bastian Maerkisch.
* next_history() can move beyond the newest entry; issue pointed out
by Bastian Maerkisch, fix by me.
While here, make the documentation of ed-next-history, ed-prev-history,
H_NEXT, and H_PREV more precise.
OK czarkoff@.
|
|
* Respect history_base.
* Bail out early for arguments that are too small.
* Select entry by readline offset, not by editline event number.
* Restore history cursor in case of failure.
This fixes the test_remove() regression test.
Based on a patch from Bastian Maerkisch <bmaerkisch at web dot de>.
Dmitrij Czarkoff pointed out a flaw in it that i fixed.
OK czarkoff@.
|
|
Based on a patch from Bastian Maerkisch <bmaerkisch at web dot de>,
with an additional fix for a memory leak by me.
OK czarkoff@
|
|
Return 0 for the oldest entry and increment by 1 for each newer,
non-deleted entry.
This fixes the test_where() regression test.
Patch from Bastian Maerkisch <bmaerkisch at web dot de>.
OK czarkoff@.
|
|
Patch from Bastian Maerkisch <bmaerkisch at web dot de>
with a minor tweak from Christos Zoulas.
Fixes the test_set_pos_return_values() regression test.
OK czarkoff@,
also proofread by zhuk@ and by Christian Heckendorf <mbie at ulmus dot me>.
|
|
|
|
included only in the one file needing it, "map.c".
That allows to define el_action_t directly in "map.h",
which in turn allows to stop including "fcns.h" from "el.h"
and include it only in the modules needing it.
Now we no longer autogenerate any C files.
Feedback and OK martijn@.
First version also proofread by Christian Heckendorf <mbie at ulmus dot me>.
|
|
and include it only in the one file needing it, map.c.
Also delete makelist -bc.
OK martijn@, also proofread by Christian Heckendorf <mbie at ulmus dot me>
|
|
constant and very short and simple. Check them into CVS rather
than generating them at build time in a complicated way.
OK martijn@, also proofread by Christian Heckendorf <mbie at ulmus dot me>
|
|
Otherwise, if you called ed-search-prev-history before doing any
history search but after entering at least one line into the history,
the buffer could get accessed uninitialized, potentially resulting
in a read buffer overrun.
Segfault reported in sftp(1) via djm@ by Alf Schlichting <A dot
Schlichting at lemarit dot com>, who also confirmed that the patch
fixes the issue for him.
OK martijn@ czarkoff@
|
|
ok martijn@
also checked by Christian Heckendorf <mbie at ulmus dot me>
|
|
in programs like ftp(1), sftp(1), bc(1), and cdio(1) that use libedit.
The existing editrc(5) manual only explains customization, and the
existing editline(3) manual only explains the C language interface.
Already listing all editor functions and all default key bindings, but
in other respects, not 100% complete yet, and due to the sheer size,
some bugs may have slipped, but all that can be fixed in the tree.
OK and tweaks jmc@.
Also seems reasonable to Christian Heckendorf <mbie at ulmus dot me>.
|
|
no functional change, minus hundred lines of code.
OK martijn@;
also proof-read by Christian Heckendorf <mbie at ulmus dot me>.
|
|
OpenBSD read.c rev. 1.4 1997/06/10 20:10:13 millert
FIONREAD takes int *, not long *
It got lost in the following merge from NetBSD:
OpenBSD read.c rev. 1.10 2003/10/31 08:42:24 otto
OK millert@ martijn@
|