struct eval_ctx: add .ev_line_size; commands(): fix `ghost'..
commitbfe22a77a653de7940fafa534ba035c41329c29e
authorSteffen (Daode) Nurpmeso <sdaoden@users.sf.net>
Fri, 2 May 2014 14:59:27 +0000 (2 16:59 +0200)
committerSteffen (Daode) Nurpmeso <sdaoden@users.sf.net>
Sat, 31 May 2014 20:02:33 +0000 (31 22:02 +0200)
tree9dbc62c775a59d68722f5551de4abc2a4d76b84c
parent8f096723829b176bdba12474550796fbce266a06
struct eval_ctx: add .ev_line_size; commands(): fix `ghost'..

I got some alert() messages from the string dope after `ghost'
expansion and it turned out that commands() calls evaluate() with
ev_line being set to the full buffer size, rather than the real
line size, leading to faulty much-too-large allocations for the
ghost expansion buffer; didn't cause problems because the
terminating zero would be part of the too-large-a-copy, but oops.

So introduce another storage for the buffer allocation size and
use it as a switch buffer with set.ev_line.l before callings
evaluate().
lex.c
nail.h