en:docs:tk:tools:mkmsgf

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:docs:tk:tools:mkmsgf [2024/01/19 08:35] prokusheven:docs:tk:tools:mkmsgf [2024/03/26 13:10] (current) prokushev
Line 9: Line 9:
  
 <diagram> <diagram>
-|-|v|-|-|-|v|v|-|-|-|v|MKMSGF|v|drive|v|v| path |v| +|-|v|-|-|-|v|v|-|-|-|v|MKMSGF|-@2| 
-| |`|drive|'|`| path |'| | | |`|-|-|-|'|`|-|-|-|'|+| |`|drive|'|`|path|'
 + 
 +|-@2|v|-|-|-|v|v|-|-|-|v|infile|-@2
 +| |`|drive|'|`|path|' | |  
 + 
 +|-@2|v|-|-|-|v|v|-|-|-|v|outfile|-@2| 
 +| |`|drive|'|`|path|'
 + 
 +|   |,|-|-|-|-|-|.| | 
 +|-@2|^@1f|v|-|-|-|v|^|(| 
 +| | |)|/?|(| 
 +| | |!| | | |!| 
 +| | |)|/V|(| 
 +| | |!| | | |!| 
 +| | |)|/D <DBCS range or country>|(| 
 +| | |!| | | |!| 
 +| | |)|/P <code page>|(| 
 +| | |!| | | |!| 
 +| | |)|/L <language id,sub id>|(| 
 +| | |!| | | |!| 
 +| | |)|/I <path>|(| 
 +| | |!| | | |!| 
 +| | |)|/A|(| 
 +| | |!| | | |!| 
 +| | |`|/C|'| 
 + 
 </diagram> </diagram>
 MKMSGF infile[.ext] outfile[.ext] [/?] [/V] [/D <DBCS range or country>] [/P <code page>] [/L <language id,sub id>] MKMSGF infile[.ext] outfile[.ext] [/?] [/V] [/D <DBCS range or country>] [/P <code page>] [/L <language id,sub id>]
Line 63: Line 89:
         RMS     23      1       Rhaeto-Romanic          Switzerland         RMS     23      1       Rhaeto-Romanic          Switzerland
         ROM     24      1       Romanian                Romania         ROM     24      1       Romanian                Romania
-        RUS     25      1       Russian                 U.S.S.R.+        RUS     25      1       Russian                 Russian Federation
         SHL     26      1       Croato-Serbian (Lat     Yugoslavia         SHL     26      1       Croato-Serbian (Lat     Yugoslavia
         SHC     26      2       Serbo-Croatian (Cyr     Yugoslavia         SHC     26      2       Serbo-Croatian (Cyr     Yugoslavia
Line 75: Line 101:
         SLO     34      1       Slovene                 Slovenia         SLO     34      1       Slovene                 Slovenia
  
-For a complete list of code pages and country codes, see the code page table under COUNTRYCODE in the online book Control Program Programming Guide and Reference.+For a complete list of code pages and country codes, see the code page table under [[https://komh.github.io/os2books/os2tk45/cp2/061_L2_COUNTRYCODE.html|COUNTRYCODE]] in the online book Control Program Programming Guide and Reference.
  
-===== Input Message File Format =====+===== Output File =====
  
-The input message file is a standard ASCII file that contains three types of lines: 
- 
-    Comment lines 
-    Component identifier line 
-    Component message lines 
- 
-Comment Lines 
- 
-Comment lines are allowed anywhere in the input message file, except between the component identifier and the first message. Comment lines must begin with a semicolon (;) in the first column. 
- 
-In the Input Message File Example, the comment lines are 
- 
-  ; This is a sample of an input 
-  ; message file for component DOS 
-  ; starting with three comment lines. 
-  Component Identifier Line 
- 
-The component-identifier line contains a three-character name identifier that precedes all MKMSGF message numbers. 
- 
-In the example, the component identifier is DOS. 
-Component-Message Lines 
- 
-Each component-message line consists of a message header and an ASCII text message. 
- 
-The message header is comprised of the following parts: 
- 
-    A three-character component identifier 
-    A four-digit message number 
-    A single character specifying message type (E, H, I, P, W, ?) 
-    A colon (:) 
-    Followed by a blank space. 
- 
-The following message types are used: 
- 
-  Type Meaning 
-  E Error 
-  H Help 
-  I Information 
-  P Prompt 
-  W Warning 
-  ? no message assigned to this number 
- 
-Message numbers can start at any number, but messages must be numbered sequentially. If you do not use a message number, you must insert an empty entry in its place in the text file. An empty entry consists of the message number, with ? as the message type, and no text. 
- 
-The character % has a special meaning when used within the text of a message: 
- 
-%0 is placed at the end of a prompt (type P) to prevent DosGetMessage from executing a carriage return and line feed. This allows the user to be prompted for input on the same line as the message text. 
- 
-Mike Note: The %0 can be used with any message type!!!! So here is how this works: The message file is scanned, and each is saved. However, if you place a %0 as the last character the <LF> <CR> is dropped and it does not matter the type of message (E, H, I, P, W, or ?). This is how the IBM MKMSGF worked and my clone works the same way. 
- 
-%1 - %9 are used to identify variable string insertion within the text of a message. These variables correspond to the Itable and IvCount parameters in the DosGetMessage call. 
- 
-Component-Message Example 
- 
-For example, DOS0100E: is DOS error message 100. For additional examples, see the Input Message File Example. 
- 
-Output File 
  
 The output file contains the indexed message file that DosGetMessage will use. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. The output file cannot have the same name as the input file. The output file contains the indexed message file that DosGetMessage will use. The output-file name can be any valid OS/2 file name, optionally preceded by a drive letter and a path. The output file cannot have the same name as the input file.
Line 142: Line 111:
  
     The infile file should have a .TXT extension.     The infile file should have a .TXT extension.
-    The outfile file should have a .MSG extension.+    The outfile file can have a .MSG or .INC extension.
  
 Help-message file names begin with the component identifier, followed by H.MSG. For example, the help file associated with the component identifier DOS would be DOSH.MSG. Help-message file names begin with the component identifier, followed by H.MSG. For example, the help file associated with the component identifier DOS would be DOSH.MSG.
  
-Options+===== Options =====
  
 Text-based messages in different code pages can be created using MKMSGF to display errors, help information, prompt, or provide general information to the application user. Text-based messages in different code pages can be created using MKMSGF to display errors, help information, prompt, or provide general information to the application user.
Line 160: Line 129:
  
     Infile is the ASCII-text source file.     Infile is the ASCII-text source file.
 +    Outfile is the binary output message file or MASM include file.
 +    @controlfile is the message definition file.
  
-Example: +===== Options Summary =====
- +
-  MSG +
-  MSG0001I: (mm%4dd%4yy) %2%4%1%4%3 +
-  MSG0002I: (dd%4mm%4yy) %1%4%2%4%3 +
-  MSG0003I: Current date is: %0 +
- +
-%0 is a special argument that displays a prompt for user input. +
-%1 - %9 are the arguments the user can use to insert text in a message. +
- +
-    Outfile is the binary output message file. +
-    @controlfile is the message definition file.+
  
-Options Summary 
   Type Meaning   Type Meaning
   /P Code-page ID for the input message file.   /P Code-page ID for the input message file.
Line 181: Line 140:
   /V Verbose display of message file control variables as the message file is being created.   /V Verbose display of message file control variables as the message file is being created.
   /? Help display of command syntax for MKMSGF.   /? Help display of command syntax for MKMSGF.
 +  /A    Produce MASM include file using INC file as include file for message constants
 +  /C    Produce MASM include file using H file as include file for message constants
 +  /I    Include paths
      
 Note: Any combination of /P, /D, /L, and /V switches can be used for either the command line or @controlfile execution method. Note: Any combination of /P, /D, /L, and /V switches can be used for either the command line or @controlfile execution method.
Line 228: Line 190:
  
 A valid language family with invalid or undefined language version id will cause a default value of 1 to be set for language version. A valid language family with invalid or undefined language version id will cause a default value of 1 to be set for language version.
-/A /C /I Options 
  
-I saw these and documented them as existing years ago, but never really looked at them in depth. I made some notes on a separate page: The A, C, and I Options. 
  
 /E /E
  
-See the The Extended Structure page for more information. This tacks on what I call a fake extended header at the end of the file and updates the header offset. +Produce fake extended header. This tacks on what I call a fake extended header at the end of the file and updates the header offset. 
-Control Files+ 
 +===== Control File =====
  
 The control file (@controlfile) is used to create multiple-code-page message files. The at sign (@) is not part of the file name, but rather, a delimiter required before a control-file name. The control file (@controlfile) is used to create multiple-code-page message files. The at sign (@) is not part of the file name, but rather, a delimiter required before a control-file name.
Line 254: Line 215:
 Input Message File Example Input Message File Example
  
-Following is an example of an input message file: 
- 
-  ; This is a sample of an input 
-  ; message file for component MAB 
-  ; starting with three comment lines. 
-  MAB 
-  MAB0100E: File not found 
-  MAB0101?: 
-  MAB0102H: Usage: del [drive:][path] filename 
-  MAB0103?: 
-  MAB0104I: %1 files copied 
-  MAB0105W: Warning! All data will be destroyed! 
-  MAB0106?: 
-  MAB0107?: 
-  MAB0108P: Do you wish to apply these patches (Y or N)? %0 
-  MAB0109E: Divide overflow 
-   
 ====== Notes ====== ====== Notes ======