Interaction between WGML and whpcvt utility
-------------------------------------------

OW documentation support only base ASCII character set 0-127 codes.
Higher characters 128-255 are used for whpcvt control codes and some special "extended" characters.
Now OW documentation can use only English text, it is not capable to use other Languages as Japanese.
It could be solvable to use ESC sequences for whpcvt control codes and get full character set
space 0-255 for data. It will enable to support double-byte (Japanese) and other multi-byte encodings as UTF-8 etc.
It will need to change whpcvt utility and appropriate definition changes in WGML macros.

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.

| Hex | Dec | Control code | WGML symbol | Notes |
| --- | --- | ------------ | ----------- | ----- |
| 0x7F | 127 | WHP_HLINK             | rslnk
| 0x9D | 157 | WHP_FONTTYPE          | | generated by WHELPDRV
| 0x9E | 158 | WHP_PAR_RESET         | rspar
| 0x9F | 159 | WHP_EXCLUDE_OFF_BLANK | rsxoffb
| 0xA0 | 160 | WHP_UP_TOPIC          | rsup
| 0xA7 | 167 | WHP_TOPIC_LN          | rshln
| 0xAA | 170 | WHP_TABXMP            | rstbxmp
| 0xB0 | 176 | WHP_BMP               | rsbmp | virtual GML tag :HBMP
| 0xB4 | 180 | WHP_EXCLUDE_OFF       | rsxoff
| 0xB9 | 185 | WHP_DLIST_DESC        | rsddesc
| 0xC3 | 195 | WHP_EXCLUDE_ON        | rsxon
| 0xC8 | 200 | WHP_OLIST_START       | rslstos
| 0xC9 | 201 | WHP_OLIST_END         | rslstoe
| 0xCA | 202 | WHP_DLIST_START       | rslstds
| 0xCB | 203 | WHP_DLIST_END         | rslstde
| 0xCC | 204 | WHP_DLIST_TERM        | rslstdt
| 0xD2 | 210 | WHP_LIST_START        | rslstus
| 0xD3 | 211 | WHP_LIST_ITEM         | rslsti
| 0xD4 | 212 | WHP_LIST_END          | rslstue
| 0xD5 | 213 | WHP_SLIST_START       | rslstss
| 0xD6 | 214 | WHP_SLIST_END         | rslstse
| 0xDB | 219 | WHP_BOX_ON            | rsbxon
| 0xE8 | 232 | WHP_FLINK             | rsflnk
| 0xEA | 234 | WHP_DFN               | rsdfn
| 0xEC | 236 | WHP_CTX_KW            | rskw
| 0xEE | 238 | WHP_TOPIC             | rstpc
| 0xEF | 239 | WHP_FONTSTYLE_START   | | generated by WHELPDRV
| 0xF0 | 240 | WHP_FONTSTYLE_END     | | generated by WHELPDRV
| 0xF7 | 247 | WHP_CTX_DEF           | rsctx
| 0xF8 | 248 | WHP_TOPIC_NOLN        | rshnln
| 0xFE | 254 | WHP_BOX_OFF           | rsbxof
| 0xFF | 255 | WHP_SPACE_NOBREAK     | rsspace

# whpcvt Control Codes

The format descriptions are BNF:\
**`[]`** means optional stuff\
**`<>`** means a necessary component described later\
**`|`** is one of\
anything else means actual text.

## WHP_EXCLUDE_OFF ( Include On )
- **Location**: column 0, no following text, default at start
- **Format**: **WHP_EXCLUDE_OFF**

Text from the next line and on is to be included in processing.

## WHP_EXCLUDE_OFF_BLANK ( Include On and Eat Blank Line )
- **Location**: column 0
- **Format**: **WHP_EXCLUDE_OFF_BLANK**

Same as Include On, but also eats the next blank line, if any.

## WHP_EXCLUDE_ON ( Include Off )
- **Location**: column 0, no following text
- **Format**: **WHP_EXCLUDE_ON**

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.

## WHP_CTX_DEF ( Topic Definition )
#### WHP_TOPIC_NOLN ( Popup definition topic )
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 ( 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.
#
- **Location**: column 0
- **Format**: **WHP_CTX_DEF**<_level_>**WHP_CTX_DEF**[**WHP_TOPIC_NOLN**|**WHP_TOPIC_LN**]<_ctx_name_>**WHP_CTX_DEF**<_title_>[**WHP_CTX_DEF**<_browse_list_>[**WHP_CTX_DEF**<_keywords_>]]

<**_level_**> 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.\
<**_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.\
<**_keywords_**> 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.

## WHP_HLINK ( Hyperlink )
- **Location**: 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 ( Definition popup )
- **Location**: 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 ( Topic Section )
- **Location**: column 0, no following text
- **Format**: **WHP_TOPIC**<_ctx_name_>[**WHP_TOPIC**<_order_nun_>]

<**_ctx_name_**> name of new topic section.\
<**_order_num_**> can be 0 or greater.

Defines a new topic section.
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.

## WHP_LIST_START ( Unordered List Start )
- **Location**: 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_LIST_END ( Unordered List End )
- **Location**: column 0, no following text
- **Format**: **WHP_LIST_END**

Ends an unordered list.

## WHP_OLIST_START ( Order List Start )
- **Location**: column 0, no following text
- **Format**: **WHP_OLIST_START**[**c**]

'**c**' is optional, and indicates a compact list (no spaces between list items).
Otherwise, spacing is as indicated in the definition.

Starts an ordered and numbered list.

## WHP_OLIST_END ( Order List End )
- **Location**: column 0, no following text
- **Format**: **WHP_OLIST_END**

Ends an ordered list.

## WHP_SLIST_START ( Simple List Start )
- **Location**: column 0, no following text
- **Format**: **WHP_SLIST_START**[**c**]

'**c**' is optional, and indicates a compact list (no spaces between list items).
Otherwise, spacing is as indicated in the definition.

Starts a simple list (no bullets).

## WHP_SLIST_END ( Simple list End )
- **Location**: column 0, no following text
- **Format**: **WHP_SLIST_END**

Ends a simple list.

## WHP_DLIST_START ( Definition List Start )
- **Location**: column 0, no following text
- **Format**: **WHP_DLIST_START**

Starts a definition list.

## WHP_DLIST_END ( Definition List End )
- **Location**: column 0, no following text
- **Format**: **WHP_DLIST_END**

Ends a definition list.

## WHP_DLIST_TERM ( Definition List Term )
- **Location**: column 0
- **Format**: **WHP_DLIST_TERM**<_term_>

The text lines after the <_term_> are displayed below the <_term_> as paragraphs.
There is nothing closer for defined terms since font styling and other effects can be inserted.

## WHP_DLIST_DESC ( Definition Description )
- **Location**: column 0
- **Format**: **WHP_DLIST_DESC**<_description_>

<**_description_**> Definition Description Text

Starts a definition description.

## WHP_LIST_ITEM ( List item )
- **Location**: column 0
- **Format**: **WHP_LIST_ITEM**<_list_item_>

<**_list_item_**> List Item Text

Item for a unordered, ordered or simple list.
All list types can be nested arbitrarily.

## WHP_CTX_KW ( Keyword )
- **Location**: 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 ( Paragraph Reset )
- **Location**: in text lines
- **Format**: **WHP_PAR_RESET**

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_BMP ( Bitmap Picture )
- **Location**: in text lines
- **Format**: **WHP_BMP**<_alignment_>**WHP_BMP**<_file_>**WHP_BMP**

<**_alignment_**> is one of ('**i**', '**l**', '**r**', '**c**'). '**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 ( Font Style start )
## WHP_FONTSTYLE_END ( Font Style end )
- **Location**: in text lines
- **Format**: **WHP_FONTSTYLE_START**<_font_styles_>**WHP_FONTSTYLE_START** ... **WHP_FONTSTYLE_END**

<**_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 to the stupidity of OS/2 IPF).

## WHP_FONTTYPE ( Font Type )
- **Location**: in text lines
- **Format**: **WHP_FONTTYPE**<_facename_>**WHP_FONTTYPE**<_point_size_>**WHP_FONTTYPE**

<**_facename_**> valid are recognized by the following subwords: Courier, Helv, Roman, Tmns, Symbol.\
<**_point_size_**> common are: 8, 10, 12, 14, 18, 24.

Setup new Font Type.
The Windows default is Helv 10.

## WHP_BOX_ON ( Box On )
- **Location**: column 0, no following text
- **Format**: **WHP_BOX_ON**

Turns box mode on.

## WHP_BOX_OFF ( Box Off )
- **Location**: column 0, no following text
- **Format**: **WHP_BOX_OFF**

Turns box mode off.

## WHP_TABXMP ( Tab example )
- **Location**: column 0
- **Format 1**: **WHP_TABXMP**<_tab_char_>[ <_stops_>]*

<**_tab_char_**> TAB character used\
<**_stops_**> TAB stop positions used

Setups up a tabbed example.

- **Location**: column 0, no following text
- **Format 2**: **WHP_TABXMP**

Ends a tabbed example.

## WHP_FLINK ( File hyperlink )
- **Location**: 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 ( Hard space )
- **Location**: in text lines
- **Format**: **WHP_SPACE_NOBREAK**

## WHP_UP_TOPIC ( Up topic )
- **Location**: ?
- **Format**: **WHP_UP_TOPIC** ?
