diff options
| author | Simon Tatham <anakin@pobox.com> | 2004-04-13 14:14:12 +0000 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2004-04-13 14:14:12 +0000 |
| commit | 5737b1da42ad79dae7f9a4fdcda9ea716846019c (patch) | |
| tree | 296bfc003d4fb2a4d42154c84e246abfb9d24e51 /paper.h | |
| parent | ddd7bf5b8a173f375cf3de92a4493c0b80cc2de3 (diff) | |
| download | halibut-5737b1da42ad79dae7f9a4fdcda9ea716846019c.zip halibut-5737b1da42ad79dae7f9a4fdcda9ea716846019c.tar.gz halibut-5737b1da42ad79dae7f9a4fdcda9ea716846019c.tar.bz2 halibut-5737b1da42ad79dae7f9a4fdcda9ea716846019c.tar.xz | |
Aha, _that's_ why paragraphs weren't properly justified. Confusion
of semantics as to whether a `last' pointer pointed to the last
relevant thing in a list, or the one beyond that. Oops.
[originally from svn r4059]
Diffstat (limited to 'paper.h')
| -rw-r--r-- | paper.h | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -151,12 +151,15 @@ struct line_data_Tag { * its starting x position, and by how much the width of spaces * needs to be adjusted for paragraph justification. * - * (`last' may be NULL if it's more convenient.) + * (Unlike most of the `last' pointers defined in this file, + * this `end' pointer points to the word _after_ the last one + * that should be displayed on the line. This is how it's + * returned from wrap_para().) */ word *first; - word *last; + word *end; int xpos; - int space_adjust; /* for justifying paragraphs */ + int hshortfall, nspaces; /* for justifying paragraphs */ /* * Auxiliary text: a section number in a margin, or a list item * bullet or number. Also mention where to display this text @@ -179,7 +182,7 @@ struct line_data_Tag { * These fields are used in the page breaking algorithm. */ int bestcost; - int shortfall, text, space; + int vshortfall, text, space; line_data *page_last; /* last line on a page starting here */ /* * After page breaking, we can assign an actual y-coordinate on |