windows-nt/Source/XPSP1/NT/sdktools/hdivide/hdivide.htm
2020-09-26 16:20:57 +08:00

289 lines
6.7 KiB
HTML

<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html">
<TITLE>hdivide</TITLE>
</HEAD>
<BODY> <!-- TEXT="#000000" LINK="#0000ff" VLINK="#800080" BGCOLOR="#ffffff" -->
<H1>Utility -- hdivide</H1>
<hr>
<h2>Basic</h2>
<p>
Hdivide divides a source file (.w) into multiple files (.x) as specified in the source files.
Those output files may be supposed to be processed by wcshdr utility.
</p>
<p>
Output will be in the same directory as the source file.
</p>
<h2>Outputs</h2>
<p>
Hdivide redirects the output to the multiple files. The current output context (tag context) is specified by lined or inline tag.
</p>
<p>
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.
</p>
<hr>
<H2>Tags</H2>
<h3>Tag context</h3>
<p>
Tag context is specified by either or both of line and inline tags.
Output is redirected to the current tag context.
</p>
<p>
Inline tags override the current tag context just for the current line.
If "+" is spcified at the top of inline tag, line tag adds the specified tags to the current tag context.
</p>
<p>
Line tag is effective until other line tag appears.
</p>
<p>
The default tag context is "all."
</p>
<h3>Tag format</h3>
<p>
Line tag should start with <b>";"</b>. Line tag should start at the beginning of the line.
</p>
<p>
Inline tags should start with <b>"@"</b>.
It can appear at any place in non line tag line, but the rest of the line will be ex
Multiple tag is separated by <b>";"</b>.
</p>
<p>
Not all of the valid tags are multiple.
</p>
<p>
If <b>"+"</b> appears right after <b>"@"</b>, following tags are the additions to the current tag context.
</p>
<p>
Tags should only include <i>filename</i> portion. The extention <b>".x"</b> is automatically added.
Tags should not include any path: i.e. drive name or directory name.
</p>
<h3>Output tag</h3>
<p>
Output tag redirects the output to specified files. Output tag can be multiple.
It is one or any combination of:
<ul>
<li>public
<li>internal
<li><i>filename</i>
</ul>
<i>filename</i> should not include the extension. File extension is fixed as ".x".
</p>
<p>
If one or more of the output tags are specified, the output is redirected to specified files until the next line tag appears.
</p>
<p>
<b>All</b> and <b>null</b> tags are special, and cannot be multiple. See the table below for the detail.
</p>
<h3>Reverse</h3>
<p>
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.
</p>
<h3>Tag validity</h3>
<p>
Inline tag temporarily overrides the line tag. If specified, inline tag redirects the current line to specifed tag context.
</p>
<h3>Special tags</h3>
<p>
Special tags include <b>begin_<i>symbol</i>_<i>version</i></b>, <b>end_<i>symbol</i>_<i>version</i></b>, <b>else</b>,
<b>insert_<i>tag</i></b>, <b>reference_start</b>, <b>reference_end</b>.
See the following table for the detail.
</p>
<h3>List of valid tags</h3>
<p>
The following table summarizes the valid tags.
</p>
<table border>
<tr>
<th>
<p>Tag</p>
</th>
<th>
<p>Multiple</p>
</th>
<th>
<p>Inline</p>
</th>
<th>
<p>Semantics</p>
</th>
</tr>
<tr>
<td>
<p>public</p>
</td>
<td><p>yes</p>
<td><p>yes</p>
<td>
<p>Redirects to public .x file. The file name is same as the source file.
</p>
</td>
</tr>
<tr>
<td>
<p>internal</p>
</td>
<td><p>yes</p>
<td><p>yes</p>
<td>
<p>Redirects to private .x file. The file name is the source file + "p".
</p>
</td>
</tr>
<tr>
<td>
<p><i>filename</i></p>
</td>
<td><p>yes</p>
<td><p>yes</p>
<td>
<p>Redirects the output to <i>filename</i>.x.
</p>
<td>
</tr>
<tr>
<td>
<p>all</p>
</td>
<td><p>no</p>
<td><p>yes</p>
<td>
<p>Redirects to all files declared before this tag.
</p>
</td>
</tr>
<tr>
<td>
<p>null</p>
</td>
<td><p>no</p>
<td><p>yes</p>
<td>
<p>Specifies no output.
</p>
</td>
</tr>
<tr>
<td>
<p>begin_<i>symbol</i>_<i>version</i></p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Generates the C/C++ preprocessor macro. Will be translated to:
<pre>
#if (<i>symbol</i> &gt;= 0x<i>version</i>)
</pre>
Symbol is translated to upper case. Version is also translated to upper case and 4 hex digits.
</p>
<p>
Example:
<pre>
;begin_winver_40a
-&gt;
#if (WINVER >= 0x040A)
;begin__win32_winnt_500
-&gt;
#if (_WIN32_WINNT >= 0x500)
</pre>
</p>
</td>
</tr>
<tr>
<td>
<p>end_<i>symbol</i>_<i>version</i></p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Generates the C/C++ preprocessor macro. Will be translated to:
<pre>
#endif // <i>symbol</i> &gt;= 0x<i>version</i>
</pre>
</p>
</td>
</tr>
<tr>
<td>
<p>else</p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Generates the C/C++ preprocessor macro. Will be translated to:
<pre>
#else
</pre>
</p>
</td>
</tr>
<tr>
<td>
<p>insert_<i>tag</i></p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Specifies the insertion point of the output of <i>tag</i>.
</p>
<p>
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>.
<p>
<p>
Multiple occurence of insert_<i>tag</i> is supported.
</p>
<p>
The source file should not have cyclic insertion.
</p>
</td>
</tr>
<tr>
<td>
<p>reference_start</p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Specifies the beginning of the reference of the current tag context.
</p>
<p>
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.
</p>
</td>
</tr>
<tr>
<td>
<p>reference_end</p>
</td>
<td><p>no</p>
<td><p>no</p>
<td>
<p>Specifies the end of the reference of the current tag context.
</p>
<p>
Multiple occurence of <b>reference_end</b> is supported.
Before <b>reference_end</b> appears, corresponding <b>reference_start</b> should be appeared in the same tag context.
</p>
</td>
</tr>
</table>
</BODY>
</HTML>