f54e4f97f9
As we have seen before, "histedit.h" can never get rid of including the <wchar.h> header because using the data types defined there is deeply ingrained in the public interfaces of libedit. Now POSIX unconditionally requires that <wchar.h> defines the type wint_t. Consequently, it can be used unconditionally, no matter whether WIDECHAR is active or not. Consequently, the #define Int is pointless. Note that removing it is not gratuitious churn. Auditing for integer signedness problems is already hard when only fundamental types like "int" and "unsigned" are involved. It gets very hard when types come into the picture that have platform-dependent signedness, like "char" and "wint_t". Adding yet another layer on top, changing both the signedness and the width in a platform- dependent way, makes auditing yet harder, which IMHO is really dangerous. Note that while removing the #define, i already found one bug caused by this excessive complication - in the function re_putc() in refresh.c. If WIDECHAR was defined, it printed an Int = wint_t value with %c. Fortunately, that bug only affects debugging, not production. The fix is contained in the patch. With WIDECHAR, this doesn't change anything. For the case without WIDECHAR, i checked that none of the places wants to store values that might not fit in wint_t. This only changes internal interfaces; public ones remain unchanged. |
||
---|---|---|
.. | ||
readline | ||
TEST | ||
chared.c | ||
chared.h | ||
chartype.c | ||
chartype.h | ||
common.c | ||
config.h | ||
editline.3 | ||
editrc.5 | ||
el.c | ||
el.h | ||
eln.c | ||
emacs.c | ||
filecomplete.c | ||
filecomplete.h | ||
hist.c | ||
hist.h | ||
histedit.h | ||
history.c | ||
keymacro.c | ||
keymacro.h | ||
Makefile | ||
makelist | ||
map.c | ||
map.h | ||
parse.c | ||
parse.h | ||
prompt.c | ||
prompt.h | ||
read.c | ||
read.h | ||
readline.c | ||
refresh.c | ||
refresh.h | ||
search.c | ||
search.h | ||
shlib_version | ||
sig.c | ||
sig.h | ||
sys.h | ||
terminal.c | ||
terminal.h | ||
tokenizer.c | ||
tty.c | ||
tty.h | ||
vi.c |