diff options
author | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 19:36:16 +0000 |
---|---|---|
committer | Jeffrey H. Kingston <jeff@it.usyd.edu.au> | 2010-09-14 19:36:16 +0000 |
commit | a0423a5c6e7ae16023d22892ce2124989745c7a1 (patch) | |
tree | 26e8947ef0a82e8150e46ebd0b257ec5cd13c0ed /z12.c | |
parent | 71bdb35d52747e6d7d9f55df4524d57c2966be94 (diff) | |
download | lout-3.18.tar.gz |
Lout 3.18 tag.3.18
git-svn-id: http://svn.savannah.nongnu.org/svn/lout/tags/3.18@6 9365b830-b601-4143-9ba8-b4a8e2c3339c
Diffstat (limited to 'z12.c')
-rw-r--r-- | z12.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1,7 +1,7 @@ /*@z12.c:Size Finder:MinSize()@***********************************************/ /* */ -/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.17) */ -/* COPYRIGHT (C) 1991, 1999 Jeffrey H. Kingston */ +/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.18) */ +/* COPYRIGHT (C) 1991, 2000 Jeffrey H. Kingston */ /* */ /* Jeffrey H. Kingston (jeff@cs.usyd.edu.au) */ /* Basser Department of Computer Science */ @@ -322,7 +322,7 @@ void SpannerAvailableSpace(OBJECT y, int dim, FULL_LENGTH *resb, OBJECT MinSize(OBJECT x, int dim, OBJECT *extras) { OBJECT y, z, link, prev, t, g, full_name; - FULL_LENGTH b, f, dble_fwd, llx, lly, urx, ury; int status; + FULL_LENGTH b, f, dble_fwd, llx, lly, urx, ury; int status, read_status; float fllx, flly, furx, fury; BOOLEAN dble_found, found, will_expand, first_line, cp; FILE *fp; FULL_CHAR buff[MAX_BUFF]; @@ -842,6 +842,7 @@ OBJECT MinSize(OBJECT x, int dim, OBJECT *extras) mode(gap(g)) == EDGE_MODE && !mark(gap(g)) && word_font(prev) == word_font(y) && word_colour(prev) == word_colour(y) && + word_outline(prev) == word_outline(y) && word_language(prev) == word_language(y) && underline(prev) == underline(y) && NextDown(NextDown(Up(prev))) == link @@ -858,6 +859,7 @@ OBJECT MinSize(OBJECT x, int dim, OBJECT *extras) y = MakeWordTwo(typ, string(prev), string(y), &fpos(prev)); word_font(y) = word_font(prev); word_colour(y) = word_colour(prev); + word_outline(y) = word_outline(prev); word_language(y) = word_language(prev); word_hyph(y) = word_hyph(prev); underline(y) = underline(prev); @@ -1123,8 +1125,17 @@ OBJECT MinSize(OBJECT x, int dim, OBJECT *extras) fp = OpenIncGraphicFile(string(y), type(x), &full_name, &fpos(y), &cp); if( fp == NULL ) status = IG_NOFILE; first_line = TRUE; + /* *** while( status == IG_LOOKING && StringFGets(buff, MAX_BUFF, fp) != NULL ) + *** */ + while( status == IG_LOOKING ) { + read_status = fscanf(fp, "%[^\n\r]%*c", (char *) buff); + if( read_status == 0 || read_status == EOF ) + { + /* end of input and no luck */ + break; + } if( first_line && !StringBeginsWith(buff, AsciiToFull("%!")) ) status = IG_BADFILE; else |