Commit Graph

13 Commits

Author SHA1 Message Date
christos 21a4b1ccc3 improvements in malloc/free handling. 2022-10-30 19:11:31 +00:00
christos bb64d9f1ce 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
2016-05-22 19:44:26 +00:00
christos a2d6b270ec s/protected/libedit_private/g 2016-05-09 21:46:56 +00:00
christos 1364b6032a From Ingo Schwarze:
- Put the data type el_rfunc_t into the public header <histedit.h>.
 - Make el_read in struct editline an opaque pointer rather
   than an embedded struct.
 - Do not include "read.h" everywhere, but only in the two files
   needing access to el_read, read.c and el.c.
 - To functions that don't need more, pass the struct el_read_t *
   rather than the full EditLine *.
 - Of course, that means that read_init() can now fail from
   memory exhaustion, but it's easy to clean up after that.
2016-04-19 19:50:53 +00:00
christos 94623721e8 Make the read_char function always take a wchar_t * argument (Ingo Schwarze) 2016-02-24 17:13:22 +00:00
christos 22383670cc whitespace and header sorting changes (Ingo Schwarze). No functional changes. 2016-02-17 19:47:49 +00:00
christos 34e53048e6 Wide character support (UTF-8) from Johny Mattsson; currently disabled. 2009-12-30 22:37:40 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
christos f1fff5b02e Change to a 3 clause copyright after permission of the holders. 2006-08-21 12:45:30 +00:00
christos ac4e17d0c7 Better fix for rl_prep_terminal() from Gerry Swislow. 2004-02-27 14:52:18 +00:00
christos 9f2ccd7938 Separate tty separation from the prompt printing function. From Gerry Swislow. 2004-02-21 16:42:30 +00:00
christos 552716dcff Implement enough of readline's 4.0 async mode to make gdb happy. This is
not complete yet, but it seems to work...
This required to introduce an unbuffered mode to el_gets(), but that was
a minor change.
2003-09-26 17:44:51 +00:00
christos eabba8b507 PR/14067: Anthony Mallet: Provide a programmatic way to set the read_char
function via a new el_set() operation.
Thanks, nicely done :-)
2001-09-27 19:29:50 +00:00