=================================================================== RCS file: /cvs/docbook2mdoc/Attic/rules.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- docbook2mdoc/Attic/rules.c 2014/03/30 11:48:10 1.1 +++ docbook2mdoc/Attic/rules.c 2014/03/30 13:18:49 1.2 @@ -65,6 +65,7 @@ isparent(enum nodeid node, enum nodeid parent) switch (parent) { case (NODE_EMPHASIS): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -74,6 +75,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -95,6 +97,7 @@ isparent(enum nodeid node, enum nodeid parent) switch (parent) { case (NODE_EMPHASIS): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -104,6 +107,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -114,6 +118,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_CMDSYNOPSIS): case (NODE_EMPHASIS): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -123,6 +128,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -132,6 +138,7 @@ isparent(enum nodeid node, enum nodeid parent) switch (parent) { case (NODE_EMPHASIS): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -141,6 +148,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -170,6 +178,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_EMPHASIS): case (NODE_FUNCDEF): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -179,11 +188,42 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; } return(0); + case (NODE_LINK): + case (NODE_ULINK): /* Synonyms? */ + switch (parent) { + case (NODE_ARG): + case (NODE_CODE): + case (NODE_COMMAND): + case (NODE_EMPHASIS): + case (NODE_FUNCDEF): + case (NODE_FUNCSYNOPSISINFO): + case (NODE_FUNCTION): + case (NODE_LINK): + case (NODE_MANVOLNUM): + case (NODE_OPTION): + case (NODE_PARA): + case (NODE_PARAMDEF): + case (NODE_PARAMETER): + case (NODE_PROGRAMLISTING): + case (NODE_REFDESCRIPTOR): + case (NODE_REFENTRYTITLE): + case (NODE_REFMISCINFO): + case (NODE_REFNAME): + case (NODE_REPLACEABLE): + case (NODE_SYNOPSIS): + case (NODE_TERM): + case (NODE_ULINK): + return(1); + default: + break; + } + return(0); case (NODE_LISTITEM): return(NODE_VARLISTENTRY == parent); case (NODE_MANVOLNUM): @@ -200,6 +240,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_ARG): case (NODE_EMPHASIS): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PROGRAMLISTING): case (NODE_REFDESCRIPTOR): @@ -209,6 +250,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -231,6 +273,7 @@ isparent(enum nodeid node, enum nodeid parent) switch (parent) { case (NODE_CODE): case (NODE_FUNCSYNOPSISINFO): + case (NODE_LINK): case (NODE_PARA): case (NODE_PARAMDEF): case (NODE_PROGRAMLISTING): @@ -241,6 +284,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): return(1); default: break; @@ -294,6 +338,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_FUNCDEF): case (NODE_FUNCSYNOPSISINFO): case (NODE_FUNCTION): + case (NODE_LINK): case (NODE_MANVOLNUM): case (NODE_OPTION): case (NODE_PARA): @@ -309,6 +354,7 @@ isparent(enum nodeid node, enum nodeid parent) case (NODE_SYNOPSIS): case (NODE_TERM): case (NODE_TITLE): + case (NODE_ULINK): default: return(1); }