From 178de0871d690556af74f3768c11bc812b07f347 Mon Sep 17 00:00:00 2001 From: Taco Hoekwater Date: Fri, 27 Mar 2009 15:30:55 +0000 Subject: Import of luatex 0.37.0 (autoreconf has not been run yet!) git-svn-id: svn://tug.org/texlive/trunk@12529 c570f23f-e606-0410-a88d-b1316a301751 --- .../texk/web2c/luatexdir/tex/postlinebreak.c | 50 ++++++++++++++++------ 1 file changed, 36 insertions(+), 14 deletions(-) (limited to 'Build/source/texk/web2c/luatexdir/tex/postlinebreak.c') diff --git a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c index 5a7ea253be8..2711f53d25e 100644 --- a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c +++ b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.c @@ -1,9 +1,29 @@ -/* $Id: postlinebreak.c 1155 2008-04-14 07:53:21Z oneiros $ */ +/* postlinebreak.c + + Copyright 2006-2008 Taco Hoekwater + + This file is part of LuaTeX. + + LuaTeX is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2 of the License, or (at your + option) any later version. + + LuaTeX is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU General Public License along + with LuaTeX; if not, see . */ #include "luatex-api.h" #include #include "nodes.h" +static const char _svn_version[] = + "$Id: postlinebreak.c 1694 2008-12-28 20:53:16Z oneiros $ $URL: http://scm.foundry.supelec.fr/svn/luatex/trunk/src/texk/web2c/luatexdir/tex/postlinebreak.c $"; + /* So far we have gotten a little way into the |line_break| routine, having covered its important |try_break| subroutine. Now let's consider the rest of the process. @@ -55,7 +75,7 @@ and begin direction instructions at the beginnings of lines. #define next_break prev_break /*new name for |prev_break| after links are reversed */ -#define append_list(a,b) \ +#define append_list(a,b) \ { vlink(cur_list.tail_field)=vlink((a)); cur_list.tail_field = b; } #define left_skip_code 7 /*glue at left of justified lines */ @@ -87,7 +107,8 @@ void ext_post_line_break(boolean d, scaled second_width, scaled second_indent, scaled first_width, - scaled first_indent, halfword best_line) + scaled first_indent, halfword best_line, + halfword pdf_ignored_dimen) { boolean have_directional = true; @@ -151,7 +172,7 @@ void ext_post_line_break(boolean d, halfword tmp = new_dir(dir_dir(q)); halfword nxt = vlink(temp_head); couple_nodes(temp_head, tmp); - couple_nodes(tmp, nxt); + try_couple_nodes(tmp, nxt); /* \break\par */ } if (dir_ptr != null) { flush_node_list(dir_ptr); @@ -192,9 +213,9 @@ void ext_post_line_break(boolean d, assert(vlink(r) == q); /* |r| refers to the node after which the dir nodes should be closed */ } else if (type(r) == disc_node) { - halfword a = alink(r), v; + halfword a = alink(r); + halfword v = vlink(r); assert(a != null); - v = vlink(r); if (v == null) { /* nested disc, let's unfold */ fprintf(stderr, "Nested disc [%d]<-[%d]->null\n", (int) a, (int) r); @@ -203,7 +224,7 @@ void ext_post_line_break(boolean d, while (alink(a) != null) a = alink(a); assert(type(a) == nesting_node); - assert(subtype(a) = no_break_head(0)); /* No_break */ + assert(subtype(a) == no_break_head(0)); /* No_break */ d = a - subtype(a); /* MAGIC subtype is offset of nesting with disc */ assert(type(d) == disc_node); v = vlink(d); @@ -397,13 +418,15 @@ void ext_post_line_break(boolean d, /* Append the new box to the current vertical list, followed by the list of special nodes taken out of the box by the packager; */ - if (pdf_each_line_height != 0) + if (pdf_each_line_height != pdf_ignored_dimen) height(just_box) = pdf_each_line_height; - if (pdf_each_line_depth != 0) + if (pdf_each_line_depth != pdf_ignored_dimen) depth(just_box) = pdf_each_line_depth; - if ((pdf_first_line_height != 0) && (cur_line == cur_list.pg_field + 1)) + if ((pdf_first_line_height != pdf_ignored_dimen) + && (cur_line == cur_list.pg_field + 1)) height(just_box) = pdf_first_line_height; - if ((pdf_last_line_depth != 0) && (cur_line + 1 == best_line)) + if ((pdf_last_line_depth != pdf_ignored_dimen) + && (cur_line + 1 == best_line)) depth(just_box) = pdf_last_line_depth; if (pre_adjust_head != pre_adjust_tail) @@ -496,9 +519,8 @@ void ext_post_line_break(boolean d, q = vlink(r); if (q == cur_break(cur_p) || is_char_node(q)) break; - if (! - ((type(q) == whatsit_node) - && (subtype(q) == local_par_node))) { + if (!((type(q) == whatsit_node) + && (subtype(q) == local_par_node))) { if (non_discardable(q) || (type(q) == kern_node && subtype(q) != explicit)) break; -- cgit v1.2.3