=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man_term.c,v retrieving revision 1.76 retrieving revision 1.77 diff -c -r1.76 -r1.77 *** src/usr.bin/mandoc/man_term.c 2011/09/21 09:57:11 1.76 --- src/usr.bin/mandoc/man_term.c 2011/11/13 13:05:23 1.77 *************** *** 1,4 **** ! /* $Id: man_term.c,v 1.76 2011/09/21 09:57:11 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze --- 1,4 ---- ! /* $Id: man_term.c,v 1.77 2011/11/13 13:05:23 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze *************** *** 29,36 **** #include "term.h" #include "main.h" - #define INDENT 7 /* fixed-width char full-indent */ - #define HALFINDENT 3 /* fixed-width char half-indent */ #define MAXMARGINS 64 /* maximum number of indented scopes */ /* FIXME: have PD set the default vspace width. */ --- 29,34 ---- *************** *** 137,142 **** --- 135,143 ---- p = (struct termp *)arg; + if (0 == p->defindent) + p->defindent = 7; + p->overstep = 0; p->maxrmargin = p->defrmargin; p->tabwidth = term_len(p, 5); *************** *** 152,159 **** memset(&mt, 0, sizeof(struct mtermp)); ! mt.lmargin[mt.lmargincur] = term_len(p, INDENT); ! mt.offset = term_len(p, INDENT); if (n->child) print_man_nodelist(p, &mt, n->child, m); --- 153,160 ---- memset(&mt, 0, sizeof(struct mtermp)); ! mt.lmargin[mt.lmargincur] = term_len(p, p->defindent); ! mt.offset = term_len(p, p->defindent); if (n->child) print_man_nodelist(p, &mt, n->child, m); *************** *** 507,513 **** switch (n->type) { case (MAN_BLOCK): ! mt->lmargin[mt->lmargincur] = term_len(p, INDENT); print_bvspace(p, n); break; default: --- 508,514 ---- switch (n->type) { case (MAN_BLOCK): ! mt->lmargin[mt->lmargincur] = term_len(p, p->defindent); print_bvspace(p, n); break; default: *************** *** 702,709 **** switch (n->type) { case (MAN_BLOCK): mt->fl &= ~MANT_LITERAL; ! mt->lmargin[mt->lmargincur] = term_len(p, INDENT); ! mt->offset = term_len(p, INDENT); /* If following a prior empty `SS', no vspace. */ if (n->prev && MAN_SS == n->prev->tok) if (NULL == n->prev->body->child) --- 703,710 ---- switch (n->type) { case (MAN_BLOCK): mt->fl &= ~MANT_LITERAL; ! mt->lmargin[mt->lmargincur] = term_len(p, p->defindent); ! mt->offset = term_len(p, p->defindent); /* If following a prior empty `SS', no vspace. */ if (n->prev && MAN_SS == n->prev->tok) if (NULL == n->prev->body->child) *************** *** 714,720 **** break; case (MAN_HEAD): term_fontrepl(p, TERMFONT_BOLD); ! p->offset = term_len(p, HALFINDENT); break; case (MAN_BODY): p->offset = mt->offset; --- 715,721 ---- break; case (MAN_HEAD): term_fontrepl(p, TERMFONT_BOLD); ! p->offset = term_len(p, p->defindent/2); break; case (MAN_BODY): p->offset = mt->offset; *************** *** 753,760 **** switch (n->type) { case (MAN_BLOCK): mt->fl &= ~MANT_LITERAL; ! mt->lmargin[mt->lmargincur] = term_len(p, INDENT); ! mt->offset = term_len(p, INDENT); /* If following a prior empty `SH', no vspace. */ if (n->prev && MAN_SH == n->prev->tok) if (NULL == n->prev->body->child) --- 754,761 ---- switch (n->type) { case (MAN_BLOCK): mt->fl &= ~MANT_LITERAL; ! mt->lmargin[mt->lmargincur] = term_len(p, p->defindent); ! mt->offset = term_len(p, p->defindent); /* If following a prior empty `SH', no vspace. */ if (n->prev && MAN_SH == n->prev->tok) if (NULL == n->prev->body->child) *************** *** 813,819 **** break; } ! sz = term_len(p, INDENT); if (NULL != (n = n->parent->head->child)) if ((ival = a2width(p, n->string)) >= 0) --- 814,820 ---- break; } ! sz = term_len(p, p->defindent); if (NULL != (n = n->parent->head->child)) if ((ival = a2width(p, n->string)) >= 0) *************** *** 847,853 **** break; } ! sz = term_len(p, INDENT); if (NULL != (n = n->parent->head->child)) if ((ival = a2width(p, n->string)) >= 0) --- 848,854 ---- break; } ! sz = term_len(p, p->defindent); if (NULL != (n = n->parent->head->child)) if ((ival = a2width(p, n->string)) >= 0)