History log of /netbsd-src/lib/libedit/chared.h (Results 1 – 25 of 30)
Revision Date Author Comments
# 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


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

Char -> wchar_t from Ingo Schwarze.


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

More header cleanups from 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 ...


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


# e06822a7 18-Jun-2014 christos <christos@NetBSD.org>

Don't depend on weak aliases to define the vi "alias" expansion function,
provide an API instead to set it.


# 7741aae9 28-Aug-2010 christos <christos@NetBSD.org>

setup a callback to be invoked on resize buffers so that readline can
reset rl_line_buffer which unfortunately some applications use it directly.


# 839bac94 15-Apr-2010 christos <christos@NetBSD.org>

From Jess Thrysoee
- Fix wint_t to Int confusion


# 34e53048 30-Dec-2009 christos <christos@NetBSD.org>

Wide character support (UTF-8) from Johny Mattsson; currently disabled.


# 5c894153 15-Feb-2009 christos <christos@NetBSD.org>

pass lint on _LP64.


# 230c3d4e 06-Mar-2006 christos <christos@NetBSD.org>

Print the actual eofc, instead of ^D\b\b.
Change internal character decoding to prevent buffer oveflows.


# 2ecb0fb7 08-Aug-2005 christos <christos@NetBSD.org>

Spelling mistakes and comment errors (from FreeBSD via Stefan Farfeleder; many
thanks)


# 0895008a 01-Aug-2005 christos <christos@NetBSD.org>

Don't reset the macro strings each time we enter el_gets(), otherwise
el_push() is unusable programmatically.


# 6360c4b0 13-Aug-2004 mycroft <mycroft@NetBSD.org>

Delete-previous-char and delete-next-char without an argument are not supposed
to modify the yank buffer in Emacs. Make it so.


# 6e782349 18-Oct-2003 christos <christos@NetBSD.org>

change allocation policy in el_push to allocate the string itself.
fix issues with strdup.


# eb7c1594 07-Aug-2003 agc <agc@NetBSD.org>

Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22280, verified by myself.


# 4a97685c 20-Nov-2002 christos <christos@NetBSD.org>

Fix problem with previous patches that broke vi history.
- c_gets() was usually returning a length, but sometimes
one of the CC_xxx values (which are small +ve integers)!
- fixed c_gets() by puttin

Fix problem with previous patches that broke vi history.
- c_gets() was usually returning a length, but sometimes
one of the CC_xxx values (which are small +ve integers)!
- fixed c_gets() by putting a ' ' under the cursor.
From David Laight.

show more ...


# 39f224af 15-Nov-2002 christos <christos@NetBSD.org>

PR/18995: David Laight: libedit fixes for posix conformant sh

The posix 'sh' specification defines vi-mode editing quite tightly.
The netbsd libedit code (used by sh to do this) was missing several

PR/18995: David Laight: libedit fixes for posix conformant sh

The posix 'sh' specification defines vi-mode editing quite tightly.
The netbsd libedit code (used by sh to do this) was missing several
features, there were also minor errors in others.

Compare netbsd sh to the definition available from:
http://www.opengroup.org/onlinepubs/007904975/utilities/sh.html
In particular the following were not supported:
U - undo all changes to line
| - goto column
Y - yank to end of line
y - yank
# - comment out current line
@ - take input from shell alias [1]
G - goto numbered line in history buffer
v - edit history line with vi
_ - append word from last input line
. - redo last command
Other minor changes have also been made.

[1] This needs the shell to define an appropriate routine to
return the text of the alias. There is no requirement that
such a function exist.

show more ...


# a17c7fe4 27-Oct-2002 christos <christos@NetBSD.org>

vi mode and memory fixes from david laight.


# 0e0ac6b7 18-Mar-2002 christos <christos@NetBSD.org>

- constify; passes all gcc and lint strict checks.
- add config.h [Jason Evans], to create a portable version of libedit that
can be easily compiled on other OS's.


# daf8abfc 03-Feb-2002 christos <christos@NetBSD.org>

Fixed an __P remnant


# 00ff7cac 10-Jan-2001 jdolecek <jdolecek@NetBSD.org>

Enlarge editline buffers as needed to support arbitrary length lines.
This also addresses lib/9712 by Phil Nelson.


12