=================================================================== RCS file: /cvs/docbook2mdoc/Attic/rules.c,v retrieving revision 1.20 retrieving revision 1.25 diff -u -p -r1.20 -r1.25 --- docbook2mdoc/Attic/rules.c 2014/04/30 09:43:55 1.20 +++ docbook2mdoc/Attic/rules.c 2015/03/19 10:04:32 1.25 @@ -16,6 +16,9 @@ isattrkey(enum nodeid node, enum attrkey key) break; } return(0); + case (ATTRKEY_OPEN): + case (ATTRKEY_CLOSE): + return(node == NODE_MML_MFENCED); case (ATTRKEY_ID): /* Common to all. */ return(1); @@ -215,6 +218,16 @@ isparent(enum nodeid node, enum nodeid parent) break; } return(0); + case (NODE_COLSPEC): + switch (parent) { + case (NODE_TFOOT): + case (NODE_THEAD): + case (NODE_TGROUP): + return(1); + default: + break; + } + return(0); case (NODE_COMMAND): switch (parent) { case (NODE_CMDSYNOPSIS): @@ -267,6 +280,8 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_COPYRIGHT): switch (parent) { case (NODE_INFO): + case (NODE_REFENTRYINFO): + case (NODE_REFMETAINFO): return(1); default: break; @@ -345,6 +360,28 @@ isparent(enum nodeid node, enum nodeid parent) break; } return(0); + case (NODE_FIELDSYNOPSIS): + switch (parent) { + case (NODE_CAUTION): + case (NODE_ENTRY): + case (NODE_ITEMIZEDLIST): + case (NODE_LISTITEM): + case (NODE_NOTE): + case (NODE_ORDEREDLIST): + case (NODE_PARA): + case (NODE_REFSECT1): + case (NODE_REFSECT2): + case (NODE_REFSECT3): + case (NODE_REFSECTION): + case (NODE_REFSYNOPSISDIV): + case (NODE_TIP): + case (NODE_VARIABLELIST): + case (NODE_WARNING): + return(1); + default: + break; + } + return(0); case (NODE_FILENAME): switch (parent) { case (NODE_EMPHASIS): @@ -468,6 +505,47 @@ isparent(enum nodeid node, enum nodeid parent) break; } return(0); + case (NODE_INFORMALEQUATION): + switch (parent) { + case (NODE_CAUTION): + case (NODE_ENTRY): + case (NODE_ITEMIZEDLIST): + case (NODE_LISTITEM): + case (NODE_NOTE): + case (NODE_ORDEREDLIST): + case (NODE_PARA): + case (NODE_REFSECT1): + case (NODE_REFSECT2): + case (NODE_REFSECT3): + case (NODE_REFSECTION): + case (NODE_REFSYNOPSISDIV): + case (NODE_VARIABLELIST): + case (NODE_WARNING): + return(1); + default: + break; + } + return(0); + case (NODE_INLINEEQUATION): + switch (parent) { + case (NODE_APPLICATION): + case (NODE_EMPHASIS): + case (NODE_ENTRY): + case (NODE_LINK): + case (NODE_PARA): + case (NODE_PROGRAMLISTING): + case (NODE_QUOTE): + case (NODE_REFENTRYTITLE): + case (NODE_SCREEN): + case (NODE_SYNOPSIS): + case (NODE_TERM): + case (NODE_TITLE): + case (NODE_ULINK): + return(1); + default: + break; + } + return(0); case (NODE_ITEMIZEDLIST): switch (parent) { case (NODE_CAUTION): @@ -501,7 +579,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_CONSTANT): case (NODE_EMPHASIS): case (NODE_ENTRY): - case (NODE_ENVAR): + case (NODE_ENVAR): case (NODE_FILENAME): case (NODE_FUNCDEF): case (NODE_FUNCSYNOPSISINFO): @@ -510,6 +588,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_LINK): case (NODE_LITERAL): case (NODE_MANVOLNUM): + case (NODE_MODIFIER): case (NODE_OPTION): case (NODE_PARA): case (NODE_PARAMDEF): @@ -526,6 +605,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TRADEMARK): + case (NODE_TYPE): case (NODE_ULINK): case (NODE_USERINPUT): case (NODE_VARNAME): @@ -579,6 +659,63 @@ isparent(enum nodeid node, enum nodeid parent) break; } return(0); + case (NODE_MML_MATH): + switch (parent) { + case (NODE_INFORMALEQUATION): + case (NODE_INLINEEQUATION): + return(1); + default: + break; + } + return(0); + case (NODE_MML_MFENCED): + case (NODE_MML_MFRAC): + case (NODE_MML_MI): + case (NODE_MML_MN): + case (NODE_MML_MO): + case (NODE_MML_MROW): + case (NODE_MML_MSUB): + case (NODE_MML_MSUP): + switch (parent) { + case (NODE_MML_MATH): + case (NODE_MML_MFENCED): + case (NODE_MML_MFRAC): + case (NODE_MML_MI): + case (NODE_MML_MN): + case (NODE_MML_MO): + case (NODE_MML_MROW): + case (NODE_MML_MSUB): + case (NODE_MML_MSUP): + return(1); + default: + break; + } + return(0); + case (NODE_MODIFIER): + switch (parent) { + case (NODE_CODE): + case (NODE_EMPHASIS): + case (NODE_ENTRY): + case (NODE_FIELDSYNOPSIS): + case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): + case (NODE_ULINK): + case (NODE_PARA): + case (NODE_PROGRAMLISTING): + case (NODE_QUOTE): + case (NODE_REFDESCRIPTOR): + case (NODE_REFENTRYTITLE): + case (NODE_REFNAME): + case (NODE_REFPURPOSE): + case (NODE_SCREEN): + case (NODE_SYNOPSIS): + case (NODE_TERM): + case (NODE_TITLE): + return(1); + default: + break; + } + return(0); case (NODE_NOTE): switch (parent) { case (NODE_CAUTION): @@ -675,6 +812,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_PARAMETER): switch (parent) { case (NODE_CODE): + case (NODE_EMPHASIS): case (NODE_ENTRY): case (NODE_FUNCSYNOPSISINFO): case (NODE_LINK): @@ -784,6 +922,8 @@ isparent(enum nodeid node, enum nodeid parent) } case (NODE_REFMETA): return(parent == NODE_REFENTRY); + case (NODE_REFMETAINFO): + return(parent == NODE_REFMETA); case (NODE_REFMISCINFO): return(parent == NODE_REFMETA); case (NODE_REFNAME): @@ -827,7 +967,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_CONSTANT): case (NODE_EMPHASIS): case (NODE_ENTRY): - case (NODE_ENVAR): + case (NODE_ENVAR): case (NODE_FILENAME): case (NODE_FUNCDEF): case (NODE_FUNCSYNOPSISINFO): @@ -837,6 +977,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_LINK): case (NODE_LITERAL): case (NODE_MANVOLNUM): + case (NODE_MODIFIER): case (NODE_OPTION): case (NODE_PARA): case (NODE_PARAMDEF): @@ -856,6 +997,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_TERM): case (NODE_TITLE): case (NODE_TRADEMARK): + case (NODE_TYPE): case (NODE_ULINK): case (NODE_USERINPUT): case (NODE_VARNAME): @@ -1087,6 +1229,31 @@ isparent(enum nodeid node, enum nodeid parent) break; } return(0); + case (NODE_TYPE): + switch (parent) { + case (NODE_CODE): + case (NODE_EMPHASIS): + case (NODE_ENTRY): + case (NODE_FIELDSYNOPSIS): + case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): + case (NODE_ULINK): + case (NODE_PARA): + case (NODE_PROGRAMLISTING): + case (NODE_QUOTE): + case (NODE_REFDESCRIPTOR): + case (NODE_REFENTRYTITLE): + case (NODE_REFNAME): + case (NODE_REFPURPOSE): + case (NODE_SCREEN): + case (NODE_SYNOPSIS): + case (NODE_TERM): + case (NODE_TITLE): + return(1); + default: + break; + } + return(0); case (NODE_USERINPUT): switch (parent) { case (NODE_EMPHASIS): @@ -1137,6 +1304,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_CODE): case (NODE_EMPHASIS): case (NODE_ENTRY): + case (NODE_FIELDSYNOPSIS): case (NODE_FUNCSYNOPSISINFO): case (NODE_LINK): case (NODE_PARA):