version 1.37, 2015/02/13 00:44:16 |
version 1.38, 2015/02/13 12:40:54 |
Line 615 formatcode(struct state *st, const char *buf, size_t * |
|
Line 615 formatcode(struct state *st, const char *buf, size_t * |
|
} |
} |
if (0 == strncmp(buf + *start, "NULL", 4) && |
if (0 == strncmp(buf + *start, "NULL", 4) && |
('=' == buf[*start + 4] || |
('=' == buf[*start + 4] || |
'>' == buf[*start + 4])) |
'>' == buf[*start + 4])) { |
printf("Dv "); |
printf("Dv "); |
|
break; |
|
} |
|
i = 0; |
|
while (isalnum((unsigned char)buf[*start + i]) || |
|
'_' == buf[*start + i]) |
|
i++; |
|
if (i && MDOC_Fa == dict_get(buf + *start, i)) |
|
printf("Fa "); |
else |
else |
printf("Sy "); |
printf("Sy "); |
break; |
break; |
|
|
verbatim(struct state *st, char *buf, size_t start, size_t end) |
verbatim(struct state *st, char *buf, size_t start, size_t end) |
{ |
{ |
size_t i, ift, ifo, ifa, ifc, inl; |
size_t i, ift, ifo, ifa, ifc, inl; |
char *cp; |
char *cp, *cp2; |
int nopen; |
int nopen; |
|
|
if ( ! st->parsing || st->paused || start == end) |
if ( ! st->parsing || st->paused || start == end) |
|
|
buf[ifc++] = '\0'; |
buf[ifc++] = '\0'; |
for (;;) { |
for (;;) { |
cp = strchr(buf + ifa, ','); |
cp = strchr(buf + ifa, ','); |
if (cp != NULL) |
if (cp != NULL) { |
|
cp2 = cp; |
*cp++ = '\0'; |
*cp++ = '\0'; |
|
} else |
|
cp2 = strchr(buf + ifa, '\0'); |
|
while (isalnum((unsigned char)cp2[-1]) || |
|
'_' == cp2[-1]) |
|
cp2--; |
|
if ('\0' != *cp2) |
|
dict_put(cp2, MDOC_Fa); |
printf(".Fa \"%s\"\n", buf + ifa); |
printf(".Fa \"%s\"\n", buf + ifa); |
if (cp == NULL) |
if (cp == NULL) |
break; |
break; |