#define D_DD (1 << 8)
#define D_PA (1 << 9)
#define D_IL (1 << 10)
+#define D_TT (1 << 11)
enum
{
SP_START_EM,
SP_START_BF,
+ SP_START_TT,
SP_END_FT,
SP_NEWLINE,
SP_NEWPAR,
if (docstat & (D_DL))
docstat = print_it (SP_END_DL, NULL, out, docstat);
- if (docstat & (D_EM | D_BF))
+ if (docstat & (D_EM | D_BF | D_TT))
docstat = print_it (SP_END_FT, NULL, out, docstat);
docstat = print_it (SP_END_SECT, NULL, out, docstat);
{
static int Continuation = 0;
- case SP_END_FT: docstat &= ~(D_EM|D_BF); break;
+ case SP_END_FT: docstat &= ~(D_EM|D_BF|D_TT); break;
case SP_START_BF: docstat |= D_BF; break;
case SP_START_EM: docstat |= D_EM; break;
+ case SP_START_TT: docstat |= D_TT; break;
case SP_NEWLINE:
{
if (onl)
case SP_END_FT:
{
fputs ("\\fP", out);
- docstat &= ~(D_EM|D_BF);
+ docstat &= ~(D_EM|D_BF|D_TT);
break;
}
case SP_START_BF:
{
fputs ("\\fB", out);
docstat |= D_BF;
- docstat &= ~D_EM;
+ docstat &= ~(D_EM|D_TT);
break;
}
case SP_START_EM:
{
fputs ("\\fI", out);
docstat |= D_EM;
- docstat &= ~D_BF;
+ docstat &= ~(D_BF|D_TT);
break;
}
+ case SP_START_TT:
+ {
+ fputs ("\\fC", out);
+ docstat |= D_TT;
+ docstat &= ~(D_BF|D_EM);
+ break;
+ }
case SP_NEWLINE:
{
if (onl)
{
if (docstat & D_EM) fputs ("</emphasis>", out);
if (docstat & D_BF) fputs ("</emphasis>", out);
- docstat &= ~(D_EM|D_BF);
+ if (docstat & D_TT) fputs ("</literal>", out);
+ docstat &= ~(D_EM|D_BF|D_TT);
break;
}
case SP_START_BF:
{
fputs ("<emphasis role=\"bold\">", out);
docstat |= D_BF;
- docstat &= ~D_EM;
+ docstat &= ~(D_EM|D_TT);
break;
}
case SP_START_EM:
{
fputs ("<emphasis>", out);
docstat |= D_EM;
- docstat &= ~D_BF;
+ docstat &= ~(D_BF|D_TT);
break;
}
+ case SP_START_TT:
+ {
+ fputs ("<literal>", out);
+ docstat |= D_TT;
+ docstat &= ~(D_BF|D_EM);
+ break;
+ }
case SP_NEWLINE:
{
if (onl)
docstat = print_it (SP_START_BF, NULL, out, docstat);
s += 2;
}
+ else if (!strncmp (s, "\\fC", 3))
+ {
+ docstat = commit_buff (buff, &d, out, docstat);
+ docstat = print_it (SP_START_TT, NULL, out, docstat);
+ s += 2;
+ }
else if (!strncmp (s, "\\fP", 3))
{
docstat = commit_buff (buff, &d, out, docstat);