Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

288 lines
7.0 KiB

  1. <HTML>
  2. <HEAD>
  3. <META HTTP-EQUIV="Content-Type" CONTENT="text/html">
  4. <TITLE>hdivide</TITLE>
  5. </HEAD>
  6. <BODY> <!-- TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" -->
  7. <H1>Utility -- hdivide</H1>
  8. <hr>
  9. <h2>Basic</h2>
  10. <p>
  11. Hdivide divides a source file (.w) into multiple files (.x) as specified in the source files.
  12. Those output files may be supposed to be processed by wcshdr utility.
  13. </p>
  14. <p>
  15. Output will be in the same directory as the source file.
  16. </p>
  17. <h2>Outputs</h2>
  18. <p>
  19. Hdivide redirects the output to the multiple files. The current output context (tag context) is specified by lined or inline tag.
  20. </p>
  21. <p>
  22. Hdivide also inserts the output of other files into specified point. The range of inclusion is specified with <b>reference_start</b> and <b>reference_end</b> tag in the tag context of the source.
  23. </p>
  24. <hr>
  25. <H2>Tags</H2>
  26. <h3>Tag context</h3>
  27. <p>
  28. Tag context is specified by either or both of line and inline tags.
  29. Output is redirected to the current tag context.
  30. </p>
  31. <p>
  32. Inline tags override the current tag context just for the current line.
  33. If "+" is spcified at the top of inline tag, line tag adds the specified tags to the current tag context.
  34. </p>
  35. <p>
  36. Line tag is effective until other line tag appears.
  37. </p>
  38. <p>
  39. The default tag context is "all."
  40. </p>
  41. <h3>Tag format</h3>
  42. <p>
  43. Line tag should start with <b>";"</b>. Line tag should start at the beginning of the line.
  44. </p>
  45. <p>
  46. Inline tags should start with <b>"@"</b>.
  47. It can appear at any place in non line tag line, but the rest of the line will be ex
  48. Multiple tag is separated by <b>";"</b>.
  49. </p>
  50. <p>
  51. Not all of the valid tags are multiple.
  52. </p>
  53. <p>
  54. If <b>"+"</b> appears right after <b>"@"</b>, following tags are the additions to the current tag context.
  55. </p>
  56. <p>
  57. Tags should only include <i>filename</i> portion. The extention <b>".x"</b> is automatically added.
  58. Tags should not include any path: i.e. drive name or directory name.
  59. </p>
  60. <h3>Output tag</h3>
  61. <p>
  62. Output tag redirects the output to specified files. Output tag can be multiple.
  63. It is one or any combination of:
  64. <ul>
  65. <li>public
  66. <li>internal
  67. <li><i>filename</i>
  68. </ul>
  69. <i>filename</i> should not include the extension. File extension is fixed as ".x".
  70. </p>
  71. <p>
  72. If one or more of the output tags are specified, the output is redirected to specified files until the next line tag appears.
  73. </p>
  74. <p>
  75. <b>All</b> and <b>null</b> tags are special, and cannot be multiple. See the table below for the detail.
  76. </p>
  77. <h3>Reverse</h3>
  78. <p>
  79. If the the first tag begins with <b>"!"</b>, tag specification is reversed. May not be effective for <b>all</b> and <b>null</b> tags.
  80. </p>
  81. <h3>Tag validity</h3>
  82. <p>
  83. Inline tag temporarily overrides the line tag. If specified, inline tag redirects the current line to specifed tag context.
  84. </p>
  85. <h3>Special tags</h3>
  86. <p>
  87. Special tags include <b>begin_<i>symbol</i>_<i>version</i></b>, <b>end_<i>symbol</i>_<i>version</i></b>, <b>else</b>,
  88. <b>insert_<i>tag</i></b>, <b>reference_start</b>, <b>reference_end</b>.
  89. See the following table for the detail.
  90. </p>
  91. <h3>List of valid tags</h3>
  92. <p>
  93. The following table summarizes the valid tags.
  94. </p>
  95. <table border>
  96. <tr>
  97. <th>
  98. <p>Tag</p>
  99. </th>
  100. <th>
  101. <p>Multiple</p>
  102. </th>
  103. <th>
  104. <p>Inline</p>
  105. </th>
  106. <th>
  107. <p>Semantics</p>
  108. </th>
  109. </tr>
  110. <tr>
  111. <td>
  112. <p>public</p>
  113. </td>
  114. <td><p>yes</p>
  115. <td><p>yes</p>
  116. <td>
  117. <p>Redirects to public .x file. The file name is same as the source file.
  118. </p>
  119. </td>
  120. </tr>
  121. <tr>
  122. <td>
  123. <p>internal</p>
  124. </td>
  125. <td><p>yes</p>
  126. <td><p>yes</p>
  127. <td>
  128. <p>Redirects to private .x file. The file name is the source file + "p".
  129. </p>
  130. </td>
  131. </tr>
  132. <tr>
  133. <td>
  134. <p><i>filename</i></p>
  135. </td>
  136. <td><p>yes</p>
  137. <td><p>yes</p>
  138. <td>
  139. <p>Redirects the output to <i>filename</i>.x.
  140. </p>
  141. <td>
  142. </tr>
  143. <tr>
  144. <td>
  145. <p>all</p>
  146. </td>
  147. <td><p>no</p>
  148. <td><p>yes</p>
  149. <td>
  150. <p>Redirects to all files declared before this tag.
  151. </p>
  152. </td>
  153. </tr>
  154. <tr>
  155. <td>
  156. <p>null</p>
  157. </td>
  158. <td><p>no</p>
  159. <td><p>yes</p>
  160. <td>
  161. <p>Specifies no output.
  162. </p>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td>
  167. <p>begin_<i>symbol</i>_<i>version</i></p>
  168. </td>
  169. <td><p>no</p>
  170. <td><p>no</p>
  171. <td>
  172. <p>Generates the C/C++ preprocessor macro. Will be translated to:
  173. <pre>
  174. #if (<i>symbol</i> &gt;= 0x<i>version</i>)
  175. </pre>
  176. Symbol is translated to upper case. Version is also translated to upper case and 4 hex digits.
  177. </p>
  178. <p>
  179. Example:
  180. <pre>
  181. ;begin_winver_40a
  182. -&gt;
  183. #if (WINVER >= 0x040A)
  184. ;begin__win32_winnt_500
  185. -&gt;
  186. #if (_WIN32_WINNT >= 0x500)
  187. </pre>
  188. </p>
  189. </td>
  190. </tr>
  191. <tr>
  192. <td>
  193. <p>end_<i>symbol</i>_<i>version</i></p>
  194. </td>
  195. <td><p>no</p>
  196. <td><p>no</p>
  197. <td>
  198. <p>Generates the C/C++ preprocessor macro. Will be translated to:
  199. <pre>
  200. #endif // <i>symbol</i> &gt;= 0x<i>version</i>
  201. </pre>
  202. </p>
  203. </td>
  204. </tr>
  205. <tr>
  206. <td>
  207. <p>else</p>
  208. </td>
  209. <td><p>no</p>
  210. <td><p>no</p>
  211. <td>
  212. <p>Generates the C/C++ preprocessor macro. Will be translated to:
  213. <pre>
  214. #else
  215. </pre>
  216. </p>
  217. </td>
  218. </tr>
  219. <tr>
  220. <td>
  221. <p>insert_<i>tag</i></p>
  222. </td>
  223. <td><p>no</p>
  224. <td><p>no</p>
  225. <td>
  226. <p>Specifies the insertion point of the output of <i>tag</i>.
  227. </p>
  228. <p>
  229. The portion of the file inserted from <i>tag</i> should be specified in the context of <i>tag</i>, by <b>reference_start</b> tag and <b>reference_end tag</b>.
  230. <p>
  231. <p>
  232. Multiple occurence of insert_<i>tag</i> is supported.
  233. </p>
  234. <p>
  235. The source file should not have cyclic insertion.
  236. </p>
  237. </td>
  238. </tr>
  239. <tr>
  240. <td>
  241. <p>reference_start</p>
  242. </td>
  243. <td><p>no</p>
  244. <td><p>no</p>
  245. <td>
  246. <p>Specifies the beginning of the reference of the current tag context.
  247. </p>
  248. <p>
  249. Multiple occurence of <b>reference_start</b> is supported. However, each <b>reference_start</b> should be ended by <b>reference_end</b> before another <b>reference_start</b> (in the same tag context) appears.
  250. </p>
  251. </td>
  252. </tr>
  253. <tr>
  254. <td>
  255. <p>reference_end</p>
  256. </td>
  257. <td><p>no</p>
  258. <td><p>no</p>
  259. <td>
  260. <p>Specifies the end of the reference of the current tag context.
  261. </p>
  262. <p>
  263. Multiple occurence of <b>reference_end</b> is supported.
  264. Before <b>reference_end</b> appears, corresponding <b>reference_start</b> should be appeared in the same tag context.
  265. </p>
  266. </td>
  267. </tr>
  268. </table>
  269. </BODY>
  270. </HTML>