[BACK]Return to node.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / docbook2mdoc

Diff for /docbook2mdoc/node.c between version 1.9 and 1.10

version 1.9, 2019/04/12 04:39:24 version 1.10, 2019/04/12 16:40:53
Line 15 
Line 15 
  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF   * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.   * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */   */
   #include <assert.h>
 #include <stdlib.h>  #include <stdlib.h>
 #include <string.h>  #include <string.h>
   
Line 24 
Line 25 
  * The implementation of the DocBook syntax tree.   * The implementation of the DocBook syntax tree.
  */   */
   
   struct  nodeprop {
           const char      *name;
           enum nodeclass   class;
   };
   
   static  const struct nodeprop properties[] = {
           { "affiliation",        CLASS_TRANS },
           { "appendix",           CLASS_BLOCK },
           { "application",        CLASS_LINE },
           { "arg",                CLASS_ENCL },
           { "author",             CLASS_LINE },
           { "authorgroup",        CLASS_BLOCK },
           { "blockquote",         CLASS_BLOCK },
           { "bookinfo",           CLASS_BLOCK },
           { "caution",            CLASS_BLOCK },
           { "citerefentry",       CLASS_LINE },
           { "citetitle",          CLASS_LINE },
           { "cmdsynopsis",        CLASS_TRANS },
           { "colspec",            CLASS_VOID },
           { "command",            CLASS_LINE },
           { "constant",           CLASS_LINE },
           { "contrib",            CLASS_TRANS },
           { "copyright",          CLASS_TRANS },
           { "date",               CLASS_TRANS },
           { "!DOCTYPE",           CLASS_VOID },
           { "editor",             CLASS_LINE },
           { "email",              CLASS_ENCL },
           { "emphasis",           CLASS_LINE },
           { "!ENTITY",            CLASS_VOID },
           { "entry",              CLASS_ENCL },
           { "envar",              CLASS_LINE },
           { "errorname",          CLASS_LINE },
           { "fieldsynopsis",      CLASS_TRANS },
           { "filename",           CLASS_LINE },
           { "firstterm",          CLASS_LINE },
           { "footnote",           CLASS_TRANS },
           { "funcdef",            CLASS_BLOCK },
           { "funcprototype",      CLASS_BLOCK },
           { "funcsynopsis",       CLASS_TRANS },
           { "funcsynopsisinfo",   CLASS_LINE },
           { "function",           CLASS_LINE },
           { "glossterm",          CLASS_LINE },
           { "group",              CLASS_ENCL },
           { "holder",             CLASS_TRANS },
           { "xi:include",         CLASS_VOID },
           { "index",              CLASS_TRANS },
           { "info",               CLASS_TRANS },
           { "informalequation",   CLASS_BLOCK },
           { "inlineequation",     CLASS_BLOCK },
           { "itemizedlist",       CLASS_BLOCK },
           { "keysym",             CLASS_LINE },
           { "legalnotice",        CLASS_BLOCK },
           { "link",               CLASS_ENCL },
           { "listitem",           CLASS_TRANS },
           { "literal",            CLASS_ENCL },
           { "literallayout",      CLASS_BLOCK },
           { "manvolnum",          CLASS_TRANS },
           { "markup",             CLASS_LINE },
           { "member",             CLASS_LINE },
           { "mml:math",           CLASS_LINE },
           { "mml:mfenced",        CLASS_LINE },
           { "mml:mfrac",          CLASS_LINE },
           { "mml:mi",             CLASS_LINE },
           { "mml:mn",             CLASS_LINE },
           { "mml:mo",             CLASS_LINE },
           { "mml:mrow",           CLASS_LINE },
           { "mml:msub",           CLASS_LINE },
           { "mml:msup",           CLASS_LINE },
           { "modifier",           CLASS_LINE },
           { "note",               CLASS_BLOCK },
           { "option",             CLASS_LINE },
           { "orderedlist",        CLASS_BLOCK },
           { "orgname",            CLASS_TRANS },
           { "para",               CLASS_BLOCK },
           { "paramdef",           CLASS_LINE },
           { "parameter",          CLASS_LINE },
           { "personname",         CLASS_TRANS },
           { "preface",            CLASS_BLOCK },
           { "programlisting",     CLASS_BLOCK },
           { "prompt",             CLASS_TRANS },
           { "quote",              CLASS_ENCL },
           { "refclass",           CLASS_TRANS },
           { "refdescriptor",      CLASS_TRANS },
           { "refentry",           CLASS_TRANS },
           { "refentryinfo",       CLASS_VOID },
           { "refentrytitle",      CLASS_TRANS },
           { "refmeta",            CLASS_TRANS },
           { "refmetainfo",        CLASS_TRANS },
           { "refmiscinfo",        CLASS_TRANS },
           { "refname",            CLASS_LINE },
           { "refnamediv",         CLASS_BLOCK },
           { "refpurpose",         CLASS_LINE },
           { "refsynopsisdiv",     CLASS_BLOCK },
           { "releaseinfo",        CLASS_TRANS },
           { "replaceable",        CLASS_LINE },
           { "row",                CLASS_BLOCK },
           { "sbr",                CLASS_BLOCK },
           { "screen",             CLASS_BLOCK },
           { "section",            CLASS_BLOCK },
           { "simplelist",         CLASS_TRANS },
           { "spanspec",           CLASS_TRANS },
           { "subtitle",           CLASS_TRANS },
           { "synopsis",           CLASS_BLOCK },
           { "table",              CLASS_TRANS },
           { "tbody",              CLASS_TRANS },
           { "term",               CLASS_LINE },
           { "tfoot",              CLASS_TRANS },
           { "tgroup",             CLASS_BLOCK },
           { "thead",              CLASS_TRANS },
           { "tip",                CLASS_BLOCK },
           { "title",              CLASS_BLOCK },
           { "type",               CLASS_LINE },
           { "variablelist",       CLASS_BLOCK },
           { "varlistentry",       CLASS_BLOCK },
           { "varname",            CLASS_LINE },
           { "warning",            CLASS_BLOCK },
           { "wordasword",         CLASS_TRANS },
           { "year",               CLASS_TRANS },
           { "[UNKNOWN]",          CLASS_VOID },
           { "[TEXT]",             CLASS_TEXT },
           { "[ESCAPE]",           CLASS_TEXT }
   };
   
 static  const char *const attrkeys[ATTRKEY__MAX] = {  static  const char *const attrkeys[ATTRKEY__MAX] = {
         "choice",          "choice",
         "class",          "class",
Line 72  attrval_parse(const char *name)
Line 196  attrval_parse(const char *name)
                 if (strcmp(name, attrvals[val]) == 0)                  if (strcmp(name, attrvals[val]) == 0)
                         break;                          break;
         return val;          return val;
   }
   
   enum nodeid
   pnode_parse(const char *name)
   {
           enum nodeid      node;
   
           for (node = 0; node < NODE_UNKNOWN; node++)
                   if (strcmp(name, properties[node].name) == 0)
                           break;
           return node;
   }
   
   const char *
   pnode_name(enum nodeid node)
   {
           assert(node < NODE_IGNORE);
           return properties[node].name;
   }
   
   enum nodeclass
   pnode_class(enum nodeid node)
   {
           assert(node < NODE_IGNORE);
           return properties[node].class;
 }  }
   
 struct pnode *  struct pnode *

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

CVSweb