From: simon Date: Fri, 24 Feb 2012 18:43:54 +0000 (+0000) Subject: Allow macro definitions to be terminated by tok_eof as well as X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/halibut/commitdiff_plain/afd6306286b6472b75f9964c42d5b0910b3a83fc Allow macro definitions to be terminated by tok_eof as well as tok_eop, to prevent Halibut tight-looping when a definition is the last thing in a file. git-svn-id: svn://svn.tartarus.org/sgt/halibut@9419 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/input.c b/input.c index 8556d9f..1410022 100644 --- a/input.c +++ b/input.c @@ -978,7 +978,8 @@ static void read_file(paragraph ***ret, input *in, indexdata *idx, rdadd(¯otext, L'\n'); rdadds(¯otext, t.text); dtor(t), t = get_token(in); - if (t.type == tok_eop) break; + if (t.type == tok_eop || t.type == tok_eof) + break; } macrodef(macros, rs.text, macrotext.text, fp); continue; /* next paragraph */