=================================================================== RCS file: /cvs/mandoc/mdoc_man.c,v retrieving revision 1.51 retrieving revision 1.53 diff -u -p -r1.51 -r1.53 --- mandoc/mdoc_man.c 2013/06/02 18:16:57 1.51 +++ mandoc/mdoc_man.c 2013/10/07 22:22:10 1.53 @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.51 2013/06/02 18:16:57 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.53 2013/10/07 22:22:10 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013 Ingo Schwarze * @@ -442,7 +442,7 @@ print_offs(const char *v) if (Bl_stack_len) sz += Bl_stack[Bl_stack_len - 1]; - snprintf(buf, sizeof(buf), "%ldn", sz); + snprintf(buf, sizeof(buf), "%zun", sz); print_word(buf); outflags |= MMAN_nl; } @@ -495,7 +495,7 @@ print_width(const char *v, const struct mdoc_node *chi remain = sz + 2; } if (numeric) { - snprintf(buf, sizeof(buf), "%ldn", sz + 2); + snprintf(buf, sizeof(buf), "%zun", sz + 2); print_word(buf); } else print_word(v); @@ -553,7 +553,7 @@ man_mdoc(void *arg, const struct mdoc *mdoc) static void print_node(DECL_ARGS) { - const struct mdoc_node *prev, *sub; + const struct mdoc_node *sub; const struct manact *act; int cond, do_sub; @@ -561,8 +561,7 @@ print_node(DECL_ARGS) * Break the line if we were parsed subsequent the current node. * This makes the page structure be more consistent. */ - prev = n->prev ? n->prev : n->parent; - if (MMAN_spc & outflags && prev && prev->line < n->line) + if (MMAN_spc & outflags && MDOC_LINE & n->flags) outflags |= MMAN_nl; act = NULL; @@ -1295,7 +1294,7 @@ mid_it(void) /* Restore the indentation of the enclosing list. */ print_line(".RS", MMAN_Bk_susp); - snprintf(buf, sizeof(buf), "%ldn", Bl_stack[Bl_stack_len - 1]); + snprintf(buf, sizeof(buf), "%zun", Bl_stack[Bl_stack_len - 1]); print_word(buf); /* Remeber to close out this .RS block later. */ @@ -1420,7 +1419,7 @@ pre_nm(DECL_ARGS) if (NULL == n->parent->prev) outflags |= MMAN_sp; print_block(".HP", 0); - printf(" %ldn", strlen(name) + 1); + printf(" %zun", strlen(name) + 1); outflags |= MMAN_nl; } font_push('B');