diff options
| author | Simon Tatham <anakin@pobox.com> | 1999-11-07 17:28:56 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 1999-11-07 17:28:56 +0000 |
| commit | 6dff7b9ee671925f8c5dae1cd34bdc55f3236c38 (patch) | |
| tree | 508f964352527635b7eb4d7910b9d4a1201c21ea /input.c | |
| parent | 18171f661f78e141d24c3990c5db4346213d440b (diff) | |
| download | halibut-6dff7b9ee671925f8c5dae1cd34bdc55f3236c38.zip halibut-6dff7b9ee671925f8c5dae1cd34bdc55f3236c38.tar.gz halibut-6dff7b9ee671925f8c5dae1cd34bdc55f3236c38.tar.bz2 halibut-6dff7b9ee671925f8c5dae1cd34bdc55f3236c38.tar.xz | |
Configurability backbone, and first use of it
[originally from svn r275]
Diffstat (limited to 'input.c')
| -rw-r--r-- | input.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -176,6 +176,7 @@ enum { c_W, /* Web hyperlink */ c_b, /* bulletted list */ c_c, /* code */ + c_cfg, /* configuration directive */ c_copyright, /* copyright statement */ c_cw, /* weak code */ c_date, /* document processing date */ @@ -239,6 +240,7 @@ static void match_kw(token *tok) { {"\\", c__escaped}, /* escaped backslash (\\) */ {"b", c_b}, /* bulletted list */ {"c", c_c}, /* code */ + {"cfg", c_cfg}, /* configuration directive */ {"copyright", c_copyright}, /* copyright statement */ {"cw", c_cw}, /* weak code */ {"date", c_date}, /* document processing date */ @@ -623,6 +625,7 @@ static void read_file(paragraph ***ret, input *in, index *idx) { /* For \b and \n the keyword is optional */ case c_b: needkw = 4; par.type = para_Bullet; break; case c_n: needkw = 4; par.type = para_NumberedList; break; + case c_cfg: needkw = 8; par.type = para_Config; break; case c_copyright: needkw = 32; par.type = para_Copyright; break; case c_define: is_macro = TRUE; needkw = 1; break; /* For \nocite the keyword is _everything_ */ @@ -697,10 +700,10 @@ static void read_file(paragraph ***ret, input *in, index *idx) { /* Move to EOP in case of needkw==8 or 16 (no body) */ if (needkw & 24) { - if (t.type != tok_eop) { + if (t.type != tok_eop && t.type != tok_eof) { error(err_bodyillegal, &t.pos); /* Error recovery: eat the rest of the paragraph */ - while (t.type != tok_eop) + while (t.type != tok_eop && t.type != tok_eof) dtor(t), t = get_token(in); } addpara(par, ret); |