version 1.17, 2011/07/21 13:37:04 |
version 1.18, 2011/07/21 14:13:00 |
Line 80 static const struct eqnstr eqnmarks[EQNMARK__MAX] = { |
|
Line 80 static const struct eqnstr eqnmarks[EQNMARK__MAX] = { |
|
}; |
}; |
|
|
static const struct eqnstr eqnfonts[EQNFONT__MAX] = { |
static const struct eqnstr eqnfonts[EQNFONT__MAX] = { |
|
{ "", 0 }, |
{ "roman", 5 }, |
{ "roman", 5 }, |
{ "bold", 4 }, |
{ "bold", 4 }, |
{ "italic", 6 }, |
{ "italic", 6 }, |
}; |
}; |
|
|
|
static const struct eqnstr eqnposs[EQNPOS__MAX] = { |
|
{ "", 0 }, |
|
{ "over", 4 }, |
|
{ "sup", 3 }, |
|
{ "sub", 3 }, |
|
{ "to", 2 }, |
|
{ "from", 4 }, |
|
{ "above", 5 }, |
|
}; |
|
|
/* ARGSUSED */ |
/* ARGSUSED */ |
enum rofferr |
enum rofferr |
eqn_read(struct eqn_node **epp, int ln, |
eqn_read(struct eqn_node **epp, int ln, |
Line 189 eqn_box(struct eqn_node *ep, struct eqn_box *last, str |
|
Line 200 eqn_box(struct eqn_node *ep, struct eqn_box *last, str |
|
|
|
*sv = last; |
*sv = last; |
nextc = 1; |
nextc = 1; |
font = EQNFONT_NONE; |
font = EQNFONT_NONE; |
|
|
again: |
again: |
if (NULL == (start = eqn_nexttok(ep, &sz))) |
if (NULL == (start = eqn_nexttok(ep, &sz))) |
return(0); |
return(0); |
|
|
if (strncmp(eqnfonts[i].name, start, sz)) |
if (strncmp(eqnfonts[i].name, start, sz)) |
continue; |
continue; |
font = (enum eqn_fontt)i; |
font = (enum eqn_fontt)i; |
|
goto again; |
|
} |
|
|
|
for (i = 0; i < (int)EQNFONT__MAX; i++) { |
|
if (eqnposs[i].sz != sz) |
|
continue; |
|
if (strncmp(eqnposs[i].name, start, sz)) |
|
continue; |
|
last->pos = (enum eqn_post)i; |
goto again; |
goto again; |
} |
} |
|
|