Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
|
#
1.20 |
|
06-May-2016 |
schwarze |
typos in comments; from Pedro Giffuni (FreeBSD) via Christos Zoulas (NetBSD)
|
#
1.19 |
|
11-Apr-2016 |
schwarze |
delete the "private" and "public" preprocessor macros, just use standard C; OK martijn@
|
#
1.18 |
|
11-Apr-2016 |
schwarze |
Clean up chartype.h:
* 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@
|
#
1.17 |
|
11-Apr-2016 |
schwarze |
get rid of the non-standard data type "Char" in almost all files; ok martijn@
|
#
1.16 |
|
11-Apr-2016 |
schwarze |
Move wrapper macros to the two files actually needing them: 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.
|
#
1.15 |
|
09-Apr-2016 |
schwarze |
Delete 26 wrapper macros and two wrapper functions that are no 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>.
|
#
1.14 |
|
09-Apr-2016 |
schwarze |
Always compile with WIDECHAR on and delete that preprocessor switch. OK martijn@. Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
|
#
1.13 |
|
22-Mar-2016 |
schwarze |
format string fixes in debug code; committing right away because this code is not even compiled by default
|
#
1.12 |
|
21-Mar-2016 |
schwarze |
Christos Zoulas just rescinded clauses 3 & 4 of his licenses, see NetBSD chartype.c rev. 1.23, chartype.h rev. 1.25, eln.c rev. 1.28. No code change.
|
#
1.11 |
|
21-Mar-2016 |
schwarze |
Make the read_char() function always take a wchar_t * argument.
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@
|
#
1.10 |
|
20-Mar-2016 |
schwarze |
Cleanup of standard header inclusion:
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@
|
#
1.9 |
|
20-Mar-2016 |
schwarze |
Delete the useless Int datatype and always use the standard wint_t 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@
|
#
1.8 |
|
20-Mar-2016 |
schwarze |
Get rid of "#ifdef WIDECHAR" and one goto in read_char(), 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@
|
#
1.7 |
|
20-Mar-2016 |
schwarze |
Fix the public interface function el_getc(3). 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@.
|
#
1.6 |
|
20-Mar-2016 |
schwarze |
Fix the CHARSET_IS_UTF8 case in read_char(). 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.
|
Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE OPENBSD_5_9_BASE
|
#
1.5 |
|
17-Oct-2014 |
deraadt |
Remove non-exposed malloc/realloc/free wrappers, and then substitute reallocarray() where it helps. ok doug
|
Revision tags: OPENBSD_5_0_BASE OPENBSD_5_1_BASE OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE OPENBSD_5_6_BASE
|
#
1.4 |
|
07-Jul-2011 |
nicm |
Enable wide character functions in libedit (not the other libe*t).
ok stsp deraadt
|
#
1.3 |
|
07-Jul-2011 |
okan |
sync with upstream, retaining local modifications.
ok nicm@
|
#
1.2 |
|
04-Apr-2011 |
stsp |
Make wcwidth() callers cope with -1 return value. Doesn't affect the build yet. ok nicm
|
Revision tags: OPENBSD_4_8_BASE OPENBSD_4_9_BASE
|
#
1.1 |
|
30-Jun-2010 |
nicm |
Update libedit to bring it into sync with the latest version from NetBSD.
ok deraadt
|