Hi,

Thorsten Glaser <[email protected]> wrote:
 |Steffen Daode Nurpmeso dixit:
 |
 |>Thorsten Glaser <[email protected]> wrote:
 |>|Can anyone think of a reason to not print the entire tree,
 |>|except maybe length? (We could reasonably kill after 2K or
 |>|something like that.)
 |>
 |>And, of course, the only solution to avoid that the intermediate
 |>buffer(s is/are spaced sufficiently large to store the entire
 |[…]
 |
 |I was thinking of just storing the allocated result of the
 |tree print alongside the Proc instead of making a statically
 |sized char buffer part of Proc. Or possibly just storing the
 |string past the other Proc members, like struct tbl stores
 |its names. And then limit to 2K, maybe first 1K5 + last ½K,
 |if you think cutting off at the end is evil even if the end
 |is 2K in the string.
 |
 |Maybe 2K is a bit much. I’ll think about it on the backburner
 |and in the meanwhile collect feedback.

please do that :)
And allow me to append the necessary fix for my patch.
The patched mksh(1) instances spread from 832KB to 928KB at the
moment, which is not noticeable larger than unpatched.
That is, a great shell.
And have a nice week!

--steffen

Reply via email to