summaryrefslogtreecommitdiff
path: root/paper.h
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2004-04-13 14:14:12 +0000
committerSimon Tatham <anakin@pobox.com>2004-04-13 14:14:12 +0000
commit5737b1da42ad79dae7f9a4fdcda9ea716846019c (patch)
tree296bfc003d4fb2a4d42154c84e246abfb9d24e51 /paper.h
parentddd7bf5b8a173f375cf3de92a4493c0b80cc2de3 (diff)
downloadhalibut-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.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/paper.h b/paper.h
index 6a4e353..3b4a944 100644
--- a/paper.h
+++ b/paper.h
@@ -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