diff options
Diffstat (limited to 'z05.c')
-rw-r--r-- | z05.c | 44 |
1 files changed, 42 insertions, 2 deletions
@@ -1,7 +1,7 @@ /*@z05.c:Read Definitions:ReadLangDef()@**************************************/ /* */ -/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.24) */ -/* COPYRIGHT (C) 1991, 2000 Jeffrey H. Kingston */ +/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.25) */ +/* COPYRIGHT (C) 1991, 2001 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@cs.usyd.edu.au) */ /* Basser Department of Computer Science */ @@ -104,6 +104,37 @@ void ReadPrependDef(unsigned typ, OBJECT encl) /*****************************************************************************/ /* */ +/* ReadIncGRepeatedDef(typ, encl) */ +/* */ +/* Read @IncludeGraphicRepeated { <filename> } and record its presence. */ +/* */ +/*****************************************************************************/ + +void ReadIncGRepeatedDef(unsigned typ, OBJECT encl) +{ OBJECT t, fname; + t = LexGetToken(); + if( type(t) != LBR ) + { Error(5, 5, "left brace expected here in %s declaration", + WARN, &fpos(t), KW_INCG_REPEATED); + Dispose(t); + return; + } + fname = Parse(&t, encl, FALSE, FALSE); + fname = ReplaceWithTidy(fname, FALSE); + if( !is_word(type(fname)) ) + { Error(5, 6, "name of %s file expected here", WARN, &fpos(fname), + KW_INCG_REPEATED); + DisposeObject(fname); + return; + } + debug0(DFS, D, " calling PS_IncGRepeated from ReadPrependDef"); + incg_type(fname) = (typ == INCG_REPEATED ? INCGRAPHIC : SINCGRAPHIC); + PS_IncGRepeated(fname); +} /* end ReadPrependDef */ + + +/*****************************************************************************/ +/* */ /* ReadDatabaseDef(typ, encl) */ /* */ /* Read @Database <symname> ... <symname> { <filename> } and record it. */ @@ -261,6 +292,7 @@ static void ReadTokenList(OBJECT token, OBJECT res) case GRAPHIC: case LINK_SOURCE: case LINK_DEST: + case LINK_URL: case NOT_REVEALED: NextToken(t, res); @@ -275,6 +307,8 @@ static void ReadTokenList(OBJECT token, OBJECT res) case SYS_DATABASE: case PREPEND: case SYS_PREPEND: + case INCG_REPEATED: + case SINCG_REPEATED: case OPEN: Error(5, 12, "symbol %s not allowed in macro", WARN, &fpos(t), @@ -503,6 +537,12 @@ void ReadDefinitions(OBJECT *token, OBJECT encl, unsigned char res_type) t = LexGetToken(); continue; /* next definition */ } + else if( type(t) == INCG_REPEATED || type(t) == SINCG_REPEATED ) + { ReadIncGRepeatedDef(type(t), encl); + Dispose(t); + t = LexGetToken(); + continue; /* next definition */ + } else if( type(t) == DATABASE || type(t) == SYS_DATABASE ) { ReadDatabaseDef(type(t), encl); Dispose(t); |