=================================================================== RCS file: /cvs/mandoc/term_ascii.c,v retrieving revision 1.45 retrieving revision 1.48 diff -u -p -r1.45 -r1.48 --- mandoc/term_ascii.c 2015/04/04 17:47:18 1.45 +++ mandoc/term_ascii.c 2015/09/26 00:54:04 1.48 @@ -1,4 +1,4 @@ -/* $Id: term_ascii.c,v 1.45 2015/04/04 17:47:18 schwarze Exp $ */ +/* $Id: term_ascii.c,v 1.48 2015/09/26 00:54:04 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -62,12 +62,15 @@ static struct termp * ascii_init(enum termenc enc, const struct mchars *mchars, const struct manoutput *outopts) { +#if HAVE_WCHAR char *v; +#endif struct termp *p; p = mandoc_calloc(1, sizeof(struct termp)); p->symtab = mchars; + p->line = 1; p->tabwidth = 5; p->defrmargin = p->lastrmargin = 78; p->fontq = mandoc_reallocarray(NULL, @@ -161,6 +164,7 @@ ascii_sepline(void *arg) size_t i; p = (struct termp *)arg; + p->line += 3; putchar('\n'); for (i = 0; i < p->defrmargin; i++) putchar('-'); @@ -207,6 +211,7 @@ static void ascii_endline(struct termp *p) { + p->line++; putchar('\n'); } @@ -255,7 +260,6 @@ ascii_hspan(const struct termp *p, const struct roffsu break; default: abort(); - /* NOTREACHED */ } return(r > 0.0 ? r + 0.01 : r - 0.01); } @@ -363,6 +367,7 @@ static void locale_endline(struct termp *p) { + p->line++; putwchar(L'\n'); }