Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/lib/libedit
Module Name: src
Committed By: christos
Date: Sat Nov 14 17:50:15 UTC 2026
Modified Files:
src/lib/libedit: el.c eln.c read.c refresh.c refresh.h terminal.c
terminal.h
src/lib/libedit/TEST: wtc1.c
Log Message:
Allocate display rows on demand (Hua Zhong)
libedit (unlike readline) allocates a buffer for the entire terminal width *
height from the beginning, which is often wasteful as most of the time very
few rows are needed. This change introduces delayed allocation for row buffers.
Initially, the row-pointer array is allocated with NULL pointers. When we need
row N, we allocate all row buffers up to that row.
Display buffer allocation failures are reported through existing API errors.
A subsequent API call such as el_gets() retries the allocation if needed.
To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/lib/libedit/el.c
cvs rdiff -u -r1.40 -r1.41 src/lib/libedit/eln.c
cvs rdiff -u -r1.109 -r1.110 src/lib/libedit/read.c
cvs rdiff -u -r1.61 -r1.62 src/lib/libedit/refresh.c
cvs rdiff -u -r1.11 -r1.12 src/lib/libedit/refresh.h
cvs rdiff -u -r1.47 -r1.48 src/lib/libedit/terminal.c
cvs rdiff -u -r1.9 -r1.10 src/lib/libedit/terminal.h
cvs rdiff -u -r1.8 -r1.9 src/lib/libedit/TEST/wtc1.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index