]> git.cameronkatri.com Git - mandoc.git/blobdiff - man_term.c
Always fix the man(7) subsection header (.SS) indent to 3n,
[mandoc.git] / man_term.c
index 14e13246969d168211fa5698756a3483ff199bbc..c8d558e0c8ddf3794864790c2e92f5ab4ec4136f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: man_term.c,v 1.131 2012/07/13 14:19:49 schwarze Exp $ */
+/*     $Id: man_term.c,v 1.133 2012/07/16 21:59:40 schwarze Exp $ */
 /*
  * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2011, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -445,10 +445,21 @@ pre_sp(DECL_ARGS)
        int              neg;
 
        if ((NULL == n->prev && n->parent)) {
-               if (MAN_SS == n->parent->tok)
-                       return(0);
-               if (MAN_SH == n->parent->tok)
+               switch (n->parent->tok) {
+               case (MAN_SH):
+                       /* FALLTHROUGH */
+               case (MAN_SS):
+                       /* FALLTHROUGH */
+               case (MAN_PP):
+                       /* FALLTHROUGH */
+               case (MAN_LP):
+                       /* FALLTHROUGH */
+               case (MAN_P):
+                       /* FALLTHROUGH */
                        return(0);
+               default:
+                       break;
+               }
        }
 
        neg = 0;
@@ -760,7 +771,7 @@ pre_SS(DECL_ARGS)
                break;
        case (MAN_HEAD):
                term_fontrepl(p, TERMFONT_BOLD);
-               p->offset = term_len(p, p->defindent/2);
+               p->offset = term_len(p, 3);
                break;
        case (MAN_BODY):
                p->offset = mt->offset;