Lines Matching defs:p
68 struct termp *p;
70 p = mandoc_calloc(1, sizeof(*p));
71 p->tcol = p->tcols = mandoc_calloc(1, sizeof(*p->tcol));
72 p->maxtcol = 1;
74 p->line = 1;
75 p->defindent = 5;
76 p->defrmargin = p->lastrmargin = 78;
77 p->fontq = mandoc_reallocarray(NULL,
78 (p->fontsz = 8), sizeof(*p->fontq));
79 p->fontq[0] = p->fontl = TERMFONT_NONE;
81 p->begin = ascii_begin;
82 p->end = ascii_end;
83 p->hspan = ascii_hspan;
84 p->type = TERMTYPE_CHAR;
86 p->enc = TERMENC_ASCII;
87 p->advance = ascii_advance;
88 p->endline = ascii_endline;
89 p->letter = ascii_letter;
90 p->setwidth = ascii_setwidth;
91 p->width = ascii_width;
117 p->enc = TERMENC_UTF8;
118 p->advance = locale_advance;
119 p->endline = locale_endline;
120 p->letter = locale_letter;
121 p->width = locale_width;
127 p->mdocstyle = 1;
129 p->defindent = outopts->indent;
131 p->defrmargin = outopts->width;
133 p->synopsisonly = 1;
135 assert(p->defindent < UINT16_MAX);
136 assert(p->defrmargin < UINT16_MAX);
137 return p;
162 ascii_setwidth(struct termp *p, int iop, int width)
166 p->tcol->rmargin = p->defrmargin;
168 p->defrmargin += width;
170 p->defrmargin = width ? (size_t)width : p->lastrmargin;
171 else if (p->defrmargin > (size_t)width)
172 p->defrmargin -= width;
174 p->defrmargin = 0;
175 if (p->defrmargin > 1000)
176 p->defrmargin = 1000;
177 p->lastrmargin = p->tcol->rmargin;
178 p->tcol->rmargin = p->maxrmargin = p->defrmargin;
184 struct termp *p;
187 p = (struct termp *)arg;
188 (*p->endline)(p);
189 for (i = 0; i < p->defrmargin; i++)
190 (*p->letter)(p, '-');
191 (*p->endline)(p);
192 (*p->endline)(p);
196 ascii_width(const struct termp *p, int c)
209 ascii_letter(struct termp *p, int c)
216 ascii_begin(struct termp *p)
219 (*p->headf)(p, p->argf);
223 ascii_end(struct termp *p)
226 (*p->footf)(p, p->argf);
230 ascii_endline(struct termp *p)
233 p->line++;
234 if ((int)p->tcol->offset > p->ti)
235 p->tcol->offset -= p->ti;
237 p->tcol->offset = 0;
238 p->ti = 0;
243 ascii_advance(struct termp *p, size_t len)
260 ascii_hspan(const struct termp *p, const struct roffsu *su)
316 "p", "q", "r", "s", "t", "u", "v", "w",
354 "O", "o", "OI", "oi", "P", "p", "YR", "2",
375 locale_width(const struct termp *p, int c)
388 locale_advance(struct termp *p, size_t len)
405 locale_endline(struct termp *p)
408 p->line++;
409 if ((int)p->tcol->offset > p->ti)
410 p->tcol->offset -= p->ti;
412 p->tcol->offset = 0;
413 p->ti = 0;
418 locale_letter(struct termp *p, int c)