Age | Commit message (Collapse) | Author |
|
and simpler and safer to use. Implemented by Christos Zoulas
following my suggestion, with a bug fix by me.
|
|
|
|
OpenBSD tokenizer.c rev. 1.8 2003/08/11 18:21:40 deraadt
Don't increase amax on realloc() failure.
The original fix got lost in a merge along the way.
This fix from Christos Zoulas via NetBSD tokenizer.c rev. 1.23 2016/02/15.
OK czarkoff@
|
|
directly. This is not a problem because <wchar_t> is required all
over the place anyway, even when WIDECHAR is not defined.
No functional change except that it fixes a few printf(3)
format string issues, %c vs. %lc.
OK czarkoff@
|
|
making the code more readable. Instead, provide an mbrtowc(3)
replacement function in chartype.[hc], files that encapsulate
such system dependencies anyway. No functional change.
OK czarkoff@
|
|
in the generic low-level function read_char().
Until we fully enable UTF-8 support, instead filter out non-ASCII
characters in the more logical place in the high-level function
el_gets(3).
OK czarkoff@.
|
|
On OpenBSD, the effects are to set the return argument to the NUL byte
in case of a read failure (for robustness) and to properly set errno
when the character is out of range and cannot be stored in a byte.
Once we enable UTF-8, this will be needed to avoid returning bogus
bytes for valid Unicode characters.
On systems where the internal representation of wchar_t doesn't
match UCS-4, breakage was potentially even worse.
OK czarkoff@.
|
|
supporting other multibyte locales or having an internal representation
of wchar_t that doesn't match UCS-4.
No functional change on OpenBSD, but it makes the code less confusing.
OK czarkoff@.
|
|
For now, this mainly help programs explicitly using
wide-character functions like el_wgetc(3) and el_wgets(3).
1. After reading an invalid byte sequence, do not throw away additional
valid bytes; fix by me using mbrtowc(3), obsoleting utf8_islead().
2. When read(2) returns EOF, return that information to the caller,
do not prod on and potentially access garbage data in the buffer;
from Linas Vepstas via NetBSD read.c rev. 1.70 2013/05/27.
3. After read__fixio() failure, restore errno to the one set by read();
from Steffen Nurpmeso via NetBSD read.c rev. 1.68 2012/09/10.
4. After read__fixio() success, restore errno to the initial state
upon function entry; fix by me.
OK czarkoff@. Also committed to NetBSD.
|
|
idioms.
Adopt the more concise fcntl(n, F_GETFL) over fcntl(n, F_GETFL, 0)
where it is obvious further investigation will not yield and
even better way.
Obviousness evaluation and ok guenther@
|
|
which is used for extended command input and for vi search mode.
It could be triggered by typing one or more characters, then pressing
backspace once (functional error: the character was deleted from
the screen, but not from the edit buffer) or a few more times than
characters had been entered (segfault).
OK czarkoff@. Also checked by Christos Zoulas.
|
|
hiding the system dependencies away in "sys.h" where they belong.
No binary change on OpenBSD.
Seems reasonable to christos at NetBSD, too.
|
|
|
|
* remove unused ifdef'ed header junk
* remove pointless cast of NULL
* wrap two excessively long lines
|
|
Delete the silly ptr_t and ioctl_t typedefs
and delete some "#ifdef notdef" code from "sys.h".
No functional change.
This makes hist.h identical to the NetBSD version.
It reduces the remaining diff from +1526 -734 to +1430 -592.
OK czarkoff@
|
|
KNF: Remove parentheses from return lines. No object change.
This makes emacs.c and prompt.c identical to the NetBSD versions.
It reduces the remaining diff from +2053 -1261 to +1526 -734.
OK czarkoff@
|
|
no change in the generated source files
|
|
* rename fkey_t to funckey_t and el_term_t to el_terminal_t
* rename struct editline member el_term to el_terminal
* rename many functions in terminal.c from term_*() to terminal_*(),
for consistency with the file name and to not look related to <term.h>
No functional change.
This makes refresh.c and sig.c almost identical to the NetBSD versions.
It reduces the remaining diff from +2446 -1805 to +2053 -1420.
OK czarkoff@
|
|
* Rename some types from *key*_t to *keymacro*_t.
* Rename struct editline member el_key to el_keymacro.
* Rename some functions in keymacro.c from key*() to keymacro*().
This removes the conflict of key_clear(), key_end(), and key_print()
with macros in <term.h>. No functional change.
This makes keymacro.h identical to the NetBSD version.
It reduces the remaining diff from +2640 -1998 to +2446 -1805.
OK czarkoff@
|
|
Rename the files key.[hc] to keymacro.[hc] and term.[hc] to terminal.[hc].
The change makes sense because "term.h" conflicts with <term.h>
and the functions key_clear(), key_end(), and key_print() in "key.h"
conflict with macros in <term.h>.
No content change yet, no binary change in *.o after "strip -d".
This reduces the remaining diff from +4634 -3992 to +2640 -1998.
OK czarkoff@, and mmcc@ agrees with the direction.
|
|
The gettytab(5) and termcap(5) get FILES, others don't need anything.
With input from & okay schwarze@
|
|
|
|
|
|
ok millert@
|
|
"and" and "or" to join sentence clauses, and you can use commas, but both hinders
reading;
|
|
obsolete SIZE_T_MAX. OK miod@ beck@
|
|
review by millert, binary checking process with doug, concept with guenther
|
|
rl_set_keyboard_input_timeout() that was added in this version.
Also crank the minor version.
OK krw@ yasuoka@ deraadt@
|
|
|
|
some of this is already contained upstream in NetBSD,
the rest will be sent there
|
|
reallocarray() where it helps.
ok doug
|
|
|
|
Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.
ok deraadt@
|
|
Avoid potential integer overflow in the size argument of malloc() and
realloc() by using reallocarray() to avoid unchecked multiplication.
ok deraadt@
|
|
|
|
tty.c and fix EL_SETTY to work.
ok nicm
|
|
by NULL. Fix from NetBSD via yasuoka@ but changed by me not to walk off
the end of array with >20 arguments.
ok yasuoka
|
|
to an open file pointer. From NetBSD via Eitan Adler.
ok millert
|
|
ok deraadt@
|
|
members to 64bit types. Assign new syscall numbers for (almost
all) the syscalls that involve the affected types, including anything
with time_t, timeval, itimerval, timespec, rusage, dirent, stat,
or kevent arguments. Add a d_off member to struct dirent and replace
getdirentries() with getdents(), thus immensely simplifying and
accelerating telldir/seekdir. Build perl with -DBIG_TIME.
Bump the major on every single base library: the compat bits included
here are only good enough to make the transition; the T32 compat
option will be burned as soon as we've reached the new world are
are happy with the snapshots for all architectures.
DANGER: ABI incompatibility. Updating to this kernel requires extra
work or you won't be able to login: install a snapshot instead.
Much assistance in fixing userland issues from deraadt@ and tedu@
and build assistance from todd@ and otto@
|
|
compatibility with GNU realine.
ok mikeb@, sthen@, espie@
|
|
chars. Handle return of mbstowcs().
ok nickm
|
|
editrc.5: add FILES for ~/.editrc
patches passed onto net/free
|
|
|
|
ok guenther@
|
|
kill a C++-style comment.
ok nicm@
|
|
corruption reported by LEVAI Daniel <leva at ecentrum dot hu>. Also
rename "bytes" to "wlen" since bytes is not accurate, suggested by
stsp@.
ok stsp oga
|
|
all hail the more strict malloc S flag!
|
|
ok tedu
|
|
ok stsp deraadt
|