version 1.199, 2014/03/19 21:51:20 |
version 1.202, 2014/03/23 12:11:18 |
|
|
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "mandoc.h" |
|
#include "mandoc_aux.h" |
#include "libroff.h" |
#include "libroff.h" |
#include "libmandoc.h" |
#include "libmandoc.h" |
|
|
Line 264 static struct roffmac roffs[ROFF_MAX] = { |
|
Line 265 static struct roffmac roffs[ROFF_MAX] = { |
|
{ NULL, roff_userdef, NULL, NULL, 0, NULL }, |
{ NULL, roff_userdef, NULL, NULL, 0, NULL }, |
}; |
}; |
|
|
|
/* not currently implemented: Ds em Eq LP Me PP pp Or Rd Sf SH */ |
const char *const __mdoc_reserved[] = { |
const char *const __mdoc_reserved[] = { |
"Ac", "Ad", "An", "Ao", "Ap", "Aq", "Ar", "At", |
"Ac", "Ad", "An", "Ao", "Ap", "Aq", "Ar", "At", |
"Bc", "Bd", "Bf", "Bk", "Bl", "Bo", "Bq", |
"Bc", "Bd", "Bf", "Bk", "Bl", "Bo", "Bq", |
"Brc", "Bro", "Brq", "Bsx", "Bt", "Bx", |
"Brc", "Bro", "Brq", "Bsx", "Bt", "Bx", |
"Cd", "Cm", "Db", "Dc", "Dd", "Dl", "Do", "Dq", |
"Cd", "Cm", "Db", "Dc", "Dd", "Dl", "Do", "Dq", |
"Ds", "Dt", "Dv", "Dx", "D1", |
"Dt", "Dv", "Dx", "D1", |
"Ec", "Ed", "Ef", "Ek", "El", "Em", "em", |
"Ec", "Ed", "Ef", "Ek", "El", "Em", |
"En", "Eo", "Eq", "Er", "Es", "Ev", "Ex", |
"En", "Eo", "Er", "Es", "Ev", "Ex", |
"Fa", "Fc", "Fd", "Fl", "Fn", "Fo", "Fr", "Ft", "Fx", |
"Fa", "Fc", "Fd", "Fl", "Fn", "Fo", "Fr", "Ft", "Fx", |
"Hf", "Ic", "In", "It", "Lb", "Li", "Lk", "Lp", "LP", |
"Hf", "Ic", "In", "It", "Lb", "Li", "Lk", "Lp", |
"Me", "Ms", "Mt", "Nd", "Nm", "No", "Ns", "Nx", |
"Ms", "Mt", "Nd", "Nm", "No", "Ns", "Nx", |
"Oc", "Oo", "Op", "Os", "Ot", "Ox", |
"Oc", "Oo", "Op", "Os", "Ot", "Ox", |
"Pa", "Pc", "Pf", "Po", "Pp", "PP", "pp", "Pq", |
"Pa", "Pc", "Pf", "Po", "Pp", "Pq", |
"Qc", "Ql", "Qo", "Qq", "Or", "Rd", "Re", "Rs", "Rv", |
"Qc", "Ql", "Qo", "Qq", "Re", "Rs", "Rv", |
"Sc", "Sf", "Sh", "SH", "Sm", "So", "Sq", |
"Sc", "Sh", "Sm", "So", "Sq", |
"Ss", "St", "Sx", "Sy", |
"Ss", "St", "Sx", "Sy", |
"Ta", "Tn", "Ud", "Ux", "Va", "Vt", "Xc", "Xo", "Xr", |
"Ta", "Tn", "Ud", "Ux", "Va", "Vt", "Xc", "Xo", "Xr", |
"%A", "%B", "%D", "%I", "%J", "%N", "%O", |
"%A", "%B", "%C", "%D", "%I", "%J", "%N", "%O", |
"%P", "%Q", "%R", "%T", "%U", "%V", |
"%P", "%Q", "%R", "%T", "%U", "%V", |
NULL |
NULL |
}; |
}; |
|
|
|
/* not currently implemented: BT DE DS ME MT PT SY TQ YS */ |
const char *const __man_reserved[] = { |
const char *const __man_reserved[] = { |
"AT", "B", "BI", "BR", "BT", "DE", "DS", "DT", |
"AT", "B", "BI", "BR", "DT", |
"EE", "EN", "EQ", "EX", "HF", "HP", "I", "IB", "IP", "IR", |
"EE", "EN", "EQ", "EX", "HP", "I", "IB", "IP", "IR", |
"LP", "ME", "MT", "OP", "P", "PD", "PP", "PT", |
"LP", "OP", "P", "PD", "PP", |
"R", "RB", "RE", "RI", "RS", "SB", "SH", "SM", "SS", "SY", |
"R", "RB", "RE", "RI", "RS", "SB", "SH", "SM", "SS", |
"TE", "TH", "TP", "TQ", "TS", "T&", "UC", "UE", "UR", "YS", |
"TE", "TH", "TP", "TS", "T&", "UC", "UE", "UR", |
NULL |
NULL |
}; |
}; |
|
|
Line 653 roff_parsetext(char **bufp, size_t *szp, int pos, int |
|
Line 656 roff_parsetext(char **bufp, size_t *szp, int pos, int |
|
|
|
/* Spring the input line trap. */ |
/* Spring the input line trap. */ |
if (1 == roffit_lines) { |
if (1 == roffit_lines) { |
isz = asprintf(&p, "%s\n.%s", *bufp, roffit_macro); |
isz = mandoc_asprintf(&p, "%s\n.%s", *bufp, roffit_macro); |
if (-1 == isz) { |
|
perror(NULL); |
|
exit((int)MANDOCLEVEL_SYSERR); |
|
} |
|
free(*bufp); |
free(*bufp); |
*bufp = p; |
*bufp = p; |
*szp = isz + 1; |
*szp = isz + 1; |