-
Notifications
You must be signed in to change notification settings - Fork 163
WGML whpcvt interaction
It looks like OW documentation support only base ASCII character set 0-127. Higher characters 128-255 are used for whpcvt control codes. Some positions from this range is used for special "extended" characters. Generaly it can be used only for English text, it is not capable to use other Languages as Japanese. It could be solvable to use ESC sequences for whpcvt control codes (need change whpcvt utility) and get full character set space 0-255 for data and support double-byte (Japanese) and other multi-byte encodings as UTF-8 etc.
Below is list of all whpcvt control codes used by OW documentation. They are generated by WGML compiler into output file and next process by whpcvt utility into source file for appropriate Help Compiler. A few codes are generated by WHELPDRV WGML driver.
------- 0x70 ---------------------
0x7F 127 WHP_HLINK
------- 0x80 ---------------------
------- 0x90 ---------------------
0x9D 157 WHP_FONTTYPE generated by WHELPDRV
0x9E 158 WHP_PAR_RESET
0x9F 159 WHP_EXCLUDE_OFF_BLANK
------- 0xA0 ---------------------
0xA0 160 WHP_UP_TOPIC
0xA0 167 WHP_TOPIC_LN
0xAA 170 WHP_TABXMP
------- 0xB0 ---------------------
0xB0 176 WHP_BMP
0xB4 180 WHP_EXCLUDE_OFF
0xB9 185 WHP_DLIST_DESC
------- 0xC0 ---------------------
0xC3 195 WHP_EXCLUDE_ON
0xC8 200 WHP_OLIST_START
0xC9 201 WHP_OLIST_END
0xCA 202 WHP_DLIST_START
0xCB 203 WHP_DLIST_END
0xCC 204 WHP_DLIST_TERM
------- 0xD0 ---------------------
0xD2 210 WHP_LIST_START
0xD3 211 WHP_LIST_ITEM
0xD4 212 WHP_LIST_END
0xD5 213 WHP_SLIST_START
0xD6 214 WHP_SLIST_END
0xDB 219 WHP_BOX_ON
------- 0xE0 ---------------------
0xE8 232 WHP_FLINK
0xEC 236 WHP_CTX_KW
0xEE 238 WHP_TOPIC
0xEA 234 WHP_DFN
0xEF 239 WHP_FONTSTYLE_START generated by WHELPDRV
------- 0xF0 ---------------------
0xF0 240 WHP_FONTSTYLE_END generated by WHELPDRV
0xF7 247 WHP_CTX_DEF
0xF8 248 WHP_TOPIC_NOLN
0xFE 254 WHP_BOX_OFF
0xFF 255 WHP_SPACE_NOBREAK
----------------------------------
The WHP file contains key code characters. These are ASCII codes greater than 127 which are unlikely to appear as normal GML text. The format descriptions are BNF: '[]' means option stuff, '<>' means a necessary component described later, '|' is one of, anything else means actual text.
- Column 0, no following text. Default at start.
- Text from the next line and on is to be included in processing.
- Column 0, no following text.
- Text from the next line and on is to be excluded completely until the next '>' character is encountered. Include On/Off are not 'stackable'; the next include on always turns on processing.
- Column 0.
- format: WHP_CTX_DEFWHP_CTX_DEF[WHP_TOPIC_NOLN|WHP_TOPIC_LN] <ctx_name>WHP_CTX_DEF<title> [WHP_CTX_DEF<browse_list>[WHP_CTX_DEF]]
- is the heading level of this topic. This is used for OS/2 IPF help, as well as in RTF and InfoBench "up" buttons. Heading levels can be skipped. Valid heading levels are from 0 to 6.
- Indicates that the <title> should not appear in a non-scrolling region at the top of the topic. The title will scroll with the topic text.
- WHP_TOPIC_LN (167/0xA7) Normal definition topic (default). Indicates that the <title> will appear in a non-scrolling region at the top of the topic. The title will not scroll away as the topic is scrolled.
- <ctx_name> is the help topic context name for the topic. Blanks (and other non-variable-like characters) are not allowed in this name.
- <title> is the Title displayed at the top of the Topic. It
may be any text.
- is a list of search keywords (actually, key word groupings), separated by commas and semi-colons. The <title> is usually put in here as well.
- <browse_list> is the name of the browse list that this topic belongs to.
- Topic text may follow immediately, or a topic section.
- in text lines, not split across lines.
- format: WHP_HLINK<ctx_name>WHP_HLINK<text>WHP_HLINK
- <ctx_name> is the help topic context name to which this hyperlink
should go.
- <text> is any arbitrary text which represents the hyperlink.
WHP_DFN (234/0xEA) Definition popup.
- in text lines, not split across lines.
- format: WHP_DFN<ctx_name>WHP_DFN<text>WHP_DFN
- <ctx_name> is the help topic context name to which this popup
definition should go.
- <text> is any arbitrary text which represents the definition link.
WHP_TOPIC (238/0xEE) Topic Section.
- column 0.
- format: WHP_TOPIC<ctx_name>[WHP_TOPIC<order_nun>]
- defines a new topic section for <ctx_name>.
- if no <order_num> is provided, then this section is placed
as the next unordered topic.
- if <order_num> is provided, then this section is ordered
by its order number (lowest first). Ordered sections come
after unordered sections. <order_num> can be 0 or greater.
WHP_LIST_START (210/0xD2) Unordered List Start.
- column 0. No following text.
- format: WHP_LIST_START[c]
- starts an unordered list (with bullets).
- 'c' is optional, and indicates a compact list (no spaces
between list items). Otherwise, spacing is as indicated
in the definition.
WHP_OLIST_START (200/0xC8) Order List Start.
- column 0. No following text.
- format: WHP_OLIST_START[c]
- starts an ordered and numbered list.
- 'c' is optional, and indicates a compact list (no spaces
between list items). Otherwise, spacing is as indicated
in the definition.
WHP_SLIST_START (213/0xD5) Simple List Start.
- column 0. No following text.
- format: WHP_SLIST_START[c]
- starts a simple list (no bullets).
- 'c' is optional, and indicates a compact list (no spaces
between list items). Otherwise, spacing is as indicated
in the definition.
WHP_DLIST_START (202/0xCA) Definition List Start.
- column 0. No following text.
- starts a definition list.
WHP_DLIST_TERM (204/0xCC) Definition List Term.
- column 0.
- format: WHP_DLIST_TERM<term>
- The text lines after the term are displayed below the term
as paragraphs.
- There is no closer for defn terms since font styling and
other effects can be inserted.
WHP_DLIST_DESC (185/0xB9) Definition Description.
- column 0. Followed by text for the definition description.
- Starts a definition description.
WHP_LIST_ITEM (211/0xD3) List item.
- column 0. Followed by text for the list item.
- Item for a unordered, ordered or simple list.
- ALL list types can be nested arbitrarily.
WHP_LIST_END (212/0xD4) Unordered List End.
- column 0. No following text.
- ends an unordered list.
WHP_OLIST_END (201/0xC9) Order List End.
- column 0. No following text.
- ends an ordered list.
WHP_DLIST_END (203/0xCB) Definition List End.
- column 0. No Following text.
- ends a definition list.
WHP_SLIST_END (214/0xD6) Simple list End.
- column 0. No Following text.
- ends a simple list.
WHP_CTX_KW (236/0xEC) Keyword.
- in text lines, or on their own lines.
- format: WHP_CTX_KW<keyword>WHP_CTX_KW
- <keyword> is added to the list of keywords for the current topic.
- If a line is defined containing only keywords, it does not
generate a blank line.
WHP_PAR_RESET (158/0x9E) Paragraph Reset.
- in text lines.
- causes the next paragraph to be reset properly. Useful
for RTF, when boxing and other wierd stuff require a
paragraph reset to gets things back to normal.
WHP_EXCLUDE_OFF_BLANK (159/0x9F) Include On and Eat Blank Line.
- Column 0.
- same as Include On, but also eats the next blank line, if any.
WHP_BMP (176/0xB0) Bitmap Picture.
- in text lines.
- format: WHP_BMP[i|l|r|c]WHP_BMP<file>WHP_BMP
- 'i' is for inline, 'l' for left, 'r' for right, and 'c' for centered.
- <file> is the name of the bitmap file.
WHP_FONTSTYLE_START (239/0xEF) Font Style start (used by GML WHELPDRV driver).
- in text lines.
- format: WHP_FONTSTYLE_START<font_styles>WHP_FONTSTYLE_START
{with ending WHP_FONTSTYLE_END later}
- <font_styles> is any combination of the following characters:
b (bold), i (italic), u (underline), s (underscore).
- The ending WHP_FONTSTYLE_END restores the font to plain with no
styles. Hence, font stylings do NOT nest (this is due the the
stupidity of OS/2 IPF).
WHP_FONTSTYLE_END (240/0xF0) Font Style end (used by GML WHELPDRV driver).
- in text lines.
- see 'Font Style'.
WHP_FONTTYPE (157/0x9D) Font Type (used by GML WHELPDRV driver).
- in text lines.
- format: WHP_FONTTYPE<facename>WHP_FONTTYPE<point_size>WHP_FONTTYPE
- valid facenames are recognized by the following subwords:
Courier, Helv, Roman, Tmns, Symbol.
- common point sizes are: 8, 10, 12, 14, 18, 24.
- the Windows default is Helv 10.
WHP_BOX_ON (219/0xDB) Box On.
- column 0. No Following text.
- turns box mode on
WHP_BOX_OFF (254/0xFE) Box Off.
- column 0. No Following text.
- turns box mode off
WHP_TABXMP (170/0xAA) Tab example.
- format 1: WHP_TABXMP<char> [<stops>]*
- setups up a tabbed example.
- format 2: WHP_TABXMP
- ends a tabbed example.
WHP_FLINK (232/0xE8) File hyperlink.
- in text lines, not split across lines.
- format: WHP_FLINK<file_name>WHP_FLINK<topic_title>WHP_FLINK
<text>WHP_FLINK
- <file_name> is the name of help file to jump to.
- <topic_title> is the help topic name to which this hyperlink
should go.
- <text> is any arbitrary text which represents the hyperlink.
WHP_SPACE_NOBREAK (255/0xff) Hard space.
- in text lines.
- format: WHP_SPACE_NOBREAK
WHP_UP_TOPIC (160/0xA0) Up topic ?
?
- Welcome
- Building
- Open Watcom Documentation
- Notes
- Relicensing effort
- Debugging
- OW tools usage Overview
- OW tools usage with CMake
- OW tools usage with Visual Studio Code
- Open Watcom 1.9 Wiki
OW Development
WGML Development
- WGML
- Augmented Devices
- Binary Device Files
- Common File Blocks
- COP Files
- Device File Blocks
- Device Function Language
- Device Function Notes
- Device Functions
- Directory File Format
- Drawing Boxes
- Driver File Blocks
- File and Directory Names
- Font File Blocks
- Fonts
- GML Tag Notes
- Keyword Statistics
- Macros and User Defined Tags
- Meta Data
- Page Layout Subsystem
- Search Paths
- Sequencing
- System Symbol Notes
- Tabs and Tabbing
- whpcvt Utility interaction