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.
bye,
//mirabilos
--
„nein: BerliOS und Sourceforge sind Plattformen für Projekte, github ist
eine Plattform für Einzelkämpfer“
-- dieses Zitat ist ein Beweis dafür, daß auch ein blindes Huhn
mal ein Korn findet, bzw. – in diesem Fall – Recht haben kann