seq: simplify output buffer management
commit8ba5c3493ddc521047075d7d2268a588988bbb0e
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Nov 2024 03:55:54 +0000 (8 19:55 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 9 Nov 2024 07:41:18 +0000 (8 23:41 -0800)
tree9b55766d1d528566d97c3184c23d8327742e97b7
parent96e101d03f8c9ce76b8c52be3f22f978912e4f84
seq: simplify output buffer management

* src/seq.c (seq_fast): Simplify by using an output buffer of
known size (BUFSIZ) on the stack, rather than a heap buffer that
might grow.  For the number buffer, don’t bother appending NUL
since nobody uses the NUL, and xpalloc from nullptr not p0 since
we need to move the buffer data by hand anyway.
src/seq.c