From 894d174863e3bc2de176ce4e4ef417df0fa810cf Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Thu, 6 Jan 2011 14:05:12 +0000 Subject: Make -literal displays only have 8-character displays. From a low-hanging TODO added by schwarze@ on 15/08/10. --- TODO | 7 +------ mdoc_term.c | 6 ++++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/TODO b/TODO index a48ec94b..edffc7f7 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ ************************************************************************ * Official mandoc TODO. -* $Id: TODO,v 1.72 2011/01/03 21:53:46 kristaps Exp $ +* $Id: TODO,v 1.73 2011/01/06 14:05:12 kristaps Exp $ ************************************************************************ ************************************************************************ @@ -152,11 +152,6 @@ Also have `It' complain if `Pp' is invoked at certain times (not -compact?). -- .Bd -literal and .Bd -unfilled are *not* identical. - In -literal, tabs are 8 spaces. - In -unfilled, tabs are 5 spaces, just like in -filled and -ragged. - See the CCDF_* display in OpenBSD ccdconfig(8). - - .Nx 1.0a should be "NetBSD 1.0A", not "NetBSD 1.0a", see OpenBSD ccdconfig(8). diff --git a/mdoc_term.c b/mdoc_term.c index 97b6f602..0f699abd 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.207 2011/01/02 12:21:07 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.208 2011/01/06 14:05:12 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -1599,7 +1599,9 @@ termp_bd_pre(DECL_ARGS) return(1); tabwidth = p->tabwidth; - p->tabwidth = term_len(p, 8); + if (DISP_literal == n->norm->Bd.type) + p->tabwidth = term_len(p, 8); + rm = p->rmargin; rmax = p->maxrmargin; p->rmargin = p->maxrmargin = TERM_MAXMARGIN; -- cgit v1.2.3-56-ge451