| Commit message (Collapse) | Author | Files | Lines |
|
ok kettenis@
|
|
NetBSD rev. 1.68 2012/09/10 christos (bugfixes from Steffen Nurpmeso)
* el_wgetc(): set el_errno after read_char() failure
* el_wgets(): flag error condition after read_getcmd() failure
NetBSD rev. 1.69 2012/09/11 christos (bugfix from Christos Zoulas)
* read_getcmd(): return failure after el_wgetc() failure
NetBSD rev. 1.75 2016/02/12 christos (cleanup from Christos Zoulas)
* read_getcmd(): use a constant rather than a magical number
|
|
|
|
1. Add the missing <errno.h> to sig.c.
2. Do not include standard headers from private headers "chared.h"
and "el.h", include them directly where needed.
3. Delete a few needless inclusions of <ctype.h>.
4. Sort the standard headers.
5. Delete _GNU_SOURCE weirdness from histedit.h, that file doesn't even
need the access to wcsdup(3) mentioned in the comment.
6. Delete some trailing blanks and blanks before tabs.
OK czarkoff@
|
|
OK czarkoff@
|
|
1. Do not include private headers from "chared.h", "hist.h", "prompt.h",
"refresh.h", "search.h", "sig.h", "terminal.h", "tty.h".
The only private header having to include other private headers is "el.h".
2. Do not include "common.h", "parse.h", "help.h" from "el.h",
and do not include "emacs.h" and "vi.h" from "chared.h",
include them directly where needed.
3. Do include "fcns.h" from "el.h" because el_func_t is needed for "map.h".
4. Do not include private headers again that are already included by "el.h".
5. Include private headers after standard headers.
OK czarkoff@
|
|
OK czarkoff@
|
|
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.
|
|
|
|
"the" with the obviously intended word.
Started with a "the the" spotted by Mihal Mazurek.
|
|
pass traffic, and has not panic'd my machine when I unplug it. Test feedback and OK stsp@, and OK mpi@
|
|
Remove Makefile.inc and inline rules to produce LC_CTYPE for UTF-8.
ok guenther@ stsp@
|
|
so no need to include share/locale/ctype/Makefile.inc to get it.
ok guenther@ stsp@ (who had the same diff)
|
|
|
|
ok jmc
|
|
OK mikeb@
|
|
|
|
address of the new thread
|
|
|
|
|
|
move their definitions and initialization in static links to libc.a
Make crt0 always invoke a new func _csu_finish() in libc to process the auxv
and to either register the ld.so cleanup function (in dynamic links) or
initialize environ and __progname and do MC_DISABLE_KBIND (in static links).
In libc, get pagesize from auxv; cache that between getpagesize() and
sysconf(_SC_PAGESIZE)
ok mpi@ "good time" deraadt@
|
|
that will be needed and make libpthread work when ld.so/libc.a provide an
initial TIB.
|
|
portion like crt0 does. This is prep for eliminating _dl_fixup_user_env()
Mark almost everything in resolve.h as hidden, to improve code generation.
ok kettenis@ mpi@ "good time" deraadt@
|
|
ioctl(fd, FIONBIO, ...). OK krw@
|
|
Spotted by deraadt@
|
|
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@
|
|
checking for source availability in udp6_output().
Ok jca@ bluhm@
|
|
|
|
|
|
OK uebayasi@
|
|
Remove some now useless "#include <ioctl.h>" lines.
Inspired by & ok millert@
|
|
special error handling in sdopen() as temporary hack.
OK krw@
|
|
|
|
|
|
torture tested on amd64, i386 and macppc
ok beck mpi stefan
"the change looks right" deraadt
|
|
local ones to ``nticks''.
(missed in previous)
ok stefan@, deraadt@
|
|
all the local ones to ``nticks''.
ok stefan@, deraadt@
|
|
and the included headers didn't even exist.
ok jsg@
|
|
used and has probably never been used at all. Some included headers
do not even exist.
ok jsg@
|
|
are not used by any of the arm platforms.
ok jsg@
|
|
code because the 2 buffers overlap and in order to solve it then replace
memcpy(3) call by memmove(3)
Issue noticed by Michael Price <michael at ectospheno dot com> who also tested
this diff
OK deraadt@
|