Commit Graph

9 Commits

Author SHA1 Message Date
christos a2d6b270ec s/protected/libedit_private/g 2016-05-09 21:46:56 +00:00
christos 0594af8028 Char -> wchar_t from Ingo Schwarze. 2016-04-11 00:50:13 +00:00
christos aefc1e4460 From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times.  That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...
2016-02-16 15:53:48 +00:00
christos 40850369f8 cleanup inclusion of histedit.h (Ingo Schwarze) 2016-02-16 14:06:05 +00:00
christos f54e4f97f9 From Ingo Schwarze:
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.
2016-02-14 14:49:34 +00:00
christos fac360ff28 From: Jilles Tjoelker: Add a mapping for the cursor delete key 2012-03-24 20:09:30 +00:00
christos c11bd863f5 pass -Wconversion 2011-07-29 23:44:44 +00:00
christos d47f958456 Rename key to keymacro to avoid conflicts with term.h. The renaming of term
to terminal was again to avoid conflicts with term.h. term.h is a moving
namespace violation.
2011-07-28 01:56:26 +00:00
christos 98c7cbebbc term -> terminal
XXX: need to rename key_ too.
2011-07-28 01:05:20 +00:00