Lines Matching refs:p

68 	struct termp	*p;  in ascii_init()  local
70 p = mandoc_calloc(1, sizeof(*p)); in ascii_init()
71 p->tcol = p->tcols = mandoc_calloc(1, sizeof(*p->tcol)); in ascii_init()
72 p->maxtcol = 1; in ascii_init()
74 p->line = 1; in ascii_init()
75 p->defrmargin = p->lastrmargin = 78; in ascii_init()
76 p->fontq = mandoc_reallocarray(NULL, in ascii_init()
77 (p->fontsz = 8), sizeof(*p->fontq)); in ascii_init()
78 p->fontq[0] = p->fontl = TERMFONT_NONE; in ascii_init()
80 p->begin = ascii_begin; in ascii_init()
81 p->end = ascii_end; in ascii_init()
82 p->hspan = ascii_hspan; in ascii_init()
83 p->type = TERMTYPE_CHAR; in ascii_init()
85 p->enc = TERMENC_ASCII; in ascii_init()
86 p->advance = ascii_advance; in ascii_init()
87 p->endline = ascii_endline; in ascii_init()
88 p->letter = ascii_letter; in ascii_init()
89 p->setwidth = ascii_setwidth; in ascii_init()
90 p->width = ascii_width; in ascii_init()
116 p->enc = TERMENC_UTF8; in ascii_init()
117 p->advance = locale_advance; in ascii_init()
118 p->endline = locale_endline; in ascii_init()
119 p->letter = locale_letter; in ascii_init()
120 p->width = locale_width; in ascii_init()
126 p->mdocstyle = 1; in ascii_init()
127 p->defindent = 5; in ascii_init()
130 p->defindent = outopts->indent; in ascii_init()
132 p->defrmargin = outopts->width; in ascii_init()
134 p->synopsisonly = 1; in ascii_init()
136 assert(p->defindent < UINT16_MAX); in ascii_init()
137 assert(p->defrmargin < UINT16_MAX); in ascii_init()
138 return p; in ascii_init()
163 ascii_setwidth(struct termp *p, int iop, int width) in ascii_setwidth() argument
167 p->tcol->rmargin = p->defrmargin; in ascii_setwidth()
169 p->defrmargin += width; in ascii_setwidth()
171 p->defrmargin = width ? (size_t)width : p->lastrmargin; in ascii_setwidth()
172 else if (p->defrmargin > (size_t)width) in ascii_setwidth()
173 p->defrmargin -= width; in ascii_setwidth()
175 p->defrmargin = 0; in ascii_setwidth()
176 if (p->defrmargin > 1000) in ascii_setwidth()
177 p->defrmargin = 1000; in ascii_setwidth()
178 p->lastrmargin = p->tcol->rmargin; in ascii_setwidth()
179 p->tcol->rmargin = p->maxrmargin = p->defrmargin; in ascii_setwidth()
185 struct termp *p; in terminal_sepline() local
188 p = (struct termp *)arg; in terminal_sepline()
189 (*p->endline)(p); in terminal_sepline()
190 for (i = 0; i < p->defrmargin; i++) in terminal_sepline()
191 (*p->letter)(p, '-'); in terminal_sepline()
192 (*p->endline)(p); in terminal_sepline()
193 (*p->endline)(p); in terminal_sepline()
197 ascii_width(const struct termp *p, int c) in ascii_width() argument
210 ascii_letter(struct termp *p, int c) in ascii_letter() argument
217 ascii_begin(struct termp *p) in ascii_begin() argument
220 (*p->headf)(p, p->argf); in ascii_begin()
224 ascii_end(struct termp *p) in ascii_end() argument
227 (*p->footf)(p, p->argf); in ascii_end()
231 ascii_endline(struct termp *p) in ascii_endline() argument
234 p->line++; in ascii_endline()
235 if ((int)p->tcol->offset > p->ti) in ascii_endline()
236 p->tcol->offset -= p->ti; in ascii_endline()
238 p->tcol->offset = 0; in ascii_endline()
239 p->ti = 0; in ascii_endline()
244 ascii_advance(struct termp *p, size_t len) in ascii_advance() argument
261 ascii_hspan(const struct termp *p, const struct roffsu *su) in ascii_hspan() argument
376 locale_width(const struct termp *p, int c) in locale_width() argument
389 locale_advance(struct termp *p, size_t len) in locale_advance() argument
406 locale_endline(struct termp *p) in locale_endline() argument
409 p->line++; in locale_endline()
410 if ((int)p->tcol->offset > p->ti) in locale_endline()
411 p->tcol->offset -= p->ti; in locale_endline()
413 p->tcol->offset = 0; in locale_endline()
414 p->ti = 0; in locale_endline()
419 locale_letter(struct termp *p, int c) in locale_letter() argument