History log of /netbsd-src/lib/libedit/common.c (Results 1 – 25 of 50)
Revision Date Author Comments
# ea4fdcd7 30-Jun-2024 christos <christos@NetBSD.org>

Avoid moving the cursor before the buffer (Robert Morris)
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=279487


# 1148c426 30-Mar-2020 ryo <ryo@NetBSD.org>

fix build error with SDEBUG, MAP_DEBUG, DEBUG_REFRESH


# 7767204c 26-Feb-2018 christos <christos@NetBSD.org>

PR/53058: Nikhil Benesch: use correctly typed variables (wchar_t vs wint_t)
as parameters.


# bb64d9f1 22-May-2016 christos <christos@NetBSD.org>

Stop the read module from poking the el_chared.c_macro data structure
currently belonging to the chared module. The read module does so
from three of its functions, while no other module uses the ma

Stop the read module from poking the el_chared.c_macro data structure
currently belonging to the chared module. The read module does so
from three of its functions, while no other module uses the macro
data, not even the chared module itself. That's quite logical
because macros are a feature of input handling, all of which is
done by the read module, and none by the chared module. So move
the data into the read modules's own opaque data structure, struct
el_read_t.

That simplifies internal interfaces in several respects: The
semi-public chared.h has one fewer struct, one fewer #define, and
one fewer member in struct el_chared_t; all three move to one single
C file, read.c, and are now module-local. And the internal interface
function ch_reset() needs one fewer argument, making the code of many
functions in various modules more readable.

The price is one additional internal interface function, read_end(),
10 lines long including comments, called publicly from exactly one
place: el_end() in el.c. That's hardly an increase in complexity
since most other modules already have their *_end() function, read.c
was the odd one out not having one.

From Ingo Schwarze

show more ...


# a2d6b270 09-May-2016 christos <christos@NetBSD.org>

s/protected/libedit_private/g


# 4fc1f47d 18-Apr-2016 christos <christos@NetBSD.org>

From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it

From Ingo Schwarze:
* Replace fcns.c by a shorter and simpler func.h
and include it only in the one file needing it, map.c.
* Combine help.h and help.c into a simplified help.h
and include it only in the one file needing it, map.c.
* Check the very simple, static files editline.c, historyn.c, and
tokenizern.c into CVS rather than needlessly generating them.
* So we no longer autogenerate any C files. :-)
* Shorten and simplify makelist by deleting the options -n, -e, -bc,
and -m; the latter was unused and useless in the first place.
* Move the declaration of el_func_t from fcns.h to the header
actually needing it, map.h. Since that header is already
included by el.h for unrelated reasons, that makes el_func_t
just as globally available as before.
* No longer include the simplified fcns.h into el.h,
include it directly into the *.c files needing it.

show more ...


# a2eaeedb 17-Apr-2016 christos <christos@NetBSD.org>

Remove empty callbacks (Ingo Schwartze)


# 0594af80 11-Apr-2016 christos <christos@NetBSD.org>

Char -> wchar_t from Ingo Schwarze.


# 0aefc7f9 11-Apr-2016 christos <christos@NetBSD.org>

more macro WIDECHAR undoing from Ingo Schwarze.


# fcf85103 09-Apr-2016 christos <christos@NetBSD.org>

More WIDECHAR elimination (Ingo Schwarze)


# d784c575 02-Mar-2016 christos <christos@NetBSD.org>

PR/50880: David Binderman: Remove redundant code.
While here, fix all debugging formats.


# 7ba8c71b 24-Feb-2016 christos <christos@NetBSD.org>

Get split el_getc and el_wgetc completely and call el_wgetc internally.
Change some character constants to they wide versions. (Ingo Schwarze)


# 22383670 17-Feb-2016 christos <christos@NetBSD.org>

whitespace and header sorting changes (Ingo Schwarze). No functional changes.


# e84df91e 16-Feb-2016 christos <christos@NetBSD.org>

More header cleanups from Ingo Schwarze.


# 23f3e707 16-Feb-2016 christos <christos@NetBSD.org>

get rid of bool_t (Ingo Schwarze)


# 747f6811 16-Feb-2016 christos <christos@NetBSD.org>

more include file cleanup (Ingo Schwarze)


# aefc1e44 16-Feb-2016 christos <christos@NetBSD.org>

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 ma

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...

show more ...


# f09cb8c6 16-Feb-2016 christos <christos@NetBSD.org>

cleanup chartype.h includes (Ingo Schwarze)


# 40850369 16-Feb-2016 christos <christos@NetBSD.org>

cleanup inclusion of histedit.h (Ingo Schwarze)


# f54e4f97 14-Feb-2016 christos <christos@NetBSD.org>

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 o

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.

show more ...


# 6af8d673 11-Feb-2016 christos <christos@NetBSD.org>

- Add some more Char casts
- reduce ifdefs by providing empty defs for nls functions (Ingo Schwarze)


# d067817e 24-Mar-2012 christos <christos@NetBSD.org>

From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.
Behaviour in vi mode is unchanged (for 'x'

From Jilles Tjoelker:
Do not move the cursor for ed-delete-next-char in emacs mode.
This makes ed-delete-next-char suitable for mapping to the <Delete> key.
Behaviour in vi mode is unchanged (for 'x').

show more ...


# 1237974a 29-Jul-2011 christos <christos@NetBSD.org>

- fix unused params
- unconditionalize vis.h


# 7ecb1ef2 29-Jul-2011 christos <christos@NetBSD.org>

kill ifdef notdef


# b71bed95 29-Jul-2011 christos <christos@NetBSD.org>

KNF return (\1); -> return \1;


12