home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 19 Printer / 19-Printer.zip / princp10.zip / ULSUTIL.INF (.txt) < prev    next >
OS/2 Help File  |  1995-10-04  |  77KB  |  2,574 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. ULSUTIL - Codepage and Keyboard Utilities ΓòÉΓòÉΓòÉ
  3.  
  4. ULSUTIL - Codepage and Keyboard Utilities
  5.       OS/2 Warp Connect [PowerPC Edition]
  6.  
  7.       Ken Borgendale
  8.       OS/2 Architecture
  9.       Version  1.0 - Beta
  10.  
  11. OS/2 Warp Connect [PowerPC Edition] provides a large variety of codepages and 
  12. keyboards to allow it to be used throughout the world.  This support was added 
  13. in such a way as to easily allow additional codepages and keyboards to be added 
  14. to the system. 
  15.  
  16. The tools provided in this package provide the utilities, sample code, headers, 
  17. libraries, and sample files necessary to create internationalization objects 
  18. for OS/2 for PowerPC. 
  19.  
  20. All of the code in this package runs on OS/2 on the PC.  This code will be 
  21. available running on the PowerPC sometime soon after the availability of OS/2 
  22. for the PowerPC. 
  23.  
  24. The utilities provided in the package are: 
  25.  
  26.   uconvdef         Define a codepage 
  27.   uconvexp         Expand a codepage 
  28.   printcp          PostScript print of codepage 
  29.   makekb           Define a keyboard 
  30.   printkb          PostScript print of keyboard 
  31.  
  32.  These utilities require several files to be in the current directory (or on 
  33.  the PATH). These files are: 
  34.  
  35.   printcp.psh      PostScript header for printcp 
  36.   printkb.dlf      Fonts for printkb and printcp 
  37.   printkb.psh      PostScript header for printkb 
  38.   printkb.sft      Shift name tables 
  39.   scancode.nam     Scancode names for makekb 
  40.   unicode.nam      Unicode names (used by several utilities) 
  41.  
  42.  Several libraries that use the objects are included. There are also several 
  43.  test cases shipped as source examples, along with the header files necessary 
  44.  to compile them. 
  45.  
  46.  uniconv.dll       Unicode conversion (and iconv) library 
  47.  unikbd.dll        Keyboard library 
  48.  uctest.c          Unicode sample and test 
  49.  kbdtest.c         Keyboard sample and test 
  50.  scantest          Simple test file for kbdtest 
  51.  uconv.h           Unicode conversion header 
  52.  iconv.h           iconv function prototypes 
  53.  unikbd.h          Keyboard prototypes 
  54.  ulserrno.h        Error codes for ULS 
  55.  callconv.h        Calling convention 
  56.  makefile          Makefile for test cases 
  57.  
  58.  The following sample files are provided in subdirectories: 
  59.  
  60.  codepage          Codepages in binary form 
  61.  keyboard          Keyboards in source form 
  62.  
  63.  Note:  If you plan to use the Unicode Conversion prototypes, update your 
  64.         CONFIG.SYS file to add the following statement: 
  65.  
  66.       set ulspath=D:\ulsutil\codepage
  67.  where 'D' is the drive on which you installed the ULS Utilities. 
  68.  
  69.  
  70. ΓòÉΓòÉΓòÉ 2. Codepage Overview ΓòÉΓòÉΓòÉ
  71.  
  72. A codepage is an object used to define the encoding of characters. In OS/2 for 
  73. PowerPC, characters are defined based on the unicode, a 16-bit representation 
  74. that includes characters from all countries in the world. A codepage is defined 
  75. as a mapping to and from unicode. 
  76.  
  77. There are other terms used by various people for codepage. These include Coded 
  78. character set, Unicode conversion object, Encoding Vector, and Symbol set. All 
  79. of these are essentially the same. Within IBM, the term Coded Character Set is 
  80. used to include an object made up of one or more codepages. This is used for 
  81. Asian language mixed single/double byte encoding. The single-byte portion is 
  82. actually one codepage, and the double-byte portion another codepage. In OS/2 
  83. these are all simply referred to as codepages. 
  84.  
  85. In OS/2, a codepage is indicated by a numeric value from the IBM registry of 
  86. Codepages or Coded Character Sets.  The Unicode Conversion Object (uconv) used 
  87. to implement this codepage is given as a string "IBM-" followed by the decimal 
  88. number of the codepage without leading zeros.  For example: 
  89.  
  90.    IBM-850
  91.    IBM-37
  92.    IBM-1200
  93.  
  94. The files containing the uconv objects are stored in the "/language/codepage" 
  95. directory on the boot drive.  Such files stored at any other location cannot be 
  96. used as system codepages (they can be used for testing or other purposes).  The 
  97. file names are the same as the object names except that the hyphen (-) 
  98. character is dropped from the name.  This is done because of the file-name 
  99. restrictions of the CD-ROM file system. 
  100.  
  101.  
  102. ΓòÉΓòÉΓòÉ 3. Keyboard Overview ΓòÉΓòÉΓòÉ
  103.  
  104. A keyboard is an object used to define the mapping of key presses on the 
  105. keyboard to characters and virtual functions.  The keyboard maintains a state 
  106. which includes shift states, lock states, and dead keys. 
  107.  
  108. In OS/2 for PowerPC, the keyboard layout definition is independent of codepage 
  109. because the character translations are defined using unicode. However, in most 
  110. cases an appropriate codepage must be selected in order to make a keyboard 
  111. useful. 
  112.  
  113. The keyboard logic maintains a state machine which is maintained external to 
  114. the keyboard translation logic. The input to the keyboard logic is: 
  115.  
  116.  shift          The shift state 
  117.  scancode       The key defined as the PM scancode 
  118.  action         Make, break, or repeat 
  119.  
  120.  The output from the keyboard translation is: 
  121.  
  122.  shift          The updated shift state 
  123.  unichar        The unicode character 
  124.  vdkey          The virtual or dead key 
  125.  biosscan       The BIOS (translated) scancode 
  126.  
  127.  
  128. ΓòÉΓòÉΓòÉ 4. UCONVDEF-Define a codepage ΓòÉΓòÉΓòÉ
  129.  
  130. The uconvdef utility converts a codepage in source format to a codepage in 
  131. binary format (Uconv table object). 
  132.  
  133. Note:  This is version 2 of the uconvdef utility.  Version 2 of the uconvdef 
  134.        utility fully supports the input syntax of version 1, but not all 
  135.        functionality is available without using new entries.  Version 1 syntax 
  136.        is used to allow portability with other operating systems with support 
  137.        uconv objects. 
  138.  
  139.  uconvdef takes two fixed parameters and a set of switches that start with a 
  140.  hyphen (-).  The options can be specified at any point in the command.  File 
  141.  names may use either slash (/) or backslash (\) as a path separator. 
  142.  
  143.       uconvexp  uconvfile  [outfile]  -options
  144.  
  145.  The first parameter is the name of the uconv object file to expand.  This is 
  146.  the path name to the file.  This parameter is required. 
  147.  
  148.  The second parameter gives the name of the output file. If this is not given, 
  149.  it defaults to the input file name with the file extension .UCF. 
  150.  
  151.  There are several option switches: 
  152.  
  153.  -q             Quiet - Do not show informational messages 
  154.  -v             Verbose - Show extra information for debugging 
  155.  -x:file        File name of extra source file 
  156.  
  157.  For compatibility with the version 1 uconvdef command, you can specify a "-f" 
  158.  parameter before the first file name. 
  159.  
  160.  Examples of calling uconvexp are: 
  161.  
  162.      uconvdef ibm-850.ucmap
  163.      uconvdef ibm-850.ucmap ibm850 -v
  164.      uconvdef ibm-942.ucmap -x os2cp.ucm
  165.      uconvdef -f ibm-850 ibm850
  166.  
  167.  
  168. ΓòÉΓòÉΓòÉ 4.1. Uconv Source Syntax ΓòÉΓòÉΓòÉ
  169.  
  170. The source file for uconvdef consists of a series of lines. Blank lines and 
  171. lines starting with a comment are ignored. Other lines contain a keyword and 
  172. operands. Lines are limited to 1024 bytes. 
  173.  
  174. The comment character (#) may be used to indicate the start of the comment on a 
  175. line. All characters after the comment character are ignored. 
  176.  
  177. Most keyboards are contained within a '<' and '>' pair.  The exception to this 
  178. are CHARMAP and END CHARMAP, which start and end a section. 
  179.  
  180. Parameters can be of three types:  strings, numbers, hex strings, and ranges of 
  181. hex strings. 
  182.  
  183. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  184. Γöéstring      ΓöéA set of characters surrounded by doubleΓöé"string"       Γöé
  185. Γöé            Γöéquote characters                        Γöé               Γöé
  186. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  187. Γöénumber      ΓöéAn unsigned decimal number              Γöé1              Γöé
  188. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  189. Γöéhex string  ΓöéA set of values where each byte is givenΓöé\xFC\xe5       Γöé
  190. Γöé            Γöéas backslash x followed by 2 hex digits Γöé               Γöé
  191. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  192. Γöérange       ΓöéA hex string, three dots, and another   Γöé\x45...\xf0    Γöé
  193. Γöé            Γöéhex string                              Γöé               Γöé
  194. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  195.  
  196.  
  197. ΓòÉΓòÉΓòÉ 4.2. CODEPAGE ΓòÉΓòÉΓòÉ
  198.  
  199. The codepage entry gives the name of the codepage. 
  200.  
  201. The codepage entry takes a single parameter, which can be either a string or 
  202. numeric value.  The string form is limited to 15 characters and the characters 
  203. must be in the ASCII-7 set.  The name should be limited so that with the 
  204. hyphens removed it fits in 8 characters. 
  205.  
  206. If the codepage is given as a number, the name is constructed by using "IBM-" 
  207. followed by the decimal number (without leading zeros). 
  208.  
  209.     <codepage>  "IBM-850"
  210.     <codepage>  850
  211.  
  212. If extended source (-x) is selected, the codepage entry will cause the extended 
  213. source to be searched looking for a matching codepage entry.  The extended 
  214. source is used to allow a version 1 source to be used with the additional 
  215. version 2 information taken from the extended source. 
  216.  
  217. This entry is used within the extended source to start the entries for a 
  218. particular codepage, and therefore must be the first entry within that set. 
  219. All entries until the next codepage entry or end of file are processed. 
  220.  
  221. Note:  This entry was called CHAR_SET_NAME in version 1. This name can still be 
  222.        used.  It is deprecated because the object is actually a codepage or 
  223.        coded character set.  Version 1 accepts only a string for this entry. 
  224.  
  225.  
  226. ΓòÉΓòÉΓòÉ 4.3. ENCODING ΓòÉΓòÉΓòÉ
  227.  
  228. The encoding entry specifies the type of codepage. This is used to set the ESID 
  229. (Encoding Scheme ID) and the Uconv Class.  It is also used to default the 
  230. minimum and maximum code length, and the substitution character and unicode 
  231. substitution character. 
  232.  
  233. There is a single string parameter which is one from the Encoding column below. 
  234. The case of the string does not matter. 
  235.  
  236. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  237. ΓöéEncoding            ΓöéESID    ΓöéClass   ΓöéMin  ΓöéMax  ΓöéSubcharΓöéSubUni Γöé
  238. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  239. Γöésbcs-data           Γöé2100    ΓöéSBCS    Γöé1    Γöé1    Γöé1F     ΓöéFFFD   Γöé
  240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  241. Γöésbcs                Γöé2100    ΓöéSBCS    Γöé1    Γöé1    Γöé1A     ΓöéFFFD   Γöé
  242. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  243. Γöésbcs-pc             Γöé3100    ΓöéSBCS    Γöé1    Γöé1    Γöé1F     ΓöéFFFD   Γöé
  244. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  245. Γöésbcs-ebcdic         Γöé1100    ΓöéSBCS    Γöé1    Γöé1    ΓöéFF     ΓöéFFFD   Γöé
  246. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  247. Γöésbcs-iso            Γöé4100    ΓöéSBCS    Γöé1    Γöé1    Γöé1A     ΓöéFFFD   Γöé
  248. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  249. Γöésbcs-windows        Γöé4105    ΓöéSBCS    Γöé1    Γöé1    Γöé1A     ΓöéFFFD   Γöé
  250. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  251. Γöésbcs-alt            ΓöéF100    ΓöéSBCS    Γöé1    Γöé1    Γöé1A     ΓöéFFFD   Γöé
  252. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  253. Γöédbcs-data           Γöé2200    ΓöéDBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  254. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  255. Γöédbcs                Γöé2200    ΓöéDBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  256. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  257. Γöédbcs-pc             Γöé3200    ΓöéDBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  258. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  259. Γöédbcs-ebcdic         Γöé1200    ΓöéDBCS    Γöé1    Γöé2    ΓöéFEFE   ΓöéFFFD   Γöé
  260. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  261. Γöémbcs-ebcdic         Γöé1301    ΓöéEBCS    Γöé1    Γöé2    ΓöéFEFE   ΓöéFFFD   Γöé
  262. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  263. Γöémbcs-data           Γöé2300    ΓöéMBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  264. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  265. Γöémbcs                Γöé2300    ΓöéMBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  266. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  267. Γöémbcs-pc             Γöé3300    ΓöéMBCS    Γöé1    Γöé2    ΓöéFCFC   ΓöéFFFD   Γöé
  268. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  269. Γöéucs-2               Γöé7200    ΓöéUCS2    Γöé2    Γöé2    ΓöéFFFF   ΓöéFFFF   Γöé
  270. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  271. Γöéugl                 Γöé7200    ΓöéUCS2    Γöé2    Γöé2    Γöé0000   ΓöéFFFD   Γöé
  272. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  273. Γöéutf-8               Γöé7807    ΓöéUTF8    Γöé1    Γöé3    Γöé*      Γöé*      Γöé
  274. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  275. Γöéupf-8               Γöé78FF    ΓöéUPF8    Γöé1    Γöé3    Γöé*      Γöé*      Γöé
  276. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  277.  
  278. Some classes do not honor substitution.  In utf-8, upf-8, and ucs-2 when the 
  279. substitution character is set to 0xffff, the substitution characters are 
  280. ignored. 
  281.  
  282. The Encoding Scheme ID is used to define the way characters are encoded.  This 
  283. allows codepages to be classified.  OS/2 only allows certain classes of 
  284. codepages to be used for various purposes. 
  285.  
  286. The uconv class indicates the type of table and the algorithm used to interpret 
  287. the table. 
  288.  
  289. This entry is allowed within the extended source file. 
  290.  
  291. Note:  The version 1 name of this field is UCONV_CLASS and is still accepted. 
  292.        The legal values were "SBCS", "DBCS", "MBCS", and "EBCDIC_STATEFUL", 
  293.        which must be in upper case.  The later name is the equivalent of 
  294.        "mbcs-ebcdic". 
  295.  
  296.  
  297. ΓòÉΓòÉΓòÉ 4.4. COPYRIGHT ΓòÉΓòÉΓòÉ
  298.  
  299. The copyright entry allows a copyright statement to be placed into the binary 
  300. uconv object file.  The system does not use the copyright notice, but it is 
  301. expanded using uconvexp, and may be required in some countries for legal 
  302. reasons. 
  303.  
  304. There is a single string parameter which is the copyright string. The string is 
  305. limited only on line length restriction.  The copyright will be within the 
  306. first 256 bytes of the object only if it is less than 64 bytes in length. 
  307.  
  308.    <copyright>   "(C) Copyright, My Corporation, 1995"
  309.  
  310. This is a version 2 only entry, and may exist within the extended source.  If 
  311. this entry exists before the first <codepage> entry in the extended source, it 
  312. applies to any codepage. 
  313.  
  314.  
  315. ΓòÉΓòÉΓòÉ 4.5. DESCRIPTION ΓòÉΓòÉΓòÉ
  316.  
  317. The description entry allows a description of the codepage to be placed into 
  318. the binary uconv object file.  The system does not use the description, but it 
  319. is expanded using uconvexp. 
  320.  
  321. There is a single string parameter which is the description. The string is 
  322. limited only on line length restriction. 
  323.  
  324.    <description>   "Multilingual PC"
  325.  
  326. This is a version 2 only entry, and may exist within the extended source. 
  327.  
  328.  
  329. ΓòÉΓòÉΓòÉ 4.6. MB_MAX_LEN ΓòÉΓòÉΓòÉ
  330.  
  331. The mb_max_len entry gives the maximum length for a multibyte character.  This 
  332. entry is normally not required since the code lengths can be determined from 
  333. the encoding type. In the case of a MBCS class, it must be used to give the 
  334. actual maximum code length. 
  335.  
  336. There is a single numeric parameter which must be a value between 1 and 13. 
  337.  
  338.    <mb_max_len>    3
  339.  
  340. Note:  There is also a MB_MIN_LEN entry.  In general, the minimum length is set 
  341.        by the encoding type and cannot be changed. 
  342.  
  343.  
  344. ΓòÉΓòÉΓòÉ 4.7. SUBCHAR ΓòÉΓòÉΓòÉ
  345.  
  346. The subchar entry gives the substitution characters to use when converting from 
  347. unicode into a codepage.  When no equivalent character is found and 
  348. substitution is requested, this string is substituted. 
  349.  
  350. There is a single hex-string parameter.  The value is limited to 13 bytes. 
  351.  
  352.     <subchar>   \x1A
  353.     <subchar>   \x5c5c
  354.  
  355. The substitution characters are defaulted based on the encoding. It is also 
  356. possible the change the substitution at runtime. Some classes do not honor 
  357. substitution and ignore this value. For instance, the algorithm based 
  358. conversions such as UTF-8 do not do substitution. 
  359.  
  360. This is the equivalent of the version 1 entry, and can also be used within the 
  361. extended source. 
  362.  
  363.  
  364. ΓòÉΓòÉΓòÉ 4.8. SUBCHARUNI ΓòÉΓòÉΓòÉ
  365.  
  366. The subcharuni entry gives the substitution characters to use when converting 
  367. to unicode from a codepage.  When no equivalent character is found and 
  368. substitution is requested, this string is substituted. 
  369.  
  370. There is a single hex-string parameter.  The value must be either one or two 
  371. bytes (one unicode character). 
  372.  
  373.     <subcharuni>   \xff\xfd
  374.     <subcharuni>   \x00
  375.  
  376. The substitution character is defaulted based on the encoding. It is also 
  377. possible the change the substitution at runtime. Some classes do not honor 
  378. substitution and ignore this value. For instance, the algorithm based 
  379. conversions such as UTF-8 do not do substitution. 
  380.  
  381. In version 1, this value had a fixed value of 0xfffd and there was no 
  382. equivalent entry. This entry can be used within the extended source. 
  383.  
  384.  
  385. ΓòÉΓòÉΓòÉ 4.9. ORDERED ΓòÉΓòÉΓòÉ
  386.  
  387. The ordered entry specifies the action to take when there are multiple codepage 
  388. characters assigned to the same unicode character. 
  389.  
  390. There is a single numeric parameter: 
  391.  
  392.   0        (default) Select the character with the lowest unicode value, but 
  393.            not if the unicode value is a control. 
  394.  
  395.   1        (version 1 default) Select the character which comes last in the 
  396.            source. 
  397.  
  398.   2        Select the character which comes first in the source. 
  399.  
  400.      <ordered>   1
  401.  
  402.  This function is required to deal with automatically expanded uconv source 
  403.  files where it is difficult to order the output correctly. 
  404.  
  405.  In version 1, the default is to use the last character in the source.  This 
  406.  entry may be used within the extended source file. 
  407.  
  408.  
  409. ΓòÉΓòÉΓòÉ 4.10. DBCS_STARTER ΓòÉΓòÉΓòÉ
  410.  
  411. The dbcs_starter entry specifies a range of bytes to be used as DBCS starter 
  412. characters.  This is used to retain compatibility with previous OS/2 
  413. implementations where the range of DBCS starters was specified even though 
  414. there were no characters defined at that position. 
  415.  
  416. The parameter consists of a hex string or a range.  The hex string must be a 
  417. single byte. 
  418.  
  419. The starting byte vector is normally computed by uconvdef. There is a entry in 
  420. this vector for each of the 256 possible starter bytes. This has one of the 
  421. following values: 
  422.  
  423.   1        Valid single byte character 
  424.   2        Starter for a double byte character 
  425.   3        Starter for a triple byte character 
  426.   255      Unused codepoint 
  427.  
  428.  The dbcs_starter entry forces the entries within the vector to the value '2' 
  429.  for all bytes within the specified range. Multiple dbcs_starter entries may be 
  430.  given. 
  431.  
  432.      <dbcs_starter>   \x8a...\xaf
  433.      <dbcs_starter>   \xe0...\xfc
  434.  
  435.  
  436. ΓòÉΓòÉΓòÉ 4.11. USER_DEFINED ΓòÉΓòÉΓòÉ
  437.  
  438. The user_defined entry specifies a range of characters in the codepage which 
  439. are user defined.  Up to 32 user-defined ranges can be specified. 
  440.  
  441. There is a parameter which can be a simple hex string or a range. The range is 
  442. recorded in the uconv object and is available for query, but is not otherwise 
  443. used. 
  444.  
  445.    <user_defined>   \xf0\x40...\xf9\xff
  446.  
  447.  
  448. ΓòÉΓòÉΓòÉ 4.12. CHARMAP ΓòÉΓòÉΓòÉ
  449.  
  450. The charmap entry gives a section containing the definition of characters 
  451. within the codepage.  It has no parameters. 
  452.  
  453. The algorithmic only uconv classes (UTF-8 and UPF-8) do not require a CHARMAP 
  454. section.  It will be ignored if present since it one is created by the uconvexp 
  455. utility for these classes. 
  456.  
  457. The CHARMAP section is ended with an end charmap entry. It has no parameters. 
  458.  
  459. Within the charmap section there are a series of entries which define the 
  460. character encoding.  These are: 
  461.  
  462.  <Uxxxx>             Specifies a single unicode character where xxxx are valid 
  463.                      hex digits. The parameter is a hex string which indicates 
  464.                      the character to map. This is the normal form. 
  465.  
  466.  <Uxxxx>...<Uxxxx>   Specifies a range of unicode characters where xxxx are 
  467.                      valid hex digits. The parameter is a hex string which 
  468.                      indicates the characters to map. The low order portion of 
  469.                      the character is incremented for each unicode character. 
  470.                      Since most uconv source files are generated by programs, 
  471.                      this form is rarely used. 
  472.  
  473.  <unassigned>        Specifies a range of codepage characters which have no 
  474.                      unicode equivalent. This is the same as not specifying 
  475.                      those characters and is thus rarely used. 
  476.  
  477.  Note:  In version 1, CHARMAP can be in upper or lower case, but cannot be in 
  478.         mixed case.  Otherwise, this entry is unchanged. The charmap section 
  479.         cannot be within the extended source. In version 1, the unicode string 
  480.         <Uxxxx> must have the 'U' in upper case. In version 2, the case is not 
  481.         significant. 
  482.  
  483.  
  484. ΓòÉΓòÉΓòÉ 5. UCONVEXP - Expand a codepage ΓòÉΓòÉΓòÉ
  485.  
  486. The uconvexp utility expands a binary uconv object into a source format.  The 
  487. resulting file can be edited and used to recreate the binary format. 
  488.  
  489. uconvexp takes two fixed parameters, and a set of switches which start with a 
  490. hyphen (-).  The options can be specified at any point in the command.  File 
  491. names may use either slash (/) or backslash (\) as a path separator. 
  492.  
  493.     uconvexp  uconvfile  [outfile]  -options
  494.  
  495. The first parameter is the name of the uconv object file to expand.  This is 
  496. the path name to the file.  This parameter is required. 
  497.  
  498. The second parameter gives the name of the output file. If this is not given, 
  499. it defaults to the input file name with the file extension .UCX. 
  500.  
  501. There are several option switches: 
  502.  
  503.   -q       Quiet - Do not show informational messages 
  504.   -s       Standard - Create a version 1 compliant file 
  505.   -u       Upper - Upper case hex strings and keywords 
  506.  
  507.  Examples of calling uconvexp are: 
  508.  
  509.      uconvexp ibm850
  510.      uconvexp /language/codepage/ibm850 ibm850.ucx -u
  511.      uconvexp \codepage\ibm850 -s
  512.  
  513.  
  514. ΓòÉΓòÉΓòÉ 6. PRINTCP - Print a codepage ΓòÉΓòÉΓòÉ
  515.  
  516. The printcp utility provides a means of printing a codepage using PostScript. 
  517. This only works for single byte codepages and the single byte part of double 
  518. byte codepages. The output file can be sent directly to a printer, or an 
  519. encapsulated PostScript file can be created. 
  520.  
  521. printcp takes two fixed parameters, and a set of switches which start with a 
  522. hyphen (-).  The options can be specified at any point in the command.  File 
  523. names may use either slash (/) or backslash (\) as a path separator. 
  524.  
  525.     printcp  codepage  [outfile]  -options
  526.  
  527. The first parameter is the input codepage, and can be a uconv object, an AFP 
  528. codepage, or an IBM source format codepage. This is the pathname to the input 
  529. file. 
  530.  
  531. The second parameter is the output file.  If not specified, this defaults to 
  532. "lpt1". 
  533.  
  534. There are a large number of options which are used to customize the desired 
  535. printout: 
  536.  
  537.   -b            Draw box to show the bounding box.  This is useful to 
  538.                 understand how the output will appear as an encapsulated 
  539.                 PostScript object. 
  540.  
  541.   -c:####       Codepage number.  This can be used to override the codepage 
  542.                 number specified within the object. 
  543.  
  544.   -i            IBM character names.  Annotate each character with the name of 
  545.                 the character using IBM CGIDs.  This is an 8 character name. 
  546.  
  547.   -l            Show baseline.  Draw a small line to indicate the position of 
  548.                 the baseline.  This is helpful in identifying some characters 
  549.                 which differ from each other only by position. 
  550.  
  551.   -m            Publication format.  This form produces the codepage table with 
  552.                 no header information.  This is designed to make encapsulated 
  553.                 PostScript files which can be embedded in another document 
  554.                 which has all header information. 
  555.  
  556.   -n            Codepoint number.  Annotate each character with the decimal 
  557.                 number of the codepoint. 
  558.  
  559.   -q            Do not show informational messages.  This is normally used from 
  560.                 within a command file which does its own messages. 
  561.  
  562.   -r            Reverse direction.  By default characters are presented left to 
  563.                 right. Many people like codepages printed with characters 
  564.                 moving top to bottom which is done if this option is selected. 
  565.  
  566.   -s:##         Scale factor (25 - 200).  The default scale factor fills a 
  567.                 letter or A4 size page with minimal margins.  To allow for full 
  568.                 margins a scale factor of about 94 should be used. 
  569.  
  570.   -u            Unicode annotation.  Annotate each character with the hex 
  571.                 unicode number of the characters. 
  572.  
  573.   -x:####       DBCS range (4 hex digits -x:819E).  This can be used to 
  574.                 override the DBCS starter range in the input (or when the input 
  575.                 does not contain this information). 
  576.  
  577.   -z:####       Partial grid (4 hex digits -z:40FF). This option is used when 
  578.                 the full 16x16 grid is not desired. 
  579.  
  580.  The following are examples of calls to printcp: 
  581.  
  582.      printcp ibm850 ibm850.eps -u -m
  583.      printcp /language/codepage/ibm850 -i -l
  584.  
  585.  The files unicode.nam, printkb.dlf, and printcp.psh must be in the current 
  586.  directory or in the PATH in order to run printcp. 
  587.  
  588.  
  589. ΓòÉΓòÉΓòÉ 7. MAKEKB - Define a keyboard ΓòÉΓòÉΓòÉ
  590.  
  591. The makekb utility creates a keyboard layout file (.kbl) from a keyboard 
  592. definition file (.kbd).  The keyboard layout file is the binary file used by 
  593. the system to define a keyboard layout. 
  594.  
  595. makekb takes two fixed parameters, and a set of switches which start with a 
  596. hyphen (-).  The options can be specified at any point in the command.  File 
  597. names may use either slash (/) or backslash (\) as a path separator. 
  598.  
  599.    makekb  kbdfile  [kblfile]  -options
  600.  
  601. The first parameter is the name of the input keyboard definition file. If a 
  602. name without extension is given, the file type ".kbd" is added. This can give 
  603. the path to the file. 
  604.  
  605. The second parameter is optional and specifies the name of the output keyboard 
  606. layout file.  If this is not specified, the layout file name is constructed 
  607. from the input name by using ".kbl" as the file extension. 
  608.  
  609. There is a single option which must begin with a hyphen (-) and may be anywhere 
  610. in the command line. 
  611.  
  612.   -q       Do not show informational messages.  This is normally used in 
  613.            command files where the command file takes care of any messages. 
  614.  
  615.  Any error messages are sent to stderr. A non-zero return code is given for 
  616.  significant errors. 
  617.  
  618.  The files unicode.nam, and scancode.nam must be in the current directory or in 
  619.  the PATH in order to run makecp. 
  620.  
  621.  
  622. ΓòÉΓòÉΓòÉ 7.1. Keyboard Definition File (.kbd) Format ΓòÉΓòÉΓòÉ
  623.  
  624. The keyboard definition file (.kbd) consists of a number of lines. Each line 
  625. has an entry name and some options.  Blank lines, and lines beginning with 
  626. asterisk (*), semicolon(;), or number(#) are comments. You can place a comment 
  627. on any entry after all options, or using a semicolon (;) after any required 
  628. options.  Each line is limited to 1024 bytes. 
  629.  
  630. The entry name must be the first thing on each line.  It does not need to start 
  631. at the beginning of the line.  It can be specified in either upper or lower 
  632. case.  Some entries are valid only within a scope, and are normally indented in 
  633. the source. 
  634.  
  635. Options for each keyboard are space or tab separated.  Each entry defines its 
  636. own syntax. 
  637.  
  638. Most entries take a semicolon as a comment character after the end of the 
  639. required parameters.  A few entries which take character strings do not allow 
  640. comments. 
  641.  
  642. Character names can be specified in IBM or Adobe format, or as hex values. The 
  643. names are taken from the file unicode.nam. There are also defined names for 
  644. virtual and deadkeys. For a list of deadkeys see the DEADKEY entry. 
  645.  
  646. The following can be used as the names of virtual keys.  These map in value to 
  647. the virtual keys used by OS/2 Presentation Manager. Virtual keys are not 
  648. normally set except in the default keyboard, since the virtual function keys 
  649. normally do not move. (See the file defkbd.kbd for the default keyboard 
  650. assignments.) 
  651.  
  652.        VK_BREAK 
  653.        VK_BACKSPACE 
  654.        VK_TAB 
  655.        VK_BACKTAB 
  656.        VK_NEWLINE 
  657.        VK_SHIFT 
  658.        VK_CTRL 
  659.        VK_ALT 
  660.        VK_ALTGRAF 
  661.        VK_PAUSE 
  662.        VK_CAPSLOCK 
  663.        VK_ESC 
  664.        VK_SPACE 
  665.        VK_PAGEUP 
  666.        VK_PAGEDOWN 
  667.        VK_END 
  668.        VK_HOME 
  669.        VK_LEFT 
  670.        VK_UP 
  671.        VK_RIGHT 
  672.        VK_DOWN 
  673.        VK_PRINTSCRN 
  674.        VK_INSERT 
  675.        VK_DELETE 
  676.        VK_SCRLLOCK 
  677.        VK_NUMLOCK 
  678.        VK_ENTER 
  679.        VK_SYSRQ 
  680.        VK_F1 
  681.        VK_F2 
  682.        VK_F3 
  683.        VK_F4 
  684.        VK_F5 
  685.        VK_F6 
  686.        VK_F7 
  687.        VK_F8 
  688.        VK_F9 
  689.        VK_F10 
  690.        VK_F11 
  691.        VK_F12 
  692.        VK_F13 
  693.        VK_F14 
  694.        VK_F15 
  695.        VK_F16 
  696.        VK_F17 
  697.        VK_F18 
  698.        VK_F19 
  699.        VK_F20 
  700.        VK_F21 
  701.        VK_F22 
  702.        VK_F23 
  703.        VK_F24 
  704.        VK_CLEAR 
  705.        VK_EREOF 
  706.        VK_PA1 
  707.        VK_PA2 
  708.        VK_PA3 
  709.        VK_GROUP 
  710.        VK_GROUPLOCK 
  711.        VK_APPL 
  712.        VK_WINLEFT 
  713.        VK_WINRIGHT 
  714.  
  715.  
  716. ΓòÉΓòÉΓòÉ 7.2. Shift State Definition ΓòÉΓòÉΓòÉ
  717.  
  718. The following bits are defined in the shift state. All other bits are reserved 
  719. for future use and you should not assume they are zero. 
  720.  
  721.     KBD_SHIFT            0x00000001
  722.     KBD_CONTROL          0x00000002
  723.     KBD_ALT              0x00000004
  724.     KBD_ALTCTRLSHIFT     0x00000007
  725.     KBD_ALTGR            0x00000008
  726.     KBD_NLS1             0x00000010
  727.     KBD_NLS2             0x00000020
  728.     KBD_NLS3             0x00000040
  729.     KBD_NLS4             0x00000080
  730.     KBD_SCROLLLOCK       0x00000100
  731.     KBD_NUMLOCK          0x00000200
  732.     KBD_CAPSLOCK         0x00000400
  733.     KBD_EXTRALOCK        0x00000800
  734.     KBD_APPL             0x00001000
  735.     KBD_LEFTSHIFT        0x00010000
  736.     KBD_RIGHTSHIFT       0x00020000
  737.     KBD_LEFTCONTROL      0x00040000
  738.     KBD_RIGHTCONTROL     0x00080000
  739.     KBD_LEFTALT          0x00100000
  740.     KBD_RIGHTALT         0x00200000
  741.     KBD_LEFTWINDOWS      0x00400000
  742.     KBD_RIGHTWINDOWS     0x00800000
  743.  
  744.  
  745. ΓòÉΓòÉΓòÉ 7.3. Sample Keyboard Definition ΓòÉΓòÉΓòÉ
  746.  
  747. This is an example keyboard definition for national French. This represents a 
  748. somewhat complex single layer keyboard. 
  749.  
  750. *
  751. * Name: fr.kbd
  752. *
  753. * Function:
  754. *     Keyboard layout for National French - azerty
  755. *
  756. * Copyright:
  757. *     Copyright (C) IBM Corp., 1995
  758. *
  759.  
  760. keyboard France
  761. country  189 France French
  762. version  1.0
  763. include  common.kbd
  764. include  qwerty.kbd             ; modified to azerty
  765. option   102
  766.  
  767. *
  768. * Standard definition for the alt graphics shift state
  769. *
  770. state    3       12
  771. layer    altgr   8       0
  772. option   altgr
  773. shift
  774.     hold altright  altgr
  775. endshift
  776.  
  777. *
  778. * Define scancode ranges for capslock.  This is a very complete
  779. * definition (all the white keys except those on the pad).
  780. *
  781. lock  capslock capslock shift
  782.     list  grave one two three four five six seven eight nine zero
  783.     list      hyphen equal
  784.     list  q w e r t y u i o p bracketleft bracketright
  785.     list  a s d f g h j k l semicolon quotesingle backslash
  786.     list  extra z x c v b n m comma period slash  ; next to z
  787. endlock
  788.  
  789. *
  790. * A bunch of keys are moved to crate the azerty keyboard.  These will
  791. * have to be defined again below.
  792. *
  793. option    national
  794. redefine  q
  795. redefine  w
  796. redefine  a
  797. redefine  z
  798. redefine  m
  799.  
  800. *
  801. * Define key translate tables
  802. *
  803. keys  normal
  804.     scan  padperiod     xxxx           comma
  805.     scan  one           ampersand      one
  806.     scan  two           eacute         two
  807.     scan  three         quotedbl       three
  808.     scan  four          quotesingle    four
  809.     scan  five          parenleft      five
  810.     scan  six           hyphen         six
  811.     scan  seven         egrave         seven
  812.     scan  eight         underscore     eight        ctrl1f
  813.     scan  nine          ccedilla       nine
  814.     scan  zero          agrave         zero
  815.     scan  hyphen        parenright     degree
  816.     scan  equal         equal          plus
  817.     scan  bracketleft   DK_CIRCUMFLEX  DK_DIERESIS
  818.     scan  bracketleft   circumflex     dieresis
  819.     scan  bracketright  dollar         sterling
  820.     scan  semicolon     m              M            ctrlm
  821.     scan  quotesingle   ugrave         percent
  822.     scan  grave         twosuperior    threesuperior
  823.     scan  backslash     asterisk       mu
  824.     scan  q             a              A            ctrla
  825.     scan  w             z              Z            ctrlz
  826.     scan  a             q              Q            ctrlq
  827.     scan  z             w              W            ctrlw
  828.     scan  m             comma          question
  829.     scan  comma         semicolon      period
  830.     scan  period        colon          slash
  831.     scan  slash         exclam         section
  832.     scan  padasterisk   asterisk       asterisk
  833.     scan  extra         less           greater
  834. endkeys
  835.  
  836. *
  837. *  Define alternate graphics keys (with right alt pressed)
  838. *
  839. keys  altgr
  840.     scan  two           DK_TILDE
  841.     scan  two           tilde
  842.     scan  three         numbersign
  843.     scan  four          braceleft
  844.     scan  five          bracketleft
  845.     scan  six           bar
  846.     scan  seven         DK_GRAVE
  847.     scan  seven         grave
  848.     scan  eight         backslash
  849.     scan  nine          asciicircum
  850.     scan  zero          at
  851.     scan  hyphen        bracketright
  852.     scan  equal         braceright
  853.     scan  bracketright  currency
  854.     xscan comma         less           ; 101 keyboard
  855.     xscan period        greater        ; 101 keyboard
  856. endkeys
  857.  
  858. define altgrctrl 000a
  859. keys   altgrctrl
  860.     scan  five          ctrl1b
  861.     scan  eight         ctrl1c
  862.     scan  nine          ctrl1e
  863.     scan  hyphen        ctrl1d
  864. endkeys
  865.  
  866. *
  867. * BIOS scan code changes due to letter key remap
  868. *
  869. biosscan  q         a  alt
  870. biosscan  w         z  alt
  871. biosscan  a         q  alt
  872. biosscan  z         w  alt
  873. biosscan  semicolon m  alt
  874.  
  875. end
  876.  
  877.  
  878. ΓòÉΓòÉΓòÉ 7.4. KEYBOARD ΓòÉΓòÉΓòÉ
  879.  
  880. The keyboard entry must be the first entry in the file. There is a single 
  881. option which gives a description of the keyboard. This is a maximum of 32 
  882. characters and may contain spaces. 
  883.  
  884. Note:  No comment is allowed on this line. 
  885.  
  886.     keyboard United States
  887.     keyboard My own special keyboard
  888.  
  889.  
  890. ΓòÉΓòÉΓòÉ 7.5. COUNTRY ΓòÉΓòÉΓòÉ
  891.  
  892. The country entry specifies information about the country and language of this 
  893. keyboard.  This information is not used directly in processing keys, but may be 
  894. queried.  There are three options. 
  895.  
  896.   Architecture 
  897.       This is a decimal number from 1 to 4095 optionally followed by a letter 
  898.       'a' to 'o'.  The number should be the IBM defined keyboard id.  The 
  899.       letter shows variations of this standard. 
  900.  
  901.   Country 
  902.       This is the name (in English) of the country of the keyboard. It may also 
  903.       be the two character ISO abbreviation for the country. makekb knows a 
  904.       large number of country names, but if the name is unknown, the two 
  905.       character abbreviation may always be used. 
  906.  
  907.   Language 
  908.       This is the name (in English) of the language of the keyboard. It may 
  909.       also be the two character ISO abbreviation for the language. makekb knows 
  910.       a large number of language names, but if the name is unknown, the two 
  911.       character abbreviation may always be used. 
  912.  
  913.        country  150d Switzerland German
  914.        country  454  EE et     ; Estonia
  915.  
  916.  
  917. ΓòÉΓòÉΓòÉ 7.6. VERSION ΓòÉΓòÉΓòÉ
  918.  
  919. The version entry specifies the version number of the keyboard layout.  It is 
  920. specified as a two part number - major and minor versions.  This is not 
  921. directly used by the system. 
  922.  
  923.     version 1.0
  924.  
  925.  
  926. ΓòÉΓòÉΓòÉ 7.7. INCLUDE ΓòÉΓòÉΓòÉ
  927.  
  928. The include  entry allows common definitions to be kept in another file. 
  929. Include can be anywhere in the file.  Up to 8 levels of recursion are allowed. 
  930. Include takes as a single option the name of the file to include. 
  931.  
  932. Several include files are shipped with the system: 
  933.  
  934.   common.kbd       Common gray key definitions 
  935.   qwerty.kbd       Basic letter key layout 
  936.   dvorak.kbd       Dvorak letter key layout 
  937.   romanji.kbd      Japanese romanji definitions 
  938.  
  939.       include  common.kbd
  940.  
  941.  
  942. ΓòÉΓòÉΓòÉ 7.8. DEFINE ΓòÉΓòÉΓòÉ
  943.  
  944. The define  entry is used to define a user name for a hex value.  There are two 
  945. options, the name and a value.  The value must be a valid hex value.  The 
  946. defined name can be used as a scancode, a character name, or an option name. 
  947.  
  948.     define  altshift  0005
  949.  
  950.  
  951. ΓòÉΓòÉΓòÉ 7.9. OPTION ΓòÉΓòÉΓòÉ
  952.  
  953. The option entry allows setting of various option flags.  These are used by the 
  954. Uni functions and are available on UniQueryKeyboard. 
  955.  
  956. The following options can be set: 
  957.  
  958.   noctrlshift          Ctrl+Shift is always equal to Ctrl  (default) 
  959.   ctrlshift            Ctrl and Shift can be separate 
  960.   defaultvkey          Use the system VKEY table (default) 
  961.   nodefaultvkey        No not use the system VKEY table 
  962.   noaltgr              Alt graphics is not used (default) 
  963.   altgr                Alt graphics is used 
  964.   shiftaltgr           Alt graphics shift is used 
  965.   noshiftaltgr         Shift is ignored with altgr (default) 
  966.   altshift             Alt+shift lone key is used 
  967.   noaltshift           Alt+shift lone key is not used (default) 
  968.   qwerty               Normal letter key layout (default) 
  969.   dvorak               Dvorak letter key layout 
  970.   national             Special national letter key layout 
  971.   international        Expanded character set 
  972.   local                No expanded character set (default) 
  973.   100                  Default physical layout is 100 Key 
  974.   101                  Default physical layout is American (default) 
  975.   102                  Default physical layout is European 
  976.   106                  Default physical layout is Japanese 
  977.  
  978.  The defaults are for the US keyboard, which is a slight problem since the US 
  979.  keyboard is the simplest of the keyboards. 
  980.  
  981.       option  102 altgr
  982.  
  983.  
  984. ΓòÉΓòÉΓòÉ 7.10. REDEFINE ΓòÉΓòÉΓòÉ
  985.  
  986. The redefine entry allows a scancode to be totally redefined. This removes all 
  987. instances of the specified scancode from all tables. This is normally used 
  988. after an include to replace the default action for a key. 
  989.  
  990.     redefine x
  991.  
  992.  
  993. ΓòÉΓòÉΓòÉ 7.11. STATE ΓòÉΓòÉΓòÉ
  994.  
  995. State specifies how to interpret the shift state bits and how many shift states 
  996. are used.  There are two operands.  The first gives the modifier mask.  This is 
  997. normally 3 or 7. Three indicates the use of shift+ctrl, seven is 
  998. shift+ctrl+alt.  The second option gives the total number of shift states as a 
  999. decimal number, including those specified as layers.  The value is normally 8, 
  1000. 12, or 16.  Eight indicates no alt graphics.  Twelve indicates alt graphics, 
  1001. and 16 indicates alt graphics and national language layer. 
  1002.  
  1003.     state 3 8
  1004.  
  1005.  
  1006. ΓòÉΓòÉΓòÉ 7.12. LAYER ΓòÉΓòÉΓòÉ
  1007.  
  1008. The layer entry further specifies how to interpret the shift state bits.  There 
  1009. can be multiple layer entries, and they are ordered. The layer entry has three 
  1010. options.  The first specifies a shift state mask for which this layer is 
  1011. active.  The second gives a decimal value to add to the state.  An optional 
  1012. third parameter gives a mask of flags to be processed by additional layer 
  1013. entries (this defaults to zero which indicates that additional layer entries 
  1014. are not processed). 
  1015.  
  1016.     layer  altgr  8
  1017.  
  1018.  
  1019. ΓòÉΓòÉΓòÉ 7.13. SHIFT ΓòÉΓòÉΓòÉ
  1020.  
  1021. The shift entry starts a table of shift table entries. There are no options. 
  1022. Within a shift table, you can have hold, toggle, and set entries.  Each of 
  1023. these has the following options: The mask and compare can be used to only 
  1024. process a shift key in a particular shift state, or to implement multi-way 
  1025. toggles. 
  1026.  
  1027.  
  1028. ΓòÉΓòÉΓòÉ 7.14. HOLD ΓòÉΓòÉΓòÉ
  1029.  
  1030. A hold entry specifies a key which modifies the shift state while it is held 
  1031. down. 
  1032.  
  1033.   scancode      The scancode of the shift key (scancode name or hex) 
  1034.  
  1035.   shift         The shift state to set or reset 
  1036.  
  1037.   upper         The upper 16 bits of the shift state 
  1038.  
  1039.   mask          The mask of what bits to compare 
  1040.  
  1041.   compare       The value to compare with 
  1042.  
  1043.       shift
  1044.           hold     shiftleft   shift     shiftleft
  1045.       endshift
  1046.  
  1047.  
  1048. ΓòÉΓòÉΓòÉ 7.15. TOGGLE ΓòÉΓòÉΓòÉ
  1049.  
  1050. A toggle entry specifies a key which modifies the shift state on alternate 
  1051. presses of the key.  One press turns on the state, and the next press turns it 
  1052. off.  The action is taken on the down stroke of the key. 
  1053.  
  1054.   scancode      The scancode of the shift key (scancode name or hex) 
  1055.  
  1056.   shift         The shift state to set or reset 
  1057.  
  1058.   upper         The upper 16 bits of the shift state 
  1059.  
  1060.   mask          The mask of what bits to compare 
  1061.  
  1062.   compare       The value to compare with 
  1063.  
  1064.       shift
  1065.           toggle   capslock    capslock
  1066.           toggle   numlock     nls1       0  alt   alt  ; alt-numlock = nls1
  1067.       endshift
  1068.  
  1069.  
  1070. ΓòÉΓòÉΓòÉ 7.16. SET ΓòÉΓòÉΓòÉ
  1071.  
  1072. A set entry specifies a key which sets a value into one or more bits in the 
  1073. shift state.  This can be used to implement a multi-way toggle.  The upper 
  1074. option is used as an update mask. 
  1075.  
  1076.   scancode      The scancode of the shift key (scancode name or hex) 
  1077.  
  1078.   shift         The shift state to set or reset 
  1079.  
  1080.   upper         The update mask in a multiway toggle 
  1081.  
  1082.   mask          The mask of what bits to compare 
  1083.  
  1084.   compare       The value to compare with 
  1085.  
  1086.  To create a threeway toggle of the nls1 and nls2 bits with the padminus key: 
  1087.  
  1088.       define nlstoggle  0x0030   ; nls1 | nls2
  1089.       shift
  1090.           set   padminus  nls1  nlstoggle  nlstoggle  0
  1091.           set   padminus  nls2  nlstoggle  nlstoggle  nls1
  1092.           set   padminus  0     nlstoggle  nlstoggle  nls2
  1093.       endshift
  1094.  
  1095.  
  1096. ΓòÉΓòÉΓòÉ 7.17. ENDSHIFT ΓòÉΓòÉΓòÉ
  1097.  
  1098. The endshift entry ends a shift table. There are no options. This moves the 
  1099. state out of shift state and back into keyboard state. 
  1100.  
  1101.     shift
  1102.         hold     shiftleft   shift     shiftleft
  1103.     endshift
  1104.  
  1105.  
  1106. ΓòÉΓòÉΓòÉ 7.18. LOCK ΓòÉΓòÉΓòÉ
  1107.  
  1108. A lock entry specifies the start of a table of lock entries. There are three 
  1109. options.  The first gives a mask of bits to compare.  The second gives the 
  1110. comparison value which must match after the mask.  The third option gives the 
  1111. shift state to be modified when this lock state is active.  This value is XORd 
  1112. with the lower 16 bits of the shift state. 
  1113.  
  1114.     lock capslock shift
  1115.  
  1116.  
  1117. ΓòÉΓòÉΓòÉ 7.19. LIST ΓòÉΓòÉΓòÉ
  1118.  
  1119. The list entry is the only valid entry within a lock table. It specifies a list 
  1120. of scancodes. When the specified state is active, and the scancode is in this 
  1121. list, the effective shift state is modified. 
  1122.  
  1123.     lock capslock shift
  1124.        list q w e r t y u i o p
  1125.     endlock
  1126.  
  1127.  
  1128. ΓòÉΓòÉΓòÉ 7.20. ENDLOCK ΓòÉΓòÉΓòÉ
  1129.  
  1130. The endlock entry ends a lock table. There are no options. This moves the state 
  1131. from lock state back into keyboard state. 
  1132.  
  1133.     lock capslock shift
  1134.        list q w e r t y u i o p
  1135.     endlock
  1136.  
  1137.  
  1138. ΓòÉΓòÉΓòÉ 7.21. KEYS ΓòÉΓòÉΓòÉ
  1139.  
  1140. The keys entry starts a translation table.  The options give a list of states 
  1141. being defined. 
  1142.  
  1143.     keys  altgr
  1144.  
  1145. The state can be specified as one of the constants known to makekb, as a 
  1146. define, or as a hex value. 
  1147.  
  1148.   shift         0x0001 
  1149.   control       0x0002 
  1150.   ctrl          0x0002 
  1151.   alt           0x0004 
  1152.   altgr         0x0008 
  1153.   ctrlshift     0x0003 
  1154.   altshift      0x0005 
  1155.   altgrctrl     0x000A 
  1156.   altgrshift    0x0009 
  1157.   altctrl       0x0006 
  1158.   ctrlalt       0x0006 
  1159.   nls1          0x0010 
  1160.   nls2          0x0020 
  1161.   nls3          0x0040 
  1162.   nls4          0x0080 
  1163.  
  1164.  
  1165. ΓòÉΓòÉΓòÉ 7.22. SCAN ΓòÉΓòÉΓòÉ
  1166.  
  1167. The scan entry specifies a scancode and a set of characters which are mapped 
  1168. from this scancode.  The first one is mapped to the state specified on the keys 
  1169. entry.  The second one is mapped to the state after the one specified on the 
  1170. keys entry.  This is normally used to specify lower and upper case. 
  1171.  
  1172.     keys
  1173.         scan  semicolon  ae AE
  1174.     endkeys
  1175.     keys altgr
  1176.         scan  c  copyright
  1177.         scan  r  registered
  1178.     endkeys
  1179.  
  1180. Any given position can have both a unicode mapping and a deadkey or virtual key 
  1181. mapping (it cannot have both a virtual and deadkey).  In most cases, keys are 
  1182. either virtual keys or characters keys, but in a few cases such as tab, 
  1183. backspace, and enter, a key has both.  When a deadkey is given, it is normal to 
  1184. also give the unicode mapping of the standalone character. 
  1185.  
  1186. When a placeholder is desired to give the second or subsequent entry in the 
  1187. table, the value xxxx may be used to indicate that there is no entry. 
  1188.  
  1189. Scancodes may be given by their name on the US keyboard, or by hex value.  They 
  1190. may appear in any order.  The actual name mappings are contained within the 
  1191. file scancode.nam. 
  1192.  
  1193. These scancodes appear in this order on normal 101 and 102 key keyboards: 
  1194.  
  1195. esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
  1196. grave one two three four five six seven eight nine zero hyphen equal backspace
  1197. tab q w e r t y u i o p bracketleft bracketright backslash
  1198. capslock a s d f g h j k l semicolon quotesingle enter
  1199. shiftleft extra z x c v b n m comma period slash shiftright
  1200. ctrlleft altleft space altright ctrlright
  1201.  
  1202. These scancodes appear on the cursor and numeric keypad sections: 
  1203.  
  1204. print scrolllock break
  1205. insert home pageup numlock padslash padasterisk padminus
  1206. delete end pagedown pad7 pad8 pad9
  1207. pad4 pad4 pad6 padplus
  1208. up pad1 pad2 pad3
  1209. left down right pad0 padperiod padenter
  1210.  
  1211. The following scancodes appear on other keyboards, and should be accounted for. 
  1212. In addition to these, there are scancodes for the 122 key keyboard which are 
  1213. honored. 
  1214.  
  1215.   nls1 (7b)  Key next to altleft on Japanese keyboard 
  1216.   nls2 (79)  Key left of space on Japanese keyboard 
  1217.   nls3 (70)  Key right of space on Japanese keyboard 
  1218.   jextra     Key right of slash on Japanese keyboard 
  1219.   yen        Key right of equal on Japanese keyboard 
  1220.   appl       MS application key 
  1221.   winleft    MS windows key left 
  1222.   winright   MS windows key right 
  1223.  
  1224.  
  1225. ΓòÉΓòÉΓòÉ 7.23. ENDKEYS ΓòÉΓòÉΓòÉ
  1226.  
  1227. The endkeys entry ends a keyboard translation table. There are no options. 
  1228.  
  1229. The only effect of this entry is moving out of keys state into keyboard state. 
  1230.  
  1231.     keys
  1232.         scan  semicolon  ae AE
  1233.     endkeys
  1234.  
  1235.  
  1236. ΓòÉΓòÉΓòÉ 7.24. DEADKEY ΓòÉΓòÉΓòÉ
  1237.  
  1238. The deadkey entry specifies a language specific deadkey mapping. This is 
  1239. usually not necessary, as all common deadkey mappings are in the global deadkey 
  1240. mapping table. 
  1241.  
  1242.     deadkey DK_ACUTE a aacute
  1243.  
  1244. The second and third parameter can be any unicode character. The deadkeys which 
  1245. can be specified are: 
  1246.  
  1247.        DK_ACUTE 
  1248.        DK_GRAVE 
  1249.        DK_DIERESIS 
  1250.        DK_CIRCUMFLEX 
  1251.        DK_TILDE 
  1252.        DK_CEDILLA 
  1253.        DK_MACRON 
  1254.        DK_BREVE 
  1255.        DK_OGONEK 
  1256.        DK_DOT 
  1257.        DK_BAR 
  1258.        DK_RING 
  1259.        DK_CARON 
  1260.        DK_HUNGARUMLAUT 
  1261.        DK_ACUTEDIA 
  1262.        DK_PSILI 
  1263.        DK_DASIA 
  1264.        DK_OVERLINE 
  1265.        DK_UNDERDOT 
  1266.  
  1267.  
  1268. ΓòÉΓòÉΓòÉ 7.25. LED ΓòÉΓòÉΓòÉ
  1269.  
  1270. The ledentry specifies actions which affect the LED indicators on the keyboard. 
  1271. Normally, the LEDs directly match the shift state, and on IBM keyboards the 
  1272. three lock states have LEDs. It is possible to remap the shift state to the LED 
  1273. state using this control.  There are five options, at least four of which are 
  1274. required: 
  1275.  
  1276.   Action     This is a number between 0 and 7, and indicates how to interpret 
  1277.              the other values.  If the 1 bit is set, then do not process any 
  1278.              other LED entries after this one. If the 2 bit is set, use the 
  1279.              upper 16 bits of the shift state for comparison, otherwise use the 
  1280.              lower 16 bits. If the 4 bit is set, modify the upper 16 bits of 
  1281.              the LED state, otherwise modify the lower 16 bits. 
  1282.  
  1283.   Mask       This is a hex value and is ANDed with the specified half of the 
  1284.              shift state before the comparison. 
  1285.  
  1286.   Compare    This is a hex value.  If the masked shift state matches this 
  1287.              value, this entry is used. 
  1288.  
  1289.   Set        This is a hex value, and indicates which bits to set in the 
  1290.              specified half of the LED state. 
  1291.  
  1292.   Reset      This is a hex value, and indicates which bits to reset in the 
  1293.              specified half of the LED state.  These bits are reset before any 
  1294.              bits are set. 
  1295.  
  1296.       led  0 nls1 nls1 scrolllock
  1297.  
  1298.  
  1299. ΓòÉΓòÉΓòÉ 7.26. BIOSSCAN ΓòÉΓòÉΓòÉ
  1300.  
  1301. The biosscan entry specifies an entry is the BIOS scancode translation table. 
  1302. This is done to emulate the legacy DOS and OS/2 keyboard tables, which allow 
  1303. the BIOS scancode to be modified based on the shift states.  This is used to 
  1304. move the ALT letter keys to match the moved locations. 
  1305.  
  1306. There are three values.  The first gives an input scancode. The second gives 
  1307. the output scancode, and the third gives a mask of the shift state bits.  If 
  1308. multiple bits are specified in this mask, all of them must be on for the 
  1309. conversion to be done. 
  1310.  
  1311. If no entry is found which matches the current shift state and matches the 
  1312. specified scancode, the output scancode is based on the built-in table of 
  1313. standard BIOS scancode mappings. 
  1314.  
  1315.    biosscan  q         a  alt
  1316.    biosscan  w         z  alt
  1317.  
  1318.  
  1319. ΓòÉΓòÉΓòÉ 7.27. ROMANJI ΓòÉΓòÉΓòÉ
  1320.  
  1321. The romanji entry specifies the beginning of a romanji definition. The first 
  1322. option is the flags value, and any remaining options define a set of shift 
  1323. states.  RJCHAR entries have a value for each set of shift states.  There must 
  1324. be at least one valid shift state. 
  1325.  
  1326. A column of the romanji table is used if all of the bits in the specified mask 
  1327. are one.  Therefore, shift states with the most one bits should be specified 
  1328. first. 
  1329.  
  1330.     romanji  0  hiragana  widekana   katakana
  1331.  
  1332.  
  1333. ΓòÉΓòÉΓòÉ 7.28. RJCHAR ΓòÉΓòÉΓòÉ
  1334.  
  1335. The rjchar entry describes a romanji character. This consists of the romanji 
  1336. sequence followed by the definition for each shift state. There is one 
  1337. definition for each shift state specified in the romanji entry. 
  1338.  
  1339. Each entry specifies one or more characters separated by a comma.  The normal 
  1340. case of multiple characters is when a voiced or semivoiced vowel follows the 
  1341. character. 
  1342.  
  1343. Example: 
  1344.  
  1345.     rjchar  a     ahiragana        Akana           akana
  1346.     rjchar  ba    bahiragana       Bakana          hakana,vj
  1347.  
  1348.  
  1349. ΓòÉΓòÉΓòÉ 7.29. RJSYN ΓòÉΓòÉΓòÉ
  1350.  
  1351. The rjsyn entry describes a romanji synonym. This is a romanji sequence which 
  1352. generates another sequence of romanji characters.  The resulting characters are 
  1353. then processed based on the rjchar entries. 
  1354.  
  1355. There are two values, the first is the input romanji sequence, and the second 
  1356. is the output romanji sequence. 
  1357.  
  1358. Example: 
  1359.  
  1360.     rjsyn   bya   bixya
  1361.     rjsyn   fa    huxa
  1362.  
  1363.  
  1364. ΓòÉΓòÉΓòÉ 7.30. ENDROMANJI ΓòÉΓòÉΓòÉ
  1365.  
  1366. The endromanji entry ends a romanji table.  It has not options. 
  1367.  
  1368. Example: 
  1369.  
  1370.     endromanji
  1371.  
  1372.  
  1373. ΓòÉΓòÉΓòÉ 7.31. END ΓòÉΓòÉΓòÉ
  1374.  
  1375. The end entry must be the last entry in the file.  Additional entries are not 
  1376. processed.  End has no options. The parsing must be at keyboard state when this 
  1377. entry is found. 
  1378.  
  1379. If there is no end in the input file, it is an error. 
  1380.  
  1381. Example: 
  1382.  
  1383.     end
  1384.  
  1385.  
  1386. ΓòÉΓòÉΓòÉ 8. PRINTKB - Print a keyboard ΓòÉΓòÉΓòÉ
  1387.  
  1388. The printkb utility allows you to print a graphic representation of a keyboard 
  1389. layout using PostScript. 
  1390.  
  1391. makekb takes two fixed parameters, and a set of switches which start with a 
  1392. hyphen (-).  The options can be specified at any point in the command.  File 
  1393. names may use either slash (/) or backslash (\) as a path separator. 
  1394.  
  1395.    makekb  kblfile  [otufile]  -options
  1396.  
  1397. The first parameter is the name of the input keyboard layout file. If a name 
  1398. without extension is given, the file type ".kbl" is added. This can give the 
  1399. path to the file. 
  1400.  
  1401. The second parameter is optional and specifies the name of the output keyboard 
  1402. layout file.  If this is not specified, the output is sent to "lpt1". 
  1403.  
  1404. There are several options which must begin with a hyphen (-) and may be 
  1405. anywhere in the command line. 
  1406.  
  1407.   -b            Draw box around keyboard 
  1408.  
  1409.   -c            Show cursor pad as well as the normal keyboard.  This is not 
  1410.                 the default since this area rarely changes based on layout. 
  1411.  
  1412.   -f            Show function keys 
  1413.  
  1414.   -h            Print hex scancode numbers 
  1415.  
  1416.   -i            Use ISO key icons for function keys 
  1417.  
  1418.   -k            Show keypad and cursor pad as well as the normal keyboard. This 
  1419.                 is not the default since this area rarely changes based on 
  1420.                 layout. 
  1421.  
  1422.   -l:###        Physical layout (84, 85, 89, 101, 102, 106, 122). By default, 
  1423.                 this information is taken from the layout object. 
  1424.  
  1425.   -m            Publication format (no headers). This is used to create an 
  1426.                 Encapsulated PostScript file with a bounding box matching the 
  1427.                 drawn box but without any headers.  This is designed to be used 
  1428.                 when the output is embedded in another document. 
  1429.  
  1430.   -n            Use names for keys.  The file printkb.sft is used to select 
  1431.                 names for a particular keyboard. 
  1432.  
  1433.   -p            Print in portrait mode 
  1434.  
  1435.   -q            Do not show informational messages 
  1436.  
  1437.   -r            Show romanji tables.  This does nothing if there are no romanji 
  1438.                 tables.  This should not be used with the -m option since it 
  1439.                 creates a multipage output. 
  1440.  
  1441.   -v            Print additional information.  This is used while debugging to 
  1442.                 show the version numbers and country information. 
  1443.  
  1444.   -s:##          Scale factor (40 - 120).  The default scale factor (100) is 
  1445.                 designed to use most of a landscape page. 
  1446.  
  1447.   -x            Show caps lock keys.  Place a small square to indicate which 
  1448.                 keys are affected by caps lock.  This is mostly a debug option. 
  1449.  
  1450.   -z            Do not shade gray keys.  Normally gray keys are shaded to make 
  1451.                 the keyboard look more like the actual keyboard.  This can 
  1452.                 cause loss of readability at small sizes. 
  1453.  
  1454.  printkb tries to simulate the normal method of engraving keytops. It is 
  1455.  possible for a key to have more meanings that printkb will use.  printkb will 
  1456.  place up to four labels on a key.  All labels are placed on the surface of the 
  1457.  key.  On real keyboards, the alt or altgr actions are sometimes labeled on the 
  1458.  front of the key. 
  1459.  
  1460.  The resulting output is valid Encapsulated PostScript (it contains structuring 
  1461.  comments including a BoundingBox).  It can thus be used as input to any 
  1462.  program which takes EPS. 
  1463.  
  1464.  Lower left     This is the base character assigned to this key 
  1465.  
  1466.  Upper left     This is the shift character assigned to this key. If this is 
  1467.                 the uppercase of the base character then a large upper left 
  1468.                 character is shown, and the lower case character is not shown. 
  1469.  
  1470.  Lower right    This is the alt graphic character assigned to this key. If the 
  1471.                 shift-altgr character is the uppercase of this character, only 
  1472.                 the uppercase version is shown in this location. 
  1473.  
  1474.  Upper right    This is either the NLS or shift-altgr character. Keyboards 
  1475.                 should not assign both. 
  1476.  
  1477.  It is possible to create a keyboard definition which is too complex for 
  1478.  printkb.  The keyboard used to input Japanese is an example of this where 
  1479.  there are a large number of meanings assigned to each key. To get a usable 
  1480.  printout, you may want to construct two keyboards for printing purposes. 
  1481.  
  1482.  Deadkeys are shown with a small gray blob where the character would be. 
  1483.  
  1484.  The files printkb.dlf, printkb.psh, and printkb.sft  must be in the current 
  1485.  directory or in the PATH in order to run printkb. 
  1486.  
  1487.  
  1488. ΓòÉΓòÉΓòÉ 9. Codepage files ΓòÉΓòÉΓòÉ
  1489.  
  1490. The codepage files are shipped in binary.  These consists of a large set of 
  1491. single-byte codepages from around the world, and the double-byte codepages to 
  1492. support Japan.  Note that the file name does not contain the hyphen. 
  1493.  
  1494. These are the ASCII codepages which can be used as process codepages. 
  1495.  
  1496.   IBM-301    Japan - DBCS base 
  1497.   IBM-437    United States Legacy 
  1498.   IBM-813    Greece - ISO 8859-7 
  1499.   IBM-819    Latin 1 - ISO 8859-1 
  1500.   IBM-850    Multilingual 
  1501.   IBM-851    Greek - Legacy 
  1502.   IBM-852    Latin 2 
  1503.   IBM-855    Cyrillic 
  1504.   IBM-857    Latin 5 
  1505.   IBM-860    Portugal 
  1506.   IBM-861    Iceland 
  1507.   IBM-862    Israel 
  1508.   IBM-863    Canadian (French) 
  1509.   IBM-864    Arabic 
  1510.   IBM-865    Nordic 
  1511.   IBM-866    Russia 
  1512.   IBM-868    Urdu 
  1513.   IBM-869    Greece 
  1514.   IBM-874    Thai 
  1515.   IBM-897    Japan - Legacy 
  1516.   IBM-907    APL 
  1517.   IBM-909    APL2 Extended 
  1518.   IBM-910    APL2 
  1519.   IBM-912    Latin 2 - ISO 8859-2 
  1520.   IBM-913    Latin 3 - ISO 8859-3 
  1521.   IBM-914    Latin 4 - ISO 8859-4 
  1522.   IBM-915    Cyrillic - ISO 8859-5 
  1523.   IBM-916    Israel - ISO 8859-8 
  1524.   IBM-920    Latin 5 - ISO 8859-9 
  1525.   IBM-921    Baltic - ISO 
  1526.   IBM-922    Estonia 
  1527.   IBM-942    Japan SAA (1041+301) 
  1528.   IBM-1004   Windows Extended 
  1529.   IBM-1006   Urdu - ISO 
  1530.   IBM-1008   Arabic Windows 
  1531.   IBM-1041   Japan SAA 
  1532.   IBM-1051   HP Roman 8 
  1533.   IBM-1089   Arabic - ISO 8859-6 
  1534.   IBM-1116   Estonia 
  1535.   IBM-1117   Latvia 
  1536.   IBM-1118   Lithuania 
  1537.   IBM-1119   Lithuanian and Russian 
  1538.   IBM-1124   Ukraine 8-bit 
  1539.   IBM-1250   Latin 2 Windows 
  1540.   IBM-1251   Cyrillic Windows 
  1541.   IBM-1252   Latin 1 Windows 
  1542.   IBM-1253   Greece Windows 
  1543.   IBM-1254   Turkey Windows 
  1544.   IBM-1255   Israel Windows 
  1545.   IBM-1256   Arabic Windows 
  1546.   IBM-1257   Latin 4 Windows 
  1547.   IBM-1275   Apple Latin 1 
  1548.   IBM-1276   Adobe PS Standard Encoding 
  1549.   IBM-1277   Adobe PS ISOLatin1 Encoding 
  1550.  
  1551.  In addition there are a number of non-ASCII which can be used for display or 
  1552.  conversion. 
  1553.  
  1554.   IBM-037    United States - EBCDIC 
  1555.   IBM-259    Symbols WP - EBCDIC 
  1556.   IBM-273    Germany - EBCDIC 
  1557.   IBM-277    Denmark, Norway - EBCDIC 
  1558.   IBM-278    Finland, Sweden - EBCDIC 
  1559.   IBM-280    Italy - EBCDIC 
  1560.   IBM-284    Spain, Latin America - EBCDIC 
  1561.   IBM-285    United Kingdom - EBCDIC 
  1562.   IBM-290    Japan - EBCDIC 
  1563.   IBM-293    APL - EBCDIC 
  1564.   IBM-297    France - EBCDIC 
  1565.   IBM-361    International - Publishing 
  1566.   IBM-363    Symbols - Publishing 
  1567.   IBM-367    G0 - ASCII 
  1568.   IBM-382    Austria, Germany - Publishing 
  1569.   IBM-383    Belgium - Publishing 
  1570.   IBM-385    Canada (French) - Publishing 
  1571.   IBM-386    Denmark, Norway - Publishing 
  1572.   IBM-387    Finland, Sweden - Publishing 
  1573.   IBM-388    France - Publishing 
  1574.   IBM-389    Italy - Publishing 
  1575.   IBM-391    Portugal - Publishing 
  1576.   IBM-392    Spain - Publishing 
  1577.   IBM-393    Latin America - Publishing 
  1578.   IBM-394    United Kingdom - Publishing 
  1579.   IBM-395    United States - Publishing 
  1580.   IBM-424    Israel - EBCDIC 
  1581.   IBM-500    International - EBCDIC 
  1582.   IBM-829    Math Symbols - Publishing 
  1583.   IBM-838    Thai - EBCDIC 
  1584.   IBM-870    Latin 2 - EBCDIC 
  1585.   IBM-871    Iceland - EBCDIC 
  1586.   IBM-875    Greece - EBCDIC 
  1587.   IBM-895    Japan G0 (Latin) - EUC 
  1588.   IBM-896    Japan G2 (Katakana) - EUC 
  1589.   IBM-918    Urdu - EBCDIC 
  1590.   IBM-930    Japan - EBCDIC 
  1591.   IBM-954    Japan - EUC 
  1592.   IBM-1025   Cyrillic - EBCDIC 
  1593.   IBM-1026   Latin 5 (Turkey) - EBCDIC 
  1594.   IBM-1027   Japan (Latin) - EBCDIC 
  1595.   IBM-1028   Hebrew - Publishing 
  1596.   IBM-1038   PostScript Symbol Set 
  1597.   IBM-1046   Arabic - EBCDIC 
  1598.   IBM-1092   PC Symbols 
  1599.   IBM-1097   Farsi - EBCDIC 
  1600.   IBM-1112   Baltic - EBCDIC 
  1601.   IBM-1122   Estonia - EBCDIC 
  1602.  
  1603.  
  1604. ΓòÉΓòÉΓòÉ 10. Keyboard Source Files ΓòÉΓòÉΓòÉ
  1605.  
  1606. The keyboard files consist of a large set keyboards which are shipped with OS/2 
  1607. for PowerPC.  Each file is shipped in source form with the file extension .KBD. 
  1608. The associated keyboards can be created using makekb. 
  1609.  
  1610.   aa         Arabic (238) 
  1611.   aa470      Arabic 101 (470) 
  1612.   ba         Bosnia (234) 
  1613.   be         Belgium French (120) 
  1614.   bg         Bulgaria Cyrillic - US Latin (442) 
  1615.   bg241      Bulgaria Cyrillic (241) 
  1616.   br         Brazil (275) 
  1617.   br274      Brazil 101(274) 
  1618.   ca         Canada (445) 
  1619.   cf         Canada French (058) 
  1620.   cz         Czech (243) 
  1621.   de         Germany (129) 
  1622.   de453      Germany 100 (453) 
  1623.   dk         Denmark (159) 
  1624.   ee         Estonia (454) 
  1625.   el         Greece (319) 
  1626.   el220      Greece (220) 
  1627.   es         Spain (172) 
  1628.   fi         Finland (153) 
  1629.   fr         France (189) 
  1630.   fr120      France (120) 
  1631.   hr         Croatia (234) 
  1632.   hu         Hungary (208) 
  1633.   il         Israel (212) 
  1634.   is         Iceland (197) 
  1635.   is458      Iceland 101 (458) 
  1636.   it         Italy (141) 
  1637.   it142      Italy (142) 
  1638.   jp         Japan (194) 
  1639.   la         Latin America (171) 
  1640.   mk         Macedonia (449) 
  1641.   nl         Netherlands (143) 
  1642.   no         Norway (155) 
  1643.   pk         Pakistan Urdu (125) 
  1644.   pl         Poland (214) 
  1645.   pl457      Polish Programmer's (457) 
  1646.   po         Portugal (159) 
  1647.   ro         Romanian (446) 
  1648.   ru         Russia (441) 
  1649.   ru443      Russia 443 (443) 
  1650.   sd         Switzerland German (150d) 
  1651.   sf         Switzerland French (150f) 
  1652.   sk         Slovakia (245) 
  1653.   sl         Slovenia (234) 
  1654.   sq         Albania (452) 
  1655.   sr         Serbia (450) 
  1656.   sv         Sweden (153) 
  1657.   th         Thailand (191) 
  1658.   th190      Thailand PC (190) 
  1659.   tr         Turkey (179) 
  1660.   tr440      Turkey (440) 
  1661.   uk         UK English (166) 
  1662.   uk168      UK English (168) 
  1663.   us         US English (103) 
  1664.   usdv       US English Dvorak (103d) 
  1665.   yc         Yugoslavia Cyrillic (118) 
  1666.  
  1667.  Also supplied are a small set of example keyboards. 
  1668.  
  1669.   defkbd     Default keyboard.  This is based on the US keyboard but also 
  1670.              contains the virtual key mappings. 
  1671.  
  1672.   usmac      US Macintosh.  This is a US keyboard based on the Apple Macintosh 
  1673.              layout. 
  1674.  
  1675.   usmath     US Math. This is a multi-layer US keyboard which supports extra 
  1676.              math symbols including the Greek alphabet. 
  1677.  
  1678.   usinter    US International.  This is a keyboard based on the US keyboard, 
  1679.              but with alt graphic and dead keys to type all western european 
  1680.              languages. 
  1681.  
  1682.  
  1683. ΓòÉΓòÉΓòÉ 11. OS/2 Unicode Conversion Prototype Library ΓòÉΓòÉΓòÉ
  1684.  
  1685. UNICONV.DLL is an OS/2 PC DLL which contains a set of conversion functions. 
  1686. These are a subset of the conversion functions provided by OS/2 for PowerPC, 
  1687. and include both the Unicode Conversion (uconv) functions and the xpg4 (iconv) 
  1688. functions. 
  1689.  
  1690. The following uconv functions are supported: 
  1691.  
  1692.        UniCreateUconvObject() 
  1693.        UniFreeUconvObject() 
  1694.        UniQueryUconvObject() 
  1695.        UniSetUconvObject() 
  1696.        UniUcsUconvFromUcs() 
  1697.        UniUcsUconvToUcs() 
  1698.  
  1699.  The following iconv functions are supported: 
  1700.  
  1701.        iconv_open() 
  1702.        iconv 
  1703.        iconv_close() 
  1704.  
  1705.  
  1706. ΓòÉΓòÉΓòÉ 11.1. UniCreateUconvObject() ΓòÉΓòÉΓòÉ
  1707.  
  1708. The UniCreateUconvObject opens a unicode conversion object and returns a handle 
  1709. to it. 
  1710.  
  1711.    #include  <uconv.h>
  1712.    int  UniCreateUconvObject(
  1713.              UniChar     * uname,      /* I  - Unicode name of uconv table */
  1714.              UconvObject * uobj        /* O  - Uconv object handle         */
  1715.    );
  1716.  
  1717. The UniCreateUconvObject function returns a handle that describes a conversion 
  1718. between the codepage specified by uname and Unicode (UCS-2). This handle is 
  1719. used for other uconv functions. The conversion object remains valid until 
  1720. closed by UniFreeUconvUconvObject. 
  1721.  
  1722. See Conversion Object Names for a description of the uname.  The name is in 
  1723. unicode, but is restricted to the characters in the ASCII-7 character set. 
  1724.  
  1725. Returns: . 
  1726.  
  1727.   ULS_INVALID             Conversion table not found or invalid 
  1728.   ULS_BADATTR             Unknown or invalid modifier 
  1729.   ULS_NOMEMORY            No memory is available 
  1730.  
  1731.  Examples: 
  1732.  
  1733.       rc = UniCreateUconvObject("ibm-850", &hand);
  1734.       rc = UniCreateUconvObject("ibm-437@map=data", &hand);
  1735.  
  1736.  
  1737. ΓòÉΓòÉΓòÉ 11.2. UniQueryUconvObject() ΓòÉΓòÉΓòÉ
  1738.  
  1739. The UniQueryUconvObject function allow queries about the attributes and 
  1740. characteristics of the specified uconv object. Some of these are static and 
  1741. bound to the conversion table, but others are settable using UniSetUconvObject. 
  1742.  
  1743.  #include  <uconv.h>
  1744.  int  UniQueryUconvObject(
  1745.         UconvObject uobj,         /* I  - Uconv object handle        */
  1746.         uconv_attribute_t * attr, /* O  - Uconv attributes           */
  1747.         size_t   *  size,         /* I/O- Buffer length              */
  1748.         char        first[256],   /* O  - First byte of multibyte    */
  1749.         char        other[256],   /* O  - Other byte of multibyte    */
  1750.         udcrange_t  udcrange[32]  /* O  - User defined char range    */
  1751.  );
  1752.  
  1753. Any of the parameters attr, first, other, or udcrange can be NULL to indicate 
  1754. that this data should not be returned. 
  1755.  
  1756. The following structure defines the uconv object attributes used for 
  1757. UniQueryUconvObject and UniSetUconvObject.  Those fields marked with a Q are 
  1758. only for query.  Those fields marked with a Q/S can be both set and queried. 
  1759.  
  1760.  typedef struct {
  1761.      uint32    version;       /* Q/S Version (must be zero)        */
  1762.      char      mb_min_len;    /* Q   Minimum char size             */
  1763.      char      mb_max_len;    /* Q   Maximum char size             */
  1764.      char      usc_min_len;   /* Q   UCS min size                  */
  1765.      char      usc_max_len;   /* Q   UCS max size                  */
  1766.      uint16    esid;          /* Q   Encoding scheme ID            */
  1767.      char      options;       /* Q/S Substitution options          */
  1768.      char      state;         /* Q/S Current state                 */
  1769.      endian_t  endian;        /* Q/S Source and target endian      */
  1770.      uint32    displaymask;   /* Q/S Display/data mask             */
  1771.      uint32    converttype;   /* Q/S Conversion type               */
  1772.      uint16    subchar_len;   /* Q/S MBCS sub len      0=table     */
  1773.      uint16    subuni_len;    /* Q/S Unicode sub len   0=table     */
  1774.      char      subchar[16];   /* Q/S MBCS sub characters           */
  1775.      UniChar   subuni[8];     /* Q/S Unicode sub characters        */
  1776.  } uconv_attribute_t;
  1777.  
  1778.  typedef struct {
  1779.      uint16  source;          /* Used by FromUcs                   */
  1780.      uint16  target;          /* Used by ToUcs                     */
  1781.  } endian_t;
  1782.  
  1783.   typedef struct {            /* User Defined character range      */
  1784.       uint32  first;          /* First codepoint                   */
  1785.       uint32  last;           /* Last codepoint                    */
  1786.   } udcrange_t;
  1787.  
  1788. The size parameter specifies the size the the attribute buffer.  This must be 
  1789. at least as large as version 0 of the uconv_attribute_t structure.  On output 
  1790. this contains the size of data actually returned in bytes. 
  1791.  
  1792. The first array gives an array of starting bytes for a multibyte character set. 
  1793. For some forms of stateful codepages, the length is based on state and not this 
  1794. table. If this parameter is NULL, no value is returned. Each byte has one of 
  1795. the following values: 
  1796.  
  1797.   1        Valid single byte character 
  1798.   2        Starter for a double byte character 
  1799.   3        Starter for a triple byte character 
  1800.   255      Unused codepoint 
  1801.  
  1802.  The other array gives an array indicating when the byte is used a secondary 
  1803.  byte in a multi-byte sequence.  This is used to allocate buffers.  There are 
  1804.  only two possible values for each byte. 0 indicates that this is not used as a 
  1805.  secondary character, and 1 indicates that it is. 
  1806.  
  1807.  The udcrange array gives a set of ranges of characters which make up the user 
  1808.  defined character range. 
  1809.  
  1810.  Example: 
  1811.  
  1812.       int     rc;
  1813.       uconv_attribute_t attr;
  1814.       size_t  len;
  1815.       char    starter[256];
  1816.  
  1817.       len = sizeof(attr);
  1818.       rc = UniQueryUconvObject(hand, &attr, &len, &starter, NULL, NULL);
  1819.  
  1820.  
  1821. ΓòÉΓòÉΓòÉ 11.3. UniSetUconvObject() ΓòÉΓòÉΓòÉ
  1822.  
  1823. The UniSetUconvObject function allow the attributes of the specified uconv 
  1824. object to be set. These attributes may be queried using UniQueryUconvObject. 
  1825.  
  1826.    #include  <uconv.h>
  1827.    int  UniSetUconvObject(
  1828.              UconvObject * uobj,       /* O  - Uconv object handle         */
  1829.              uconv_attribute_t * attr, /* O  - Uconv attributes            */
  1830.    );
  1831.  
  1832. The following fields within the attribute can be set: 
  1833.  
  1834.  options 
  1835.       Substitution options.  This can have one of the following values: 
  1836.  
  1837.             UCONV_OPTION_SUBSTITUTE_FROM_UNICODE 
  1838.             UCONV_OPTION_SUBSTITUTE_TO_UNICODE 
  1839.             UCONV_OPTION_SUBSTITUTE_BOTH 
  1840.  
  1841.       The value UCONV_OPTION_SUBSTITUTE_SINGLE can be OR'd in with the 
  1842.       preceeding value to force the specified subchar to be used, even when the 
  1843.       table specified a split single/double substitution. 
  1844.  
  1845.  endian 
  1846.       Source and target endian.  This is an structure containing a source and 
  1847.       target endian field.  Source applies to UniUconvFromUcs and target 
  1848.       applies to UniUconvToUcs. Each of the fields can contain one of the 
  1849.       following values: 
  1850.  
  1851.        0x0000        Use system endian 
  1852.        0xfeff        Use big endian 
  1853.        0xfffe        Use little endian 
  1854.  
  1855.  displaymask 
  1856.       Display/data mask.  This is a mask of 32 bits.  Each bit represents a 
  1857.       control character below space (1<<char). If the bit is zero the character 
  1858.       is treated as a display glyph. If the bit is one, the character is 
  1859.       treated as a control. There are several predefined values for this mask, 
  1860.       but any value can be used: 
  1861.  
  1862.        DSPMASK_DATA          All characters less than space are controls. 
  1863.        DSPMASK_DISPLAY       All characters less than space are glyphs. 
  1864.        DSPMASK_CRLF          CR and LF are controls, others are glyphs. 
  1865.  
  1866.  converttype 
  1867.       Conversion type.  This is a set of flags.  The following flags exist and 
  1868.       may be ORed together: 
  1869.  
  1870.        CVTYPTE_CTRL7F        Treat the 0x7f character as a control. 
  1871.        CVTTYPE_CDRA          Use IBM standard control conversion.  If this bit 
  1872.                              is not set, controls are converted to an equal 
  1873.                              value.  Some conversions always do control 
  1874.                              conversions. 
  1875.  
  1876.  subchar_len 
  1877.       Codepage substitution length.  This can be a value between 1 and 13 to 
  1878.       indicate the substitution length.  It may not exceed the maximum size 
  1879.       character in the encoding.  A value of zero indicates that the 
  1880.       substitution character from the conversion table should be used. 
  1881.  
  1882.  subchar 
  1883.       Substitution bytes.  This is the actual value whose length is specified 
  1884.       by subchar_len. 
  1885.  
  1886.  subuni_len 
  1887.       Unicode substitution length.  This can be either 0 or 1.  A zero 
  1888.       indicates that the unicode substitution from the conversion table should 
  1889.       be used. 
  1890.  
  1891.  subuni 
  1892.       If subuni_len is set to 1, the first element in this array gives the 
  1893.       unicode substitution character. 
  1894.  
  1895.  The following example sets the displaymask to all data.  This means that all 
  1896.  codepoints below space are mapped as controls and not as glyphs.  To modify 
  1897.  only some attributes, a query should first be done using UniQueryUconvObject. 
  1898.  
  1899.  Example: 
  1900.  
  1901.       int  rc;
  1902.       uconv_attribute_t attr;
  1903.       size_t  len;
  1904.  
  1905.       len = sizeof(attr);
  1906.       rc = UniQueryUconvObject(hand, &attr, &len, NULL, NULL, NULL);
  1907.       if (!rc) {
  1908.           attr.displaymask = DSPMASK_DATA;
  1909.           rc = UniSetUconvObject(hand, &attr);
  1910.       }
  1911.  
  1912.  
  1913. ΓòÉΓòÉΓòÉ 11.4. UniUconvToUcs() ΓòÉΓòÉΓòÉ
  1914.  
  1915. The UniUconvToUcs function converts a sequence of characters encoding in a 
  1916. specified codepage to Unicode. 
  1917.  
  1918.    #include  <uconv.h>
  1919.    int  UniUconvToUcs(
  1920.              UconvObject uobj,         /* I  - Uconv object handle         */
  1921.              void    * * inbuf,        /* IO - Input buffer                */
  1922.              size_t    * inbytes,      /* IO - Input buffer size (bytes)   */
  1923.              UniChar * * outbuf,       /* IO - Output buffer size          */
  1924.              size_t    * outchars,     /* IO - Output size (chars)         */
  1925.              size_t    * subst         /* O  - Substitution count          */
  1926.    );
  1927.  
  1928.   uobj 
  1929.       A handle to a uconv object created using UniCreateUconvObject. 
  1930.  
  1931.   inbuf 
  1932.       The address of the pointer to the input buffer. This is updated for any 
  1933.       characters consumed by the transform. If this is zero or points to zero, 
  1934.       a reset is done for any stateful transforms. 
  1935.  
  1936.   inbytes 
  1937.       On input this points to the number of bytes to be converted. On output 
  1938.       this is replaced with the number of bytes which were not processed. 
  1939.  
  1940.   outbuf 
  1941.       The address of the pointer to the output buffer. That pointer is updated 
  1942.       for any bytes output by this function. 
  1943.  
  1944.   outchars 
  1945.       On input this points to the number of characters in the output buffer. On 
  1946.       output this is replaced with the number of characters left in the buffer. 
  1947.  
  1948.   subst 
  1949.       The value at the specified address is set to the number of non-identical 
  1950.       conversions done. 
  1951.  
  1952.  If a sequence of input bytes does not form a valid character conversion stops 
  1953.  at the previous successfully converted character. If the input buffer ends 
  1954.  with an incomplete character, conversion stops after the previous successfully 
  1955.  converted character. 
  1956.  
  1957.  If the output buffer is not large enough to hold the entire converted input, 
  1958.  conversion stops just prior to the input bytes that would have caused the 
  1959.  buffer to overflow. 
  1960.  
  1961.  If a character is found in the input buffer which is legal, but for which an 
  1962.  identical character does not exist in the target codepage, either a 
  1963.  substitution or error is returned based on the substitution setting. 
  1964.  
  1965.  Returns: 
  1966.  
  1967.   ULS_BADHANDLE           Invalid handle 
  1968.   ULS_INVALID             Character truncated 
  1969.   ULS_BUFFERFULL          Output buffer full 
  1970.   ULS_ILLEGALSEQUENCE     Invalid input character, or no identical character 
  1971.                           when substitution is not requested. 
  1972.  
  1973.  Example: 
  1974.  
  1975.      UconvObject hand;
  1976.      int         rc;
  1977.      char        chbuf[256], * chptr;
  1978.      UniChar     ucbuf[256], * ucptr;
  1979.      size_t      insize, outsize;
  1980.      size_t      subs;
  1981.  
  1982.      chptr    = chbuf;
  1983.      insize   = cvtsize;
  1984.      ucptr    = ucbuf;
  1985.      outsize  = 256;
  1986.      rc = UniUconvToUcs(hand, (void * *)&chptr, &insize, &ucptr, &outsize, &subs);
  1987.  
  1988.  
  1989. ΓòÉΓòÉΓòÉ 11.5. UniUconvFromUcs() ΓòÉΓòÉΓòÉ
  1990.  
  1991. The UniUconvFromUcs function converts a string from Unicode (UCS-2) to the 
  1992. codepage of the specified conversion object. 
  1993.  
  1994.    #include  <uconv.h>
  1995.    int  UniUconvFromUcs(
  1996.              UconvObject uobj,         /* I  - Uconv object handle         */
  1997.              UniChar * * inbuf,        /* IO - Input buffer                */
  1998.              size_t    * inchars,      /* IO - Input buffer size (bytes)   */
  1999.              void    * * outbuf,       /* IO - Output buffer size          */
  2000.              size_t    * outbytes,     /* IO - Output size (chars)         */
  2001.              size_t    * subst         /* O  - Substitution count          */
  2002.    );
  2003.  
  2004.   uobj 
  2005.       A handle to a uconv object created using UniCreateUconvObject. 
  2006.  
  2007.   inbuf 
  2008.       The address of the pointer to the input buffer. This is updated for any 
  2009.       characters consumed by the transform. If this is zero or points to zero, 
  2010.       a reset is done for any stateful transforms. 
  2011.  
  2012.   inchars 
  2013.       On input this points to the number of characters to be converted. On 
  2014.       output this is replaced with the number of characters which were not 
  2015.       processed. 
  2016.  
  2017.   outbuf 
  2018.       The address of the pointer to the output buffer. That pointer is updated 
  2019.       for any bytes output by this function. 
  2020.  
  2021.   outbytes 
  2022.       On input this points to the number of bytes in the output buffer. On 
  2023.       output this is replaced with the number of bytes left in the buffer. 
  2024.  
  2025.   subst 
  2026.       The value at the specified address is set to the number of non-identical 
  2027.       conversions done. 
  2028.  
  2029.  If a sequence of input bytes does not form a valid character conversion stops 
  2030.  at the previous successfully converted character. If the input buffer ends 
  2031.  with an incomplete character, conversion stops after the previous successfully 
  2032.  converted character. 
  2033.  
  2034.  If the output buffer is not large enough to hold the entire converted input, 
  2035.  conversion stops just prior to the input bytes that would have caused the 
  2036.  buffer to overflow. 
  2037.  
  2038.  If a character is found in the input buffer which is legal, but for which an 
  2039.  identical character does not exist in the target codepage, either a 
  2040.  substitution or error is returned based on the substitution setting. 
  2041.  
  2042.  Returns: 
  2043.  
  2044.   ULS_BADHANDLE           Invalid handle 
  2045.   ULS_INVALID             Character truncated 
  2046.   ULS_BUFFERFULL          Output buffer full 
  2047.   ULS_ILLEGALSEQUENCE     Invalid character 
  2048.  
  2049.  Example: 
  2050.  
  2051.      UconvObject hand;
  2052.      int         rc;
  2053.      char        chbuf[256], * chptr;
  2054.      UniChar     ucbuf[256], * ucptr;
  2055.      size_t      insize, outsize;
  2056.      size_t      subs;
  2057.  
  2058.      chptr    = chbuf;
  2059.      insize   = cvtsize;
  2060.      ucptr    = ucbuf;
  2061.      outsize  = 256;
  2062.      rc = UniUconvFromUcs(hand, &ucptr, &insize, (void * *)&chptr, &outsize, &subs);
  2063.  
  2064.  
  2065. ΓòÉΓòÉΓòÉ 11.6. UniFreeUconvObject() ΓòÉΓòÉΓòÉ
  2066.  
  2067. The UniFreeUconvObject closes a Uconv Object. 
  2068.  
  2069.    #include  <uconv.h>
  2070.    int  UniFreeUconvObject(
  2071.              UconvObject   uobj,       /* I  - Uconv object handle         */
  2072.    );
  2073.  
  2074. Close and free resource associated with the specified Uconv Object handle. 
  2075.  
  2076. Returns: 
  2077.  
  2078.  ULS_BADHANDLE            Invalid handle 
  2079.  
  2080.  
  2081. ΓòÉΓòÉΓòÉ 11.7. Conversion Object Names ΓòÉΓòÉΓòÉ
  2082.  
  2083. In OS/2, a codepage is indicated by a numeric value from the IBM registry of 
  2084. Codepages or Coded Character Sets. The Unicode Conversion Object (uconv) used 
  2085. to implement this codepage is given as a string "IBM-" followed by decimal 
  2086. number of the codepage without leading zeros. For example: 
  2087.  
  2088.    IBM-850
  2089.    IBM-37
  2090.    IBM-1200
  2091.  
  2092. The names of conversion objects are normally of this form, but conversion 
  2093. objects which are not used as system codepages may have any name of up to 15 
  2094. characters.  After removing any hyphen (-) characters, this name should fit 
  2095. within 8 characters, based on the limitation of the CD-ROM file system. 
  2096.  
  2097. The names of conversion objects may not contain the path. In OS/2 for PowerPC, 
  2098. the conversions objects are in a fixed directory.  For the OS/2 PC Prototype, 
  2099. the files are searched for in the current directory, and using the environment 
  2100. variable ULSPATH. 
  2101.  
  2102. After the name, there may be additional modifiers.  These modifiers allow for 
  2103. customization of the conversion object.  Modifiers start with an at sign ('@') 
  2104. and consist of name=value pairs which are separated by a comma. The following 
  2105. values are allowed: 
  2106.  
  2107.   map=data           Map all characters below space as controls. 
  2108.  
  2109.   map=display        Map all characters below space as glyphs.  This is the 
  2110.                      default. 
  2111.  
  2112.   map=crlf           Map the CR and LF characters as controls, and all other 
  2113.                      characters as glyphs. 
  2114.  
  2115.   map=cdra           Map characters below space as controls, and map them 
  2116.                      according to the IBM standard which causes PC codepage 
  2117.                      controls to be substituted. This is used when 
  2118.                      interchanging with non-OS/2 systems. 
  2119.  
  2120.   endian=big         Convert any UCS-2 characters to big endian (MSB first). 
  2121.  
  2122.   endian=little      Convert any UCS-2 characters to little endian (LSB first). 
  2123.                      This is the default. 
  2124.  
  2125.   sub=yes            Do substitution for non-identical characters. This is the 
  2126.                      default. 
  2127.  
  2128.   sub=no             Fail the conversion for non-identical characters. 
  2129.  
  2130.   subchar=\xXX       Sets the substitution character(s).  For multi-byte 
  2131.                      codepages this can be multiple byte each specified as two 
  2132.                      hex digits. 
  2133.  
  2134.  Examples of valid conversion object names are: 
  2135.  
  2136.      IBM-850@map=data
  2137.      IBM-1200@endian=big
  2138.      IBM-437@sub=yes,subchar=\xff,map=cdra
  2139.  
  2140.  
  2141. ΓòÉΓòÉΓòÉ 11.8. iconv_open() ΓòÉΓòÉΓòÉ
  2142.  
  2143. The iconv_open function initializes a codepage conversion object. 
  2144.  
  2145.    #include  <iconv.h>
  2146.    iconv_t  iconv_open(
  2147.        char * tocode,             /* I - Name of input conversion */
  2148.        char * fromcode            /* I - Name of output conversion */
  2149.    );
  2150. The iconv_open function returns a handle that describes a conversion from the 
  2151. codepage specified by fromcode to the codepage specified by tocode.  This 
  2152. handle can be used by the iconv function.  The conversion object remains valid 
  2153. until closed by iconv_close. 
  2154.  
  2155. See Conversion Object Names for a description of the tocode and fromcode names. 
  2156.  
  2157. iconv_open returns a handle when successful, and the value (iconv_t)-1 on 
  2158. failure.  The value errno is set for a bad return code with one of the 
  2159. following values: 
  2160.  
  2161.   EMFILE     The number of handles is exceeded. 
  2162.   ENOMEM     No memory is available. 
  2163.   EINVAL     One of the conversion objects is unknown, or the modifiers are 
  2164.              invalid. 
  2165.  
  2166.  
  2167. ΓòÉΓòÉΓòÉ 11.9. iconv() ΓòÉΓòÉΓòÉ
  2168.  
  2169. The iconv function converts text from one codepage to another 
  2170.  
  2171.    #include  <iconv.h>
  2172.    size_t  iconv(
  2173.        iconv_t    hand,           /* I  - iconv object handle  */
  2174.        char   * * inbuf,          /* IO - Input buffer         */
  2175.        size_t   * inbytesleft,    /* IO - Input chars left     */
  2176.        char   * * outbuf          /* IO - Output buffer        */
  2177.        size_t   * outbytesleft    /* IO - Output chars left    */
  2178.    );
  2179.  
  2180.   hand 
  2181.       A handle to a conversion object created using uconv_open. 
  2182.  
  2183.   inbuf 
  2184.       The address of the pointer to the input buffer. This is updated for any 
  2185.       characters consumed by the transform. If this is zero or points to zero, 
  2186.       a reset is done for any stateful transforms. 
  2187.  
  2188.   inbytesleft 
  2189.       On input this points to the number of bytes to be converted. On output 
  2190.       this is replaced with the number of bytes which were not processed. 
  2191.  
  2192.   outbuf 
  2193.       The address of the pointer to the output buffer. That pointer is updated 
  2194.       for any bytes output by this function. 
  2195.  
  2196.   outbytesleft 
  2197.       On input this points to the number of bytes in the output buffer. On 
  2198.       output this is replaced with the number of bytes left in the buffer. 
  2199.  
  2200.  If a sequence of input bytes does not form a valid character conversion stops 
  2201.  at the previous successfully converted character. If the input buffer ends 
  2202.  with an incomplete character, conversion stops after the previous successfully 
  2203.  converted character. 
  2204.  
  2205.  If the output buffer is not large enough to hold the entire converted input, 
  2206.  conversion stops just prior to the input bytes that would have caused the 
  2207.  buffer to overflow. 
  2208.  
  2209.  If iconv() encounters a character in the input buffer which is legal, but for 
  2210.  which an identical character does not exist in the target codepage, either a 
  2211.  substitution or error is returned based on the substitution setting. 
  2212.  
  2213.  If an error occurs, iconv() sets the return to (size_t)-1.  Otherwise it 
  2214.  returns the number of non-identical conversions.  The following errors may be 
  2215.  set in errno. 
  2216.  
  2217.   EBADF      The input handle is not valid. 
  2218.   EILSEQ     Input conversion stopped due to an input byte that does not belong 
  2219.              to the input codepage, or a character which has not identical 
  2220.              mapping when substitution is off. 
  2221.   E2BIG      Input conversion stopped due to lack of space in the output 
  2222.              buffer. 
  2223.   EINVAL     Input conversion stopped due to an incomplete character at the end 
  2224.              of the input buffer. 
  2225.  
  2226.  
  2227. ΓòÉΓòÉΓòÉ 11.10. iconv_close() ΓòÉΓòÉΓòÉ
  2228.  
  2229. The iconv_close function closes a conversion object. 
  2230.  
  2231.    #include  <uconv.h>
  2232.    int iconv_close(
  2233.        iconv_t  hand;             /* I - iconv object handle */
  2234.    );
  2235.  
  2236. On successful completion, a value of zero is returned.  Otherwise, a value of 
  2237. -1 is returned and errno is set to indicate the error: 
  2238.  
  2239.   EBADF      The input handle is not valid 
  2240.  
  2241.  
  2242. ΓòÉΓòÉΓòÉ 12. OS/2 Keyboard Prototype Library ΓòÉΓòÉΓòÉ
  2243.  
  2244. The keyboard prototype library consists of a set of functions which are used to 
  2245. process scancodes into keyboard state. The following uconv functions are 
  2246. supported: 
  2247.  
  2248.        UniCreateKeyboard() 
  2249.        UniDestroyKeyboard() 
  2250.        UniQueryKeyboard() 
  2251.        UniResetShiftState() 
  2252.        UniTranslateDeadKey() 
  2253.        UniTranslateKey() 
  2254.        UniUpdateShiftState() 
  2255.        UniUntranslateKey() 
  2256.  
  2257.  The header for all keyboard files is unikbd.h 
  2258.  
  2259.  
  2260. ΓòÉΓòÉΓòÉ 12.1. UniCreateKeyboard ΓòÉΓòÉΓòÉ
  2261.  
  2262. The UniCreateKeyboard function load a keyboard layout from disk and returns a 
  2263. handle. If the keyboard layout is already in use, a use count is increment. 
  2264.  
  2265. #include <unikbd.h>
  2266. uint32 UniCreateKeyboard (
  2267.           KHAND *pkhand,
  2268.           KBDNAME *name,
  2269.           uint32 mode);
  2270.  
  2271.  name (KBDNAME)  input 
  2272.        The name string that identifies the keyboard translation table file name 
  2273.        (e.g. "us").  The string does not include the path name. 
  2274.  
  2275.  pkhand (KHAND)  output 
  2276.        Return location for keyboard handle. This handle is used on all other 
  2277.        keyboard translation calls. 
  2278.  
  2279.  mode (uint32)  input 
  2280.        Reserved for future use - must be zero. 
  2281.  
  2282.  Return codes: 
  2283.  
  2284.         NO_ERROR 
  2285.         ERR_TOO_MANY_KBD 
  2286.         ERR_KBD_NOT_FOUND 
  2287.         ERR_NO_MEMORY 
  2288.  
  2289.  
  2290. ΓòÉΓòÉΓòÉ 12.2. UniDestroyKeyboard ΓòÉΓòÉΓòÉ
  2291.  
  2292. The UniDestroyKeyboard function closes a keyboard resource. 
  2293.  
  2294. #include <unikbd.h>
  2295. uint32 UniDestroyKeyboard (KHAND khand);
  2296.  
  2297.  khand (KHAND)  input 
  2298.        Keyboard handle. 
  2299.  
  2300.  Return codes: 
  2301.  
  2302.         NO_ERROR 
  2303.         ERR_NOOP 
  2304.         ERR_BAD_HANDLE 
  2305.  
  2306.  This function releases the keyboard handle and reduces the use count. When the 
  2307.  use count goes to zero, the resource associated with the keyboard will be 
  2308.  released. 
  2309.  
  2310.  
  2311. ΓòÉΓòÉΓòÉ 12.3. UniQueryKeyboard ΓòÉΓòÉΓòÉ
  2312.  
  2313. The UniQueryKeyboard function is used to query information from the header in a 
  2314. keyboard table. 
  2315.  
  2316. #include <unikbd.h>
  2317. uint32 UniQueryKeyboard (
  2318.           KHAND khand,
  2319.           KEYBOARDINFO *kbdinfo);
  2320.  
  2321.  khand (KHAND)  input 
  2322.        Keyboard handle. 
  2323.  
  2324.  kbdinfo (KEYBOARDINFO)  output 
  2325.        Address of keyboardinfo packet. 
  2326.  
  2327.   /*
  2328.    * Query keyboard structure
  2329.    */
  2330.   typedef struct {
  2331.       uint32  len;             /* Length of structure      */
  2332.       uint16  kbid;            /* Keyboard architecture id */
  2333.       uint16  version;         /* Version number           */
  2334.       char    language[2];     /* Normal language          */
  2335.       char    country[2];      /* Normal country           */
  2336.       uint16  flags;           /* Flags (KBDF_)            */
  2337.       uint16  resv;            /* Reserved                 */
  2338.       UniChar description[32]; /* Description of keyboard  */
  2339.   } KEYBOARDINFO;
  2340.  
  2341.   /*
  2342.    * Query keyboard flags
  2343.    */
  2344.   #define  KBDF_DEFAULTVKEY    0x0001    /* Use default VKEYs           */
  2345.   #define  KBDF_NOCTRLSHIFT    0x0002    /* Ctrl+Shift equals Ctrl      */
  2346.   #define  KBDF_NOALTGR        0x0004    /* Alt graphics is not used    */
  2347.   #define  KBDF_SHIFTALTGR     0x0010    /* Altgr, shift-altgr separate */
  2348.   #define  KBDF_DEADGOOD       0x0020    /* Invalid dead use second char*/
  2349.   #define  KBDF_DEADPRIVATE    0x0040    /* Use only private dead keys  */
  2350.  
  2351.   #define  KBDF_SYSTEM         0x8000    /* System supplied keyboard    */
  2352.   #define  KBDF_INTERNATIONAL  0x4000    /* Full-range character set    */
  2353.   #define  KBDF_DVORAK         0x2000    /* Alternate letter keys       */
  2354.   #define  KBDF_NATIONAL       0x1000    /* National letter keys        */
  2355.   #define  KBDF_LETTERKEYS     0x3000    /* Letter key type             */
  2356.   #define  KBDF_ISOKEYS        0x0800    /* Use ISO icons for key names */
  2357.  
  2358.   #define  KBDF_LAYOUT101      0x0000    /* Normal layout is 84/101     */
  2359.   #define  KBDF_LAYOUT102      0x0100    /* Normal layout is 85/102     */
  2360.   #define  KBDF_LAYOUT106      0x0200    /* Normal layout is 89/106     */
  2361.   #define  KBDF_LAYOUT103      0x0300    /* Normal layout is 86/103     */
  2362.   #define  KBDF_LAYOUT100      0x0400    /* Normal layout is 83/100     */
  2363.   #define  KBDF_LAYOUTS        0x0700    /* Layout related bits         */
  2364.  Return codes: 
  2365.  
  2366.         NO_ERROR 
  2367.         ERR_BAD_HANDLE 
  2368.  
  2369.  
  2370. ΓòÉΓòÉΓòÉ 12.4. UniTranslateKey ΓòÉΓòÉΓòÉ
  2371.  
  2372. The UniTranslateKey function translates a scan code and effective shift state) 
  2373. to a unicode character and virtual key or deadkey.  It also sets the BIOS 
  2374. scancode. 
  2375.  
  2376. #include <unikbd.h>
  2377. uint32 UniTranslateKey( KHAND khand,
  2378.           uint32    eshift,
  2379.           VSCAN     scan,
  2380.           UniChar * unichar,
  2381.           VDKEY *   vdkey,
  2382.           char  *   biosscan);
  2383.  
  2384.  khand (HUNIKBD) input 
  2385.        Keyboard handle 
  2386.  
  2387.  eshift (uint32) input 
  2388.        Effective shift state.  This is an output from UniUpdateShiftState. 
  2389.  
  2390.  scan (VSCAN) input. 
  2391.        The PM style scancode which indicates which key.  Note that this does 
  2392.        not indicate the action (make, break, repeat). 
  2393.  
  2394.  unichar (UniChar) output 
  2395.        Unicode character 
  2396.  
  2397.  vdkey (VDKEY)  output 
  2398.        Virtual key or dead key 
  2399.  
  2400.  Return codes: 
  2401.  
  2402.         NO_ERROR 
  2403.         ERR_BAD_HANDLE 
  2404.  
  2405.  In most cases there is either a unicode character or a virtual key. In a few 
  2406.  cases (esc, tab, backspace, enter) both exist. It is normal when a dead key is 
  2407.  returned to also return a unicode character for the standalone character 
  2408.  associated with the deadkey. 
  2409.  
  2410.  The BIOS scancode is returned since the translation is dependent of the 
  2411.  keyboard layout.  This is done to emulate the earlier DOS and OS/2 keyboard 
  2412.  layouts which allowed the translated (BIOS) scancode to be set by the layout. 
  2413.  
  2414.  
  2415. ΓòÉΓòÉΓòÉ 12.5. UniUntranslateKey ΓòÉΓòÉΓòÉ
  2416.  
  2417. The UniUntranslateKey does a reverse keyboard translate. 
  2418.  
  2419. Translate a unichar and virtual or dead key to a scan code and shiftstate. 
  2420. This is used to create a complete keyboard packet when an already translated 
  2421. character is entered.  This is used mostly for programmed input. 
  2422.  
  2423. Normally either the unicode character or the vdkey is given.  If both are 
  2424. given, UniUntranslateKey will process the vdkey first. 
  2425.  
  2426. #include <unikbd.h>
  2427. uint32 UniUntranslateKey (
  2428.           KHAND    khand,
  2429.           UniChar  unichar,
  2430.           VDKEY    vdkey,
  2431.           VSCAN *  scan,
  2432.           uint32 * state);
  2433.  
  2434.  khand (KHAND) input 
  2435.       Keyboard handle 
  2436.  
  2437.  unichar (UniChar) input 
  2438.       Unicode character to untranslate 
  2439.  
  2440.  vdkey (VDKEY)  input 
  2441.       Virtual or Deadkey 
  2442.  
  2443.  scan (VSCAN *)  output 
  2444.       Location for output of PM scancode 
  2445.  
  2446.  eshift (uint32) output 
  2447.       Effective shift to generate this character. This is a minimal number of 
  2448.       bits set. 
  2449.  
  2450.  Return codes: 
  2451.  
  2452.         NO_ERROR 
  2453.         ERR_BAD_HANDLE 
  2454.         ERR_NO_SCAN. 
  2455.  
  2456.  
  2457. ΓòÉΓòÉΓòÉ 12.6. UniUpdateShiftState ΓòÉΓòÉΓòÉ
  2458.  
  2459. The UniUpdateShiftState function is used to update the three portions of the 
  2460. shift state (actual, effective, and led). 
  2461.  
  2462. #include <unikbd.h>
  2463. uint32 UniUpdateShiftState (
  2464.           KHAND        khand,
  2465.           SHIFTSTATE * state,
  2466.           VSCAN        scan,
  2467.           UCHAR        makebreak)
  2468.  
  2469.  khand (KHAND)  input 
  2470.       Keyboard handle 
  2471.  
  2472.  state (SHIFTSTATE *) i/o 
  2473.       Shift state.  This consists of three 32 bit values.  They have similar 
  2474.       bit definitions but they define the actual, effective, and led shift 
  2475.       states. 
  2476.  
  2477.  scan (VSCAN) input 
  2478.       PM scan code 
  2479.  
  2480.  makebreak (UCHAR) input 
  2481.       make/break/repeat indicator 
  2482.  
  2483.  Return codes: 
  2484.  
  2485.         NO_ERROR 
  2486.         ERR_BAD_HANDLE 
  2487.  
  2488.  Modify the shift state as required by the scan code, using the specified 
  2489.  keyboard translation tables.  The shift state consists of three parts: the 
  2490.  actual shift state, the effective shift state, and the LED status. 
  2491.  
  2492.  The effective shift is equal to the 16 lower bits of the actual shift, but 
  2493.  when a lock state modifies an actual shift (such as capslock affecting shift) 
  2494.  the effective shift is modified. This means that the effective shift is only 
  2495.  correct for the specified scancode. 
  2496.  
  2497.  
  2498. ΓòÉΓòÉΓòÉ 12.7. UniTranslateDeadKey ΓòÉΓòÉΓòÉ
  2499.  
  2500. The UniTranslateDeadKey translates a dead key code with a unicode to a 
  2501. composite char. Translate deadkey combination using the global table and any 
  2502. special table associated with the keyboard translation table. 
  2503.  
  2504. #include <unikbd.h>
  2505. uint32 UniTranslateDeadKey (
  2506.           KHAND     khand,
  2507.           VDKEY     dead,
  2508.           UniChar   inchar,
  2509.           UniChar * outchar
  2510.           VDKEY   * outdead);
  2511.  
  2512.  khand (KHAND) input 
  2513.       Keyboard handle 
  2514.  
  2515.  dead (VDKEY) input 
  2516.       Dead key value. 
  2517.  
  2518.  inchar (UniChar) input 
  2519.       Second character in sequence 
  2520.  
  2521.  outchar (UniChar *) output 
  2522.       Composite character 
  2523.  
  2524.  outdead(VDKEY *) output 
  2525.       Output deadkey.  If this is non-zero then the deadkey is chained. OS/2 
  2526.       does not support chained deadkeys, so this should not be used. 
  2527.  
  2528.  Return codes: 
  2529.  
  2530.         NO_ERROR 
  2531.         ERR_BAD_HANDLE 
  2532.         ERR_NO_DEAD 
  2533.  
  2534.  The calling program is expected to maintain deadkey state so that when a 
  2535.  deadkey is found, the next will be used to form the full character.  After 
  2536.  doing the deadkey translate, the deadkey state should be reset. 
  2537.  
  2538.  There is provision in the tables for a deadkey formed from multiple deadkeys, 
  2539.  and this is used in the Japanese logic. It should not be generally used since 
  2540.  OS/2 does not support chained dead keys. 
  2541.  
  2542.  
  2543. ΓòÉΓòÉΓòÉ 12.8. UniResetShiftState ΓòÉΓòÉΓòÉ
  2544.  
  2545. The UniResetShiftState function resets the shift state. This is used when the 
  2546. shift state is changed other than through the normal key sequence.  This allows 
  2547. the LED status to be maintained based on the shift state. 
  2548.  
  2549. #include <unikbd.h>
  2550. uint32 UniResetShiftState(
  2551.           KHAND khand,
  2552.           SHIFTSTATE *state,
  2553.           USHORT type)
  2554.  
  2555.  khand (KHAND) input 
  2556.       Keyboard handle 
  2557.  
  2558.  state (SHIFTSTATE) i/o 
  2559.       Shift state structure. 
  2560.  
  2561.  type (USHORT) input 
  2562.       type of reset: 
  2563.  
  2564.       KEYEV_SET              Set to specified value 
  2565.  
  2566.       KEYEV_RELEASE          Release all pressed keys 
  2567.  
  2568.       KEYEV_ZERO             Release all pressed and locked keys 
  2569.  
  2570.  Return codes: 
  2571.  
  2572.         NO_ERROR 
  2573.         ERR_BAD_HANDLE 
  2574.