1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-22 16:42:56 -08:00
Commit Graph

16 Commits

Author SHA1 Message Date
yasuoka
45e13dcbc1 Terminate NULL in argv. This fix is come from 1.31 from NetBSD
lib/libedit/chartype.c via FreeBSD.  From tj@

ok tb
2019-01-29 09:47:00 +00:00
schwarze
ddc8143785 delete the "private" and "public" preprocessor macros, just use standard C;
OK martijn@
2016-04-11 21:17:29 +00:00
schwarze
8dc8c69029 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@
2016-04-11 20:54:05 +00:00
schwarze
e3191321e1 get rid of the non-standard data type "Char" in almost all files;
ok martijn@
2016-04-11 20:43:33 +00:00
schwarze
565aa7e845 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>.
2016-04-09 20:15:26 +00:00
schwarze
59aed04376 Always compile with WIDECHAR on and delete that preprocessor switch.
OK martijn@.
Diff also proofread by Christian Heckendorf <mbie at ulmus dot me>.
2016-04-09 19:31:55 +00:00
schwarze
4cc1fc08fa 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.
2016-03-21 18:40:25 +00:00
schwarze
c8b52917b0 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@
2016-03-21 17:28:10 +00:00
schwarze
7ccfa089d5 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@
2016-03-20 23:48:27 +00:00
schwarze
3a40234dc6 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@
2016-03-20 20:16:09 +00:00
deraadt
014b1be8e7 Remove non-exposed malloc/realloc/free wrappers, and then substitute
reallocarray() where it helps.
ok doug
2014-10-17 06:07:50 +00:00
yasuoka
c046fa78d3 Sync with upstream. Fix buffer growing and memory allocation for wide
chars.  Handle return of mbstowcs().

ok nickm
2013-05-22 00:31:38 +00:00
nicm
564947216d Calculate the size for the wchar_t argv correctly, fixes memory
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
2011-11-17 20:14:24 +00:00
okan
5f805b19df sync with upstream, retaining local modifications.
ok nicm@
2011-07-07 05:40:42 +00:00
stsp
cf7973e199 Make wcwidth() callers cope with -1 return value. Doesn't affect the build yet.
ok nicm
2011-04-04 18:48:17 +00:00
nicm
aed0ee816f Update libedit to bring it into sync with the latest version from NetBSD.
ok deraadt
2010-06-30 00:05:35 +00:00