=================================================================== RCS file: /cvs/docbook2mdoc/parse.c,v retrieving revision 1.9 retrieving revision 1.13 diff -u -p -r1.9 -r1.13 --- docbook2mdoc/parse.c 2019/04/02 15:53:02 1.9 +++ docbook2mdoc/parse.c 2019/04/03 17:53:02 1.13 @@ -1,4 +1,4 @@ -/* $Id: parse.c,v 1.9 2019/04/02 15:53:02 schwarze Exp $ */ +/* $Id: parse.c,v 1.13 2019/04/03 17:53:02 schwarze Exp $ */ /* * Copyright (c) 2014 Kristaps Dzonsons * Copyright (c) 2019 Ingo Schwarze @@ -69,7 +69,7 @@ static const struct element elements[] = { { "citerefentry", NODE_CITEREFENTRY }, { "citetitle", NODE_CITETITLE }, { "cmdsynopsis", NODE_CMDSYNOPSIS }, - { "code", NODE_CODE }, + { "code", NODE_LITERAL }, { "colspec", NODE_COLSPEC }, { "command", NODE_COMMAND }, { "constant", NODE_CONSTANT }, @@ -81,6 +81,7 @@ static const struct element elements[] = { { "emphasis", NODE_EMPHASIS }, { "entry", NODE_ENTRY }, { "envar", NODE_ENVAR }, + { "errorname", NODE_ERRORNAME }, { "fieldsynopsis", NODE_FIELDSYNOPSIS }, { "filename", NODE_FILENAME }, { "firstname", NODE_PERSONNAME }, @@ -98,7 +99,7 @@ static const struct element elements[] = { { "indexterm", NODE_DELETE }, { "info", NODE_INFO }, { "informalequation", NODE_INFORMALEQUATION }, - { "informaltable", NODE_INFORMALTABLE }, + { "informaltable", NODE_TABLE }, { "inlineequation", NODE_INLINEEQUATION }, { "itemizedlist", NODE_ITEMIZEDLIST }, { "keysym", NODE_KEYSYM }, @@ -163,9 +164,11 @@ static const struct element elements[] = { { "sgmltag", NODE_SGMLTAG }, { "simplelist", NODE_SIMPLELIST }, { "spanspec", NODE_SPANSPEC }, - { "structname", NODE_STRUCTNAME }, + { "structfield", NODE_PARAMETER }, + { "structname", NODE_TYPE }, { "subtitle", NODE_SUBTITLE }, { "surname", NODE_PERSONNAME }, + { "symbol", NODE_CONSTANT }, { "synopsis", NODE_SYNOPSIS }, { "table", NODE_TABLE }, { "tbody", NODE_TBODY }, @@ -178,7 +181,7 @@ static const struct element elements[] = { { "trademark", NODE_IGNORE }, { "type", NODE_TYPE }, { "ulink", NODE_ULINK }, - { "userinput", NODE_USERINPUT }, + { "userinput", NODE_LITERAL }, { "variablelist", NODE_VARIABLELIST }, { "varlistentry", NODE_VARLISTENTRY }, { "varname", NODE_VARNAME }, @@ -692,14 +695,16 @@ parse_file(struct parse *p, int fd, const char *fname) /* Parse an attribute value. */ if (in_arg) { - if (in_quotes == 0 && b[pend] == '"') { - in_quotes = 1; + if (in_quotes == 0 && + (b[pend] == '\'' || b[pend] == '"')) { + in_quotes = b[pend] == '"' ? 2 : 1; p->ncol++; pend++; continue; } if (advance(p, b, rlen, &pend, - in_quotes ? "\"" : " >") && rsz > 0) + in_quotes == 2 ? "\"" : + in_quotes == 1 ? "'" : " >") && rsz > 0) break; in_arg = in_quotes = elem_end = 0; if (b[pend] == '>') {