Age | Commit message (Collapse) | Author |
|
* Make the return value from read_getcmd() less confusing.
* No need to store that return value; testing it once is enough.
* Get rid of one #ifdef section in el_wgets().
OK czarkoff@ martijn@
|
|
* Delete the unused macro MIN().
No functional change.
OK czarkoff@ martijn@
|
|
OK martijn@
|
|
* not used in tokenizer.c
* only use it for !NARROWCHAR
* no need for underscores before ct_{de,en}code_string()
* make the conversion buffer resize function private
OK martijn@
|
|
ok martijn@
|
|
FUNW, Strlen, Strdup, Strcmp, Strncmp, Strncpy, Strncat -> history.c
Strchr, tok_strdup -> tokenizer.c
FUN, TYPE, STR -> both of these files
OK martijn@
Also proofread by Christian Heckendorf <mbie at ulmus dot me>
who reported some whitespace issues in parse.c.
|
|
from Pedro Giffuni via Christos Zoulas.
|
|
longer needed now that we always compile with wide character support,
reducing code obfuscation.
OK czarkoff@ martijn@.
Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
|
|
OK martijn@.
Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
|
|
using libedit, using code from NetBSD tty.c rev. 1.42, 1.48, 1.49,
1.58, and 1.59. Code mostly by Christos Zoulas, one bug report by
John Hein, one additional bugfix by me (rev. 1.59).
While here, switch t_mode to unsigned char, which is sufficient,
also from NetBSD.
OK martijn@.
Also checked by Christian Heckendorf <mbie at ulmus dot me>.
|
|
No functional change.
ok guenther@
|
|
correctly - logically complete that now by removing MLINKS from base;
authors need only to ensure there is an entry in NAME for any function/
util being added. MLINKS will still work, and remain for perl to ease
upgrades;
ok nicm (curses) bcook (ssl)
ok schwarze, who provided a lot of feedback and assistance
ok tb natano jung
|
|
committing right away because this code is not even compiled by default
|
|
OK schwarze@
|
|
bug reported by David Binderman
http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=50880
fix suggested by me, NetBSD rev. 1.23 and rev. 1.24.
|
|
NetBSD chartype.c rev. 1.23, chartype.h rev. 1.25, eln.c rev. 1.28.
No code change.
|
|
While here, also use \-1 rather than -1; not sure that's really
better, but Thomas is right it should at least be consistent
within a page.
From Thomas Klausner <wiz @ NetBSD>.
|
|
OK czarkoff@
|
|
On first sight, it might look as if this required a bump because
it seems to change the public type el_rfunc_t. But we only compile
with WIDECHAR, and in that case, there is no change in the interface.
This also simplifies some logic by getting rid of the NARROW_READ flag
which was broken anyway.
OK czarkoff@
|
|
Always use el_wgetc(3) internally. In the !WIDECHAR case, casting
the result to (Char) is safe because the function returns a byte
rather than a character in that case.
No functional change except for fixing a printf(3) format string issue
when compiled with DEBUG_READ and WIDECHAR.
OK czarkoff@
|
|
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.
|
|
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;
|