]> code.delx.au - gnu-emacs/commit
Prefer xpalloc to doubling buffers by hand
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Nov 2015 07:52:17 +0000 (23:52 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 8 Nov 2015 07:52:57 +0000 (23:52 -0800)
commit8a8613bcf4227dfe46a694b761e9575bdf6ca2ce
tree01d9d994b9caacc831342ef1b32e033844fc06a6
parent6ea4ff5a362a150fb9e22eff1d8f2b87d017b7a4
Prefer xpalloc to doubling buffers by hand

* src/lread.c (grow_read_buffer): New function, which uses xpalloc.
(read1): Use it for simplicity.
* src/macros.c (store_kbd_macro_char):
* src/minibuf.c (read_minibuf_noninteractive):
* src/term.c (encode_terminal_code):
* src/xrdb.c (magic_db):
Prefer xpalloc to growing buffers by hand.
This doesn’t fix any bugs, but simplifies the code a bit.
src/lread.c
src/macros.c
src/minibuf.c
src/term.c
src/xrdb.c