From 8018f0c45cebec6ac7ea244d50a878e12c085fe4 Mon Sep 17 00:00:00 2001 From: schwarze Date: Tue, 24 Dec 2013 22:08:23 +0000 Subject: [PATCH] Implement SYNOPSIS .Fn indentation for -Tman. --- regress/usr.bin/mandoc/mdoc/Bk/synopsis.in | 3 +++ regress/usr.bin/mandoc/mdoc/Bk/synopsis.out_ascii | 6 +++++- usr.bin/mandoc/mdoc_man.c | 7 +++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/regress/usr.bin/mandoc/mdoc/Bk/synopsis.in b/regress/usr.bin/mandoc/mdoc/Bk/synopsis.in index 37832bbd9d9..62c3e0370f9 100644 --- a/regress/usr.bin/mandoc/mdoc/Bk/synopsis.in +++ b/regress/usr.bin/mandoc/mdoc/Bk/synopsis.in @@ -7,6 +7,9 @@ .Sh SYNOPSIS In the synopsis, almost all macros do not show .No the word keep effect they would get in a \&Bk block. +.Pp +.Fn xxxxxxxxxxxxxxxxxxxx "xxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxx" xxxxxxxxxxxxxxxxxxxx +.Pp .Nm ksh .Op Fl +abCefhiklmnpruvXx .Op Fl +o Ar option diff --git a/regress/usr.bin/mandoc/mdoc/Bk/synopsis.out_ascii b/regress/usr.bin/mandoc/mdoc/Bk/synopsis.out_ascii index 082defe66d9..01e839f4d30 100644 --- a/regress/usr.bin/mandoc/mdoc/Bk/synopsis.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Bk/synopsis.out_ascii @@ -6,6 +6,10 @@ NNAAMMEE SSYYNNOOPPSSIISS In the synopsis, almost all macros do not show the word keep effect they would get in a Bk block. + + xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx(_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x, + _x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x_x); + kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n] [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]] kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n] @@ -15,4 +19,4 @@ DDEESSCCRRIIPPTTIIOONN kksshh [--++aabbCCeeffhhiikkllmmnnpprruuvvXXxx] [--++oo _o_p_t_i_o_n] [--cc _s_t_r_i_n_g | --ss | _f_i_l_e [_a_r_g_u_m_e_n_t _._._.]] -OpenBSD May 29, 2013 OpenBSD +OpenBSD December 24, 2013 OpenBSD diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c index 3798dea7318..2cc23418785 100644 --- a/usr.bin/mandoc/mdoc_man.c +++ b/usr.bin/mandoc/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.53 2013/12/24 20:45:21 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.54 2013/12/24 22:08:23 schwarze Exp $ */ /* * Copyright (c) 2011, 2012, 2013 Ingo Schwarze * @@ -1087,6 +1087,9 @@ pre_fn(DECL_ARGS) if (NULL == n) return(0); + if (MDOC_SYNPRETTY & n->flags) + print_block(".HP 4n", MMAN_nl); + font_push('B'); print_node(meta, n); font_pop(); @@ -1107,7 +1110,7 @@ post_fn(DECL_ARGS) print_word(")"); if (MDOC_SYNPRETTY & n->flags) { print_word(";"); - outflags |= MMAN_br; + outflags |= MMAN_PP; } } -- 2.20.1