=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term_ps.c,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- src/usr.bin/mandoc/term_ps.c 2017/05/08 15:33:43 1.48 +++ src/usr.bin/mandoc/term_ps.c 2017/06/07 17:38:08 1.49 @@ -1,4 +1,4 @@ -/* $OpenBSD: term_ps.c,v 1.48 2017/05/08 15:33:43 schwarze Exp $ */ +/* $OpenBSD: term_ps.c,v 1.49 2017/06/07 17:38:08 schwarze Exp $ */ /* * Copyright (c) 2010, 2011 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -534,12 +534,15 @@ size_t marginx, marginy, lineheight; const char *pp; - p = mandoc_calloc(1, sizeof(struct termp)); + p = mandoc_calloc(1, sizeof(*p)); + p->tcol = p->tcols = mandoc_calloc(1, sizeof(*p->tcol)); + p->maxtcol = 1; + p->enc = TERMENC_ASCII; p->fontq = mandoc_reallocarray(NULL, - (p->fontsz = 8), sizeof(enum termfont)); + (p->fontsz = 8), sizeof(*p->fontq)); p->fontq[0] = p->fontl = TERMFONT_NONE; - p->ps = mandoc_calloc(1, sizeof(struct termp_ps)); + p->ps = mandoc_calloc(1, sizeof(*p->ps)); p->advance = ps_advance; p->begin = ps_begin; @@ -1216,7 +1219,7 @@ ps_closepage(p); - p->offset -= p->ti; + p->tcol->offset -= p->ti; p->ti = 0; }