node.h.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. node.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='namedb.h.html' title=' namedb.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='number.h.html' title=' number.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * node.h - document node definitions and declarations;
  24. *
  25. * Motley Tools by Charles Maier &lt;cmaier@cmassoc.net&gt;;
  26. * Copyright 2001-2006 by Charles Maier Associates;
  27. * Licensed under the Internet Software Consortium License;
  28. *
  29. *--------------------------------------------------------------------*/
  30. #ifndef NODE_HEADER
  31. #define NODE_HEADER
  32. /*====================================================================*
  33. * system headers;
  34. *--------------------------------------------------------------------*/
  35. #include &lt;unistd.h&gt;
  36. #include &lt;stdint.h&gt;
  37. /*====================================================================*
  38. * custom headers;
  39. *--------------------------------------------------------------------*/
  40. #include &quot;../tools/types.h&quot;
  41. /*====================================================================*
  42. *
  43. *--------------------------------------------------------------------*/
  44. #define ISO_CHARSET &quot;iso-8859-1&quot;
  45. #define ISO_CONTENT &quot;text/html&quot;
  46. /*====================================================================*
  47. *
  48. *--------------------------------------------------------------------*/
  49. #define W3C_STD &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot;
  50. #define W3C_DTD &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&quot;
  51. /*====================================================================*
  52. *
  53. *--------------------------------------------------------------------*/
  54. #define XML_VERSION &quot;1.0&quot;
  55. #define XML_NAMESPACE &quot;http://www.w3.org/2001/XMLSchema-instance&quot;
  56. #define XML_CHARSET ISO_CHARSET
  57. #define XML_LANGUAGE &quot;en-us&quot;
  58. #define XML_SCHEMA &quot;http://www.w3.org/2001/XMLSchema&quot;
  59. /*====================================================================*
  60. *
  61. *--------------------------------------------------------------------*/
  62. #define NODE_ELEM '&lt;'
  63. #define NODE_SGML '!'
  64. #define NODE_INST '?'
  65. #define NODE_ATTR ' '
  66. #define NODE_VALU '='
  67. #define NODE_ETAG '/'
  68. #define NODE_DATA '&gt;'
  69. /*====================================================================*
  70. *
  71. *--------------------------------------------------------------------*/
  72. #define DATA_SCHEMA &quot;piboffset.xsd&quot;
  73. #define DATA_NAME &quot;name&quot;
  74. #define DATA_TEXT &quot;text&quot;
  75. #define DATA_OBJECT &quot;pib&quot;
  76. #define DATA_MEMBER &quot;object&quot;
  77. #define DATA_OFFSET &quot;offset&quot;
  78. #define DATA_LENGTH &quot;length&quot;
  79. #define DATA_STRUCT &quot;array&quot;
  80. #define DATA_STRING &quot;dataString&quot;
  81. #define DATA_MEMORY &quot;dataHex&quot;
  82. #define DATA_HUGE &quot;dataHuge&quot;
  83. #define DATA_LONG &quot;dataLong&quot;
  84. #define DATA_WORD &quot;dataWord&quot;
  85. #define DATA_BYTE &quot;dataByte&quot;
  86. /*====================================================================*
  87. * variables;
  88. *--------------------------------------------------------------------*/
  89. typedef struct node
  90. {
  91. struct node * above;
  92. struct node * prior;
  93. struct node * after;
  94. struct node * below;
  95. unsigned line;
  96. unsigned type;
  97. char * text;
  98. }
  99. NODE;
  100. /*====================================================================*
  101. * functions;
  102. *--------------------------------------------------------------------*/
  103. char const * xmlselect (NODE const *, char const * element, char const * attribute);
  104. signed xmlread (NODE *, char const * filename);
  105. signed xmlscan (NODE *);
  106. signed xmledit (NODE const *, void * memory, size_t extent);
  107. NODE * xmlopen (char const * filename);
  108. NODE * xmlnode (NODE *);
  109. NODE const * xmlelement (NODE const *, char const * name);
  110. NODE const * xmlattribute (NODE const *, char const * name);
  111. NODE const * xmlvalue (NODE const *);
  112. NODE const * xmldata (NODE const *);
  113. void xmlschema ();
  114. void xmltree (NODE const *);
  115. void xmlfree (NODE *);
  116. /*====================================================================*
  117. *
  118. *--------------------------------------------------------------------*/
  119. #endif
  120. </pre>
  121. <div class='footerlink'>
  122. [<a href='namedb.h.html' title=' namedb.h '>PREV</a>]
  123. [<a href='toolkit.html' title=' Index '>HOME</a>]
  124. [<a href='number.h.html' title=' number.h '>NEXT</a>]
  125. </div>
  126. </body>
  127. </html>