mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-20 05:45:27 -05:00

There's no actual need to copy the data from term->inbuf into a local variable inside term_out(). We can simply store a pointer and length, and use the data _in situ_ - as long as we remember how much of it we've used, and bufchain_consume() it when the routine exits. Getting rid of that awkward and size-limited local array should marginally improve performance. But also, it opens up the possibility to suddenly suspend handling of terminal data and leave everything not yet processed in the bufchain, because now we never remove anything from the bufchain until _after_ it's been processed, so there's no need to awkwardly push the unused segment of localbuf[] back on to the front of the bufchain if we need to do that. NFC, but as usual, I have a plan to use the new capability in a followup commit.