home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / VSCPPv4.zip / VACPP / IBMCPP / HELP / CPPPROG.INF (.txt) < prev    next >
OS/2 Help File  |  1995-05-18  |  604KB  |  20,864 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. About this Book ΓòÉΓòÉΓòÉ
  3.  
  4. This book describes coding techniques such as multithreading, creating DLLs, 
  5. using templates, signal and exception handling, managing memory, and creating 
  6. programs that use 16-bit and 32-bit code.  The book focuses mostly on the C and 
  7. C++ techniques involved, rather than the lower level OS/2 techniques that are 
  8. described in the Control Program Guide and Reference 
  9.  
  10. This book is written for application and systems programmers who want to use 
  11. IBM VisualAge C++ Version 3.0 for OS/2 to develop and run C or C++ programming 
  12. applications. You should have a working knowledge of the C or C++ programming 
  13. language, the OS/2 operating system, and other products described 
  14.  
  15. Before you begin to use this information, it would be helpful to understand how 
  16. to navigate through it. You can use the Table of Contents and Index facility to 
  17. locate topics and the Search facility to search the text of this document. You 
  18. can use hypertext links to acquire related information on the current topic. 
  19. Hypertext links appear in a different color (which you can customize using the 
  20. OS/2 Scheme Palette). For example, here is a link to another panel: 
  21. Communicating Your Comments to IBM. By double-clicking on the text of the link 
  22. or by pressing Enter on a highlighted link, you will open a panel of related 
  23. information. When you open a panel, the first link has the focus; to shift the 
  24. focus to other links, use the Tab key. 
  25.  
  26. You should also understand: 
  27.  
  28.      How to Use the Contents 
  29.      How to Obtain Additional Information 
  30.      How to Use Action Bar Choices 
  31.      How to Cut and Paste Examples 
  32.  
  33.  
  34. ΓòÉΓòÉΓòÉ 1.1. Notices ΓòÉΓòÉΓòÉ
  35.  
  36. Copyright International Business Machines Corporation, 1992, 1995. All rights 
  37. reserved. 
  38.  
  39. Note to U.S. Government Users - Documentation related to restricted rights - 
  40. Use, duplication, or disclosure is subject to restrictions set forth in GSA ADP 
  41. Schedule Contract with IBM Corp. 
  42.  
  43. Third Edition, May 1995. 
  44.  
  45. This edition applies to Version 3.0 of IBM VisualAge C ++ for OS/2 (30H1664, 
  46. 30H1665, 30H1666) and to all subsequent releases and modifications until 
  47. otherwise indicated in new editions.  Make sure you are using the correct 
  48. edition for the level of the product. 
  49.  
  50. This publication could include technical inaccuracies or typographical errors. 
  51. Changes are periodically made to the information herein; any such changes will 
  52. be reported in subsequent revisions. 
  53.  
  54. Requests for publications and for technical information about IBM products 
  55. should be made to your IBM Authorized Dealer or your IBM Marketing 
  56. Representative. 
  57.  
  58. When you send information to IBM, you grant IBM a nonexclusive right to use or 
  59. distribute the information in any ways it believes appropriate without 
  60. incurring any obligation to you. 
  61.  
  62. Any reference to an IBM licensed program in this publication is not intended to 
  63. state or imply that only IBM's licensed program may be used. Any functionally 
  64. equivalent product, program, or service that does not infringe any of IBM's 
  65. intellectual property rights may be used instead of the IBM product, program, 
  66. or service. Evaluation and verification of operation in conjunction with other 
  67. products, except  those expressly designated by IBM, is the user's 
  68. responsibility. 
  69.  
  70. IBM may have patents or pending patent applications covering subject matter in 
  71. this document.  The furnishing of this document does not give you any license 
  72. to these patents.  You can send license inquiries, in writing, to the IBM 
  73. Director of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY, 
  74. 10594, USA. 
  75.  
  76.  
  77. ΓòÉΓòÉΓòÉ 1.2. Trademarks and Service Marks ΓòÉΓòÉΓòÉ
  78.  
  79. The following terms used in this publication are trademarks or service marks of 
  80. IBM Corporation in the United States or other countries: 
  81.  
  82.       BookManager 
  83.       C/2 
  84.       C Set/2 
  85.       C Set ++ 
  86.       Common User Access 
  87.       CUA 
  88.       IBM 
  89.       IBMLink 
  90.       Library Reader 
  91.       Open Class 
  92.       Operating System/2 
  93.       OS/2 
  94.       Personal System/2 
  95.       PS/2 
  96.       Presentation Manager 
  97.       Project Smarts 
  98.       QuickBrowse 
  99.       VisualAge 
  100.       WorkFrame 
  101.  
  102.  Other company, product, and service names, which may be denoted by a double 
  103.  asterisk(**), may be trademarks or service marks of others. 
  104.  
  105.  
  106. ΓòÉΓòÉΓòÉ 1.3. How to Use the Contents ΓòÉΓòÉΓòÉ
  107.  
  108. When the Contents window first appears, some topics have a plus (+) sign beside 
  109. them. The plus sign indicates that additional topics are available. 
  110.  
  111. To expand the Contents if you are using a mouse, click on the plus sign.  If 
  112. you are using the keyboard, use the Up or Down Arrow key to highlight the 
  113. topic, and press the plus (+) key. For example, How to Use the Contents has a 
  114. plus sign beside it.  To see additional topics for that heading, click on the 
  115. plus sign or highlight that topic and press the plus (+) key. 
  116.  
  117. To view a topic, double-click on the topic (or press the Up or Down Arrow key 
  118. to highlight the topic, and then press the Enter key). 
  119.  
  120.  
  121. ΓòÉΓòÉΓòÉ 1.4. How to Obtain Additional Information ΓòÉΓòÉΓòÉ
  122.  
  123. After you select a topic, the information for that topic appears in a window. 
  124. Highlighted words or phrases indicate that additional information is available. 
  125. Certain words and phrases are highlighted in a different color from the 
  126. surrounding text. These are called hypertext terms. 
  127.  
  128. If you are using a mouse, double-click on the highlighted word.  If you are 
  129. using a keyboard, press the Tab key to move to the highlighted word, and then 
  130. press the Enter key.  Additional information then appears in a window. 
  131.  
  132.  
  133. ΓòÉΓòÉΓòÉ 1.5. How to Use Action Bar Choices ΓòÉΓòÉΓòÉ
  134.  
  135. Several choices are available for managing the information presented in this 
  136. document. There are three menus on the action bar:  the Services menu, the 
  137. Options menu, and the Help menu. 
  138.  
  139. The actions that are selectable from the Services menu operate on the active 
  140. window currently displayed on the screen. These actions include the following: 
  141.  
  142.  Placing Bookmarks 
  143.    You can set a placeholder so you can retrieve information of interest to 
  144.    you. 
  145.  
  146.  Searching for Information 
  147.    You can find occurrences of a word or phrase in the current topic, selected 
  148.    topics, or all topics. 
  149.  
  150.  Printing Information 
  151.    You can print one or more topics. You can also print a set of topics by 
  152.    first marking the topics in the Contents list. 
  153.  
  154.  Copying Information to a File 
  155.    You can copy a topic that you are viewing to the System Clipboard or to a 
  156.    file that you can edit. This method is particularly useful for copying 
  157.    syntax definitions and program samples into the application that you are 
  158.    developing. 
  159.  
  160.  Using the actions that are selectable from the Options menu, you can change 
  161.  the way your Contents list is displayed. To expand the Contents and show all 
  162.  levels for all topics, choose Expand all from the Options pull-down. You can 
  163.  also press the Ctrl, Shift, and * keys together. 
  164.  
  165.  The actions that are selectable from the Help menu allow you to select 
  166.  different types of help information. 
  167.  
  168.  For information about any of the menu choices, highlight the choice in the 
  169.  menu and press F1. 
  170.  
  171.  
  172. ΓòÉΓòÉΓòÉ 1.5.1. Placing Bookmarks ΓòÉΓòÉΓòÉ
  173.  
  174. When you place a bookmark on a topic, it is added to a list of bookmarks you 
  175. have previously set.  You can view the list, and you can remove one or all 
  176. bookmarks from the list.  If you have not set any bookmarks, the list is empty. 
  177.  
  178. To set a bookmark, do the following: 
  179.  
  180.    1. Select a topic from the Contents. 
  181.    2. When that topic appears, select the Bookmark option from the Services 
  182.       menu. 
  183.    3. If you want to change the name used for the bookmark, type the new name 
  184.       in the field. 
  185.    4. Click on the Place radio button (or press the Up or Down Arrow key to 
  186.       select it). 
  187.    5. Click on OK (or select it and press Enter). The bookmark is then added to 
  188.       the bookmark list. 
  189.  
  190.  
  191. ΓòÉΓòÉΓòÉ 1.5.2. Searching for Information ΓòÉΓòÉΓòÉ
  192.  
  193. You can specify a word or phrase to be searched.  You can also limit the search 
  194. to a set of topics by first marking the topics in the Contents list. 
  195.  
  196. To search for a word or phrase in all topics, do the following: 
  197.  
  198.    1. Select the Search option from the Services menu. 
  199.    2. Type the word or words to be searched for. 
  200.    3. Click on All sections (or press the Up or Down Arrow keys to select it). 
  201.    4. Click on Search (or select it and press Enter) to begin the search. 
  202.    5. The list of topics where the word or phrase appears is displayed. 
  203.  
  204.  
  205. ΓòÉΓòÉΓòÉ 1.5.3. Printing Information ΓòÉΓòÉΓòÉ
  206.  
  207. You can print one or more topics, the index, or the table of contents.  Make 
  208. sure that your printer is connected to the serial port, configured correctly, 
  209. and ready for input. To print: 
  210.  
  211.    1. Select Print from the Services pull-down. 
  212.    2. Select what you want to print. Note that the This section and Marked 
  213.       sections choices are only available if you are viewing a topic or if you 
  214.       have marked topics, respectively.  To mark topics in the table of 
  215.       contents, press the Ctrl key and click on the topics, or use the arrow 
  216.       keys. 
  217.    3. Select Print to print what you've chosen on your printer. 
  218.  
  219.  
  220. ΓòÉΓòÉΓòÉ 1.5.4. Copying Information to a File ΓòÉΓòÉΓòÉ
  221.  
  222. You can copy a topic that you are viewing in two ways: 
  223.  
  224.      Copy copies the topic that you are viewing into the System Clipboard.  If 
  225.       you are using a Presentation Manager (PM) editor (for example, the 
  226.       Enhanced Editor) that copies or cuts (or both) to the System Clipboard, 
  227.       and pastes to the System Clipboard, you can easily add the copied 
  228.       information to your program source module. 
  229.  
  230.      Copy to file copies the topic that you are viewing into a temporary file 
  231.       named TEXT.TMP.  You can later edit that file by using any editor. 
  232.       TEXT.TMP is placed in the directory where your viewable document resides. 
  233.  
  234.  To copy a topic, do the following: 
  235.  
  236.    1. Expand the Contents list and select a topic. 
  237.    2. When the topic appears, select Copy to file from the Services menu. 
  238.    3. The system puts the text pertaining to that topic into the temporary file 
  239.       TEXT.TMP. 
  240.  
  241.  
  242. ΓòÉΓòÉΓòÉ 1.6. How to Cut and Paste Examples ΓòÉΓòÉΓòÉ
  243.  
  244. You can copy examples (or information) from this reference/guide/book to 
  245. compile, link, and run them, or to paste them into your own code. 
  246.  
  247. To copy an example or information: 
  248.  
  249.    1. Make the topic you want to copy the active window. 
  250.  
  251.    2. From the Services menu, select Copy to file. The text in that topic is 
  252.       placed in the temporary file TEXT.TMP, in the same directory as this 
  253.       reference. 
  254.  
  255.    3. You can then modify or use TEXT.TMP as you want. 
  256.  
  257.  Note:  Because the system copies the entire contents of the topic to the file, 
  258.  you may need to edit it to remove additional text. 
  259.  
  260.  
  261. ΓòÉΓòÉΓòÉ 1.7. Other Information You Might Find Helpful ΓòÉΓòÉΓòÉ
  262.  
  263. This product provides a number of online guides and references that we hope 
  264. you'll find helpful as you develop applications. This information includes 
  265. User's Guides, References, and How Do I help that gives you specific 
  266. instructions for performing common tasks. You can get to this online 
  267. information from the Information folder inside the main product folder.  You 
  268. can also get to it from the Help menu in any of the components of the product. 
  269. The following online documents are available: 
  270.  
  271.      Read Me First! 
  272.      Welcome to VisualAge C++ 
  273.      User's Guide 
  274.      Visual Builder User's Guide 
  275.      Visual Builder Parts Reference 
  276.      Building VisualAge C++ Parts for Fun and Profit 
  277.      Open Class Library User's Guide 
  278.      Open Class Library Reference 
  279.      Language Reference 
  280.      C Library Reference 
  281.  
  282.  
  283. ΓòÉΓòÉΓòÉ 1.8. Communicating Your Comments to IBM ΓòÉΓòÉΓòÉ
  284.  
  285. If there is something you like, or dislike, about this book, please let us 
  286. know.  You can use one of the methods listed below to send your comments to 
  287. IBM.  Please be sure to include the complete title of the publication that you 
  288. are commenting on. 
  289.  
  290. The comments you send should only pertain to the information in this document 
  291. and its presentation.  To request additional publications or to ask questions 
  292. or make comments about the functions of IBM products or systems, you should 
  293. talk to your IBM representative or your authorized IBM remarketer. 
  294.  
  295. When you send comments to IBM, you grant IBM a nonexclusive right to use or 
  296. distribute your comments in any way it believes appropriate without incurring 
  297. any obligation to you. 
  298.  
  299. You can send your comments to IBM in the following ways: 
  300.  
  301.      By mail to the following address: 
  302.  
  303.             IBM Canada Ltd. Laboratory
  304.             Information Development
  305.             2G/345/1150/TOR
  306.             1150 EGLINTON AVENUE EAST
  307.             NORTH YORK, ONTARIO
  308.             CANADA M3C 1H7
  309.  
  310.      By FAX to the following number: 
  311.  
  312.         -  United States and Canada: (416) 448-6161 
  313.         -  Other countries (+1) 416-448-6161 
  314.  
  315.      By electronic mail to one of the following IDs.  Be sure to include your 
  316.       entire network address if you wish to get a reply. 
  317.  
  318.         -  Internet: torrcf@vnet.ibm.com 
  319.         -  IBMLink: toribm(torrcf) 
  320.         -  IBM/PROFS: torolab4(torrcf) 
  321.         -  IBMMAIL: ibmmail(caibmwt9) 
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 1.9. Who Should Read This Book ΓòÉΓòÉΓòÉ
  325.  
  326. This book is written for application and systems programmers who want to use 
  327. IBM VisualAge C++ for OS/2 to develop and run C or C++ applications. You should 
  328. have a working knowledge of the C or C++ programming language, the OS/2 
  329. operating system, and other products described in Welcome to VisualAge C++. 
  330.  
  331.  
  332. ΓòÉΓòÉΓòÉ 1.10. How to Use This Book ΓòÉΓòÉΓòÉ
  333.  
  334. For an overview and tour of VisualAge C++, see the Welcome to VisualAge C++. 
  335. For introductory information on how to use the VisualAge C++ compiler and tools 
  336. to compile, link, debug, browse, and trace your program, see the User's Guide. 
  337. For reference information on the more technical aspects of the compiler and 
  338. advanced programming techniques, use this book. 
  339.  
  340.  
  341. ΓòÉΓòÉΓòÉ 1.10.1. How to Read the Syntax Diagrams ΓòÉΓòÉΓòÉ
  342.  
  343. This book uses two methods to show syntax. One is for commands, preprocessor 
  344. directives, and statements; the other is for compiler options. 
  345.  
  346. Syntax for Commands, Preprocessor Directives, and Statements 
  347.  
  348.      Read the syntax diagrams from left to right, from top to bottom, 
  349.       following the path of the line. 
  350.  
  351.       The ΓöÇΓöÇΓöÇ symbol indicates the beginning of a command, directive, or 
  352.       statement. 
  353.  
  354.       The ΓöÇΓöÇΓöÇ symbol indicates that the command, directive, or statement 
  355.       syntax is continued on the next line. 
  356.  
  357.       The ΓöÇΓöÇΓöÇ symbol indicates that a command, directive, or statement is 
  358.       continued from the previous line. 
  359.  
  360.       The ΓöÇΓöÇΓöÇ symbol indicates the end of a command, directive, or statement. 
  361.  
  362.       Diagrams of syntactical units other than complete commands, directives, 
  363.       or statements start with the ΓöÇΓöÇΓöÇ symbol and end with the ΓöÇΓöÇΓöÇ symbol. 
  364.  
  365.       Note:  In the following diagrams, STATEMENT represents a C or C++ 
  366.       command, directive, or statement. 
  367.  
  368.      Required items appear on the horizontal line (the main path). 
  369.  
  370.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇrequired_itemΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  371.  
  372.      Optional items appear below the main path. 
  373.  
  374.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  375.                     ΓööΓöÇoptional_itemΓöÇΓöÿ
  376.  
  377.      If you can choose from two or more items, they appear vertically, in a 
  378.       stack. 
  379.  
  380.       If you must choose one of the items, one item of the stack appears on the 
  381.       main path. 
  382.  
  383.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇΓö¼ΓöÇrequired_choice1ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  384.                     ΓööΓöÇrequired_choice2ΓöÇΓöÿ
  385.  
  386.       If the items are optional, the entire stack appears below the main path. 
  387.  
  388.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  389.                     Γö£ΓöÇoptional_choice1ΓöÇΓöñ
  390.                     ΓööΓöÇoptional_choice2ΓöÇΓöÿ
  391.  
  392.       The item that is the default appears above the main path. 
  393.  
  394.                     ΓöîΓöÇdefault_itemΓöÇΓöÇΓöÇΓöÉ
  395.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇΓö┤ΓöÇalternate_itemΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  396.  
  397.      An arrow returning to the left above the main line indicates an item that 
  398.       can be repeated. 
  399.  
  400.                     ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  401.                              Γöé
  402.             >>ΓöÇΓöÇSTATEMENTΓöÇΓöÇΓöÇΓöÇrepeatable_itemΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ><
  403.  
  404.       A repeat arrow above a stack indicates that you can make more than one 
  405.       choice from the stacked items, or repeat a single choice. 
  406.  
  407.      Keywords appear in nonitalic letters and should be entered exactly as 
  408.       shown (for example, pragma). 
  409.  
  410.       Variables appear in italicized lowercase letters (for example, 
  411.       identifier).  They represent user-supplied names or values. 
  412.  
  413.      If punctuation marks, parentheses, arithmetic operators, or other such 
  414.       symbols are shown, you must enter them as part of the syntax. 
  415.  
  416.  Note:  The white space is not always required between tokens, but it is 
  417.  recommended that you include at least one blank between tokens unless 
  418.  specified otherwise. 
  419.  
  420.  The following syntax diagram example shows the syntax for the #pragma comment 
  421.  directive.  (See the Language Reference for information on the #pragma 
  422.  directive.) 
  423.  
  424.   1 2  3  4    5    6               9  10
  425.    ΓöÇ#ΓöÇΓöÇpragmaΓöÇΓöÇcommentΓöÇΓöÇ(ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇcompilerΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇ
  426.                Γöé                   Γöé
  427.                Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇdateΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  428.                Γöé                   Γöé
  429.                Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇtimestampΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  430.                Γöé                   Γöé
  431.                ΓööΓöÇΓöÇΓö¼ΓöÇΓöÇcopyrightΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  432.                  Γöé       Γöé  Γöé         Γöé
  433.                  ΓööΓöÇΓöÇuserΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ  ΓööΓöÇΓöÇ,ΓöÇ"characters"ΓöÇΓöÿ
  434.  
  435.                           7   8
  436.  
  437.  The syntax diagram is interpreted in the following manner: 
  438.  
  439.       1 This is the start of the syntax diagram. 
  440.  
  441.       2 The symbol # must appear first. 
  442.  
  443.       3 The keyword pragma must appear following the # symbol. 
  444.  
  445.       4 The keyword comment must appear following the keyword pragma. 
  446.  
  447.       5 An opening parenthesis must be present. 
  448.  
  449.       6 The comment type must be entered only as one of the types indicated: 
  450.       compiler, date, timestamp, copyright, or user. 
  451.  
  452.       7 If the comment type is copyright or user, and an optional character 
  453.       string is following, a comma must be present after the comment type. 
  454.  
  455.       8 A character string must follow the comma. 
  456.  
  457.       9 A closing parenthesis is required. 
  458.  
  459.       10 This is the end of the syntax diagram. 
  460.  
  461.  The following examples of the #pragma comment directive are syntactically 
  462.  correct according to the diagram shown above: 
  463.  
  464.      #pragma comment(date)
  465.      #pragma comment(user)
  466.      #pragma comment(copyright,"This text will appear in the module")
  467.  
  468.  Syntax for Compiler Options 
  469.  
  470.      Optional elements are enclosed in square brackets [ ]. 
  471.  
  472.      When you have a list of items from which you can choose one, the logical 
  473.       OR symbol (|) separates the items. 
  474.  
  475.      Variables appear in italicized lowercase letters (for example, num). 
  476.  
  477.  
  478. ΓòÉΓòÉΓòÉ 1.10.1.1. Examples ΓòÉΓòÉΓòÉ
  479.  
  480.  Syntax      Possible Choices 
  481.  
  482.  /L[+|-]     /L 
  483.              /L+ 
  484.              /L- 
  485.  
  486.  /Lt"string" /Lt"Listing File for Program Test" 
  487.  Note that, for options that use a plus (+) or minus (-) sign, if you do not 
  488.  specify a sign, the plus is assumed. For example, the /L and /L+ options are 
  489.  equivalent. 
  490.  
  491.  
  492. ΓòÉΓòÉΓòÉ 1.11. Changes to this Book ΓòÉΓòÉΓòÉ
  493.  
  494. In addition to rewriting and re-organizing some of the existing information in 
  495. the book to improve clarity and ease of use, we've added some brand new 
  496. chapters. Some describe new components, others describe functional enhancements 
  497. we've made to previously existing components. 
  498.  
  499. Important  For details on late changes, features, and restrictions, please 
  500. ensure you read the README file. 
  501.  
  502.  
  503. ΓòÉΓòÉΓòÉ 1.11.1. New Product Features You'll Find in this Book ΓòÉΓòÉΓòÉ
  504.  
  505. New features that involve support from many components include: 
  506.  
  507.      Direct-to-SOM (DTS) support 
  508.  
  509.       The IBM System Object Model (SOM) provides a common programming interface 
  510.       for building and using objects.  SOM improves your C++ programming 
  511.       productivity in two ways: 
  512.  
  513.         -  You can release new versions of a class library without requiring 
  514.            users of the library to recompile their applications. 
  515.         -  You can make your C++ classes and objects accessible to programs 
  516.            written in other languages, and write C++ programs that use classes 
  517.            and objects created using other SOM-supported languages. 
  518.  
  519.       You can make classes and methods in existing C++ programs SOM-accessible 
  520.       without having to rewrite class and method definitions. Although SOM 
  521.       imposes some restrictions on C++ coding conventions, you should be able 
  522.       to convert most C++ programs for SOM support with minimal effort. 
  523.       Compiler options, #pragma directives, and other elements have been added 
  524.       to support DTS compilation. 
  525.  
  526.       For more details on DTS support, see The IBM System Object Model 
  527.  
  528.      Improved memory management, including user heaps 
  529.  
  530.       In addition to improving our memory allocation methods to increase speed 
  531.       and reduce memory waste, we have added functions that you can use to 
  532.       create and manage your own heaps of memory.  You can use these user heaps 
  533.       in addition to, or in place of, the regular runtime heap. 
  534.  
  535.       Debug versions of memory management functions are now available for user 
  536.       heaps and for tiled memory, as well as for regular memory.  There are 
  537.       also new heap-checking functions, similar to those provided by other 
  538.       C/C++ compilers, that you can use to debug your memory management 
  539.       problems. 
  540.  
  541.       The debugger has also added heap-checking capabilities. When your 
  542.       application stops, you can check the dynamic variables allocated by 
  543.       memory management functions on the heap. 
  544.  
  545.       Memory management is discussed in Managing Memory, and the new functions 
  546.       are described in the C Library Reference. For more details on the 
  547.       debugger, see the section on debugging in the User's Guide, or the online 
  548.       help for the debugger. 
  549.  
  550.      Support for POSIX locales and functions 
  551.  
  552.       A locale is a collection of data that encodes information about the 
  553.       cultural environment. Locales provide a way to internationalize your 
  554.       applications by defining the language, character sets, date and time 
  555.       format, and other culturally-determined elements. 
  556.  
  557.       VisualAge C++ has added support for locales based on the IEEE POSIX 
  558.       P1003.2 and X/Open Portability Guide standards for global locales and 
  559.       coded character set conversion. To support locales, we have added a 
  560.       number of new functions, header files, environment variables, and 
  561.       utilities.  The functions include a number of multibyte functions 
  562.       proposed for addition to the ANSI/ISO C standard. 
  563.  
  564.       For more information about locales and how to use them, see the 
  565.       Introduction to Locale. The new functions are described in the C Library 
  566.       Reference. 
  567.  
  568.      Template Resolution Improvements 
  569.  
  570.       We've added a new 32-bit linker, VisualAge C++ linker, to complement our 
  571.       32-bit compiler.  VisualAge C++ linker is faster than our previous 
  572.       linker, LINK386, and provides additional features such as: 
  573.  
  574.         -  Template resolution independent of the compiler ( meaning you no 
  575.            longer have to invoke the linker through icc when you use 
  576.            templates). 
  577.         -  Linker optimization options for improving resolution of function and 
  578.            member function calls.  These options can significantly reduce the 
  579.            size of your application files. 
  580.         -  Packing of debug information to reduce the size of your files and 
  581.            potentially improve debugger performance. 
  582.  
  583.       The VisualAge C++ linker syntax is consistent with that of LINK386 to 
  584.       make the transition easier.  It also supports most LINK386 options along 
  585.       with the new VisualAge C++ linker options. 
  586.  
  587.       For more information about templates, see Using Templates in C++ 
  588.       Programs. For more information about VisualAge C++ linker, see the 
  589.       section on Linking in the User's Guide. 
  590.  
  591.      Optimization Improvements 
  592.  
  593.       VisualAge C++ has a reputation for producing very fast executables. We've 
  594.       increased and enhanced the optimizations in our IBM VisualAge C++ Version 
  595.       3.0 for OS/2 compiler to further improve your program's performance. 
  596.  
  597.       We also realize that in some cases, the size of your executable files may 
  598.       be more critical than the speed they run at. For this reason, both the 
  599.       compiler and VisualAge C++ linker linker have implemented options that 
  600.       reduce the size of your code, while still providing some measure of 
  601.       performance improvement. For more information about optimization and the 
  602.       options that control it, see Optimizing Your Program in this book and the 
  603.       sections on compiling and linking in the User's Guide. 
  604.  
  605.  
  606. ΓòÉΓòÉΓòÉ 1.11.2. Summary of Changes to this Book ΓòÉΓòÉΓòÉ
  607.  
  608. Here is a summary of the changes discussed above which have been made to this 
  609. Book: 
  610.  
  611. Added 
  612.  
  613. Several chapters on new topics have been added: 
  614.  
  615.      Customizing the language and culture sensitive behavior of applications, 
  616.       in Introduction to Locale and in Building a Locale 
  617.  
  618.      Managing the memory of your application more efficiently, see Managing 
  619.       Memory 
  620.  
  621.      Creating and using language-independent objects, see The IBM System 
  622.       Object Model 
  623.  
  624.  Moved 
  625.  
  626.  One chapter and one appendix have been moved to other documents in the IBM 
  627.  VisualAge C++ for OS/2 library: 
  628.  
  629.      The chapter on compiling and linking your program, including using 
  630.       debugging and diagnostic options, has been moved to the User's Guide. 
  631.  
  632.      The appendix that dealt with solving common C problems has been moved to 
  633.       Frequently-Asked Questions. 
  634.  
  635.  Rewritten 
  636.  
  637.  Two chapters have been extensively re-written to improve clarity and reading 
  638.  ease. 
  639.  
  640.      Using compiler-generated templates in your programs, see Using Templates 
  641.       in C++ Programs. 
  642.  
  643.      How to use 16-bit code with the 32-bit code generated by VisualAge C++, 
  644.       see Calling between 32-Bit and 16-Bit Code. 
  645.  
  646.  
  647. ΓòÉΓòÉΓòÉ 1.12. C and C++ Language Standards and Portability ΓòÉΓòÉΓòÉ
  648.  
  649. The VisualAge C++ product is designed according to the specifications of the 
  650. American National Standard for Information Systems / International Standards 
  651. Organization - Programming Language C, ANSI/ISO 9899-1990[1992], as understood 
  652. and interpreted by IBM as of October 1993. Behavior that the ANSI C Standard 
  653. declares as implementation-defined is described in ANSI Notes on 
  654. Implementation-Defined Behavior. If you will be using VisualAge C++ to develop 
  655. code according to the American National Standards Institute (ANSI) standard, 
  656. you should also refer to the ANSI guidelines. If you will be developing code 
  657. according to the International Standards Organization (ISO) standard, refer to 
  658. the ISO guidelines. General information about writing portable C code is 
  659. included in the Portability Guide for IBM C, SC09-1405. 
  660.  
  661. VisualAge C++ also implements the Systems Application Architecture (SAA) C 
  662. Level 2 definition, which is a superset of the ANSI standard.  For more 
  663. information on the SAA C standard, see the Language Reference. If you will be 
  664. using VisualAge C++ to develop C applications to be compiled and run on other 
  665. Systems Application Architecture* (SAA*) systems, you should follow the SAA 
  666. standards as outlined in the SAA Common Programming Interface C Language 
  667. Reference - Level 2, SC09-1308. 
  668.  
  669. When following ANSI, ISO, or SAA standards, do not use the extensions specific 
  670. to VisualAge C++ compiler as described in the C Library Reference and the 
  671. Language Reference. 
  672.  
  673. At this time, there is no universal standard for the C++ language comparable to 
  674. C standards.  However, an ANSI committee is developing a C++ language standard. 
  675. Its September 17, 1992 working paper, Draft Proposed American National Standard 
  676. for Information Systems - Programming Language C++, X3J16/92-0060, was used as 
  677. a base document for developing the VisualAge C++ C++ compiler. The 
  678. VisualAge C++ C++ compiler will continue to change its design in accordance 
  679. with the ANSI standard as it evolves. If portability of your C++ programs is 
  680. important, isolate those parts of your code that use the Collection and User 
  681. Interface class libraries, which are specific to VisualAge C++ product. Then 
  682. you can easily remove or replace them when migrating your programs. 
  683.  
  684. If you will be using IBM VisualAge C++ for OS/2 for the development of 
  685. applications that will run only under the OS/2 operating system, you may want 
  686. to exploit the OS/2 services and APIs and the VisualAge C++ multithread 
  687. features. For details of multithread features available under VisualAge C++, 
  688. see Creating Multithread Programs). 
  689.  
  690.  
  691. ΓòÉΓòÉΓòÉ 2. How to Get Help ΓòÉΓòÉΓòÉ
  692.  
  693. There are three kinds of online information available to you while you are 
  694. using VisualAge C++: 
  695.  
  696.  Online documents 
  697.            These are complete documents, like the one you are reading now, 
  698.            presented online.  These documents contain detailed information on 
  699.            the different aspects of VisualAge C++. For your convenience, the 
  700.            online documents are presented in two formats: 
  701.  
  702.                Standard format.  See Getting Help Inside VisualAge C++ for 
  703.                 instructions on opening standard format documents from inside 
  704.                 VisualAge C++.  See Getting Help from the Command Line for 
  705.                 instructions on opening standard format documents from the 
  706.                 command line. The following documents are available in standard 
  707.                 format: 
  708.                   -  Read Me First! 
  709.                   -  Welcome to VisualAge C++ 
  710.                   -  User's Guide 
  711.                   -  Programming Guide 
  712.                   -  Visual Builder User's Guide 
  713.                   -  Visual Builder Parts Reference 
  714.                   -  Building VisualAge C++ Parts for Fun and Profit 
  715.                   -  Open Class Library User's Guide 
  716.                   -  Open Class Library Reference 
  717.                   -  Language Reference 
  718.                   -  C Library Reference 
  719.                   -  Editor Command Reference 
  720.  
  721.  
  722.                BookManager format.  See BookManager Books for details on how 
  723.                 to access online documents in this format. 
  724.  
  725.  Contextual help 
  726.            Contextual help is available throughout VisualAge C++.  This help 
  727.            tells you all about the elements that you see in the interface, 
  728.            including menus, entry fields, and pushbuttons. 
  729.  
  730.  How Do I help 
  731.            Many of the common tasks that you want to perform with VisualAge C++ 
  732.            are described in How Do I help.  The How Do I help for a task gives 
  733.            you step-by-step instructions for completing the task.  There is 
  734.            overall How Do I help for VisualAge C++, as well as individual task 
  735.            lists for each of its components. 
  736.  
  737.  
  738. ΓòÉΓòÉΓòÉ 2.1. Getting Help Inside VisualAge C++ ΓòÉΓòÉΓòÉ
  739.  
  740. All three kinds of help are available directly within the VisualAge C++ 
  741. interface: 
  742.  
  743.      To get general contextual help for the component of VisualAge C++ that 
  744.       you are using, press F1 anywhere in the window. 
  745.      To get contextual help on a particular menu, menu item, or button, 
  746.       highlight the element and press F1. 
  747.      To get access to all of the help information that is available to you in 
  748.       a particular window, click on Help in the menu bar at the top of the 
  749.       window.  This menu includes the following selections: 
  750.         -  Help Index, an alphabetical list of all of the help topics that are 
  751.            available from this window 
  752.         -  General Help, overall help for the window 
  753.         -  Using Help, general information about the help facility 
  754.         -  How Do I..., the How Do I help for the component 
  755.         -  Product Information, a dialog that shows the level of VisualAge C++ 
  756.            being used 
  757.      To get detailed information, open the Information folder in the 
  758.       VisualAge C++ folder.  In this folder you will find icons for a variety 
  759.       of online documents that describe, in detail, the different aspects of 
  760.       VisualAge C++.  To open a particular online document, double click on its 
  761.       icon. 
  762.  
  763.  
  764. ΓòÉΓòÉΓòÉ 2.2. Getting Help from the Command Line ΓòÉΓòÉΓòÉ
  765.  
  766. If you want, you can look at the online documents by issuing the view command. 
  767. The installation routine stores the online document files in the \IBMCPP\HELP 
  768. directory. To view the Language Reference, for example, make C:\IBMCPP\HELP 
  769. your current directory (substituting the drive where you installed 
  770. VisualAge C++ for C:) and enter the following command: 
  771.  
  772.      VIEW CPPLNG.INF
  773. If you want to get information on a specific topic, you can specify a word or a 
  774. series of words after the file name.  If the words appear in an entry in the 
  775. table of contents or the index, the online document is opened to the associated 
  776. section. For example, if you want to read the section on operator precedence in 
  777. the Language Reference, you can enter the following command: 
  778.  
  779.      VIEW CPPLNG.INF OPERATOR PRECEDENCE
  780.  
  781.  
  782. ΓòÉΓòÉΓòÉ 2.3. BookManager Books ΓòÉΓòÉΓòÉ
  783.  
  784. In addition to standard format, the online documents are also available in 
  785. BookManager format.  In this format they can be read using the BookManager 
  786. READ/2 product (program number 73F6023). VisualAge C++ comes complete with the 
  787. IBM Library Reader, which allows you to read BookManager books without having 
  788. to install the complete BookManager READ/2 product. Like the standard format, 
  789. the BookManager format features hypertext links and a search utility. 
  790.  
  791.  
  792. ΓòÉΓòÉΓòÉ 3. Setting Runtime Environment Variables ΓòÉΓòÉΓòÉ
  793.  
  794. This chapter discusses environment variables which compose the runtime of the 
  795. applications you build.  You need to be aware of them when you build the 
  796. application as they can affect the behaviour of your application and can lead 
  797. to unexpected results if not taken into account. 
  798.  
  799. This chapter discusses: 
  800.  
  801.      How to Set Environment Variables, and 
  802.  
  803.      Application Environment Variables 
  804.  
  805.  
  806. ΓòÉΓòÉΓòÉ 3.1. How to Set Environment Variables ΓòÉΓòÉΓòÉ
  807.  
  808. You can set the runtime environment for your application by using OS/2 
  809. environment variables. You can set most of them from the command line, in your 
  810. CONFIG.SYS file, in a command file using the SET command, or from within your 
  811. program using the putenv function. 
  812.  
  813. You can put an optional semicolon at the end of the commands that set the 
  814. environment variables so that you can later append values to the variables from 
  815. the command line. 
  816.  
  817. The functions that access these environment variables are not available when 
  818. you use the subsystem libraries. To access the environment variables when you 
  819. are using the subsystem libraries, you must use OS/2 APIs. See the online PM 
  820. Programming Reference for more information about OS/2 APIs. 
  821.  
  822. Some of the variables discussed in this chapter are also used at compile time. 
  823. The compiler environment variables are described in the User's Guide. For more 
  824. information on environment variables in general, see the OS/2 Master Help Index 
  825. or OS/2 Command Reference. 
  826.  
  827.  
  828. ΓòÉΓòÉΓòÉ 3.2. Application Environment Variables ΓòÉΓòÉΓòÉ
  829.  
  830. The following environment variables determine where your application will look 
  831. to locate files necessary to the execution of its tasks.  Files for such things 
  832. as command interpretation, runtime messages, and locale settings will all be 
  833. needed. If you do not make sure that the environment variables are correctly 
  834. set, your application may fail to find a file, or worse yet, find and use an 
  835. unintended file. 
  836.  
  837. The following environment variables are discussed: 
  838.  
  839.      COMSPEC 
  840.      DPATH 
  841.      LANG 
  842.      LC Environment Variables 
  843.      LIBPATH 
  844.      LOCPATH 
  845.      PATH 
  846.      TEMPMEM 
  847.      TMP 
  848.      TZ 
  849.  
  850.  
  851. ΓòÉΓòÉΓòÉ 3.2.1. COMSPEC ΓòÉΓòÉΓòÉ
  852.  
  853. The system function uses this variable to locate the command interpreter. When 
  854. the OS/2 operating system is installed, the installation program sets the 
  855. COMSPEC variable in the CONFIG.SYS file to the name and path of the command 
  856. interpreter. To change the COMSPEC variable, use the SET command in CONFIG.SYS. 
  857. For example: 
  858.  
  859.    SET COMSPEC=c:\mydir\mycmd.exe
  860.  
  861. sets the command interpreter as mycmd.exe in the c:\mydir directory. For more 
  862. information on the system function, refer to the C Library Reference. 
  863.  
  864.  
  865. ΓòÉΓòÉΓòÉ 3.2.2. DPATH ΓòÉΓòÉΓòÉ
  866.  
  867. The iconv function uses this environment variable to locate the tables built by 
  868. the genxlt utility. Also, when you run an executable program, unless you have 
  869. bound the runtime messages files to the executable file using the MSGBIND 
  870. utility, the runtime messages files must be either in your current directory or 
  871. in one of the directories specified by the DPATH variable. 
  872.  
  873. The DPATH variable can be set by using the SET command. 
  874.  
  875. For example, given the following DPATH value: 
  876.  
  877.    DPATH=c:\kevin;d:\michel
  878.  
  879. the program would search the current directory, and then the directories 
  880. c:\kevin and d:\michel, in that order. 
  881.  
  882. If when you installed VisualAge C++ you chose the option of having your 
  883. CONFIG.SYS file modified, the DPATH statement in your CONFIG.SYS file was 
  884. changed to: 
  885.  
  886.    SET DPATH=d:\IBMCPP\HELP;d:\IBMCPP;d:\IBMCPP\LOCALE;d:\IBMCPP\MACROS
  887.  
  888.  
  889. ΓòÉΓòÉΓòÉ 3.2.3. LANG ΓòÉΓòÉΓòÉ
  890.  
  891. The LANG environment variable specifies the default locale name for the locale 
  892. categories, when the LC_ALL environment variable is not defined and the locale 
  893. categories environment variable is not defined. 
  894.  
  895.  
  896. ΓòÉΓòÉΓòÉ 3.2.4. LC Environment Variables ΓòÉΓòÉΓòÉ
  897.  
  898. The following environment variables are used to specify the names of locale 
  899. categories: 
  900.  
  901.      LC_ALL 
  902.      LC_COLLATE 
  903.      LC_CTYPE 
  904.      LC_MESSAGES 
  905.      LC_MONETARY 
  906.      LC_NUMERIC 
  907.      LC_TIME 
  908.      LC_TOD 
  909.      LC_SYNTAX 
  910.  
  911.  Locale Source Files describes the locale categories that correspond to these 
  912.  environment variables. Customizing a Locale tells you how to use these 
  913.  environment variables to customize a locale. 
  914.  
  915.  
  916. ΓòÉΓòÉΓòÉ 3.2.5. LIBPATH ΓòÉΓòÉΓòÉ
  917.  
  918. The operating system searches the directories specified by this directive to 
  919. find all .DLL files required by the program. The LIBPATH is set at system 
  920. startup and cannot be reset dynamically. The library DLLs and any user DLLs 
  921. must be in one of the directories specified by the LIBPATH. 
  922.  
  923. This variable can only be specified in the CONFIG.SYS file. For example: 
  924.  
  925.    LIBPATH=.;c:\cmlib;c:\IBMCPP\DLL;
  926.  
  927. sets the DLL search path to the current directory, c:\cmlib, and c:\IBMCPP\DLL. 
  928. For more information on DLLs, see Building Dynamic Link Libraries. 
  929.  
  930. LIBPATH cannot be specified using the SET command. Also, unlike the PATH 
  931. environment variable, the operating system does not check the current directory 
  932. first by default. If you want the current directory checked first, you must 
  933. explicitly list it in the LIBPATH statement. 
  934.  
  935. LIBPATH can be useful in switching between conflicting versions of a tool. 
  936. Simply create an empty DLL directory somewhere in the LIBPATH and copy the 
  937. required DLLs into this directory to control version execution. 
  938.  
  939. Note:  While the LIBPATH variable itself cannot be reset without rebooting the 
  940. system, OS/2 Warp Version 3.0 provides a mechanism for you or an application to 
  941. extend the path variable. Applications can use DosSetExtLIBPATH to set the path 
  942. extension and DosQueryExtLIBPATH to query the current extension.  Parameters of 
  943. these functions tell the system whether the extension should go before or after 
  944. the LIBPATH. 
  945.  
  946. For more information on DosSetExtLIBPATH and DosQueryExtLIBPATH, see the OS/2 
  947. Warp Version 3.0 Control Program Guide and Reference. 
  948.  
  949.  
  950. ΓòÉΓòÉΓòÉ 3.2.6. LOCPATH ΓòÉΓòÉΓòÉ
  951.  
  952. The setlocale function uses this environment variable at run time to search for 
  953. locale information not in the current directory. 
  954.  
  955. If you chose to modify your CONFIG.SYS file at install time, your LOCPATH 
  956. statement in that file will look like: 
  957.  
  958.     SET LOCPATH=D:\IBMCPP\LOCALE
  959.  
  960.  
  961. ΓòÉΓòÉΓòÉ 3.2.7. PATH ΓòÉΓòÉΓòÉ
  962.  
  963. The system, exec, and _spawn functions use this environment variable to search 
  964. for .EXE and .CMD files not in the current directory. You can set it by using 
  965. the SET command from an OS/2 window or fullscreen session, or in a command 
  966. file. For example, 
  967.  
  968.    SET PATH=c:\IBMCPP\BIN;c:\IBMCPP\HELP, e:\ian;d:\steve
  969.  
  970. You can specify one or more directories with this variable. Given the above 
  971. example, the path searched would be the current directory and then the 
  972. directories c:\IBMCPP\BIN, c:\IBMCPP\HELP, e:\ian, and d:\steve. 
  973.  
  974. For further information on the functions that use PATH, refer to the C Library 
  975. Reference. 
  976.  
  977.  
  978. ΓòÉΓòÉΓòÉ 3.2.8. TEMPMEM ΓòÉΓòÉΓòÉ
  979.  
  980. Use this variable to control whether temporary files are created as memory 
  981. files or as disk files. It can be set using the SET command either in the 
  982. CONFIG.SYS file or on the command line. For example: 
  983.  
  984.    SET TEMPMEM=on
  985.  
  986. If the value specified is on (in upper-, lower-, or mixed case), and you 
  987. compile with the /Sv+ option, the temporary files will be created as memory 
  988. files. If TEMPMEM is set to any other value, the temporary files will be disk 
  989. files. If you do not compile with /Sv+, memory file support is not available 
  990. and your program will end with an error when it tries to open a memory file. 
  991.  
  992. If TEMPMEM will be used by a program, you must set its value in the environment 
  993. before the program starts.  You cannot set it from within the program. 
  994.  
  995.  
  996. ΓòÉΓòÉΓòÉ 3.2.9. TMP ΓòÉΓòÉΓòÉ
  997.  
  998. The directory specified by this variable holds temporary files, such as those 
  999. created using the tmpfile If any of these values is not valid, function. 
  1000. (tmpfile is described in the C Library Reference.) You must set the TMP 
  1001. variable to use the VisualAge C++ compiler. 
  1002.  
  1003. Set the TMP variable with the SET command either in the CONFIG.SYS file or on 
  1004. the command line. For example: 
  1005.  
  1006.    SET TMP=c:\IBMCPP\TMP
  1007.  
  1008. You can specify only one directory using the TMP variable. 
  1009.  
  1010. Note:  The TMP environment variable may be set by applications other than 
  1011. VisualAge C++.  If another application changes TMP to specify a different 
  1012. directory, this directory will be used by VisualAge C++ to hold temporary 
  1013. files. 
  1014.  
  1015.  
  1016. ΓòÉΓòÉΓòÉ 3.2.10. TZ ΓòÉΓòÉΓòÉ
  1017.  
  1018. This variable is used to describe the timezone information that the locale will 
  1019. use.  To set TZ, use the SET which has the following format: 
  1020.  
  1021. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1022. Γöé                                        Γöé
  1023. Γöé >>ΓöÇΓöÇSETΓöÇΓöÇTZΓöÇΓöÇ=ΓöÇΓöÇSSSΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ> Γöé
  1024. Γöé            ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇhΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ             Γöé
  1025. Γöé             Γö£ΓöÇ+ΓöÇΓöñ   ΓööΓöÇ:ΓöÇΓöÇmΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ              Γöé
  1026. Γöé             ΓööΓöÇΓö┤ΓöÇΓöÿ       ΓööΓöÇ:ΓöÇΓöÇsΓöÇΓöÿ               Γöé
  1027. Γöé                                        Γöé
  1028. Γöé >ΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  1029. Γöé   ΓööΓöÇDDDΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ                Γöé
  1030. Γöé      ΓööΓöÇ,sm,sw,sd,st,em,ew,ed,et,shiftΓöÇΓöÿ                 Γöé
  1031. Γöé                                        Γöé
  1032. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1033.  
  1034. The values for the TZ variable are defined below. The default values given are 
  1035. for the built-in "C" locale defined by the ANSI C standard. 
  1036.  
  1037. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1038. Γöé Table 1. TZ Environment Variable Parameters                  Γöé
  1039. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1040. Γöé VARIABLE   Γöé DESCRIPTION                 Γöé DEFAULT VALUE  Γöé
  1041. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1042. Γöé SSS      Γöé Standard-timezone identifier.  It must be  Γöé EST       Γöé
  1043. Γöé        Γöé three characters, must begin with a letter, Γöé         Γöé
  1044. Γöé        Γöé and can contain spaces.           Γöé         Γöé
  1045. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1046. Γöé h, m, s    Γöé The variable h specifies the difference (in Γöé 5        Γöé
  1047. Γöé        Γöé hours) between the standard time zone and  Γöé         Γöé
  1048. Γöé        Γöé coordinated universal time (CUT), formerly  Γöé         Γöé
  1049. Γöé        Γöé Greenwich mean time (GMT).  You can     Γöé         Γöé
  1050. Γöé        Γöé optionally use m to specify minutes after  Γöé         Γöé
  1051. Γöé        Γöé the hour, and s to specify seconds after   Γöé         Γöé
  1052. Γöé        Γöé the minute.  A positive number denotes time Γöé         Γöé
  1053. Γöé        Γöé zones west of the Greenwich meridian; a   Γöé         Γöé
  1054. Γöé        Γöé negative number denotes time zones east of  Γöé         Γöé
  1055. Γöé        Γöé the Greenwich meridian.  The number must be Γöé         Γöé
  1056. Γöé        Γöé an integer value.              Γöé         Γöé
  1057. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1058. Γöé DDD      Γöé Daylight saving time (DST) zone identifier. Γöé EDT       Γöé
  1059. Γöé        Γöé It must be three characters, must begin   Γöé         Γöé
  1060. Γöé        Γöé with a letter, and can contain spaces.    Γöé         Γöé
  1061. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1062. Γöé sm      Γöé Starting month (1 to 12) of DST.       Γöé 4        Γöé
  1063. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1064. Γöé sw      Γöé Starting week (-4 to 4) of DST.  Use nega-  Γöé 1        Γöé
  1065. Γöé        Γöé tive numbers to count back from the last   Γöé         Γöé
  1066. Γöé        Γöé week of the month (-1) and positive numbers Γöé         Γöé
  1067. Γöé        Γöé to count from the first week (1).      Γöé         Γöé
  1068. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1069. Γöé sd      Γöé Starting day of DST.             Γöé 0        Γöé
  1070. Γöé        Γöé 0 to 6 if sw != 0              Γöé         Γöé
  1071. Γöé        Γöé 1 to 31 if sw = 0              Γöé         Γöé
  1072. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1073. Γöé st      Γöé Starting time (in seconds) of DST.      Γöé 3600       Γöé
  1074. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1075. Γöé em      Γöé Ending month (1 to 12) of DST.        Γöé 10        Γöé
  1076. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1077. Γöé ew      Γöé Ending week (-4 to 4) of DST.  Use negative Γöé -1        Γöé
  1078. Γöé        Γöé numbers to count back from the last week of Γöé         Γöé
  1079. Γöé        Γöé the month (-1) and positive numbers to    Γöé         Γöé
  1080. Γöé        Γöé count from the first week (1).        Γöé         Γöé
  1081. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1082. Γöé ed      Γöé Ending day of DST.              Γöé 0        Γöé
  1083. Γöé        Γöé 0 to 6 if ew != 0              Γöé         Γöé
  1084. Γöé        Γöé 1 to 31 if ew = 0              Γöé         Γöé
  1085. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1086. Γöé et      Γöé Ending time of DST (in seconds).       Γöé 7200       Γöé
  1087. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1088. Γöé shift     Γöé Amount of time change (in seconds).     Γöé 3600       Γöé
  1089. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1090.  
  1091. For example: 
  1092.  
  1093.    SET TZ=CST6CDT
  1094.  
  1095. sets the standard time zone to CST, the daylight saving time zone to CDT, and 
  1096. sets a difference of 6 hours between CST and CUT. It does not set any values 
  1097. for the start and end date of daylight saving time or the time shifted. 
  1098.  
  1099. When TZ is not present, the default is EST5EDT, the "C" locale value. When only 
  1100. the standard time zone is specified, the default value of n (difference in 
  1101. hours from GMT) is 0 instead of 5. 
  1102.  
  1103. If you give values for any of sm, sw, sd, st, em, ew, ed, et, or shift, you 
  1104. must give values for all of them. the entire statement is considered not valid, 
  1105. and the time zone information is not changed. 
  1106.  
  1107. The value of TZ can be accessed and changed by the tzset function. For more 
  1108. information on tzset, see the C Library Reference. 
  1109.  
  1110.  
  1111. ΓòÉΓòÉΓòÉ 4. Running Your Program ΓòÉΓòÉΓòÉ
  1112.  
  1113. This chapter describes common tasks associated with the running of your 
  1114. application. These include: 
  1115.  
  1116.      Declaring Arguments to main. 
  1117.      Passing Data to a Program 
  1118.      Returning Values from main 
  1119.      Expanding Global File-Name Arguments, and 
  1120.      Redirecting Standard Streams. 
  1121.  
  1122.  
  1123. ΓòÉΓòÉΓòÉ 4.1. Choice of User Interfaces for Running an Application ΓòÉΓòÉΓòÉ
  1124.  
  1125. You can compile and link your files to create an executable unit through any 
  1126. one of three user interfaces: 
  1127.  
  1128.      using the WorkFrame environment to create a project, 
  1129.      using the WorkPlace Shell interface to create an object, or simply, 
  1130.      using the command line to create an executable file. 
  1131.  
  1132.  Directions on how to create and run these elements through the various 
  1133.  interfaces is discussed in the User's Guide. 
  1134.  
  1135.  Note:  The OS/2 operating system uses the PATH environment variable to find 
  1136.  executable files. You can run a program from any directory, as long as the 
  1137.  executable program is either: 
  1138.  
  1139.      In your current working directory 
  1140.      In one of the directories specified by the PATH environment variable 
  1141.      Specified on the command line with a fully qualified path name 
  1142.  If more than one of these directories contains an executable file with the 
  1143.  same name, the first executable file that is found on the path is run. 
  1144.  
  1145.  The run time messages files (CPPO.MSG for the C run time) must also be either 
  1146.  in your current working directory or in one of the directories specified by 
  1147.  the DPATH environment variable, unless you have bound the messages to your 
  1148.  executable file using the MSGBIND utility. The utility is described in the 
  1149.  User's Guide. 
  1150.  
  1151.  You can the system function in the VisualAge C++ runtime library to run other 
  1152.  programs and OS/2 commands from within a program. See the C Library Reference 
  1153.  for more information on the system function. 
  1154.  
  1155.  
  1156. ΓòÉΓòÉΓòÉ 4.2. Declaring Arguments to main. ΓòÉΓòÉΓòÉ
  1157.  
  1158. To set up your program to receive data from the command line, the project 
  1159. parameter page, or through object conversations, declare arguments to main as: 
  1160.  
  1161.    int main(int argc, char **argv, char **envp)
  1162.  
  1163. Note:  In the ANSI definition of C, there are only two possible ways to define 
  1164. main: 
  1165.  
  1166.    int main(int argc, char **argv) { ... }
  1167.  
  1168. and 
  1169.  
  1170.    int main(void) { ... }
  1171.  
  1172. VisualAge C++ supports this definition as well as the ANSI-conforming 
  1173. definitions. 
  1174.  
  1175. By declaring these variables as arguments to main, you make them available as 
  1176. local variables. You need not declare all three arguments, but if you do, they 
  1177. must be in the order shown. To use the envp argument, you must declare argc and 
  1178. argv, even if you do not use them. 
  1179.  
  1180. Each OS/2 command-line argument, regardless of its data type, is stored as a 
  1181. null-terminated string in an array of strings. The command is passed to the 
  1182. program as the argv array of strings. The number of arguments appearing at the 
  1183. command prompt is passed as the integer variable argc. 
  1184.  
  1185. The first argument of any command is the name of the program to run. The 
  1186. program name is the first string stored at argv[0]. Because you must always 
  1187. give a program name, the value of argc is at least 1. 
  1188.  
  1189. The runtime initialization code stores the first argument after the program 
  1190. name at argv[1], the second at argv[2], and so on through the end of the 
  1191. arguments. The total number of arguments, including the program name, is stored 
  1192. in argc. The argv[argc] is set to a NULL pointer. 
  1193.  
  1194. You can also access the values of the individual arguments from within the 
  1195. program using argv.  For example, to access the value of the last argument, use 
  1196. the expression argv[argc-1]. 
  1197.  
  1198. The third argument passed to main, envp, is a pointer to the environment table. 
  1199. You can use this pointer to access the value of the environment settings. (Note 
  1200. that the getenv function accomplishes the same task and is easier to use.) The 
  1201. envp argument is not available when you use the subsystem libraries. 
  1202.  
  1203. The putenv routine may change the location of the environment table in storage, 
  1204. depending on storage requirements; because of this, the value given to envp 
  1205. when you start to run your program might not be correct throughout the running 
  1206. of the program. The putenv and getenv functions access the environment table 
  1207. correctly, even when its location changes. For more information about putenv 
  1208. and getenv, see the C Library Reference. 
  1209.  
  1210.  
  1211. ΓòÉΓòÉΓòÉ 4.3. Passing Data to a Program ΓòÉΓòÉΓòÉ
  1212.  
  1213. To pass data to your program by way of the command line, give one or more 
  1214. arguments after the program name. Each argument must be separated from other 
  1215. arguments by one or more spaces or tab characters. You must enclose in double 
  1216. quotation marks any arguments that include spaces, tab characters, double 
  1217. quotation marks, or redirection characters. For example: 
  1218.  
  1219.    hello 42 "de f" 16
  1220.  
  1221. This command runs the program named hello.exe and passes three arguments: 42, 
  1222. de f, and 16. The combined length of all arguments in the command (including 
  1223. the program name) cannot exceed the OS/2 maximum length for a command. For 
  1224. information on the maximum allowable command length, see the OS/2 Commmand 
  1225. Reference. 
  1226.  
  1227. You can also use escape sequences within arguments. For example, to represent 
  1228. double quotation marks, precede the double quotation character with a 
  1229. backslash. To represent a backslash, use two backslashes in a row. For example, 
  1230. when you invoke the hello.exe program from the preceding example with this 
  1231. command: 
  1232.  
  1233.    hello "ABC\"" \"HELLO\\
  1234.  
  1235. the arguments passed to the program are ABC" and "HELLO\. 
  1236.  
  1237.  
  1238. ΓòÉΓòÉΓòÉ 4.4. Returning Values from main ΓòÉΓòÉΓòÉ
  1239.  
  1240. The function main, like any other C or C++ function, returns a value. Its 
  1241. return value is an int value that is passed to the operating system as the 
  1242. return code of the program that has been run. 
  1243.  
  1244. You can check this return code with the IF ERRORLEVEL command in OS/2 batch 
  1245. files. For more information on the IF ERRORLEVEL command, see the OS/2 online 
  1246. Command Reference 
  1247.  
  1248. To cause main to return a specific value to the operating system, use the 
  1249. return statement or the exit function to specify the value to be returned. The 
  1250. statement 
  1251.  
  1252.    return 6;
  1253.  
  1254. returns the value 6. For instance, in a REXX program the return value is 
  1255. returned in the RC variable. 
  1256.  
  1257.    /* RET6.C */
  1258.    int main(void) {return 6;}
  1259.  
  1260.    /* Checkret.CMD */
  1261.    'RET6'
  1262.    say 'RC='rc
  1263.  
  1264. will output RC=6 when run. 
  1265.  
  1266. If you do not use either method, the return code is undefined. 
  1267.  
  1268. For more information about main, see the Language Reference. 
  1269.  
  1270.  
  1271. ΓòÉΓòÉΓòÉ 4.5. Expanding Global File-Name Arguments ΓòÉΓòÉΓòÉ
  1272.  
  1273. You can expand global file-name arguments from the OS/2 command line using the 
  1274. OS/2 global file-name characters (or wildcard characters), the question mark 
  1275. (?), and asterisk (*), to specify the file-name and path-name arguments at the 
  1276. command prompt. To use them, you must link your program with the special 
  1277. routine contained in SETARGV.OBJ. This object file is included with the 
  1278. libraries in the LIB directory under the main VisualAge C++ directory. If you 
  1279. do not link your program with SETARGV.OBJ, the compiler treats the characters 
  1280. literally. 
  1281.  
  1282. SETARGV.OBJ expands the global file-name characters in the same manner that the 
  1283. OS/2 operating system does. (See the OS/2 Master Help Index for more 
  1284. information.) For example, when you link hello.obj with SETARGV.OBJ: 
  1285.  
  1286.    ILINK /NOE hello SETARGV;
  1287.  
  1288. and run the resulting executable module hello.exe with this command: 
  1289.  
  1290.    hello *.INC ABC? "XYZ?"
  1291.  
  1292. the SETARGV function expands the global file-name characters and causes all 
  1293. file names with the extension .INC in the current working directory to be 
  1294. passed as arguments to the hello program.  Similarly, all file names beginning 
  1295. with ABC followed by any one character are passed as arguments. The file names 
  1296. are sorted in lexical order. 
  1297.  
  1298. If the SETARGV function finds no matches for the global file-name arguments, 
  1299. for example, if no files have the extension .INC, the argument is passed 
  1300. literally. 
  1301.  
  1302. Because the "XYZ?" argument is enclosed in quotation marks, the expansion of 
  1303. the global file-name character is suppressed, and the argument is passed 
  1304. literally as XYZ?. 
  1305.  
  1306. Alternatively, if you use access your executables through the project interface 
  1307. and you frequently use global file-name expansion, you can place the 
  1308. SETARGV.OBJ routine in the standard libraries you use.  Then the routine is 
  1309. automatically linked with your program. 
  1310.  
  1311. Use the ILIB utility to delete the module named SETUPARG from the library (the 
  1312. module name is the same in all VisualAge C++ libraries), and  add the SETARGV 
  1313. module. When you replace SETUPARG with SETARGV, global file-name expansions are 
  1314. performed automatically on command-line arguments. 
  1315.  
  1316. For more information on the ILIB utility, see the User's Guide. 
  1317.  
  1318.  
  1319. ΓòÉΓòÉΓòÉ 4.6. Redirecting Standard Streams ΓòÉΓòÉΓòÉ
  1320.  
  1321. A C or C++ program has standard streams associated with it. You need not open 
  1322. them; they are automatically set up by the runtime environment when you include 
  1323. <stdio.h>. The three standard streams are: 
  1324.  
  1325.  stdin   The input device from which your program normally retrieves its data. 
  1326.          For example, the library function getchar uses stdin. 
  1327.  
  1328.  stdout  The output device to which your program normally directs its output. 
  1329.          For example, the library function printf uses stdout. 
  1330.  
  1331.  stderr  The output device to which your program directs its diagnostic 
  1332.          messages. 
  1333.  
  1334.  The streams stdprn and stdaux are reserved for use by the OS/2 operating 
  1335.  system and are not supported by VisualAge C++ compiler. 
  1336.  
  1337.  On input and output operations requiring a file pointer, you can use stdin, 
  1338.  stdout, or stderr in the same manner as you would a regular file pointer. 
  1339.  
  1340.  The Presentation Manager (PM) interface uses the stdout and stderr streams 
  1341.  somewhat differently than non-Presentation Manager programs.  Strings written 
  1342.  to stdout or stderr do not show up on the screen unless redirected.  For more 
  1343.  information on stream behaviour under Presentation Manager, see I/O 
  1344.  Considerations When You Use Presentation Manager. 
  1345.  
  1346.  When a C++ program uses the I/O Stream classes, the following predefined 
  1347.  streams are also provided in addition to the standard streams: 
  1348.  
  1349.  cin     The standard input stream. 
  1350.  
  1351.  cout    The standard output stream. 
  1352.  
  1353.  cerr    The standard error stream. Output to this stream is unit-buffered. 
  1354.          Characters sent to this stream are flushed after each insertion 
  1355.          operation. 
  1356.  
  1357.  clog    Also the standard error stream. Output to this stream is fully 
  1358.          buffered. 
  1359.  
  1360.  The cin stream is an istream_withassign object, and the other three streams 
  1361.  are ostream_withassign objects. These streams and the classes they belong to 
  1362.  are described in detail in the Open Class Library Reference. 
  1363.  
  1364.  There may be times when you want to redirect a standard stream to a file.  The 
  1365.  following sections describe methods you can use for C and C++ programs. 
  1366.  
  1367.  Redirection from within a Program 
  1368.  
  1369.  To redirect C standard streams to a file from within your program, use the 
  1370.  freopen library function.  For example, to redirect your output to a file 
  1371.  called pia.out instead of stdout, code the following statement in your 
  1372.  program: 
  1373.  
  1374.      freopen("pia.out", "w", stdout);
  1375.  
  1376.  For more information on freopen, refer to the C Library Reference. 
  1377.  
  1378.  You can reassign a C++ standard stream to another istream (cin only) or 
  1379.  ostream object, or to a streambuf object, using the operator=.  For example, 
  1380.  to redirect your output to a file called michael.out, create michael.out as an 
  1381.  ostream object, and assign cout to it: 
  1382.  
  1383.      #include <fstream.h>
  1384.  
  1385.      int main(void)
  1386.      {
  1387.         cout << "This is going to the standard output stream" << endl;
  1388.  
  1389.         ofstream outfile("michael.out");
  1390.         cout = outfile;
  1391.         cout << "This is going to michael.out file" << endl;
  1392.  
  1393.         return 0;
  1394.      }
  1395.  
  1396.  You can also assign cout to outfile.rdbuf() to perform the same redirection. 
  1397.  
  1398.  For more information on using C++ standard streams, see the Open Class Library 
  1399.  Reference. 
  1400.  
  1401.  Redirection from the Command Line 
  1402.  
  1403.  To redirect a C or C++ standard stream to a file from the command line, use 
  1404.  the standard OS/2 redirection symbols. 
  1405.  
  1406.  For example, to run the program bill.exe, which has two required parameters 
  1407.  XYZ and 123, and redirect the output from stdout to a file called bill.out, 
  1408.  you would use the following command: 
  1409.  
  1410.      bill XYZ 123 > bill.out
  1411.  
  1412.  You can also use the OS/2 file handles to redirect one standard stream to 
  1413.  another.  For example, to redirect stderr to stdout, you would use the 
  1414.  command: 
  1415.  
  1416.      2 > &1
  1417.  
  1418.  You cannot use redirection from the command line for memory files. 
  1419.  
  1420.  Refer to the OS/2 online Master Help Index for more information on redirection 
  1421.  symbols. 
  1422.  
  1423.  
  1424. ΓòÉΓòÉΓòÉ 5. Performing I/O Using Standard Streams ΓòÉΓòÉΓòÉ
  1425.  
  1426. This chapter describes input and output methods for the VisualAge C++ compiler: 
  1427.  
  1428.      Using Standard Streams 
  1429.      Stream Processing 
  1430.      Memory File Input/Output 
  1431.      Buffering 
  1432.      Opening Streams Using Data Definition Names 
  1433.      Precedence of File Characteristics 
  1434.      Closing Files 
  1435.      Input/Output Restrictions 
  1436.      I/O Considerations When You Use Presentation Manager 
  1437.  
  1438.  Note that record level I/O is not supported. 
  1439.  
  1440.  
  1441. ΓòÉΓòÉΓòÉ 5.1. Using Standard Streams ΓòÉΓòÉΓòÉ
  1442.  
  1443. Three standard streams are associated with the C language, stdin, stdout, and 
  1444. stderr. In C++, when you use the I/O Stream Library, there are four additional 
  1445. C++ standard streams, cin, cout, cerr, and clog. All of the standard streams 
  1446. are described in Redirecting Standard Streams. 
  1447.  
  1448. An OS/2 file handle is associated with each of the streams as follows: 
  1449.  
  1450. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  1451. Γöé FILE    Γöé C STREAM    Γöé C++ STREAM   Γöé
  1452. Γöé HANDLE   Γöé        Γöé        Γöé
  1453. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1454. Γöé 0      Γöé stdin     Γöé cin      Γöé
  1455. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1456. Γöé 1      Γöé stdout     Γöé cout      Γöé
  1457. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  1458. Γöé 2      Γöé stderr     Γöé cerr, clog   Γöé
  1459. Γöé       Γöé        Γöé        Γöé
  1460. Γöé       Γöé        Γöé NOTE:  Both  Γöé
  1461. Γöé       Γöé        Γöé cerr and clog Γöé
  1462. Γöé       Γöé        Γöé are standard  Γöé
  1463. Γöé       Γöé        Γöé error     Γöé
  1464. Γöé       Γöé        Γöé streams; cerr Γöé
  1465. Γöé       Γöé        Γöé is unit buf-  Γöé
  1466. Γöé       Γöé        Γöé fered and   Γöé
  1467. Γöé       Γöé        Γöé clog is fully Γöé
  1468. Γöé       Γöé        Γöé buffered.   Γöé
  1469. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  1470.  
  1471. The file handle and stream are not equivalent. There may situations where a 
  1472. file handle is associated with a different stream, for example, where file 
  1473. handle 2 is associated with a stream other than stderr, cerr, or clog. Do not 
  1474. code your program in so that it is dependent on the association between the 
  1475. stream and the file handle. 
  1476.  
  1477. The standard streams are not available when you are using the subsystem 
  1478. libraries. 
  1479.  
  1480. For information on I/O streams when using Presentation Manager, see I/O 
  1481. Considerations When You Use Presentation Manager. 
  1482.  
  1483. The streams stdprn and stdaux are reserved for use by the OS/2 operating system 
  1484. and are not supported by VisualAge C++. 
  1485.  
  1486. Note: 
  1487.  
  1488.    1. The C++ streams do not support the use of data definition names 
  1489.       (ddnames). 
  1490.  
  1491.    2. Record level I/O is not supported. 
  1492.  
  1493.  See the Open Class Library Reference for more information about the C++ 
  1494.  streams. 
  1495.  
  1496.  
  1497. ΓòÉΓòÉΓòÉ 5.2. Stream Processing ΓòÉΓòÉΓòÉ
  1498.  
  1499. Input and output are mapped into logical data streams, either text or binary. 
  1500. Streams present a consistent view of file contents, independent of the 
  1501. underlying file system. 
  1502.  
  1503.  
  1504. ΓòÉΓòÉΓòÉ 5.2.1. Text Streams ΓòÉΓòÉΓòÉ
  1505.  
  1506. Text streams contain printable characters and control characters organized into 
  1507. lines. Each line consists of zero or more characters and ends with a new-line 
  1508. character (\n). A new-line character is not automatically appended to the end 
  1509. of the file. 
  1510.  
  1511. The VisualAge C++ compiler may add, alter, or ignore some new-line characters 
  1512. during input or output so that they conform to the conventions for representing 
  1513. text in an OS/2 environment. Thus, there may not be a one-to-one correspondence 
  1514. between the characters in a stream and those in the external representation. 
  1515. See page Differences between Storing Data as a Text or Binary Stream for an 
  1516. example of the difference in representations. 
  1517.  
  1518. Data read from a text stream is equal to the data that was written if it 
  1519. consists only of printable characters and the horizontal tab, new-line, 
  1520. vertical tab, and form-feed control characters. 
  1521.  
  1522. On output, each new-line character is translated to a carriage-return 
  1523. character, followed by a line-feed character. On input, a carriage-return 
  1524. character followed by a line-feed character, or a line-feed character alone is 
  1525. converted to a new-line character. 
  1526.  
  1527. If the last operation on the stream is a read operation, fflush discards the 
  1528. unread portion of the buffer. If the last operation on the stream is a write 
  1529. operation, fflush writes out the contents of the buffer. In either case, fflush 
  1530. clears the buffer. 
  1531.  
  1532. The ftell, fseek, fgetpos, fsetpos, and rewind functions cannot be used to get 
  1533. or change the file position within character devices or OS/2 pipes. 
  1534.  
  1535. The C standard streams are always in text mode at the start of your program. 
  1536. You can change the mode of a standard stream from text to binary, without 
  1537. redirecting the stream, by using the freopen function with no file name 
  1538. specified. For example: 
  1539.  
  1540.    fp = freopen("", "rb", stdin);
  1541.  
  1542. You can use the same method to change the mode from binary back to text. You 
  1543. cannot change the mode of a stream to anything other than text or binary, nor 
  1544. can you change the file type to something other than disk. No other parameters 
  1545. are allowed. Note that this method is included in the SAA C definition, but not 
  1546. in the ANSI C standard. 
  1547.  
  1548.  
  1549. ΓòÉΓòÉΓòÉ 5.2.1.1. Control-Z Character in Text Streams ΓòÉΓòÉΓòÉ
  1550.  
  1551. When a text stream is connected to a character device, such as the keyboard or 
  1552. an OS/2 pipe, the Ctrl-Z (\x1a) character is treated as an end-of-file 
  1553. indicator, regardless of where it appears in the stream. 
  1554.  
  1555. If Ctrl-Z is the last character in a file, it is discarded when read. 
  1556. Similarly, when a file ending with a Ctrl-Z character is opened in append or 
  1557. update mode, the Ctrl-Z is discarded. Programs compiled by the VisualAge C++ 
  1558. compiler do not automatically have a Ctrl-Z character appended to the end of 
  1559. the file when the file is closed. If you require a Ctrl-Z character at the end 
  1560. of your text files, you must write it out yourself. 
  1561.  
  1562. This treatment of the Ctrl-Z character applies to text streams only.  In binary 
  1563. streams, it is treated like any other character. 
  1564.  
  1565.  
  1566. ΓòÉΓòÉΓòÉ 5.2.2. Binary Streams ΓòÉΓòÉΓòÉ
  1567.  
  1568. A binary stream is a sequence of characters or data. The data is not altered on 
  1569. input or output, so the data read from a binary stream is equal to the data 
  1570. that was written. 
  1571.  
  1572. If the last operation on the stream is a read operation, fflush discards the 
  1573. unread portion of the buffer. If the last operation on the stream is a write 
  1574. operation, fflush writes out the contents of the buffer. In either case, fflush 
  1575. clears the buffer. 
  1576.  
  1577.  
  1578. ΓòÉΓòÉΓòÉ 5.2.3. Differences between Storing Data as a Text or Binary Stream ΓòÉΓòÉΓòÉ
  1579.  
  1580. If two streams are opened, one as a binary stream and the other as a text 
  1581. stream, and the same information is written to both, the contents of the 
  1582. streams may differ. The following example shows two streams of different types 
  1583. and the hexadecimal values of the resulting files.  The values show that the 
  1584. data is stored differently for each file. 
  1585.  
  1586.  
  1587. Differences between Binary and Text Streams
  1588.  
  1589. #include <stdio.h>
  1590.  
  1591. int main(void)
  1592. {
  1593.     FILE *fp1, *fp2;
  1594.     char lineBin[15], lineTxt[15];
  1595.     int x;
  1596.  
  1597.     fp1 = fopen("script.bin","wb");
  1598.     fprintf(fp1,"hello world\n");
  1599.  
  1600.     fp2 = fopen("script.txt","w");
  1601.     fprintf(fp2,"hello world\n");
  1602.  
  1603.     fclose(fp1);
  1604.     fclose(fp2);
  1605.  
  1606.     fp1 = fopen("script.bin","rb");
  1607.  
  1608.     /* opening the text file as binary to suppress
  1609.     the conversion of internal data  */
  1610.     fp2 = fopen("script.txt","rb");
  1611.  
  1612.     fgets(lineBin, 15, fp1);
  1613.     fgets(lineTxt, 15, fp2);
  1614.  
  1615.     printf("Hex value of binary file = ");
  1616.     for (x=0; lineBin[x]; x++)
  1617.         printf("%.2x", (int)(lineBin[x]) );
  1618.  
  1619.     printf("\nHex value of text file   = ");
  1620.     for (x=0; lineTxt[x]; x++)
  1621.         printf("%.2x", (int)(lineTxt[x]) );
  1622.  
  1623.     printf("\n");
  1624.  
  1625.     fclose(fp1);
  1626.     fclose(fp2);
  1627.  
  1628.     /* The expected output is:
  1629.  
  1630.        Hex value of binary file = 68656c6c6f20776f726c640a
  1631.        Hex value of text file   = 68656c6c6f20776f726c640d0a  */
  1632. }
  1633.  
  1634. As the hexadecimal values of the file contents show in the binary stream 
  1635. (script.bin), the new-line character is converted to a line feed (\0a), while 
  1636. in the text stream (script.txt), the new line is converted to a carriage-return 
  1637. line feed (\0d0a). 
  1638.  
  1639.  
  1640. ΓòÉΓòÉΓòÉ 5.3. Memory File Input/Output ΓòÉΓòÉΓòÉ
  1641.  
  1642. When you compile with the /Sv+ option, VisualAge C++ compiler supports files 
  1643. known as memory files. They differ from the other file types only in that they 
  1644. are temporary files that reside in memory. You can write to and read from a 
  1645. memory file just as you do with a disk file. 
  1646.  
  1647. Using memory files can speed up the execution of your program because, under 
  1648. normal circumstances, there is no disk I/O when your program accesses these 
  1649. files. However, if your program is running in an environment where the 
  1650. operating system is paging, you might not get faster execution when using 
  1651. memory files. This loss of speed is most likely to be true if your memory files 
  1652. are large. 
  1653.  
  1654. You can create a memory file in two ways: 
  1655.  
  1656.      By specifying type=memory directly in your source code. For example 
  1657.  
  1658.                stream = fopen("memfile.txt", "w, type=memory");
  1659.  
  1660.      By using the ddname in the fopen call and the SET command to specify the 
  1661.       file you want your program to open. 
  1662.  
  1663.                stream=fopen("DD:MEMFILE", "w");
  1664.  
  1665.       Before you run your program, use the SET command: 
  1666.  
  1667.                SET DD:MEMFILE=memfile.txt, memory(y)
  1668.  
  1669.       The SET DD: statement specifies MEMFILE as a data definition name 
  1670.       (ddname). 
  1671.  
  1672.       Note: 
  1673.         1. You must specify the /Sh+ compiler option to use ddnames. 
  1674.  
  1675.         2. ddnames are not supported for use with C++ standard streams. 
  1676.  
  1677.  Once a memory file has been created, it can be accessed by the module that 
  1678.  created it as well as by any other function within the same process. The 
  1679.  memory file remains accessible until the file is removed by the remove 
  1680.  function or until the program has terminated. 
  1681.  
  1682.  A call to fopen that tries to open a file with the same name as an existing 
  1683.  memory file accesses the memory file, even if you do not specify type=memory 
  1684.  in the fopen call. 
  1685.  
  1686.  When using fopen to open a memory file in write or append mode, you must 
  1687.  ensure that the file is not already open. 
  1688.  
  1689.  
  1690. ΓòÉΓòÉΓòÉ 5.3.1. Memory File Restrictions and Considerations ΓòÉΓòÉΓòÉ
  1691.  
  1692.      You must specify the /Sv+ option to use memory files. 
  1693.  
  1694.      Memory files are private to the process that created them. Redirection to 
  1695.       memory files from the command line is not supported, and they cannot be 
  1696.       shared with any other process, including child processes. Also, memory 
  1697.       files cannot be shared through the system function. 
  1698.  
  1699.      Memory files do not undergo any conversion of the new-line character. 
  1700.       Data is not altered on input or output. 
  1701.  
  1702.      Memory files are unbuffered, and the blksize attribute is ignored. No 
  1703.       validation is performed for the path or file name used. 
  1704.  
  1705.      Memory file names are case sensitive. For example, the file a.a is not 
  1706.       the same memory file as A.A: 
  1707.  
  1708.                fopen("A.A","w,type=memory");
  1709.                remove("a.a");
  1710.  
  1711.       The above call to remove will not remove memory file A.A because the file 
  1712.       name is in uppercase. Because memory files are always checked first, the 
  1713.       function will look for memory file a.a, and if that file does not exist, 
  1714.       it will remove the disk file a.a (or A.A, because disk files are not case 
  1715.       sensitive). 
  1716.  
  1717.      You can request that the temporary files created by the tmpfile function 
  1718.       be either disk files or memory files. By default, tempfile creates disk 
  1719.       files.  To have temporary files created as memory files, set the TEMPMEM 
  1720.       environment variable to ON: 
  1721.  
  1722.                SET TEMPMEM=on
  1723.  
  1724.       The word on can be in any case. You must still specify the /Sv+ compiler 
  1725.       option. For more information about TEMPMEM, see Setting Runtime 
  1726.       Environment Variables. 
  1727.  
  1728.  
  1729. ΓòÉΓòÉΓòÉ 5.4. Buffering ΓòÉΓòÉΓòÉ
  1730.  
  1731. VisualAge C++ compiler uses buffers to increase the efficiency of system-level 
  1732. I/O. The following buffering modes are used: 
  1733.  
  1734.  Unbuffered     Characters are transmitted as soon as possible. This mode is 
  1735.                 also called unit buffered. 
  1736.  
  1737.  Line buffered  Characters are transmitted as a block when a new-line character 
  1738.                 is encountered or when the buffer is filled. 
  1739.  
  1740.  Fully buffered Characters are transmitted as a block when the buffer is 
  1741.                 filled. 
  1742.  
  1743.  The buffering mode specifies the manner in which the buffer is flushed, if a 
  1744.  buffer exists. 
  1745.  
  1746.  You can use the blksize parameter with the fopen function to indicate the 
  1747.  initial size of the buffer you want to allocate for the stream. Note that you 
  1748.  must specify the /Sh+ compiler option to use ddnames. 
  1749.  
  1750.  If you do not specify a buffer size, the default size is 4096. Either the 
  1751.  setvbuf or setbuf function can be used to control buffering. One of these 
  1752.  functions may be specified for a stream. You cannot change the buffering mode 
  1753.  after any operation on the file has occurred. 
  1754.  
  1755.  Fully buffered mode is the default unless the stream is connected to a 
  1756.  character device, in which case it is line buffered. 
  1757.  
  1758.  To ensure data is transmitted to external storage as soon as possible, use the 
  1759.  setbuf or setvbuf function to set the buffering mode to unbuffered. 
  1760.  
  1761.  Note:  VisualAge C++ does not support pipes that are created with the 
  1762.  DosCreateNPipe API. 
  1763.  
  1764.  
  1765. ΓòÉΓòÉΓòÉ 5.5. Opening Streams Using Data Definition Names ΓòÉΓòÉΓòÉ
  1766.  
  1767. When you specify the /Sh+ compiler option, you can use the OS/2 SET command 
  1768. with a data definition name (ddname) as a parameter to specify the name of the 
  1769. file to be opened by your program. You can also use the SET command to specify 
  1770. other file characteristics. 
  1771.  
  1772. When you use the SET command with ddnames, you can change the files that are 
  1773. accessed by each run of your program without having to alter and recompile your 
  1774. source code. 
  1775.  
  1776. Note: 
  1777.  
  1778.    1. You cannot use ddnames with the C++ standard streams. 
  1779.  
  1780.    2. The maximum number of files that can be open at any time changes with the 
  1781.       amount of memory available. 
  1782.  
  1783.  
  1784. ΓòÉΓòÉΓòÉ 5.5.1. Specifying a ddname with the SET Command ΓòÉΓòÉΓòÉ
  1785.  
  1786. To specify a ddname, the SET command has the following syntax: 
  1787.  
  1788.    SET DD:DDNAME=filename[,option, option...]
  1789.  
  1790. where: 
  1791.  
  1792.  DDNAME     Is the ddname as specified in the source code.  The ddname must be 
  1793.             in uppercase. 
  1794.  
  1795.  filename   Is the name of the file that will be opened by fopen. 
  1796.  No white-space characters are allowed between the DD and the equal sign. 
  1797.  
  1798.  For example, you could open the file sample.txt in two ways: 
  1799.  
  1800.      By putting the name of the file directly into your source code: 
  1801.  
  1802.                FILE *stream;
  1803.                stream=fopen("sample.txt", "r");
  1804.  
  1805.      By using a ddname in the fopen call and the SET command to specify the 
  1806.       file you want your program to open: 
  1807.  
  1808.                FILE *stream;
  1809.                stream=fopen("DD:DATAFILE", "r");
  1810.  
  1811.       Before you run your program, use the SET command: 
  1812.  
  1813.                SET DD:DATAFILE=c:\sample.txt
  1814.  
  1815.       When the program runs, it will open the file c:\sample.txt. If you want 
  1816.       the same program to use the file c:\test.txt the next time it runs, use 
  1817.       the following SET command: 
  1818.  
  1819.                SET DD:DATAFILE=c:\test.txt
  1820.  
  1821.  The SET command can be issued before your program is executed by entering it 
  1822.  on the command line, including it in a batch file, or putting it into the 
  1823.  CONFIG.SYS file. You can also use the putenv function from within the program 
  1824.  to set the ddname. For example: 
  1825.  
  1826.      _putenv("DD:DATAFILE=sample.txt, writethru(y)");
  1827.  
  1828.  For a description of putenv, see the C Library Reference. 
  1829.  
  1830.  
  1831. ΓòÉΓòÉΓòÉ 5.5.2. Describing File Characteristics Using Data Definition Names ΓòÉΓòÉΓòÉ
  1832.  
  1833. When you are defining ddnames, use the options to specify the characteristics 
  1834. of the file your program opens. You can specify the options in any order and in 
  1835. upper- or lowercase. If you specify an option more than once, only the last one 
  1836. takes effect. If an option is not valid, fopen fails and errno is set 
  1837. accordingly. 
  1838.  
  1839. You can use the following options when specifying a ddname. 
  1840.  
  1841. Note:  The options blksize, lrecl, and recfm are meant to be used with record 
  1842. level I/O. Because record level I/O is not supported, these options are 
  1843. accepted but ignored. 
  1844.  
  1845.  blksize( n ) 
  1846.       The size in bytes of the block of data moved between the disk and the 
  1847.       program. The maximum size is 32760 for fixed block files and 32756 for 
  1848.       variable block files. Larger values can improve the efficiency of disk 
  1849.       access by lowering the number of times the disk must be accessed. 
  1850.       Typically, values below 512 increase I/O time, and values above 8KB do 
  1851.       not show improvement. 
  1852.  
  1853.  lrecl( n ) 
  1854.       The size in bytes of one record (logical record length). If the value 
  1855.       specified is larger than the value of blksize, the lrecl value is 
  1856.       ignored. 
  1857.  
  1858.  recfm(f | v | fb | vb ) [The default values for these options are underlined] 
  1859.       Specifies whether the record length is fixed or variable, and whether the 
  1860.       records are stored in blocks. 
  1861.  
  1862.       f           The record size is fixed (i.e. all records are the same 
  1863.                   length) and the size of each record is specified by the lrecl 
  1864.                   option. 
  1865.  
  1866.       v           The record size is variable and the maximum record size is 
  1867.                   specified by the lrecl option. 
  1868.  
  1869.       fb          The record size is fixed and the records are stored in 
  1870.                   blocks. The record size is specified by the lrecl option, and 
  1871.                   the block size is specified by the blksize option. The block 
  1872.                   size must be an integral multiple of lrecl. 
  1873.  
  1874.       vb          The record size is variable and the records are stored in 
  1875.                   blocks. The maximum record size is specified by the lrecl 
  1876.                   option, and the block size is specified by the blksize 
  1877.                   option. 
  1878.  
  1879.  share (read | none | all ) 
  1880.       Specifies the file sharing. 
  1881.  
  1882.       read        The file can be shared for read access. Other processes can 
  1883.                   read from the file, but not write to it. 
  1884.  
  1885.       none        The file cannot be shared. No other process can get access to 
  1886.                   the file (exclusive access). 
  1887.  
  1888.       all         Allows the file to be shared for both read and write access. 
  1889.                   Other processes can both read from and write to the file. 
  1890.  
  1891.  writethru( n | y ) 
  1892.       Determines whether to force the writing of OS/2 buffers. 
  1893.  
  1894.       n              Turns off forced writes to the file. The system is not 
  1895.                      forced to write the internal buffer to permanent storage 
  1896.                      before control is returned to the application. 
  1897.  
  1898.       y              Forces the system to write to permanent storage before 
  1899.                      control is returned to the application. The directory is 
  1900.                      updated after every write operation. 
  1901.  
  1902.                      Use writethru(y) if data must be written to the disk 
  1903.                      before your program continues. This can help make data 
  1904.                      recovery easier should a program interruption occur. 
  1905.  
  1906.       Note:  When writethru(y) is specified, file output will be noticeably 
  1907.       slower. 
  1908.  
  1909.  memory( n | y ) 
  1910.       Specifies whether a file will exist in permanent storage or in memory. 
  1911.  
  1912.       n           Specifies that the file will exist in permanent storage. 
  1913.  
  1914.       y           Specifies that the file will exist only in memory. The system 
  1915.                   uses only the OS/2 file name. All other parameters, such as a 
  1916.                   path, are ignored. You must specify the /Sv+ option to enable 
  1917.                   memory files. 
  1918.  
  1919.  
  1920. ΓòÉΓòÉΓòÉ 5.5.3. fopen Defaults ΓòÉΓòÉΓòÉ
  1921.  
  1922. A call to fopen has the following defaults: 
  1923.  
  1924.  share(read)     The file can be shared for read access. Other processes can 
  1925.                  read from the file, but not write to it. 
  1926.  
  1927.  writethru(n)    The file is opened with no forced writes to permanent storage. 
  1928.  
  1929.  Full buffering is used unless the stream is connected to a character device, 
  1930.  then it it is line buffered. 
  1931.  
  1932.  For more information on fopen, refer to the C Library Reference. 
  1933.  
  1934.  
  1935. ΓòÉΓòÉΓòÉ 5.6. Precedence of File Characteristics ΓòÉΓòÉΓòÉ
  1936.  
  1937. You can describe your data both within the program, by fopen, and outside it, 
  1938. by ddname, but you do not always need to do so. There are advantages to 
  1939. describing the characteristics of your data in only one place. 
  1940.  
  1941. Opening a file by ddname may require the merging of the information internal 
  1942. and external to the program. In the case of a conflict, the characteristics 
  1943. described by using fopen override those described using a ddname. For example, 
  1944. given the following ddname statement and fopen command: 
  1945.  
  1946.    SET DD:ROGER=danny.c, memory(n)
  1947.    stream = fopen("DD:ROGER", "w, type=memory")
  1948.  
  1949. the file danny.c will be opened as a memory file. 
  1950.  
  1951.  
  1952. ΓòÉΓòÉΓòÉ 5.7. Closing Files ΓòÉΓòÉΓòÉ
  1953.  
  1954. The fclose function is used to close a file. On normal program termination, the 
  1955. compiler library routines automatically close all files and flush all buffers. 
  1956. When a program ends abnormally, all files are closed but the buffers are not 
  1957. flushed. 
  1958.  
  1959.  
  1960. ΓòÉΓòÉΓòÉ 5.8. Input/Output Restrictions ΓòÉΓòÉΓòÉ
  1961.  
  1962. The following restrictions apply to input/output operations: 
  1963.  
  1964.      Seeking within character devices and OS/2 piped files is not allowed. 
  1965.  
  1966.      Seeking past the end of the file is not allowed for text files. For 
  1967.       binary files that are opened using any of w, w+, wb+, w+b, or wb, a seek 
  1968.       past the end of the file will result in a new end-of-file position and 
  1969.       nulls will be written between the old end-of-file position and the new 
  1970.       one. 
  1971.  
  1972.  Note:  When you open a file in append mode, the file pointer is positioned at 
  1973.  the end of the file. 
  1974.  
  1975.  
  1976. ΓòÉΓòÉΓòÉ 5.9. I/O Considerations When You Use Presentation Manager ΓòÉΓòÉΓòÉ
  1977.  
  1978. Standard I/O functions such as printf write to OS/2 file handle 1, which is the 
  1979. default destination of stdout and cout. Unless you redirect the output and 
  1980. messages, you cannot see them through the Presentation Manager (PM) interface. 
  1981.  
  1982. There are two ways to display the output sent to stdout or cout depending on 
  1983. whether you want to see the output while the program is running or after it has 
  1984. finished: 
  1985.  
  1986.    1. To see the output while the program is running, you must pipe the output 
  1987.       stream to some other program that reads input and displays it using PM 
  1988.       calls. For example, suppose you had a program called "display" which used 
  1989.       PM calls to write to the screen. You could pipe the output from junko.exe 
  1990.       to the program display using the following command: 
  1991.  
  1992.                junko | display
  1993.  
  1994.    2. To view the output after the program has finished, redirect the output 
  1995.       stream to a file.  You can do this from a command line, for example: 
  1996.  
  1997.                junko > file.out
  1998.  
  1999.       or from within the file using the freopen function: 
  2000.  
  2001.                freopen("file.out", "w", stdout);
  2002.  
  2003.  To send output from a VisualAge C++ application directly to a PM window, you 
  2004.  must use PM calls. 
  2005.  
  2006.  All error messages during run time go to OS/2 file handle 2, which is the 
  2007.  default destination of stderr, cerr, and clog. Like output to file handle 1, 
  2008.  these messages are not visible through the PM interface. To see the error 
  2009.  messages, you must redirect the error stream to a file. 
  2010.  
  2011.  C++ programs using User Interface classes can force the output messages of C++ 
  2012.  exceptions in the library to either stderr, stdout, or to a queue.  To do 
  2013.  this, prior to running a Presentation Manager application, two environment 
  2014.  variables, ICLUI TRACE and ICLUI TRACETO must be set. 
  2015.  
  2016.  ICLUI TRACE can be set to off (the default), on, or noprefix.  This last value 
  2017.  means the trace is set on but no prefix information is written to trace. 
  2018.  
  2019.  ICLUI TRACETO can then be set to stdout, stderr, or queue (the default). The 
  2020.  queue value causes the trace to be written to a 32-bit OS/2 queue named 
  2021.  \\QUEUES\PRINTF32. 
  2022.  
  2023.  For more details on redirecting output, see Redirecting Standard Streams. 
  2024.  
  2025.  
  2026. ΓòÉΓòÉΓòÉ 6. Optimizing Your Program ΓòÉΓòÉΓòÉ
  2027.  
  2028. Two aspects of your program can be optimized. You can decrease the size of your 
  2029. program or you can improve your program's execution performance. 
  2030.  
  2031. This chapter discusses: 
  2032.  
  2033.      Standard Optimization Considerations and 
  2034.      Fine-tuning Techniques for Optimizing Code 
  2035.  
  2036.  Note that in some cases, optimizing for size may result in slower programs, 
  2037.  and optimizing for speed may result in larger programs. In addition, when you 
  2038.  optimize your code you may uncover bugs that had not been evident before. 
  2039.  
  2040.  This chapter provides guidelines only. To obtain the best results for either 
  2041.  performance or module size, experiment with the techniques suggested. 
  2042.  
  2043.  
  2044. ΓòÉΓòÉΓòÉ 6.1. Standard Optimization Considerations ΓòÉΓòÉΓòÉ
  2045.  
  2046. It is assumed you have already implemented the obvious program changes which 
  2047. typically yield the initial, dramatic, performance improvements. Program 
  2048. changes you should already have considered include: choosing efficient 
  2049. algorithms with small memory footprints; avoiding duplicate copies of data; and 
  2050. passing by value versus passing by reference wherever possible. While not a 
  2051. technical pre-requisite to the fine-tuning methods discussed here, if you have 
  2052. not already examined your program for these types of improvements, we recommend 
  2053. you do so before continuing with this chapter. 
  2054.  
  2055. For help on determining the execution profile of your program, see the 
  2056. discussion of the Performance Analyzer in the User's Guide. The benefits to 
  2057. your program will vary depending on your code and on the opportunities for 
  2058. optimization available to the compiler. 
  2059.  
  2060.  
  2061. ΓòÉΓòÉΓòÉ 6.2. Fine-tuning Techniques for Optimizing Code ΓòÉΓòÉΓòÉ
  2062.  
  2063. This chapter describes fine-tuning techniques which have the potential to 
  2064. squeeze that final percentage point or two of performance improvement out of 
  2065. your program, for those situations and applications where peak efficiency is 
  2066. required. Because the size of your program affects both the load time and the 
  2067. runtime characteristics of your application, it is best to do size tuning 
  2068. before performance tuning.  We have presented the topics in that order. 
  2069.  
  2070.      Reducing Program Size 
  2071.      Improving Program Performance 
  2072.  
  2073.  
  2074. ΓòÉΓòÉΓòÉ 6.2.1. Reducing Program Size ΓòÉΓòÉΓòÉ
  2075.  
  2076. This section lists the methods you can use to decrease the size of your 
  2077. executable module. 
  2078.  
  2079.      Coding Techniques 
  2080.      Using Libraries and Library Functions 
  2081.      Choosing Compiler Options 
  2082.  
  2083.  
  2084. ΓòÉΓòÉΓòÉ 6.2.1.1. Coding Techniques ΓòÉΓòÉΓòÉ
  2085.  
  2086. The following list describes relatively quick and simple ways you can make your 
  2087. modules smaller: 
  2088.  
  2089.      Use #pragma strings(readonly) to make your strings read-only. In C++ 
  2090.       programs, strings are read-only by default. 
  2091.  
  2092.      Use the \exepack:1 option when linking. This option allows you to build 
  2093.       smaller, compressed executables. The time taken to expand the executable, 
  2094.       which is done automatically by the OS/2 Application Loader when the 
  2095.       program is run, is less than the I/O time of bringing in the larger 
  2096.       uncompressed file. 
  2097.  
  2098.       Note:  OS/2 Version 3.0 allows you to specify either \exepack:1 or 
  2099.       \exepack:2 for this linker option. The \exepack:2 version uses an 
  2100.       improved compression algorithm but is not compatible with OS/2 Versions 
  2101.       2.0, 2.1 or 2.11.  In those cases, use \exepack:1. 
  2102.  
  2103.       Note:  Neither exepack option would be used with the align directive is 
  2104.       also used with a parameter less than 512. 
  2105.  
  2106.      When you declare or define structures or C++ classes, take into account 
  2107.       the alignment of data types.  Declare the largest members first to reduce 
  2108.       wasted space between members. 
  2109.  
  2110.      If you do not use the intermediate code linker, arrange your own external 
  2111.       data to minimize gaps in alignment. 
  2112.  
  2113.      Avoid assigning structures. 
  2114.  
  2115.      Avoid assigning structures if your structures are large or if you use 
  2116.       #include <string.h>. Instead, use memcpy to copy the structure. 
  2117.  
  2118.      If you do not use the argc and argv arguments to main, create a dummy 
  2119.       _setuparg function that contains no code. 
  2120.  
  2121.  
  2122. ΓòÉΓòÉΓòÉ 6.2.1.2. Using Libraries and Library Functions ΓòÉΓòÉΓòÉ
  2123.  
  2124. Your choice of libraries and of library functions affects the size of your 
  2125. code. The guidelines below can add up to a greater reduction in size than those 
  2126. listed above, but they can also require more effort on your part.  In some 
  2127. cases, they require you to write your own code for such things as buffering or 
  2128. exception handling. 
  2129.  
  2130.      Use the subsystem library whenever possible.  This library has no runtime 
  2131.       environment, so the initialization, termination, and exception handling 
  2132.       code is not included.  It also includes fewer library functions than the 
  2133.       standard library. 
  2134.  
  2135.      Use the low-level I/O functions.  Note that you must provide your own 
  2136.       buffering for these functions. 
  2137.  
  2138.      Disable the inlining of intrinsic C functions. 
  2139.  
  2140.       The /Oc switch disables expansion of intrinsic fuctions whenever the 
  2141.       function call is smaller than the inlined function. You must specify /O 
  2142.       whenever you wish to use the /Oc switch. 
  2143.  
  2144.       Certain string manipulation, floating-point, and trigonometric functions 
  2145.       are inlined by default. (See Intrinsic Functions for a list of these 
  2146.       functions.) To selectively disable the inlining, parenthesize the 
  2147.       function call, for example: 
  2148.  
  2149.                (strlen)(x);
  2150.  
  2151.       For most of the floating-point built-in functions, this recommendation 
  2152.       does not apply because the inlined code is probably smaller than a 
  2153.       generated call instruction. 
  2154.  
  2155.  
  2156. ΓòÉΓòÉΓòÉ 6.2.1.3. Choosing Compiler Options ΓòÉΓòÉΓòÉ
  2157.  
  2158. The following list names the compiler options to use to make your executable 
  2159. module smaller. Unless noted, these options are not set by default. 
  2160.  
  2161.  /Gd+    Links dynamically to the runtime library.  If you link statically, 
  2162.          code for all the runtime functions you call is included in your 
  2163.          executable module. 
  2164.  
  2165.  /Gf+    Generates code for fast floating-point execution and eliminates 
  2166.          certain conversions. 
  2167.  
  2168.  /Gh-    Does not generate execution trace and analyzer hooks which would 
  2169.          increase module size. This is the default. 
  2170.  
  2171.  /Gi+    Generates code for fast integer execution and eliminates certain 
  2172.          conversions. 
  2173.  
  2174.  /Gv-    Does not save and restore the DS and ES registers for external 
  2175.          function calls.  This is the default. 
  2176.  
  2177.  /Gw-    Does not generate an FWAIT instruction after each floating-point load 
  2178.          instruction.  This is the default. 
  2179.  
  2180.  /Gx+    For C++ programs only, suppresses generation of exception handling 
  2181.          code. 
  2182.  
  2183.  /G3     Optimizes for the 386 processor.  This is the default. Optimizing for 
  2184.          the 486 or Pentium microprocessor generates extra code. Code compiled 
  2185.          with /G3 runs on a 486 or Pentium microprocessor. 
  2186.  
  2187.  /O+     Turns on optimization. 
  2188.  
  2189.  /Oc+    Turns on optimization for size. You must also specify /O. 
  2190.  
  2191.  /Oi-    Does not inline user functions. Inlining reduces overhead but 
  2192.          increases module size. When /O- is specified, this is the default. 
  2193.          When /O+ is specified, /Oi+ becomes the default. 
  2194.  
  2195.  /Ol+    Passes code through the intermediate code linker.  The intermediate 
  2196.          linker removes unused variables and sorts external data to provide 
  2197.          maximal packing.  For best results, use the /Gu+ option to specify 
  2198.          that defined data is not used by external functions.  See the User's 
  2199.          Guide for more information about the intermediate linker. 
  2200.  
  2201.  /Sh-    Does not include ddname support.  This is the default. 
  2202.  
  2203.  /Sv-    Does not include memory file support in the library. This is the 
  2204.          default. 
  2205.  
  2206.  /Ti-    Does not generate debug or Performance Analyzer information, which 
  2207.          would increase module size. This is the default. 
  2208.  
  2209.  /Tx-    Provides only the exception message and address when an exception 
  2210.          occurs instead of a complete machine-state dump. This is the default. 
  2211.  
  2212.  If you link your program in a separate link step, specify the /ALIGN:1 linker 
  2213.  option to align segments on 1-byte boundaries. The default alignment is 512 
  2214.  byte boundaries. Alternatively, you could specify the /EXEPACK linker option, 
  2215.  which compresses repeated byte patterns within pages of data. Neither of these 
  2216.  linker options reduces the memory image size, only the disk size. 
  2217.  
  2218.  Note:  Do not use /ALIGN:1 and /EXEPACK together as doing so can significantly 
  2219.  lower performance. 
  2220.  
  2221.  
  2222. ΓòÉΓòÉΓòÉ 6.2.2. Improving Program Performance ΓòÉΓòÉΓòÉ
  2223.  
  2224. This section lists the methods you can use to improve the speed of your 
  2225. program. 
  2226.  
  2227.      Choosing Libraries 
  2228.      Allocating and Managing Memory 
  2229.      Using Strings and String Manipulation Functions 
  2230.      Performing Input and Output 
  2231.      Designing and Calling Functions 
  2232.      Other Coding Techniques 
  2233.      C++-Specific Considerations 
  2234.      Choosing Compiler Options 
  2235.      Specifying Linker Options 
  2236.  
  2237.  
  2238. ΓòÉΓòÉΓòÉ 6.2.2.1. Choosing Libraries ΓòÉΓòÉΓòÉ
  2239.  
  2240. Your choice of runtime libraries can affect the performance of your code: 
  2241.  
  2242.      Use the subsystem library whenever possible.  Because there is no runtime 
  2243.       environment for this library, its load and initialization times are 
  2244.       faster than for the other libraries. 
  2245.  
  2246.      Use the single-thread library for single-thread programs.  The 
  2247.       multithread library involves extra overhead. 
  2248.  
  2249.      If your application has multiple executable modules and DLLs, create and 
  2250.       use a common version of a runtime library DLL.  See Creating Your Own 
  2251.       Runtime Library DLLs  for more information. 
  2252.  
  2253.  
  2254. ΓòÉΓòÉΓòÉ 6.2.2.2. Allocating and Managing Memory ΓòÉΓòÉΓòÉ
  2255.  
  2256. The following list describes ways to improve performance through better memory 
  2257. allocation and management: 
  2258.  
  2259.      If you allocate a lot of dynamic storage for a specific function, use the 
  2260.       _alloca function. Because _alloca allocates from the stack instead of the 
  2261.       heap, the storage is automatically freed when the function ends. In some 
  2262.       cases however, using _alloca can detract from performance. It causes the 
  2263.       function that calls it to chain the EBP register, which creates more code 
  2264.       in the function prolog and also eliminates EBP from use as a 
  2265.       general-purpose register. If you are not allocating much dynamic storage, 
  2266.       this overhead can outweigh the benefits of using _alloca. For this 
  2267.       reason, if your function does not allocate a lot of dynamic storage, use 
  2268.       other memory allocation functions. 
  2269.  
  2270.      You can use malloc, DosAllocMem, or if programming in C++, new to 
  2271.       allocate storage. In general, DosAllocMem is faster, but you must do your 
  2272.       own heap management and you cannot use realloc to reallocate the memory. 
  2273.       However, malloc manages the heap for you and the storage it returns can 
  2274.       be reallocated with realloc. In addition, malloc is portable, while 
  2275.       DosAllocMem is not. When programming in C++, use new. new sets up virtual 
  2276.       function tables (VFTs) which malloc and DosAllocMem do not.  It also 
  2277.       provides additional type checking not available when using malloc or 
  2278.       DosAllocMem. 
  2279.  
  2280.      When you use malloc, the amount of storage allocated is actually the 
  2281.       amount you specify plus a minimal overhead that is used internally by the 
  2282.       memory allocation functions. 
  2283.  
  2284.      When you copy data into storage allocated by calloc, malloc, or realloc, 
  2285.       copy it to the same boundaries on which the compiler would align them. 
  2286.       In particular, aligning double precision floating-point variables and 
  2287.       arrays on 8-byte boundaries can greatly improve performance on the 486 
  2288.       and Pentium microprocessors. For more information about the mapping of 
  2289.       data, see Data Mapping. 
  2290.  
  2291.      When you declare or define structures or C++ classes, take into account 
  2292.       the alignment of data types.  Declare the largest members first to reduce 
  2293.       wasted space between members and to reduce the number of boundaries the 
  2294.       compiler must cross. The alignment is especially important if you pack 
  2295.       your structure or class. 
  2296.  
  2297.      After freeing or reallocating storage, periodically call _heapmin to 
  2298.       release the unused storage to the operating system and reduce the working 
  2299.       set of your program. A reduced working set causes less swapping of memory 
  2300.       to disk, resulting in better performance. Experiment to determine how 
  2301.       often you should call _heapmin. 
  2302.  
  2303.  
  2304. ΓòÉΓòÉΓòÉ 6.2.2.3. Using Strings and String Manipulation Functions ΓòÉΓòÉΓòÉ
  2305.  
  2306. The handling of string operations can affect the performance of your program: 
  2307.  
  2308.      In C, use #pragma strings (readonly) to make your strings read-only. In 
  2309.       C++, strings are read-only by default. Using the pragma also causes the 
  2310.       compiler to put out only copy of strings that are used in more than one 
  2311.       place. 
  2312.  
  2313.       If you use the intrinsic string functions, the compiler can better 
  2314.       optimize them if it knows that any string literals they are operating on 
  2315.       will not be changed. 
  2316.  
  2317.      When you store strings into storage allocated by malloc, align the start 
  2318.       of the string on a doubleword boundary.  This alignment allows the best 
  2319.       performance of the string functions.  The compiler performs this 
  2320.       alignment for all strings it allocates. 
  2321.  
  2322.      Keep track of the length of your strings.  If you know the length of your 
  2323.       string, you can use memcpy instead of strcpy. The memcpy function is 
  2324.       faster because it does not have to search for the end of the string. 
  2325.  
  2326.      Avoid using strtok.  Because this function is very general, you can 
  2327.       probably write a function more specific to your application and get 
  2328.       better performance. 
  2329.  
  2330.  
  2331. ΓòÉΓòÉΓòÉ 6.2.2.4. Performing Input and Output ΓòÉΓòÉΓòÉ
  2332.  
  2333. There are a number of ways to improve your program's performance of input and 
  2334. output: 
  2335.  
  2336.      Use binary streams instead of text streams.  In binary streams, data is 
  2337.       not changed on input or output. 
  2338.  
  2339.      Use the low-level I/O functions, such as open and close. These functions 
  2340.       are faster and more specific to the application than the stream I/O 
  2341.       functions like fopen and fclose. You must provide your own buffering for 
  2342.       the low-level functions. 
  2343.  
  2344.      If you do your own I/O buffering, make the buffer a multiple of 4K, which 
  2345.       is the size of a page. Because malloc uses extra storage as overhead, 
  2346.       allocating storage in a multiple of the page size actually results in 
  2347.       more pages being allocated than required. Instead, use DosAllocMem to 
  2348.       allocate this storage for the buffer. 
  2349.  
  2350.      If you know you have to process an entire file, the following technique 
  2351.       has the advantage of reducing disk I/O, provided the file is not so big 
  2352.       that excessive swapping will occur. Determine the size of the data to be 
  2353.       read in, allocate a single buffer to read it to, read the whole file into 
  2354.       that buffer at once using DosRead, and then process the data in the 
  2355.       buffer. 
  2356.  
  2357.      If you perform frequent read or write operations on your temporary files, 
  2358.       create them as memory files. I/O operations can be performed more quickly 
  2359.       on memory files than on disk files. To use memory files, you must specify 
  2360.       the /Sv+ option. 
  2361.  
  2362.      Instead of scanf and fscanf, use fgets to read in a string, and then use 
  2363.       one of atoi, atol, atof, or _atold to convert it to the appropriate 
  2364.       format. 
  2365.  
  2366.      Use sprintf only for complex formatting. For simpler formatting, such as 
  2367.       string concatenation, use a more specific string function. 
  2368.  
  2369.      When reading input, read in a whole line at once rather than one 
  2370.       character at a time. 
  2371.  
  2372.  
  2373. ΓòÉΓòÉΓòÉ 6.2.2.5. Designing and Calling Functions ΓòÉΓòÉΓòÉ
  2374.  
  2375. Whether you are writing a function or calling a library function, there are a 
  2376. few things you should keep in mind: 
  2377.  
  2378.      Fully prototype all functions. A full prototype gives the compiler and 
  2379.       optimizer complete information about the types of the parameters. As a 
  2380.       result, promotions from unwidened types to widened types are not required 
  2381.       and the compiler never needs to emit eyecatcher instructions for the 
  2382.       function (see Eyecatchers). 
  2383.  
  2384.      When designing a function, place the most used parameters in the left 
  2385.       most position in the function prototype.  The left most parameters have a 
  2386.       better chance of being stored in a register. 
  2387.  
  2388.      Avoid passing structures or unions as function parameters or returning a 
  2389.       structure or a union. Passing such aggregates requires the compiler to 
  2390.       copy and store many values. This is worse in C++ programs in which class 
  2391.       objects are passed by value, a constructor and destructor are called when 
  2392.       the function is called. Instead, pass or return a pointer to the 
  2393.       structure or union. 
  2394.  
  2395.      If you call another function near the end of your function and pass it 
  2396.       the same parameters that were passed to your function, put the parameters 
  2397.       in the same order in the function prototypes. The compiler can then reuse 
  2398.       the storage that the parameters are in and does not have to generate code 
  2399.       to reorder them. 
  2400.  
  2401.      Use the intrinsic and built-in functions, which include string 
  2402.       manipulation, floating-point, and trigonometric functions. Intrinsic 
  2403.       functions require less overhead and are faster than a function call, and 
  2404.       often allow the compiler to perform better optimization. Your functions 
  2405.       are automatically mapped to intrinsic functions if you include the 
  2406.       VisualAge C++ header file, however, in C only, this mapping is overridden 
  2407.       if you #undef the macro name. 
  2408.  
  2409.      Be careful when using intrinsic functions in loops. Many intrinsic 
  2410.       functions use multiple registers.  Some of the registers are specific and 
  2411.       cannot be changed.  In the loop, the number of values to be placed in 
  2412.       registers increases while the number of registers is limited.  As a 
  2413.       result, temporary values such as loop induction variables and results of 
  2414.       intermediate calculations often cannot be stored in registers, thus 
  2415.       slowing your program performance. 
  2416.  
  2417.       In general, you will encounter this problem with the intrinsic string 
  2418.       functions rather than the floating-point functions. 
  2419.  
  2420.      Use recursion only where necessary. Because recursion involves building a 
  2421.       stack frame, an iterative solution is always faster than a recursive one. 
  2422.  
  2423.  
  2424. ΓòÉΓòÉΓòÉ 6.2.2.6. Other Coding Techniques ΓòÉΓòÉΓòÉ
  2425.  
  2426. The following list describes other techniques you can use to improve 
  2427. performance: 
  2428.  
  2429.      Minimize the use of external (extern) variables to reduce aliasing and so 
  2430.       improve optimization. 
  2431.  
  2432.      Avoid taking the address of local variables. If you use a local variable 
  2433.       as a temporary variable and must take its address, avoid reusing the 
  2434.       temporary variable. Taking the address of a local variable inhibits 
  2435.       optimizations that would otherwise be done on calculations involving that 
  2436.       variable. 
  2437.  
  2438.      Avoid using short int values, except in aggregates. Because all integer 
  2439.       arithmetic is done on long values, using short values causes extra 
  2440.       conversions to be performed. 
  2441.  
  2442.      If you do division or modulo arithmetic by a divisor that is a power of 
  2443.       2, if possible, make the dividend unsigned to produce better code. 
  2444.  
  2445.      Use #pragma alloc_txt and #pragma data_seg to group code and data 
  2446.       respectively, to improve the locality of reference. Using #pragma 
  2447.       alloc_txt causes functions that are used at the same time to be stored 
  2448.       together. They might then fit on a single page that can be used and then 
  2449.       discarded. You can use Performance Analyzer to determine which functions 
  2450.       to group together. #pragma data_seg works in a similar manner for 
  2451.       grouping data. 
  2452.  
  2453.      Use _Optlink linkage wherever possible. Keep _Optlink as your default 
  2454.       linkage and use linkage keywords to change the linkage for specific 
  2455.       functions. 
  2456.  
  2457.      If a loop body has a constant number of iterations, use constants in the 
  2458.       loop condition to improve optimization.  For example, the statement for 
  2459.       (i=0; i<4; i++) can be better optimized than for (i=0; i<x; i++). 
  2460.  
  2461.      Avoid goto statements that jump into the middle of loops. Such statements 
  2462.       inhibit certain optimizations. 
  2463.  
  2464.      Use the intermediate code linker to improve optimization. See the User's 
  2465.       Guide for information about the intermediate linker. 
  2466.  
  2467.      Inline your functions selectively.  Inlined functions require less 
  2468.       overhead and are generally faster than a function call. The best 
  2469.       candidates for inlining are small functions that are called frequently. 
  2470.       Large functions and functions that are called rarely may not be good 
  2471.       candidates for inlining. 
  2472.  
  2473.       For best results, use the Performance Analyzer to decide which functions 
  2474.       you should inline and qualify the _Inline keyword (or inline for C++ 
  2475.       files). For a discussion of using Performance Analyzer in this manner, 
  2476.       see the User's Guide. (Using automatic inlining, specifying /Oi with a 
  2477.       value, is not as effective.) Using the intermediate code linker with user 
  2478.       inlining can improve your program performance even more. 
  2479.  
  2480.  Some coding practices, although often necessary, will slow down program 
  2481.  performance: 
  2482.  
  2483.      Calling 16-bit code. The compiler performs a number of conversions to 
  2484.       allow interaction between 32-bit and 16-bit code. 
  2485.  
  2486.      Using the setjmp and longjmp functions.  These functions involve storing 
  2487.       and restoring the state of the thread. 
  2488.  
  2489.      Using #pragma handler. This #pragma causes code to be generated to 
  2490.       register and deregister an exception handler for a function. 
  2491.  
  2492.      Using unprototyped variable argument functions. Because of the nature of 
  2493.       the _Optlink calling convention, unprototyped variable-length argument 
  2494.       lists make performance slower. Prototype all of your functions. Also, use 
  2495.       the _System calling convention for any variable argument functions. 
  2496.  
  2497.  
  2498. ΓòÉΓòÉΓòÉ 6.2.2.7. C++-Specific Considerations ΓòÉΓòÉΓòÉ
  2499.  
  2500. The following performance hints apply only to C++ programs: 
  2501.  
  2502.      Because C++ objects are often allocated from the heap and have a limited 
  2503.       scope, memory usage in C++ programs affects performance more than in C 
  2504.       programs.  To improve memory usage and performance: 
  2505.  
  2506.         -  Tailor your own new and delete operators. 
  2507.         -  Allocate memory for a class before it is required. 
  2508.         -  Ensure that objects that are no longer needed are freed or otherwise 
  2509.            made available for reuse. One way to do this is to use an object 
  2510.            manager. Each time you create an instance of an object, you pass the 
  2511.            pointer to that object to the object manager.  The object manager 
  2512.            maintains a list of these pointers.  To access an object, you can 
  2513.            call an object manager member function to return the information to 
  2514.            you. The object manager can then manage memory usage and object 
  2515.            reuse. 
  2516.         -  Avoid copying large complex objects. 
  2517.  
  2518.      When you use the Collection classes from the Open Class Libary to create 
  2519.       classes, use a high level of abstraction. After you establish the type of 
  2520.       access to your class, you can create more specific implementations.  This 
  2521.       can result in improved performance with minimal code change. 
  2522.  
  2523.      Use virtual functions only when they are necessary. They are usually 
  2524.       compiled to be indirect calls, which are slower than direct calls. 
  2525.  
  2526.      Use try blocks for exception handling only when necessary because they 
  2527.       can inhibit optimization. Use the /Gx+ option to suppress the generation 
  2528.       of exception handling code in programs where it is not needed. Unless you 
  2529.       specify this option, some exception handling code is generated even for 
  2530.       programs that do not use catch or try blocks. 
  2531.  
  2532.      Avoid using overloaded operators to perform arithmetic operations on 
  2533.       user-defined types.  The compiler cannot perform the same optimizations 
  2534.       for objects as it can for simple types. 
  2535.  
  2536.      Avoid performing a deep copy if a shallow copy is all you require. For an 
  2537.       object that contains pointers to other objects, a shallow copy copies 
  2538.       only the pointers and not the objects to which they point.  The result is 
  2539.       two objects that point to the same contained object.  A deep copy, 
  2540.       however, copies the pointers and the objects they point to, as well as 
  2541.       any pointers or objects contained within that object, and so on. A simple 
  2542.       assignment using an overloaded operator can generate many lines of code. 
  2543.  
  2544.      When you define structures or data members within a class, define the 
  2545.       largest data types first to align them on the doubleword boundary. 
  2546.  
  2547.      Usually, you should not declare virtual functions inline. If all virtual 
  2548.       functions in a class are inline, the virtual function table of that class 
  2549.       and all the virtual function bodies will be replicated in each 
  2550.       compilation unit that uses the class. 
  2551.  
  2552.  
  2553. ΓòÉΓòÉΓòÉ 6.2.2.8. Choosing Compiler Options ΓòÉΓòÉΓòÉ
  2554.  
  2555. The following list names the compiler options that can improve performance and 
  2556. describes the action of each option. 
  2557.  
  2558. Note:  Of these options, only /Om- is a default. 
  2559.  
  2560.  Option  Effect 
  2561.  
  2562.  /Gf+    Generates code for fast floating-point operations. 
  2563.  
  2564.  /Gi+    Generates code for fast integer operations. 
  2565.  
  2566.  /Gx+    For C++ programs only, suppresses generation of exception handling 
  2567.          code. 
  2568.  
  2569.  /G[3|4|5] Optimize for the 386 (/G3), 486 (/G4), or Pentium (/G5) 
  2570.          microprocessor.  Use the appropriate option for the processor you are 
  2571.          using or plan to use. If you do not know what processor your 
  2572.          application will run on, use the /G3 option. 
  2573.  
  2574.  /O+     Turns on optimization for speed. Specifying /O+ also causes /Op+ 
  2575.          (enable optimizations involving the stack pointer), /Os+ (invoke the 
  2576.          instruction scheduler), and /Oi+ (inline user functions) to be 
  2577.          specified. 
  2578.  
  2579.  /Oi+    Inlines user functions. 
  2580.  
  2581.  /Ol+    Passes code through the intermediate code linker.  Using the 
  2582.          intermediate linker can result in better optimized code.  For best 
  2583.          results, use the /Gu+ option also to specify that data that is defined 
  2584.          in the .DLL or .EXE being built is not used by external functions. See 
  2585.          the User's Guide for more information about the intermediate linker. 
  2586.  
  2587.  /Om-    Does not limit the working set size of the compiler so that the 
  2588.          compiler can inline more user code. 
  2589.  
  2590.  The following options improve the performance of your code by preventing the 
  2591.  generation of objects or information that can degrade performance. Note that 
  2592.  these are set by default: 
  2593.  
  2594.  Option  Effect 
  2595.  /Gh-    Prevents the generation of execution trace and analyzer hooks. 
  2596.  /Gr-    Generates code to run in the usual operating system environment. If 
  2597.          you use /Gr+, the code generated runs at ring 0, and the performance 
  2598.          suffers. Some code, such as device drivers, must run at ring 0. 
  2599.  /Gv-    Does not save and restore the DS and ES registers for external 
  2600.          function calls. 
  2601.  /Gw-    Prevents the generation of FWAIT instruction after each floating-point 
  2602.          load instruction. 
  2603.  /Ti-    Does not generate debug information. 
  2604.  
  2605.  If your program has only one thread, use the /Gs+ option to disable stack 
  2606.  probes. (/Gs- is the default.) Because the stack of the first thread is always 
  2607.  fully committed, stack probes are not necessary in single-thread programs.  If 
  2608.  your program has multiple threads, stack probes serve a useful purpose and you 
  2609.  should probably use them. See the User's Guide for more information about 
  2610.  stack probes. 
  2611.  
  2612.  If you link your executable files in a separate link step, specify the 
  2613.  /BASE:65536 linker option to tell the linker your executable file will be 
  2614.  loaded at 64K.  The linker can then resolve a number of references that would 
  2615.  otherwise have to be resolved by the loader at load time and by the pager as 
  2616.  the program runs. When you use icc to link your program, it specifies this 
  2617.  option for you by default. 
  2618.  
  2619.  Note:  Do not use the /BASE:65536 for DLLs. 
  2620.  
  2621.  
  2622. ΓòÉΓòÉΓòÉ 6.2.2.9. Specifying Linker Options ΓòÉΓòÉΓòÉ
  2623.  
  2624. Using the following linker options can lead to improved performance. When icc 
  2625. invokes the linker, it passes these options by default: 
  2626.  
  2627.  /BASE:65536 Specify the starting address of the program. Because the OS/2 
  2628.              operating system always loads executable programs at 64K, you can 
  2629.              give the linker the address 65536 (or 0x10000). If the linker 
  2630.              knows where the program will be loaded, it can resolve relocation 
  2631.              information at link time, resulting in a smaller and faster 
  2632.              executable module. 
  2633.  
  2634.              Note:  If you use the /BASE option to compile DLLs, you may find 
  2635.              that there is no performance improvement.  DLLs load more slowly 
  2636.              if the starting address that is specified for them is not their 
  2637.              load address. In addition, if the specified starting address for a 
  2638.              DLL is too low, the size of the private address space is reduced 
  2639.              and there may not be much heap available for you to use. 
  2640.  
  2641.  /EXEPACK or /EXEPACK[1|2] Pack the .EXE or .DLL file.  The size of the module 
  2642.              is reduced, thereby reducing load time. EXEPACK and /EXEPACK:1 are 
  2643.              equivalent, /EXEPACK:2 uses a more effective compression algorithm 
  2644.              but is available only under OS/2 Warp Version 3.0. 
  2645.  
  2646.  
  2647. ΓòÉΓòÉΓòÉ 7. Creating Multithread Programs ΓòÉΓòÉΓòÉ
  2648.  
  2649. This chapter describes how to use the VisualAge C++ compiler to create 
  2650. multithread programs and discusses restrictions of the multithread environment. 
  2651. It also describes the sample multithread program that you may have installed 
  2652. which is included with the VisualAge C++ product. For instructions on how to 
  2653. compile and run the sample program, see Sample Multithread Program. 
  2654.  
  2655. Multithread programming is a feature of the OS/2 operating system and is 
  2656. supported by the VisualAge C++ compiler with: 
  2657.  
  2658.      Code generation and linking options. 
  2659.  
  2660.       (See Compiling and Linking Multithread Programs for more information.) 
  2661.  
  2662.      Multithread libraries. 
  2663.  
  2664.       (See Using the Multithread Libraries for more information.) 
  2665.  
  2666.  No multithread support is available in the subsystem libraries. 
  2667.  
  2668.  
  2669. ΓòÉΓòÉΓòÉ 7.1. What Is a Multithread Program? ΓòÉΓòÉΓòÉ
  2670.  
  2671. A multithread program is one whose functions are divided among several threads. 
  2672. A process is an executing application and the resources it uses, a thread is 
  2673. the smallest unit of execution within a process. Other than its stack and 
  2674. registers, a thread owns no resources; it uses those of its parent process. 
  2675. This chapter discusses threads, references to processes are for contrast only. 
  2676.  
  2677. Multithread programs allow more complex processing than single-thread programs. 
  2678. In a single-thread program, all operations are performed serially. That is, one 
  2679. operation begins when the preceding one has finished. 
  2680.  
  2681. The advantage of having multiple threads are: 
  2682.  
  2683.    1. on multi-processor systems, that threads can execute concurrently. and 
  2684.       thus the entire multithread program is completed faster. 
  2685.  
  2686.    2. on single or multiple processor systems, that if any thread is blocked 
  2687.       (waiting for I/O to complete) then the rest of your application can 
  2688.       continue to process or respond to user data. 
  2689.  
  2690.  Although threads within a process share the same address space and files, each 
  2691.  thread runs as an independent entity and is not affected by the control flow 
  2692.  of any other thread in the process. Because a function from any thread can 
  2693.  perform any task, such as input or output, threads are well suited to programs 
  2694.  that have multiple uses of the same data or resources. 
  2695.  
  2696.  
  2697. ΓòÉΓòÉΓòÉ 7.1.1. Thread Control ΓòÉΓòÉΓòÉ
  2698.  
  2699. There are three mechanisms for create and deleting threads under the 
  2700. VisualAge C++: 
  2701.  
  2702.      _beginthread and _endthread from the multithread libraries, 
  2703.  
  2704.      DosCreateThread and DosExit from the OS/2 API, or 
  2705.  
  2706.      IThread from the User Interface classes. 
  2707.  These are discussed in more detail below. 
  2708.  
  2709.  _beginthread and _endthread 
  2710.  
  2711.  The multithread libraries provide two functions, _beginthread and _endthread, 
  2712.  to create new threads and to end them. You should use _beginthread to create 
  2713.  any threads that call VisualAge C++ library functions. When the thread is 
  2714.  started, the library environment performs certain initializations that ensure 
  2715.  resources and data are handled correctly between threads. 
  2716.  
  2717.  The VisualAge C++ compiler does not limit the number of threads you can 
  2718.  create, but the OS/2 operating system does. The VisualAge C++ product also 
  2719.  provides the global variable _threadid that identifies your current thread, 
  2720.  and the function _threadstore that gives you a private thread pointer to which 
  2721.  you can assign any thread-specific data structure. 
  2722.  
  2723.  For more information on the number of threads allowed, see the online OS/2 
  2724.  Programming Reference. For more detail on the functions _endthread and 
  2725.  _beginthread, see the C Library Reference. 
  2726.  
  2727.  DosCreateThread and DosExit 
  2728.  
  2729.  You can also create threads with the DosCreateThread API. The function that is 
  2730.  to run on the thread created by DosCreateThread must have _System linkage. If 
  2731.  you need to start a new thread for a function with any other type of linkage, 
  2732.  you cannot use DosCreateThread. 
  2733.  
  2734.  Threads created by the DosCreateThread API do not have access to the resource 
  2735.  management facilities or to VisualAge C++ exception handling, you must use a 
  2736.  #pragma handler directive for the thread function to ensure correct exception 
  2737.  handling. You should also call _fpreset from the new thread to ensure the 
  2738.  floating-point control word is set correctly for the thread. Although you can 
  2739.  use DosExit to end threads created with DosCreateThread, you should use 
  2740.  _endthread to ensure that the necessary cleanup of the environment is done. 
  2741.  
  2742.  IThread 
  2743.  
  2744.  The start member function of the IThread class is used to start additional 
  2745.  threads.  This member function has three overloaded versions and three 
  2746.  corresponding constructors for: 
  2747.  
  2748.      Functions compatible with _beginthread. That is, the functions which have 
  2749.       OS/2 linkage, take one argument of void* type, and return void. 
  2750.  
  2751.      Functions compatible with DosCreateThread. That is, the functions which 
  2752.       have _System linkage, take one argument of unsigned long type, and return 
  2753.       void. 
  2754.  
  2755.      Any other function. 
  2756.  
  2757.  Because IThread can handle functions which fall under both of the previously 
  2758.  discussed thread control mechanisms, as well as being able to handle functions 
  2759.  which fall under neither, it is the preferred thread handling mechanism. It 
  2760.  does not only what other mechanisms do, it does it better. Unlike 
  2761.  _beginthread, you don't have to explicitly call _endthread to clean up the 
  2762.  environment, and unlike DosCreateThread, you don't have to write your own 
  2763.  exception handler. 
  2764.  
  2765.  You can use the IThread class in your multithread programs to : 
  2766.  
  2767.      Set thread priority 
  2768.      Set thread attributes 
  2769.      Do a reference count for objects dispatched on a thread so they are 
  2770.       automatically deleted when the thread ends 
  2771.      Dispatch a member function of a C++ object on a separate thread 
  2772.      Control other aspects of your threads. 
  2773.  For a description of the IThread class and how to use it, see the Open Class 
  2774.  Library Reference. 
  2775.  
  2776.  
  2777. ΓòÉΓòÉΓòÉ 7.2. Using the Multithread Libraries ΓòÉΓòÉΓòÉ
  2778.  
  2779. VisualAge C++ compiler has two standard libraries that provide library 
  2780. functions for use in multithread programs. The CPPOM30.LIB library is a 
  2781. statically linked multithread library, and CPPOM30I.LIB is an import 
  2782. multithread library, with the addresses of the functions contained in 
  2783. VisualAge C++ DLLs. 
  2784.  
  2785. In addition to the above two standard libraries, the User Interface Class 
  2786. library is also available in multithread form.  A singlethread version of this 
  2787. library is not provided. 
  2788.  
  2789. Not all of the VisualAge C++ Standard class libraries are available for 
  2790. multithread programs. The Complex Mathematics library is available for both 
  2791. single- and multithread programs. The single-thread Complex library is 
  2792. COMPLEX.LIB, while the multithread version is COMPLEXM.LIB. The C++ I/O Stream 
  2793. library is built into both the VisualAge C++ single-thread and the multithread 
  2794. runtime libraries. The User Interface class library also offers an IThread 
  2795. class that is an encapsulation of the OS/2 APIs for multithread programming. 
  2796.  
  2797. When you use the multithread libraries, you have more to consider than with the 
  2798. single-thread libraries. For example, because many library functions share data 
  2799. and other resources, the access to these resources must be serialized (limited 
  2800. to one thread at a time) to prevent functions from interfering with each other. 
  2801. Other functions can affect all threads running within a process. Global 
  2802. variables and error handling are also affected by the multithread environment. 
  2803.  
  2804.  
  2805. ΓòÉΓòÉΓòÉ 7.2.1. Reentrant Functions ΓòÉΓòÉΓòÉ
  2806.  
  2807. Reentrant functions are those which can be suspended at any point and 
  2808. reentered, after which they can return to that same point to resume processing, 
  2809. with no adverse effects. Because these functions use only local variables, they 
  2810. cannot interfere with each other.  Access to these functions is not serialized. 
  2811.  
  2812. All functions in the C++ Complex Mathematics Library are fully reentrant. The 
  2813. I/O Stream Library functions are nonreentrant. 
  2814.  
  2815. The following functions are reentrant: 
  2816.  
  2817. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  2818. Γöé "       Γöé "       Γöé "       Γöé "       Γöé "       Γöé
  2819. Γöé absolut    Γöé fstat     Γöé localtime   Γöé stat      Γöé strupr    Γöé
  2820. Γöé acos      Γöé _ftime     Γöé log      Γöé strcat     Γöé strxfrm    Γöé
  2821. Γöé asctime    Γöé _fullpath   Γöé log10     Γöé strchr     Γöé swab     Γöé
  2822. Γöé asin      Γöé gamma     Γöé _lrotl     Γöé strcmp     Γöé tan      Γöé
  2823. Γöé assert     Γöé _gcvt     Γöé _lrotr     Γöé strcmpi    Γöé tanh     Γöé
  2824. Γöé atan      Γöé _getcwd    Γöé lsearch    Γöé strcoll    Γöé time     Γöé
  2825. Γöé atan2     Γöé _getdcwd    Γöé _ltoa     Γöé strcpy     Γöé _toascii   Γöé
  2826. Γöé atof "     Γöé _getdrive "  Γöé _makepath "  Γöé strcspn "   Γöé tolower "   Γöé
  2827. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2828. Γöé "       Γöé "       Γöé "       Γöé "       Γöé "       Γöé
  2829. Γöé atoi      Γöé getpid     Γöé mblen     Γöé _strdate    Γöé _tolower   Γöé
  2830. Γöé atol      Γöé gmtime     Γöé mbstowcs    Γöé strerror    Γöé toupper    Γöé
  2831. Γöé atold     Γöé hypot     Γöé mbtowc     Γöé _strerror   Γöé _toupper   Γöé
  2832. Γöé bsearch    Γöé isalnum    Γöé memccpy    Γöé strftime    Γöé _tzset    Γöé
  2833. Γöé _cabs     Γöé isalpha    Γöé memchr     Γöé stricmp    Γöé _ultoa    Γöé
  2834. Γöé ceil      Γöé isascii    Γöé memcmp     Γöé strlen     Γöé utime     Γöé
  2835. Γöé chdir     Γöé iscntrl    Γöé memcpy     Γöé strlwr     Γöé vsprintf   Γöé
  2836. Γöé _chdrive "   Γöé isdigit "   Γöé memicmp "   Γöé strncat "   Γöé wait "    Γöé
  2837. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2838. Γöé "       Γöé "       Γöé "       Γöé "       Γöé "       Γöé
  2839. Γöé clock     Γöé isgraph    Γöé memmove    Γöé strncmp    Γöé wcscat    Γöé
  2840. Γöé cos      Γöé islower    Γöé memset     Γöé strncpy    Γöé wcschr    Γöé
  2841. Γöé cosh      Γöé isprint    Γöé mkdir     Γöé strnicmp    Γöé wcscmp    Γöé
  2842. Γöé ctime     Γöé ispunct    Γöé mktime     Γöé strnset    Γöé wcscpy    Γöé
  2843. Γöé _cwait     Γöé isspace    Γöé modf      Γöé strpbrk    Γöé wcscspn    Γöé
  2844. Γöé difftime    Γöé isupper    Γöé pow      Γöé strrchr    Γöé wcslen    Γöé
  2845. Γöé div      Γöé isxdigit    Γöé qsort     Γöé strrev     Γöé wcsncat    Γöé
  2846. Γöé _ecvt "    Γöé _itoa "    Γöé rmdir "    Γöé strset "    Γöé wcsncmp "   Γöé
  2847. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  2848. Γöé "       Γöé "       Γöé "       Γöé "       Γöé "       Γöé
  2849. Γöé erf      Γöé _j0      Γöé _rotl     Γöé strspn     Γöé wcsncpy    Γöé
  2850. Γöé erfc      Γöé _j1      Γöé _rotr     Γöé strstr     Γöé wcspbrk    Γöé
  2851. Γöé exp      Γöé _jn      Γöé sin      Γöé _strtime    Γöé wcsrchr    Γöé
  2852. Γöé fabs      Γöé labs      Γöé sinh      Γöé strtok     Γöé wcsspn    Γöé
  2853. Γöé _fcvt     Γöé ldexp     Γöé _splitpath   Γöé strtod     Γöé wcstombs   Γöé
  2854. Γöé floor     Γöé ldiv      Γöé sprintf    Γöé strtol     Γöé wctomb    Γöé
  2855. Γöé fmod      Γöé lfind     Γöé sqrt      Γöé strtold    Γöé _y0      Γöé
  2856. Γöé _freemod    Γöé _loadmod "   Γöé sscanf "    Γöé strtoul "   Γöé _y1      Γöé
  2857. Γöé frexp "    Γöé        Γöé        Γöé        Γöé _yn "     Γöé
  2858. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  2859.  
  2860. Although the reentrant functions do not require serialization of data access, 
  2861. there is an important exception: if you pass a pointer as a parameter, the 
  2862. function may no longer be reentrant and may therefore require that access is 
  2863. serialized. In short, if you try to use the same piece of memory (such as the 
  2864. memory pointed to by a pointer parameter) from multiple threads, the results 
  2865. are unpredictable. 
  2866.  
  2867.  
  2868. ΓòÉΓòÉΓòÉ 7.2.2. Nonreentrant Functions ΓòÉΓòÉΓòÉ
  2869.  
  2870. Other nonreentrant library functions can access data or resources that are 
  2871. common to all threads in the process, including files, environment variables, 
  2872. and I/O resources. To prevent any interference among themselves, these 
  2873. functions use semaphores, provided by the OS/2 operating system, to serialize 
  2874. access to data and resources. Semaphores are described in detail in the online 
  2875. Control Program Guide and Reference. 
  2876.  
  2877. Operations involving file handles and standard I/O streams are serialized so 
  2878. that multiple threads can send output to the same stream without intermingling 
  2879. the output. 
  2880.  
  2881.  
  2882. ΓòÉΓòÉΓòÉ 7.2.2.1. Example of Serialized I/O ΓòÉΓòÉΓòÉ
  2883.  
  2884. If thread1 and thread2 execute the calls in the example below, the output could 
  2885. appear in several different ways, but never garbled as shown at the end of the 
  2886. example. 
  2887.  
  2888.  
  2889. Example of Serialized I/O
  2890.  
  2891. #include <stdio.h>
  2892.  
  2893. int done_1 = 0;
  2894. int done_2 = 0;
  2895.  
  2896. void _Optlink thread1(void)
  2897. {
  2898.    fprintf(stderr,"This is thread 1\n");
  2899.    fprintf(stderr,"More from 1\n");
  2900.    done_1 = 1;
  2901. }
  2902.  
  2903. void _Optlink thread2(void)
  2904. {
  2905.    fprintf(stderr,"This is thread 2\n");
  2906.    fprintf(stderr,"More from 2\n");
  2907.    done_2 = 1;
  2908. }
  2909.  
  2910. int main(void)
  2911. {
  2912.    _beginthread(thread1, NULL, 4096, NULL);
  2913.    _beginthread(thread2, NULL, 4096, NULL);
  2914.  
  2915.    while (1)
  2916.    {
  2917.       if (done_1 && done_2)
  2918.          break;
  2919.    }
  2920.    return 0;
  2921. }
  2922.  
  2923. /* Possible output could be:
  2924.  
  2925.         This is thread 1
  2926.         This is thread 2
  2927.         More from 1
  2928.         More from 2
  2929. or
  2930.         This is thread 1
  2931.         More from 1
  2932.         This is thread 2
  2933.         More from 2
  2934. or
  2935.         This is thread 1
  2936.         This is thread 2
  2937.         More from 2
  2938.         More from 1
  2939.  
  2940.    The output will never look like this:
  2941.  
  2942.         This is This is thrthread 1
  2943.         ead 2
  2944.         More froMore m 2
  2945.         from 1                            */
  2946.  
  2947. Several nonreentrant functions have specific restrictions: 
  2948.  
  2949.      The getc, getchar, putc, and putchar file I/O operations are implemented 
  2950.       as macros in the single-thread C libraries. In the multithread libraries, 
  2951.       they are redefined as functions to implement any necessary serialization 
  2952.       of resources. 
  2953.  
  2954.      Use the _fcloseall function only after all file I/O has been completed. 
  2955.  
  2956.      When you use printf or vprintf and the subsystem libraries, you must 
  2957.       provide the necessary serialization for stdout yourself. 
  2958.  
  2959.  The functions in the C++ I/O Stream Library are also nonreentrant. To use 
  2960.  these I/O Stream objects in a multithread environment, you must provide your 
  2961.  own serialization either using the OS/2 semaphore APIs or the IResourceLock, 
  2962.  IPrivateResource, and ISharedResource classes from the User Interface classes. 
  2963.  
  2964.  
  2965. ΓòÉΓòÉΓòÉ 7.2.3. Process Control Functions ΓòÉΓòÉΓòÉ
  2966.  
  2967. The process termination functions abort, exit, and _exit end all threads within 
  2968. the process, not just the thread that calls the termination function.  In 
  2969. general, you should allow only thread 1 to terminate a process, and only after 
  2970. all other threads have ended. 
  2971.  
  2972. Note: 
  2973.  
  2974.    1. If your program exits from a signal or exception handler it may be 
  2975.       necessary to terminate the process from a thread other than thread 1. 
  2976.  
  2977.    2. A routine that resides in a DLL must not terminate the process, except in 
  2978.       the case of a critical error.  If the DLL and the executable for the 
  2979.       process have different runtime libraries, terminating the process from 
  2980.       the DLL would bypass any onexit or atexit functions that the executable 
  2981.       may have registered. 
  2982.  
  2983.  
  2984. ΓòÉΓòÉΓòÉ 7.2.4. Signal Handling in Multithread Programs ΓòÉΓòÉΓòÉ
  2985.  
  2986. Signal handling, as described in Signal and OS/2 Exception Handling, also 
  2987. applies to the multithread environment. The default handling of signals is 
  2988. usually either to terminate the program or to ignore the signal. 
  2989. Special-purpose signal handling, however, can be complicated in the multithread 
  2990. environment. 
  2991.  
  2992. Signal handlers are registered independently on each thread. For example, if 
  2993. thread 1 calls signal as follows: 
  2994.  
  2995.    signal(SIGFPE, handlerfunc);
  2996.  
  2997. then the handler handlerfunc is registered for thread 1 only. Any other threads 
  2998. are handled using the defaults. 
  2999.  
  3000. A signal is always handled on the thread that generated it, except for 
  3001. SIGBREAK, SIGINT, and SIGTERM.  These three signals are handled on the thread 
  3002. that generated them only if they were raised using the raise function.  If they 
  3003. were raised by an exception, they will be handled on thread 1. 
  3004.  
  3005. For more information and examples on handling signals, refer to Signal and OS/2 
  3006. Exception Handling. 
  3007.  
  3008.  
  3009. ΓòÉΓòÉΓòÉ 7.2.5. Global Data and Variables ΓòÉΓòÉΓòÉ
  3010.  
  3011. The following two variables need to have a unique value for each thread in 
  3012. which they are defined: 
  3013.  
  3014.      errno 
  3015.      _doserrno 
  3016.  When a thread defines either of these two variables, it automatically gets its 
  3017.  own value for them that is not affected by the values that the variables might 
  3018.  have in other threads.  Other variables, such as _environ are common across 
  3019.  all threads and do not automatically get unique values in each thread that 
  3020.  uses them. 
  3021.  
  3022.  For example, the following program shows how the value of errno is unique to 
  3023.  each thread.  Although an error occurs in the thread openProc, the value of 
  3024.  errno is 0 because it is checked from the main thread. 
  3025.  
  3026.  
  3027.   Example of a Per-Thread Variable
  3028.  
  3029.   #include <stdio.h>
  3030.   #include <stdlib.h>
  3031.   #include <string.h>
  3032.   #include <errno.h>
  3033.  
  3034.   int done = 0;
  3035.  
  3036.   void _Optlink openProc(void * argument)
  3037.   {
  3038.      FILE *filePointer ;
  3039.      filePointer = fopen("C:\\OS2","w");
  3040.      printf("openProc, errno = %d\n",errno);
  3041.      done = 1;
  3042.   }
  3043.  
  3044.   int main(void)
  3045.   {
  3046.      char holder[80];
  3047.  
  3048.      errno = 0 ;
  3049.      _beginthread(openProc,NULL,4096,NULL) ;
  3050.  
  3051.      while (1)  /* Break only when the thread is done. */
  3052.      {
  3053.         printf("Press <enter> to continue.\n");
  3054.         gets(holder);
  3055.         if (done)
  3056.            break ;
  3057.         printf("The thread is still executing! \n");
  3058.      }
  3059.  
  3060.      printf("Main program, errno = %d.\n",errno);
  3061.      return 0;
  3062.  
  3063.      /* The expected output is:
  3064.  
  3065.         Press <enter> to continue.
  3066.         openProc, errno = 60
  3067.  
  3068.         Main program, errno = 0.     */
  3069.  
  3070.   }
  3071.  
  3072.  When you call longjmp, the buffer you pass to it must have been initialized by 
  3073.  a call to setjmp on the same thread. If the buffer was not initialized on the 
  3074.  same thread, the process terminates. 
  3075.  
  3076.  The internal buffers used by asctime, ctime, gmtime, and localtime are also 
  3077.  allocated on a per-thread basis. That is, these functions return addresses of 
  3078.  buffers that are specific to the thread from where the function was called. 
  3079.  
  3080.  There is one seed per thread for generating random numbers with the rand and 
  3081.  srand functions. This ensures that the pseudorandom numbers generated in each 
  3082.  thread are independent of other threads. Each thread starts with the same seed 
  3083.  (1); that is, each thread gets the same sequence of pseudorandom numbers 
  3084.  unless the seed is changed by a call to srand. 
  3085.  
  3086.  
  3087. ΓòÉΓòÉΓòÉ 7.2.5.1. Global Variables Requiring Serialization ΓòÉΓòÉΓòÉ
  3088.  
  3089. These global variables containing environment strings should be treated as 
  3090. read-only data. They should only be modified by library functions: 
  3091.  
  3092.    int _daylight;
  3093.    long _timezone;
  3094.    char *_tzname[2];
  3095.  
  3096.    char _osmajor;
  3097.    char _osminor;
  3098.    char _osmode;
  3099.  
  3100.    char **_environ;
  3101.  
  3102. Note:  The _timezone variable contains the time difference (in seconds) between 
  3103. the local time and Greenwich Mean Time (GMT). 
  3104.  
  3105. The environment strings are copied from the OS/2 environment when a program 
  3106. starts. This procedure is the same in multithread and single thread programs. 
  3107. Because all threads share the environment strings, any change made to the 
  3108. strings by one thread affects the environment accessed by the other threads. 
  3109.  
  3110. to set the environment variables. Each thread can call getenv to obtain a copy 
  3111. of the environment strings and copy the string to a private data buffer so that 
  3112. any later changes to the environment by putenv will not affect it. If the 
  3113. thread must always access the latest version of the environment strings, it 
  3114. must call getenv each time. The putenv and getenv functions are described in 
  3115. the C Library Reference. 
  3116.  
  3117.  
  3118. ΓòÉΓòÉΓòÉ 7.2.5.2. Using Common Variables ΓòÉΓòÉΓòÉ
  3119.  
  3120. User variables that are referenced by multiple threads should have the 
  3121. attribute volatile to ensure that all changes to the value of the variable are 
  3122. performed immediately by the compiler. For example, because of the way the 
  3123. compiler optimizes code, the following example may not work as intended when 
  3124. compiled with the /O+ option: 
  3125.  
  3126. static int common_var;
  3127.  
  3128. /*  code executing in thread 1  */
  3129.  
  3130.    common_var = 0;
  3131.        ...
  3132.    common_var = 1;
  3133.        ...
  3134.    common_var = 2;
  3135.  
  3136. /*  code executing in thread 2  */
  3137.  
  3138.    switch (common_var)
  3139.    {
  3140.       case 0:
  3141.           ...
  3142.         break;
  3143.       case 1:
  3144.           ...
  3145.         break;
  3146.       default:
  3147.           ...
  3148.         break;
  3149.     }
  3150.  
  3151. When optimizing, the compiler may not immediately store the value 1 for the 
  3152. variable common_var in thread 1. If it determines that common_var is not 
  3153. accessed by this code until after the value 2 is stored, it may never store the 
  3154. value 1. Thread 2 therefore does not necessarily access the true value of 
  3155. common_var. 
  3156.  
  3157. Declaring a variable as volatile indicates to the compiler that references to 
  3158. the variable have side effects, or that the variable may change in ways the 
  3159. compiler cannot determine. Optimization will not eliminate any action involving 
  3160. the volatile variable, and changes to the value of the variable are then stored 
  3161. immediately. 
  3162.  
  3163.  
  3164. ΓòÉΓòÉΓòÉ 7.3. Compiling and Linking Multithread Programs ΓòÉΓòÉΓòÉ
  3165.  
  3166. When you compile your multithread program, you must specify that you want to 
  3167. use the multithread libraries described in Using the Multithread Libraries. 
  3168. Because threads share data, the operating system and library functions must 
  3169. ensure that only one thread is reading or writing data at one time. The 
  3170. multithread libraries provide this support. (You can use these libraries for 
  3171. single-thread programs, but the multithread support causes unnecessary 
  3172. overhead.) 
  3173.  
  3174. To indicate that you want the multithread libraries, specify the /Gm+ compiler 
  3175. option.  For example: 
  3176.  
  3177.    icc /Gm+ mymulti.c
  3178.  
  3179. Conversely, the /Gm- option, which is the default, specifies explicitly to use 
  3180. the single-thread version of the library. 
  3181.  
  3182. If you intend to compile your source code into separate modules and then link 
  3183. them into one executable program file, you must compile each module using the 
  3184. /Gm+ option and ensure that the multithread libraries are used when you link 
  3185. them. You cannot mix modules that have been compiled with /Gm+ with modules 
  3186. compiled using /Gm-. 
  3187.  
  3188. You can use either static (/Gd-) or dynamic (/Gd+) linking with multithread 
  3189. programs. 
  3190.  
  3191.  
  3192. ΓòÉΓòÉΓòÉ 7.4. Sample Multithread Program ΓòÉΓòÉΓòÉ
  3193.  
  3194. If you installed the sample programs, there will be created in your 
  3195. VisualAge C++ Samples folder, a project called SAMPLE2A and a second project 
  3196. called SAMPLE2B.  Make and debug these projects to see how they work.  (For 
  3197. information on making and debugging projects, see the User's Guide.) 
  3198.  
  3199. Alternatively, you can build and run the samples from the command line.  The 
  3200. files for SAMPLE2A and SAMPLE2B are found in the 
  3201. \IBMCPP\SAMPLES\COMPILER\SAMPLE02 directory under the main VisualAge C++ 
  3202. directory.  The read.me file in that directory describes the process for 
  3203. running the programs from the command line. 
  3204.  
  3205.  
  3206. ΓòÉΓòÉΓòÉ 8. Building Dynamic Link Libraries ΓòÉΓòÉΓòÉ
  3207.  
  3208. Dynamic linking is the process of resolving references to external data and 
  3209. code at runtime or loadtime instead of at link time.  A dynamic link library is 
  3210. an object module which can be shared by more than one process. You can 
  3211. dynamically link with the supplied VisualAge C++ runtime DLLs, as well as with 
  3212. your own DLLs. The advantages of using a dynamic link library include: 
  3213.  
  3214.      smaller memory requirement as several applications can all share the same 
  3215.       dynamic link library instead of each application having its own copy of 
  3216.       the functions contained in the DLL. 
  3217.      simplified application modification because modifications to an 
  3218.       application's object module does not necessitate recompilation of the 
  3219.       DLL. 
  3220.      flexible software support as DLL object modules can be replaced with 
  3221.       newly released, improved versions without forcing recompilation of the 
  3222.       application code. 
  3223.  
  3224.  There are basically two types of dynamic link libraries (DLLs) -- those which 
  3225.  contain code and those which do not.  An example of the latter are resource 
  3226.  DLL's which contain no code, only resources such as menus or icons that are 
  3227.  used by Presentation Manager.  Dynamic Link Libraries which contain code can 
  3228.  be further classified along three dimensions: whether they statically or 
  3229.  dynamically link to the VisualAge C++ runtime, whether they support 
  3230.  multithread or only singlethread executables, and whether they use the full 
  3231.  system or only the subsystem libraries. 
  3232.  
  3233.  This chapter describes the steps for creating and using a dynamic link 
  3234.  library: 
  3235.  
  3236.    1. Creating DLL Source Files 
  3237.    2. Creating a Module Definition File 
  3238.    3. Compiling and Linking Your DLL 
  3239.    4. Using Your DLL 
  3240.  
  3241.  This chapter also provides information on: 
  3242.  
  3243.      Initializing and Terminating the DLL Environment 
  3244.      Writing Your Own _DLL_InitTerm Function 
  3245.      Creating C++ DLLs 
  3246.      Creating Resource DLLs 
  3247.      Creating Your Own Runtime Library DLLs 
  3248.  
  3249.  Examples are provided to illustrate the process: 
  3250.  
  3251.      Sample Program to Build a DLL 
  3252.      Example of a User-Created _DLL_InitTerm Function 
  3253.  
  3254.  The examples shown are from the SAMPLE03 project. If you installed the sample 
  3255.  programs, you will find the SAMPLE03 project in the VisualAge C++ Samples 
  3256.  folder. For information on how to build and debug a project, see the User's 
  3257.  Guide Alternatively, you can compile, link, and run the sample from the 
  3258.  command line.  The files for SAMPLE03 are found in the 
  3259.  \IBMCPP\SAMPLES\COMPILER\SAMPLE03 directory under the main VisualAge C++ 
  3260.  directory, along with a readme file that describes the process. 
  3261.  
  3262.  
  3263. ΓòÉΓòÉΓòÉ 8.1. Creating DLL Source Files ΓòÉΓòÉΓòÉ
  3264.  
  3265. To build a DLL, you must first create source files containing the data and/or 
  3266. functions that you want to include in your DLL. No special file extension is 
  3267. required for DLL source files. The source code can be written in C or C++. 
  3268.  
  3269. Each function that you want to export from the DLL (that is, a function that 
  3270. you plan to call from other executable modules or DLLs) must be an external 
  3271. function, either by default or by being qualified with the extern keyword. 
  3272. Otherwise, the linker will not find your function references and will generate 
  3273. errors. 
  3274.  
  3275. If your DLL and the modules that access it do not dynamically link to the same 
  3276. runtime DLL, you must use the #pragma handler directive to ensure OS/2 
  3277. exceptions are handled properly within your DLL. Use #pragma handler at the 
  3278. entry point of each DLL function to register the library exception handler 
  3279. _Exception.  On exit from the function, code will also be generated to 
  3280. deregister _Exception. 
  3281.  
  3282. Note:  You need to explicitly register the exception handler only for the 
  3283. functions that will be exported from the DLL. 
  3284.  
  3285. For more information on #pragma handler, see the online Language Reference. For 
  3286. information on exception handling, see Signal and OS/2 Exception Handling. 
  3287.  
  3288.  
  3289. ΓòÉΓòÉΓòÉ 8.1.1. Example of a DLL Source File ΓòÉΓòÉΓòÉ
  3290.  
  3291. The file SAMPLE03.C is the source file for the DLL used in the SAMPLE03 project 
  3292. in the VisualAge C++ SAMPLES folder.  The file can be found in the 
  3293. \IBMCPP\SAMPLES\COMPILER\SAMPLE03 directory under the main VisualAge C++ 
  3294. directory. 
  3295.  
  3296. The source file contains the code for: 
  3297.  
  3298.      Three sorting functions: bubble, insertion, and selection 
  3299.      Two static functions, swap and compare, that are called by the sorting 
  3300.       functions 
  3301.      A function, list, that lists the contents of an array. 
  3302.  
  3303.  
  3304. ΓòÉΓòÉΓòÉ 8.2. Creating a Module Definition File ΓòÉΓòÉΓòÉ
  3305.  
  3306. A module definition (.DEF) file is a plain text file that describes the names, 
  3307. attributes, exports, imports, and other characteristics of an application or 
  3308. dynamic link library.  You must use a module definition file when you create 
  3309. any OS/2 DLL. 
  3310.  
  3311.  This section discusses: 
  3312.  
  3313.      Defining Code and Data Segments, 
  3314.      Defining Functions to be Exported, and 
  3315.      shows an Example of a Module Definition File.. 
  3316.  
  3317.  
  3318. ΓòÉΓòÉΓòÉ 8.2.1. Example of a Module Definition File ΓòÉΓòÉΓòÉ
  3319.  
  3320. The .DEF file for the SAMPLE03 program is shown here to illustrate the most 
  3321. common statements used in a module definition file to build DLLs. For a 
  3322. complete description of module definition files, refer to the User's Guide for 
  3323. the VisualAge C++ linker utility. 
  3324.  
  3325.  
  3326. SAMPLE03.DEF - DLL Module Definition File
  3327.  
  3328. LIBRARY SAMPLE03 INITINSTANCE TERMINSTANCE
  3329. PROTMODE
  3330. DATA MULTIPLE NONSHARED READWRITE LOADONCALL
  3331. CODE LOADONCALL
  3332. EXPORTS
  3333.    nSize     ; array size
  3334.    pArray    ; pointer to base of array of ints
  3335.    nSwaps    ; number of swaps required to sort the array
  3336.    nCompares ; number of comparisons required to sort the array
  3337.    list      ; array listing function
  3338.    bubble    ; bubble sort function
  3339.    insertion ; insertion sort function
  3340.  
  3341. Note:  In this module definition file, the EXPORTS statement does not include 
  3342. the selection function because the source code contains a #pragma export 
  3343. statement for selection. 
  3344.  
  3345. The module statements specified in the .DEF file are as follows: 
  3346.  
  3347.  LIBRARY SAMPLE03 INITINSTANCE TERMINSTANCE 
  3348.            This statement identifies the executable file as a dynamic link 
  3349.            library and specifies that SAMPLE03 is the name of the DLL. It also 
  3350.            uses the following attributes to specify when the _DLL_InitTerm 
  3351.            function will be called: 
  3352.  
  3353.            INITINSTANCE 
  3354.                     The function is called the first time the DLL is loaded for 
  3355.                     each process that accesses the DLL. The alternative is 
  3356.                     INITGLOBAL; the function is called only the first time the 
  3357.                     DLL is loaded. 
  3358.  
  3359.                     INITGLOBAL is the default. 
  3360.  
  3361.            TERMINSTANCE 
  3362.                     The function is called the last time the DLL is freed for 
  3363.                     each process that accesses the DLL. The alternative is 
  3364.                     TERMGLOBAL; the function is called only the final time the 
  3365.                     DLL is freed. 
  3366.  
  3367.                     TERMGLOBAL is the default. 
  3368.  
  3369.  PROTMODE 
  3370.            This statement specifies that the DLL can be run in protected (OS/2) 
  3371.            mode only. 
  3372.  
  3373.  DATA MULTIPLE NONSHARED READWRITE LOADONCALL 
  3374.            This statement defines the default attributes for data segments 
  3375.            within the DLL.  The attributes are: 
  3376.  
  3377.            MULTIPLE 
  3378.                     Specifies that there is a unique copy of the data segment 
  3379.                     for each process.  The alternative is SINGLE; there is only 
  3380.                     one data segment for all processes to share. 
  3381.  
  3382.                     SINGLE is the default for DLL's. 
  3383.  
  3384.                     MULTIPLE is the default for applications. 
  3385.  
  3386.            NONSHARED 
  3387.                     Specifies that the data segment cannot be shared and must 
  3388.                     be loaded separately for each process.  The alternative is 
  3389.                     SHARED; one copy of the segment is loaded and shared by all 
  3390.                     processes that access the module. 
  3391.  
  3392.                     SHARED is the default for DLLs, NONSHARED is the default 
  3393.                     for applications. 
  3394.  
  3395.                     Note that if you use the READONLY attribute, data segments 
  3396.                     are always shared. 
  3397.  
  3398.                     Note:  If the two above data segment attributes conflict, 
  3399.                     such as SINGLE NONSHARED or MULTIPLE SHARED, the behaviour 
  3400.                     is undefined. 
  3401.  
  3402.            READWRITE 
  3403.                     Means that you can read from or write to the data segment. 
  3404.                     The alternative is READONLY; you can only read from the 
  3405.                     data segment. 
  3406.  
  3407.                     READWRITE is the default. 
  3408.  
  3409.            LOADONCALL 
  3410.                     Means that the data segment is loaded into memory when it 
  3411.                     is first accessed. LOADONCALL is the default. 
  3412.  
  3413.                     Note:  You can also specify PRELOAD, but Version 2.0 and 
  3414.                     later of the OS/2 operating system ignore the PRELOAD 
  3415.                     attribute and use the LOADONCALL instead. 
  3416.  
  3417.            See Defining Code and Data Segments for information on defining your 
  3418.            own data segments. 
  3419.  
  3420.  CODE LOADONCALL 
  3421.            This statement defines the default attributes for code segments 
  3422.            within the DLL. LOADONCALL means that the code segment is loaded 
  3423.            when it is first accessed. LOADONCALL is the default. 
  3424.  
  3425.            Note:  You can also specify PRELOAD, but Version 2.0 and later of 
  3426.            the OS/2 operating system ignore the PRELOAD attribute and use the 
  3427.            LOADONCALL instead. 
  3428.  
  3429.            For information on defining your own code segments, see Defining 
  3430.            Code and Data Segments. 
  3431.  
  3432.  EXPORTS 
  3433.            This statement defines the names of the functions and variables to 
  3434.            be exported to other runtime modules. Following the EXPORTS keyword 
  3435.            are the export definitions, which are simply the names of the 
  3436.            functions and variables that you want to export.  Each name must be 
  3437.            entered on a separate line. See Defining Functions to be Exported 
  3438.            for more information. 
  3439.  
  3440.  Note:  When you build your DLL using /Gd-, so that it is statically linked to 
  3441.         the runtime library, you must specify the following attributes in your 
  3442.         .DEF file: 
  3443.  
  3444.       INITINSTANCE 
  3445.       TERMINSTANCE 
  3446.       DATA MULTIPLE NONSHARED 
  3447.  
  3448.  
  3449. ΓòÉΓòÉΓòÉ 8.2.2. Defining Code and Data Segments ΓòÉΓòÉΓòÉ
  3450.  
  3451. In the .DEF file shown, all data and code segments are given the same 
  3452. attributes. If you want to specify different attributes for different sets of 
  3453. data or code, you can use the #pragma data_seg and #pragma alloc_text 
  3454. directives to define your own data and code segments, or the /Nd and /Nt 
  3455. compiler options to specify the name of the default data or code segments, 
  3456. respectively. You can then list the segments in the .DEF file under the heading 
  3457. SEGMENTS, and specify attributes for each. For example: 
  3458.  
  3459.    SEGMENTS
  3460.       mydata SHARED READONLY
  3461.       mycode PRELOAD
  3462.  
  3463. Any segments that you do not specify under SEGMENTS are given the attributes 
  3464. specified by the DATA or CODE statement, depending on the type of segment. 
  3465.  
  3466. For more information about #pragma data_seg and pragma alloc_text, see the 
  3467. online Language Reference. The /Nd and /Nt options are described in the User's 
  3468. Guide. 
  3469.  
  3470.  
  3471. ΓòÉΓòÉΓòÉ 8.2.3. Defining Functions to be Exported ΓòÉΓòÉΓòÉ
  3472.  
  3473. When you export a function from a DLL, you make it available to programs that 
  3474. call the DLL.  If you do not export a function, it can only be used within the 
  3475. DLL itself. 
  3476.  
  3477. To export a function, list its name under the EXPORTS keyword in the .DEF file 
  3478. as described below. Note that if your DLL is written in C++, you must specify 
  3479. the mangled or encoded name of the function. A utility is provided to assist 
  3480. you with this task.  For an explanation of how to use the CPPFILT utility to 
  3481. mangle and demangle function names, see Demangling (Decoding) C++ Function 
  3482. Names. 
  3483.  
  3484. You can also use #pragma export or the _Export keyword to specify that a 
  3485. function is to be exported.  For example, in SAMPLE03.C, the function selection 
  3486. is declared to be exported by a #pragma export directive. The #pragma directive 
  3487. also allows you to specify the name the exported function will have outside of 
  3488. the DLL and its ordinal number. When you use the keyword or #pragma directive 
  3489. for C++ functions, use the normal function name, not the encoded name. 
  3490.  
  3491. If you use #pragma export or _Export to export your function, you may still 
  3492. need to provide an EXPORTS entry for that function. If your function has all of 
  3493. the following default characteristics 
  3494.  
  3495.      Has no I/O privileges, and 
  3496.      Is exported by ordinal.  (If this is the case, you do not want the system 
  3497.       loader to also keep its name resident in memory.) 
  3498.  it does not require an EXPORTS entry. If your function has characteristics 
  3499.  other than the defaults, the only way you can specify them is with an EXPORTS 
  3500.  entry in your .DEF file. 
  3501.  
  3502.  For more information about _Export and #pragma export, see the online Language 
  3503.  Reference. 
  3504.  
  3505.  Additional C++ Considerations 
  3506.  
  3507.  For C++ DLLs, ensure that you export all member functions that are required. 
  3508.  If an inlined or exported function uses private or protected members, you must 
  3509.  also export those members. In addition, you should export all static data 
  3510.  members. If you do not export the static data members of a particular class, 
  3511.  users of that class cannot debug their code because the reference to the 
  3512.  static data members cannot be resolved. 
  3513.  
  3514.  
  3515. ΓòÉΓòÉΓòÉ 8.3. Compiling and Linking Your DLL ΓòÉΓòÉΓòÉ
  3516.  
  3517. To compile your source files to create a DLL, use the /Ge- compiler option. You 
  3518. may also want to use the /C+ option to compile your files without linking them, 
  3519. and then link them separately. 
  3520.  
  3521. You must also specify the runtime libraries you want to use: 
  3522.  
  3523.      Single-thread (/Gm-) or multithread (/Gm+). See Creating Multithread 
  3524.       Programs for information on multithread libraries. 
  3525.  
  3526.      Statically linked (/Gd-) or dynamically linked (/Gd+). See the User's 
  3527.       Guide for more information on static and dynamic linking. 
  3528.  
  3529.       Note:  The method of linking used for the runtime libraries is 
  3530.       independent of the module type you create; you can statically link the 
  3531.       runtime functions in a dynamic link library. 
  3532.  
  3533.  For more information on compiler options, see the User's Guide. 
  3534.  
  3535.  If your DLL contains C++ code that uses templates, there are additional 
  3536.  considerations.  See Creating C++ DLLs for details on creating a C++ DLL. 
  3537.  
  3538.  When you use icc to compile and link your DLL, you must specify on the command 
  3539.  line all the DLL source files followed by the module definition file. The name 
  3540.  of the first source file (without the file name extension) is used as the name 
  3541.  of the DLL. 
  3542.  
  3543.  For example, to compile and link the files mydlla.c and mydllb.c, using the 
  3544.  mydll.def module definition file, use the command: 
  3545.  
  3546.      icc /Ge- mydlla.c mydllb.c mydll.def
  3547.  
  3548.  The resulting DLL will be called mydlla.dll. 
  3549.  
  3550.  Note:  The /Ge- option tells the compiler you are building a DLL, rather than 
  3551.  an executable file.  The options to indicate the single-thread library (/Gm-) 
  3552.  and to link the runtime libraries statically (/Gd-) are the defaults. 
  3553.  
  3554.  If you are compiling and linking separately, you must give the following 
  3555.  information to the VisualAge C++ linker: 
  3556.  
  3557.      The compiled object (.OBJ) files for the DLL 
  3558.      The name to give the DLL 
  3559.      The C libraries to use 
  3560.      The name of the module definition file. 
  3561.  
  3562.  Note:  The compiler includes information in the object files on the C 
  3563.  libraries you indicated by the compiler options that control code generation 
  3564.  (see the User's Guide). These libraries are automatically used at link time. 
  3565.  You do not need to specify C runtime libraries on the linker command line 
  3566.  unless you want to override the ones you chose at compile time. 
  3567.  
  3568.  For example, the following commands: create the DLL finaldll.dll. 
  3569.  
  3570.      icc /C+ /Ge- mydlla.c mydllb.c
  3571.        ILINK /NOI mydlla.obj mydllb.obj mydll.def /OUT:finaldll.dll
  3572.  
  3573.  These commands: 
  3574.  
  3575.      Compile the source files mydlla.c and mydllb.c 
  3576.      Link the resulting object files with the single-thread, statically linked 
  3577.       C libraries, using the definition file mydll.def 
  3578.  
  3579.  The preferred method is to use icc to both compile and invoke the linker for 
  3580.  you You could use icc to both compile and invoke the linker for you with the 
  3581.  following command: 
  3582.  
  3583.      icc /Ge- /Fefinal.dll mydlla.c mydllb.c mydll.def
  3584.  
  3585.  Note:  The icc command passes the linker option /NOI to the linker by default. 
  3586.  The /NOI option preserves the case of external names. 
  3587.  
  3588.  
  3589. ΓòÉΓòÉΓòÉ 8.4. Creating C++ DLLs ΓòÉΓòÉΓòÉ
  3590.  
  3591. When your DLL is written in C++, there are considerations that do not apply to 
  3592. DLLs written in C.  You must ensure that classes and class members are exported 
  3593. correctly, especially if they use templates. 
  3594.  
  3595. You can build C++ DLLs in one of two ways: 
  3596.  
  3597.      Using _Export and #pragma export, and 
  3598.      Using CPPFILT 
  3599.  
  3600.  The SAMPLE07 project provides examples of both methods of building C++ DLLs. 
  3601.  The files for SAMPLE07 can be found in the \IBMCPP\SAMPLES\COMPILER\SAMPLE07 
  3602.  directory. 
  3603.  
  3604.  
  3605. ΓòÉΓòÉΓòÉ 8.4.1. Using _Export and #pragma export ΓòÉΓòÉΓòÉ
  3606.  
  3607. This is the simplest method of creating a C++ DLL: 
  3608.  
  3609.    1. Use _Export or #pragma export in your source files to specify the classes 
  3610.       and functions (including member functions) that you want to export from 
  3611.       your DLL. For example: 
  3612.  
  3613.                class triangle : public area
  3614.                {
  3615.                   public:
  3616.                      static int _Export objectCount;
  3617.                      double _Export getarea();
  3618.                      _Export triangle::triangle(void);
  3619.                };
  3620.  
  3621.       exports the getarea function and the constructor for class triangle. 
  3622.       Alternatively, you could use #pragma export: 
  3623.  
  3624.                #pragma export(triangle::objectCount(),,1)
  3625.                #pragma export(triangle::getarea(),,1)
  3626.                #pragma export(triangle::triangle(void),,2)
  3627.  
  3628.       Important  You must always export constructors and destructors. 
  3629.  
  3630.       The _Export keyword and #pragma directive are described in more detail in 
  3631.       the online Language Reference. 
  3632.  
  3633.    2. Create a .DEF file as described in Creating a Module Definition File. Do 
  3634.       not specify any entries under EXPORTS. 
  3635.  
  3636.    3. Use icc to compile and link the DLL. If you use any of the Complex, 
  3637.       Collection, or User Interface class libraries, you must specify the 
  3638.       library names on the command line for the link step. If you link in a 
  3639.       separate step, you must also specify the /Tdp option. 
  3640.  
  3641.  The SAMPLE07, METHOD1 project in the VisualAge C++ SAMPLES folder demonstrates 
  3642.  this method. Build and run it to see how it works. For directions on building 
  3643.  and running a project, see the User's Guide. 
  3644.  
  3645.  Alternatively, you can compile and link this sample from the command line. The 
  3646.  SAMPLE07 files corresponding to the SAMPLE07, METHOD1 project can be found in 
  3647.  the \IBMCPP\SAMPLES\COMPILER\SAMPLE07 directory under the main VisualAge C++ 
  3648.  directory. The readme file in that directory gives instructions for running 
  3649.  the sample from the command line. 
  3650.  
  3651.  
  3652. ΓòÉΓòÉΓòÉ 8.4.2. Using CPPFILT ΓòÉΓòÉΓòÉ
  3653.  
  3654. To build a DLL using the CPPFILT utility: 
  3655.  
  3656.    1. Compile your source files as you would for any DLL. 
  3657.  
  3658.    2. If you use templates, compile the template-include files located in the 
  3659.       TEMPINC directory under the source directory. These files contain the 
  3660.       implementation of all instantiated templates that are used in the files 
  3661.       you compiled and are needed when you link your DLL. 
  3662.  
  3663.    3. Copy the objects created from the template-include files into the 
  3664.       directory with your other DLL objects. 
  3665.  
  3666.    4. Run CPPFILT on all your object files together. Because CPPFILT sends 
  3667.       output to stdout, ensure you redirect the output to a file. For example: 
  3668.  
  3669.                CPPFILT /B /P file1.obj file2.obj > cppdll.def
  3670.  
  3671.       The /B option specifies that the files are binary, and the /P option 
  3672.       specifies to include all public symbols in the CPPFILT output.  For more 
  3673.       details on the CPPFILT utility, see Using the CPPFILT Utility. 
  3674.  
  3675.    5. Edit the output file.  Delete entries for functions and variables that 
  3676.       you do not want to export from your DLL. Then create a .DEF file, 
  3677.       specifying the remaining entries under the EXPORTS heading. 
  3678.  
  3679.    6. Use icc to link your objects, libraries, and .DEF file into a DLL. If you 
  3680.       use any of the Complex, Collection, or User Interface classes, you must 
  3681.       specify the library names on the command line. You must also specify the 
  3682.       /Tdp option. 
  3683.  
  3684.    7. Erase the template-include objects that you have included in the DLL so 
  3685.       they are not linked into any applications that use your DLL. 
  3686.       Alternatively, use the /Ft- option when you link the accessing 
  3687.       applications.  If these objects are included more than once, the linker 
  3688.       will generate error messages about multiply-defined symbols. 
  3689.  
  3690.  The SAMPLE07, METHOD2 project in the VisualAge C++ SAMPLES folder demonstrates 
  3691.  this method.  Build and run the project to see how it works. For directions on 
  3692.  building and running a project, see the User's Guide. 
  3693.  
  3694.  Alternatively, you can compile and link this sample from the command line. To 
  3695.  compile and link this sample, follow the directions contained in the readme 
  3696.  file in the \IBMCPP\SAMPLES\COMPILER\SAMPLE07 directory. The SAMPLE07 files 
  3697.  corresponding to the SAMPLE07, METHOD2 project can be found in the 
  3698.  \IBMCPP\SAMPLES\COMPILER\SAMPLE07 directory under the main VisualAge C++ 
  3699.  directory. 
  3700.  
  3701.  
  3702. ΓòÉΓòÉΓòÉ 8.4.3. Exporting Virtual Function Tables from a DLL ΓòÉΓòÉΓòÉ
  3703.  
  3704. Follow these steps to export a VFT from a DLL: 
  3705.  
  3706.      A virtual function table (VFT) is usually generated in the compilation 
  3707.       unit that defines the first non-inline virtual function in a class.  You 
  3708.       can use the /Wvft option to find out which function that is.  The object 
  3709.       file that contains the definition for this function will also contain the 
  3710.       VFT. 
  3711.      Once you know which object file contains the VFT, you can use CPPFILT to 
  3712.       dump the symbols in the object file.  One of these symbols will be the 
  3713.       name of the VFT that you want to export. 
  3714.      After you have determined what the name of the VFT is, you can either use 
  3715.       the output of CPPFILT directly in the .DEF file or you can manually add 
  3716.       an entry for the VFT in the .DEF file. 
  3717.  An example of the symbols dumped by CPPFILT 
  3718.  
  3719.  
  3720.      ;From object file:  os2prod\object.obj
  3721.        ;PUBDEFs (Symbols available from object file):
  3722.          ;  ComentObjectRecord:::getRecordData() const
  3723.          getRecordData__Q2_18ComentObjectRecord13OMFExtensionsCFv
  3724.          ;  ObjRecNameField::ObjRecNameField(const char*)
  3725.          __ct__15ObjRecNameFieldFPCc
  3726.          ;  PubDef16ObjectRecord::getRecordData(unsigned char*&) const
  3727.          getRecordData__20PubDef16ObjectRecordCFRPUc
  3728.          ;  LNamesObjectRecord::LNamesObjectRecord(unsigned int,const unsigned char*)
  3729.          __ct__20PubDef16ObjectRecordFUlPCUc
  3730.          ;  {PubDef32ObjectRecord}ObjectRecord::virtual-fn-table-ptr
  3731.          __vft20PubDef32ObjectRecord12ObjectRecord
  3732.          ;  PubDef32ObjectRecord::PubDef32ObjectRecord(unsigned long,const unsigned char*)
  3733.          setNameString__15ObjRecNameFieldFPCc
  3734.          ;  PubDef32ObjectRecord::getRecordData(unsigned char*&) const
  3735.          getRecordData__20PubDef32ObjectRecordCFRPUc
  3736.          ;  {ComDefObjectRecord}ObjectRecord::virtual-fn-table-ptr
  3737.          __vft18ComDefObjectRecord12ObjectRecord
  3738.  
  3739.  An example of VFTs in the .DEF file. 
  3740.  
  3741.  
  3742.      NAME object   WINDOWCOMPAT
  3743.      PROTMODE
  3744.  
  3745.      IMPORTS
  3746.       ;  {PubDef32ObjectRecord}ObjectRecord::virtual-fn-table-ptr
  3747.       __vft20PubDef32ObjectRecord12ObjectRecord
  3748.       ;  {ComDefObjectRecord}ObjectRecord::virtual-fn-table-ptr
  3749.       __vft18ComDefObjectRecord12ObjectRecord
  3750.  
  3751.  
  3752. ΓòÉΓòÉΓòÉ 8.5. Using Your DLL ΓòÉΓòÉΓòÉ
  3753.  
  3754. Write the source files that are to access your DLL as if the functions and/or 
  3755. variables are to be statically linked at compile time. Then when you link the 
  3756. program, you must inform the linker that some function and/or variable 
  3757. references are to a DLL and will be resolved at run time. There are two ways to 
  3758. communicate this information to the linker: 
  3759.  
  3760.    1. Use the IMPLIB utility to create a library file with all the information 
  3761.       that the linker needs about the DLL. The IMPLIB utility uses a module 
  3762.       definition file to create an import library (.LIB) file for the DLL. 
  3763.       When you link an executable module, the linker uses this import library 
  3764.       to resolve external references to the DLL. 
  3765.  
  3766.       If your DLL contains any C++ templates, you must always access the DLL by 
  3767.       means of an import library to ensure that the names you use when you 
  3768.       instantiate the template are resolved correctly. 
  3769.  
  3770.       If you invoke the linker directly, give the name of the import library 
  3771.       where you normally specify library names.  For example: 
  3772.  
  3773.                  ILINK /NOI mymain.obj finaldll.lib;
  3774.  
  3775.       If you invoke the linker through the icc command, you must put the name 
  3776.       of the import library in the compiler invocation string.  For example: 
  3777.  
  3778.                icc mymain.c finaldll.lib
  3779.  
  3780.       See the User's Guide for more information on IMPLIB. 
  3781.  
  3782.       Note:  The import libraries for the VisualAge C++ runtime DLLs have been 
  3783.       supplied with the compiler. 
  3784.  
  3785.    2. Construct a module definition file for the accessing module that is being 
  3786.       linked. The definition file specifies which variables and names will be 
  3787.       obtained from a DLL at run time, and in which DLLs these items will be 
  3788.       found. In general, import libraries are easier to use and maintain than 
  3789.       module definition files. 
  3790.  
  3791.  Note:  To make functions in a DLL available to other programs, the name of 
  3792.  those functions must have been exported (using #pragma export or the _Export 
  3793.  keyword in the source file, or with an EXPORT entry in the .DEF file) when the 
  3794.  DLL was linked.  Also, all DLLs must be in a directory listed in the LIBPATH 
  3795.  environment variable (as described in Setting Runtime Environment Variables). 
  3796.  
  3797.  
  3798. ΓòÉΓòÉΓòÉ 8.5.1. Deciding the Best Way to Export Functions from Your DLL ΓòÉΓòÉΓòÉ
  3799.  
  3800. There are three different ways to export the functions in a DLL so that they 
  3801. are available to other programs: 
  3802.  
  3803.    1. Using a .DEF file.  With this method, the functions are exported by name. 
  3804.       It can be difficult to write and maintain C++ .DEF files because you must 
  3805.       use the mangled names of the functions that you want to export. 
  3806.  
  3807.    2. Using the _Export keyword in the source files.  With this method, you can 
  3808.       only export the functions by ordinal. Furthermore, you cannot control 
  3809.       which ordinal is assigned to a particular function. This is the easiest 
  3810.       method for exporting functions, but it can cause problems if other 
  3811.       programs that use the DLL depend on a particular set of ordinals.  If the 
  3812.       DLL has to be updated, the compiler may assign different ordinals to the 
  3813.       exported functions. 
  3814.  
  3815.    3. Using #pragma export in the source files.  With this method, you can only 
  3816.       export the functions by ordinal, but you have the choice of choosing the 
  3817.       ordinal for a function yourself or letting the compiler choose it for 
  3818.       you.  With this method, you can specify the assignment of ordinals to 
  3819.       exported functions.  When you update a DLL, you can keep these 
  3820.       assignments.  This means that programs that use functions from this DLL 
  3821.       will not have to be updated when the DLL is updated. 
  3822.  
  3823.  The advantage of using a .DEF file to export functions is that changing the 
  3824.  DLL will not affect other programs that use functions in the DLL.  The 
  3825.  disadvantage of using a .DEF file is that the load time can be greater for the 
  3826.  code that uses the DLL, and it takes time to create the .DEF file itself. 
  3827.  
  3828.  
  3829. ΓòÉΓòÉΓòÉ 8.5.2. Sample Definition File for an Executable Module ΓòÉΓòÉΓòÉ
  3830.  
  3831. The following figure shows the module definition file used for the main program 
  3832. in the sample project SAMPLE03. 
  3833.  
  3834.  
  3835. MAIN03.DEF - Definition File for an Executable Module
  3836.  
  3837. NAME MAIN03 WINDOWCOMPAT
  3838.  
  3839. IMPORTS
  3840.    SAMPLE03.nSize
  3841.    SAMPLE03.pArray
  3842.    SAMPLE03.nSwaps
  3843.    SAMPLE03.nCompares
  3844.    SAMPLE03.list
  3845.    SAMPLE03.bubble
  3846.    SAMPLE03.insertion
  3847.  
  3848. Note:  There is no statement to import the selection function because it is 
  3849. imported using #pragma import statement in the source code. 
  3850.  
  3851. The statements given are as follows: 
  3852.  
  3853.  NAME MAIN03 WINDOWCOMPAT 
  3854.            The NAME statement assigns the name MAIN03 to the program being 
  3855.            defined. If no name is given, the name of the executable module 
  3856.            (without the .EXE extension) is used. WINDOWCOMPAT specifies that 
  3857.            the program is compatible with the PM environment.  The alternatives 
  3858.            are NOTWINDOWCOMPAT, which means the program is not compatible with 
  3859.            the PM environment, or WINDOWAPI, which means the program uses PM 
  3860.            APIs. 
  3861.  
  3862.  IMPORTS 
  3863.            This statement defines the names of functions and variables to be 
  3864.            imported for the program. Following the IMPORTS keyword are the 
  3865.            import definitions.  Each definition consists of the name of the DLL 
  3866.            where the function or variable is found and the name of the function 
  3867.            or variable. The two names must be separated by a period, and each 
  3868.            definition must be entered on a separate line. 
  3869.  
  3870.            You can also use #pragma import to specify that a function is 
  3871.            imported from a DLL. You can use this #pragma directive to import 
  3872.            the function by name or by ordinal number. 
  3873.  
  3874.            For a detailed description of #pragma import, see the online 
  3875.            Language Reference. For an example of using this pragma, see 
  3876.            MAIN03.C, the main program for the SAMPLE03 project. 
  3877.  
  3878.  
  3879. ΓòÉΓòÉΓòÉ 8.6. Initializing and Terminating the DLL Environment ΓòÉΓòÉΓòÉ
  3880.  
  3881. The initialization and termination entry point for a DLL is the _DLL_InitTerm 
  3882. function. When each new process gains access to the DLL, this function 
  3883. initializes the necessary environment for the DLL, including storage, 
  3884. semaphores, and variables. When each process frees its access to the DLL, the 
  3885. _DLL_InitTerm function terminates the DLL environment created for that process. 
  3886.  
  3887. The default _DLL_InitTerm function supplied by VisualAge C++ compiler performs 
  3888. the actions required to initialize and terminate the runtime environment. It is 
  3889. called automatically when you link to the DLL. 
  3890.  
  3891. If you require additional initialization or termination actions for your 
  3892. runtime environment, you will need to write your own _DLL_InitTerm function. 
  3893. For more information, see Writing Your Own _DLL_InitTerm Function. A sample 
  3894. _DLL_InitTerm function is included for the SAMPLE03 project (see Example of a 
  3895. User-Created _DLL_InitTerm Function.) 
  3896.  
  3897. Note:  The _DLL_InitTerm function provided in the subsystem library differs 
  3898. from the runtime version.  See Building a Subsystem DLL  for more information 
  3899. about building subsystem DLLs. 
  3900.  
  3901.  
  3902. ΓòÉΓòÉΓòÉ 8.7. Sample Program to Build a DLL ΓòÉΓòÉΓòÉ
  3903.  
  3904. The sample project SAMPLE03 shows how to build and use a DLL that contains 
  3905. three different sorting functions. These functions keep track of the number of 
  3906. swap and compare operations required to do the sorting. 
  3907.  
  3908. The files for the sample program are: 
  3909.  
  3910.  SAMPLE03.C    The source file for the DLL, described in Example of a DLL 
  3911.                Source File. 
  3912.  
  3913.  INITTERM.C    The _DLL_InitTerm function, shown in Example of a User-Created 
  3914.                _DLL_InitTerm Function. 
  3915.  
  3916.  SAMPLE03.DEF  The module definition file for the DLL, shown in Creating a 
  3917.                Module Definition File. 
  3918.  
  3919.  MAIN03.DEF    The module definition file for the executable, shown in Sample 
  3920.                Definition File for an Executable Module. 
  3921.  
  3922.  SAMPLE03.H    The user include file. 
  3923.  
  3924.  MAIN03.C      The main program. 
  3925.  
  3926.  If you installed the sample programs, these files are found in the 
  3927.  \IBMCPP\SAMPLES\COMPILER\SAMPLE03 directory under the main VisualAge C++ 
  3928.  directory. Two make files that build the sample are also provided, MAKE03S for 
  3929.  static linking and MAKE03D for dynamic linking. 
  3930.  
  3931.  Note:  You must have the Toolkit installed to use the make files. 
  3932.  
  3933.  To compile and link this sample program, from the 
  3934.  \IBMCPP\SAMPLES\COMPILER\SAMPLE03 directory, use NMAKE with the appropriate 
  3935.  make file.  For example: 
  3936.  
  3937.      nmake all /f MAKE03S
  3938.  
  3939.  To compile and link the program yourself, use the following commands: 
  3940.  
  3941.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  3942.   Γöé COMMAND                    Γöé DESCRIPTION          Γöé
  3943.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3944.   Γöé "icc /Ge- /B"/NOE" /DSTATIC_LINK SAMPLE03.C  Γöé Compiles and links      Γöé
  3945.   Γöé INITTERM.C SAMPLE03.DEF"            Γöé "SAMPLE03.C" using default  Γöé
  3946.   Γöé                        Γöé options and          Γöé
  3947.   Γöé                        Γöé                Γöé
  3948.   Γöé                        Γöé o  Creates a DLL ("/Ge-")  Γöé
  3949.   Γöé                        Γöé o  Passes the "/NOE" option Γöé
  3950.   Γöé                        Γöé   to the linker (see    Γöé
  3951.   Γöé                        Γöé   description below)    Γöé
  3952.   Γöé                        Γöé o  Defines "STATIC_LINK".  Γöé
  3953.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  3954.   Γöé "icc MAIN03.C MAIN03.DEF"           Γöé Compiles "MAIN03.C" using   Γöé
  3955.   Γöé                        Γöé default options.       Γöé
  3956.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  3957.  
  3958.  The /NOE linker option tells the linker to ignore the extended library 
  3959.  information found in the object files. The linker then uses the version of 
  3960.  _DLL_InitTerm that you provide instead of the one from the VisualAge C++ 
  3961.  runtime library. 
  3962.  
  3963.  To run the program, enter  MAIN03. 
  3964.  
  3965.  
  3966. ΓòÉΓòÉΓòÉ 8.8. Writing Your Own _DLL_InitTerm Function ΓòÉΓòÉΓòÉ
  3967.  
  3968. If your DLL requires initialization or termination actions in addition to the 
  3969. actions performed for the runtime environment, you will need to create your own 
  3970. _DLL_InitTerm function. The prototype for the _DLL_InitTerm function is: 
  3971.  
  3972.    unsigned long _System. _DLL_InitTerm(unsigned long modhandle,
  3973.                                                unsigned long flag);
  3974.  
  3975. If the value of the flag parameter is 0, the DLL environment is initialized. If 
  3976. the value of the flag parameter is 1, the DLL environment is ended. 
  3977.  
  3978. The modhandle parameter is the module handle assigned by the operating system 
  3979. for this DLL. The module handle can be used as a parameter to various OS/2 API 
  3980. calls.  For example, DosQueryModuleName can be used to return the fully 
  3981. qualified path name of the DLL, which tells you where the DLL was loaded from. 
  3982.  
  3983. The return code from _DLL_InitTerm tells the loader if the initialization or 
  3984. termination was performed successfully. If the call was successful, 
  3985. _DLL_InitTerm returns a nonzero value. A return code of 0 indicates that the 
  3986. function failed. If a failure is indicated, the loader will not load the 
  3987. program that is accessing the DLL. 
  3988.  
  3989. Because it is called by the operating system loader, the _DLL_InitTerm function 
  3990. must be compiled using _System linkage. 
  3991.  
  3992. Note:  A _DLL_InitTerm function for a subsystem DLL has the same prototype, but 
  3993. the content of the function is different because there is no runtime 
  3994. environment to initialize or terminate. For an example of a _DLL_InitTerm 
  3995. function for a subsystem DLL, see Example of a Subsystem _DLL_InitTerm 
  3996. Function. 
  3997.  
  3998.  
  3999. ΓòÉΓòÉΓòÉ 8.8.1. Initializing the Environment ΓòÉΓòÉΓòÉ
  4000.  
  4001. Before you can call any VisualAge C++ library functions, you must first 
  4002. initialize the runtime environment. Use the function _CRT_init, which is 
  4003. provided in the runtime libraries. The prototype for this function is: 
  4004.  
  4005.    int _CRT_init(void);
  4006.  
  4007. If the runtime environment is successfully initialized, _CRT_init returns 0.  A 
  4008. return code of -1 indicates an error. If an error occurs, an error message is 
  4009. written to file handle 2, which is the usual destination of stderr. 
  4010.  
  4011. If your DLL contains C++ code, you must also call __ctordtorInit after 
  4012. _CRT_init to ensure that static constructors and destructors are initialized 
  4013. properly.  The prototype for __ctordtorInit is: 
  4014.  
  4015.    void __ctordtorInit(void);
  4016.  
  4017. Note:  If you are providing your own version of the _matherr function to be 
  4018. used in your DLL, you must call the _exception_dllinit function after the 
  4019. runtime environment is initialized. Calling this function ensures that the 
  4020. proper _matherr function will be called during exception handling. The 
  4021. prototype for this function is: 
  4022.  
  4023.    void _Optlink _exception_dllinit( int (*)(struct exception *) );
  4024.  
  4025. The parameter required is the address of your _matherr function. 
  4026.  
  4027.  
  4028. ΓòÉΓòÉΓòÉ 8.8.2. Terminating the Environment ΓòÉΓòÉΓòÉ
  4029.  
  4030. If your DLL is statically linked, you must use the _CRT_term function to 
  4031. correctly terminate the C runtime environment.  The _CRT_term function is 
  4032. provided in the VisualAge C++ runtime libraries. It has the following 
  4033. prototype: 
  4034.  
  4035.    void _CRT_term(void);
  4036.  
  4037. If your DLL contains C++ code, you must also call __ctordtorTerm before you 
  4038. call _CRT_term to ensure that static constructors and destructors are 
  4039. terminated correctly. The prototype for __ctordtorTerm is: 
  4040.  
  4041.    void __ctordtorTerm(void);
  4042.  
  4043. Once you have called _CRT_term, you cannot call any other library functions. 
  4044.  
  4045. If your DLL is dynamically linked, you cannot call library functions in the 
  4046. termination section of your _DLL_InitTerm function. If your termination routine 
  4047. requires calling library functions, you must register the termination routine 
  4048. with DosExitList. Note that all DosExitList routines are called before DLL 
  4049. termination routines. 
  4050.  
  4051.  
  4052. ΓòÉΓòÉΓòÉ 8.9. Example of a User-Created _DLL_InitTerm Function ΓòÉΓòÉΓòÉ
  4053.  
  4054. The following figure shows the _DLL_InitTerm function for the sample project 
  4055. SAMPLE03. 
  4056.  
  4057.  
  4058. INITTERM.C - _DLL_InitTerm Function for SAMPLE03
  4059.  
  4060. #define  INCL_DOSMODULEMGR
  4061. #define  INCL_DOSPROCESS
  4062. #include <os2.h>
  4063. #include <stdlib.h>
  4064. #include <stdio.h>
  4065. #include <string.h>
  4066.  
  4067. /* _CRT_init is the C run-time environment initialization function.         */
  4068. /* It will return 0 to indicate success and -1 to indicate failure.         */
  4069.  
  4070. int _CRT_init(void);
  4071. #ifdef   STATIC_LINK
  4072.  
  4073. /* _CRT_term is the C run-time environment termination function.            */
  4074. /* It only needs to be called when the C run-time functions are statically  */
  4075. /* linked.                                                                  */
  4076.  
  4077. void _CRT_term(void);
  4078. #else
  4079.  
  4080. /* A clean up routine registered with DosExitList must be used if runtime   */
  4081. /* calls are required and the runtime is dynamically linked.  This will     */
  4082. /* guarantee that this clean up routine is run before the library DLL is    */
  4083. /* terminated.                                                              */
  4084.  
  4085. static void _System cleanup(ULONG ulReason);
  4086. #endif
  4087. size_t nSize;
  4088. int *pArray;
  4089.  
  4090. /* _DLL_InitTerm is the function that gets called by the operating system   */
  4091. /* loader when it loads and frees this DLL for each process that accesses   */
  4092. /* this DLL.  However, it only gets called the first time the DLL is loaded */
  4093. /* and the last time it is freed for a particular process.  The system      */
  4094. /* linkage convention MUST be used because the operating system loader is   */
  4095. /* calling this function.                                                   */
  4096.  
  4097. unsigned long _System _DLL_InitTerm(unsigned long hModule, unsigned long
  4098.                                     ulFlag)
  4099. {
  4100.    size_t i;
  4101.    APIRET rc;
  4102.    char namebuf[CCHMAXPATH];
  4103.  
  4104.    /* If ulFlag is zero then the DLL is being loaded so initialization should*/
  4105.    /* be performed.  If ulFlag is 1 then the DLL is being freed so          */
  4106.    /* termination should be performed.                                      */
  4107.  
  4108.    switch (ulFlag) {
  4109.       case 0 :
  4110.  
  4111.          /*******************************************************************/
  4112.          /* The C run-time environment initialization function must be      */
  4113.          /* called before any calls to C run-time functions that are not    */
  4114.          /* inlined.                                                        */
  4115.          /*******************************************************************/
  4116.  
  4117.          if (_CRT_init() == -1)
  4118.             return 0UL;
  4119. #ifndef  STATIC_LINK
  4120.  
  4121.          /*******************************************************************/
  4122.          /* A DosExitList routine must be used to clean up if runtime calls */
  4123.          /* are required and the runtime is dynamically linked.             */
  4124.          /*******************************************************************/
  4125.  
  4126.             if (rc = DosExitList(0x0000FF00|EXLST_ADD, cleanup))
  4127.             printf("DosExitList returned %lu\n", rc);
  4128. #endif
  4129.          if (rc = DosQueryModuleName(hModule, CCHMAXPATH, namebuf))
  4130.             printf("DosQueryModuleName returned %lu\n", rc);
  4131.          else
  4132.             printf("The name of this DLL is %s\n", namebuf);
  4133.          srand(17);
  4134.          nSize = (rand()%128)+32;
  4135.          printf("The array size for this process is %u\n", nSize);
  4136.          if ((pArray = malloc(nSize *sizeof(int))) == NULL) {
  4137.             printf("Could not allocate space for unsorted array.\n");
  4138.             return 0UL;
  4139.          }
  4140.          for (i = 0; i < nSize; ++i)
  4141.             pArray[i] = rand();
  4142.          break;
  4143.       case 1 :
  4144. #ifdef   STATIC_LINK
  4145.          printf("The array will now be freed.\n");
  4146.          free(pArray);
  4147.          _CRT_term();
  4148. #endif
  4149.          break;
  4150.       default  :
  4151.          printf("ulFlag = %lu\n", ulFlag);
  4152.          return 0UL;
  4153.    }
  4154.  
  4155.    /* A non-zero value must be returned to indicate success.                */
  4156.  
  4157.    return 1UL;
  4158. }
  4159. #ifndef  STATIC_LINK
  4160. static void cleanup(ULONG ulReason)
  4161. {
  4162.    if (!ulReason) {
  4163.       printf("The array will now be freed.\n");
  4164.       free(pArray);
  4165.    }
  4166.    DosExitList(EXLST_EXIT, cleanup);
  4167.    return ;
  4168. }
  4169. #endif
  4170.  
  4171. The SAMPLE03 program is described in more detail in Sample Program to Build a 
  4172. DLL. 
  4173.  
  4174.  
  4175. ΓòÉΓòÉΓòÉ 8.10. Creating Resource DLLs ΓòÉΓòÉΓòÉ
  4176.  
  4177. Resource DLLs contain application resources that your program uses, such as 
  4178. menus, bitmaps, and dialog templates. You can define these resources in a .RC 
  4179. file using OS/2 APIs, or with the Icon Editor and Dialog Editor. Use the 
  4180. Resource Compiler to build the resources into a DLL, which is then called by 
  4181. your executable program at run time. 
  4182.  
  4183. One of the benefits of using a resource DLL instead of binding the resources 
  4184. directly into your executable file includes easier maintenance and less 
  4185. duplication of resources.  You may even be able to use a common resource DLL 
  4186. for multiple applications. 
  4187.  
  4188. Another benefit is that you can completely isolate your program from your 
  4189. resources. Translations can be made to your resource DLL without your program 
  4190. having to be recompiled or linked, or even re-bound to run in the new language. 
  4191. Alternatively, you can create a different resource DLL per locale or codepage 
  4192. setting and load either the most appropriate one based on your locale and 
  4193. codepage setting, or load the default one if a specific one is not available. 
  4194.  
  4195. For instance, you could have three resource DLLs: my844.DLL, my029.DLL, and 
  4196. myDef.dll. If running in codepage 844, load my844.DLL; in codepage 029, load 
  4197. my029.DLL; else load mydef.DLL.  Again, no changes are required to the program 
  4198. to work in a potentially endless number of codepages. 
  4199.  
  4200. To create a resource DLL: 
  4201.  
  4202.    1. Create an empty source file. By "empty" we mean a file with no code, no 
  4203.       declarations or the like. The file must be empty because it is being 
  4204.       included in a resource DLL and a resource DLL can contain only resources. 
  4205.  
  4206.    2. Create a .DEF file.  The only statement required in this file is LIBRARY 
  4207.       to specify that a DLL is to be built. 
  4208.  
  4209.    3. Create a .RC file that defines your resources. 
  4210.  
  4211.    4. Compile the source file using /C+ to specify compile only.  For example: 
  4212.  
  4213.                icc /C+ empty.c
  4214.  
  4215.       Do not specify the /Ge- option.  Specifying /Ge- causes the DLL 
  4216.       initialization and termination code to be included in the object module, 
  4217.       and the resource DLL cannot contain code. 
  4218.  
  4219.    5. Link the resulting object module, using your .DEF file, to create an 
  4220.       empty DLL: 
  4221.  
  4222.                  ILINK empty.obj mydef.def /OUT:resdll.dll
  4223.  
  4224.    6. Compile your .RC file with the Resource Compiler to create a .RES file. 
  4225.       For example: 
  4226.  
  4227.                RC /r myres.rc
  4228.  
  4229.    7. Use the Resource Compiler again to add the resources to the DLL. For 
  4230.       example: 
  4231.  
  4232.                RC myres.res resdll.dll
  4233.  
  4234.  Your application can use OS/2 APIs to load the resource DLL and access the 
  4235.  resources it contains.  Like other DLLs, resource DLLs must be in a directory 
  4236.  specified in your LIBPATH environment variable. 
  4237.  
  4238.  For more information on resources and the Resource Compiler, see the User's 
  4239.  Guide and Tools Reference. 
  4240.  
  4241.  
  4242. ΓòÉΓòÉΓòÉ 8.11. Creating Your Own Runtime Library DLLs ΓòÉΓòÉΓòÉ
  4243.  
  4244. If you are shipping your application to other users, you must use one of three 
  4245. methods to make the VisualAge C++ runtime library functions available to the 
  4246. users of your application: 
  4247.  
  4248.    1. Statically bind every module to the library (.LIB) files. 
  4249.  
  4250.       This method increases the size of your modules and also slows the 
  4251.       performance because the library environment has to be initialized for 
  4252.       each module.  Having multiple library environments also makes signal 
  4253.       handling, file I/O, and other operations more complicated. 
  4254.  
  4255.    2. Use the DLLRNAME utility to rename the VisualAge C++ library DLLs. 
  4256.  
  4257.       You can then ship the renamed DLLs with your application. DLLRNAME is 
  4258.       described in the User's Guide. 
  4259.  
  4260.    3. Create your own runtime DLLs. 
  4261.  
  4262.       This method provides one common runtime environment for your entire 
  4263.       application.  It also lets you apply changes to the runtime library 
  4264.       without relinking your application, meaning that if the VisualAge C++ 
  4265.       DLLs change, you need only rebuild your own DLL. In addition, you can 
  4266.       tailor your runtime DLL to contain only those functions you use, 
  4267.       including your own. 
  4268.  
  4269.  To create your own runtime library, follow these steps: 
  4270.  
  4271.    1. Copy and rename the appropriate VisualAge C++ .DEF file for the program 
  4272.       you are creating. For example, for a multithread program, copy 
  4273.       CPPOM30.DEF to myrtdll.def.  You must also change the DLL name on the 
  4274.       LIBRARY line of the .DEF file. The .DEF files are installed in the LIB 
  4275.       subdirectory under the main VisualAge C++ installation directory. 
  4276.  
  4277.    2. Remove any functions that you do not use directly or indirectly (through 
  4278.       other functions) from your .DEF file (myrtdll.def), file, including the 
  4279.       STUB line. Do not delete anything with the comment **** next to it; 
  4280.       variables and functions indicated by this comment are used by startup 
  4281.       functions and are always required. 
  4282.  
  4283.    3. Create a source file for your DLL, for example, myrtdll.c. If you are 
  4284.       creating a runtime library that contains only VisualAge C++ functions, 
  4285.       create an empty source file.  If you are adding your own functions to the 
  4286.       library, put the code for them in this file. 
  4287.  
  4288.    4. Compile and link your DLL files.  Use the /Ge- option to create a DLL, 
  4289.       and the appropriate option for the type of DLL you are building 
  4290.       (single-thread or multithread). For example, to create a multithread DLL, 
  4291.       use the command: 
  4292.  
  4293.                icc /Ge- /Gm+ myrtdll.c myrtdll.def
  4294.  
  4295.    5. Use the IMPLIB utility to create an import library for your DLL, as 
  4296.       described in Using Your DLL.  For example: 
  4297.  
  4298.                IMPLIB /NOI myrtdlli.lib myrtdll.def
  4299.  
  4300.    6. Use the ILIB utility to add the object modules that contain the 
  4301.       initialization and termination functions to your import library. These 
  4302.       objects are needed by all executable modules and DLLs. They are contained 
  4303.       in CPPOM30O.LIB for multithread programs and CPPOS30O.LIB for 
  4304.       single-thread programs. 
  4305.  
  4306.       See the User's Guide online documentation for information on how to use 
  4307.       ILIB. 
  4308.  
  4309.       Note:  If you do not use the ILIB utility, you must ensure that all 
  4310.       objects that access your runtime DLL are statically linked to the 
  4311.       appropriate object library. 
  4312.  
  4313.    7. Compile your executable modules and other DLLs with the /Gn+ option to 
  4314.       exclude the default library information. For example: 
  4315.  
  4316.                icc /C /Gn+ /Ge+ myprog.c
  4317.                icc /C /Gn+ /Ge- mydll.c
  4318.  
  4319.       When you link your objects, specify your own import library.  If you are 
  4320.       using or plan to use OS/2 APIs, specify OS2386.LIB also. For example: 
  4321.  
  4322.                  ILINK myprog.obj myrtdlli.lib OS2386.LIB
  4323.                  ILINK mydll.obj myrtdlli.lib OS2386.LIB
  4324.  
  4325.       To compile and link in one step, use the commands: 
  4326.  
  4327.                icc /Gn+ /Ge+ myprog.c myrtdlli.lib OS2386.LIB
  4328.                icc /Gn+ /Ge- mydll.c myrtdlli.lib OS2386.LIB
  4329.  
  4330.       Note:  If you did not use the ILIB utility to add the initialization and 
  4331.              termination objects to your import library, specify the following 
  4332.              when you link your modules: 
  4333.  
  4334.         a. CPPOS30O.LIB or CPPOM30O.LIB 
  4335.         b. Your import library 
  4336.         c. OS2386.LIB (to allow you to use OS/2 APIs) 
  4337.         d. The linker option /NOD. For example: 
  4338.  
  4339.             ILINK /NOD myprog.obj CPPOS30O.LIB myrtdlli.lib OS2386.LIB;
  4340.             ILINK /NOD mydll.obj CPPOS30O.LIB myrtdlli.lib OS2386.LIB;
  4341.  
  4342.       The /NOD option tells the linker to disregard the default libraries 
  4343.       specified in the object files and use only the libraries given on the 
  4344.       command line. If you are using icc to invoke the linker for you, the 
  4345.       commands would be: 
  4346.  
  4347.             icc /B"/NOD" myprog.c CPPOS30O.LIB myrtdlli.lib OS2386.LIB
  4348.             icc /Ge- /B"/NOD" mydll.c CPPOS30O.LIB myrtdlli.lib OS2386.LIB
  4349.  
  4350.       The linker then links the objects from the object library directly into 
  4351.       your executable module or DLL. 
  4352.  
  4353.  
  4354. ΓòÉΓòÉΓòÉ 8.11.1. Example of Creating a Runtime Library ΓòÉΓòÉΓòÉ
  4355.  
  4356. In the sample project SAMPLE03, the program MAIN03.C calls printf and srand 
  4357. from the VisualAge C++ runtime DLLs, and uses other variables and functions 
  4358. from SAMPLE03.DLL. Because SAMPLE03.DLL also uses printf and is statically 
  4359. linked to the runtime libraries, the code for the VisualAge C++ runtime 
  4360. functions it uses is linked into SAMPLE03.DLL. 
  4361.  
  4362. If these functions are included in SAMPLE03.DLL, all external references from 
  4363. MAIN03.C can be resolved by dynamically linking to this DLL. As a result, 
  4364. MAIN03.EXE will be smaller. 
  4365.  
  4366. Note:  The process described here is only possible when the user DLL links 
  4367. statically to the VisualAge C++ runtime library. 
  4368.  
  4369. Rebuild SAMPLE03.DLL to include printf and srand as exports by following these 
  4370. steps: 
  4371.  
  4372.    1. Add _printfieee and srand to SAMPLE03.DEF under the EXPORTS keyword. 
  4373.  
  4374.       Note:  When the language level is /Se, printf is mapped to _printfieee to 
  4375.       support the IEEE extensions (infinity and NaN). 
  4376.  
  4377.    2. Use CPPOS30.DEF to find what functions and variables must be exported, 
  4378.       and add them to SAMPLE03.DEF as EXPORTS. 
  4379.  
  4380.    3. Relink SAMPLE03.DLL as described in Compiling and Linking Your DLL. 
  4381.  
  4382.  After your changes, SAMPLE03.DEF should look like SAMPLE3R.DEF - Definition 
  4383.  File to Export C Runtime Functions.  The example shown in this figure is 
  4384.  actually the file SAMPLE3R.DEF, which is provided with the SAMPLE03 project. 
  4385.  
  4386.  
  4387.   SAMPLE3R.DEF - Definition File to Export C Runtime Functions
  4388.  
  4389.   LIBRARY SAMPLE03 INITINSTANCE TERMINSTANCE
  4390.   PROTMODE
  4391.   DATA MULTIPLE NONSHARED READWRITE LOADONCALL
  4392.   CODE LOADONCALL
  4393.   EXPORTS
  4394.      nSize     ; array size
  4395.      pArray    ; pointer to base of array of ints
  4396.      nSwaps    ; number of swaps required to sort the array
  4397.      nCompares ; number of comparisons required to sort the array
  4398.      list      ; array listing function
  4399.      bubble    ; bubble sort function
  4400.      selection ; selection sort function
  4401.      insertion ; insertion sort function
  4402.                ; CRT symbols required by EXE
  4403.      _printfieee
  4404.      srand
  4405.      _critlib_except                            ; ****
  4406.      _DosSelToFlat                              ; ****
  4407.      _DosFlatToSel                              ; ****
  4408.      _environ                                   ; ****
  4409.      _CRT_init                                  ; ****
  4410.      __ctordtorInit                             ; ****
  4411.      _EXE_Exception                             ; ****
  4412.      _Exception                                 ; ****
  4413.      _PrintErrMsg                               ; ****
  4414.      _exception_procinit                        ; ****
  4415.      _exception_dllinit                         ; ****
  4416.      _matherr                                   ; ****
  4417.      _terminate                                 ; ****
  4418.      __ctordtorTerm                             ; ****
  4419.      exit                                       ; ****
  4420.      free                                       ; ****
  4421.      malloc                                     ; ****
  4422.      strdup                                     ; ****
  4423.      strpbrk                                    ; ****
  4424.  
  4425.  Note:  In this definition file, the EXPORTS entry for selection is commented 
  4426.  out because selection is exported explicitly in the code with a #pragma export 
  4427.  statement. 
  4428.  
  4429.  Once you have relinked SAMPLE03.DLL, re-create MAIN03.EXE so the calls to the 
  4430.  VisualAge C++ runtime functions are resolved by dynamically linking to 
  4431.  SAMPLE03.DLL. A make file, MAKE03R, is provided to do this for you. 
  4432.  
  4433.  Note:  You must have the Toolkit installed to use the make file. 
  4434.  
  4435.  To re-create MAIN03.EXE, at the prompt in the 
  4436.  \IBMCPP\SAMPLES\COMPILER\SAMPLE03 directory under the main VisualAge C++ 
  4437.  directory, type: 
  4438.  
  4439.      nmake all /f MAKE03R
  4440.  
  4441.  To recompile and relink MAIN03.EXE yourself: 
  4442.  
  4443.    1. Use the IMPLIB utility to create an import library from SAMPLE03.DEF, 
  4444.       using the command: 
  4445.  
  4446.                 IMPLIB SAMPLE03.LIB SAMPLE03.DEF
  4447.  
  4448.    2. Compile and link MAIN03.EXE with the command: 
  4449.  
  4450.                 icc /B"/NOE /NOD" MAIN03.C CPPOS30O.LIB SAMPLE03.LIB OS2386.LIB
  4451.  
  4452.       Note:  If you compiled with the option /Gn+, the linker option /NOD is 
  4453.       not required, but you must recompile all the modules with this option. 
  4454.  
  4455.       If MAIN03.OBJ already exists, you can use the following command to create 
  4456.       MAIN.EXE by simply relinking: 
  4457.  
  4458.                ILINK /NOI /NOE /NOD MAIN03 CPPOS30O SAMPLE03 OS2386;
  4459.  
  4460.  After you have performed these steps, copy SAMPLE03.DLL to a directory listed 
  4461.  in the LIBPATH variable in your CONFIG.SYS file. You can then use the command: 
  4462.  
  4463.       MAIN03
  4464.  to run the SAMPLE03 program. 
  4465.  
  4466.  
  4467. ΓòÉΓòÉΓòÉ 9. Introduction to Locale ΓòÉΓòÉΓòÉ
  4468.  
  4469. This chapter introduces the concept of internationalization in programming 
  4470. languages and the implementation of internationalization by the use of locales. 
  4471. The locale codesets provided with the VisualAge C++ are listed and the default 
  4472. locale set noted. Customization of locales and conversion utilities provided 
  4473. with VisualAge C++ are also discussed. 
  4474.  
  4475.      Internationalization in Programming Languages 
  4476.      Locales and Localization 
  4477.  
  4478.  
  4479. ΓòÉΓòÉΓòÉ 9.1. Internationalization in Programming Languages ΓòÉΓòÉΓòÉ
  4480.  
  4481. Internationalization in programming languages is a concept that comprises 
  4482.  
  4483.      externally stored cultural data, 
  4484.      a set of programming tools to create such cultural data, 
  4485.      a set of programming interfaces to access this data, and 
  4486.      a set of programming methods that enable you to write programs that 
  4487.       modify their behavior according to the user's cultural environment, 
  4488.       specified during the program's execution. 
  4489.  
  4490.  
  4491. ΓòÉΓòÉΓòÉ 9.1.1. Elements of Internationalization ΓòÉΓòÉΓòÉ
  4492.  
  4493. A locale is a collection of data that encodes information about the cultural 
  4494. environment. The typical elements of cultural environment are as follows: 
  4495.  
  4496.  Native language 
  4497.                      The text that the executing program uses to communicate 
  4498.                      with a user or environment, that is, the natural language 
  4499.                      of the end user. 
  4500.  
  4501.  Character sets and coded character sets 
  4502.                      Maps an alphabet, the characters used in a particular 
  4503.                      language, and a collating sequence onto the set of 
  4504.                      hexadecimal values (code points) that uniquely identify 
  4505.                      each character. This mapping creates the coded character 
  4506.                      set, which is uniquely identified by the character set it 
  4507.                      encodes, the set of code point values, and the mapping 
  4508.                      between these two. 
  4509.  
  4510.  Collating and ordering 
  4511.                      The relative ordering of characters used for sorting. 
  4512.  
  4513.  Character classification 
  4514.                      Determines the type of character (alphabetic, numeric, and 
  4515.                      so forth) represented by a code point. 
  4516.  
  4517.  Character case conversion 
  4518.                      Defines the mapping between uppercase and lowercase 
  4519.                      characters within a single character set. 
  4520.  
  4521.  Date and time format 
  4522.                      Defines the way date and time data (names of weekdays and 
  4523.                      months; order of month, day, and year, and so forth) are 
  4524.                      formatted. 
  4525.  
  4526.  Format of numeric and non-numeric numbers 
  4527.                      Define the way numbers and monetary units are formatted 
  4528.                      with commas, decimal points, and so forth. 
  4529.  
  4530.  Note:  The VisualAge C++ compiler and library support of internationalization 
  4531.         is based on the IEEE POSIX P1003.2 and X/Open Portability Guide 
  4532.         standards for global locales and coded character set conversion, with 
  4533.         the following exceptions: 
  4534.  
  4535.      The grouping arguments in the LC_NUMERIC and LC_MONETARY categories must 
  4536.       be strings, not sets of integers. 
  4537.  
  4538.      The use of the ellipsis (...) in the LC_COLLATE category is limited. 
  4539.  
  4540.  For more information about the LC_NUMERIC, LC_MONETARY, and the LC_COLLATE 
  4541.  categories, see Locale Categories. 
  4542.  
  4543.  
  4544. ΓòÉΓòÉΓòÉ 9.2. Locales and Localization ΓòÉΓòÉΓòÉ
  4545.  
  4546. Localization is an action that establishes the cultural environment for an 
  4547. application by selecting the active locale. Only one locale can be active at 
  4548. one time, but a program can change the active locale at any time during its 
  4549. execution.  The active locale affects the behavior on the locale-sensitive 
  4550. interfaces for the entire program.  This is called the global locale model. 
  4551.  
  4552.  
  4553. ΓòÉΓòÉΓòÉ 9.2.1. Locale-Sensitive Interfaces ΓòÉΓòÉΓòÉ
  4554.  
  4555. The VisualAge C++ library products provide many interfaces to manipulate and 
  4556. access locales. You can use these interfaces to write internationalized C 
  4557. programs. The C locale support will also work for C++ programs. 
  4558.  
  4559. This list summarizes all the VisualAge C++ library functions which affect or 
  4560. are affected by the current locale. 
  4561.  
  4562.  Selecting locale 
  4563.            Changing the characteristics of the user's cultural environment by 
  4564.            changing the current locale: setlocale 
  4565.  
  4566.  Querying locale 
  4567.            Retrieving the locale information that characterizes the user's 
  4568.            cultural environment: 
  4569.  
  4570.            Monetary and numeric formatting conventions: 
  4571.                           localeconv 
  4572.  
  4573.            Date and time formatting conventions: 
  4574.                           localdtconv 
  4575.  
  4576.            User-specified information: 
  4577.                           nl_langinfo 
  4578.  
  4579.            Encoding of the variant part of the portable character set: 
  4580.                           getsyntx 
  4581.  
  4582.            Character set identifier: 
  4583.                           csid, wcsid 
  4584.  
  4585.  Classification of characters: 
  4586.  
  4587.            Single-byte characters: 
  4588.                           isalnum, isalpha, isblank, iscntrl, isdigit, isgraph, 
  4589.                           islower, isprint, ispunct, isspace, isupper, isxdigit 
  4590.  
  4591.            Wide characters: 
  4592.                           iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, 
  4593.                           iswgraph, iswlower, iswprint, iswpunct, iswspace, 
  4594.                           iswupper, iswxdigit, wctype, iswctype 
  4595.  
  4596.  Character case mapping: 
  4597.  
  4598.            Single-byte characters: 
  4599.                           tolower, toupper 
  4600.  
  4601.            Wide characters: 
  4602.                           towlower, towupper 
  4603.  
  4604.  Multibyte character and multibyte string conversion: 
  4605.            mblen, mbrlen, mbtowc, mbrtowc, wctomb, wcrtomb, mbstowcs, 
  4606.            mbsrtowcs, wcstombs, wcsrtombs,  mbsinit, wctob 
  4607.  
  4608.  String conversions to arithmetic: 
  4609.            strtod, wcstod, strtol, wcstol, strtoul, wcstoul, atof, atoi, atol 
  4610.  
  4611.  String collating: 
  4612.            strcoll, strxfrm, wcscoll, wcsxfrm 
  4613.  
  4614.  Character display width: 
  4615.            wcswidth, wcwidth 
  4616.  
  4617.  Date, time, and monetary formatting: 
  4618.            strftime, strptime, wcsftime, mktime, ctime, gmtime, localtime, 
  4619.            strfmon 
  4620.  
  4621.  Formatted input/output: 
  4622.            printf (and family of functions), scanf (and family of functions), 
  4623.            vswprintf, swprintf, swscanf 
  4624.  
  4625.  Processing regular expressions: 
  4626.            regcomp, regexec 
  4627.  
  4628.  Wide character unformatted input/output: 
  4629.            fgetwc, fgetws, fputwc, fputws, getwc, getwchar, putwc, putwchar, 
  4630.            ungetwc 
  4631.  
  4632.  Wide character string handling functions: 
  4633.            wcscat, wcsncat, wcscmp, wcsncmp, wcscpy, wcsncpy, wcschr, wcscspn, 
  4634.            wcspbrk, wcsspn, wcsstok, wcsrchr, wcslenl. 
  4635.  
  4636.  Response matching: 
  4637.            rpmatch 
  4638.  
  4639.  Collating elements: 
  4640.            ismccollel, strtocoll, colltostr, collequiv, collrange, collorder, 
  4641.            cclass, maxcoll, getmccoll, getwmccoll 
  4642.  
  4643.  
  4644. ΓòÉΓòÉΓòÉ 9.3. Definition of the Default POSIX C Locales ΓòÉΓòÉΓòÉ
  4645.  
  4646. The default POSIX C locale is prebuilt into the runtime library. 
  4647.  
  4648. The POSIX C locale is defined as though it was built with a charmap file with a 
  4649. MB_CUR_MAX value of 2. The processing of multibyte characters is dependent on 
  4650. the current process codepage. The codeset name for the nl_langinfo and getsyntx 
  4651. functions is IBM-850. 
  4652.  
  4653. The following is true of the POSIX C locale: 
  4654.  
  4655.    1. It is the default locale. 
  4656.  
  4657.    2. Issuing setlocale(category, "") has the following effect: 
  4658.  
  4659.           Locale-related environment variables are checked to determine which 
  4660.            locales to use to set the category specified. 
  4661.  
  4662.           If no non-null environment variable is present, then it is the 
  4663.            equivalent of having issued setlocale(category, "C"). That is, the 
  4664.            locale chosen is the C locale defintion, and querying the locale 
  4665.            with setlocale(category, NULL) returns "C" as the locale name. 
  4666.  
  4667.  The POSIX definition of the C locale is described below, with the IBM 
  4668.  extensions LC_SYNTAX and LC_TOD showing their default values. 
  4669.  
  4670.   #############
  4671.   LC_CTYPE
  4672.   #############
  4673.   # "alpha" is by default "upper" and "lower"
  4674.   # "alnum" is by definition "alpha" and "digit"
  4675.   # "print" is by default "alnum", "punct" and <space> character
  4676.   # "punct" is by default "alnum" and "punct"
  4677.  
  4678.   upper   <A>;<B>;<C>;<D>;<E>;<F>;<G>;<H>;<I>;<J>;<K>;<L>;<M>;\
  4679.           <N>;<O>;<P>;<Q>;<R>;<S>;<T>;<U>;<V>;<W>;<X>;<Y>;<Z>
  4680.  
  4681.   lower   <a>;<b>;<c>;<d>;<e>;<f>;<g>;<h>;<i>;<j>;<k>;<l>;<m>;\
  4682.           <n>;<o>;<p>;<q>;<r>;<s>;<t>;<u>;<v>;<w>;<x>;<y>;<z>
  4683.  
  4684.   digit   <zero>;<one>;<two>;<three>;<four>;\
  4685.           <five>;<six>;<seven>;<eight>;<nine>
  4686.  
  4687.   space   <tab>;<newline>;<vertical-tab>;<form-feed>;\
  4688.           <carriage-return>;<space>
  4689.  
  4690.   cntrl   <alert>;<backspace>;<tab>;<newline>;<vertical-tab>;\
  4691.           <form-feed>;<carriage-return>;\
  4692.           <NUL>;<SOH>;<STX>;<ETX>;<EOT>;<ENQ>;<ACK>;<SO>;\
  4693.           <SI>;<DLE>;<DC1>;<DC2>;<DC3>;<DC4>;<NAK>;<SYN>;\
  4694.           <ETB>;<CAN>;<EM>;<SUB>;<ESC>;<IS4>;<IS3>;<IS2>;\
  4695.           <IS1>;<DEL>
  4696.  
  4697.   punct   <exclamation-mark>;<quotation-mark>;<number-sign>;\
  4698.           <dollar-sign>;<percent-sign>;<ampersand>;<apostrophe>;\
  4699.           <left-parenthesis>;<right-parenthesis>;<asterisk>;\
  4700.           <plus-sign>;<comma>;<hyphen>;<period>;<slash>;\
  4701.           <colon>;<semicolon>;<less-than-sign>;<equals-sign>;\
  4702.           <greater-than-sign>;<question-mark>;<commercial-at>;\
  4703.           <left-square-bracket>;<backslash>;<right-square-bracket>;\
  4704.           <circumflex>;<underscore>;<grave-accent>;\
  4705.           <left-curly-bracket>;<vertical-line>;<right-curly-bracket>;<tilde>
  4706.  
  4707.   xdigit  <zero>;<one>;<two>;<three>;<four>;\
  4708.           <five>;<six>;<seven>;<eight>;<nine>;\
  4709.           <A>;<B>;<C>;<D>;<E>;<F>;\
  4710.           <a>;<b>;<c>;<d>;<e>;<f>
  4711.  
  4712.   blank   <space>;\
  4713.           <tab>
  4714.  
  4715.   toupper (<a>,<A>);(<b>,<B>);(<c>,<C>);(<d>,<D>);(<e>,<E>);\
  4716.           (<f>,<F>);(<g>,<G>);(<h>,<H>);(<i>,<I>);(<j>,<J>);\
  4717.           (<k>,<K>);(<l>,<L>);(<m>,<M>);(<n>,<N>);(<o>,<O>);\
  4718.           (<p>,<P>);(<q>,<Q>);(<r>,<R>);(<s>,<S>);(<t>,<T>);\
  4719.           (<u>,<U>);(<v>,<V>);(<w>,<W>);(<x>,<X>);(<y>,<Y>);\
  4720.           (<z>,<Z>)
  4721.  
  4722.   tolower (<A>,<a>);(<B>,<b>);(<C>,<c>);(<D>,<d>);(<E>,<e>);\
  4723.           (<F>,<f>);(<G>,<g>);(<H>,<h>);(<I>,<i>);(<J>,<j>);\
  4724.           (<K>,<k>);(<L>,<l>);(<M>,<m>);(<N>,<n>);(<O>,<o>);\
  4725.           (<P>,<p>);(<Q>,<q>);(<R>,<r>);(<S>,<s>);(<T>,<t>);\
  4726.           (<U>,<u>);(<V>,<v>);(<W>,<w>);(<X>,<x>);(<Y>,<y>);\
  4727.           (<Z>,<z>)
  4728.  
  4729.   END LC_CTYPE
  4730.  
  4731.   #############
  4732.   LC_COLLATE
  4733.   #############
  4734.  
  4735.   order_start
  4736.   # ASCII Control characters
  4737.   <NUL>
  4738.   <SOH>
  4739.   <STX>
  4740.   <ETX>
  4741.   <EOT>
  4742.   <ENQ>
  4743.   <ACK>
  4744.   <alert>
  4745.   <backspace>
  4746.   <tab>
  4747.   <newline>
  4748.   <vertical-tab>
  4749.   <form-feed>
  4750.   <carriage-return>
  4751.   <SO>
  4752.   <SI>
  4753.   <DLE>
  4754.   <DC1>
  4755.   <DC2>
  4756.   <DC3>
  4757.   <DC4>
  4758.   <NAK>
  4759.   <SYN>
  4760.   <ETB>
  4761.   <CAN>
  4762.   <EM>
  4763.   <SUB>
  4764.   <ESC>
  4765.   <IS4>
  4766.   <IS3>
  4767.   <IS2>
  4768.   <IS1>
  4769.   <space>
  4770.   <exclamation-mark>
  4771.   <quotation-mark>
  4772.   <number-sign>
  4773.   <dollar-sign>
  4774.   <percent-sign>
  4775.   <ampersand>
  4776.   <apostrophe>
  4777.   <left-parenthesis>
  4778.   <right-parenthesis>
  4779.   <asterisk>
  4780.   <plus-sign>
  4781.   <comma>
  4782.   <hyphen>
  4783.   <period>
  4784.   <slash>
  4785.   <zero>
  4786.   <one>
  4787.   <two>
  4788.   <three>
  4789.   <four>
  4790.   <five>
  4791.   <six>
  4792.   <seven>
  4793.   <eight>
  4794.   <nine>
  4795.   <colon>
  4796.   <semicolon>
  4797.   <less-than-sign>
  4798.   <equals-sign>
  4799.   <greater-than-sign>
  4800.   <question-mark>
  4801.   <commercial-at>
  4802.   <A>
  4803.   <B>
  4804.   <C>
  4805.   <D>
  4806.   <E>
  4807.   <F>
  4808.   <G>
  4809.   <H>
  4810.   <I>
  4811.   <J>
  4812.   <K>
  4813.   <L>
  4814.   <M>
  4815.   <N>
  4816.   <O>
  4817.   <P>
  4818.   <Q>
  4819.   <R>
  4820.   <S>
  4821.   <T>
  4822.   <U>
  4823.   <V>
  4824.   <W>
  4825.   <X>
  4826.   <Y>
  4827.   <Z>
  4828.   <left-square-bracket>
  4829.   <backslash>
  4830.   <right-square-bracket>
  4831.   <circumflex>
  4832.   <underscore>
  4833.   <grave-accent>
  4834.   <a>
  4835.   <b>
  4836.   <c>
  4837.   <d>
  4838.   <e>
  4839.   <f>
  4840.   <g>
  4841.   <h>
  4842.   <i>
  4843.   <j>
  4844.   <k>
  4845.   <l>
  4846.   <m>
  4847.   <n>
  4848.   <o>
  4849.   <p>
  4850.   <q>
  4851.   <r>
  4852.   <s>
  4853.   <t>
  4854.   <u>
  4855.   <v>
  4856.   <w>
  4857.   <x>
  4858.   <y>
  4859.   <z>
  4860.   <left-curly-bracket>
  4861.   <vertical-line>
  4862.   <right-curly-bracket>
  4863.   <tilde>
  4864.   <DEL>
  4865.   order_end
  4866.  
  4867.   END LC_COLLATE
  4868.  
  4869.   #############
  4870.   LC_MONETARY
  4871.   #############
  4872.  
  4873.   int_curr_symbol   ""
  4874.   currency_symbol   ""
  4875.   mon_decimal_point ""
  4876.   mon_thousands_sep ""
  4877.   mon_grouping      ""
  4878.   positive_sign     ""
  4879.   negative_sign     ""
  4880.   int_frac_digits   -1
  4881.   frac_digits       -1
  4882.   p_cs_precedes     -1
  4883.   p_sep_by_space    -1
  4884.   n_cs_precedes     -1
  4885.   n_sep_by_space    -1
  4886.   p_sign_posn       -1
  4887.   n_sign_posn       -1
  4888.  
  4889.   END LC_MONETARY
  4890.  
  4891.   #############
  4892.   LC_NUMERIC
  4893.   #############
  4894.  
  4895.   decimal_point     "<period>"
  4896.   thousands_sep     ""
  4897.   grouping          ""
  4898.  
  4899.   END LC_NUMERIC
  4900.  
  4901.   #############
  4902.   LC_TIME
  4903.   #############
  4904.  
  4905.   abday   "<S><u><n>";\
  4906.           "<M><o><n>";\
  4907.           "<T><u><e>";\
  4908.           "<W><e><d>";\
  4909.           "<T><h><u>";\
  4910.           "<F><r><i>";\
  4911.           "<S><a><t>"
  4912.  
  4913.   day     "<S><u><n><d><a><y>";\
  4914.           "<M><o><n><d><a><y>";\
  4915.           "<T><u><e><s><d><a><y>";\
  4916.           "<W><e><d><n><e><s><d><a><y>";\
  4917.           "<T><h><u><r><s><d><a><y>";\
  4918.           "<F><r><i><d><a><y>";\
  4919.           "<S><a><t><u><r><d><a><y>"
  4920.  
  4921.   abmon   "<J><a><n>";\
  4922.           "<F><e><b>";\
  4923.           "<M><a><r>";\
  4924.           "<A><p><r>";\
  4925.           "<M><a><y>";\
  4926.           "<J><u><n>";\
  4927.           "<J><u><l>";\
  4928.           "<A><u><g>";\
  4929.           "<S><e><p>";\
  4930.           "<O><c><t>";\
  4931.           "<N><o><v>";\
  4932.           "<D><e><c>"
  4933.  
  4934.   mon     "<J><a><n><u><a><r><y>";\
  4935.           "<F><e><b><r><u><a><r><y>";\
  4936.           "<M><a><r><c><h>";\
  4937.           "<A><p><r><i><l>";\
  4938.           "<M><a><y>";\
  4939.           "<J><u><n><e>";\
  4940.           "<J><u><l><y>";\
  4941.           "<A><u><g><u><s><t>";\
  4942.           "<S><e><p><t><e><m><b><e><r>";\
  4943.           "<O><c><t><o><b><e><r>";\
  4944.           "<N><o><v><e><m><b><e><r>";\
  4945.           "<D><e><c><e><m><b><e><r>"
  4946.  
  4947.   # equivalent of AM/PM (%p)
  4948.   am_pm      "<A><M>";"<P><M>"
  4949.  
  4950.   # appropriate date and time representation (%c) "%a %b %e %H:%M:%S %Y"
  4951.   d_t_fmt    "<percent-sign><a><space><percent-sign><b><space><percent-sign><e>\
  4952.   <space><percent-sign><H><colon><percent-sign><M>\
  4953.   <colon><percent-sign><S><space><percent-sign><Y>"
  4954.  
  4955.   # appropriate date representation (%x) "%m/%d/%y"
  4956.   d_fmt      "<percent-sign><m><slash><percent-sign><d><slash><percent-sign><y>"
  4957.  
  4958.   # appropriate time representation (%X) "%H:%M:%S"
  4959.   t_fmt      "<percent-sign><M><colon><percent-sign><M><colon><percent-sign><S>"
  4960.  
  4961.   # appropriate 12-hour time representation (%r) "%I:%M:%S %p"
  4962.   t_fmt_ampm "<percent-sign><I><colon><percent-sign><M><colon><percent-sign><S>\
  4963.   <space><percent-sign><p>"
  4964.  
  4965.   END LC_TIME
  4966.  
  4967.   #############
  4968.   LC_MESSAGES
  4969.   #############
  4970.  
  4971.   yesexpr "<circumflex><left-square-bracket><y><Y><right-square-bracket>"
  4972.   noexpr  "<circumflex><left-square-bracket><n><N><right-square-bracket>"
  4973.  
  4974.   END LC_MESSAGES
  4975.  
  4976.  LC_syntax and LC_TOD are IBM-extensions to the POSIX C locale definition, 
  4977.  their default values are shown here. 
  4978.  
  4979.   #############
  4980.   LC_SYNTAX
  4981.   #############
  4982.  
  4983.   backslash     "<backslash>"
  4984.   right_brace   "<right-brace>"
  4985.   left_brace    "<left-brace>"
  4986.   right_bracket "<right-square-bracket>"
  4987.   left_bracket  "<left-square-bracket>"
  4988.   circumflex    "<circumflex>"
  4989.   tilde         "<tilde>"
  4990.   exclamation_mark "<exclamation-mark>"
  4991.   number_sign   "<number-sign>"
  4992.   vertical_line "<vertical-line>"
  4993.   dollar_sign   "<dollar-sign>"
  4994.   commercial_at "<commercial-at>"
  4995.   grave_accent  "<grave-accent>"
  4996.  
  4997.   END LC-SYNTAX
  4998.  
  4999.   #############
  5000.   LC_TOD
  5001.   #############
  5002.  
  5003.   timezone_difference  0
  5004.   timezone_name        ""
  5005.   daylight_name        ""
  5006.   start_month          0
  5007.   end_month            0
  5008.   start_week           0
  5009.   end_week             0
  5010.   start_day            0
  5011.   end_day              0
  5012.   start_time           0
  5013.   end_time             0
  5014.   shift                0
  5015.  
  5016.   END LC_TOD
  5017.  
  5018.  
  5019. ΓòÉΓòÉΓòÉ 9.4. Differences Between SAA C and POSIX C Locales ΓòÉΓòÉΓòÉ
  5020.  
  5021. The incompatibilities between the POSIX C locale of the current VisualAge C++ 
  5022. (Version 3) and the SAA C locale available with previous versions of 
  5023. VisualAge C++ are as follows: 
  5024.  
  5025. LC_TIME category 
  5026.  
  5027.  date/time format 
  5028.      The date/time format in the previous C locale is "%y/%m/%d %I:%M:%S". In 
  5029.      the POSIX locale, it is "%a %b %d %H %M %S %Y". 
  5030.  
  5031.  time format 
  5032.      The time format in the previous C locale is "%I:%M:%S". In the POSIX 
  5033.      locale, it is "%H:%M:%S". 
  5034.  
  5035.  am/pm strings 
  5036.      The am/pm strings in the previous C locale are "am" and "pm". In the POSIX 
  5037.      locale, they are "AM" and "PM". 
  5038.  
  5039.  
  5040. ΓòÉΓòÉΓòÉ 9.5. Customizing a Locale ΓòÉΓòÉΓòÉ
  5041.  
  5042. This section describes how you can create your own locales, based on the locale 
  5043. definition files supplied by IBM. The information in this chapter applies to 
  5044. the format of locales based on the LOCALDEF utility. 
  5045.  
  5046. In this example you will build a locale named TEXAN using the charmap file 
  5047. representing the IBM-437 encoded character set.  The locale is derived from the 
  5048. locale representing the English language and the cultural conventions of the 
  5049. United States. 
  5050.  
  5051.    1. Determine the source of the locale you are going to use. In this case, it 
  5052.       is the locale for the English language in the United States, the source 
  5053.       for which is EN_US\IBM-437.LOC. 
  5054.  
  5055.    2. Copy the selected file (EN_US\IBM-437.LOC) from the source directory to 
  5056.       your own directory and rename it. For example, assuming you are in the C 
  5057.       Set ++ locale directory, 
  5058.  
  5059.             c:\ibmcpp\locale
  5060.        you would type the following: 
  5061.  
  5062.                copy EN_US\IBM-437.LOC c:\ibmcpp\locale\fred\TEXAN.LOC
  5063.  
  5064.    3. In your new file, change the locale variables to the desired values. For 
  5065.       example, change 
  5066.  
  5067.             d_t_fmt "%a %b %e %H:%M:%S %Z %Y
  5068.       to 
  5069.  
  5070.             d_t_fmt "Howdy Pardner %a %b %e %H:%M:%S %Z %Y"
  5071.  
  5072.    4. Generate a new locale load module using the LOCALDEF utility, then place 
  5073.       the produced module in the directory where your locale load modules are 
  5074.       located. Of course, this directory must be specified in the LOCPATH 
  5075.       variable. 
  5076.  
  5077.             localdef /f ibm-437.cm /i texan.loc texan.lcl
  5078.       See the User's Guide for detailed information about the syntax of the 
  5079.       LOCALDEF utility. 
  5080.  
  5081.  
  5082. ΓòÉΓòÉΓòÉ 9.5.1. Using the Customized Locale ΓòÉΓòÉΓòÉ
  5083.  
  5084. The customized locale is now ready to be used in calls made by the setlocale 
  5085. function in VisualAge C++ application code, such as: 
  5086.  
  5087. setlocale(LC_ALL, "texan");
  5088.  
  5089.  
  5090. ΓòÉΓòÉΓòÉ 9.5.2. Referring Explicitly to a Customized Locale ΓòÉΓòÉΓòÉ
  5091.  
  5092. Here is a program with an explicit reference to the TEXAN locale. 
  5093.  
  5094.  
  5095. Referring Explicitly to a Customized Locale
  5096.  
  5097. /* this example shows how to get the local time formatted by the */
  5098. /* current locale */
  5099.  
  5100. #include <stdio.h>
  5101. #include <time.h>
  5102. #include <locale.h>
  5103.  
  5104. int main(void){
  5105.     char dest[80];
  5106.     int ch;
  5107.     time_t temp;
  5108.     struct tm *timeptr;
  5109.     temp = time(NULL);
  5110.     timeptr = localtime(&temp);
  5111.     /* Fetch default locale name */
  5112.     printf("Default locale is %s\n",setlocale(LC_ALL,"C"));
  5113.     ch = strftime(dest,sizeof(dest)-1,
  5114.       "Local C datetime is %c", timeptr);
  5115.     printf("%s\n",  dest);
  5116.  
  5117.     /* Set new Texan locale name */
  5118.     printf("New locale is %s\n", setlocale(LC_ALL,"Texan"));
  5119.     ch = strftime(dest,sizeof(dest)-1,
  5120.       "Texan datetime is %c ", timeptr);
  5121.     printf("%s\n", dest);
  5122.  
  5123.     return(0);
  5124. }
  5125.  
  5126. Compile and run the above program. The output should be similar to: 
  5127.  
  5128. Default locale is "C"
  5129. Local C datetime is Fri Aug 20 14:58:12  1993
  5130. New locale is TEXAN
  5131. Texan datetime is Howdy Pardner Fri Aug 20 14:58:12  1993
  5132.  
  5133.  
  5134. ΓòÉΓòÉΓòÉ 9.6. Using Environment Variables to Select a Locale ΓòÉΓòÉΓòÉ
  5135.  
  5136. You can use environment variables to specify the names of locale categories. 
  5137. You must call setlocale regardless of environmental variable settings. 
  5138. However, if you call setlocale. without specifying the locale argument, the 
  5139. locale is changed according to environmental variables. 
  5140.  
  5141.  Here is an example: 
  5142.  
  5143.  
  5144. Using Environment Variables to Select a Locale
  5145.  
  5146.  
  5147. #include <locale.h>
  5148. #include <stdio.h>
  5149.  
  5150. int main(void){
  5151.   setlocale(LC_ALL,""));
  5152.   printf("default -"-" locale = %s-n", setlocale(LC_ALL,"NULL"));
  5153.   _putenv("LC_ALL=TEXAN");
  5154.   setlocale(LC_ALL,""));
  5155.   printf("Default -"-" locale = %s-n", setlocale(LC_ALL,"NULL"));
  5156.   return(0);
  5157.  
  5158. }
  5159.  
  5160. If you run the program above, you can expect the following result: 
  5161.  
  5162. Default "" locale = C
  5163. Default "" locale = TEXAN
  5164.  
  5165. Note:  Specifying NULL as a locale name in a setlocale call means `query 
  5166. current locale' 
  5167.  
  5168. In the example above, the default NULL locale returns C because the value of 
  5169. LC_ALL does not affect the current locale until the next setlocale(LC_ALL,"") 
  5170. is done.  When this call is made, the LC_ALL environment variable will be used 
  5171. and the locale will be set to TEXAN. 
  5172.  
  5173. For more information about setting environment variables, see Setting Runtime 
  5174. Environment Variables. 
  5175.  
  5176. The names of the environment variables match the names of the locale 
  5177. categories: 
  5178.  
  5179.      LC_ALL 
  5180.      LC_COLLATE 
  5181.      LC_CTYPE 
  5182.      LANG 
  5183.      LC_MESSAGES 
  5184.      LC_MONETARY 
  5185.      LC_NUMERIC 
  5186.      LC_TIME 
  5187.      LC_TOD 
  5188.      LC_SYNTAX 
  5189.  See the C Library Reference for information about setlocale. 
  5190.  
  5191.  
  5192. ΓòÉΓòÉΓòÉ 9.7. Code Set Conversion Utilities ΓòÉΓòÉΓòÉ
  5193.  
  5194. This section describes the code set conversion utilities supported by the 
  5195. VisualAge C++ compiler.  These utilities are as follows: 
  5196.  
  5197.  ICONV utility 
  5198.       Converts a file from one code set encoding to another. 
  5199.  
  5200.  iconv functions 
  5201.       Perform code set translation.  These functions are iconv_open, iconv, and 
  5202.       iconv_close. They are used by the ICONV utility and may be called from 
  5203.       any VisualAge C++ program requiring code set translation. 
  5204.  
  5205.  GENXLT utility 
  5206.       Generates a translation table for use by the ICONV utility and iconv 
  5207.       functions. 
  5208.  See the User's Guide for descriptions of the GENXLT and ICONV utilities, and 
  5209.  the C Library Reference for descriptions of the iconv functions. 
  5210.  
  5211.  
  5212. ΓòÉΓòÉΓòÉ 9.7.1. The GENXLT Utility ΓòÉΓòÉΓòÉ
  5213.  
  5214. The GENXLT utility reads a source translation file from a specified input file 
  5215. and writes the compiled version to a specified output file. If you do not 
  5216. specify an input file or you do not specify an output file, GENXLT uses 
  5217. standard input (stdin) and standard output (stdout), respectively. The source 
  5218. translation file contains directives that are acted upon by the GENXLT utility 
  5219. to produce the compiled version of the translation table. 
  5220.  
  5221. For more information on the GENXLT tool, see the User's Guide. 
  5222.  
  5223.  
  5224. ΓòÉΓòÉΓòÉ 9.7.2. The ICONV Utility ΓòÉΓòÉΓòÉ
  5225.  
  5226. The ICONV utility reads characters from the input file, converts them from one 
  5227. coded character set definition to another, and writes them to the output file. 
  5228.  
  5229. For more information on the ICONV utility, see the User's Guide. 
  5230.  
  5231.  
  5232. ΓòÉΓòÉΓòÉ 9.7.3. Code Conversion Functions ΓòÉΓòÉΓòÉ
  5233.  
  5234. The iconv_open, iconv, and iconv_close library functions can be called from C 
  5235. language source to initialize and perform the characters conversions from one 
  5236. character set encoding to another. 
  5237.  
  5238. For more information on these functions, see the C Library Reference. 
  5239.  
  5240.  
  5241. ΓòÉΓòÉΓòÉ 9.8. Code Set Converters Supplied ΓòÉΓòÉΓòÉ
  5242.  
  5243. The code set converters that are provided with VisualAge C++ are as follows: 
  5244.  
  5245.      Code set converters between the Latin-1 and non-Latin-1 code pages and 
  5246.       code page IBM-850. 
  5247.  
  5248.      Code set converters to convert to and from IBM-850, IBM-1047, and 
  5249.       ISO8859-1. 
  5250.  
  5251.      Code set converters to convert between ISO8859-7 and ISO8859-9 and the 
  5252.       applicable ASCII code page. 
  5253.  
  5254.      Code set converters between the Japanese code pages. 
  5255.  
  5256.  The code set converters are provided either as tables built by the GENXLT 
  5257.  utility or as functions inside IBMCCONV.DLL. The input source to the GENXLT 
  5258.  utility is also provided. 
  5259.  
  5260.  The code set converters use the "Enforced subset match" method for characters 
  5261.  that are in the input code set but are not in the output code set. All 
  5262.  characters not in the output code set are replaced by the SUB character, which 
  5263.  is 0x3F in EBCDIC and 0x1A in ASCII. 
  5264.  
  5265.  The following table lists the code set converters supplied with VisualAge C++: 
  5266.  
  5267.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5268.   Γöé FROMCODE  Γöé TOCODE   Γöé FUNCTION/PATHNAME                  Γöé
  5269.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5270.   Γöé EBCDIC Codesets to ASCII Codesets                       Γöé
  5271.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5272.   Γöé IBM-037   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-037\IBM-850.XLT      Γöé
  5273.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5274.   Γöé IBM-273   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-273\IBM-850.XLT      Γöé
  5275.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5276.   Γöé IBM-274   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-274\IBM-850.XLT      Γöé
  5277.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5278.   Γöé IBM-275   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-274\IBM-850.XLT      Γöé
  5279.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5280.   Γöé IBM-277   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-277\IBM-850.XLT      Γöé
  5281.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5282.   Γöé IBM-278   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-278\IBM-850.XLT      Γöé
  5283.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5284.   Γöé IBM-280   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-280\IBM-850.XLT      Γöé
  5285.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5286.   Γöé IBM-281   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-281\IBM-850.XLT      Γöé
  5287.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5288.   Γöé IBM-282   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-282\IBM-850.XLT      Γöé
  5289.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5290.   Γöé IBM-284   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-284\IBM-850.XLT      Γöé
  5291.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5292.   Γöé IBM-285   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-285\IBM-850.XLT      Γöé
  5293.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5294.   Γöé IBM-297   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-297\IBM-850.XLT      Γöé
  5295.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5296.   Γöé IBM-500   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-500\IBM-850.XLT      Γöé
  5297.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5298.   Γöé IBM-871   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-871\IBM-850.XLT      Γöé
  5299.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5300.   Γöé IBM-875   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-875\IBM-850.XLT      Γöé
  5301.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5302.   Γöé IBM-930   Γöé IBM-932   Γöé IBM-930_IBM-932                   Γöé
  5303.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5304.   Γöé IBM-939   Γöé IBM-932   Γöé IBM-939_IBM-932                   Γöé
  5305.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5306.   Γöé IBM-1026  Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-1026\IBM-850.XLT     Γöé
  5307.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5308.   Γöé IBM-1047  Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-1047\IBM-850.XLT     Γöé
  5309.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5310.   Γöé ASCII Codesets to EBCDIC Codesets                       Γöé
  5311.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5312.   Γöé IBM-850   Γöé IBM-037   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-037.XLT      Γöé
  5313.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5314.   Γöé IBM-850   Γöé IBM-273   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-273.XLT      Γöé
  5315.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5316.   Γöé IBM-850   Γöé IBM-274   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-274.XLT      Γöé
  5317.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5318.   Γöé IBM-850   Γöé IBM-275   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-275.XLT      Γöé
  5319.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5320.   Γöé IBM-850   Γöé IBM-277   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-277.XLT      Γöé
  5321.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5322.   Γöé IBM-850   Γöé IBM-278   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-278.XLT      Γöé
  5323.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5324.   Γöé IBM-850   Γöé IBM-280   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-280.XLT      Γöé
  5325.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5326.   Γöé IBM-850   Γöé IBM-281   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-281.XLT      Γöé
  5327.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5328.   Γöé IBM-850   Γöé IBM-282   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-282.XLT      Γöé
  5329.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5330.   Γöé IBM-850   Γöé IBM-284   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-284.XLT      Γöé
  5331.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5332.   Γöé IBM-850   Γöé IBM-285   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-285.XLT      Γöé
  5333.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5334.   Γöé IBM-850   Γöé IBM-297   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-297.XLT      Γöé
  5335.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5336.   Γöé IBM-850   Γöé IBM-500   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-500.XLT      Γöé
  5337.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5338.   Γöé IBM-850   Γöé IBM-871   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-871.XLT      Γöé
  5339.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5340.   Γöé IBM-850   Γöé IBM-875   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-875.XLT      Γöé
  5341.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5342.   Γöé IBM-850   Γöé IBM-1026  Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-1026.XLT     Γöé
  5343.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5344.   Γöé IBM-932   Γöé IBM-930   Γöé IBM-932_IBM-930                   Γöé
  5345.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5346.   Γöé IBM-932   Γöé IBM-939   Γöé IBM-932_IBM-939                   Γöé
  5347.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5348.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5349.   Γöé FROMCODE  Γöé TOCODE   Γöé FUNCTION/PATHNAME                  Γöé
  5350.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5351.   Γöé ASCII Codesets to ASCII Codesets                       Γöé
  5352.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5353.   Γöé IBM-437   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-437\IBM-850.XLT      Γöé
  5354.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5355.   Γöé IBM-852   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-852\IBM-850.XLT      Γöé
  5356.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5357.   Γöé IBM-857   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-857\IBM-850.XLT      Γöé
  5358.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5359.   Γöé IBM-860   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-860\IBM-850.XLT      Γöé
  5360.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5361.   Γöé IBM-861   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-861\IBM-850.XLT      Γöé
  5362.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5363.   Γöé IBM-863   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-863\IBM-850.XLT      Γöé
  5364.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5365.   Γöé IBM-865   Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\IBM-865\IBM-850.XLT      Γöé
  5366.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5367.   Γöé IBM-850   Γöé IBM-437   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-437.XLT      Γöé
  5368.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5369.   Γöé IBM-850   Γöé IBM-852   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-852.XLT      Γöé
  5370.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5371.   Γöé IBM-850   Γöé IBM-857   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-857.XLT      Γöé
  5372.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5373.   Γöé IBM-850   Γöé IBM-860   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-860.XLT      Γöé
  5374.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5375.   Γöé IBM-850   Γöé IBM-861   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-861.XLT      Γöé
  5376.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5377.   Γöé IBM-850   Γöé IBM-863   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-863.XLT      Γöé
  5378.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5379.   Γöé IBM-850   Γöé IBM-865   Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\IBM-865.XLT      Γöé
  5380.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5381.   Γöé EBCDIC Codesets to EUCJP Codeset                       Γöé
  5382.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5383.   Γöé IBM-eucJP  Γöé IBM-930   Γöé IBM-eucJP_IBM-930                  Γöé
  5384.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5385.   Γöé IBM-eucJP  Γöé IBM-939   Γöé IBM-eucJP_IBM-939                  Γöé
  5386.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5387.   Γöé IBM-930   Γöé IBM-eucJP  Γöé IBM-930_IBM-eucJP                  Γöé
  5388.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5389.   Γöé IBM-939   Γöé IBM-eucJP  Γöé IBM-939_IBM-eucJP                  Γöé
  5390.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5391.   Γöé ISO Codesets to ASCII Codesets                        Γöé
  5392.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5393.   Γöé ISO8859-1  Γöé IBM-850   Γöé \IBMC\LOCALE\ICONVTAB\ISO88591\IBM-850.XLT     Γöé
  5394.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5395.   Γöé ISO8859-9  Γöé IBM-857   Γöé \IBMC\LOCALE\ICONVTAB\ISO88599\IBM-857.XLT     Γöé
  5396.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5397.   Γöé IBM-850   Γöé ISO8859-1  Γöé \IBMC\LOCALE\ICONVTAB\IBM-850\ISO88591.XLT     Γöé
  5398.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5399.   Γöé IBM-857   Γöé ISO8859-9  Γöé \IBMC\LOCALE\ICONVTAB\IBM-857\ISO88599.XLT     Γöé
  5400.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5401.  
  5402.  The following code set converters are also supplied.  These converters are 
  5403.  used by the code set converters between the codesets IBM-930, IBM-932, 
  5404.  IBM-939, and IBM-eucJP. 
  5405.  
  5406.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5407.   Γöé FROMCODE   Γöé TOCODE    Γöé FUNCTION/PATHNAME                Γöé
  5408.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5409.   Γöé IBM-290    Γöé IBM-932    Γöé \IBMC\LOCALE\ICONVTAB\IBM-290\IBM-932.XLT    Γöé
  5410.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5411.   Γöé IBM-290    Γöé IBM-eucJP   Γöé IBM-290_IBM-eucJP                Γöé
  5412.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5413.   Γöé IBM-300    Γöé IBM-932    Γöé IBM-300_IBM-932                 Γöé
  5414.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5415.   Γöé IBM-300    Γöé IBM-eucJP   Γöé IBM-300_IBM-eucJP                Γöé
  5416.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5417.   Γöé IBM-932    Γöé IBM-290    Γöé \IBMC\LOCALE\ICONVTAB\IBM-932\IBM-290.XLT    Γöé
  5418.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5419.   Γöé IBM-932    Γöé IBM-300    Γöé IBM-932_IBM-300                 Γöé
  5420.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5421.   Γöé IBM-932    Γöé IBM-1027   Γöé \IBMC\LOCALE\ICONVTAB\IBM-932\IBM-1027.XLT   Γöé
  5422.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5423.   Γöé IBM-1027   Γöé IBM-932    Γöé \IBMC\LOCALE\ICONVTAB\IBM-1027\IBM-932.XLT   Γöé
  5424.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5425.   Γöé IBM-1027   Γöé IBM-eucJP   Γöé IBM-1027_IBM-eucJP               Γöé
  5426.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5427.   Γöé IBM-eucJP   Γöé IBM-290    Γöé IBM-eucJP_IBM-290                Γöé
  5428.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5429.   Γöé IBM-eucJP   Γöé IBM-300    Γöé IBM-eucJP_IBM-300                Γöé
  5430.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5431.   Γöé IBM-eucJP   Γöé IBM-1027   Γöé IBM-eucJP_IBM-1027               Γöé
  5432.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5433.  
  5434.  
  5435. ΓòÉΓòÉΓòÉ 10. Building a Locale ΓòÉΓòÉΓòÉ
  5436.  
  5437. Cultural information is encoded in the locale source file using the locale 
  5438. definition language. One locale source file characterizes one cultural 
  5439. environment. 
  5440.  
  5441. The locale source file is processed by the locale compilation tool, called the 
  5442. LOCALDEF tool. See the User's Guide for information on using this tool. 
  5443.  
  5444. To enhance portability of the locale source files, certain information related 
  5445. to the character sets can be encoded using the symbolic names of characters. 
  5446. The mapping between the symbolic names and the characters they represent and 
  5447. its associated hexadecimal value is defined in the character set description 
  5448. file or charmap file. 
  5449.  
  5450. The conceptual model of the locale build process is presented below: 
  5451.  
  5452.  cultural    ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ   coded
  5453.  environment  Γöé locale source Γöé      Γöé charmap Γöé   character set
  5454.  definition   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ      ΓööΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÿ   definition
  5455.             Γöé             Γöé
  5456.             Γöé             Γöé
  5457.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5458.                   Γöé
  5459.                   
  5460.               ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5461.               Γöé LOCALEDEF tool Γöé
  5462.               ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5463.                   Γöé
  5464.                   
  5465.               ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ      compiled object
  5466.               Γöé Compiled locale ΓöéΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ used by the
  5467.               ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ      VisualAge C++
  5468.                              interfaces
  5469.  
  5470.  
  5471. ΓòÉΓòÉΓòÉ 10.1. Using the charmap File ΓòÉΓòÉΓòÉ
  5472.  
  5473. The charmap file defines a mapping between the symbolic names of characters and 
  5474. the hexadecimal values associated with the character in a given coded character 
  5475. set.  Optionally, it can provide the alternate symbolic names for characters. 
  5476. Characters in the locale source file can be referred to by their symbolic names 
  5477. or alternate symbolic names, thereby allowing for writing generic locale source 
  5478. files independent of the encoding of the character set they represent. 
  5479.  
  5480. Each charmap file must contain at least the definition of the portable 
  5481. character set and the character symbolic names associated with each character. 
  5482. The characters in the portable character set and the corresponding symbolic 
  5483. names, and optional alternate symbolic names, are defined in Characters in 
  5484. portable character set and corresponding symbolic names. 
  5485.  
  5486. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5487. Γöé Table 2. Characters in portable character set and corresponding symbolic   Γöé
  5488. Γöé      names                                Γöé
  5489. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5490. Γöé SYMBOLIC NAME     Γöé ALTERNATE Γöé CHARACTER                 Γöé
  5491. Γöé            Γöé NAME    Γöé                      Γöé
  5492. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5493. Γöé "<NUL>"        Γöé      Γöé                      Γöé
  5494. Γöé            Γöé      Γöé                      Γöé
  5495. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5496. Γöé "<tab>"        Γöé "<SE10>"  Γöé " "                    Γöé
  5497. Γöé            Γöé      Γöé                      Γöé
  5498. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5499. Γöé "<vertical-tab>"   Γöé "<SE12>"  Γöé " "                    Γöé
  5500. Γöé            Γöé      Γöé                      Γöé
  5501. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5502. Γöé "<form-feed>"     Γöé "<SE13>"  Γöé " "                    Γöé
  5503. Γöé            Γöé      Γöé                      Γöé
  5504. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5505. Γöé "<carriage-return>"  Γöé "<SE14>"  Γöé " "                    Γöé
  5506. Γöé            Γöé      Γöé                      Γöé
  5507. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5508. Γöé "<newline>"      Γöé "<SE11>"  Γöé " "                    Γöé
  5509. Γöé            Γöé      Γöé                      Γöé
  5510. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5511. Γöé "<backspace>"     Γöé "<SE09>"  Γöé " "                    Γöé
  5512. Γöé            Γöé      Γöé                      Γöé
  5513. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5514. Γöé "<alert>"       Γöé "<SE08>"  Γöé " "                    Γöé
  5515. Γöé            Γöé      Γöé                      Γöé
  5516. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5517. Γöé "<space>"       Γöé "<SP01>"  Γöé " "                    Γöé
  5518. Γöé            Γöé      Γöé                      Γöé
  5519. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5520. Γöé "<period>"      Γöé "<SP11>"  Γöé "."                    Γöé
  5521. Γöé            Γöé      Γöé                      Γöé
  5522. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5523. Γöé "<less-than-sign>"  Γöé "<SA03>"  Γöé "<"                    Γöé
  5524. Γöé            Γöé      Γöé                      Γöé
  5525. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5526. Γöé "<left-parenthesis>" Γöé "<SP06>"  Γöé "("                    Γöé
  5527. Γöé            Γöé      Γöé                      Γöé
  5528. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5529. Γöé "<plus-sign>"     Γöé "<SA01>"  Γöé "+"                    Γöé
  5530. Γöé            Γöé      Γöé                      Γöé
  5531. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5532. Γöé "<ampersand>"     Γöé "<SM03>"  Γöé "&"                    Γöé
  5533. Γöé            Γöé      Γöé                      Γöé
  5534. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5535. Γöé "<right-parenthesis>"Γöé "<SP07>"  Γöé ")"                    Γöé
  5536. Γöé            Γöé      Γöé                      Γöé
  5537. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5538. Γöé "<semicolon>"     Γöé "<SP14>"  Γöé ";"                    Γöé
  5539. Γöé            Γöé      Γöé                      Γöé
  5540. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5541. Γöé "<hyphen>"      Γöé "<SP10>"  Γöé "-"                    Γöé
  5542. Γöé            Γöé      Γöé                      Γöé
  5543. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5544. Γöé "<hyphen-minus>"   Γöé "<SP10>"  Γöé "-"                    Γöé
  5545. Γöé            Γöé      Γöé                      Γöé
  5546. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5547. Γöé "<slash>"       Γöé "<SP12>"  Γöé "/"                    Γöé
  5548. Γöé            Γöé      Γöé                      Γöé
  5549. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5550. Γöé "<solidus>"      Γöé "<SP12>"  Γöé "/"                    Γöé
  5551. Γöé            Γöé      Γöé                      Γöé
  5552. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5553. Γöé "<comma>"       Γöé "<SP08>"  Γöé ","                    Γöé
  5554. Γöé            Γöé      Γöé                      Γöé
  5555. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5556. Γöé "<percent-sign>"   Γöé "<SM02>"  Γöé "%"                    Γöé
  5557. Γöé            Γöé      Γöé                      Γöé
  5558. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5559. Γöé "<underscore>"    Γöé "<SP09>"  Γöé "_"                    Γöé
  5560. Γöé            Γöé      Γöé                      Γöé
  5561. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5562. Γöé "<low-line>"     Γöé "<SP09>"  Γöé "_"                    Γöé
  5563. Γöé            Γöé      Γöé                      Γöé
  5564. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5565. Γöé "<greater-than-sign>"Γöé "<SA05>"  Γöé ">"                    Γöé
  5566. Γöé            Γöé      Γöé                      Γöé
  5567. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5568. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5569. Γöé Table 2. Characters in portable character set and corresponding symbolic   Γöé
  5570. Γöé      names                                Γöé
  5571. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5572. Γöé SYMBOLIC NAME     Γöé ALTERNATE Γöé CHARACTER                 Γöé
  5573. Γöé            Γöé NAME    Γöé                      Γöé
  5574. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5575. Γöé "<question-mark>"   Γöé "<SP15>"  Γöé "?"                    Γöé
  5576. Γöé            Γöé      Γöé                      Γöé
  5577. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5578. Γöé "<colon>"       Γöé "<SP13>"  Γöé ":"                    Γöé
  5579. Γöé            Γöé      Γöé                      Γöé
  5580. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5581. Γöé "<apostrophe>"    Γöé "<SP05>"  Γöé "'"                    Γöé
  5582. Γöé            Γöé      Γöé                      Γöé
  5583. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5584. Γöé "<equals-sign>"    Γöé "<SA04>"  Γöé "="                    Γöé
  5585. Γöé            Γöé      Γöé                      Γöé
  5586. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5587. Γöé "<quotation-mark>"  Γöé "<SP04>"  Γöé """                    Γöé
  5588. Γöé            Γöé      Γöé                      Γöé
  5589. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5590. Γöé "<a>"         Γöé "<LA01>"  Γöé "a"                    Γöé
  5591. Γöé            Γöé      Γöé                      Γöé
  5592. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5593. Γöé "<b>"         Γöé "<LB01>"  Γöé "b"                    Γöé
  5594. Γöé            Γöé      Γöé                      Γöé
  5595. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5596. Γöé "<c>"         Γöé "<LC01>"  Γöé "c"                    Γöé
  5597. Γöé            Γöé      Γöé                      Γöé
  5598. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5599. Γöé "<d>"         Γöé "<LD01>"  Γöé "d"                    Γöé
  5600. Γöé            Γöé      Γöé                      Γöé
  5601. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5602. Γöé "<e>"         Γöé "<LE01>"  Γöé "e"                    Γöé
  5603. Γöé            Γöé      Γöé                      Γöé
  5604. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5605. Γöé "<f>"         Γöé "<LF01>"  Γöé "f"                    Γöé
  5606. Γöé            Γöé      Γöé                      Γöé
  5607. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5608. Γöé "<g>"         Γöé "<LG01>"  Γöé "g"                    Γöé
  5609. Γöé            Γöé      Γöé                      Γöé
  5610. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5611. Γöé "<h>"         Γöé "<LH01>"  Γöé "h"                    Γöé
  5612. Γöé            Γöé      Γöé                      Γöé
  5613. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5614. Γöé "<i>"         Γöé "<LI01>"  Γöé "i"                    Γöé
  5615. Γöé            Γöé      Γöé                      Γöé
  5616. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5617. Γöé "<j>"         Γöé "<LJ01>"  Γöé "j"                    Γöé
  5618. Γöé            Γöé      Γöé                      Γöé
  5619. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5620. Γöé "<k>"         Γöé "<LK01>"  Γöé "k"                    Γöé
  5621. Γöé            Γöé      Γöé                      Γöé
  5622. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5623. Γöé "<l>"         Γöé "<LL01>"  Γöé "l"                    Γöé
  5624. Γöé            Γöé      Γöé                      Γöé
  5625. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5626. Γöé "<m>"         Γöé "<LM01>"  Γöé "m"                    Γöé
  5627. Γöé            Γöé      Γöé                      Γöé
  5628. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5629. Γöé "<n>"         Γöé "<LN01>"  Γöé "n"                    Γöé
  5630. Γöé            Γöé      Γöé                      Γöé
  5631. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5632. Γöé "<o>"         Γöé "<LO01>"  Γöé "o"                    Γöé
  5633. Γöé            Γöé      Γöé                      Γöé
  5634. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5635. Γöé "<p>"         Γöé "<LP01>"  Γöé "p"                    Γöé
  5636. Γöé            Γöé      Γöé                      Γöé
  5637. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5638. Γöé "<q>"         Γöé "<LQ01>"  Γöé "q"                    Γöé
  5639. Γöé            Γöé      Γöé                      Γöé
  5640. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5641. Γöé "<r>"         Γöé "<LR01>"  Γöé "r"                    Γöé
  5642. Γöé            Γöé      Γöé                      Γöé
  5643. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5644. Γöé "<s>"         Γöé "<LS01>"  Γöé "s"                    Γöé
  5645. Γöé            Γöé      Γöé                      Γöé
  5646. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5647. Γöé "<t>"         Γöé "<LT01>"  Γöé "t"                    Γöé
  5648. Γöé            Γöé      Γöé                      Γöé
  5649. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5650. Γöé "<u>"         Γöé "<LU01>"  Γöé "u"                    Γöé
  5651. Γöé            Γöé      Γöé                      Γöé
  5652. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5653. Γöé "<v>"         Γöé "<LU01>"  Γöé "v"                    Γöé
  5654. Γöé            Γöé      Γöé                      Γöé
  5655. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5656. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5657. Γöé Table 2. Characters in portable character set and corresponding symbolic   Γöé
  5658. Γöé      names                                Γöé
  5659. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5660. Γöé SYMBOLIC NAME     Γöé ALTERNATE Γöé CHARACTER                 Γöé
  5661. Γöé            Γöé NAME    Γöé                      Γöé
  5662. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5663. Γöé "<w>"         Γöé "<LW01>"  Γöé "w"                    Γöé
  5664. Γöé            Γöé      Γöé                      Γöé
  5665. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5666. Γöé "<x>"         Γöé "<LX01>"  Γöé "x"                    Γöé
  5667. Γöé            Γöé      Γöé                      Γöé
  5668. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5669. Γöé "<y>"         Γöé "<LY01>"  Γöé "y"                    Γöé
  5670. Γöé            Γöé      Γöé                      Γöé
  5671. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5672. Γöé "<z>"         Γöé "<LZ01>"  Γöé "z"                    Γöé
  5673. Γöé            Γöé      Γöé                      Γöé
  5674. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5675. Γöé "<A>"         Γöé "<LA02>"  Γöé "A"                    Γöé
  5676. Γöé            Γöé      Γöé                      Γöé
  5677. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5678. Γöé "<B>"         Γöé "<LB02>"  Γöé "B"                    Γöé
  5679. Γöé            Γöé      Γöé                      Γöé
  5680. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5681. Γöé "<C>"         Γöé "<LC02>"  Γöé "C"                    Γöé
  5682. Γöé            Γöé      Γöé                      Γöé
  5683. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5684. Γöé "<D>"         Γöé "<LD02>"  Γöé "D"                    Γöé
  5685. Γöé            Γöé      Γöé                      Γöé
  5686. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5687. Γöé "<E>"         Γöé "<LE02>"  Γöé "E"                    Γöé
  5688. Γöé            Γöé      Γöé                      Γöé
  5689. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5690. Γöé "<F>"         Γöé "<LF02>"  Γöé "F"                    Γöé
  5691. Γöé            Γöé      Γöé                      Γöé
  5692. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5693. Γöé "<G>"         Γöé "<LG02>"  Γöé "G"                    Γöé
  5694. Γöé            Γöé      Γöé                      Γöé
  5695. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5696. Γöé "<H>"         Γöé "<LH02>"  Γöé "H"                    Γöé
  5697. Γöé            Γöé      Γöé                      Γöé
  5698. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5699. Γöé "<I>"         Γöé "<LI02>"  Γöé "I"                    Γöé
  5700. Γöé            Γöé      Γöé                      Γöé
  5701. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5702. Γöé "<J>"         Γöé "<LJ02>"  Γöé "J"                    Γöé
  5703. Γöé            Γöé      Γöé                      Γöé
  5704. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5705. Γöé "<K>"         Γöé "<LK02>"  Γöé "K"                    Γöé
  5706. Γöé            Γöé      Γöé                      Γöé
  5707. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5708. Γöé "<L>"         Γöé "<LL02>"  Γöé "L"                    Γöé
  5709. Γöé            Γöé      Γöé                      Γöé
  5710. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5711. Γöé "<M>"         Γöé "<SM02>"  Γöé "M"                    Γöé
  5712. Γöé            Γöé      Γöé                      Γöé
  5713. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5714. Γöé "<N>"         Γöé "<LN02>"  Γöé "N"                    Γöé
  5715. Γöé            Γöé      Γöé                      Γöé
  5716. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5717. Γöé "<O>"         Γöé "<LO02>"  Γöé "O"                    Γöé
  5718. Γöé            Γöé      Γöé                      Γöé
  5719. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5720. Γöé "<P>"         Γöé "<LP02>"  Γöé "P"                    Γöé
  5721. Γöé            Γöé      Γöé                      Γöé
  5722. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5723. Γöé "<Q>"         Γöé "<LQ02>"  Γöé "Q"                    Γöé
  5724. Γöé            Γöé      Γöé                      Γöé
  5725. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5726. Γöé "<R>"         Γöé "<LR02>"  Γöé "R"                    Γöé
  5727. Γöé            Γöé      Γöé                      Γöé
  5728. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5729. Γöé "<S>"         Γöé "<LS02>"  Γöé "S"                    Γöé
  5730. Γöé            Γöé      Γöé                      Γöé
  5731. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5732. Γöé "<T>"         Γöé "<LT02>"  Γöé "T"                    Γöé
  5733. Γöé            Γöé      Γöé                      Γöé
  5734. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5735. Γöé "<U>"         Γöé "<LU02>"  Γöé "U"                    Γöé
  5736. Γöé            Γöé      Γöé                      Γöé
  5737. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5738. Γöé "<V>"         Γöé "<LV02>"  Γöé "V"                    Γöé
  5739. Γöé            Γöé      Γöé                      Γöé
  5740. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5741. Γöé "<W>"         Γöé "<LW02>"  Γöé "W"                    Γöé
  5742. Γöé            Γöé      Γöé                      Γöé
  5743. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5744. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5745. Γöé Table 2. Characters in portable character set and corresponding symbolic   Γöé
  5746. Γöé      names                                Γöé
  5747. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5748. Γöé SYMBOLIC NAME     Γöé ALTERNATE Γöé CHARACTER                 Γöé
  5749. Γöé            Γöé NAME    Γöé                      Γöé
  5750. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5751. Γöé "<X>"         Γöé "<LX02>"  Γöé "X"                    Γöé
  5752. Γöé            Γöé      Γöé                      Γöé
  5753. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5754. Γöé "<Y>"         Γöé "<LY02>"  Γöé "Y"                    Γöé
  5755. Γöé            Γöé      Γöé                      Γöé
  5756. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5757. Γöé "<Z>"         Γöé "<LZ02>"  Γöé "Z"                    Γöé
  5758. Γöé            Γöé      Γöé                      Γöé
  5759. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5760. Γöé "<zero>"       Γöé "<ND10>"  Γöé "0"                    Γöé
  5761. Γöé            Γöé      Γöé                      Γöé
  5762. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5763. Γöé "<one>"        Γöé "<ND01>"  Γöé "1"                    Γöé
  5764. Γöé            Γöé      Γöé                      Γöé
  5765. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5766. Γöé "<two>"        Γöé "<ND02>"  Γöé "2"                    Γöé
  5767. Γöé            Γöé      Γöé                      Γöé
  5768. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5769. Γöé "<three>"       Γöé "<ND03>"  Γöé "3"                    Γöé
  5770. Γöé            Γöé      Γöé                      Γöé
  5771. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5772. Γöé "<four>"       Γöé "<ND04>"  Γöé "4"                    Γöé
  5773. Γöé            Γöé      Γöé                      Γöé
  5774. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5775. Γöé "<five>"       Γöé "<ND05>"  Γöé "5"                    Γöé
  5776. Γöé            Γöé      Γöé                      Γöé
  5777. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5778. Γöé "<six>"        Γöé "<ND06>"  Γöé "6"                    Γöé
  5779. Γöé            Γöé      Γöé                      Γöé
  5780. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5781. Γöé "<seven>"       Γöé "<ND07>"  Γöé "7"                    Γöé
  5782. Γöé            Γöé      Γöé                      Γöé
  5783. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5784. Γöé "<eight>"       Γöé "<ND08>"  Γöé "8"                    Γöé
  5785. Γöé            Γöé      Γöé                      Γöé
  5786. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5787. Γöé "<nine>"       Γöé "<ND09>"  Γöé "9"                    Γöé
  5788. Γöé            Γöé      Γöé                      Γöé
  5789. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5790. Γöé "<vertical-line>"   Γöé "<SM13>"  Γöé "|"                    Γöé
  5791. Γöé            Γöé      Γöé                      Γöé
  5792. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5793. Γöé "<exclamation-mark>" Γöé "<SP02>"  Γöé "!"                    Γöé
  5794. Γöé            Γöé      Γöé                      Γöé
  5795. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5796. Γöé "<dollar-sign>"    Γöé "<SC03>"  Γöé "$"                    Γöé
  5797. Γöé            Γöé      Γöé                      Γöé
  5798. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5799. Γöé "<circumflex>"    Γöé "<SD15>"  Γöé "^"                    Γöé
  5800. Γöé            Γöé      Γöé                      Γöé
  5801. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5802. Γöé "<circumflex-accent>"Γöé "<SD15>"  Γöé "^"                    Γöé
  5803. Γöé            Γöé      Γöé                      Γöé
  5804. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5805. Γöé "<grave-accent>"   Γöé "<SD13>"  Γöé "`"                    Γöé
  5806. Γöé            Γöé      Γöé                      Γöé
  5807. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5808. Γöé "<number-sign>"    Γöé "<SM01>"  Γöé "#"                    Γöé
  5809. Γöé            Γöé      Γöé                      Γöé
  5810. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5811. Γöé "<commercial-at>"   Γöé "<SM05>"  Γöé "@"                    Γöé
  5812. Γöé            Γöé      Γöé                      Γöé
  5813. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5814. Γöé "<tilde>"       Γöé "<SD19>"  Γöé "~"                    Γöé
  5815. Γöé            Γöé      Γöé                      Γöé
  5816. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5817. Γöé "<left-square-bracketΓöé""<SM06>"  Γöé "["                    Γöé
  5818. Γöé            Γöé      Γöé                      Γöé
  5819. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5820. Γöé "<right-square-brackeΓöé>"<SM08>"  Γöé "]"                    Γöé
  5821. Γöé            Γöé      Γöé                      Γöé
  5822. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5823. Γöé "<left-brace>"    Γöé "<SM11>"  Γöé "{"                    Γöé
  5824. Γöé            Γöé      Γöé                      Γöé
  5825. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5826. Γöé "<left-curly-bracket>Γöé "<SM11>"  Γöé "{"                    Γöé
  5827. Γöé            Γöé      Γöé                      Γöé
  5828. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5829. Γöé "<right-brace>"    Γöé "<SM14>"  Γöé "}"                    Γöé
  5830. Γöé            Γöé      Γöé                      Γöé
  5831. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5832. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  5833. Γöé Table 2. Characters in portable character set and corresponding symbolic   Γöé
  5834. Γöé      names                                Γöé
  5835. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5836. Γöé SYMBOLIC NAME     Γöé ALTERNATE Γöé CHARACTER                 Γöé
  5837. Γöé            Γöé NAME    Γöé                      Γöé
  5838. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5839. Γöé "<right-curly-bracketΓöé""<SM14>"  Γöé "}"                    Γöé
  5840. Γöé            Γöé      Γöé                      Γöé
  5841. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5842. Γöé "<backslash>"     Γöé "<SM07>"  Γöé "\"                    Γöé
  5843. Γöé            Γöé      Γöé                      Γöé
  5844. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  5845. Γöé "<reverse-solidus>"  Γöé "<SM07>"  Γöé "\"                    Γöé
  5846. Γöé            Γöé      Γöé                      Γöé
  5847. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  5848.  
  5849. The portable character set is the basis for the syntactic and semantic 
  5850. processing of the LOCALDEF tool, and for most of the utilities and functions 
  5851. that access the locale object files. Therefore the portable character set must 
  5852. always be defined. 
  5853.  
  5854. The charmap file is divided into two main sections: 
  5855.  
  5856.    1. the character symbolic name to hexidecimal mapping section, or CHARMAP 
  5857.  
  5858.    2. the character symbolic name to character set identifier section, or 
  5859.       CHARSETID 
  5860.  
  5861.  The following definitions can precede the two sections listed above. Each 
  5862.  consists of the symbol shown in the following list, starting in column 1, 
  5863.  including the surrounding brackets, followed by one or more <blank>s, followed 
  5864.  by the value to be assigned to the symbol. 
  5865.  
  5866.  <code_set_name> 
  5867.            The string literal containing the name of the coded character set 
  5868.            name 
  5869.  
  5870.  <mb_cur_max> 
  5871.            the maximum number of bytes in a multibyte character which can be 
  5872.            set to a value of either 1 or 2. If it is 1, each character in the 
  5873.            character set defined in this charmap is encoded by a one-byte 
  5874.            value. If it is 2, each character in the character set defined in 
  5875.            this charmap is encoded by a one- or two-byte value. If it is not 
  5876.            specified, the default value of 1 is assumed. If a value of other 
  5877.            than 1 or 2, is specified, a warning message is issued and the 
  5878.            default value of 1 is assumed. 
  5879.  
  5880.  <mb_cur_min> 
  5881.            The minimum number of bytes in a multibyte character.  Can be set to 
  5882.            1 only. If a value of other than 1 is specified, a warning message 
  5883.            is issued and the default value of 1 is assumed. 
  5884.  
  5885.  <escape_char> 
  5886.            Specifies the escape character that is used to specify hexadecimal 
  5887.            or octal notation for numeric values. It defaults to the hexadecimal 
  5888.            value 0x5C, which represents the \ character in the coded character 
  5889.            set IBM-850. 
  5890.  
  5891.  <comment_char> 
  5892.            Denotes the character chosen to indicate a comment within a charmap 
  5893.            file. It defaults to the hexadecimal value 0x23, which represents 
  5894.            the # character in the coded character set IBM-850. 
  5895.  
  5896.  
  5897. ΓòÉΓòÉΓòÉ 10.1.1. The CHARMAP Section ΓòÉΓòÉΓòÉ
  5898.  
  5899. The CHARMAP section defines the values for the symbolic names representing 
  5900. characters in the coded character set. Each charmap file must define at least 
  5901. the portable character set. The character symbolic names or alternate symbolic 
  5902. names (or both) must be be used to define the portable character set. These are 
  5903. shown in Characters in portable character set and corresponding symbolic names. 
  5904.  
  5905. Additional characters can be defined by the user with symbolic character names. 
  5906.  
  5907. The CHARMAP section starts with the line containing the keyword CHARMAP, and 
  5908. ends with the line containing the keywords END CHARMAP. CHARMAP and END CHARMAP 
  5909. must both start in column one. 
  5910.  
  5911. The character set mapping definitions are all the lines between the first and 
  5912. last lines of the CHARMAP section. 
  5913.  
  5914. The formats of the character set mappings for this section are as follows: 
  5915.  
  5916. "%s %s %s\n", <symbolic-name>, <encoding>, <comments>
  5917. "%s...%s %s %s\n", <symbolic-name>, <symbolic-name>, <encoding>, <comments>
  5918.  
  5919. The first format defines a single symbolic name and a corresponding encoding. A 
  5920. symbolic name is one or more characters with visible glyphs, enclosed between 
  5921. angle brackets. 
  5922.  
  5923. A character following an escape character is interpreted as itself; for 
  5924. example, the sequence <\\\>> represents the symbolic name \> enclosed within 
  5925. angle brackets, where the backslash (\) is the escape character. 
  5926.  
  5927. The second format defines a group of symbolic names associated with a range of 
  5928. values.  The two symbolic names are comprised of two parts, a prefix and 
  5929. suffix.  The prefix consists of zero or more non-numeric invariant visible 
  5930. glyph characters and is the same for both symbolic names.  The suffix consists 
  5931. of a positive decimal integer.  The suffix of the first symbolic name must be 
  5932. less than or equal to the suffix of the second symbolic name. As an example, 
  5933. <j0101>...<j0104> is interpreted as the symbolic names 
  5934. <j0101>,<j0102>,<j0103>,<j0104>. The common prefix is 'j' and the suffixes are 
  5935. '0101' and '0104'. 
  5936.  
  5937. The encoding part can be written in one of two forms: 
  5938.  
  5939.   <escape-char><number>                       (single byte value)
  5940.   <escape-char><number><escape-char><number>  (double byte value)
  5941. The number can be written using octal, decimal, or hexadecimal notation. 
  5942. Decimal numbers are written as a 'd' followed by 2 or 3 decimal digits. 
  5943. Hexadecimal numbers are written as an 'x' followed by 2 hexadecimal digits. An 
  5944. octal number is written with 2 or 3 octal digits. As an example, the single 
  5945. byte value x1F could be written as '\37', '\x1F', or '\d31'. The double byte 
  5946. value of x1A1F could be written as '\32\37', '\x1A\x1F', or '\d26\d31'. 
  5947.  
  5948. In lines defining ranges of symbolic names, the encoded value is the value for 
  5949. the first symbolic name in the range (the symbolic name preceding the 
  5950. ellipsis). Subsequent names defined by the range have encoding values in 
  5951. increasing order. 
  5952.  
  5953. When constants are concatenated for multibyte character values, they must be of 
  5954. the same type, and are interpreted in byte order from first to last with the 
  5955. least significant byte of the multibyte character specified by the last 
  5956. constant. For example, the following line: 
  5957.  
  5958.    <j0101>...<j0104>             \d129\d254
  5959. would be interpreted as follows: 
  5960.  
  5961.    <j0101>                           \d129\d254
  5962.    <j0102>                           \d129\d255
  5963.    <j0103>                           \d130\d0
  5964.    <j0104>                           \d130\d1
  5965.  
  5966.  
  5967. ΓòÉΓòÉΓòÉ 10.1.2. The CHARSETID Section ΓòÉΓòÉΓòÉ
  5968.  
  5969. The character set identifier section of the charmap file maps the symbolic 
  5970. names defined in the CHARMAP section to a character set identifier. 
  5971.  
  5972. Note:  The two functions csid and wcsid query the locales and return the 
  5973.        character set identifier for a given character.  This information is not 
  5974.        currently used by any other library function. 
  5975.  
  5976.  The CHARSETID section starts with a line containing the keyword CHARSETID, and 
  5977.  ends with the line containing the keywords END CHARSETID. Both CHARSETID and 
  5978.  END CHARSETID must begin in column 1. The lines between the first and last 
  5979.  lines of the CHARSETID section define the character set identifier for the 
  5980.  defined coded character set. 
  5981.  
  5982.  The character set identifier mappings are defined as follows: 
  5983.  
  5984.   "%s %c", <symbolic-name>, <value>
  5985.   "%c %c", <value>, <value>
  5986.   "%s...%s %c", <symbolic-name>, <symbolic-name>, <value>
  5987.   "%c...%c %c", <value>, <value>, <value>
  5988.   "%s...%c %c", <symbolic-name>, <value>, <value>
  5989.   "%c...%s %c", <value>, <symbolic-name>, <value>
  5990.  
  5991.  The individual characters are specified by the symbolic name or the value. The 
  5992.  group of characters are specified by two symbolic names or by two numeric 
  5993.  values (or combination) separated by an ellipsis (...). The interpretation of 
  5994.  ranges of values is the same as specified in the CHARMAP section. The 
  5995.  character set identifier is specified by a numeric value. 
  5996.  
  5997.  
  5998. ΓòÉΓòÉΓòÉ 10.2. Locale Source Files ΓòÉΓòÉΓòÉ
  5999.  
  6000. Locales are defined through the specification of a locale definition file. The 
  6001. locale definition contains one or more distinct locale category source 
  6002. definitions and not more than one definition of any category.  Each category 
  6003. controls specific aspects of the cultural environment. A category source 
  6004. definition is either the explicit definition of a category or the copy 
  6005. directive, which indicates that the category definition should be copied from 
  6006. another locale definition file. 
  6007.  
  6008. The definition file is composed of an optional definition section for the 
  6009. escape and comment characters to be used, followed by the category source 
  6010. definitions.  Comment lines and blank lines can appear anywhere in the locale 
  6011. definition file. If the escape and comment characters are not defined, default 
  6012. code points are used (x5C for the escape character and x23 for the comment 
  6013. character, respectively). The definition section consists of the following 
  6014. optional lines: 
  6015.  
  6016. escape_char     <character>
  6017. comment_char    <character>
  6018. where <character> in both cases is a single-byte character to be used, for 
  6019. example: 
  6020.  
  6021. escape_char     /
  6022. defines the escape character in this file to be '/' (the <slash> character). 
  6023.  
  6024. Locale definition files passed to the localedef utility are assumed to be in 
  6025. coded character set IBM-850. 
  6026.  
  6027. Each category source definition consists of a category header, a category body, 
  6028. and a category trailer, in that order. 
  6029.  
  6030.  category header 
  6031.                      consists of the keyword naming the category. Each category 
  6032.                      name starts with the characters LC_ The following category 
  6033.                      names are supported: LC_CTYPE, LC_COLLATE, LC_NUMERIC, 
  6034.                      LC_MONETARY, LC_TIME, LC_MESSAGES, LC_TOD, and LC_SYNTAX. 
  6035.  
  6036.                      The LC_TOD and LC_SYNTAX categories, if present, must be 
  6037.                      the last two categories in the locale definition file. 
  6038.  
  6039.  category body 
  6040.                      consists of one or more lines describing the components of 
  6041.                      the category. Each component line has the following 
  6042.                      format: 
  6043.  
  6044.                                              <identifer>   <operand1>
  6045.                                              <identifer>   <operand1>;<operand2>;...;<operandN>
  6046.                      <identifier> is a keyword that identifies a locale 
  6047.                      element, or a symbolic name that identifies a collating 
  6048.                      element. <operand> is a character, collating element, or 
  6049.                      string literal. Escape sequences can be specified in a 
  6050.                      string literal using the <escape_character>. If multiple 
  6051.                      operands are specified, they must be separated by 
  6052.                      semicolons. White space can be before and after the 
  6053.                      semicolons. 
  6054.  
  6055.  category trailer 
  6056.                      consists of the keyword END followed by one or more 
  6057.                      <blank>s and the category name of the corresponding 
  6058.                      category header. 
  6059.  Here is an example of locale source containing the header, body, and trailer: 
  6060.  
  6061.      # Here is a simple locale definition file consisting of one
  6062.      # category source definition, LC_CTYPE.
  6063.  
  6064.      LC_CTYPE
  6065.      upper <A>;...;<Z>
  6066.      END LC_CTYPE
  6067.  You do not have to define each category. Where category definitions are absent 
  6068.  from the locale source, default definitions are used. 
  6069.  
  6070.  In each category the keyword copy followed by a string specifies the name of 
  6071.  an existing locale to be used as the source for the definition of this 
  6072.  category. The compiler searches for a specified existing locale as follows: 
  6073.  
  6074.    1. If you specify a path, the compiler searches that path. 
  6075.    2. If you specify a file name but no path, the compiler searches the current 
  6076.       directory. 
  6077.    3. If you specify a file name but no path and the file is not in the current 
  6078.       directory, the compiler searches the paths that you specified in the 
  6079.       DPATH environment variable. 
  6080.  
  6081.  If the locale is not found, an error is reported and no locale output is 
  6082.  created. 
  6083.  
  6084.  You can continue a line in a locale definition file by placing an escape 
  6085.  character as the last character on the line. This continuation character is 
  6086.  discarded from the input. Even though there is no limitation on the length of 
  6087.  each line, for portability reasons it is suggested that each line be no longer 
  6088.  than 2048 characters (bytes). There is no limit on the accumulated length of a 
  6089.  continued line. You cannot continue comment lines on a subsequent line by 
  6090.  using an escaped <newline>. 
  6091.  
  6092.  Individual characters, characters in strings, and collating elements are 
  6093.  represented using symbolic names, as defined below. Characters can also be 
  6094.  represented as the characters themselves, or as octal, hexadecimal, or decimal 
  6095.  constants. If you use non-symbolic notation, the resultant locale definition 
  6096.  file may not be portable among systems and environments. The left angle 
  6097.  bracket (<) is a reserved symbol, denoting the start of a symbolic name; if 
  6098.  you use it to represent itself, you must precede it with the escape character. 
  6099.  
  6100.  The following rules apply to the character representation: 
  6101.  
  6102.    1. A character can be represented by a symbolic name, enclosed within angle 
  6103.       brackets. The symbolic name, including the angle brackets, must exactly 
  6104.       match a symbolic name defined in the charmap file.  The symbolic name is 
  6105.       replaced by the character value determined from the value associated with 
  6106.       the symbolic name in the charmap file. 
  6107.  
  6108.       The use of a symbolic name not found in the charmap file constitutes an 
  6109.       error, unless the name is in the category LC_CTYPE or LC_COLLATE, in 
  6110.       which case it constitutes a warning. Use of the escape character or right 
  6111.       angle bracket within a symbolic name is invalid unless the character is 
  6112.       preceded by the escape character. For example: 
  6113.  
  6114.       <c>;<c-cedilla>     specifies two characters whose symbolic names are "c" 
  6115.                           and "c-cedilla" 
  6116.  
  6117.       "<M><a><y>"         specifies a 3-character string composed of letters 
  6118.                           represented by symbolic names "M", "a", and "y". 
  6119.  
  6120.       "<a><\>>"           specifies a 2-character string composed of letters 
  6121.                           represented by symbolic names "a" and ">" (assuming 
  6122.                           the escape character is \) 
  6123.  
  6124.    2. A character can represent itself. Within a string, the double quotation 
  6125.       mark, the escape character, and the left angle bracket must be escaped 
  6126.       (preceded by the escape character) to be interpreted as the characters 
  6127.       themselves. For example: 
  6128.  
  6129.       c              'c' character represented by itself 
  6130.  
  6131.       "may"          represents a 3-character string, each character within the 
  6132.                      string represented by itself 
  6133.  
  6134.       "###"#>"       represents the three character long string "#">", where 
  6135.                      the escape character is defined as #. 
  6136.  
  6137.    3. A character can be represented as an octal constant. An octal constant is 
  6138.       specified as the escape character followed by two or more octal digits. 
  6139.       Each constant represents a byte value. 
  6140.  
  6141.       For example: 
  6142.  
  6143.             \131 "\212\129\168" \16\66\193\17
  6144.  
  6145.    4. A character can be represented as a hexadecimal constant. A hexadecimal 
  6146.       constant is specified as the escape character, followed by an x, followed 
  6147.       by two or more hexadecimal digits. Each constant represents a byte value. 
  6148.  
  6149.       Example: \x83 "\xD4\x81\xA8" 
  6150.  
  6151.    5. A character can be represented as a decimal constant. A decimal constant 
  6152.       is specified as the escape character followed by a d followed by two or 
  6153.       more decimal digits. Each constant represents a byte value. 
  6154.  
  6155.       Example: \d131 "\d212\d129\d168" \d14\d66\d193\d15 
  6156.  
  6157.  
  6158.  Multibyte characters can be represented by concatenating constants specified 
  6159.  in byte order with the last constant specifying the least significant byte of 
  6160.  the character. 
  6161.  
  6162.  
  6163. ΓòÉΓòÉΓòÉ 10.3. Using the LOCALDEF Utility ΓòÉΓòÉΓòÉ
  6164.  
  6165. The locale objects or locales are generated using the LOCALDEF utility. The 
  6166. LOCALDEF utility: 
  6167.  
  6168.    1. Reads the locale definition file. 
  6169.  
  6170.    2. Resolves all the character symbolic names to the values of characters 
  6171.       defined in the specified character set definition file. 
  6172.  
  6173.    3. Produces a VisualAge C++ source file. 
  6174.  
  6175.    4. Compiles the source file using the VisualAge C++compiler and links the 
  6176.       object file to produce a locale module. 
  6177.  
  6178.  The locale module can be loaded by the setlocale function and then accessed by 
  6179.  the VisualAge C++ functions that are sensitive to the cultural information, or 
  6180.  that can query the locales. For a list of all the library functions sensitive 
  6181.  to locale, see Locale-Sensitive Interfaces. For detailed information on how to 
  6182.  invoke the LOCALDEF utility, see the User's Guide. 
  6183.  
  6184.  
  6185. ΓòÉΓòÉΓòÉ 10.3.1. Locale Naming Conventions ΓòÉΓòÉΓòÉ
  6186.  
  6187. The setlocale library function that selects the active locale maps the 
  6188. descriptive locale name into the name of the locale object before loading the 
  6189. locale and making it accessible. 
  6190.  
  6191. In VisualAge C++ programs, the locale modules are referred to by descriptive 
  6192. locale names.  The locale names themselves are not case sensitive. They follow 
  6193. these conventions: 
  6194.  
  6195. <Language>_<Territory>.<Codeset>
  6196.  
  6197. Where: 
  6198.  
  6199.  Language 
  6200.            is a two-letter abbreviation for the language name.  The 
  6201.            abbreviations come from the ISO 639 standard. 
  6202.  
  6203.  Territory 
  6204.            is a two-letter abbreviation for the territory name.  The 
  6205.            abbreviation comes from the ISO 3166 standard. 
  6206.  
  6207.  Codeset 
  6208.            is the name registered by the MIT X Consortium that identifies the 
  6209.            registration authority that owns the specific encoding. 
  6210.  
  6211.            A modifier may be added to the registered name but is not required. 
  6212.            The modifier is of the form @modifier and identifies the coded 
  6213.            character set as defined by that registration authority. 
  6214.  
  6215.            Note:  On FAT file systems, the modifier cannot be used as it causes 
  6216.            the filename to exceed the 8 character FAT filename limit. 
  6217.  The Codeset parts are optional. If they are not specified, Codeset defaults to 
  6218.  IBM-nnn, where nnn is the current code page.  (The modifier portion defaults 
  6219.  to nothing.) 
  6220.  
  6221.  The locale name parameter is used to locate the locale as follows: 
  6222.  
  6223.      If the locale name contains the drive letter (for example, C:) or the 
  6224.       backslash character, it is a fully-qualified name (such as 
  6225.       \IBMCPP\LOCALE\FRED\IBM-850). The name must specify the name of a DLL 
  6226.       that contains the locale. If you do not specify the extension .LCL, it is 
  6227.       appended to the name. 
  6228.  
  6229.      If the locale name does not contain a drive letter or the backslash 
  6230.       character, it is not a fully-qualified name. The setlocale function tries 
  6231.       to load the locale from the current directory, or from the directories 
  6232.       that you specified in the LOCPATH environment variable. The specified 
  6233.       paths are searched to find the DLL that contains the locale. 
  6234.  
  6235.  The locale name parameter is processed to produce a filename suitable for use 
  6236.  with the FAT file system: 
  6237.  
  6238.    1. The locale name parameter is separated into two parts, language_territory 
  6239.       and codeset. 
  6240.  
  6241.    2. If you specify the codeset name, the locale name is built as: 
  6242.  
  6243.                language_territory\codeset.LCL
  6244.  
  6245.    3. If you do not specify the codeset name, the locale name is built as 
  6246.       language_territory.LCL. 
  6247.  
  6248.    4. If the locale cannot be found, the DosQueryCp function determines the 
  6249.       current codepage. The codeset name is built as IBM-nnn, where nnn is the 
  6250.       current codepage. 
  6251.  
  6252.       The locale name is then built as: 
  6253.  
  6254.                language_territory\codeset.LCL
  6255.  
  6256.  The following locale names are provided: 
  6257.  
  6258.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6259.   Γöé Table 3. Compiled locales supplied with VisualAge C++             Γöé
  6260.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6261.   Γöé LOCALE NAME  Γöé LANGUAGE  Γöé COUNTRY       Γöé CODESET   Γöé LOCALE MODULE Γöé
  6262.   Γöé AS IN     Γöé       Γöé           Γöé       Γöé NAME      Γöé
  6263.   Γöé SETLOCALE()  Γöé       Γöé           Γöé       Γöé        Γöé
  6264.   Γöé ARGUMENT    Γöé       Γöé           Γöé       Γöé        Γöé
  6265.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6266.   Γöé C       Γöé       Γöé           Γöé       Γöé        Γöé
  6267.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6268.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6269.   Γöé DA_DK.IBM-850 Γöé Danish   Γöé Denmark       Γöé IBM-850   Γöé DA_DK\IBM-850 Γöé
  6270.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6271.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6272.   Γöé DA_DK.IBM-865 Γöé Danish   Γöé Denmark       Γöé IBM-865   Γöé DA_DK\IBM-865 Γöé
  6273.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6274.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6275.   Γöé DE_CH.IBM-437 Γöé Deutsch   Γöé Switzerland     Γöé IBM-437   Γöé DE_CH\IBM-437 Γöé
  6276.   Γöé        Γöé (German)  Γöé           Γöé       Γöé        Γöé
  6277.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6278.   Γöé DE_CH.IBM-850 Γöé Deutsch   Γöé Switzerland     Γöé IBM-850   Γöé DE_CH\IBM-850 Γöé
  6279.   Γöé        Γöé (German)  Γöé           Γöé       Γöé        Γöé
  6280.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6281.   Γöé DE_DE.IBM-437 Γöé Deutsch   Γöé Germany       Γöé IBM-437   Γöé DE_DE\IBM-437 Γöé
  6282.   Γöé        Γöé (German)  Γöé           Γöé       Γöé        Γöé
  6283.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6284.   Γöé DE_DE.IBM-850 Γöé Deutsch   Γöé Germany       Γöé IBM-850   Γöé DE_DE\IBM-850 Γöé
  6285.   Γöé        Γöé (German)  Γöé           Γöé       Γöé        Γöé
  6286.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6287.   Γöé EN_GB.IBM-437 Γöé English   Γöé United Kingdom   Γöé IBM-437   Γöé EN_GB\IBM-437 Γöé
  6288.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6289.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6290.   Γöé EN_GB.IBM-850 Γöé English   Γöé United Kingdom   Γöé IBM-850   Γöé EN_GB\IBM-850 Γöé
  6291.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6292.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6293.   Γöé EN_JP.IBM-437 Γöé English   Γöé Japan        Γöé IBM-437   Γöé EN_JP\IBM-437 Γöé
  6294.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6295.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6296.   Γöé EN_JP.IBM-850 Γöé English   Γöé Japan        Γöé IBM-850   Γöé EN_JP\IBM-850 Γöé
  6297.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6298.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6299.   Γöé EN_US.IBM-437 Γöé English   Γöé United States    Γöé IBM-437   Γöé EN_US\IBM-437 Γöé
  6300.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6301.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6302.   Γöé EN_US.IBM-850 Γöé English   Γöé United States    Γöé IBM-850   Γöé EN_US\IBM-850 Γöé
  6303.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6304.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6305.   Γöé ES_ES.IBM-437 Γöé Espa╨┤ol   Γöé Spain        Γöé IBM-437   Γöé EN_ES\IBM-437 Γöé
  6306.   Γöé        Γöé (Spanish)  Γöé           Γöé       Γöé        Γöé
  6307.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6308.   Γöé ES_ES.IBM-850 Γöé Espa╨┤ol   Γöé Spain        Γöé IBM-850   Γöé EN_ES\IBM-850 Γöé
  6309.   Γöé        Γöé (Spanish)  Γöé           Γöé       Γöé        Γöé
  6310.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6311.   Γöé FI_FI.IBM-437 Γöé Finnish   Γöé Finland       Γöé IBM-437   Γöé FI_FI\IBM-437 Γöé
  6312.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6313.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6314.   Γöé FI_FI.IBM-850 Γöé Finnish   Γöé Finland       Γöé IBM-850   Γöé FI_FI\IBM-850 Γöé
  6315.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6316.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6317.   Γöé FR_BE.IBM-437 Γöé French   Γöé Belgium       Γöé IBM-437   Γöé FR_BE\IBM-437 Γöé
  6318.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6319.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6320.   Γöé FR_BE.IBM-850 Γöé French   Γöé Belgium       Γöé IBM-850   Γöé FR_BE\IBM-850 Γöé
  6321.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6322.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6323.   Γöé FR_CA.IBM-850 Γöé French   Γöé Canada       Γöé IBM-850   Γöé FR_CA\IBM-850 Γöé
  6324.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6325.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6326.   Γöé FR_CA.IBM-863 Γöé French   Γöé Canada       Γöé IBM-863   Γöé FR_CA\IBM-863 Γöé
  6327.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6328.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6329.   Γöé FR_CH.IBM-437 Γöé French   Γöé Switzerland     Γöé IBM-437   Γöé FR_CH\IBM-437 Γöé
  6330.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6331.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6332.   Γöé FR_CH.IBM-850 Γöé French   Γöé Switzerland     Γöé IBM-850   Γöé FR_CH\IBM-850 Γöé
  6333.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6334.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6335.   Γöé FR_FR.IBM-437 Γöé French   Γöé France       Γöé IBM-437   Γöé FR_FR\IBM-437 Γöé
  6336.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6337.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6338.   Γöé FR_FR.IBM-850 Γöé French   Γöé France       Γöé IBM-850   Γöé FR_FR\IBM-850 Γöé
  6339.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6340.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6341.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6342.   Γöé Table 3. Compiled locales supplied with VisualAge C++             Γöé
  6343.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6344.   Γöé LOCALE NAME  Γöé LANGUAGE  Γöé COUNTRY       Γöé CODESET   Γöé LOCALE MODULE Γöé
  6345.   Γöé AS IN     Γöé       Γöé           Γöé       Γöé NAME      Γöé
  6346.   Γöé SETLOCALE()  Γöé       Γöé           Γöé       Γöé        Γöé
  6347.   Γöé ARGUMENT    Γöé       Γöé           Γöé       Γöé        Γöé
  6348.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6349.   Γöé IS_IS.IBM-850 Γöé Γòôslensk   Γöé Iceland       Γöé IBM-850   Γöé IS_IS\IBM-850 Γöé
  6350.   Γöé        Γöé (Icelandic)Γöé           Γöé       Γöé        Γöé
  6351.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6352.   Γöé IS_IS.IBM-861 Γöé Γòôslensk   Γöé Iceland       Γöé IBM-861   Γöé IS_IS\IBM-861 Γöé
  6353.   Γöé        Γöé (Icelandic)Γöé           Γöé       Γöé        Γöé
  6354.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6355.   Γöé IT_IT.IBM-437 Γöé Italian   Γöé Italy        Γöé IBM-437   Γöé IT_IT\IBM-437 Γöé
  6356.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6357.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6358.   Γöé IT_IT.IBM-850 Γöé Italian   Γöé Italy        Γöé IBM-850   Γöé IT_IT\IBM-850 Γöé
  6359.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6360.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6361.   Γöé JA_JP.IBM-932 Γöé Japanese  Γöé Japan        Γöé IBM-932   Γöé JA_JP\IBM-932 Γöé
  6362.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6363.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6364.   Γöé NL_BE.IBM-437 Γöé Nederlands Γöé Belgium       Γöé IBM-437   Γöé NL_BE\IBM-437 Γöé
  6365.   Γöé        Γöé (Dutch)   Γöé           Γöé       Γöé        Γöé
  6366.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6367.   Γöé NL_BE.IBM-850 Γöé Nederlands Γöé Belgium       Γöé IBM-850   Γöé NL_BE\IBM-850 Γöé
  6368.   Γöé        Γöé (Dutch)   Γöé           Γöé       Γöé        Γöé
  6369.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6370.   Γöé NL_NL.IBM-437 Γöé Nederlands Γöé Netherlands     Γöé IBM-437   Γöé NL_NL\IBM-437 Γöé
  6371.   Γöé        Γöé (Dutch)   Γöé           Γöé       Γöé        Γöé
  6372.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6373.   Γöé NL_NL.IBM-850 Γöé Nederlands Γöé Netherlands     Γöé IBM-850   Γöé NL_NL\IBM-850 Γöé
  6374.   Γöé        Γöé (Dutch)   Γöé           Γöé       Γöé        Γöé
  6375.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6376.   Γöé NO_NO.IBM-850 Γöé Norwegian  Γöé Norway       Γöé IBM-850   Γöé NO_NO\IBM-850 Γöé
  6377.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6378.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6379.   Γöé NO_NO.IBM-865 Γöé Norwegian  Γöé Norway       Γöé IBM-865   Γöé NO_NO\IBM-865 Γöé
  6380.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6381.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6382.   Γöé PT_PT.IBM-850 Γöé Portuguese Γöé Portugal      Γöé IBM-850   Γöé PT_PT\IBM-850 Γöé
  6383.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6384.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6385.   Γöé PT_PT.IBM-860 Γöé Portuguese Γöé Portugal      Γöé IBM-860   Γöé PT_PT\IBM-860 Γöé
  6386.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6387.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6388.   Γöé SV_SE.IBM-437 Γöé Svensk   Γöé Sweden       Γöé IBM-437   Γöé SV_SE\IBM-437 Γöé
  6389.   Γöé        Γöé (Swedish)  Γöé           Γöé       Γöé        Γöé
  6390.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6391.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6392.   Γöé SV_SE.IBM-850 Γöé Svensk   Γöé Sweden       Γöé IBM-850   Γöé SV_SE\IBM-850 Γöé
  6393.   Γöé        Γöé (Swedish)  Γöé           Γöé       Γöé        Γöé
  6394.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6395.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6396.   Γöé TR_TR.IBM-857 Γöé Turkish   Γöé Turkey       Γöé IBM-857   Γöé TR_TR\IBM-857 Γöé
  6397.   Γöé        Γöé       Γöé           Γöé       Γöé        Γöé
  6398.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6399.  The exceptions to the rule above are the following special locale names, which 
  6400.  are already recognized: 
  6401.  
  6402.      C 
  6403.      POSIX 
  6404.      GERM 
  6405.      FRAN 
  6406.      UK 
  6407.      ITAL 
  6408.      SPAI 
  6409.      USA 
  6410.      JAPN 
  6411.      JAP2 
  6412.      JAP3 
  6413.      CDEF which is compatible with C locale from the previous release. 
  6414.  
  6415.  You can use the following macros, defined in the locale.h header file, as 
  6416.  synonyms for the special locale names above. 
  6417.  
  6418.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  6419.   Γöé MACRO                 Γöé LOCALE                Γöé
  6420.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6421.   Γöé "LC_C"                 Γöé ""C""                 Γöé
  6422.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6423.   Γöé "LC_C_GERMANY"             Γöé ""GERM""               Γöé
  6424.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6425.   Γöé "LC_C_FRANCE"             Γöé ""FRAN""               Γöé
  6426.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6427.   Γöé "LC_C_UK"               Γöé ""UK""                Γöé
  6428.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6429.   Γöé "LC_C_ITALY"              Γöé ""ITAL""               Γöé
  6430.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6431.   Γöé "LC_C_SPAIN"              Γöé ""SPAI""               Γöé
  6432.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6433.   Γöé "LC_C_USA"               Γöé ""USA""                Γöé
  6434.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6435.   Γöé "LC_C_JAPAN"              Γöé ""JAPN""               Γöé
  6436.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6437.   Γöé "LC_C_JAPAN2"             Γöé ""JAP2""               Γöé
  6438.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  6439.   Γöé "LC_C_JAPAN3"             Γöé ""JAP3""               Γöé
  6440.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  6441.  
  6442.  
  6443. ΓòÉΓòÉΓòÉ 11. Using Templates in C++ Programs ΓòÉΓòÉΓòÉ
  6444.  
  6445. Templates may be used in C++ to declare and define classes, functions, and 
  6446. static data members of template classes. The C++ language describes the syntax 
  6447. and meaning of each kind of template.  Each particular compiler, however, 
  6448. determines the mechanism that controls when and how often a template is 
  6449. expanded. 
  6450.  
  6451. VisualAge C++ offers several alternative organizations with a range of 
  6452. convenience and compile performance to meet the needs of any application.  This 
  6453. chapter describes those alternatives and the criteria you should use to select 
  6454. which one is right for you. 
  6455.  
  6456. This section discusses: 
  6457.  
  6458.      Template Terms 
  6459.      How the Compiler Expands Templates 
  6460.      Example of Generating Template Function Definitions 
  6461.      Including Defining Templates 
  6462.      Mixing Old and New Templates 
  6463.  
  6464.  For a general description of templates, see the online Language Reference. 
  6465.  
  6466.   CAUTION:
  6467.  Do not attempt to link objects produced from compiling the assembler listings 
  6468.  of programs containing templates. Even if the  listing does compile, it will 
  6469.  not link correctly. (The linker may perform the link without error but the 
  6470.  .EXE will produce incorrect results.) 
  6471.  
  6472.  
  6473. ΓòÉΓòÉΓòÉ 11.1. Template Terms ΓòÉΓòÉΓòÉ
  6474.  
  6475. The following terms are used to describe the template constructs in C++: 
  6476.  
  6477.  class template 
  6478.            A template used to generate classes.  Classes generated in this 
  6479.            fashion are called template classes. A class template describes a 
  6480.            family of related classes. It can simply be a declaration, or it can 
  6481.            can be a definition of a particular class. 
  6482.  
  6483.  function template 
  6484.            A template used to generate functions.  Functions generated in this 
  6485.            fashion are called template functions. A function template describes 
  6486.            a family of related functions. It can simply be a declaration, or it 
  6487.            can be a definition of a particular function. 
  6488.  
  6489.  declaring template 
  6490.            A class template or function template that includes a declaration 
  6491.            but does not include a definition.  For example, this is what a 
  6492.            declaring function template would look like. 
  6493.  
  6494.                          template<class A> void foo(A*a);
  6495.            A declaring class template would look like this 
  6496.  
  6497.                          template<class T> class C;
  6498.  
  6499.  defining template 
  6500.            A class template or function template declaration that includes a 
  6501.            definition. A defining function template would look like this: 
  6502.  
  6503.                          template<class A> void foo(A*a) {a ->Bar();};
  6504.            A defining class template would look like this: 
  6505.  
  6506.                          template<class T> class C : public A {public: void boo();};
  6507.  
  6508.  explicit definition 
  6509.            A user-supplied definition that overrides a template.  For example, 
  6510.            an explicit definition of the foo() function would look like this: 
  6511.  
  6512.                          void foo(int *a) {a++;}
  6513.            An explicit definition of a template class looks like this: 
  6514.  
  6515.                          class C<short> {
  6516.                            public: int moo();
  6517.                           }
  6518.  
  6519.  Instantiation 
  6520.            A defining template defines a whole family of classes or functions. 
  6521.            An instantiation of a template class or function is a a specific 
  6522.            class or function that is based on the template. 
  6523.  
  6524.  
  6525. ΓòÉΓòÉΓòÉ 11.2. How the Compiler Expands Templates ΓòÉΓòÉΓòÉ
  6526.  
  6527. You can choose from three alternatives for instantiating templates: 
  6528.  
  6529.    1. Including defining templates everywhere.  See Including Defining 
  6530.       Templates Everywhere for more details. 
  6531.  
  6532.    2. Using VisualAge C++'s automatic facility to ensure that there is a single 
  6533.       instantiation of the template.  See Structuring for Automatic 
  6534.       Instantiation for more details. 
  6535.  
  6536.    3. Manually structuring your code so that there is a single instantiation of 
  6537.       the template.  See Manually Structuring for Single Instantiation for more 
  6538.       details. 
  6539.  If you want to make the best choice amongst these alternatives, it is easiest 
  6540.  if you first understand how the compiler reacts when it encounters templates. 
  6541.  When you use templates in your program, the VisualAge C++ compiler 
  6542.  automatically instantiates each defining template that is: 
  6543.  
  6544.      Referenced in the source code 
  6545.      Visible to the compiler (included as the result of an #include statement) 
  6546.      Not explicitly defined by the programmer 
  6547.  If an application consists of several separate compilation units that are 
  6548.  compiled separately, it is possible that a given template is expanded in two 
  6549.  or more of the compilation units. For templates that define classes, inline 
  6550.  functions, or static nonmember functions, this is usually the desired 
  6551.  behaviour.  These templates normally need to be defined in each compilation 
  6552.  unit where they are used. 
  6553.  
  6554.  For other functions and for static data members, which have external linkage, 
  6555.  defining them in more than one compilation unit would normally cause an error 
  6556.  when the program is linked.  VisualAge C++ avoids this problem by giving 
  6557.  special treatment to template-generated versions of these objects.  At link 
  6558.  time, VisualAge C++ gathers all template-generated functions and static member 
  6559.  definitions, plus any explicit definitions, and resolves references to them in 
  6560.  the following manner: 
  6561.  
  6562.      If an explicit definition of the function or static member exists, it is 
  6563.       used for all references.  All template-generated definitions of that 
  6564.       function or static member are discarded. 
  6565.  
  6566.      If no explicit definition exists, one of the template-generated 
  6567.       definitions is used for all references.  Any other template-generated 
  6568.       definitions of that function or static member are discarded. 
  6569.  
  6570.  Note that you may have only one explicit definition of any external linkage 
  6571.  template instance. 
  6572.  
  6573.  
  6574. ΓòÉΓòÉΓòÉ 11.3. Example of Generating Template Function Definitions ΓòÉΓòÉΓòÉ
  6575.  
  6576. The class template Stack provides an example of template function generation. 
  6577. Stack implements a stack of items. The overloaded operators << and >> are used 
  6578. to push items on to the stack and pop items from the stack. Assume that the 
  6579. declaration of the Stack class template is contained in the file stack.h: 
  6580.  
  6581.  
  6582. Declaration of Stack in stack.h
  6583.  
  6584.       template <class Item, int size> class Stack {
  6585.         public:
  6586.             int operator << (Item item);  // push operator
  6587.             int operator >> (Item& item); // pop operator
  6588.             Stack() { top = 0; }          // constructor defined inline
  6589.          private:
  6590.             Item stack[size];             // stack of items
  6591.             int   top;                    // index to top of stack
  6592.       };
  6593.  
  6594. In the template, the constructor function is defined inline. Assume the other 
  6595. functions are defined using separate function templates in the file stack.c: 
  6596.  
  6597.  
  6598. Definition of operator functions in stack.c
  6599.  
  6600.      template <class Item, int size>
  6601.         int Stack<Item,size>::operator << (Item item) {
  6602.           if (top >= size) return 0;
  6603.            stack[top++] = item;
  6604.            return 1;
  6605.         }
  6606.      template <class Item, int size>
  6607.          int Stack<Item,size>::operator >> (Item& item)
  6608.         {
  6609.            if (top <= 0) return 0;
  6610.             item = stack[--top];
  6611.             return 1;
  6612.         }
  6613.  
  6614. In this example, the constructor has internal linkage because it is defined 
  6615. inline in the class template declaration. In each compilation unit that uses an 
  6616. instance of the Stack class, the compiler generates the constructor function 
  6617. body. Each unit uses its own copy of the constructor. 
  6618.  
  6619. In each compilation unit that includes the file stack.c, for any instance of 
  6620. the Stack class in that unit, the compiler generates definitions for the 
  6621. following functions (assuming there is no explicit definition) : 
  6622.  
  6623.    Stack<item,size>::operator<<(item)
  6624.    Stack<item,size>::operator>>(item&)
  6625.  
  6626. For example, given the following source file stack.cpp: 
  6627.  
  6628.    #include "stack.h"
  6629.    #include "stack.c"
  6630.  
  6631.    void Swap(int i&, Stack<int,20>& s)
  6632.    {
  6633.       int j;
  6634.       s >> j;
  6635.       s << i;
  6636.       i = j;
  6637.    }
  6638. the compiler generates the functions Stack<int,20>::operator<<(int) and 
  6639. Stack<int,20>::operator>>(int&) because both those functions are used in the 
  6640. program, their defining templates are visible, and no explicit definitions were 
  6641. seen. 
  6642.  
  6643.  
  6644. ΓòÉΓòÉΓòÉ 11.4. Including Defining Templates ΓòÉΓòÉΓòÉ
  6645.  
  6646. The following sections describe the three methods of including defining 
  6647. templates and how they would be applied to this example. The methods are: 
  6648.  
  6649.      including defining templates everywhere 
  6650.      structuring for automatic instantiation 
  6651.      manually stucturing for single instantiation 
  6652.  
  6653.  Automatic instantiation is the recommended method. 
  6654.  
  6655.  
  6656. ΓòÉΓòÉΓòÉ 11.4.1. Including Defining Templates Everywhere ΓòÉΓòÉΓòÉ
  6657.  
  6658. The simplest way to instantiate templates is to include the defining template 
  6659. in every compilation unit that uses the template. This alternative has the 
  6660. following disadvantages: 
  6661.  
  6662.      If you make even a trivial change to the implementation of a template, 
  6663.       you must recompile every compilation unit that uses it. 
  6664.      The compilation process is slower, and the resulting object files are 
  6665.       bigger because the templates are expanded in every compilation unit where 
  6666.       they are used.  Note, however, that the duplicated code for the templates 
  6667.       is eliminated during linking, so the executable files are not larger if 
  6668.       you choose to include defining templates everywhere. 
  6669.  
  6670.  For example, to use this method with the Stack template, include both stack.h 
  6671.  and stack.c in all compilation units that use an instance of the Stack class. 
  6672.  The compiler then generates definitions for each template function. Each 
  6673.  template function may be defined multiple times, increasing the size of the 
  6674.  object file. 
  6675.  
  6676.  
  6677. ΓòÉΓòÉΓòÉ 11.4.2. Structuring for Automatic Instantiation ΓòÉΓòÉΓòÉ
  6678.  
  6679. The recommended way to instantiate templates is to structure your program for 
  6680. their automatic instantiation. The advantages of this method are: 
  6681.  
  6682.      It is easy to do. 
  6683.      Unlike the method of including defining templates everywhere, you do not 
  6684.       get larger object files and slower compile times. 
  6685.      Unlike the method of including defining templates everywhere, you do not 
  6686.       have to recompile all of the compilation units that use a template if 
  6687.       that template implementation is changed. 
  6688.  
  6689.  The disadvantages of this method are: 
  6690.  
  6691.      It may not be practical in a team programming environment because the 
  6692.       compiler may update source files that are being modified at the same time 
  6693.       by somebody else. 
  6694.      The modifications that are made to source files may not be file system 
  6695.       independent.  For example, header files that are locally available may be 
  6696.       included rather than header files that are available on a network. 
  6697.      There are some situations where the compiler cannot determine exactly 
  6698.       which header files should be included. 
  6699.  
  6700.  To use this facility: 
  6701.  
  6702.    1. Declare your template functions in a header file using class or function 
  6703.       templates, but do not define them. Include the header file in your source 
  6704.       code. 
  6705.  
  6706.    2. For each header file, create a template-implementation file with the same 
  6707.       name as the header and the extension .c. Define the template functions in 
  6708.       this template-implementation file. 
  6709.  
  6710.  Note:  Use the same compiler options to link your object files that you use to 
  6711.         compile them.  For example, if you compile with the command: 
  6712.  
  6713.                    icc /C /Gm /Sa myfile.cpp
  6714.         link with the command: 
  6715.  
  6716.                    icc /Tdp /Gm /Sa myfile.obj
  6717.  
  6718.  This is especially important for options that control libraries, linkage, and 
  6719.  code compatibility. This does not apply to options that affect only the 
  6720.  creation of object code (for example, /C and /Fo). (Note that in the compile 
  6721.  step, the /Tdp was implicit because it is the default for files with the 
  6722.  extension .cpp.) 
  6723.  
  6724.  For each header file with template functions that need to be defined, the 
  6725.  compiler generates a template-include file. The template-include file 
  6726.  generates #include statements in that file for: 
  6727.  
  6728.      The header file with the template declaration 
  6729.  
  6730.      The corresponding template-implementation file 
  6731.  
  6732.      Any other header files that declare types used in template parameters. 
  6733.  
  6734.  Important  If you have other declarations that are used inside templates but 
  6735.             are not template parameters, you must place or #include them in 
  6736.             either the template-implementation file or one of the header files 
  6737.             that will be included as a result of the above three steps. Define 
  6738.             any classes that are used in template arguments and that are 
  6739.             required to generate the template function in the header file. If 
  6740.             the class definitions require other header files, include them with 
  6741.             the #include directive. The class definitions are then available in 
  6742.             the template-implementation file when the function definition is 
  6743.             compiled. Do not put the definitions of any classes used in 
  6744.             template arguments in your source code. 
  6745.  
  6746.                            foo.h
  6747.                              template<class T> void foo(T*);
  6748.  
  6749.                            hoo.h
  6750.                              void hoo(A*);
  6751.  
  6752.                            foo.c
  6753.                              template<class T> void foo(T* t)
  6754.                                 {t -> goo(); hoo(t);}
  6755.  
  6756.                            other.h
  6757.                              class A {public: void goo() {} };
  6758.  
  6759.                            main.cpp
  6760.                              #include "foo.h"
  6761.                              #include "other.h"
  6762.                              #include "hoo.h"
  6763.                              int main() { A a;  foo(&a); }
  6764.  
  6765.  This requires the expansion of the foo(T*) template with "class A" as the 
  6766.  template type parameter. The compiler will create a template-include file 
  6767.  TEMPINC\foo.cpp. The file contents (simplified below) would be: 
  6768.  
  6769.     #include "foo.h"         //the template declaration header
  6770.     #include "other.h"       //file defining template type parameter
  6771.     #include "foo.c"         //corresponding template implementation
  6772.     void foo(A*);            //triggers template instantiation
  6773.  This won't compile properly because the header "hoo.h" didn't satisfy the 
  6774.  conditions for inclusion but the header is required to compile the body of 
  6775.  foo(A*).  One solution is to move the declaration of hoo(A*) into the 
  6776.  "other.h" header. 
  6777.  
  6778.  The function definitions in your template-implementation file can be explicit 
  6779.  definitions, template definitions, or both. Any explicit definitions are used 
  6780.  instead of the definitions generated by the template. 
  6781.  
  6782.  Before it invokes the linker, the compiler compiles the template-include files 
  6783.  and generates the necessary template function definitions. Only one definition 
  6784.  is generated for each template function. 
  6785.  
  6786.  By default, the compiler stores the template-include files in the TEMPINC 
  6787.  subdirectory under the current directory. The compiler creates the TEMPINC 
  6788.  directory if it does not already exist. To redirect the template-include files 
  6789.  to another directory, use the /Ftdir compiler option, where dir is the 
  6790.  directory to contain the template-include files. You can specify a 
  6791.  fully-qualified path name or a path name relative to the current directory. 
  6792.  
  6793.  If you specify a different directory for your template-include files, make 
  6794.  sure that you specify it consistently for all compilations of your program, 
  6795.  including the link step. 
  6796.  
  6797.  Note:  After the compiler creates a template-include file, it may add 
  6798.         information to the file as each compilation unit is compiled. However, 
  6799.         the compiler never removes information from the file. If you remove 
  6800.         function instantiations or reorganize your program so that the 
  6801.         template-include files become obsolete, you may want to delete one or 
  6802.         more of these files and recompile your program. In addition, if error 
  6803.         messages are generated for a file in the TEMPINC directory, you must 
  6804.         either correct the errors manually or delete the file and recompile. To 
  6805.         regenerate all of the template-include files, delete the TEMPINC 
  6806.         directory, the .OBJ files, and recompile your program. 
  6807.  
  6808.  If you do not delete the .OBJ files, typical MAKEFILE rules will prevent the 
  6809.  OBJs from being recompiled, and therefore the template-include files will not 
  6810.  be updated with all the lines needed for all the compilation units used in the 
  6811.  program.  The end result would be that the link would fail. 
  6812.  
  6813.  
  6814. ΓòÉΓòÉΓòÉ 11.4.2.1. Example of a Template-Implementation File ΓòÉΓòÉΓòÉ
  6815.  
  6816. In the Stack example, the file stack.c is a template-implementation file. To 
  6817. create a program using the Stack class template, stack.h and stack.c must 
  6818. reside in the same directory. You would include stack.h in any source files 
  6819. that use an instance of the class. The stack.c file does not need to be 
  6820. included in any source files. Then, given the source file: 
  6821.  
  6822.    #include "stack.h"
  6823.  
  6824.    void Swap(int i&, Stack<int,20>& s)
  6825.    {
  6826.       int j;
  6827.       s >> j;
  6828.       s << i;
  6829.       i = j;
  6830.    }
  6831. the compiler automatically generates the functions 
  6832. Stack<int,20>::operator<<(int) and Stack<int,20>::operator>>(int&). 
  6833.  
  6834. You can change the name of the template-implementation file or place it in a 
  6835. different directory using the #pragma implementation directive. This #pragma 
  6836. directive has the format: 
  6837.  
  6838.    #pragma implementation(path)
  6839. where path is the path name for the template-implementation file. If it is only 
  6840. a partial path name, it must be relative to the directory containing the header 
  6841. file. 
  6842.  
  6843. Note:  This path is a quoted string following the normal conventions for 
  6844.        writing string literals.  In particular, backslashes must be doubled. 
  6845.  
  6846.  For example, in the Stack class, to use the file stack.def as the 
  6847.  template-implementation file instead of stack.c, add the line: 
  6848.  
  6849.       #pragma implementation("stack.def")
  6850.  anywhere in the stack.h file. The compiler then looks for the 
  6851.  template-implementation file stack.def in the same directory as stack.h. 
  6852.  
  6853.  
  6854. ΓòÉΓòÉΓòÉ 11.4.2.2. Example of a Template-Include File ΓòÉΓòÉΓòÉ
  6855.  
  6856. The following example shows the information you would find in a typical 
  6857. template-include file generated by the compiler: 
  6858.  
  6859.    /*0000000000*/ #pragma sourcedir("c:\swearsee\src")   0
  6860.    /*0698421265*/ #include "c:\swearsee\src\list.h"       1
  6861.    /*0000000000*/ #include "c:\swearsee\src\list.c"       2
  6862.    /*0698414046*/ #include "c:\swearsee\src\mytype.h"     3
  6863.    /*0698414046*/ #include "c:\IBMCPP\INCLUDE\iostream.h" 4
  6864.    #pragma define(List<MyType>)                         5
  6865.    ostream& operator<<(ostream&,List<MyType>);          6
  6866.    #pragma undeclared                                   7
  6867.    int count(List<MyType>);                             8
  6868.  
  6869.  0    This pragma ensures that the compiler will look for nested include files 
  6870.       in the directory containing the original source file, as required by the 
  6871.       VisualAge C++ file inclusion rules. 
  6872.  
  6873.  1    The header file that corresponds to the template-include file. The number 
  6874.       in comments at the start of each #include line (for this line 
  6875.       /*0698421265*/) is a time stamp for the included file. The compiler uses 
  6876.       this number to determine if the template-include file is current or 
  6877.       should be recompiled. A time stamp containing only zeroes (0) as in line 
  6878.       2 means the compiler is to ignore the time stamp. 
  6879.  
  6880.  2    The template-implementation file that corresponds to the header file in 
  6881.       line 1 
  6882.  
  6883.  3    Another header file that the compiler requires to compile the 
  6884.       template-include file. All other header files that the compiler needs to 
  6885.       compile the template-include file are inserted at this point. 
  6886.  
  6887.  4    Another header file required by the compiler. It is referenced in the 
  6888.       function declaration in line 6. 
  6889.  
  6890.  5    The compiler inserts #pragma define directives to force the definition of 
  6891.       template classes. In this case, the class List<MyType> is to be defined 
  6892.       and its member functions are to be generated. 
  6893.  
  6894.  6    The operator<< function is a nonmember function that matched a template 
  6895.       declaration in the list.h file. The compiler inserts this declaration to 
  6896.       force the generation of the function definition. 
  6897.  
  6898.  7    The #pragma undeclared directive is used only by the compiler and only in 
  6899.       template-include files. All template functions that were explicitly 
  6900.       declared in at least one compilation unit appear before this line. All 
  6901.       template functions that were called, but never declared, appear after 
  6902.       this line. This division is necessary because the C++ rules for function 
  6903.       overload resolution treat declared and undeclared template functions 
  6904.       differently. 
  6905.  
  6906.  8    count is an example of a template function that was called but not 
  6907.       declared. The template declaration of the function must have been 
  6908.       contained in list.h, but the instance count(List<MyType>) was never 
  6909.       declared. 
  6910.  
  6911.  Note:  Although you can edit the template-include files, it is not normally 
  6912.  necessary or advisable to do so. 
  6913.  
  6914.  
  6915. ΓòÉΓòÉΓòÉ 11.4.3. Manually Structuring for Single Instantiation ΓòÉΓòÉΓòÉ
  6916.  
  6917. If you do not want to use the automatic instantiation method of generating 
  6918. template function definitions, you can structure your program in such a way 
  6919. that you define template functions directly in your compilation units. The 
  6920. advantages of this approach are: 
  6921.  
  6922.      Object files are smaller and compile times are shorter than they are when 
  6923.       you include defining templates everywhere. When you structure your code 
  6924.       manually for template instantiation, you avoid the potential problems 
  6925.       that automatic instantiation can cause, such as dependency on a 
  6926.       particular file system or file sharing problems. 
  6927.  
  6928.  There are also disadvantages to structuring your code manually for template 
  6929.  instantiation: 
  6930.  
  6931.      You have to do more work than for the other two methods.  You may have to 
  6932.       reorganize source files and create new compilation units. 
  6933.      You have to be aware of all of the instantiations of templates that are 
  6934.       required by the entire program. 
  6935.  
  6936.  Note:  It is recommended that you use the compiler's automatic instantiation 
  6937.  facility.  The manual structuring method described here is useful if you find 
  6938.  you cannot work around the limitations of the automatic instantiation method. 
  6939.  
  6940.  Use #pragma define directives to force the compiler to generate the necessary 
  6941.  definitions for all template classes used in other compilation units.  Use 
  6942.  explicit declarations of non-member template functions to force the compiler 
  6943.  to generate them. 
  6944.  
  6945.  To use the second method, include stack.h in all compilation units that use an 
  6946.  instance of the Stack class, but include stack.c in only one of the files. 
  6947.  Alternatively, if you know what instances of the Stack class are being used in 
  6948.  your program, you can define all of the instances in a single compilation 
  6949.  unit. For example: 
  6950.  
  6951.        #include "stack.h"
  6952.        #include "stack.c"
  6953.        #include "myclass.h"  // Definition of "myClass" class
  6954.        #pragma define(Stack<int,20>)
  6955.        #pragma define(Stack<myClass,100>)
  6956.  
  6957.  The #pragma define directive forces the definition of two instances of the 
  6958.  Stack class without creating any object of the class.  Because these instances 
  6959.  reference the member functions of that class, template function definitions 
  6960.  are generated for those functions. See the online Language Reference for more 
  6961.  information about the #pragma directive. 
  6962.  
  6963.  You can compile and link in one step or two, but you must use icc to invoke 
  6964.  the linker.  For example, to compile and link stack.cpp, you could use the 
  6965.  command: 
  6966.  
  6967.      icc stack.cpp
  6968.  or the commands: 
  6969.  
  6970.      icc /C stack.cpp
  6971.      icc /Tdp stack.obj
  6972.  (Note that in the first example, you need not specify the /Tdp option because 
  6973.  it is the default for files with the extension .cpp.) 
  6974.  
  6975.  When you use these methods, you may also need to specify the /Ft- option to 
  6976.  ensure that the compiler does not also automatically create the TEMPINC files 
  6977.  according to the automatic generation facility. 
  6978.  
  6979.  
  6980. ΓòÉΓòÉΓòÉ 11.5. Mixing Old and New Templates ΓòÉΓòÉΓòÉ
  6981.  
  6982. The way that VisualAge C++ resolves template functions and data is new for this 
  6983. release of VisualAge C++. Previous releases used a different method (called the 
  6984. old method in this section). The current method is an improvement because it 
  6985. gives faster link times and reduces the size of the executable or DLL that is 
  6986. output. 
  6987.  
  6988. In previous releases of VisualAge C++, when multiple template functions were 
  6989. resolved to a single definition, the unused template generated functions were 
  6990. not removed and became "dead code" in the linker output.  The current release 
  6991. of VisualAge C++ does not do this. Because of this, the option of including 
  6992. defining templates everywhere (see Including Defining Templates Everywhere for 
  6993. details) no longer results in larger executables. 
  6994.  
  6995. If you want to link together objects containing template functions generated by 
  6996. the current release of VisualAge C++ and objects containing template functions 
  6997. generated by previous releases, you must link with ICC using the /Gk+ option. 
  6998.  
  6999. When you specify this option, ICC uses the template resolution method from 
  7000. previous releases of VisualAge C++. (In addition, this option causes ICC to 
  7001. supply the /OLDCPP option to the linker.) When you link objects containing 
  7002. template functions using ICC with the /Gk+ option: 
  7003.  
  7004.      If a user-supplied template function exists, it will be selected. If a 
  7005.       template-generated function body was created by the old method, it will 
  7006.       not be removed from the executable, but if it was created by the current 
  7007.       method it will be removed. 
  7008.  
  7009.      If no user-supplied function exists, but one or more template-generated 
  7010.       functions created by the old method does exist, then one of these 
  7011.       template-generated functions will be selected. The other 
  7012.       template-generated functions created by the old method will not be 
  7013.       removed, but those created by the current method will be removed. 
  7014.  
  7015.      If no user-supplied function and no template-generated functions created 
  7016.       by the old method exist, one new template-generated function will be 
  7017.       selected.  Other template-generated functions created by the current 
  7018.       method will be removed. 
  7019.  
  7020.  Note:  If you do not specify the /Gk+ option, the linker produces an error 
  7021.  message asking you to link using /OLDCPP.  If you get this error message, you 
  7022.  should relink using ICC with the /Gk+ option. 
  7023.  
  7024.  The current method of resolving template static data members is also better 
  7025.  than the method used in previous releases of VisualAge C++. The old method had 
  7026.  the following limitations: 
  7027.  
  7028.      You could not combine template definitions of static data members with 
  7029.       explicit definitions. If you tried to use a static member template in one 
  7030.       compilation unit and an explicit definition in another, the linker 
  7031.       generated an error about multiple definitions. 
  7032.  
  7033.      Static data members defined by templates were not visible as dictionary 
  7034.       entries in libraries.  If your program referenced a static member defined 
  7035.       in a library object, but did not reference any other external symbols in 
  7036.       that object, the linker would not extract the object from the library. 
  7037.  
  7038.  When you use the current release of VisualAge C++ to create the objects that 
  7039.  are linked together, these restrictions no longer apply.  If you mix object 
  7040.  files that were created using a previous release with object files created 
  7041.  using the current release, these limitations still apply to static members for 
  7042.  which one or more old template-generated instances exists in the old objects. 
  7043.  
  7044.  
  7045. ΓòÉΓòÉΓòÉ 12. Calling Conventions ΓòÉΓòÉΓòÉ
  7046.  
  7047. This chapter describes the calling conventions used by the VisualAge C++ 
  7048. compiler for both C and C++: 
  7049.  
  7050.      _Optlink 
  7051.      _System 
  7052.      _Pascal and _Far32 _Pascal 
  7053.      __stdcall 
  7054.      __cdecl 
  7055.      32/16-bit conventions: 
  7056.            _Far16_Cdecl 
  7057.            _Far16 _Pascal 
  7058.            _Far16 _Fastcall 
  7059.  
  7060.  The _Optlink convention is specific to VisualAge C++ compiler and is the 
  7061.  fastest method of calling C or C++ functions or assembler routines, but it is 
  7062.  not standard for all OS/2 applications. The _Optlink calling convention is 
  7063.  described in more detail in _Optlink Calling Convention. 
  7064.  
  7065.  The _System calling convention, while slower, is standard for all OS/2 
  7066.  applications and is used for calling OS/2 APIs. For a description of the 
  7067.  _System calling convention, see _System Calling Convention. 
  7068.  
  7069.  The _Pascal and _Far32 _Pascal conventions are used to develop virtual device 
  7070.  drivers.  The _Far32 _Pascal convention can only be used for applications 
  7071.  written in C that run at ring zero (compiled with the /Gr+ option). More 
  7072.  information about the _Pascal and _Far32 _Pascal conventions can be found in 
  7073.  _Pascal and _Far32_Pascal Calling Conventions. 
  7074.  
  7075.  Note: 
  7076.  
  7077.    1. You cannot call a function using a different calling convention than the 
  7078.       one with which it is compiled. For example, if a function is compiled 
  7079.       with _System linkage, you cannot later call it specifying _Optlink 
  7080.       linkage. 
  7081.  
  7082.    2. VisualAge C++ does not allow functions that use the __stdcall calling 
  7083.       convention to have both the following characteristics: 
  7084.  
  7085.           No prototype 
  7086.           A variable number of arguments. 
  7087.  
  7088.       In particular, an unprototyped function that accepts a variable number of 
  7089.       arguments and uses the __stdcall calling convention will not link. This 
  7090.       is because __stdcall functions are referenced in .OBJ files using a name 
  7091.       that is a combination of the function name and the number of parameters 
  7092.       that the function takes.  Therefore, if one compilation has defined it 
  7093.       with a different number of parameters than another compilation unit, the 
  7094.       two references to the function will have different external function 
  7095.       names.  The linker will not be able to resolve them. 
  7096.  
  7097.       With prototyping, the compiler encodes the name in such a way that the 
  7098.       number of parameters becomes extraneous (irrelevant) information and so 
  7099.       the two references end up with the same external function name. 
  7100.  
  7101.  The different methods of calling 16-bit code from the VisualAge C++ compiler 
  7102.  and the 16-bit calling conventions are discussed in Calling between 32-Bit and 
  7103.  16-Bit Code. 
  7104.  
  7105.  You can specify any of the calling conventions for all functions within a 
  7106.  program using the /Mp (for _Optlink) or /Ms (for _System) compiler option. You 
  7107.  can also use the /Mt option to specify __stdcall and the /Mc option to specify 
  7108.  __cdecl. 
  7109.  
  7110.  
  7111. ΓòÉΓòÉΓòÉ 12.1. Using Linkage Keywords to Specify the Calling Convention ΓòÉΓòÉΓòÉ
  7112.  
  7113. In addition to using options to specify the calling convention for all of the 
  7114. functions in a program, you can also use linkage keywords to specify the 
  7115. calling convention for individual functions. The linkage keywords and their 
  7116. equivalent calling convention suboptions of /Mp and /Ms are listed in the 
  7117. following table. Linkage keywords take precedence over the compiler option, if 
  7118. both are specified. 
  7119.  
  7120. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  7121. Γöé Table 4. Equivalent Linkage Keywords and Compiler Suboptions         Γöé
  7122. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7123. Γöé LINKAGE KEYWORD            Γöé EQUIVALENT COMPILER SUBOPTION     Γöé
  7124. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7125. Γöé extern "SYSTEM"            Γöé _System                Γöé
  7126. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7127. Γöé extern "OPTLINK"            Γöé _Optlink               Γöé
  7128. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7129. Γöé extern "FAR16 CDECL"          Γöé _Far16_Cdecl             Γöé
  7130. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7131. Γöé extern "FAR16 PASCAL"         Γöé _Far16 _Pascal            Γöé
  7132. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7133. Γöé extern "FAR16 FASTCALL"        Γöé _Far16 _Fastcall           Γöé
  7134. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7135. Γöé extern "C"               Γöé _Optlink suboption for /Mp, system  Γöé
  7136. Γöé                    Γöé suboption for /Ms           Γöé
  7137. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7138. Γöé extern "C++"              Γöé _Optlink with mangling, overloading, Γöé
  7139. Γöé                    Γöé etc.                 Γöé
  7140. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7141. Γöé extern "BUILTIN"            Γöé _BUILTIN               Γöé
  7142. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7143. Γöé extern "PASCAL"            Γöé _Pascal                Γöé
  7144. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7145. Γöé extern "__stdcall"           Γöé __stdcall               Γöé
  7146. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  7147. Γöé extern "__cdecl"            Γöé __cdecl                Γöé
  7148. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  7149.  
  7150. Note:  C++ member functions always use the _Optlink calling convention, but 
  7151. they also have long internal names (called mangled names) that encode their 
  7152. containing class name and parameter types.  Nonstatic member functions also 
  7153. have an implicit this parameter that refers to the object on which they are 
  7154. invoked.  This combination of _Optlink rules, name mangling, and the this 
  7155. parameter is called C++ linkage, and it is considered distinct from _Optlink 
  7156. alone. 
  7157.  
  7158. In C programs, you can also use #pragma linkage for all but __stdcall and 
  7159. __cdecl. However, you should using the pragma and use the linkage keywords 
  7160. discussed above instead.  Problems encountered when using #pragma linkage 
  7161. include: 
  7162.  
  7163.      it does not exist in C++, so it can't be used in any headers that will be 
  7164.       used in C and C++. 
  7165.      it is difficult to mark function pointers with #pragma linkage, 
  7166.       especially if they are in structures or hidden behind arrays. 
  7167.      code which uses #pragma linkage tends to be less clear than code using 
  7168.       the other methods described earlier. 
  7169.  The following examples illustrate the drawbacks. 
  7170.  
  7171.   /* Defining a callback function using #pragma linkage */
  7172.   typedef int foo(void);
  7173.   #pragma linkage(foo, system)
  7174.   struct ss {
  7175.     int x:
  7176.     foo callback;
  7177.   };
  7178.  Observe the improved clarity when the same code is written using keywords: 
  7179.  
  7180.   /* Defining a callback function using keywords */
  7181.   struct ss {
  7182.     int x;
  7183.     int (* _System callback)(void);
  7184.   };
  7185.  
  7186.  Furthermore, there are cases where necessary conversions don't happen when 
  7187.  #pragma linkage is used.  Consider the following: 
  7188.  
  7189.   void func16(char *);           /*Parameter needs to be converted */
  7190.   func() {
  7191.     func16(pointer_variable);      /* Conversion doesn't happen... */
  7192.   }
  7193.   #pragma linkage (func16, far16 pascal) /* ... because pragma linkage
  7194.                                              occurs after the call */
  7195.  
  7196.  Here's the equivalent code using keywords: 
  7197.  
  7198.   void _Far16 _pascal func16(char *);
  7199.   func() {
  7200.     func16(pointer_variable):     /* Conversion does happen properly */
  7201.   }
  7202.  
  7203.  See the User's Guide for more details on setting the calling convention and on 
  7204.  compiler options. For information about linkage keywords and #pragma linkage, 
  7205.  see the online Language Reference. 
  7206.  
  7207.  
  7208. ΓòÉΓòÉΓòÉ 12.2. _Optlink Calling Convention ΓòÉΓòÉΓòÉ
  7209.  
  7210. This is the default calling convention. It is an alternative to the _System 
  7211. convention that is normally used for calls to the operating system. It provides 
  7212. a faster call than the _System convention, while ensuring conformance to the 
  7213. ANSI and SAA language standards. 
  7214.  
  7215. You can explicitly give a function the _Optlink convention with the _Optlink 
  7216. keyword. 
  7217.  
  7218.      Features of _Optlink 
  7219.      Tips for Using _Optlink 
  7220.      General-Purpose Register Implications 
  7221.      Examples of Passing Parameters 
  7222.  
  7223.  
  7224. ΓòÉΓòÉΓòÉ 12.2.1. Features of _Optlink ΓòÉΓòÉΓòÉ
  7225.  
  7226.      Parameters are pushed from right to left onto the stack to allow for 
  7227.       varying length parameter lists without having to use hidden parameters. 
  7228.  
  7229.      The caller cleans up the parameters. 
  7230.  
  7231.      The general-purpose registers EBP, EBX, EDI, and ESI are preserved across 
  7232.       the call. 
  7233.  
  7234.      The general-purpose registers EAX, EDX, and ECX are not preserved across 
  7235.       the call. 
  7236.  
  7237.      Floating-point registers are not preserved across the call. 
  7238.  
  7239.      The three conforming parameters that are lexically leftmost (conforming 
  7240.       parameters are 1, 2, and 4-byte signed and unsigned integers, 
  7241.       enumerations, and all pointer types) are passed in EAX, EDX, and ECX, 
  7242.       respectively. 
  7243.  
  7244.      Up to four floating-point parameters (the lexically first four) are 
  7245.       passed in extended-precision format (80-bit) in the floating-point 
  7246.       register stack. 
  7247.  
  7248.      All other parameters are passed on the 80386 stack. 
  7249.  
  7250.      Space for the parameters in registers is allocated on the stack, but the 
  7251.       parameters are not copied into that space. 
  7252.  
  7253.      Conforming return values are returned in EAX. 
  7254.  
  7255.      Floating-point return values are returned in extended-precision format in 
  7256.       the topmost register of the floating-point stack. 
  7257.  
  7258.      When you call external functions, the floating-point register stack 
  7259.       contains only valid parameter registers on entry and valid return values 
  7260.       on exit.  (When you call functions in the current compilation unit that 
  7261.       do not call any other functions, this state may not be true.) 
  7262.  
  7263.      Under some circumstances, the compiler will not use EBP to access 
  7264.       automatic and parameter values, thus increasing the efficiency of the 
  7265.       application. Whether it is used or not, EBP will not change across the 
  7266.       call. 
  7267.  
  7268.      Calls with aggregates returned by value pass a hidden first parameter 
  7269.       that is the address of a storage area determined by the caller. This area 
  7270.       becomes the returned aggregate.  The hidden pointer parameter is always 
  7271.       considered "nonconforming", and is not passed in a register.  The called 
  7272.       function must load it into EAX before returning. 
  7273.  
  7274.      The direction flag must be clear upon entry to functions and clear on 
  7275.       exit from functions.  The state of the other flags is ignored on entry to 
  7276.       a function and undefined on exit. 
  7277.  
  7278.      The compiler will not change the contents of the floating-point control 
  7279.       register.  If you want to change the control register contents for a 
  7280.       particular operation, save the contents before making the changes and 
  7281.       restore them after the operation. 
  7282.  
  7283.      In a prototyped function taking a variable number of parameters (that is, 
  7284.       one whose parameter list ends in an elipsis), only the parameters 
  7285.       preceding the elipsis are eligible to be passed in registers. 
  7286.  
  7287.  
  7288. ΓòÉΓòÉΓòÉ 12.2.2. Tips for Using _Optlink ΓòÉΓòÉΓòÉ
  7289.  
  7290. To obtain the best performance when using the _Optlink convention, follow these 
  7291. tips: 
  7292.  
  7293.      Prototype all function declarations for better performance. The C++ 
  7294.       language requires all functions to have prototypes. 
  7295.  
  7296.       Note:  All calls and functions must be prototyped consistently; that is, 
  7297.              functions declared more than once must have identical prototypes. 
  7298.              If prototyping is not consistent, the results will be undefined. 
  7299.  
  7300.      Place the conforming and floating-point parameters that are most heavily 
  7301.       used lexically leftmost in the parameter list so they will be considered 
  7302.       for registers first. If they are adjacent to each other, the preparation 
  7303.       of the parameter list will be faster. 
  7304.  
  7305.      If you have a parameter that is only used near the end of a function, put 
  7306.       it at or near the end of the parameter list. If all of your parameters 
  7307.       are only used near the end of functions, consider using _System linkage. 
  7308.  
  7309.      If you are passing structures by value, put them at the end of the 
  7310.       parameter list. 
  7311.  
  7312.      Avoid using variable arguments in nonprototype functions. This practice 
  7313.       results in undefined behavior under the ANSI C standard. 
  7314.  
  7315.      If you have a variable-length argument list, consider using _System 
  7316.       linkage. It is faster in this situation. 
  7317.  
  7318.      Compile with optimization on by specifying /O+. 
  7319.  
  7320.  For additional tips on how to improve the performance of your program, see 
  7321.  Optimizing Your Program. 
  7322.  
  7323.  
  7324. ΓòÉΓòÉΓòÉ 12.2.3. General-Purpose Register Implications ΓòÉΓòÉΓòÉ
  7325.  
  7326. EAX, EDX, and ECX are used for the lexically first three conforming parameters 
  7327. with EAX containing the first parameter, EDX the second, and ECX the third. 
  7328. Four bytes of stack storage are allocated for each register parameter that is 
  7329. present, but the parameters exist only in the registers at the time of the 
  7330. call. 
  7331.  
  7332. If there is no prototype or an incomplete prototype for the function called, an 
  7333. eyecatcher is placed after the call instruction to tell the callee how the 
  7334. register parameters correspond to the stack storage mapped for them. Fully 
  7335. prototyped code never needs eyecatchers. 
  7336.  
  7337.  
  7338. ΓòÉΓòÉΓòÉ 12.2.3.1. Eyecatchers ΓòÉΓòÉΓòÉ
  7339.  
  7340. An eyecatcher is a recognizable sequence of bytes that tells unprototyped code 
  7341. which parameters are passed in which registers. Eyecatchers apply only to code 
  7342. without prototype statements. 
  7343.  
  7344. The eyecatcher instruction is placed after the call instruction for a 
  7345. nonprototype function. The choice of instruction for the eyecatcher relies on 
  7346. the fact that the TEST instruction does not modify the referenced register, 
  7347. meaning that the return register of the call instruction is not modified by the 
  7348. eyecatcher instruction. The absence of an eyecatcher in unprototyped code 
  7349. implies that there are no parameters in registers. (Note that this eyecatcher 
  7350. scheme does not allow the use of execute-only code segments.) 
  7351.  
  7352. The eyecatcher has the format: 
  7353.  
  7354.    TEST EAX, immed32
  7355. Note that the short-form binary encoding (A9) of TEST EAX must be used for the 
  7356. eyecatcher instruction. 
  7357.  
  7358. The 32-bit immediate operand is interpreted as a succession of 2-bit fields, 
  7359. each of which describes a register parameter or a 4-byte slot of stack memory. 
  7360. Because only one 32-bit read of the eyecatcher is made, only 24 bits of the 
  7361. immediate operand are loaded. The actual number of parameters that can be 
  7362. considered for registers is restricted to 12. 
  7363.  
  7364. Because of byte reversal, the bits that are loaded are the low-order 24 bits of 
  7365. the 32-bit immediate operand. The highest-order 2-bit field of the 24 bits 
  7366. analyzed corresponds to the lexically first parameter, while subsequent 
  7367. parameters correspond to the subsequent lower-order 2-bit fields. The meaning 
  7368. of the values of the fields is as follows: 
  7369.  
  7370.  Value     Meaning 
  7371.  
  7372.  00        This value indicates that there are no parameters remaining to be 
  7373.            put into registers, or that there are parameters that could be put 
  7374.            into registers but there are no registers remaining. It also 
  7375.            indicates the end of the eyecatcher. 
  7376.  
  7377.  01        The corresponding parameter is in a general-purpose register. The 
  7378.            leftmost field of this value has its parameter in EAX, the second 
  7379.            leftmost (if it exists) in EDX, and the third (if it exists) in ECX. 
  7380.  
  7381.  10        The corresponding parameter is in a floating-point register and has 
  7382.            8 bytes of stack reserved for it (that is, it is a double). ST(0), 
  7383.            ST(1), ST(2), and ST(3) contain the lexically-first four 
  7384.            floating-point parameters (fewer registers are used if there are 
  7385.            fewer floating-point parameters). ST(0) contains the lexically first 
  7386.            (leftmost 2-bit field of type 10 or 11) parameter, ST(1) the 
  7387.            lexically second parameter, and so on. 
  7388.  
  7389.  11        The corresponding parameter is in a floating-point register and has 
  7390.            16 bytes of stack reserved for it (that is, it is a long double). 
  7391.  
  7392.  
  7393. ΓòÉΓòÉΓòÉ 12.2.4. Examples of Passing Parameters ΓòÉΓòÉΓòÉ
  7394.  
  7395. The following examples have been provided for the purposes of illustration and 
  7396. clarity only.  They have not been optimized. These examples assume that you are 
  7397. familiar with programming in assembler. Note that, in each example, the stack 
  7398. grows toward the bottom of the page, and ESP always points to the top of the 
  7399. stack. 
  7400.  
  7401.      seth4=no. 
  7402.      Passing Conforming Parameters to an Unprototyped Routine 
  7403.      Passing Floating-Point Parameters to a Prototyped Routine 
  7404.      Passing Floating-Point Parameters to an Unprototyped Routine 
  7405.      Passing and Returning Aggregates by Value to a Prototyped Routine 
  7406.      Passing and Returning Aggregates by Value to an Unprototyped Routine 
  7407.  
  7408.  
  7409. ΓòÉΓòÉΓòÉ 12.2.4.1. seth4=no. ΓòÉΓòÉΓòÉ
  7410.  
  7411. Passing Conforming Parameters to a Prototyped Routine 
  7412.  
  7413. The following example shows the code sequences and a picture of the stack for a 
  7414. call to the function foo: 
  7415.  
  7416.  
  7417.    long foo(char p1, short p2, long p3, long p4);
  7418.  
  7419.    short x;
  7420.    long y;
  7421.  
  7422.    y = foo('A', x, y+x, y);
  7423.  
  7424. Caller's code surrounding call: 
  7425.  
  7426.  
  7427.    PUSH     y           ; Push p4 onto the 80386 stack
  7428.    SUB      ESP, 12     ; Allocate stack space for
  7429.                         ;  register parameters
  7430.    MOV      AL, 'A'     ; Put p1 into AL
  7431.    MOV      DX,  x      ; Put p2 into DX
  7432.    MOVSX    ECX, DX     ; Sign-extend x to long
  7433.    ADD      ECX, y      ; Calculate p3 and put it into ECX
  7434.    CALL     FOO         ; Make call
  7435.  
  7436.  
  7437.              Stack  Just  After  Call       Register  Set  Just  After  Call
  7438.  
  7439.             Γöé                     Γöé            Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7440.             Γöé   caller ' s  Local     Γöé       EAX   Γöé    undefined   Γöé  p1  Γöé
  7441.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7442.             Γöé         p4           Γöé       EBX   Γöé    caller ' s  EBX     Γöé
  7443.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7444.             Γöé   Blank  Slot  For  p3  Γöé       ECX   Γöé         p3     Γöé     Γöé
  7445.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7446.             Γöé   Blank  Slot  For  p2  Γöé       EDX   Γöé undefined Γöé     p2    Γöé
  7447.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7448.             Γöé   Blank  Slot  For  p1  Γöé       EDI   Γöé    caller ' s  EDI     Γöé
  7449.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7450.             Γöé   caller ' s  EIP       Γöé       ESI   Γöé    caller ' s  ESI     Γöé
  7451.  ESP ΓöÇΓöÇΓöÇΓöÇ     Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ            Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7452.  
  7453. Callee's prolog code: 
  7454.  
  7455.  
  7456.    PUSH     EBP                      ; Save caller's EBP
  7457.    MOV      EBP, ESP                 ; Set up callee's EBP
  7458.    SUB      ESP, callee's local size ; Allocate callee's Local
  7459.    PUSH     EBX                      ; Save preserved registers -
  7460.    PUSH     EDI                      ;  will optimize to save
  7461.    PUSH     ESI                      ;  only registers callee uses
  7462.  
  7463.              Stack  After  Prolog         Register  Set  After  Prolog
  7464.  
  7465.              Γöé                    Γöé            Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7466.              Γöé   caller ' s  Local    Γöé        EAX  Γöé      undefined  Γöé  p1  Γöé
  7467.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7468.              Γöé         p4          Γöé        EBX  Γöé       undefined      Γöé
  7469.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7470.              Γöé  Blank  Slot  For  p3  Γöé        ECX  Γöé           p3         Γöé
  7471.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7472.              Γöé  Blank  Slot  For  p2  Γöé        EDX  Γöé undefined  Γöé    p2     Γöé
  7473.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7474.              Γöé  Blank  Slot  For  p1  Γöé        EDI  Γöé       undefined      Γöé
  7475.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7476.              Γöé    caller ' s  EIP     Γöé        ESI  Γöé       undefined      Γöé
  7477.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ            Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7478.              Γöé    caller ' s  EBP     Γöé
  7479.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7480.              Γöé                    Γöé
  7481.              .                    .
  7482.              .   callee ' s  Local    .
  7483.              .                    .
  7484.              Γöé                    Γöé
  7485.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7486.              Γöé      Saved  EBX      Γöé
  7487.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7488.              Γöé      Saved  EDI      Γöé
  7489.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7490.              Γöé      Saved  ESI      Γöé
  7491.   ESP ΓöÇΓöÇΓöÇ      Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7492.  
  7493. Note:  The term undefined in registers EBX, EDI, and ESI refers to the fact 
  7494. that they can be safely overwritten by the code in foo. 
  7495.  
  7496. Callee's epilog code: 
  7497.  
  7498.  
  7499.    MOV       EAX, RetVal ; Put return value in EAX
  7500.    POP       ESI         ; Restore preserved registers
  7501.    POP       EDI
  7502.    POP       EBX
  7503.    MOV       ESP, EBP    ; Deallocate callee's local
  7504.    POP       EBP         ; Restore caller's EBP
  7505.    RET                   ; Return to caller
  7506.  
  7507.  
  7508.              Stack  After  Epilog         Register  Set  After  Epilog
  7509.  
  7510.              Γöé                    Γöé             Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇ ΓöÉ
  7511.              Γöé   caller ' s  Local    Γöé        EAX   Γöé    Return Γöé Value    Γöé
  7512.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7513.              Γöé         p4          Γöé        EBX   Γöé    caller ' s  EBX    Γöé
  7514.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7515.              Γöé  Blank  Slot  For  p3  Γöé        ECX   Γöé      undefined     Γöé
  7516.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7517.              Γöé  Blank  Slot  For  p2  Γöé        EDX   Γöé      undefined     Γöé
  7518.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇ Γöñ
  7519.              Γöé  Blank  Slot  For  p1  Γöé        EDI   Γöé    caller ' s  EDI    Γöé
  7520.              Γöé                    Γöé             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7521.  ESP ΓöÇΓöÇΓöÇΓöÇ      Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ        ESI   Γöé    caller ' s  ESI    Γöé
  7522.                                               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7523.  
  7524. Caller's code just after call: 
  7525.  
  7526.  
  7527.    ADD      ESP, 16      ; Remove parameters from stack
  7528.    MOV      y,   EAX     ; Use return value.
  7529.  
  7530.  
  7531.               Stack  After  Cleanup          Register  Set  After  Cleanup
  7532.  
  7533.                Γöé                 Γöé               Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇ ΓöÉ
  7534.                Γöé  caller ' s  Local  Γöé          EAX   Γöé    Return Γöé Value    Γöé
  7535.    ESP ΓöÇΓöÇΓöÇΓöÇ      Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7536.                                           EBX   Γöé    caller ' s  EBX    Γöé
  7537.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7538.                                           ECX   Γöé      undefined     Γöé
  7539.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7540.                                           EDX   Γöé      undefined     Γöé
  7541.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇ Γöñ
  7542.                                           EDI   Γöé    caller ' s  EDI    Γöé
  7543.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7544.                                           ESI   Γöé    caller ' s  ESI    Γöé
  7545.                                                Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7546.  
  7547.  
  7548. ΓòÉΓòÉΓòÉ 12.2.4.2. Passing Conforming Parameters to an Unprototyped Routine ΓòÉΓòÉΓòÉ
  7549.  
  7550. This example differs from the previous one by providing: 
  7551.  
  7552.      An eyecatcher after the call to foo in the caller's code 
  7553.      The code necessary to perform the default widening rules required by ANSI 
  7554.      The instruction to clean up the parameters from the stack. 
  7555.  
  7556.  If foo were an ellipsis routine with fewer than three conforming parameters in 
  7557.  the invariant portion of its parameter list, it would also include the code to 
  7558.  interpret the eyecatchers in its prolog. 
  7559.  
  7560.      y = foo('A', x, y+x, y);
  7561.  
  7562.  Caller's code surrounding call: 
  7563.  
  7564.  
  7565.      PUSH     y                ; Push p4 onto the 80386 stack
  7566.      SUB      ESP, 12          ; Allocate stack space for register parameters
  7567.      MOV      EAX, 00000041h   ; Put p1 into EAX (41 hex = A ASCII)
  7568.      MOVSX    EDX, x           ; Put p2 into EDX
  7569.      MOV      ECX, y           ; Load y to calculate p3
  7570.      ADD      ECX, x           ; Calculate p3 and put it into ECX
  7571.      CALL     FOO              ; Make call
  7572.      TEST     EAX, 00540000h   ; Eyecatcher indicating 3 general-purpose
  7573.                                ;  register parameters (see page Eyecatchers)
  7574.      ADD      ESP, 16          ; Clean up parameters after return
  7575.  
  7576.  
  7577. ΓòÉΓòÉΓòÉ 12.2.4.3. Passing Floating-Point Parameters to a Prototyped Routine ΓòÉΓòÉΓòÉ
  7578.  
  7579. The following example shows code sequences, 80386 stack layouts, and 
  7580. floating-point register stack states for a call to the routine fred. For 
  7581. simplicity, the general-purpose registers are not shown. 
  7582.  
  7583.  
  7584.    double fred(float p1, double p2, long double p3, float p4, double p5);
  7585.  
  7586.    double a, b, c;
  7587.    float  d, e;
  7588.  
  7589.    a = b + fred(a, d, (long double)(a + c), e, c);
  7590.  
  7591. Caller's code up until call: 
  7592.  
  7593.  
  7594.    PUSH    2ND DWORD OF c       ; Push upper 4 bytes of c onto stack
  7595.    PUSH    1ST DWORD OF c       ; Push lower 4 bytes of c onto stack
  7596.    FLD     DWORD_PTR e          ; Load e into 80387, promotion
  7597.                                 ;  requires no conversion code
  7598.    FLD     QWORD_PTR a          ; Load a to calculate p3
  7599.    FADD    ST(0), QWORD_PTR c   ; Calculate p3, result is long double
  7600.                                 ;  from nature of 80387 hardware
  7601.    FLD     QWORD_PTR d          ; Load d, no conversion necessary
  7602.    FLD     QWORD_PTR a          ; Load a, demotion requires conversion
  7603.    FSTP    DWORD_PTR [EBP - T1] ; Store to a temp (T1) to convert to float
  7604.    FLD     DWORD_PTR [EBP - T1] ; Load converted value from temp (T1)
  7605.    SUB     ESP, 32              ; Allocate the stack space for
  7606.                                 ;  parameter list
  7607.    CALL    FRED                 ; Make call
  7608.  
  7609.  
  7610.             Stack  Just  After  Call       80387  Register  Set  Just  After  Call
  7611.  
  7612.             Γöî                      ΓöÉ             Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7613.             Γöé    caller ' s  Local     Γöé      ST ( 7 )   Γöé       Empty         Γöé
  7614.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7615.             Γöé  Upper  Dword  of  p5    Γöé      ST ( 6 )   Γöé       Empty         Γöé
  7616.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7617.             Γöé  Lower  Dword  of  p5    Γöé      ST ( 5 )   Γöé       Empty         Γöé
  7618.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7619.             Γöé  Blank  Dword  for  p4   Γöé      ST ( 4 )   Γöé       Empty         Γöé
  7620.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7621.             Γöé        Four           Γöé      ST ( 3 )   Γöé       p4  ( e )        Γöé
  7622.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7623.             Γöé        Blank          Γöé      ST ( 2 )   Γöé     p3  ( a  +  c )      Γöé
  7624.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7625.             Γöé        Dwords         Γöé      ST ( 1 )   Γöé       p2  ( d )        Γöé
  7626.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7627.             Γöé        for  p3         Γöé      ST ( 0 )   Γöé       p1  ( a )        Γöé
  7628.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ             Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7629.             Γöé      Two  Blank        Γöé
  7630.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ
  7631.             Γöé    Dwords  for  p2      Γöé
  7632.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  7633.             Γöé  Blank  Dword  for  p1   Γöé
  7634.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  7635.             Γöé     caller ' s  EIP      Γöé
  7636.  ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ
  7637.  
  7638. Callee's prolog code: 
  7639.  
  7640.  
  7641.    PUSH     EBP                      ; Save caller's EBP
  7642.    MOV      EBP, ESP                 ; Set up callee's EBP
  7643.    SUB      ESP, callee's local size ; Allocate callee's Local
  7644.    PUSH     EBX                      ; Save preserved registers -
  7645.    PUSH     EDI                      ;  will optimize to save
  7646.    PUSH     ESI                      ;  only registers callee uses
  7647.  
  7648.              Stack  After  Prolog       80387  Register  Set  After  Prolog
  7649.  
  7650.             Γöé                     Γöé               Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7651.             Γöé    caller ' s  Local    Γöé       ST ( 7 )    Γöé       Empty       Γöé
  7652.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7653.             Γöé  Upper  Dword  of  p5   Γöé       ST ( 6 )    Γöé       Empty       Γöé
  7654.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7655.             Γöé  Lower  Dword  of  p5   Γöé       ST ( 5 )    Γöé       Empty       Γöé
  7656.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7657.             Γöé  Blank  Dword  for  p4  Γöé       ST ( 4 )    Γöé       Empty       Γöé
  7658.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7659.             Γöé        Four          Γöé       ST ( 3 )    Γöé        p4         Γöé
  7660.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7661.             Γöé        Blank         Γöé       ST ( 2 )    Γöé        p3         Γöé
  7662.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7663.             Γöé        Dwords        Γöé       ST ( 1 )    Γöé        p2         Γöé
  7664.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7665.             Γöé        for  p3        Γöé       ST ( 0 )    Γöé        p1         Γöé
  7666.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7667.             Γöé      Two  Blank       Γöé
  7668.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  Γöñ
  7669.             Γöé    Dwords  for  p2     Γöé
  7670.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7671.             Γöé  Blank  Dword  for  p1  Γöé
  7672.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7673.             Γöé     caller ' s  EIP     Γöé
  7674.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7675.             Γöé     caller ' s  EBP     Γöé
  7676.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7677.             Γöé                     Γöé
  7678.             .                     .
  7679.             .    callee ' s  Local    .
  7680.             .                     .
  7681.             Γöé                     Γöé
  7682.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7683.             Γöé       Saved  EBX      Γöé
  7684.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7685.             Γöé       Saved  EDI      Γöé
  7686.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7687.             Γöé       Saved  ESI      Γöé
  7688.  ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7689.  
  7690. Callee's epilog code: 
  7691.  
  7692.  
  7693.    FLD       RETVAL      ; Load return value onto floating-point stack
  7694.    POP       ESI         ; Restore preserved registers
  7695.    POP       EDI
  7696.    POP       EBX
  7697.    MOV       ESP, EBP    ; Deallocate callee's local
  7698.    POP       EBP         ; Restore caller's EBP
  7699.    RET                   ; Return to caller
  7700.  
  7701.  
  7702.              Stack  After  Epilog       80387  Register  Set  After  Epilog
  7703.  
  7704.             Γöé                      Γöé              Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7705.             Γöé    caller ' s  Local     Γöé      ST ( 7 )    Γöé       Empty        Γöé
  7706.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7707.             Γöé  Upper  Dword  of  p5    Γöé      ST ( 6 )    Γöé       Empty        Γöé
  7708.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7709.             Γöé  Lower  Dword  of  p5    Γöé      ST ( 5 )    Γöé       Empty        Γöé
  7710.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7711.             Γöé  Blank  Dword  for  p4   Γöé      ST ( 4 )    Γöé       Empty        Γöé
  7712.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7713.             Γöé        Four           Γöé      ST ( 3 )    Γöé       Empty        Γöé
  7714.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7715.             Γöé        Blank          Γöé      ST ( 2 )    Γöé       Empty        Γöé
  7716.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7717.             Γöé        Dwords         Γöé      ST ( 1 )    Γöé       Empty        Γöé
  7718.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7719.             Γöé        for  p3         Γöé      ST ( 0 )    Γöé    Return  Value    Γöé
  7720.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7721.             Γöé      Two  Blank        Γöé
  7722.             Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ
  7723.             Γöé    Dwords  for  p2      Γöé
  7724.             Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  7725.             Γöé  Blank  Dword  for  p1   Γöé
  7726.  ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ
  7727.  
  7728. Caller's code just after call: 
  7729.  
  7730.  
  7731.    ADD      ESP, 40      ; Remove parameters from stack
  7732.    FADD     QWORD_PTR b  ; Use return value
  7733.    FSTP     QWORD_PTR a  ; Store expression to variable a
  7734.  
  7735.             Stack  After  Cleanup        80387  Register  Set  After  Cleanup
  7736.  
  7737.             Γöé                  Γöé                Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7738.             Γöé   caller ' s  Local  Γöé         ST ( 7 )   Γöé        Empty         Γöé
  7739.             Γöé                  Γöé                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7740.  ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ         ST ( 6 )   Γöé        Empty         Γöé
  7741.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7742.                                        ST ( 5 )   Γöé        Empty         Γöé
  7743.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7744.                                        ST ( 4 )   Γöé        Empty         Γöé
  7745.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7746.                                        ST ( 3 )   Γöé        Empty         Γöé
  7747.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7748.                                        ST ( 2 )   Γöé        Empty         Γöé
  7749.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7750.                                        ST ( 1 )   Γöé        Empty         Γöé
  7751.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7752.                                        ST ( 0 )   Γöé     Return  Value     Γöé
  7753.                                               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7754.  
  7755.  
  7756. ΓòÉΓòÉΓòÉ 12.2.4.4. Passing Floating-Point Parameters to an Unprototyped Routine ΓòÉΓòÉΓòÉ
  7757.  
  7758. This example differs from the previous floating-point example by the presence 
  7759. of an eyecatcher after the call to fred in the caller's code and the code 
  7760. necessary to perform the default widening rules required by ANSI. 
  7761.  
  7762.  
  7763.    double a, b, c;
  7764.    float  d, e;
  7765.  
  7766.    a = b + fred(a, d, (long double)(a + c), e, c);
  7767.  
  7768. Caller's code up until call: 
  7769.  
  7770.  
  7771.    PUSH    2ND DWORD OF c       ; Push upper 4 bytes of c onto stack
  7772.    PUSH    1ST DWORD OF c       ; Push lower 4 bytes of c onto stack
  7773.    FLD     DWORD_PTR e          ; Load e into 80387, promotion
  7774.                                 ;  requires no conversion code
  7775.    FLD     QWORD_PTR a          ; Load a to calculate p3
  7776.    FADD    ST(0), QWORD_PTR c   ; Calculate p3, result is long double
  7777.                                 ;  from nature of 80387 hardware
  7778.    FLD     QWORD_PTR d          ; Load d, no conversion necessary
  7779.    FLD     QWORD_PTR a          ; Load a, no conversion necessary
  7780.    SUB     ESP, 40              ; Allocate the stack space for
  7781.                                 ;  parameter list
  7782.    CALL    FRED                 ; Make call
  7783.    TEST    EAX, 00ae0000h       ; Eyecatcher maps the register parameters
  7784.    ADD     ESP, 48              ; Clean up parameters from stack
  7785.  
  7786.  
  7787. ΓòÉΓòÉΓòÉ 12.2.4.5. Passing and Returning Aggregates by Value to a Prototyped Routine ΓòÉΓòÉΓòÉ
  7788.  
  7789. If an aggregate is passed by value, the following code sequences are produced 
  7790. for the caller and callee: 
  7791.  
  7792. 'C' Source:
  7793.  
  7794.    struct s_tag {
  7795.              long  a;
  7796.              float b;
  7797.              long  c;
  7798.              } x, y;
  7799.    long  z;
  7800.    double q;
  7801.  
  7802.    /* Prototype */
  7803.    struct s_tag bar(long lvar, struct s_tag aggr, float fvar);
  7804.    .
  7805.    .
  7806.    .
  7807.  
  7808.    /* Actual Call */
  7809.    y = bar(z, x, q);
  7810.    .
  7811.    .
  7812.    .
  7813.  
  7814.    /* callee */
  7815.    struct s_tag bar(long lvar, struct s_tag aggr, float fvar)
  7816.    {
  7817.       struct s_tag temp;
  7818.  
  7819.       temp.a = lvar + aggr.a + 23;
  7820.       temp.b = fvar - aggr.b;
  7821.       temp.c = aggr.c
  7822.  
  7823.       return temp;
  7824.    }
  7825.  
  7826. Caller's code up until call: 
  7827.  
  7828.  
  7829.    FLD     QWORD_PTR q          ; Load lexically first floating-point
  7830.                                 ;  parameter to be converted
  7831.    FSTP    DWORD_PTR [EBP - T1] ; Convert to formal parameter type by
  7832.    FLD     DWORD_PTR [EBP - T1] ; Storing and loading from a temp (T1)
  7833.    SUB     ESP, 4               ; Allocate space for the floating-point
  7834.                                 ;  register parameter
  7835.    PUSH    x.c                  ; Push nonconforming parameters on
  7836.    PUSH    x.b                  ;  stack
  7837.    PUSH    x.a                  ;
  7838.    MOV     EAX, Z               ; Load lexically first conforming
  7839.                                 ;  parameter into EAX
  7840.    SUB     ESP, 4               ; Allocate stack space for the first
  7841.                                 ;  general-purpose register parameter.
  7842.    PUSH    addr y               ; Push hidden first parameter (address of
  7843.                                 ;  return space)
  7844.    CALL    BAR
  7845.  
  7846.  
  7847.            Stack  Just  After  Call      General - Purpose  Registers  Just  After  Call
  7848.  
  7849.           Γöé                      Γöé               Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇ ΓöÉ
  7850.           Γöé    caller ' s  Local     Γöé         EAX    Γöé         z         Γöé
  7851.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7852.           Γöé  Blank  Slot  for  q     Γöé         EBX    Γöé   caller ' s  EBX    Γöé
  7853.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7854.           Γöé         x . c           Γöé         ECX    Γöé     undefined     Γöé
  7855.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇ Γöñ
  7856.           Γöé         x . b           Γöé         EDX    Γöé     undefined     Γöé
  7857.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇ Γöñ
  7858.           Γöé         x . a           Γöé         EDI    Γöé   caller ' s  EDI    Γöé
  7859.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7860.           Γöé  Blank  Slot  for  z     Γöé         ESI    Γöé   caller ' s  ESI    Γöé
  7861.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7862.           Γöé  Hidden  Ret  Val  Addr  Γöé
  7863.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  7864. ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ   Γöé     caller ' s  EIP      Γöé
  7865.           Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ
  7866.  
  7867.  
  7868.                 80387  Register  Set  Just  After  Call
  7869.  
  7870.                          Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7871.                  ST ( 7 )    Γöé       Empty        Γöé
  7872.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7873.                  ST ( 6 )    Γöé       Empty        Γöé
  7874.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7875.                  ST ( 5 )    Γöé       Empty        Γöé
  7876.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7877.                  ST ( 4 )    Γöé       Empty        Γöé
  7878.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7879.                  ST ( 3 )    Γöé       Empty        Γöé
  7880.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7881.                  ST ( 2 )    Γöé       Empty        Γöé
  7882.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7883.                  ST ( 1 )    Γöé       Empty        Γöé
  7884.                          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7885.                  ST ( 0 )    Γöé  fvar  [ ( float ) q ]   Γöé
  7886.                          Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7887.  
  7888. Callee's prolog code: 
  7889.  
  7890.  
  7891.    PUSH     EBP          ; Save caller's EBP
  7892.    MOV      EBP, ESP     ; Set up callee's EBP
  7893.    SUB      ESP, 12      ; Allocate callee's Local
  7894.                          ;  = sizeof(struct s_tag)
  7895.    PUSH     EBX          ; Save preserved registers -
  7896.    PUSH     EDI          ;  will optimize to save
  7897.    PUSH     ESI          ;  only registers callee uses
  7898.  
  7899.            Stack  After  Prolog               Register  Set  After  Prolog
  7900.  
  7901.           Γöé                      Γöé              Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7902.           Γöé     caller ' s  Local    Γöé         EAX   Γöé      lvar Γöé ( z )       Γöé
  7903.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7904.           Γöé   Blank  Slot  for  q    Γöé         EBX   Γöé    caller ' s  EBX     Γöé
  7905.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7906.           Γöé          x . c          Γöé         ECX   Γöé      undefined      Γöé
  7907.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7908.           Γöé          x . b          Γöé         EDX   Γöé      undefined      Γöé
  7909.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  7910.           Γöé          x . a          Γöé         EDI   Γöé    caller ' s  EDI     Γöé
  7911.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7912.           Γöé   Blank  Slot  for  z    Γöé         ESI   Γöé    caller ' s  ESI     Γöé
  7913.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7914.           Γöé  Hidden  Ret  Val  Addr  Γöé
  7915.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ         The  term  undefined
  7916.           Γöé      caller ' s  EIP     Γöé         in  registers  ECX  and  EDX
  7917.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ         refers  to  the  fact  that  they
  7918.           Γöé      caller ' s  EBP     Γöé         can  be  safely  overwritten  by
  7919.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ         the  code  in  bar .
  7920.           Γöé                      Γöé
  7921.           .                      .
  7922.           .     callee ' s  Local    .
  7923.           .                      .       80387  Register  Set  Just  After  Call
  7924.           Γöé                      Γöé
  7925.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7926.           Γöé        Saved  EBX      Γöé        ST ( 7 )   Γöé        Empty         Γöé
  7927.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7928.           Γöé        Saved  EDI      Γöé        ST ( 6 )   Γöé        Empty         Γöé
  7929.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7930.           Γöé        Saved  ESI      Γöé        ST ( 5 )   Γöé        Empty         Γöé
  7931. ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ   Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7932.                                         ST ( 4 )   Γöé        Empty         Γöé
  7933.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7934.                                         ST ( 3 )   Γöé        Empty         Γöé
  7935.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7936.                                         ST ( 2 )   Γöé        Empty         Γöé
  7937.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7938.                                         ST ( 1 )   Γöé        Empty         Γöé
  7939.                                                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7940.                                         ST ( 0 )   Γöé   fvar  [ ( float ) q ]    Γöé
  7941.                                                Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7942.  
  7943. Callee's code: 
  7944.  
  7945.  
  7946.    temp.a = lvar + aggr.a + 23;
  7947.    temp.b = fvar - aggr.b;
  7948.    temp.c = aggr.c
  7949.  
  7950.    return temp;
  7951.  
  7952.    ADD       EAX, 23               ;
  7953.    ADD       EAX, [EBP + 16]       ; Calculate temp.a
  7954.    MOV       [EBP - 12], EAX       ;
  7955.  
  7956.    FSUB      DWORD_PTR [EBP + 20]  ; Calculate temp.b
  7957.    FSTP      DWORD_PTR [EBP - 8]   ;
  7958.  
  7959.    MOV       EAX, [EBP + 24]       ; Calculate temp.c
  7960.    MOV       [EBP - 4], EAX        ;
  7961.  
  7962.    MOV       EAX, [EBP + 8]        ; Load hidden parameter (address
  7963.                                    ;  of return value storage). Useful
  7964.                                    ;  both for setting return value
  7965.                                    ;  and for returning address in EAX.
  7966.  
  7967.    MOV       EBX, [EBP - 12]       ; Return temp by copying its contents
  7968.    MOV       [EAX], EBX            ;  to the return value storage
  7969.    MOV       EBX, [EBP - 8]        ;  addressed by the hidden parameter.
  7970.    MOV       [EAX + 4], EBX        ;  String move instructions would be
  7971.    MOV       EBX, [EBP - 4]        ;  faster above a certain threshold
  7972.    MOV       [EAX + 8], EBX        ;  size of returned aggregate.
  7973.  
  7974.    POP       ESI                   ; Begin Epilog by restoring
  7975.    POP       EDI                   ;  preserved registers.
  7976.    POP       EBX
  7977.    MOV       ESP, EBP              ; Deallocate callee's local
  7978.    POP       EBP                   ; Restore caller's EBP
  7979.    RET                             ; Return to caller
  7980.  
  7981.             Stack  After  Epilog       General - Purpose  Registers  After  Epilog
  7982.  
  7983.            Γöé                    Γöé                Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  7984.            Γöé    caller ' s  Local   Γöé           EAX   Γöé  Addr  of  Return  Value  Γöé
  7985.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7986.            Γöé  Blank  Slot  for  q   Γöé           EBX   Γöé     caller ' s  EBX       Γöé
  7987.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7988.            Γöé         x . c         Γöé           ECX   Γöé       undefined        Γöé
  7989.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7990.            Γöé         x . b         Γöé           EDX   Γöé       undefined        Γöé
  7991.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  7992.            Γöé         x . a         Γöé           EDI   Γöé     caller ' s  EDI       Γöé
  7993.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  7994.            Γöé  Blank  Slot  for  z   Γöé           ESI   Γöé     caller ' s  ESI       Γöé
  7995.            Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ                Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ
  7996.            Γöé  Hidden  Return      Γöé
  7997.            Γöé   Value  Address     Γöé
  7998. ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  7999.  
  8000.      80387  Register  Set  After  Epilog
  8001.  
  8002.               Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  8003.       ST ( 7 )    Γöé       Empty        Γöé
  8004.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8005.       ST ( 6 )    Γöé       Empty        Γöé
  8006.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8007.       ST ( 5 )    Γöé       Empty        Γöé
  8008.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8009.       ST ( 4 )    Γöé       Empty        Γöé
  8010.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8011.       ST ( 3 )    Γöé       Empty        Γöé
  8012.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8013.       ST ( 2 )    Γöé       Empty        Γöé
  8014.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8015.       ST ( 1 )    Γöé       Empty        Γöé
  8016.               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8017.       ST ( 0 )    Γöé       Empty        Γöé
  8018.               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  8019.  
  8020. Caller's code just after call: 
  8021.  
  8022.  
  8023.    ADD    ESP, 24       ; Remove parameters from stack
  8024.     ...                 ; Because address of y was given as the
  8025.                         ;  hidden parameter, the assignment of the
  8026.                         ;  return value has already been performed.
  8027.  
  8028.             Stack  After  Cleanup        General - Purpose  Registers  After  Cleanup
  8029.  
  8030.             Γöé                  Γöé                Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  8031.             Γöé   caller ' s  Local  Γöé           EAX   Γöé  Addr  of  Return  Value  Γöé
  8032.  ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ    Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ                Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8033.                                          EBX   Γöé     caller ' s  EBX       Γöé
  8034.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8035.     80387  Register  Set  After  Cleanup      ECX   Γöé      undefined         Γöé
  8036.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8037.              Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ          EDX   Γöé      undefined         Γöé
  8038.      ST ( 7 )    Γöé       Empty       Γöé               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8039.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ          EDI   Γöé     caller ' s  EDI       Γöé
  8040.      ST ( 6 )    Γöé       Empty       Γöé               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  8041.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ          ESI   Γöé     caller ' s  ESI       Γöé
  8042.      ST ( 5 )    Γöé       Empty       Γöé               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ
  8043.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8044.      ST ( 4 )    Γöé       Empty       Γöé
  8045.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8046.      ST ( 3 )    Γöé       Empty       Γöé
  8047.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8048.      ST ( 2 )    Γöé       Empty       Γöé
  8049.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8050.      ST ( 1 )    Γöé       Empty       Γöé
  8051.              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8052.      ST ( 0 )    Γöé       Empty       Γöé
  8053.              Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  8054.  
  8055. If a y.a = bar(x).b construct is used instead of the more common y = bar(x) 
  8056. construct, the address of the return value is available in EAX. In this case, 
  8057. the address of the return value (hidden parameter) would point to a temporary 
  8058. variable allocated by the compiler in the automatic storage of the caller. 
  8059.  
  8060.  
  8061. ΓòÉΓòÉΓòÉ 12.2.4.6. Passing and Returning Aggregates by Value to an Unprototyped Routine ΓòÉΓòÉΓòÉ
  8062.  
  8063. This example differs from the previous one by the presence of an eyecatcher 
  8064. after the call to bar in the caller's code and the code necessary to perform 
  8065. the default widening rules required by ANSI. 
  8066.  
  8067.    struct s_tag {
  8068.              long  a;
  8069.              float b;
  8070.              long  c;
  8071.              } x, y;
  8072.    long  z;
  8073.    double q;
  8074.  
  8075.    /* Actual Call */
  8076.    y = bar(z, x, q);
  8077.     ...
  8078.  
  8079.    /* callee */
  8080.    struct s_tag bar(long lvar, struct s_tag aggr, float fvar)
  8081.    {
  8082.       struct s_tag temp;
  8083.  
  8084.       temp.a = lvar + aggr.a + 23;
  8085.       temp.b = fvar - aggr.b;
  8086.       temp.c = aggr.c
  8087.  
  8088.       return temp;
  8089.    }
  8090.  
  8091. Caller's code up until call: 
  8092.  
  8093.  
  8094.    FLD     QWORD_PTR q          ; Load lexically first floating-point
  8095.                                 ;  parameter to be converted
  8096.    SUB     ESP, 8               ; Allocate space for the floating-point
  8097.                                 ;  register parameter
  8098.    PUSH    x.c                  ; Push nonconforming parameters on
  8099.    PUSH    x.b                  ;  stack
  8100.    PUSH    x.a                  ;
  8101.    MOV     EAX, z               ; Load lexically first
  8102.                                 ;  conforming parameter
  8103.                                 ;  into EAX
  8104.    SUB     ESP, 4               ; Allocate stack space for the first
  8105.                                 ;  general-purpose register parameter.
  8106.    PUSH    addr y               ; Push hidden first parameter (address of
  8107.                                 ;  return space)
  8108.    CALL    BAR
  8109.    TEST    EAX, 00408000h       ; Eyecatcher
  8110.    ADD     ESP, 28              ; Clean up parameters
  8111.  
  8112.            Stack  Just  After  Call     General - Purpose  Registers  Just  After  Call
  8113.  
  8114.           Γöé                      Γöé              Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ Γö¼ ΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  8115.           Γöé     caller ' s  Local    Γöé         EAX   Γöé          z          Γöé
  8116.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8117.           Γöé        Two  Blank      Γöé         EBX   Γöé    caller ' s  EBX     Γöé
  8118.           Γö£ ΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇΓöÇ  ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8119.           Γöé      Dwords  for  q     Γöé         ECX   Γöé       Garbage       Γöé
  8120.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8121.           Γöé          x . c          Γöé         EDX   Γöé       Garbage       Γöé
  8122.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8123.           Γöé          x . b          Γöé         EDI   Γöé    caller ' s  EDI     Γöé
  8124.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8125.           Γöé          x . a          Γöé         ESI   Γöé    caller ' s  ESI     Γöé
  8126.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ              Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γö┤ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  8127.           Γöé   Blank  Slot  for  z    Γöé
  8128.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  8129.           Γöé  Hidden  Ret  Val  Addr  Γöé     80387  Register  Set  Just  After  Call
  8130.           Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöñ
  8131.           Γöé      caller ' s  EIP     Γöé              Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  8132. ESP ΓöÇΓöÇΓöÇΓöÇΓöÇ   Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇ Γöÿ       ST ( 7 )   Γöé        Empty        Γöé
  8133.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8134.                                        ST ( 6 )   Γöé        Empty        Γöé
  8135.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8136.                                        ST ( 5 )   Γöé        Empty        Γöé
  8137.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8138.                                        ST ( 4 )   Γöé        Empty        Γöé
  8139.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8140.                                        ST ( 3 )   Γöé        Empty        Γöé
  8141.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8142.                                        ST ( 2 )   Γöé        Empty        Γöé
  8143.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8144.                                        ST ( 1 )   Γöé        Empty        Γöé
  8145.                                               Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  8146.                                        ST ( 0 )   Γöé   fvar  [ ( float ) q ]   Γöé
  8147.                                               Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  8148.  
  8149.  
  8150. ΓòÉΓòÉΓòÉ 12.3. _System Calling Convention ΓòÉΓòÉΓòÉ
  8151.  
  8152. To use this linkage convention, you must use the _System keyword in the 
  8153. declaration of the function or specify the /Ms option when you invoke the 
  8154. compiler. 
  8155.  
  8156. Note:  Because the VisualAge C++ library functions use the _Optlink convention, 
  8157. if you use the /Ms option, you must include all appropriate library header 
  8158. files to ensure the functions are called with the correct convention. 
  8159.  
  8160. The following rules apply to the _System calling convention: 
  8161.  
  8162.      All parameters are passed on the 80386 stack. 
  8163.  
  8164.      The C parameter-passing convention is followed, where parameters are 
  8165.       pushed onto the stack in right-to-left order. 
  8166.  
  8167.      The calling function is responsible for removing parameters from the 
  8168.       stack. 
  8169.  
  8170.      All parameters are doubleword (4-byte) aligned. 
  8171.  
  8172.      The size of the parameter list is passed in AL.  If the parameter list is 
  8173.       greater than 255 doublewords, the value contained in AL is the 8 least 
  8174.       significant bits of the size.  You can use the __parmdwords function 
  8175.       (described in the C Library Reference) to access the value of AL that was 
  8176.       passed to the function. 
  8177.  
  8178.       Note:  The __parmdwords function may not yield the correct value in the 
  8179.       case of compilers that do not follow the rule of passing the size of the 
  8180.       parameter list in AL.  You can use the __parmdwords function with code 
  8181.       compiled under IBM VisualAge C++ Version 3.0 for OS/2 provided the code 
  8182.       was compiled with the /Gp+ option specified. 
  8183.  
  8184.      All functions returning non-floating-point values pass a return value 
  8185.       back to the caller in EAX. Functions returning floating-point values use 
  8186.       the floating-point stack ST(0). Aggregate return values, such as 
  8187.       structures, are passed as a hidden parameter on the stack, and EAX points 
  8188.       to them on return. 
  8189.  
  8190.      All functions preserve the general purpose registers of the caller, 
  8191.       except for ECX, EDX, and EAX. 
  8192.  
  8193.      Structures passed by value are actually copied onto the stack, not passed 
  8194.       by reference. 
  8195.  
  8196.      The floating-point stack is defined to be empty upon entry to a called 
  8197.       function, and has either a single item in ST(0) if there is a 
  8198.       floating-point return, or is empty if there is not a floating-point 
  8199.       return. 
  8200.  
  8201.      The direction flag must be clear upon entry to functions and clear on 
  8202.       exit from functions. The state of the other flags is ignored on entry to 
  8203.       a function, and undefined on exit. 
  8204.  
  8205.      The compiler will not change the contents of the floating-point control 
  8206.       register.  If you want to change the control register contents for a 
  8207.       particular operation, save the contents before making the changes and 
  8208.       restore them after the operation. 
  8209.  
  8210.  
  8211. ΓòÉΓòÉΓòÉ 12.3.1. Examples Using the _System Convention ΓòÉΓòÉΓòÉ
  8212.  
  8213. The following examples are included for purposes of illustration and clarity 
  8214. only.  They have not been optimized. The examples assume that you are familiar 
  8215. with programming in assembler.  Note that, in the examples, the stack grows 
  8216. toward the bottom of the page, and ESP always points to the top of the stack. 
  8217.  
  8218. For the call 
  8219.  
  8220.    m = func(a,b,c);
  8221. a, b, and c are 32-bit integers and func has two local variables, x and y (both 
  8222. 32-bit integers). 
  8223.  
  8224. The stack for the call to func would look like this: 
  8225.  
  8226.                              Stack
  8227.                    Γöé                         Γöé
  8228.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ        Higher  Memory
  8229.                    Γöé            c             Γöé
  8230.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8231.                    Γöé            b             Γöé
  8232.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8233.                    Γöé            a             Γöé
  8234.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8235.                    Γöé      caller ' s  EIP        Γöé
  8236.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8237.                    Γöé      caller ' s  EBP        Γöé
  8238.    EBP  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ      Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8239.                    Γöé            x             Γöé
  8240.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8241.                    Γöé            y             Γöé
  8242.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ     ΓöÇ ΓöÉ
  8243.                    Γöé        Saved  EDI         Γöé      Γöé
  8244.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ      Γöé  These  would  only  be
  8245.                    Γöé        Saved  ESI         Γöé      Γöé  pushed  if  they  were
  8246.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ      Γöé  used  in  this  function .
  8247.                    Γöé        Saved  EBX         Γöé      Γöé
  8248.    ESP  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ      Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ     ΓöÇ Γöÿ
  8249.                    Γöé                         Γöé        Lower  Memory
  8250.  
  8251. The instructions used to create this activation record on the stack look like 
  8252. this on the calling side: 
  8253.  
  8254.  
  8255.    PUSH    c
  8256.    PUSH    b
  8257.    PUSH    c
  8258.    MOV     AL, 3H
  8259.    CALL    func
  8260.        .
  8261.        .
  8262.    ADD     ESP, 12    ; Cleaning up the parameters
  8263.        .
  8264.        .
  8265.    MOV     m, EAX
  8266.        .
  8267.        .
  8268.  
  8269. Note:  the MOV  AL,3H instruction is not present unless the /Gp option is on. 
  8270.  
  8271. For the callee, the code looks like this: 
  8272.  
  8273. func PROC
  8274.    PUSH    EBP
  8275.    MOV     EBP, ESP       ;  Allocating 8 bytes of storage
  8276.    SUB     ESP, 8         ;   for two local variables.
  8277.    PUSH    EDI            ; These would only be
  8278.    PUSH    ESI            ;  pushed if they were used
  8279.    PUSH    EBX            ;  in this function.
  8280.    .
  8281.    .
  8282.    MOV     EAX, [EBP - 8]    ; Load y into EAX
  8283.    MOV     EBX, [EBP + 12]   ; Load b into EBX
  8284.    .
  8285.    .
  8286.    XOR     EAX, EAX           ; Zero the return value
  8287.    POP     EBX                ; Restore the saved registers
  8288.    POP     ESI
  8289.    POP     EDI
  8290.    LEAVE                      ; Equivalent to  MOV   ESP, EBP
  8291.                               ;                POP   EBP
  8292.    RET
  8293. func ENDP
  8294.  
  8295. The saved register set is EBX, ESI, and EDI. The other registers (EAX, ECX, and 
  8296. EDX) can have their contents changed by a called routine. 
  8297.  
  8298. Floating-point results are returned in ST(0), which is the top of the 
  8299. floating-point register stack. If there is no numeric coprocessor installed in 
  8300. the system, the OS/2 operating system emulates the coprocessor. 
  8301.  
  8302. Floating-point parameters are pushed on the 80386 stack. 
  8303.  
  8304. Under some circumstances, the compiler will not use EBP to access automatic and 
  8305. parameter values, thus increasing the efficiency of the application. Whether it 
  8306. is used or not, EBP will not change across the call. 
  8307.  
  8308. When passing structures as value parameters, the compiler generates code to 
  8309. copy the structure on to the 80386 stack. If the size of the structure is 
  8310. larger than an 80386 page size (4K), the compiler generates code to copy the 
  8311. structure backward. (That is, the last byte in the structure is the first to be 
  8312. copied.) This operation ensures that the OS/2 guard page method of stack growth 
  8313. will function properly in the presence of large structures being passed by 
  8314. value. Refer to the User's Guide for more information on stack growth. 
  8315.  
  8316. Structures are not returned on the stack. The caller pushes the address where 
  8317. the returned structure is to be placed as a lexically first hidden parameter. A 
  8318. function that returns a structure must be aware that all parameters are 4 bytes 
  8319. farther away from EBP than they would be if no structure return were involved. 
  8320. The address of the returned structure is returned in EAX. 
  8321.  
  8322. In the most common case, where the return from a function is simply assigned to 
  8323. a variable, the compiler merely pushes the address of the variable as the 
  8324. hidden parameter. [Note that when the /Gp switch is on and this function calls 
  8325. the __parmdwords function, the value of AL is stored in a temporary variable in 
  8326. its prolog.  This is done to ensure that the value cannot change before the 
  8327. call to __parmdwords] For example: 
  8328.  
  8329. struct test_tag
  8330.        {
  8331.        int a;
  8332.        int some_array[100];
  8333.        } test_struct;
  8334.  
  8335. struct test_tag test_function(struct test_tag test_parm)
  8336. {
  8337.    test_parm.a = 42;
  8338.    return test_parm;
  8339. }
  8340.  
  8341. int main(void)
  8342. {
  8343.    test_struct = test_function(test_struct);
  8344.    return test_struct.a;
  8345. }
  8346.  
  8347. The code generated for this program would be: 
  8348.  
  8349.  
  8350. test_function  PROC
  8351.    PUSH    ESI
  8352.    PUSH    EDI
  8353.    MOV     DWORD PTR [ESP+0cH], 02aH     ; test_parm.a
  8354.    MOV     EAX, [ESP+08H]                ; Get the target of the return value
  8355.    MOV     EDI, EAX                      ; Value
  8356.    LEA     ESI, [ESP+0cH]                ; test_parm
  8357.    MOV     ECX, 065H
  8358.    REP MOVSD
  8359.    POP     EDI
  8360.    POP     ESI
  8361.    RET
  8362. test_function  ENDP
  8363.  
  8364.    PUBLIC  main
  8365. main  PROC
  8366.    PUSH    EBP
  8367.    MOV     EBP, ESP
  8368.    PUSH    ESI
  8369.    PUSH    EDI
  8370.  
  8371.    SUB     ESP, 0194H                  ; Adjust the stack pointer
  8372.    MOV     EDI, ESP
  8373.    MOV     ESI, OFFSET FLAT: test_struct
  8374.    MOV     ECX, 065H
  8375.    REP MOVSD                           ; Copy the parameter
  8376.    MOV     AL, 065H
  8377.    PUSH    OFFSET FLAT: test_struct    ; Push the address of the target
  8378.    CALL    test_function
  8379.    ADD     ESP, 0198H
  8380.  
  8381.    MOV     EAX, DWORD PTR test_struct  ; Take care of the return
  8382.    POP     EDI                         ;  from main
  8383.    POP     ESI
  8384.    LEAVE
  8385.    RET
  8386. main   ENDP
  8387.  
  8388. Note:  The MOV  AL, 065H is not present unless the /Gp switch is on. 
  8389.  
  8390. In a slightly different case, where only one field of the structure is used by 
  8391. the caller (as shown in the following example), the compiler allocates 
  8392. sufficient temporary storage in the caller's local storage area on the stack to 
  8393. contain a copy of the structure. The address of this temporary storage will be 
  8394. pushed as the target for the return value. Once the call is completed, the 
  8395. desired member of the structure can be accessed as an offset from EAX, as can 
  8396. be seen in the code generated for the example: 
  8397.  
  8398. struct test_tag
  8399.        {
  8400.        int a;
  8401.        int some_array[100];
  8402.        } test_struct;
  8403.  
  8404. struct test_tag test_function(struct test_tag test_parm)
  8405. {
  8406.    test_parm.a = 42;
  8407.    return test_parm;
  8408. }
  8409.  
  8410. int main(void)
  8411. {
  8412.    return test_function(test_struct).a;
  8413. }
  8414.  
  8415. The code generated for this example would be: 
  8416.  
  8417.  
  8418.    PUBLIC  main
  8419. main   PROC
  8420.    PUSH    EBP
  8421.    MOV     EBP, ESP
  8422.    SUB     ESP, 0194H     ; Allocate space for compiler-generated
  8423.    PUSH    ESI            ;  temporary variable
  8424.    PUSH    EDI
  8425.    SUB     ESP, 0194H
  8426.    MOV     EDI, ESP
  8427.    MOV     ESI, OFFSET FLAT: test_struct
  8428.    MOV     ECX, 065H
  8429.    REP MOVSD
  8430.    LEA     EAX, [ESP+019cH]
  8431.    PUSH    EAX
  8432.    MOV     AL, 065H
  8433.    CALL    test_function
  8434.    ADD     ESP, 0198H
  8435.    MOV     EAX, [EAX]      ; Note the convenience of having the
  8436.    POP     EDI             ;  address of the returned structure
  8437.    POP     ESI             ;  in EAX
  8438.    LEAVE
  8439.    RET
  8440. main   ENDP
  8441.  
  8442. Again, the MOV  AL,3H instruction is not present unless the /Gp option is on. 
  8443.  
  8444.  
  8445. ΓòÉΓòÉΓòÉ 12.4. _Pascal and _Far32_Pascal Calling Conventions ΓòÉΓòÉΓòÉ
  8446.  
  8447. VisualAge C++ compiler provides both a _Pascal and a _Far32 _Pascal convention. 
  8448. The _Far32 _Pascal convention allows you to make calls between different code 
  8449. segments in code that runs at ring 0, and is only valid when the /Gr+ option is 
  8450. specified. The _Pascal conventions are most commonly used to create virtual 
  8451. device drivers, as described in Developing Virtual Device Drivers. 
  8452.  
  8453. Note: 
  8454.  
  8455.    1. These _Pascal linkage conventions should not be confused with the 16-bit 
  8456.       _Far16 _Pascal convention which is provided for 16-bit compatibility. 
  8457.  
  8458.    2. The _Far32 _Pascal convention is not available in C++ programs. 
  8459.  
  8460.  The _Pascal and _Far32 _Pascal conventions follow the same rules as the 
  8461.  _System convention with these exceptions: 
  8462.  
  8463.      Function names are converted to uppercase. 
  8464.  
  8465.      Parameters are pushed in a left-to-right lexical order. 
  8466.  
  8467.      The callee is responsible for cleaning up the parameters. 
  8468.  
  8469.      Variable argument functions are not supported. 
  8470.  
  8471.      The size of the parameter list is not passed in AL. 
  8472.  
  8473.  Important  The compiler does not convert 16-bit or 32-bit _Pascal function 
  8474.  names to uppercase.  The case of the function name in the call must match the 
  8475.  case in the function prototype. Function names are, however, converted to 
  8476.  uppercase in the object module to allow calls from assembler. 
  8477.  
  8478.  
  8479. ΓòÉΓòÉΓòÉ 12.4.1. Examples Using the _Pascal Convention ΓòÉΓòÉΓòÉ
  8480.  
  8481. The following examples are included for purposes of illustration and clarity 
  8482. only and have not been optimized. The examples assume that you are familiar 
  8483. with programming in assembler.  Note that, in the examples, the stack grows 
  8484. toward the bottom of the page, and ESP always points to the top of the stack. 
  8485.  
  8486. For the call 
  8487.  
  8488.    m = func(a,b,c);
  8489. a, b, and c are 32-bit integers, and func has two local variables, x and y 
  8490. (both 32-bit integers). 
  8491.  
  8492. The stack for the call to func would look like this: 
  8493.  
  8494.                              Stack
  8495.                    Γöé                         Γöé
  8496.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ        Higher  Memory
  8497.                    Γöé            a             Γöé
  8498.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8499.                    Γöé            b             Γöé
  8500.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8501.                    Γöé            c             Γöé
  8502.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8503.                    Γöé      caller ' s  EIP        Γöé
  8504.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8505.                    Γöé      caller ' s  EBP        Γöé
  8506.    EBP  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ      Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8507.                    Γöé            x             Γöé
  8508.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ
  8509.                    Γöé            y             Γöé
  8510.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ     ΓöÇ ΓöÉ
  8511.                    Γöé        Saved  EDI         Γöé      Γöé
  8512.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ      Γöé  These  would  only  be
  8513.                    Γöé        Saved  ESI         Γöé      Γöé  pushed  if  they  were
  8514.                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ      Γöé  used  in  this  function .
  8515.                    Γöé        Saved  EBX         Γöé      Γöé
  8516.    ESP  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ      Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇ Γöñ     ΓöÇ Γöÿ
  8517.                    Γöé                         Γöé        Lower  Memory
  8518.  
  8519. The instructions used to build this activation record on the stack look like 
  8520. this on the calling side: 
  8521.  
  8522.  
  8523.    PUSH    a
  8524.    PUSH    b
  8525.    PUSH    c
  8526.    CALL    FUNC
  8527.        .
  8528.        .
  8529.        .
  8530.    MOV     m, EAX
  8531.        .
  8532.        .
  8533.  
  8534. For the callee, the code looks like: 
  8535.  
  8536.  
  8537. FUNC PROC
  8538.    PUSH    EBP
  8539.    MOV     EBP, ESP       ;  Allocating 8 bytes of storage
  8540.    SUB     ESP, 8         ;   for two local variables.
  8541.    PUSH    EDI            ; These would only be
  8542.    PUSH    ESI            ;  pushed if they were used
  8543.    PUSH    EBX            ;  in this function.
  8544.    .
  8545.    .
  8546.    MOV     EAX, [EBP - 8]    ; Load y into EAX
  8547.    MOV     EBX, [EBP + 12]   ; Load b into EBX
  8548.    .
  8549.    .
  8550.    XOR     EAX, EAX           ; Zero the return value
  8551.    POP     EBX                ; Restore the saved registers
  8552.    POP     ESI
  8553.    POP     EDI
  8554.    LEAVE                      ; Equivalent to  MOV   ESP, EBP
  8555.                               ;                POP   EBP
  8556.    RET     0CH
  8557. FUNC ENDP
  8558.  
  8559. Like the _System calling convention, the saved register set is EBX, ESI, and 
  8560. EDI.  The other registers (EAX, ECX, and EDX) can have their contents changed 
  8561. by a called routine. 
  8562.  
  8563. Floating-point results are returned in ST(0). If there is no numeric 
  8564. coprocessor installed in the system, the OS/2 operating system emulates the 
  8565. coprocessor.  Floating-point parameters are pushed on the 80386 stack. 
  8566.  
  8567. _Far32 _Pascal function pointers are returned with the offset in EAX and the 
  8568. segment in DX. 
  8569.  
  8570. In some circumstances, the compiler will not use EBP to access automatic and 
  8571. parameter values, thus increasing the efficiency of the application. Whether it 
  8572. is used or not, EBP will not change across the call. 
  8573.  
  8574. Structures are handled in the same way as they are under the _System calling 
  8575. convention. When passing structures as value parameters, the compiler generates 
  8576. code to copy the structure on to the 80386 stack. If the size of the structure 
  8577. is larger than an 80386 page size (4K), the compiler generates code to copy the 
  8578. structure backward. (That is, the last byte in the structure is the first to be 
  8579. copied.) 
  8580.  
  8581. Structures are not returned on the stack. The caller pushes the address where 
  8582. the returned structure is to be placed as a lexically first hidden parameter. A 
  8583. function that returns a structure must be aware that all parameters are 4 bytes 
  8584. farther away from EBP than they would be if no structure return were involved. 
  8585. The address of the returned structure is returned in EAX. 
  8586.  
  8587. In the most common case, where the return from a function is simply assigned to 
  8588. a variable, the compiler merely pushes the address of the variable as the 
  8589. hidden parameter. For example: 
  8590.  
  8591.    struct test_tag {
  8592.              int a;
  8593.              int some_array[100];
  8594.              } test_struct;
  8595.  
  8596.    struct test_tag test_function(struct test_tag test_parm)
  8597.    {
  8598.       test_parm.a = 42;
  8599.       return test_parm;
  8600.    }
  8601.  
  8602.    int main(void)
  8603.    {
  8604.       test_struct = test_function(test_struct);
  8605.       return test_struct.a;
  8606.    }
  8607.  
  8608. The code generated for the above example would be: 
  8609.  
  8610.  
  8611. TEST_FUNCTION  PROC
  8612.    PUSH    EBP
  8613.    MOV     EBP, ESP
  8614.    PUSH    ESI
  8615.    PUSH    EDI
  8616.    MOV     DWORD PTR [ESP+0cH], 02aH   ; test_parm.a
  8617.    MOV     EAX, [EBP+08H]              ; Get the target of the return value
  8618.    MOV     EDI, EAX                    ; Value
  8619.    LEA     ESI, [EBP+0cH]              ; test_parm
  8620.    MOV     ECX, 065H
  8621.    REP MOVSD
  8622.    POP     EDI
  8623.    POP     ESI
  8624.    LEAVE
  8625.    RET     198H
  8626. TEST_FUNCTION  ENDP
  8627.  
  8628.    PUBLIC  main
  8629. main  PROC
  8630.    PUSH    EBP
  8631.    MOV     EBP, ESP
  8632.    PUSH    ESI
  8633.    PUSH    EDI
  8634.  
  8635.    SUB     ESP, 0194H                  ; Adjust the stack pointer
  8636.    MOV     EDI, ESP
  8637.    MOV     ESI, OFFSET FLAT: test_struct
  8638.    MOV     ECX, 065H
  8639.    REP MOVSD                           ; Copy the parameter
  8640.    PUSH    OFFSET FLAT: test_struct    ; Push the address of the target
  8641.    CALL    TEST_FUNCTION
  8642.  
  8643.    MOV     EAX, DWORD PTR test_struct  ; Take care of the return
  8644.    POP     EDI                         ;  from main
  8645.    POP     ESI
  8646.    LEAVE
  8647.    RET
  8648. main   ENDP
  8649.  
  8650. In a slightly different case, where only one field of the structure is used by 
  8651. the caller (as shown in the following example), the compiler allocates 
  8652. sufficient temporary storage in the caller's local storage area on the stack to 
  8653. contain a copy of the structure. The address of this temporary storage will be 
  8654. pushed as the target for the return value. Once the call is completed, the 
  8655. desired member of the structure can be accessed as an offset from EAX, as can 
  8656. be seen in the code generated for the example: 
  8657.  
  8658.    struct test_tag {
  8659.              int a;
  8660.              int some_array[100];
  8661.              } test_struct;
  8662.  
  8663.    struct test_tag test_function(struct test_tag test_parm)
  8664.    {
  8665.       test_parm.a = 42;
  8666.       return test_parm;
  8667.    }
  8668.  
  8669.    int main(void)
  8670.    {
  8671.       return test_function(test_struct).a;
  8672.    }
  8673.  
  8674. The code generated for the example would be: 
  8675.  
  8676.  
  8677.    PUBLIC  main
  8678. main   PROC
  8679.    PUSH    EBP
  8680.    MOV     EBP, ESP
  8681.    SUB     ESP, 0194H     ; Allocate space for compiler-generated
  8682.    PUSH    ESI            ;  temporary variable
  8683.    PUSH    EDI
  8684.    SUB     ESP, 0194H
  8685.    MOV     EDI, ESP
  8686.    MOV     ESI, OFFSET FLAT: test_struct
  8687.    MOV     ECX, 065H
  8688.    REP MOVSD
  8689.    LEA     EAX, [ESP+0194H]
  8690.    PUSH    EAX
  8691.    CALL    TEST_FUNCTION
  8692.    MOV     EAX, [EAX]      ; Note the convenience of having the
  8693.    POP     EDI             ;  address of the returned structure
  8694.    POP     ESI             ;  in EAX
  8695.    LEAVE
  8696.    RET
  8697. main   ENDP
  8698.  
  8699.  
  8700. ΓòÉΓòÉΓòÉ 12.5. __stdcall Calling Convention ΓòÉΓòÉΓòÉ
  8701.  
  8702. The language details of these calling conventions are the same as for all other 
  8703. calling conventions. __stdcall has the additional restriction that an 
  8704. unprototyped __stdcall function with a variable number of arguments will not 
  8705. work. 
  8706.  
  8707. To use this linkage convention, use the __stdcall keyword in the declaration of 
  8708. the function.  You can make __stdcall the default linkage by specifying the /Mt 
  8709. option when you invoke the linker.  There is no #pragma linkage for this 
  8710. convention. 
  8711.  
  8712. The following rules apply to the __stdcall calling convention: 
  8713.  
  8714.      All parameters are passed on the stack. 
  8715.  
  8716.      The parameters are pushed onto the stack in a lexical right-to-left 
  8717.       order. 
  8718.  
  8719.      The called function removes the parameters from the stack. 
  8720.  
  8721.      Floating point values are returned in ST(0) All functions returning 
  8722.       non-floating point values return them in EAX, except for the special case 
  8723.       of returning aggregates less than or equal to four bytes in size. For 
  8724.       functions that return aggregates less than or equal to four bytes in 
  8725.       size, the values are returned as follows: 
  8726.  
  8727.       Size of Aggregate      Value Returned in 
  8728.       4 bytes                EAX 
  8729.       3 bytes                EAX 
  8730.       2 bytes                AX 
  8731.       1 byte                 AL 
  8732.  
  8733.       For functions that return aggregates greater than four bytes in size, the 
  8734.       address to place the return values is passed as a hidden parameter, and 
  8735.       the addresss is passed back in EAX. 
  8736.  
  8737.      Note that prototyped variable argument functions with __stdcall linkage 
  8738.       are silently converted by the compiler to __cdecl linkage. Unprototyped 
  8739.       functions may be given __stdcall linkage. 
  8740.  
  8741.      Function names are decorated with an underscore prefix, and a suffix 
  8742.       which consists of an at (@), followed by the number of bytes of 
  8743.       parameters (in decimal). Parameters of less than four bytes are rounded 
  8744.       up to four bytes. Structure sizes are also rounded up to a multiple of 
  8745.       four bytes. For example, a function fred prototyped as follows: 
  8746.  
  8747.               int fred(int, int, short);
  8748.       would appear as: 
  8749.  
  8750.               _fred@12
  8751.       in the object module. 
  8752.  
  8753.  Note:  When building export or import lists in DEF files, the decorated 
  8754.  version of the name should be used.  This is automatically handled when using 
  8755.  #pragma export and #pragma import. 
  8756.  
  8757.  
  8758. ΓòÉΓòÉΓòÉ 12.6. __cdecl Calling Convention ΓòÉΓòÉΓòÉ
  8759.  
  8760. The __cdecl linkage is very similar to the OS/2 _system linkage convention. All 
  8761. general purpose registers are preserved except for EAX, ECX, and EDX. Note 
  8762. that, unlike the OS/2 system linkage, the number of dwords of parameters is not 
  8763. passed in AL. The parmdwords builtin function does not apply to __cdecl. 
  8764.  
  8765. To use this linkage convention, use the __cdecl keyword in the declaration of 
  8766. the function.  You can make __cdecl the default linkage by specifying the /Mc 
  8767. option when you invoke the linker.  There is no #pragma linkage for this 
  8768. convention. 
  8769.  
  8770. The following rules apply to the __cdecl calling convention: 
  8771.  
  8772.      All parameters are passed on the stack. 
  8773.  
  8774.      The parameters are pushed onto the stack in a lexical right-to-left 
  8775.       order. 
  8776.  
  8777.      The calling function removes the parameters from the stack. 
  8778.  
  8779.      Floating point values are returned in ST(0). All functions returning 
  8780.       non-floating point values return them in EAX, except for the special case 
  8781.       of returning aggregates less than or equal to four bytes in size. For 
  8782.       functions that return aggregates less than or equal to four bytes in 
  8783.       size, the values are returned as follows: 
  8784.  
  8785.       Size of Aggregate      Value Returned in 
  8786.       4 bytes                EAX 
  8787.       3 bytes                EAX 
  8788.       2 bytes                AX 
  8789.       1 byte                 AL 
  8790.  
  8791.       For functions that return aggregates greater than four bytes in size, the 
  8792.       address to place the return values is passed as a hidden paramter, and 
  8793.       the addresss is passed back in EAX. 
  8794.  
  8795.      Function names are decorated with an underscore prefix when they appear 
  8796.       in object modules. For example, a function named fred in the source 
  8797.       program will appear as _fred in the object. 
  8798.  
  8799.  Note:  When building export or import lists in DEF files, the decorated 
  8800.  version of the name should be used.  This is automatically handled when using 
  8801.  #pragma export and #pragma import. 
  8802.  
  8803.  
  8804. ΓòÉΓòÉΓòÉ 13. Developing Virtual Device Drivers ΓòÉΓòÉΓòÉ
  8805.  
  8806. The VisualAge C++ compiler provides a number of features specifically for 
  8807. virtual device driver development. This chapter describes those features and 
  8808. discusses the issues you should be aware of when developing virtual device 
  8809. drivers. Note that support for developing virtual device drivers is available 
  8810. for C programs only. 
  8811.  
  8812. Virtual device drivers (VDDs) provide virtual hardware support for DOS and DOS 
  8813. applications.  They emulate input/output port and device memory operations.  To 
  8814. achieve a certain level of hardware independence, a virtual device driver 
  8815. usually communicates with a physical device driver to interact with hardware. 
  8816. For example, the OS/2 operating system provides both virtual and physical 
  8817. device drivers for the mouse and keyboard. 
  8818.  
  8819. User-supplied virtual device drivers simulate the hardware interfaces of an 
  8820. option adapter or device, and are usually used to migrate existing DOS 
  8821. applications into the OS/2 DOS environment. 
  8822.  
  8823. A virtual device driver is essentially a DLL.  It is responsible for presenting 
  8824. a virtual copy of the hardware resource to the DOS session and for coordinating 
  8825. physical access to that resource. 
  8826.  
  8827. You may need to create a virtual device driver if multiple sessions must share 
  8828. access to a device where the input and output is not based on file handles, or 
  8829. if the particular device requires that interrupts be serviced within a short 
  8830. period of time. 
  8831.  
  8832.  
  8833. ΓòÉΓòÉΓòÉ 13.1. Creating Code to Run at Ring Zero ΓòÉΓòÉΓòÉ
  8834.  
  8835. Most object code runs at ring 3.  However, some object code, such as that for 
  8836. virtual device drivers and operating systems, must run at ring 0.  To generate 
  8837. code to run at ring 0, use the /Gr+ option. Note that to use /Gr+, you must 
  8838. also specify the /Rn option and use the subsystem libraries. 
  8839.  
  8840. When you use the /Gr+ option, the compiler keeps track of which storage 
  8841. references are to the stack segment and which references are to the data 
  8842. segment, and ensures that the generated code is correct for these operations. 
  8843. This tracking is necessary because at ring 0, the stack segment and data 
  8844. segment may not be the same. (At ring 3, they are the same.) 
  8845.  
  8846. In some cases, the compiler cannot tell whether the reference is to the stack 
  8847. or data segment. Usually the reason is that the control flow of the program 
  8848. allows for either possibility, depending on which path through the program is 
  8849. taken at run time. For this reason, when you take the address of a stack-based 
  8850. variable (such as a local variable or parameter), you cannot safely pass the 
  8851. address to another function. In addition, you cannot safely store a stack 
  8852. address and a static or external address in the same variable, and subsequently 
  8853. de-reference the pointer created by the operation. 
  8854.  
  8855. Whenever you take the address of a stack-based variable, the compiler generates 
  8856. a warning message that the address might be used in an unsafe way. This message 
  8857. is not generated if you specify /Gr-. 
  8858.  
  8859. If your VDD contains any functions that are called from 16-bit physical device 
  8860. drivers, you must compile them with the /Gv+ option to ensure the DS and ES 
  8861. registers are handled correctly.  These two registers contain the selector for 
  8862. a 16-bit data segment. Using /Gv+ ensures that DS and ES are saved on entry to 
  8863. an external function, set to the selector for DGROUP, and then restored on exit 
  8864. from the function. 
  8865.  
  8866. Note:  When you use /Gv+, if you also use the intermediate code linker (with 
  8867. the /Fw+ or /Ol+ option), only use the /Gu+ option if the functions affected by 
  8868. /Gv+ are explicitly exported.  If they are not exported, do not use the /Gu+ 
  8869. option.  Because of this restriction, using the intermediate code linker for 
  8870. this type of program may not greatly improve the optimization of your code. 
  8871.  
  8872.  
  8873. ΓòÉΓòÉΓòÉ 13.2. Using Virtual Device Driver Calling Conventions ΓòÉΓòÉΓòÉ
  8874.  
  8875. If you are building a VDD in C, you must use 32-bit _Pascal or _Far32 _Pascal 
  8876. calling conventions to call the Virtual Driver Help interfaces or communicate 
  8877. with physical device drivers. These calling conventions are not supported for 
  8878. C++ programs. Within a VDD, you can use the _Optlink convention in most cases. 
  8879. Private interfaces between physical and virtual device drivers can use any 
  8880. calling convention provided both device drivers support it. 
  8881.  
  8882. The _Far32 _Pascal calling convention is only available for code running at 
  8883. ring 0. It allows you to make calls between code segments with different 
  8884. selectors. It also allows your VDDs to communicate with physical device 
  8885. drivers. 
  8886.  
  8887. You can specify the calling convention using either the _Pascal and _Far32 
  8888. _Pascal keywords. The description of the implementation of the _Pascal calling 
  8889. conventions is in _Pascal and _Far32_Pascal Calling Conventions. 
  8890.  
  8891.  
  8892. ΓòÉΓòÉΓòÉ 13.3. Using _Far32 _Pascal Function Pointers ΓòÉΓòÉΓòÉ
  8893.  
  8894. VisualAge C++ compiler provides special 48-bit function pointers so you can 
  8895. make indirect calls to 32-bit functions that use the _Far32 _Pascal convention. 
  8896. The _Far32 _Pascal pointers are required to build VDDs and similar applications 
  8897. that run at ring 0. For example, you would use 48-bit pointers to allow your 
  8898. VDD to communicate with physical device drivers. 
  8899.  
  8900. The _Far32 _Pascal pointers, like the _Far32 _Pascal calling convention, are 
  8901. only supported when the /Gr+ option is specified. 
  8902.  
  8903. The 48-bit pointer consists of 2 fields: 
  8904.  
  8905.    1. A 16-bit selector value which identifies the code segment. 
  8906.    2. A 32-bit offset value which identifies the function's location in the 
  8907.       segment. 
  8908.  
  8909.  To declare a 48-bit pointer, use the _Far32 and _Pascal keywords in the 
  8910.  pointer declaration.  For example: 
  8911.  
  8912.      void (* _Far32 _Pascal foo)(int);
  8913.  declares foo to be a 48-bit pointer to a function with the _Far32 _Pascal 
  8914.  convention that takes an integer argument and does not return a value. 
  8915.  
  8916.  The only operations that can be performed on or with a _Far32 _Pascal pointer 
  8917.  are: 
  8918.  
  8919.      Calling the function. 
  8920.      Assigning the pointer, which includes casting it to a 32-bit function 
  8921.       pointer or to an integer or unsigned type. 
  8922.      Initializing the pointer, either statically or at runtime, with the 
  8923.       address of a _Far32 _Pascal or 32-bit function, or with an integer or 
  8924.       unsigned value. 
  8925.      Comparing two pointers for equality or inequality. Like all function 
  8926.       pointers, 48-bit pointers cannot be compared using relational operators. 
  8927.      Passing the pointer as a parameter or returning it from a function. 
  8928.       48-bit pointers are passed in the same way as aggregates.  The offset 
  8929.       portion is returned in EAX and the selector portion in DX. 
  8930.  
  8931.  If you assign an integer or unsigned value to a 48-bit pointer, the selector 
  8932.  field of the pointer is set to the default CODE32 segment, and the offset 
  8933.  field is initialized to the integer value being assigned.  This type of 
  8934.  assignment is not generally useful, because you cannot know where a function 
  8935.  will reside in a code segment, and because if your code segment is CODE32, a 
  8936.  32-bit function pointer is sufficient. 
  8937.  
  8938.  Note:  _Far32 _Pascal pointers cannot be directly converted to _Far16 
  8939.  pointers. 
  8940.  
  8941.  
  8942. ΓòÉΓòÉΓòÉ 13.4. Creating a Module Definition File ΓòÉΓòÉΓòÉ
  8943.  
  8944. When you link your VDD, you must use a module definition (.DEF) file. The first 
  8945. statement in the file must be 
  8946.  
  8947.    VIRTUAL DEVICE device_name
  8948. where device_name specifies the name of the VDD.  The file cannot contain a 
  8949. NAME statement. 
  8950.  
  8951. Once you have created your device driver, you must place a DEVICE statement in 
  8952. your CONFIG.SYS file to ensure it is treated as a device by the operating 
  8953. system. 
  8954.  
  8955. For more details on .DEF file statements, see the User's Guide. For additional 
  8956. information on writing and building device drivers, see the online Control 
  8957. Program Reference. 
  8958.  
  8959.  
  8960.  
  8961. ΓòÉΓòÉΓòÉ 14. Calling between 32-Bit and 16-Bit Code ΓòÉΓòÉΓòÉ
  8962.  
  8963. If you have applications that depend on APIs that are only available as 16-bit 
  8964. code, or if you have developed or purchased libraries of routines that are 
  8965. currently 16-bit code, VisualAge C++ helps you protect that investment of time 
  8966. and money.  Programmers can continue using their existing 16-bit source code 
  8967. and any 16-bit libraries on which their applications depend. 
  8968.  
  8969. This chapter discusses how to: 
  8970.  
  8971.      Linking 32-bit and 16-bit Code 
  8972.  
  8973.      Calling 16-bit Code 
  8974.  
  8975.      Calling Back to 32-bit Code from 16-bit Code 
  8976.  
  8977.      Passing Data between 16-bit and 32-bit Code 
  8978.  
  8979.      Sharing Data between 32-bit and 16-bit Code 
  8980.  
  8981.  The conventions and methods described apply for both C and C++ programs. 
  8982.  
  8983.  Note:  The VisualAge C++ compiler produces 32-bit code only. It does not 
  8984.  produce 16-bit code. 
  8985.  
  8986.  
  8987. ΓòÉΓòÉΓòÉ 14.1. Linking 32-bit and 16-bit Code ΓòÉΓòÉΓòÉ
  8988.  
  8989. You can statically link between 32-bit and 16-bit code with the following 
  8990. restrictions: 
  8991.  
  8992.      The main function must be 32-bit code. 
  8993.      You cannot make any calls to 16-bit library functions in the 16-bit code. 
  8994.      You must compile the 16-bit code with the /ND option (with a 16-bit 
  8995.       compiler). 
  8996.  
  8997.  These restrictions do not apply when you dynamically link 32-bit code to 
  8998.  16-bit DLLs. 
  8999.  
  9000.  
  9001. ΓòÉΓòÉΓòÉ 14.2. Calling 16-bit Code ΓòÉΓòÉΓòÉ
  9002.  
  9003. There are three 16-bit calling conventions supported by VisualAge C++ compiler: 
  9004. _Far16_Cdecl, _Far16 _Fastcall, and _Far16 _Pascal. 
  9005.  
  9006. The _Far16_Cdecl and _Far16 _Pascal conventions are equivalent to the cdecl and 
  9007. pascal conventions used in other compilers. The _Far16 _Fastcall convention is 
  9008. equivalent to the Microsoft C Version 6.0 fastcall convention. 
  9009.  
  9010. You can specify the calling convention for a function using keywords. For 
  9011. example, the following fragment uses keywords to declare the function dave as a 
  9012. 16-bit function using the _Far16 _Pascal calling convention: 
  9013.  
  9014.    void _Far16 _Pascal dave(short, long);
  9015.  
  9016.  
  9017. ΓòÉΓòÉΓòÉ 14.2.1. Similarities between the 16-Bit Conventions ΓòÉΓòÉΓòÉ
  9018.  
  9019. The general rules for all three 16-bit calling conventions are: 
  9020.  
  9021.      Types char, unsigned char, short, and unsigned short occupy a word on the 
  9022.       stack. 
  9023.  
  9024.      Types long and unsigned long occupy a doubleword with the value's 
  9025.       high-order word pushed first. 
  9026.  
  9027.      Types float, double, and long double are passed directly on the 80386 
  9028.       stack as 32-, 64-, and 80-bit values respectively. 
  9029.  
  9030.      char types are sign-extended when expanded to word or doubleword size; 
  9031.       unsigned char types are zero-extended on the stack. 
  9032.  
  9033.      Far pointers are 32 bits and are pushed such that the segment value is 
  9034.       pushed first and the offset second. 
  9035.  
  9036.      If the argument is a structure, the last word is pushed first and each 
  9037.       successive word is pushed until the first word. 
  9038.  
  9039.      All arrays are passed by reference. 
  9040.  
  9041.      BP, SI, and DI registers must be preserved across the call. 
  9042.  
  9043.      Segment registers must be preserved across the call. 
  9044.  
  9045.      Structures passed on the stack are rounded up in size to the next word 
  9046.       boundary. 
  9047.  
  9048.      The direction flag must be clear on entry and exit. 
  9049.  
  9050.      Return values are passed back to the caller as follows: 
  9051.  
  9052.         -  Types char, unsigned char, short, and unsigned short are returned in 
  9053.            AX. 
  9054.         -  Types long and unsigned long are returned such that the high word is 
  9055.            in DX and the low word is in AX. 
  9056.         -  Far pointers are returned such that the offset is in AX and the 
  9057.            selector is in DX. 
  9058.  
  9059.  
  9060. ΓòÉΓòÉΓòÉ 14.2.2. Differences between the 16-Bit Conventions ΓòÉΓòÉΓòÉ
  9061.  
  9062.      The order in which parameters are pushed on stack and their cleanup. 
  9063.  
  9064.       When you use the _Far16_Cdecl calling convention, the parameters are 
  9065.       pushed on the stack in a right-to-left order.  The caller cleans up the 
  9066.       parameters on the stack. This is the opposite of the _Far16 _Pascal and 
  9067.       _Far16 _Fastcall conventions. When you use the _Far16 _Pascal convention, 
  9068.       the parameters are pushed on the stack from left to right, and the callee 
  9069.       (the function being called) cleans up the stack (usually by using a RET 
  9070.       nn where nn is the number of bytes in the parameter list). 
  9071.  
  9072.      The number of registers which can take parameters. 
  9073.  
  9074.       The _Far16 _Fastcall convention differs from _Far16_Cdecl and _Far16 
  9075.       _Pascal in that it uses three registers that can take parameters, similar 
  9076.       to _Optlink. When you use _Far16 _Fastcall, registers are assigned to 
  9077.       variable types as follows: 
  9078.  
  9079.         -  Types char and unsigned char are stored in AL, DL, and BL. 
  9080.         -  Types short and unsigned short are stored in AX, DX, and BX. 
  9081.         -  Types long and unsigned long are stored such that the high word is 
  9082.            in DX and the low word is in AX. 
  9083.         -  All other types are passed on the stack. 
  9084.  
  9085.       Arguments are stored in the first available register allocated for their 
  9086.       type.  If all registers for that type are filled, the argument is pushed 
  9087.       on the 80386 stack from left to right. 
  9088.  
  9089.      The method of returning structures, unions, and floating point types. 
  9090.  
  9091.       For _Far16_Cdecl and _Far16 _Pascal, all three types are returned with 
  9092.       the address returned like a far pointer; that is, the value is in 
  9093.       storage.  The _Far16 _Pascal convention passes a hidden parameter, while 
  9094.       _Far16_Cdecl has a static area.  This means that the _Far16_Cdecl 
  9095.       convention is nonreentrant, and should not be used in multithread 
  9096.       programs. See Return Values from 16-Bit Calls for more details on how 
  9097.       values are returned from 16-bit calls. 
  9098.  
  9099.       When you use the _Far16 _Fastcall convention, structures and unions are 
  9100.       returned with the address returned like a near pointer. Like _Far16 
  9101.       _Pascal, _Far16 _Fastcall passes the address as a hidden parameter. 
  9102.       Floating-point types are returned in ST(0). 
  9103.  
  9104.  
  9105. ΓòÉΓòÉΓòÉ 14.2.3. Specifying Stack Size ΓòÉΓòÉΓòÉ
  9106.  
  9107. You can specify the stack size for 16-bit code using the #pragma stack16 
  9108. directive. For example, the following directive sets the stack size to 8192 
  9109. bytes (8K): 
  9110.  
  9111.    #pragma stack16(8192)
  9112. The default stack size is 4096 bytes (4K). This size is used for all 16-bit 
  9113. functions called after the pragma directive until the end of the compilation 
  9114. unit, or until another #pragma stack16 is encountered. The 16-bit stack is 
  9115. allocated from the 32-bit stack, so you must ensure that the 32-bit stack is 
  9116. large enough for both your 32-bit and 16-bit code. 
  9117.  
  9118. For more information on #pragma stack16 and the linkage keywords, see the 
  9119. online Language Reference. 
  9120.  
  9121.  
  9122. ΓòÉΓòÉΓòÉ 14.2.4. Compiler Option for 16-Bit Declarations ΓòÉΓòÉΓòÉ
  9123.  
  9124. The VisualAge C++ compiler also provides the /Gt compiler option to enable data 
  9125. to be shared between 32-bit and 16-bit code. When you compile a program with 
  9126. /Gt+, an implicit #pragma seg16 directive is performed for all variable 
  9127. declarations. Pointers are not implicitly qualified with _Seg16; you must 
  9128. qualify them if desired. 
  9129.  
  9130. The /Gt+ option also defines special versions of the malloc family of functions 
  9131. that return memory that can be safely used by 16-bit code. When /Gt+ is 
  9132. specified, all calls to calloc, malloc, realloc, and free are mapped to 
  9133. _tcalloc, _tmalloc, _trealloc, and _tfree respectively. 
  9134.  
  9135. These functions work exactly like the original functions, but the memory 
  9136. allocated or freed will not cross 64K boundaries.  The objects declared can be 
  9137. used in 16-bit programs. This memory is also called tiled memory and is limited 
  9138. to 512M per process. 
  9139.  
  9140. Note:  When you use the /Gt+ option, data items larger than 64K in size will be 
  9141. aligned on 64K boundaries, but will also cross 64K boundaries. 
  9142.  
  9143.  
  9144. ΓòÉΓòÉΓòÉ 14.2.5. Restrictions on 16-Bit Calls and Callbacks ΓòÉΓòÉΓòÉ
  9145.  
  9146.      The compiler ensures that no parameters or automatic variables of a 
  9147.       function calling 16-bit code cross a 64K boundary. Any parameters or 
  9148.       automatic variables of functions that do not call 16-bit code may cross 
  9149.       64K boundaries. Passing the address of the parameters or automatic 
  9150.       variables to functions that pass them on to 16-bit code will result in an 
  9151.       unreliable program. 
  9152.  
  9153.       To solve this problem, copy the value passed into an automatic variable 
  9154.       in the function that calls the 16-bit code.  This automatic variable will 
  9155.       not cross a 64K boundary. 
  9156.  
  9157.      Memory returned by _alloca will not be tiled.  If a function contains a 
  9158.       call to _alloca, it should not also call 16-bit code, because parameters 
  9159.       and automatic variables may then cross 64K boundaries. 
  9160.  
  9161.      A 16-bit program cannot pass structures by value to a 32-bit callback 
  9162.       function.  The callback function cannot return structures by value to the 
  9163.       16-bit program that called it. 
  9164.  
  9165.      The parameter area of the callback function cannot be larger than 120 
  9166.       bytes. 
  9167.  
  9168.      Callback functions that take a variable number of arguments are not 
  9169.       supported. 
  9170.  
  9171.      Calling 16-bit code that takes a variable number of arguments is not 
  9172.       supported. 
  9173.  
  9174.  
  9175. ΓòÉΓòÉΓòÉ 14.2.6. Example of Calling a 16-Bit Program ΓòÉΓòÉΓòÉ
  9176.  
  9177. The sample program SAMPLE04 shows how to call 16-bit code from a 32-bit 
  9178. program, and also how to call back to a 32-bit function from a 16-bit routine. 
  9179. The 16-bit code is placed in two DLLs, one of which is bound to the 32-bit 
  9180. program at load time by using IMPLIB to build an import library.  The other is 
  9181. bound at run time using OS/2 APIs. When the program is run, it prints a stanza 
  9182. from a poem. 
  9183.  
  9184. Although the source for the 16-bit routines is included in SAMPLE04 for 
  9185. demonstration purposes, the mechanisms used to call the routines can also be 
  9186. applied when the 16-bit source is not available. 
  9187.  
  9188. Important  To compile, link, and run this example, you must have the IBM C/2 or 
  9189. Microsoft C Version 6.0 16-bit compiler installed, and its main directory must 
  9190. be included in the PATH statement of your CONFIG.SYS file. 
  9191.  
  9192. The files for the sample program are: 
  9193.  
  9194.  SAMPLE04.C    The source file for the 32-bit program 
  9195.  
  9196.  SAMPLE04.H    The user include file 
  9197.  
  9198.  SAMPLE04.DEF  The module definition file for the 32-bit program 
  9199.  
  9200.  SAMP04A.C     The source file for the first 16-bit DLL (bound at load time) 
  9201.  
  9202.  SAMP04A.DEF   The module definition file for the first 16-bit DLL. 
  9203.  
  9204.  SAMP04B.C     The source file for the second 16-bit DLL (bound at run time) 
  9205.  
  9206.  SAMP04B.DEF   The module definition file for the second 16-bit DLL. 
  9207.  
  9208.  The 32-bit main program (SAMPLE04.C): 
  9209.  
  9210.      Makes direct calls to the 16-bit functions plugh1 and plugh2, which are 
  9211.       both defined in the 16-bit DLL bound at load time (the source for which 
  9212.       is SAMP04A.C). 
  9213.  
  9214.      Demonstrates a callback function.  The 32-bit user function xyzzy is 
  9215.       passed to the 16-bit plugh3 routine (defined in SAMP04A.C) with the 
  9216.       intent that the 16-bit routine will then call the user function.  The 
  9217.       xyzzy function is declared using a 16-bit calling convention and is 
  9218.       called from the 16-bit DLL, but it is run as a 32-bit function. 
  9219.  
  9220.      Uses OS/2 APIs to load the runtime DLL (the source for which is 
  9221.       SAMP04B.C) and query the address of the function plugh4.  The program 
  9222.       then calls plugh4 using the function pointer returned by the API. 
  9223.  
  9224.  If you installed the Sample programs, you will find the SAMPLE04 project in 
  9225.  the VisualAge C++ Samples folder. For information on how to build and debug a 
  9226.  project, see the User's Guide. 
  9227.  
  9228.  Alternatively, if you wish to compile, link, and run the sample from the 
  9229.  command line, you will find a readme file with instructions. in the 
  9230.  \IBMCPP\SAMPLES\COMPILER\SAMPLE04 directory along with the files needed which 
  9231.  include two makefiles that build the sample. One makefile for static linking 
  9232.  and one for dynamic linking. 
  9233.  
  9234.  
  9235. ΓòÉΓòÉΓòÉ 14.2.7. Return Values from 16-Bit Calls ΓòÉΓòÉΓòÉ
  9236.  
  9237. The following examples demonstrate how the VisualAge C++ compiler expects 
  9238. values to be returned from calls to 16-bit programs. 
  9239.  
  9240. Note:  This is the same way that the IBM C/2 and Microsoft C Version 6.0 
  9241. compilers return values. 
  9242.  
  9243.      char cdecl myfunc(double,float,struct x); 
  9244.       char pascal myfunc(double,float,struct x); 
  9245.       char fastcall myfunc(double,float,struct x); 
  9246.  
  9247.       unsigned char cdecl myfunc(double,float,struct x); 
  9248.       unsigned char pascal myfunc(double,float,struct x); 
  9249.       unsigned char fastcall myfunc(double,float,struct x); 
  9250.  
  9251.       The returned value is placed in AL. 
  9252.  
  9253.      short cdecl myfunc(double,float,struct x); 
  9254.       short pascal myfunc(double,float,struct x); 
  9255.       short fastcall myfunc(double,float,struct x); 
  9256.  
  9257.       The returned value is placed in AX. 
  9258.  
  9259.      long cdecl myfunc(double,float,struct x); 
  9260.       long pascal myfunc(double,float,struct x); 
  9261.       long fastcall myfunc(double,float,struct x); 
  9262.  
  9263.       The high word is in DX, and the low word is in AX. 
  9264.  
  9265.      float cdecl myfunc(double, float, struct x); 
  9266.       double cdecl myfunc(double, float, struct x); 
  9267.       long double cdecl myfunc(double, float, struct x); 
  9268.  
  9269.       The compiler does not provide a hidden parameter, but rather places the 
  9270.       return value in an external static variable __fac, which is defined as a 
  9271.       QWORD. On return, DX contains the selector and AX contains the offset of 
  9272.       __fac. 
  9273.  
  9274.       For functions with type long double cdecl, the returned value is placed 
  9275.       in ST(0). 
  9276.  
  9277.      float pascal myfunc(double,float,struct x); 
  9278.       double pascal myfunc(double,float,struct x); 
  9279.       long double pascal myfunc(double,float,struct x); 
  9280.  
  9281.       The compiler reserves space in automatic storage for the return value and 
  9282.       pushes (last) a pointer to this area (offset only, SS is always assumed). 
  9283.       The callee stores the return value in this area and returns the offset of 
  9284.       this area in AX and returns SS in DX. 
  9285.  
  9286.      float fastcall myfunc(double,float,struct x); 
  9287.       double fastcall myfunc(double,float,struct x); 
  9288.       long double fastcall myfunc(double,float,struct x); 
  9289.  
  9290.       The returned value is placed in ST(0). 
  9291.  
  9292.      char far * cdecl myfunc(double,float,struct x); 
  9293.       char far * pascal myfunc(double,float,struct x) 
  9294.       char far * fastcall myfunc(double,float,struct x) 
  9295.  
  9296.       Far pointers are returned such that the offset is in AX and the selector 
  9297.       is in DX. 
  9298.  
  9299.      struct_20_bytes cdecl myfunc(double,float,struct x) 
  9300.  
  9301.       The compiler reserves sizeof(struct_20_bytes) in uninitialized static 
  9302.       (BSS) for the callee.  No hidden parameter is passed; the callee moves 
  9303.       the return structure into this static reserved area and returns the 
  9304.       offset of the structure in AX and the selector in DX. 
  9305.  
  9306.      struct_20_bytes pascal myfunc(double,float,struct x) 
  9307.       struct_20_bytes fastcall myfunc(double,float,struct x) 
  9308.  
  9309.       The compiler reserves space for the return value in the caller's 
  9310.       automatic storage and pushes the address of this area as a near pointer. 
  9311.       SS will be assumed as the selector. This parameter is pushed last as a 
  9312.       hidden parameter.  The offset of the reserved space is returned in AX, 
  9313.       and the selector (SS) is returned in DX. 
  9314.  
  9315.      struct_4_bytes cdecl myfunc(double,float,struct x) 
  9316.       struct_4_bytes fastcall myfunc(double,float,struct x) 
  9317.  
  9318.       The compiler returns the contents of the structure in AX and DX.  AX 
  9319.       contains the lower 2 bytes, and DX the higher 2 bytes. 
  9320.  
  9321.         -  If the structure is packed and its size is 1 byte, AL is used. 
  9322.         -  If the structure's size is 2 bytes, AX is used. 
  9323.         -  If the structure is packed and its size is 3 bytes, space is 
  9324.            reserved in the data segment, the offset is returned in AX, and the 
  9325.            selector is returned in DX. 
  9326.  
  9327.      struct_4_bytes pascal myfunc(double,float,struct x) 
  9328.  
  9329.       The compiler reserves space for the return value in the caller's 
  9330.       automatic storage and pushes the address of this area as a near pointer. 
  9331.       SS will be assumed as the selector.  This parameter is pushed last as a 
  9332.       hidden parameter.  The offset of the reserved space is returned in AX, 
  9333.       and the selector (SS) is returned in DX. 
  9334.  
  9335.      char cdecl myfunc(double,float,struct x) 
  9336.       char pascal myfunc(double,float,struct x) 
  9337.       char fastcall myfunc(double,float,struct x) 
  9338.  
  9339.       unsigned char cdecl myfunc(double,float,struct x) 
  9340.       unsigned char pascal myfunc(double,float,struct x) 
  9341.       unsigned char fastcall myfunc(double,float,struct x) 
  9342.  
  9343.       The returned value is placed in AL. 
  9344.  
  9345.  
  9346. ΓòÉΓòÉΓòÉ 14.3. Calling Back to 32-bit Code from 16-bit Code ΓòÉΓòÉΓòÉ
  9347.  
  9348. Some 16-bit applications require that calling applications register callback 
  9349. functions.  For example, IBM Communications Manager requires callback functions 
  9350. to handle some events. When you call these 16-bit applications from 32-bit 
  9351. code, you can pass a pointer to a 32-bit function that will act as the callback 
  9352. function. 
  9353.  
  9354. The 32-bit callback function must use the _Far16_Cdecl or _Far16 _Pascal 
  9355. calling convention. The _Far16 _Fastcall convention is not supported for 
  9356. callback functions. All pointer parameters must be qualified with the _Seg16 
  9357. type qualifier. 
  9358.  
  9359. The VisualAge C++ compiler performs all necessary changes from the 16-bit to 
  9360. the 32-bit environment on entry to the callback function, and from 32-bit to 
  9361. 16-bit on exit. 
  9362.  
  9363.  
  9364. ΓòÉΓòÉΓòÉ 14.4. Passing Data between 16-bit and 32-bit Code ΓòÉΓòÉΓòÉ
  9365.  
  9366. If a structure will be referenced in both 32-bit and 16-bit code and contains 
  9367. bit-fields or members of type int or enum, you may have to rewrite the 
  9368. structure to ensure that all members align properly. 
  9369.  
  9370.  int       To ensure all integers map the same way, change your integer 
  9371.            declarations to use short for 2-byte integers and long for 4-byte 
  9372.            integers. 
  9373.  
  9374.  long double To use your IBM C/2 long double under VisualAge C++ you must 
  9375.            declare it as double. 
  9376.  
  9377.            If you wish to use Microsoft C Version 6.0 long double data under 
  9378.            VisualAge C++, you must recompile it on the Microsoft C Version 6.0 
  9379.            compiler as double first, and place into into a struct to pad out to 
  9380.            128 bits.  Although, VisualAge C++ and Microsoft C Version 6.0 both 
  9381.            store long double as 80 bit real, VisualAge C++ stores it in a 16 
  9382.            byte (128 bit) field. 
  9383.  
  9384.  enum      Use the /Su2 option to force enum variables to be 2 bytes in size. 
  9385.            This will make them compatible with 16-bit code. 
  9386.  
  9387.            The size of type enum differs between compilers. For example, the 
  9388.            IBM C/2 makes all enum types 2 bytes, while the VisualAge C++ 
  9389.            compiler defines the size as 1, 2, or 4 bytes, depending on the 
  9390.            range of values the enumeration contains. 
  9391.  
  9392.            You can use the /Su option to force the VisualAge C++ compiler to 
  9393.            make the enum type 1,2, or 4 bytes, or to use the SAA rules that 
  9394.            make all enum types the size of the smallest integral type that can 
  9395.            contain all variables. 
  9396.  
  9397.  bit fields VisualAge C++ and 16-bit compilers use entirely different 
  9398.            algorithms for packing bit fields. In general, if the bit fields are 
  9399.            packed "tightly", they will be compatible. "Tightly" means that 
  9400.            there is no padding introduced by the compiler. IBM C/2 and 
  9401.            Microsoft C Version 6.0 use the type specifier for the bit field 
  9402.            member to determine the size of the bit field area. VisualAge C++ 
  9403.            allocates the minimum number of bytes possible. 
  9404.  
  9405.                          struct s1 {            /* Compatible */    1
  9406.                            int a : 4;
  9407.                            int b : 7;
  9408.                            int c : 5;
  9409.                          };
  9410.  
  9411.                          struct s2 {            /* Not compatible */ 2
  9412.                            int z : 9;
  9413.                            int y : 12;
  9414.                          };
  9415.  
  9416.            1 Because the type of the bit field members is int, Microsoft C 
  9417.            Version 6.0 will allocate 16 bits' (sizeof(int)) of space in the 
  9418.            struct to store the bit field. 
  9419.  
  9420.            There are 16 bits of bit fields declared in the declaration of s1, 
  9421.            so the bit fields are packed tightly. 
  9422.  
  9423.            VisualAge C++ allocates precisely 2 bytes for the bit field., 
  9424.            Microsoft C Version 6.0 and VisualAge C++ lay out the bit field in 
  9425.            precisely the same way.  Thus, they are compatible. 
  9426.  
  9427.            2 There is not enough room in the 16-bit int to store the first two 
  9428.            members of s2, so Microsoft C Version 6.0 introduces 7 bits of 
  9429.            padding to made the member z fill out an entire int. It introduces 
  9430.            an additional 4 bits of padding after y to fill up the last byte. 
  9431.            This bit field requires 4 bytes of storage using Microsoft C Version 
  9432.            6.0, but only 3 bytes using VisualAge C++.  Therefore, the padding 
  9433.            introduced by the compiler makes the bit fields incompatible. 
  9434.  
  9435.            Compilers utilizing 16-bit format align these types on 1 byte 
  9436.            boundaries. 
  9437.  
  9438.            VisualAge C++ aligns members of type int, long, float, double, long 
  9439.            double, and pointer on 4-byte boundaries. 
  9440.  
  9441.  structure layout Use /Sp1 or #pragma pack(1) on structures declarations that 
  9442.            will be passed to or from 16-bit code. 
  9443.  
  9444.  segmented pointers If the pointer is passed to the function as a member of an 
  9445.            aggregate or an array, you must qualify it with _Seg16. The _Seg16 
  9446.            keyword tells the compiler to store the pointer as a segmented 
  9447.            pointer and not as a flat pointers used in 32-bit code. By 
  9448.            segmented, we mean a 16-bit segment selector and a 16-bit offset. 
  9449.            The _Seg16 keyword is also required if you are using two or more 
  9450.            levels of indirection (for example, a pointer to a pointer). 
  9451.  
  9452.            If the pointer is passed directly as a parameter, the compiler 
  9453.            automatically converts it to a 16-bit pointer and the _Seg16 keyword 
  9454.            is not required. For example, the declaration 
  9455.  
  9456.                       void _Far16 _cdecl foo(char *);
  9457.            is equivalent to 
  9458.  
  9459.                       void _Far16 _cdecl foo(char * _Seg16);
  9460.  
  9461.            It is good programming style to explicitly declare pointer 
  9462.            parameters in 16-bit function prototypes as being _Seg16. 
  9463.  
  9464.            If your pointers are used primarily as parameters to 16-bit 
  9465.            functions and are not used extensively in your 32-bit code, it may 
  9466.            be advantageous to declare them with _Seg16. 
  9467.  
  9468.            Use the _Seg16 qualifier only when necessary.  Because of the 
  9469.            conversions that are performed whenever a _Seg16 pointer is used in 
  9470.            32-bit code, unnecessary use of segmented pointers can cause a 
  9471.            noticeable degradation in the performance of your application. 
  9472.  
  9473.  
  9474. ΓòÉΓòÉΓòÉ 14.5. Sharing Data between 32-bit and 16-bit Code ΓòÉΓòÉΓòÉ
  9475.  
  9476.  
  9477. ΓòÉΓòÉΓòÉ 14.5.1. Declaring Segmented Pointers ΓòÉΓòÉΓòÉ
  9478.  
  9479. Use the _Seg16 type qualifier to declare external pointers that will be shared 
  9480. between 32-bit and 16-bit code, that is, that are declared in both. 
  9481.  
  9482. For example: 
  9483.  
  9484.    char * _Seg16 p16;
  9485. directs the compiler to store the pointer as a segmented pointer (with a 16-bit 
  9486. selector and 16-bit offset) that can be used directly by a 16-bit application. 
  9487. The _Seg16 keyword comes after the asterisk in the declaration, as required by 
  9488. ANSI syntax rules. 
  9489.  
  9490. When a _Seg16 pointer is used in 32-bit code, the VisualAge C++ compiler 
  9491. automatically converts it to a flat 32-bit pointer when necessary. 
  9492.  
  9493.  
  9494.    char * _Seg16 p16;
  9495.    char * _Seg16 * _Seg16 pp16;
  9496.    char * p32;
  9497.  
  9498.    p32=p16;       1           /* Automatic conversion */
  9499.    *pp16=p32;     2           /*           Here, too  */
  9500.    p16++;         3    /* Two conversions happen here */
  9501.  
  9502. 1 p16 is converted from seg to flat before being stored in p32. 
  9503.  
  9504. 2 pp16 is converted to flat before being dereferenced, p32 is converted to seg 
  9505. before being stored in *pp16. 
  9506.  
  9507. 3 p16 is converted to flat, is incremented, and then converted back to seg 
  9508. before being stored back in p16. 
  9509.  
  9510. Note:  The _Seg16 keyword comes after the asterisk in the declaration, as 
  9511.        required by ANSI syntax rules. Programmers familiar with other compilers 
  9512.        may be accustomed to placing the far keyword in their declarations, but 
  9513.        to the left of the asterisk: 
  9514.  
  9515.                  char far * x;
  9516.        Because this syntax is contrary to ANSI binding rules, VisualAge C++ 
  9517.        product does not support it. 
  9518.  
  9519.  
  9520. ΓòÉΓòÉΓòÉ 14.5.2. Declaring Shared Objects ΓòÉΓòÉΓòÉ
  9521.  
  9522. Because a 16-bit program cannot access a data item that is larger than 64K in 
  9523. size or that spans a 64K boundary in memory, any data items that are to be 
  9524. shared between 16-bit and 32-bit programs must conform to these limits. Use the 
  9525. #pragma seg16 directive to ensure that shared data items do not cross 64K 
  9526. boundaries. In most cases, you need only use this #pragma directive with items 
  9527. that are likely to cross 64K boundaries, such as aggregates, doubles, and long 
  9528. doubles. 
  9529.  
  9530. You can use #pragma seg16 either with the data item directly or through a 
  9531. typedef. The following code fragment shows both ways of using #pragma seg16: 
  9532.  
  9533.    struct family {
  9534.      long          john;
  9535.      double        carolynn;
  9536.      char * _Seg16 geoff;
  9537.      long          colleen;
  9538.    };
  9539.  
  9540.    #pragma seg16( cat )
  9541.    struct family cat;           /* cat is qualified directly */
  9542.  
  9543.    typedef struct family tom;        1
  9544.    #pragma seg16( tom )              2
  9545.  
  9546.    tom  edna;        /* edna is qualified using a typedef */ 3
  9547.  
  9548. Note:  Using #pragma seg16 on variables of type struct family does not mean 
  9549. that pointers inside the structure will automatically be qualified with _Seg16. 
  9550. If you want the pointers to be qualified as such, you must declare them 
  9551. yourself. 
  9552.  
  9553. The #pragma seg16 directive can be used either before or after the variable or 
  9554. typedef name is declared. In the case of the typedef, however, the #pragma must 
  9555. be attached to the typedef name before that name is used in another 
  9556. declaration.  For example, in the preceding example, the lines marked 1 and 2 
  9557. can appear in any order, but both must appear before the line marked 3. 
  9558.  
  9559. Because data objects used in 16-bit programs must be smaller than 64K, the 
  9560. #pragma seg16 directive cannot be used on objects greater than 64K. 
  9561.  
  9562.  
  9563. ΓòÉΓòÉΓòÉ 15. Developing Subsystems ΓòÉΓòÉΓòÉ
  9564.  
  9565. A subsystem is a collection of code and/or data that can be shared across 
  9566. processes and that does not use the VisualAge C++ runtime environment. This 
  9567. chapter describes how to create a subsystem. 
  9568.  
  9569. A subsystem may have code and data segments that are shared by all processes, 
  9570. or it may have separate segments for each process. If the subsystem is a DLL, 
  9571. there is also an initialization routine associated with it. 
  9572.  
  9573. By default, VisualAge C++ compiler creates a runtime environment for you using 
  9574. C or C++ initializations, exception management, and termination. This 
  9575. environment allows runtime functions to perform input/output and other 
  9576. services. However, many applications require no runtime environment and must be 
  9577. written as subsystems. For example, you will want to turn off the runtime 
  9578. environment support to: 
  9579.  
  9580.      Develop Presentation Manager display or printer drivers 
  9581.  
  9582.      Develop virtual device drivers 
  9583.  
  9584.      Develop installable file system drivers 
  9585.  
  9586.      Create DLLs with global initialization/termination and a single automatic 
  9587.       data segment that is shared by all processes. The 
  9588.       initialization/termination function is called once when the DLL is first 
  9589.       loaded and once more when it is last freed. 
  9590.  
  9591.  
  9592. ΓòÉΓòÉΓòÉ 15.1. Creating a Subsystem ΓòÉΓòÉΓòÉ
  9593.  
  9594. To create a subsystem, you must first create one or more source files as you 
  9595. would for any other program. Subsystems can be written in C or C++. No special 
  9596. file extension is required. 
  9597.  
  9598. When you do not use the runtime environment, you must provide your own 
  9599. initialization functions, multithread support, exception handling, and 
  9600. termination functions. You can use OS/2 APIs.  For more information on the OS/2 
  9601. APIs, see the Control Program Guide and Reference and the PM Guide and 
  9602. Reference. 
  9603.  
  9604. If you need to pass parameters to a subsystem executable module, the argv and 
  9605. argc command-line parameters to main are supported. However, you cannot use the 
  9606. envp parameter to main. 
  9607.  
  9608.  
  9609. ΓòÉΓòÉΓòÉ 15.1.1. Subsystem Library Functions ΓòÉΓòÉΓòÉ
  9610.  
  9611. The libraries CPPON30.LIB and CPPON30.DLL are provided specifically for 
  9612. subsystem development. Use CPPON30.LIB for static linking, and CPPON30.DLL for 
  9613. dynamic linking. The import library CPPON30I.LIB is also provided for dynamic 
  9614. linking. You can also use the CPPON30O.LIB library to create your own subsystem 
  9615. runtime DLL.  See Creating Your Own Subsystem Runtime Library DLLs for more 
  9616. information on creating subsystem runtime DLLs. 
  9617.  
  9618. Those VisualAge C++ library functions that require a runtime environment cannot 
  9619. be used in a subsystem. The subsystem libraries contain the library functions 
  9620. that do not require a runtime environment, including the extensions that allow 
  9621. low-level I/O.  No other I/O functions are provided. 
  9622.  
  9623. With the exception of the memory allocation functions (calloc, malloc, realloc, 
  9624. and free), all of the functions in the subsystem libraries are reentrant. 
  9625.  
  9626. Note:  Although the low-level I/O functions defined in <io.h> are reentrant, 
  9627. you should serialize access to these functions within each file.  If you do not 
  9628. serialize the access, you may get unexpected input or output. 
  9629.  
  9630. The C++ runtime functions (new and delete) and exception handling functions 
  9631. (throw, try and catch) are also available for subsystem development. None of 
  9632. the Open Classes are are available for subsystem development. 
  9633.  
  9634. There are three groups of functions that you can use in a subsystem: 
  9635.  
  9636.    1. The subsystem library functions listed below.  These functions are 
  9637.       available whether or not you have optimization turned on (/O+). 
  9638.  
  9639.    2. Built-in instrinsic functions.  These are listed in Functions that Are 
  9640.       Always Inlined.  These functions are also available whether or not you 
  9641.       have optimization turned on. 
  9642.  
  9643.    3. Other intrinsic functions. These are listed in Functions that Are Inlined 
  9644.       when Optimization Is On.  These functions are only available for use in a 
  9645.       subsystem if optimization is turned on. 
  9646.  
  9647.  The functions available in the subsystem libraries are: 
  9648.  
  9649.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  9650.   Γöé abs        Γöé __eof       Γöé qsort       Γöé "         Γöé
  9651.   Γöé access       Γöé exit(2)      Γöé read        Γöé _tell       Γöé
  9652.   Γöé atof        Γöé _filelength    Γöé realloc      Γöé _uaddmem     Γöé
  9653.   Γöé atoi(1)      Γöé _fpreset      Γöé realloc      Γöé _ucalloc     Γöé
  9654.   Γöé atol(1)      Γöé free        Γöé _set_crt_msg_handlΓöé _uclose      Γöé
  9655.   Γöé bsearch      Γöé _heap_check    Γöé setjmp(3)     Γöé _ucreate     Γöé
  9656.   Γöé calloc       Γöé _heap_walk     Γöé _setmode      Γöé _udefault     Γöé
  9657.   Γöé chmod       Γöé _heapchk      Γöé _sopen       Γöé _udestroy     Γöé
  9658.   Γöé _chsize      Γöé _heapmin      Γöé sprintf(4)     Γöé _udump_allocated Γöé
  9659.   Γöé _clear87      Γöé _heapset      Γöé sscanf(4)     Γöé _udump_allocated_Γöéelta
  9660.   Γöé close       Γöé isatty       Γöé _status87     Γöé _uheap_check   Γöé
  9661.   Γöé _control87     Γöé _itoa       Γöé strcat       Γöé _uheap_walk    Γöé
  9662.   Γöé creat       Γöé labs        Γöé strchr       Γöé _uheapchk     Γöé
  9663.   Γöé _debug_calloc   Γöé ldiv        Γöé strcmp       Γöé _uheapmin     Γöé
  9664.   Γöé _debug_free    Γöé longjmp(3)     Γöé strcpy       Γöé _uheapset     Γöé
  9665.   Γöé _debug_heapmin   Γöé lseek       Γöé strcspn      Γöé _ultoa      Γöé
  9666.   Γöé _debug_malloc   Γöé _ltoa       Γöé strdup       Γöé _umalloc     Γöé
  9667.   Γöé _debug_realloc   Γöé malloc       Γöé strncat      Γöé umask       Γöé
  9668.   Γöé _debug_ucalloc   Γöé memchr       Γöé strncmp      Γöé _uopen      Γöé
  9669.   Γöé _debug_uheapmin  Γöé memcmp       Γöé strncpy      Γöé _ustats      Γöé
  9670.   Γöé _debug_umalloc   Γöé memcpy       Γöé strpbrk      Γöé va_arg(5)     Γöé
  9671.   Γöé div        Γöé memmove      Γöé strrchr      Γöé va_end(5)     Γöé
  9672.   Γöé _dump_allocated_deΓöétmemset       Γöé strspn       Γöé va_start(5)    Γöé
  9673.   Γöé _dump_allocated  Γöé _mheap       Γöé strstr       Γöé vprintf(4)    Γöé
  9674.   Γöé dup        Γöé _ msize       Γöé strtol       Γöé vsprintf(4)    Γöé
  9675.   Γöé dup2        Γöé open        Γöé strtoul      Γöé write       Γöé
  9676.   Γöé          Γöé printf(4)     Γöé          Γöé  "
  9677.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  9678.  
  9679.  Note: 
  9680.  
  9681.    1. The subsystem library versions of these functions do not use the locale 
  9682.       information that the standard library versions use. 
  9683.  
  9684.    2. Note that atexit and _onexit are not provided. 
  9685.  
  9686.    3. You must write your own exception handler when using these functions in a 
  9687.       subsystem. 
  9688.  
  9689.    4. When you use these functions in a subsystem, \n will be translated to 
  9690.       \r\n and DosWrite will be used to write the contents of the buffer to 
  9691.       stdout. There is no serialization protection and no multibyte support. 
  9692.       These functions use only the default "C" locale information. 
  9693.  
  9694.    5. These functions are implemented as macros. 
  9695.  
  9696.  
  9697. ΓòÉΓòÉΓòÉ 15.1.2. Calling Conventions for Subsystem Functions ΓòÉΓòÉΓòÉ
  9698.  
  9699. When creating a subsystem, you can use either the _System or _Optlink calling 
  9700. convention for your functions. Any external functions that will be called from 
  9701. programs not compiled by the VisualAge C++ compiler must use the _System 
  9702. convention. 
  9703.  
  9704. You can use the /Mp or /Ms options to specify the default calling convention 
  9705. for all functions in a program, and you can use linkage keywords or the #pragma 
  9706. linkage directive to specify the convention for individual functions. 
  9707.  
  9708. Note:  The #pragma linkage directive is supported for C programs only. 
  9709.  
  9710.  
  9711. ΓòÉΓòÉΓòÉ 15.2. Building a Subsystem DLL ΓòÉΓòÉΓòÉ
  9712.  
  9713. To create a subsystem DLL, follow the steps described in Building Dynamic Link 
  9714. Libraries.  The steps are the same as for a DLL that uses the runtime 
  9715. environment. 
  9716.  
  9717. The one difference between the two types of DLLs is the _DLL_InitTerm function. 
  9718. This function is the initialization and termination entry point for all DLLs. 
  9719. In the C runtime environment, _DLL_InitTerm initializes and terminates the 
  9720. necessary environment for the DLL, including storage, semaphores, and 
  9721. variables. The version provided in the subsystem libraries defines the entry 
  9722. point for the DLL, but provides no initialization or termination functions. 
  9723.  
  9724. If your subsystem DLL requires any initialization or termination, you will need 
  9725. to create your own _DLL_InitTerm function.  Otherwise, you can use the default 
  9726. version. 
  9727.  
  9728.  
  9729. ΓòÉΓòÉΓòÉ 15.2.1. Writing Your Own Subsystem _DLL_InitTerm Function ΓòÉΓòÉΓòÉ
  9730.  
  9731. The prototype for the _DLL_InitTerm function is: 
  9732.  
  9733.    unsigned long _System _DLL_InitTerm(unsigned long hModule,
  9734.                                                 unsigned long ulFlag);
  9735.  
  9736. If the value of the ulFlag parameter is 0, the DLL environment is initialized. 
  9737. If the value of the ulFlag parameter is 1, the DLL environment is ended. 
  9738.  
  9739. The hModule parameter is the module handle assigned by the operating system for 
  9740. this DLL. The module handle can be used as a parameter to various OS/2 API 
  9741. calls.  For example, DosQueryModuleName can be used to return the fully 
  9742. qualified path name of the DLL, which tells you where the DLL was loaded from. 
  9743.  
  9744. The return code from _DLL_InitTerm tells the loader if the initialization or 
  9745. termination was performed successfully. If the call was successful, 
  9746. _DLL_InitTerm returns a nonzero value. A return code of 0 indicates that the 
  9747. function failed. If a failure is indicated, the loader will not load the 
  9748. program that is accessing the DLL. 
  9749.  
  9750. Because it is called by the operating system loader, the _DLL_InitTerm function 
  9751. must be declared as having the _System calling convention. 
  9752.  
  9753. You do not need to call _CRT_init and _CRT_term in your _DLL_InitTerm function, 
  9754. because there is no runtime environment to initialize or terminate.  However, 
  9755. if you are coding in C++, you do need to call __ctordtorInit at the beginning 
  9756. of _DLL_InitTerm to correctly initialize static constructors and destructors, 
  9757. and __ctordtorTerm at the end to correctly terminate them. 
  9758.  
  9759. If you change your DLL at a later time to use the regular runtime libraries, 
  9760. you must add calls to _CRT_init and _CRT_term, as described in Writing Your Own 
  9761. _DLL_InitTerm Function, to ensure that the runtime environment is correctly 
  9762. initialized. 
  9763.  
  9764.  
  9765. ΓòÉΓòÉΓòÉ 15.2.1.1. Example of a Subsystem _DLL_InitTerm Function ΓòÉΓòÉΓòÉ
  9766.  
  9767. The following figure shows the _DLL_InitTerm function for the sample program 
  9768. SAMPLE05. If you installed the Sample programs, you will find the SAMPLE05 
  9769. project in the VisualAge C++ Samples folder. For information on how to build 
  9770. and debug a project, see the User's Guide. Alternatively, if you wish to 
  9771. compile, link, and run the sample from the command line, you will find a readme 
  9772. file with instructions. in the \IBMCPP\SAMPLES\COMPILER\SAMPLE05 directory 
  9773. along with the files needed. This _DLL_InitTerm function is included in the 
  9774. SAMPLE05.C source file.  You could also make your _DLL_InitTerm function a 
  9775. separate file. Note that this figure shows only a fragment of SAMPLE05.C and 
  9776. not the entire source file. 
  9777.  
  9778.  
  9779. _DLL_InitTerm Function for SAMPLE05
  9780.  
  9781.  
  9782. /* _DLL_InitTerm() - called by the loader for DLL initialization/termination  */
  9783. /* This function must return a non-zero value if successful and a zero value  */
  9784. /* if unsuccessful.                                                           */
  9785.  
  9786. unsigned long _DLL_InitTerm( unsigned long hModule, unsigned long ulFlag )
  9787.    {
  9788.    APIRET rc;
  9789.  
  9790.    /* If ulFlag is zero then initialization is required:                      */
  9791.    /*    If the shared memory pointer is NULL then the DLL is being loaded    */
  9792.    /*    for the first time so acquire the named shared storage for the       */
  9793.    /*    process control structures.  A linked list of process control        */
  9794.    /*    structures will be maintained.  Each time a new process loads this   */
  9795.    /*    DLL, a new process control structure is created and it is inserted   */
  9796.    /*    at the end of the list by calling DLLREGISTER.                       */
  9797.    /*                                                                         */
  9798.    /* If ulFlag is 1 then termination is required:                            */
  9799.    /*    Call DLLDEREGISTER which will remove the process control structure   */
  9800.    /*    and free the shared memory block from its virtual address space.     */
  9801.  
  9802.    switch( ulFlag )
  9803.       {
  9804.    case 0:
  9805.          if ( !ulProcessCount )
  9806.             {
  9807.             _rmem_init();
  9808.             /* Create the shared mutex semaphore.                             */
  9809.  
  9810.             if ( ( rc = DosCreateMutexSem( SHARED_SEMAPHORE_NAME,
  9811.                                            &hmtxSharedSem,
  9812.                                            0,
  9813.                                            FALSE ) ) != NO_ERROR )
  9814.                {
  9815.                printf( "DosCreateMutexSem rc = %lu\n", rc );
  9816.                return 0;
  9817.                }
  9818.             }
  9819.  
  9820.          /* Register the current process.                                     */
  9821.  
  9822.          if ( DLLREGISTER( ) )
  9823.             return 0;
  9824.  
  9825.          break;
  9826.  
  9827.       case 1:
  9828.          /* De-register the current process.                                  */
  9829.  
  9830.          if ( DLLDEREGISTER( ) )
  9831.             return 0;
  9832.  
  9833.          _rmem_term();
  9834.  
  9835.          break;
  9836.  
  9837.       default:
  9838.          return 0;
  9839.       }
  9840.  
  9841.    /* Indicate success.  Non-zero means success!!!                            */
  9842.  
  9843.    return 1;
  9844.    }
  9845.  
  9846.  
  9847. ΓòÉΓòÉΓòÉ 15.3. Compiling Your Subsystem ΓòÉΓòÉΓòÉ
  9848.  
  9849. To compile your source files into a subsystem, use the /Rn compiler option. 
  9850. When you use this option, the compiler does not generate the external 
  9851. references that would build an environment. The subsystem libraries are also 
  9852. specified in each object file to be linked in at link time. The default 
  9853. compiler option is /Re, which creates an object with a runtime environment. 
  9854.  
  9855. If you are creating a subsystem DLL, you must use the /Ge- option in addition 
  9856. to /Rn. You can use either static linking (/Gd-), which is the default, or 
  9857. dynamic linking (/Gd+). 
  9858.  
  9859.  
  9860. ΓòÉΓòÉΓòÉ 15.4. Restrictions When You Are Using Subsystems ΓòÉΓòÉΓòÉ
  9861.  
  9862. If you are creating an executable module, the envp parameter to main is not 
  9863. supported. However, the argv and argc parameters are available.  See Passing 
  9864. Data to a Program for a description of envp under the runtime environment. 
  9865.  
  9866. The low-level I/O functions allow you to perform some input and output 
  9867. operations.  You are responsible for the buffering and formatting of I/O. 
  9868.  
  9869.  
  9870. ΓòÉΓòÉΓòÉ 15.5. Example of a Subsystem DLL ΓòÉΓòÉΓòÉ
  9871.  
  9872. The sample program SAMPLE05 shows how to create a simple subsystem DLL and a 
  9873. program to access it. 
  9874.  
  9875. The DLL keeps a global count of the number of processes that access it, running 
  9876. totals for each process that accesses the subsystem, and a grand total for all 
  9877. processes. There are two external entry points for programs accessing the 
  9878. subsystem. The first is DLLINCREMENT, which increments both the grand total and 
  9879. the total for the calling process by the amount passed in. The second entry 
  9880. point is DLLSTATS, which prints out statistics kept by the subsystem, including 
  9881. the grand total and the total for the current process. 
  9882.  
  9883. The grand total and the total for the process are stored in a single shared 
  9884. data segment of the subsystem. Each process total is stored in its own data 
  9885. segment. 
  9886.  
  9887. The files for the sample program are: 
  9888.  
  9889.  SAMPLE05.C    The source file to create the DLL. 
  9890.  
  9891.  SAMPLE05.DEF  The module definition file for the DLL. 
  9892.  
  9893.  SAMPLE05.H    The user include file. 
  9894.  
  9895.  MAIN05.C      The main program that accesses the subsystem. 
  9896.  
  9897.  MAIN05.DEF    The module definition file for MAIN05.C. 
  9898.  If you installed the Sample programs, you will find the SAMPLE05 project in 
  9899.  the VisualAge C++ Samples folder. For information on how to build and debug a 
  9900.  project, see the User's Guide. Alternatively, if you wish to compile, link, 
  9901.  and run the sample from the command line, you will find a readme file with 
  9902.  instructions. in the \IBMCPP\SAMPLES\COMPILER\SAMPLE05 directory along with 
  9903.  the files needed. 
  9904.  
  9905.  
  9906. ΓòÉΓòÉΓòÉ 15.6. Creating Your Own Subsystem Runtime Library DLLs ΓòÉΓòÉΓòÉ
  9907.  
  9908. If you are shipping your application to other users, you can use one of three 
  9909. methods to make the VisualAge C++ subsystem library functions available to the 
  9910. users of your application: 
  9911.  
  9912.    1. Statically bind every module to the library (.LIB) files. 
  9913.  
  9914.       This method increases the size of your modules and also slows the 
  9915.       performance because the DLL environment has to be initialized for each 
  9916.       module. 
  9917.  
  9918.    2. Use the DLLRNAME utility to rename the VisualAge C++ subsystem library 
  9919.       DLLs. 
  9920.  
  9921.       You can then ship the renamed DLLs with your application.  DLLRNAME is 
  9922.       described in the User's Guide. 
  9923.  
  9924.    3. Create your own runtime DLLs. 
  9925.  
  9926.       This method provides one common DLL environment for your entire 
  9927.       application.  It also lets you apply changes to the runtime library 
  9928.       without relinking your application, meaning that if the VisualAge C++ 
  9929.       DLLs change, you need only rebuild your own DLL. In addition, you can 
  9930.       tailor your runtime DLL to contain only those functions you use, 
  9931.       including your own. 
  9932.  
  9933.  To create your own subsystem runtime library, follow these steps: 
  9934.  
  9935.    1. Copy and rename the VisualAge C++ CPPON30.DEF file, for example to 
  9936.       mysdll.def. You must also change the DLL name on the LIBRARY line of the 
  9937.       .DEF file. CPPON30.DEF is installed in the LIB subdirectory under the 
  9938.       main VisualAge C++ installation directory. 
  9939.  
  9940.    2. Remove any functions that you do not use directly or indirectly (through 
  9941.       other functions) from your .DEF file (mysdll.def), including the STUB 
  9942.       line. Do not delete anything with the comment **** next to it; variables 
  9943.       and functions indicated by this comment are used by startup functions and 
  9944.       are always required. 
  9945.  
  9946.    3. Create a source file for your DLL, for example, mysdll.c. If you are 
  9947.       creating a runtime library that contains only VisualAge C++ functions, 
  9948.       create an empty source file.  If you are adding your own functions to the 
  9949.       library, put the code for them in this file. 
  9950.  
  9951.    4. Compile and link your DLL files.  Use the /Ge- option to create a DLL and 
  9952.       the /Rn option to create a subsystem.  For example: 
  9953.  
  9954.                icc /Ge- /Rn mysdll.c mysdll.def
  9955.  
  9956.    5. Use the IMPLIB utility to create an import library for your DLL, as 
  9957.       described in Using Your DLL.  For example: 
  9958.  
  9959.                IMPLIB /NOI mysdlli.lib mysdll.def
  9960.  
  9961.    6. Use the ILIB utility to add the object modules that contain the 
  9962.       initialization and termination functions to your import library. These 
  9963.       objects are needed by all executable modules and DLLs, and are contained 
  9964.       in CPPON30O.LIB for subsystem programs. See the User's Guide for 
  9965.       information on how to use ILIB. 
  9966.  
  9967.       Note:  If you do not use the ILIB utility, you must ensure that all 
  9968.       objects that access your runtime DLL are statically linked to the 
  9969.       appropriate object library.  The compile and link commands are described 
  9970.       in the next step. 
  9971.  
  9972.    7. Compile your executable modules and other DLLs with the /Gn+ option to 
  9973.       exclude the default library information. For example: 
  9974.  
  9975.                icc /C /Gn+ /Ge+ /Rn myprog.c
  9976.                icc /C /Gn+ /Ge- /Rn mydll.c
  9977.  
  9978.       When you link your objects, specify your own import library.  If you are 
  9979.       using or plan to use OS/2 APIs, specify OS2386.LIB also. For example: 
  9980.  
  9981.                ILINK myprog.obj mysdlli.lib OS2386.LIB
  9982.                ILINK mydll.obj mysdlli.lib OS2386.LIB
  9983.  
  9984.       To compile and link in one step, use the commands: 
  9985.  
  9986.                icc /Gn+ /Ge+ /Rn myprog.c mysdlli.lib OS2386.LIB
  9987.                icc /Gn+ /Ge- /Rn mydll.c mysdlli.lib OS2386.LIB
  9988.  
  9989.       Note:  If you did not use the ILIB utility to add the initialization and 
  9990.              termination objects to your import library, when you link your 
  9991.              modules, specify: 
  9992.  
  9993.         a. CPPON30O.LIB 
  9994.         b. Your import library 
  9995.         c. OS2386.LIB (to allow you to use OS/2 APIs) 
  9996.         d. The linker option /NOD. For example: 
  9997.  
  9998.             ILINK /NOD myprog.obj CPPON30O.LIB mysdlli.lib OS2386.LIB;
  9999.             ILINK /NOD mydll.obj CPPON30O.LIB mysdlli.lib OS2386.LIB;
  10000.  
  10001.       The /NOD option tells the linker to disregard the default libraries 
  10002.       specified in the object files and use only the libraries given on the 
  10003.       command line. If you are using icc to invoke the linker for you, the 
  10004.       commands would be: 
  10005.  
  10006.             icc /B"/NOD" /Rn myprog.c CPPON30O.LIB mysdlli.lib OS2386.LIB
  10007.             icc /Ge- /B"/NOD" /Rn mydll.c CPPON30O.LIB mysdlli.lib OS2386.LIB
  10008.  
  10009.       The linker then links the objects from the object library directly into 
  10010.       your executable module or DLL. 
  10011.  
  10012.  
  10013. ΓòÉΓòÉΓòÉ 16. Signal and OS/2 Exception Handling ΓòÉΓòÉΓòÉ
  10014.  
  10015. VisualAge C++ product and the OS/2 operating system both have the capability to 
  10016. detect and report runtime errors and abnormal conditions. 
  10017.  
  10018. Abnormal conditions can be reported to you and handled in one of the following 
  10019. ways: 
  10020.  
  10021.    1. Using VisualAge C++ signal handlers. Error handling by signals is defined 
  10022.       by the SAA and ANSI C standards and can be used in both C and C++ 
  10023.       programs. 
  10024.  
  10025.    2. Using OS/2 exception handlers. The VisualAge C++ library provides a 
  10026.       C-language OS/2 exception handler, _Exception, to map OS/2 exceptions to 
  10027.       C signals and signal handlers.  You can also create and use your own 
  10028.       exception handlers. 
  10029.  
  10030.    3. Using C++ exception handling constructs.  These constructs belong to the 
  10031.       C++ language definition and can only be used in C++ code. C++ exception 
  10032.       handling is described in detail in the Language Reference. 
  10033.  
  10034.  This chapter describes how to use signal handlers and OS/2 exception handlers 
  10035.  alone and in combination. Where appropriate, the interaction between C++ 
  10036.  exception handling and the handling of signals and OS/2 exceptions is also 
  10037.  described. Both signal and OS/2 exception handling are implemented in C++ as 
  10038.  they are in C. 
  10039.  
  10040.  This chapter is only necessary for the advanced programming of exception 
  10041.  handling and not for simply debugging exception handling problems.  You should 
  10042.  use the debugger to debug exception handling problems as complete notification 
  10043.  and stack tracing is available through the debugger. OS/2 exceptions and 
  10044.  exception handlers are also described in the Toolkit documentation. 
  10045.  
  10046.  Note: 
  10047.  
  10048.    1. The terms signal, OS/2 exception, and C++ exception are not 
  10049.       interchangeable.  A signal exists only within the C and C++ languages. An 
  10050.       OS/2 exception is generated by the operating system, and may be used by 
  10051.       VisualAge C++ library to generate a signal. A C++ exception exists only 
  10052.       within the C++ language. In this chapter, the term exception refers to an 
  10053.       OS/2 exception unless otherwise specified. 
  10054.  
  10055.    2. VisualAge C++ implements C++ exception handling using the OS/2 exception 
  10056.       handling facility. 
  10057.  
  10058.  
  10059. ΓòÉΓòÉΓòÉ 16.1. Using C++ and OS/2 Exception Handling in the Same Program ΓòÉΓòÉΓòÉ
  10060.  
  10061. You can make use of C++ exception handling facilities and the OS/2 exception 
  10062. handling facilities in the same program. In fact, VisualAge C++ implements the 
  10063. C++ exception handling facilities using the OS/2 exception handling. 
  10064.  
  10065. Note:  If you use OS/2 exception handling in a program that also uses C++ 
  10066. exception handling, you must not have an OS/2 exception handler that has 
  10067. default behaviour for an unidentified exception.  You should always avoid using 
  10068. such an exception handler, but you should be particularly careful to avoid it 
  10069. in programs that use C++ exception handling because the results can be 
  10070. unpredictable. 
  10071.  
  10072.  
  10073. ΓòÉΓòÉΓòÉ 16.2. Handling Signals ΓòÉΓòÉΓòÉ
  10074.  
  10075. Signals are C and C++ language constructs provided for error handling.  A 
  10076. signal is a condition reported as a result of an error in program execution. It 
  10077. may also be caused by deliberate programmer action. With the VisualAge C++ 
  10078. product, operating system exceptions are mapped to signals for you. 
  10079. VisualAge C++ product provides a number of different symbols to differentiate 
  10080. between error conditions. The signal constants are defined in the <signal.h> 
  10081. header file. 
  10082.  
  10083. C provides two functions that deal with signal handling in the runtime 
  10084. environment: raise and signal. Signals can be reported by an explicit call to 
  10085. raise, but are generally reported as a result of a machine interrupt (for 
  10086. example, division by zero), of a user action (for example, pressing Ctrl-C or 
  10087. Ctrl-Break), or of an operating system exception. 
  10088.  
  10089. Use the signal function to specify how to handle a particular signal. For each 
  10090. signal, you can specify one of 3 types of handlers: 
  10091.  
  10092.    1. SIG_DFL 
  10093.  
  10094.       Use the VisualAge C++ default handling.  For most signals, the default 
  10095.       action is to terminate the process with an error message. See Default 
  10096.       Handling of Signals for a list of signals and the default action for 
  10097.       each.  If the /Tx+ option is specified, the default action can be 
  10098.       accompanied by a dump of the machine state to file handle 2, which is 
  10099.       usually associated with stderr. Note that you can change the destination 
  10100.       of the machine-state dump and other messages using the 
  10101.       _set_crt_msg_handle function, which is described in the C Library 
  10102.       Reference. 
  10103.  
  10104.    2. SIG_IGN 
  10105.  
  10106.       Ignore the condition and continue running the program. Some signals 
  10107.       cannot be ignored, such as division by zero. If you specify SIG_IGN for 
  10108.       one of these signals, the VisualAge C++ library will treat the signal as 
  10109.       if SIG_DFL was specified. 
  10110.  
  10111.    3. Your own signal handler function 
  10112.  
  10113.       Call the function you specify.  It can be any function, and can call any 
  10114.       library function.  Note that when the signal is reported and your 
  10115.       function is called, signal handling is reset to SIG_DFL to prevent 
  10116.       recursion should the same signal be reported from your function. 
  10117.  
  10118.  The initial setting for all signals is SIG_DFL, the default action. 
  10119.  
  10120.  The signal and raise functions are described in more detail in the C Library 
  10121.  Reference. 
  10122.  
  10123.  
  10124. ΓòÉΓòÉΓòÉ 16.3. Default Handling of Signals ΓòÉΓòÉΓòÉ
  10125.  
  10126. The runtime environment will perform default handling of a given signal unless 
  10127. a specific signal handler is established or the signal is disabled (set to 
  10128. SIG_IGN). You can also set or reset default handling by coding: 
  10129.  
  10130.    signal(sig, SIG_DFL);
  10131.  
  10132. The default handling depends upon the signal that is being handled. For most 
  10133. signals, the default is to pass the signal to the next exception handler in the 
  10134. chain (the chaining of exception handlers is described in Registering an OS/2 
  10135. Exception Handler). 
  10136.  
  10137. Unless you have set up your own exception handler, as described in Creating 
  10138. Your Own OS/2 Exception Handler, the default OS/2 exception handler receives 
  10139. the signal and performs the default action, which is to terminate the program 
  10140. and return an exit code.  The exit code indicates: 
  10141.  
  10142.    1. The reason for the program termination. For the possible values and 
  10143.       meanings of the termination code, see DosExecPgm in the Control Program 
  10144.       Guide and Reference. 
  10145.  
  10146.    2. The return code from DosExit. For the DosExit return codes, see the 
  10147.       Control Program Guide and Reference. 
  10148.  
  10149.  The following table lists the C signals that VisualAge C++ runtime library 
  10150.  supports, the source of the signal, and the default handling performed by the 
  10151.  library. 
  10152.  
  10153.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10154.   Γöé Table 5. Default Handling of Signals                     Γöé
  10155.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10156.   Γöé SIGNAL  Γöé SOURCE              Γöé DEFAULT ACTION          Γöé
  10157.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10158.   Γöé "SIGABRT"Γöé Abnormal termination signal   Γöé Terminate the program with exit Γöé
  10159.   Γöé      Γöé sent by the "abort" function   Γöé code 3.             Γöé
  10160.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10161.   Γöé "SIGBREAKΓöé Ctrl-Break signal        Γöé Pass the signal to the next   Γöé
  10162.   Γöé      Γöé                 Γöé exception handler in the chain. Γöé
  10163.   Γöé      Γöé                 Γöé If the exception handler is the Γöé
  10164.   Γöé      Γöé                 Γöé OS/2 handler, the program ter-  Γöé
  10165.   Γöé      Γöé                 Γöé minates.             Γöé
  10166.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10167.   Γöé "SIGFPE" Γöé Floating-point exceptions that  Γöé Pass the signal to the next   Γöé
  10168.   Γöé      Γöé are not masked(**), such as   Γöé exception handler in the chain. Γöé
  10169.   Γöé      Γöé overflow, division by zero,   Γöé If the exception handler is the Γöé
  10170.   Γöé      Γöé integer math exceptions, and   Γöé OS/2 handler, the program ter-  Γöé
  10171.   Γöé      Γöé operations that are not valid  Γöé minates.             Γöé
  10172.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10173.   Γöé "SIGILL" Γöé Disallowed instruction      Γöé Pass the signal to the next   Γöé
  10174.   Γöé      Γöé                 Γöé exception handler in the chain. Γöé
  10175.   Γöé      Γöé                 Γöé If the exception handler is the Γöé
  10176.   Γöé      Γöé                 Γöé OS/2 handler, the program ter-  Γöé
  10177.   Γöé      Γöé                 Γöé minates.             Γöé
  10178.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10179.   Γöé "SIGINT" Γöé Ctrl-C signal          Γöé Pass the signal to the next   Γöé
  10180.   Γöé      Γöé                 Γöé exception handler in the chain. Γöé
  10181.   Γöé      Γöé                 Γöé If the exception handler is the Γöé
  10182.   Γöé      Γöé                 Γöé OS/2 handler, the program ter-  Γöé
  10183.   Γöé      Γöé                 Γöé minates.             Γöé
  10184.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10185.   Γöé "SIGSEGV"Γöé Attempt to access a memory    Γöé Pass the signal to the next   Γöé
  10186.   Γöé      Γöé address that is not valid    Γöé exception handler in the chain. Γöé
  10187.   Γöé      Γöé                 Γöé If the exception handler is the Γöé
  10188.   Γöé      Γöé                 Γöé OS/2 handler, the program ter-  Γöé
  10189.   Γöé      Γöé                 Γöé minates.             Γöé
  10190.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10191.   Γöé "SIGTERM"Γöé Program termination signal sent Γöé Pass the signal to the next   Γöé
  10192.   Γöé      Γöé by the user or operating system Γöé exception handler in the chain. Γöé
  10193.   Γöé      Γöé                 Γöé If the exception handler is the Γöé
  10194.   Γöé      Γöé                 Γöé OS/2 handler, the program ter-  Γöé
  10195.   Γöé      Γöé                 Γöé minates.             Γöé
  10196.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10197.   Γöé "SIGUSR1"Γöé User-defined signal       Γöé Ignored.             Γöé
  10198.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10199.   Γöé "SIGUSR2"Γöé User-defined signal       Γöé Ignored.             Γöé
  10200.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10201.   Γöé "SIGUSR3"Γöé User-defined signal       Γöé Ignored.             Γöé
  10202.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10203.  
  10204.  
  10205. ΓòÉΓòÉΓòÉ 16.4. Establishing a Signal Handler ΓòÉΓòÉΓòÉ
  10206.  
  10207. You can establish or register your own signal handler with a call to the signal 
  10208. function: 
  10209.  
  10210.    signal(sig, sig_handler);
  10211.  
  10212. where sig_handler is the address of your signal handling function.  The signal 
  10213. handler is a C function that takes a single integer argument (or two arguments 
  10214. for SIGFPE), and may have either _System or _Optlink linkage. 
  10215.  
  10216. A signal handler for a particular signal remains established until one of the 
  10217. following occurs: 
  10218.  
  10219.      A different handler is established for the same signal. 
  10220.  
  10221.      The signal is explicitly reset to the system default with the function 
  10222.       call  signal(sig, SIG_DFL). 
  10223.  
  10224.      The signal is reported. When your signal handler is called, the handling 
  10225.       for that signal is reset to the default as if the function call 
  10226.       signal(sig_num, SIG_DFL) were explicitly made immediately before the 
  10227.       signal handler call. 
  10228.  
  10229.  Note:  A signal handler can also become deregistered if the load module where 
  10230.  the signal handler resides is deleted using the _freemod function.  In this 
  10231.  situation, when the signal is raised, an OS/2 exception occurs and the 
  10232.  behavior is undefined. 
  10233.  
  10234.  
  10235. ΓòÉΓòÉΓòÉ 16.5. Writing a Signal Handler Function ΓòÉΓòÉΓòÉ
  10236.  
  10237. A signal handler function may call any non-critical C library functions. (For a 
  10238. list of critical functions, see Critical Functions.) Your signal handler may 
  10239. handle the signal in any of the following ways: 
  10240.  
  10241.    1. Calling exit or abort to terminate the process. 
  10242.  
  10243.    2. Calling _endthread to terminate the current thread of a multithread 
  10244.       program.  The process continues to run without the thread. You must 
  10245.       ensure that the loss of the thread does not affect the process.  Note 
  10246.       that calling _endthread for thread 1 of your process is the same as 
  10247.       calling exit. 
  10248.  
  10249.    3. Calling longjmp to go back to an earlier point in the current thread 
  10250.       where you called setjmp. When you call setjmp, it saves the state of the 
  10251.       thread at the time of the call. When you call longjmp at a later time, 
  10252.       the thread is reset to the state saved by setjmp, and starts running 
  10253.       again at the place where the call to setjmp was made. 
  10254.  
  10255.    4. Returning from the function to restart the thread as though the signal 
  10256.       has not occurred.  If this is not possible, the VisualAge C++ library 
  10257.       terminates your process. 
  10258.  
  10259.  
  10260. ΓòÉΓòÉΓòÉ 16.5.1. Example of a C Signal Handler ΓòÉΓòÉΓòÉ
  10261.  
  10262. The following code gives a simple example of a signal handler function for a 
  10263. single-thread program. In the example, the function chkptr checks a given 
  10264. number of bytes in an area of storage and returns the number of bytes that you 
  10265. can access. The flow of the function's execution is described after the code. 
  10266.  
  10267.  
  10268. Example Illustrating a Signal Handler
  10269.  
  10270. #include <signal.h>
  10271. #include <setjmp.h>
  10272. #include <stdio.h>
  10273. #include <os2.h>
  10274.  
  10275. static void mysig(int sig);         /* signal handler prototype */
  10276. static jmp_buf jbuf;                /* buffer for machine state */
  10277.  
  10278. int chkptr(void * ptr, int size)
  10279. {
  10280.     void (* oldsig)(int);           /* where to save the old signal handler */
  10281.     volatile char c;                /* volatile to ensure access occurs */
  10282.     int valid = 0;                  /* count of valid bytes */
  10283.     char * p = ptr;
  10284.  
  10285.     oldsig = signal(SIGSEGV,mysig); /* set the signal handler */        1
  10286.  
  10287.     if (!setjmp(jbuf))              /* provide a point for the      */  2
  10288.     {                               /*  signal handler to return to */
  10289.  
  10290.        while (size--)
  10291. Γò¥Γò¥ΓòÉ
  10292.        {                                                              
  10293.           c = *p++;                 /* check the storage and */        3
  10294.           valid++;                  /*  increase the counter */       
  10295.        }
  10296. Γò¥Γò¥
  10297.     }
  10298.  
  10299.     signal(SIGSEGV,oldsig);         /* reset the signal handler */      5
  10300.     return valid;                   /* return number of valid bytes */  6
  10301. }
  10302.  
  10303. static void mysig(int sig)
  10304. Γò¥ΓòÉ
  10305. {                                                                ~
  10306.     UCHAR FileData[100];
  10307.     ULONG Wrote;
  10308.  
  10309.     strcpy(FileData, "Signal Occurred.\n\r");
  10310.     DosWrite(2, (PVOID)FileData, strlen(FileData), &Wrote);           ~ 4
  10311.     longjmp(jbuf,1);        /* return to the point of the setjmp call */   
  10312.  
  10313. Γò¥
  10314. }
  10315.  
  10316.       1 The program registers the signal handler mysig and saves the original 
  10317.       handler in oldsig so that it can be reset at a later time. 
  10318.  
  10319.       2 The call to setjmp saves the state of the thread in jbuf.  When you 
  10320.       call setjmp directly, it returns 0, so the code within the if statement 
  10321.       is run. 
  10322.  
  10323.       3 The loop reads in and checks each byte of the buffer, incrementing 
  10324.       valid for each byte successfully copied to c. 
  10325.  
  10326.       Assuming that not all of the buffer space is available, at some point in 
  10327.       the loop p points to a storage location the process cannot access.  An 
  10328.       OS/2 exception is generated and translated by the VisualAge C++ library 
  10329.       to the SIGSEGV signal. The library then resets the signal handler for 
  10330.       SIGSEGV to SIG_DFL and calls the signal handler registered for SIGSEGV 
  10331.       (mysig). 
  10332.  
  10333.       4 The mysig function prints an error message and uses longjmp to return 
  10334.       to the place of the setjmp call in chkptr. 
  10335.  
  10336.       Note:  mysig does not reset the signal handler for SIGSEGV, because that 
  10337.       signal is not intended to occur again.  In some cases, you may want to 
  10338.       reset signal handling before the signal handler function ends. 
  10339.  
  10340.       5 Because setjmp returns a nonzero value when it is called through 
  10341.       longjmp, the if condition is now false and execution falls through to 
  10342.       this line.  The signal handling for SIGSEGV is reset to whatever it was 
  10343.       when chkptr was entered. 
  10344.  
  10345.       6 The function returns the number of valid bytes in the buffer. 
  10346.  
  10347.  As the preceding example shows, your program can recover from a signal and 
  10348.  continue to run successfully. 
  10349.  
  10350.  
  10351. ΓòÉΓòÉΓòÉ 16.5.2. Signal Handling in Multithread Programs ΓòÉΓòÉΓòÉ
  10352.  
  10353. Each thread has its own set of signals, and signal handlers are registered 
  10354. independently on each thread. If you establish a signal handler or raise a 
  10355. signal on one thread, you do not affect any other thread. For example, if 
  10356. thread 1 calls signal as follows: 
  10357.  
  10358.    signal(SIGFPE, handlerfunc);
  10359.  
  10360. then the handler handlerfunc is registered for thread 1 only.  All other 
  10361. threads are handled using the defaults. 
  10362.  
  10363. When a thread starts, all of its signal handlers are set to SIG_DFL. If you 
  10364. want any other signal handling for that thread, you must explicitly register it 
  10365. using signal. 
  10366.  
  10367. A signal is always handled on the thread that generated it, except for 
  10368. SIGBREAK, SIGINT, and SIGTERM.  These three signals are handled on the thread 
  10369. that generated them only if they were raised using the raise function.  If they 
  10370. were raised by an exception, they will be handled on thread 1.  Thus to 
  10371. establish a signal handler for them, you must call signal in thread 1. 
  10372.  
  10373. When you call the raise function, the handler for the signal you raise must be 
  10374. established on the thread where the call was made. 
  10375.  
  10376. Note:  You can use raise to signal your own conditions using the signals 
  10377. SIGUSR1, SIGUSR2, and SIGUSR3. You can also use this function to generate 
  10378. signals to test your signal handlers. 
  10379.  
  10380.  
  10381. ΓòÉΓòÉΓòÉ 16.6. Signal Handling Considerations ΓòÉΓòÉΓòÉ
  10382.  
  10383. When you use signal handlers, keep the following points in mind: 
  10384.  
  10385.      You can register anything as a signal handler.  It is up to you to make 
  10386.       sure that you are registering a valid function. 
  10387.  
  10388.      If your signal handler resides in a DLL, ensure that you change the 
  10389.       signal handler when you unload the DLL.  If you unload your DLL without 
  10390.       changing the signal handler, no warnings or error messages are generated. 
  10391.       When your signal handler gets called, your program will probably 
  10392.       terminate.  If another DLL has been loaded in the same address range, 
  10393.       your program may continue but with undefined results. 
  10394.  
  10395.      Your signal handler should not assume that SIGSEGV always implies an 
  10396.       invalid data pointer. It can also occur, for example, if an address 
  10397.       pointer goes outside of your code segment. 
  10398.  
  10399.      The SIGILL signal is not guaranteed to occur when you call an invalid 
  10400.       function using a pointer. If the pointer points to a valid instruction 
  10401.       stream, SIGILL is not raised. 
  10402.  
  10403.      When you use longjmp to leave a signal handler, ensure that the buffer 
  10404.       you are jumping to was created by the thread that you are in.  Do not 
  10405.       call setjmp from one thread and longjmp from another.  The VisualAge C++ 
  10406.       library terminates a process where such a call is made. 
  10407.  
  10408.      If you use console I/O functions, including gets and scanf, and a SIGINT, 
  10409.       SIGBREAK, or SIGTERM signal occurs, the signal is reported after the 
  10410.       library function returns. Because your signal handler can call any 
  10411.       non-critical library function, one of these functions could be reentered. 
  10412.       To protect the internal data structures, some library code is placed in 
  10413.       "must complete" sections.  When a signal occurs, the library waits until 
  10414.       the "must complete" section ends before it reports the signal. 
  10415.  
  10416.       Note:  You can use the OS/2 APIs DosEnterMustComplete and 
  10417.       DosExitMustComplete to create your own "must complete" sections of code. 
  10418.       See the Control Program Guide and Reference for more information on these 
  10419.       APIs. 
  10420.  
  10421.      Variables referenced by both the signal handler and by other code should 
  10422.       be given the attribute volatile to ensure they are always updated when 
  10423.       they are referenced. Because of the way the compiler optimizes code, the 
  10424.       following example may not work as intended when compiled with the /O+ 
  10425.       option: 
  10426.  
  10427.             void sig_handler(int);
  10428.             static int stepnum;
  10429.  
  10430.             int main(void)
  10431.             {
  10432.                 stepnum = 0;
  10433.                 signal(SIGSEGV, sig_handler);
  10434.                .
  10435.                .
  10436.                .
  10437.                 stepnum = 1;   1
  10438.                .
  10439.                .
  10440.                .
  10441.                 stepnum = 2;   2
  10442.             }
  10443.  
  10444.             void sig_handler(int x)
  10445.             {
  10446.                 UCHAR FileData[100];
  10447.                 ULONG Wrote;
  10448.  
  10449.                 strcpy(FileData, "Error at Step %d\n\r");
  10450.                 DosWrite(2, (PVOID)FileData, strlen(FileData), &Wrote, stepnum);
  10451.             }
  10452.  
  10453.       When using optimization, the compiler may not immediately store the value 
  10454.       1 for the variable stepnum. It may never store the value 1, and store 
  10455.       only the value 2. If a signal occurs between statement 1 and statement 2, 
  10456.       the value of stepnum passed to sig_handler may not be correct. 
  10457.  
  10458.       Declaring stepnum as volatile indicates to the compiler that references 
  10459.       to this variable have side effects. Changes to the value of stepnum are 
  10460.       then stored immediately. 
  10461.  
  10462.      C++ Consideration: When you use longjmp to recover from a signal in a C++ 
  10463.       program, automatic destructors are not called for objects placed on the 
  10464.       stack between the longjmp call and the corresponding setjmp call. Because 
  10465.       the ANSI draft of the C++ language does not specify the behavior of a 
  10466.       throw statement in a signal handler, the most portable way to ensure the 
  10467.       appropriate destructors are called is to add statements to the setjmp 
  10468.       location that will do a throw if necessary. 
  10469.  
  10470.  
  10471. ΓòÉΓòÉΓòÉ 16.7. Handling OS/2 Exceptions ΓòÉΓòÉΓòÉ
  10472.  
  10473. An OS/2 exception is generated by the operating system to report an abnormal 
  10474. condition. OS/2 exceptions are grouped into two categories: 
  10475.  
  10476.    1. Asynchronous exceptions, which are caused by actions outside of your 
  10477.       current thread.  There are only two: 
  10478.  
  10479.           XCPT_SIGNAL, caused by a keyboard signal (Ctrl-C, Ctrl-Break) or the 
  10480.            process termination exception.  This exception can only occur on 
  10481.            thread 1 of your process. 
  10482.           XCPT_ASYNC_PROCESS_TERMINATE, caused by one of your threads 
  10483.            terminating the entire process.  This exception can occur on any 
  10484.            thread. 
  10485.  
  10486.    2. Synchronous exceptions, which are caused by code in the thread that 
  10487.       receives the exception.  All other OS/2 exceptions fall into this 
  10488.       category. 
  10489.  
  10490.  Just as you use signal handlers to handle signals, use exception handlers to 
  10491.  handle OS/2 exceptions. Although exception handling offers additional 
  10492.  function, because signal handling is simpler you may want to use both. 
  10493.  
  10494.  
  10495. ΓòÉΓòÉΓòÉ 16.7.1. VisualAge C++ Default OS/2 Exception Handling ΓòÉΓòÉΓòÉ
  10496.  
  10497. The VisualAge C++ library provides its own default exception handling 
  10498. functions: _Lib_excpt, for OS/2 exceptions occurring in library functions, and 
  10499. _Exception, for all other OS/2 exceptions. You can use these exception handlers 
  10500. or create your own as described in Creating Your Own OS/2 Exception Handler. 
  10501.  
  10502. The function _Exception is the C language exception handler.  It is declared 
  10503. as: 
  10504.  
  10505.    #include <os2.h>
  10506.  
  10507.    unsigned long _System _Exception(EXCEPTIONREPORTRECORD * report_rec,
  10508.                                      EXCEPTIONREGISTRATIONRECORD * reg_rec,
  10509.                                      CONTEXTRECORD * exc,
  10510.                                      void * dummy);
  10511.  
  10512. This exception handler is registered by the VisualAge C++ compiler for every 
  10513. thread or process that is started by _beginthread, unless #pragma handler is 
  10514. specified for the function. The function _Exception maps recognized OS/2 
  10515. exceptions to C signals, which can then be passed by the runtime library to the 
  10516. appropriate signal handlers. 
  10517.  
  10518. Mapping Between Exceptions and C Signals shows which types of OS/2 exception 
  10519. are recognized by _Exception, the names of the exceptions, and the C signals to 
  10520. which each exception type is mapped. These are the only OS/2 exceptions handled 
  10521. by _Exception. The Continuable column indicates whether the program will 
  10522. continue if the corresponding signal handler is SIG_IGN or if a user-defined 
  10523. signal handler returns. If "No" is indicated, the program can only be continued 
  10524. if you provide a signal handler that uses longjmp to jump to another part of 
  10525. the program. 
  10526.  
  10527. If the signal handler value is set to SIG_DFL, the default action taken for 
  10528. each of these exceptions is to terminate the program with an exit code of 99. 
  10529.  
  10530. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10531. Γöé Table 6. Mapping Between Exceptions and C Signals               Γöé
  10532. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10533. Γöé OS/2 EXCEPTION      Γöé C SIGNAL         Γöé CONTINUABLE?       Γöé
  10534. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10535. Γöé Divide by zero      Γöé "SIGFPE"         Γöé No            Γöé
  10536. Γöé             Γöé              Γöé             Γöé
  10537. Γöé   "XCPT_INTEGER_DIVIDEΓöéBY_ZERO"          Γöé             Γöé
  10538. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10539. Γöé NPX387 error       Γöé "SIGFPE"         Γöé No; except for      Γöé
  10540. Γöé             Γöé              Γöé "XCPT_FLOAT_INEXACT_RESUΓöéT"
  10541. Γöé   "XCPT_FLOAT_DENORMALΓöéOPERAND"          Γöé             Γöé
  10542. Γöé   "XCPT_FLOAT_DIVIDE_BΓöé_ZERO"           Γöé             Γöé
  10543. Γöé   "XCPT_FLOAT_INEXACT_ΓöéESULT"           Γöé             Γöé
  10544. Γöé   "XCPT_FLOAT_INVALID_ΓöéPERATION"         Γöé             Γöé
  10545. Γöé   "XCPT_FLOAT_OVERFLOWΓöé              Γöé             Γöé
  10546. Γöé   "XCPT_FLOAT_STACK_CHΓöéCK"            Γöé             Γöé
  10547. Γöé   "XCPT_FLOAT_UNDERFLOΓöé"             Γöé             Γöé
  10548. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10549. Γöé Overflow occurred    Γöé "SIGFPE"         Γöé Yes; resets the over-  Γöé
  10550. Γöé             Γöé              Γöé flow flag        Γöé
  10551. Γöé   "XCPT_INTEGER_OVERFLΓöéW"             Γöé             Γöé
  10552. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10553. Γöé Bound opcode failed   Γöé "SIGFPE"         Γöé No            Γöé
  10554. Γöé             Γöé              Γöé             Γöé
  10555. Γöé   "XCPT_ARRAY_BOUNDS_EΓöéCEEDED"          Γöé             Γöé
  10556. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10557. Γöé Opcode not valid     Γöé "SIGILL"         Γöé No            Γöé
  10558. Γöé             Γöé              Γöé             Γöé
  10559. Γöé   "XCPT_ILLEGAL_INSTRUΓöéTION"           Γöé             Γöé
  10560. Γöé   "XCPT_INVALID_LOCK_SΓöéQUENCE"          Γöé             Γöé
  10561. Γöé   "XCPT_PRIVILEGED_INSΓöéRUCTION"          Γöé             Γöé
  10562. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10563. Γöé General Protection    Γöé "SIGSEGV"         Γöé No            Γöé
  10564. Γöé fault          Γöé              Γöé             Γöé
  10565. Γöé             Γöé              Γöé             Γöé
  10566. Γöé   "XCPT_ACCESS_VIOLATIΓöéN"             Γöé             Γöé
  10567. Γöé   "XCPT_DATATYPE_MISALΓöéGNMENT"          Γöé             Γöé
  10568. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10569. Γöé Ctrl-Break        Γöé "SIGBREAK"        Γöé Yes           Γöé
  10570. Γöé             Γöé              Γöé             Γöé
  10571. Γöé   "XCPT_SIGNAL"    Γöé              Γöé             Γöé
  10572. Γöé   ("XCPT_SIGNAL_BREAK"Γöé              Γöé             Γöé
  10573. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10574. Γöé Ctrl-C          Γöé "SIGINT"         Γöé Yes           Γöé
  10575. Γöé             Γöé              Γöé             Γöé
  10576. Γöé   "XCPT_SIGNAL"    Γöé              Γöé             Γöé
  10577. Γöé   ("XCPT_SIGNAL_INTR")Γöé              Γöé             Γöé
  10578. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10579. Γöé End process       Γöé "SIGTERM"         Γöé Yes           Γöé
  10580. Γöé             Γöé              Γöé             Γöé
  10581. Γöé   "XCPT_SIGNAL"    Γöé              Γöé             Γöé
  10582. Γöé   ("XCPT_SIGNAL_KILLPRΓöéC")            Γöé             Γöé
  10583. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10584.  
  10585. Note:  The Integer Overflow and Bound opcode exceptions will never be caused by 
  10586. code generated by VisualAge C++ compiler. 
  10587.  
  10588. The following OS/2 exceptions are also recognized, but have no corresponding C 
  10589. signal. If one of these OS/2 exceptions occurs, it is passed to the next 
  10590. available exception handler, or if none is registered, it is passed to the 
  10591. operating system: 
  10592.  
  10593. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10594. Γöé OS/2 EXCEPTION             Γöé CONTINUABLE?             Γöé
  10595. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10596. Γöé Out of stack exception         Γöé Yes                  Γöé
  10597. Γöé                    Γöé                    Γöé
  10598. Γöé   "XCPT_GUARD_PAGE_VIOLATION"    Γöé                    Γöé
  10599. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10600. Γöé Synchronous process termination    Γöé No                  Γöé
  10601. Γöé                    Γöé                    Γöé
  10602. Γöé   "XCPT_PROCESS_TERMINATE"      Γöé                    Γöé
  10603. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10604. Γöé Asynchronous process termination    Γöé No                  Γöé
  10605. Γöé                    Γöé                    Γöé
  10606. Γöé   "XCPT_ASYNC_PROCESS_TERMINATE"   Γöé                    Γöé
  10607. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10608. Γöé Unwind target not valid        Γöé No                  Γöé
  10609. Γöé                    Γöé                    Γöé
  10610. Γöé   "XCPT_INVALID_UNWIND_TARGET"    Γöé                    Γöé
  10611. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10612.  
  10613. An out-of-stack exception occurs when the guard page of the stack is accessed. 
  10614. When the operating system encounters this exception, it automatically allocates 
  10615. a new guard page and the exception is continued.  A nested-unable-to-grow-stack 
  10616. exception occurs when a guard page violation cannot be processed because there 
  10617. is insufficient stack space. Stack probes are also required to make automatic 
  10618. stack growth work properly. 
  10619.  
  10620. For more information on guard page allocation and automatic stack growth, see 
  10621. the User's Guide. 
  10622.  
  10623.  
  10624. ΓòÉΓòÉΓòÉ 16.7.2. OS/2 Exception Handling in Library Functions ΓòÉΓòÉΓòÉ
  10625.  
  10626. There are two classes of library functions that require special exception 
  10627. handling: math functions and critical functions. 
  10628.  
  10629. OS/2 exceptions occurring in all other library functions are treated as though 
  10630. they occurred in regular user code. 
  10631.  
  10632.  
  10633. ΓòÉΓòÉΓòÉ 16.7.2.1. Math Functions ΓòÉΓòÉΓòÉ
  10634.  
  10635. Before _Exception converts an OS/2 exception to a C signal, it first calls the 
  10636. VisualAge C++ library exception handler, _Lib_excpt. The _Lib_excpt function 
  10637. determines if the exception occurred in a math library function.  The 
  10638. _Lib_excpt function is declared as follows: 
  10639.  
  10640.    #include <os2.h>
  10641.  
  10642.    unsigned long _System _Lib_excpt(EXCEPTIONREPORTRECORD * report_rec,
  10643.                                     EXCEPTIONREGISTRATIONRECORD * reg_rec,
  10644.                                     CONTEXTRECORD * ecx,
  10645.                                     void * dummy);
  10646.  
  10647. If the exception does occur in a math function and it is a floating-point 
  10648. error, _Lib_excpt handles the exception and returns XCPT_CONTINUE_EXECUTION to 
  10649. the operating system to indicate the exception has been handled. Any signal 
  10650. handler function you may have established will not be called. 
  10651.  
  10652. Important  If you are creating your own exception handler, it should first call 
  10653. _Lib_excpt to ensure that the exception did not occur in a library function. 
  10654.  
  10655. If the cause of the OS/2 exception was not a floating-point error, the 
  10656. exception is returned to _Exception.  The _Exception function then converts the 
  10657. OS/2 exception to the corresponding C signal and performs one of the following 
  10658. actions: 
  10659.  
  10660.    1. Terminates the process.  If /Tx+ was specified, _Exception performs a 
  10661.       machine-state dump to file handle 2, unless the exception was SIGBREAK, 
  10662.       SIGINT, or SIGTERM, in which case the machine state is not meaningful. 
  10663.  
  10664.    2. Handles the exception and returns XCPT_CONTINUE_EXECUTION to the 
  10665.       operating system. 
  10666.  
  10667.    3. Calls the signal handler function provided by you for that signal. A 
  10668.       return from the signal handler results in either the return of 
  10669.       XCPT_CONTINUE_EXECUTION to the operating system or the termination of the 
  10670.       process as in the first action above. 
  10671.  
  10672.  For more information about exception-handling return codes, refer to the 
  10673.  Control Program Guide and Reference. 
  10674.  
  10675.  
  10676. ΓòÉΓòÉΓòÉ 16.7.2.2. Critical Functions ΓòÉΓòÉΓòÉ
  10677.  
  10678. All nonreentrant functions are classified as critical functions. Most I/O and 
  10679. allocation functions, and those that begin or end threads or processes, fall in 
  10680. this class. The critical functions are: 
  10681.  
  10682. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  10683. Γöé Table 7. Critical Functions                          Γöé
  10684. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10685. Γöé atexit       Γöé execv     Γöé freopen    Γöé putenv           Γöé
  10686. Γöé calloc       Γöé execve    Γöé fscanf    Γöé puts            Γöé
  10687. Γöé _cgets       Γöé execvp    Γöé fseek     Γöé raise            Γöé
  10688. Γöé clearerr      Γöé _execvpe   Γöé fsetpos    Γöé realloc           Γöé
  10689. Γöé _cprintf      Γöé exit     Γöé ftell     Γöé remove           Γöé
  10690. Γöé _cputs       Γöé fclose    Γöé fwrite    Γöé rename           Γöé
  10691. Γöé _cscanf      Γöé _fcloseall  Γöé _getch    Γöé rewind           Γöé
  10692. Γöé _debug_calloc   Γöé fdopen    Γöé _getche    Γöé _rmtmp           Γöé
  10693. Γöé _debug_free    Γöé feof     Γöé getenv    Γöé scanf            Γöé
  10694. Γöé _debug_heapmin   Γöé ferror    Γöé gets     Γöé setlocale          Γöé
  10695. Γöé _debug_malloc   Γöé fflush    Γöé _heap_check  Γöé setvbuf           Γöé
  10696. Γöé _debug_realloc   Γöé fgetc     Γöé _heapchk   Γöé signal           Γöé
  10697. Γöé _debug_ucalloc   Γöé fgetpos    Γöé _heapmin   Γöé _spawnl           Γöé
  10698. Γöé _debug_uheapmin  Γöé fgets     Γöé _heapset   Γöé _spawnle          Γöé
  10699. Γöé _debug_umalloc   Γöé fileno    Γöé _heap_walk  Γöé _spawnlp          Γöé
  10700. Γöé _dump_allocated  Γöé _flushall   Γöé _interupt   Γöé _spawnlpe          Γöé
  10701. Γöé _endthread     Γöé fopen     Γöé _kbhit    Γöé _spawnv           Γöé
  10702. Γöé _Exception     Γöé fprintf    Γöé _Lib_excpt  Γöé _spawnve          Γöé
  10703. Γöé execl       Γöé fputc     Γöé malloc    Γöé _spawnvp          Γöé
  10704. Γöé execle       Γöé fputs     Γöé _onexit    Γöé _spawnvpe          Γöé
  10705. Γöé execlp       Γöé fread     Γöé printf    Γöé system           Γöé
  10706. Γöé _execlpe      Γöé free     Γöé _putch    Γöé _tcalloc          Γöé
  10707. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  10708. Γöé tempnam      Γöé        Γöé        Γöé               Γöé
  10709. Γöé _tfree       Γöé        Γöé        Γöé               Γöé
  10710. Γöé _theapmin     Γöé        Γöé        Γöé               Γöé
  10711. Γöé _tmalloc      Γöé        Γöé        Γöé               Γöé
  10712. Γöé tmpfile      Γöé        Γöé        Γöé               Γöé
  10713. Γöé tmpnam       Γöé        Γöé        Γöé               Γöé
  10714. Γöé _trealloc     Γöé        Γöé        Γöé               Γöé
  10715. Γöé _uaddmem      Γöé        Γöé        Γöé               Γöé
  10716. Γöé _ucalloc      Γöé        Γöé        Γöé               Γöé
  10717. Γöé _ucreate      Γöé        Γöé        Γöé               Γöé
  10718. Γöé _udefault     Γöé        Γöé        Γöé               Γöé
  10719. Γöé _udestroy     Γöé        Γöé        Γöé               Γöé
  10720. Γöé _udump_allocated  Γöé        Γöé        Γöé               Γöé
  10721. Γöé _dump_allocated_deΓöéta       Γöé        Γöé               Γöé
  10722. Γöé _udump_allocated_dΓöélta      Γöé        Γöé               Γöé
  10723. Γöé ungetc       Γöé        Γöé        Γöé               Γöé
  10724. Γöé _ungetch      Γöé        Γöé        Γöé               Γöé
  10725. Γöé _uheapchk     Γöé        Γöé        Γöé               Γöé
  10726. Γöé _uheapmin     Γöé        Γöé        Γöé               Γöé
  10727. Γöé _uheapset     Γöé        Γöé        Γöé               Γöé
  10728. Γöé _uheap_walk    Γöé        Γöé        Γöé               Γöé
  10729. Γöé _umalloc      Γöé        Γöé        Γöé               Γöé
  10730. Γöé vfprintf      Γöé        Γöé        Γöé               Γöé
  10731. Γöé vprintf      Γöé        Γöé        Γöé               Γöé
  10732. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  10733.  
  10734. OS/2 exceptions in critical functions generally occur only if your program 
  10735. passes a pointer that is not valid to a library function, or if your program 
  10736. overwrites the library's data areas. Because calling a signal handler to handle 
  10737. an OS/2 exception from one of these functions can have unexpected results, a 
  10738. special exception handler is provided for critical functions. You cannot 
  10739. override this exception handler. 
  10740.  
  10741. If the OS/2 exception is synchronous (SIGFPE, SIGILL, or SIGSEGV), the default 
  10742. action is taken, which is to pass the exception on to the next registered 
  10743. exception handler. Any exception handler you may have registered will not be 
  10744. called, and will receive only the termination exception. 
  10745.  
  10746. If the OS/2 exception is asynchronous, it is deferred until the library 
  10747. function has finished. The exception is then passed to _Exception, which 
  10748. converts the exception to the corresponding C signal and performs the 
  10749. appropriate action. 
  10750.  
  10751. Note:  If you use console I/O functions (for example, gets) and a SIGINT, 
  10752. SIGBREAK, or SIGTERM signal occurs, the signal is deferred until the function 
  10753. returns, for example, after all data for the keyboard function has been 
  10754. entered.  To avoid this side effect, use a noncritical function like read or 
  10755. the OS/2 API DosRead to read data from the keyboard. 
  10756.  
  10757.  
  10758. ΓòÉΓòÉΓòÉ 16.8. Creating Your Own OS/2 Exception Handler ΓòÉΓòÉΓòÉ
  10759.  
  10760. You can use OS/2 APIs and the information provided in the <bsexcpt.h> header 
  10761. file found in the \IBMCPP\INCLUDE\os2 directory to create your own exception 
  10762. handlers to use alone or with the two provided handler functions. Exception 
  10763. handlers can be complex to write and difficult to debug, but creating your own 
  10764. offers you two advantages: 
  10765.  
  10766.    1. You receive more information about the error condition. 
  10767.    2. You can intercept any OS/2 exception.  The VisualAge C++ library passes 
  10768.       some exceptions back to the operating system because there is no C 
  10769.       semantic for handling them. 
  10770.  
  10771.  
  10772. ΓòÉΓòÉΓòÉ 16.8.1. Prototype of an OS/2 Exception Handler ΓòÉΓòÉΓòÉ
  10773.  
  10774. The prototype for all exception handlers is: 
  10775.  
  10776.    #define INCL_BASE
  10777.    #include <os2.h>
  10778.  
  10779.    APIRET APIENTRY MyExceptHandler(EXCEPTIONREPORTRECORD *,
  10780.                                    EXCEPTIONREGISTRATIONRECORD *,
  10781.                                    CONTEXTRECORD *,
  10782.                                    PVOID  dummy);
  10783.  
  10784. where: 
  10785.  
  10786.  APIRET  Specifies the return type of the function.  If you return from your 
  10787.          exception handler, you must return one of the following two values: 
  10788.  
  10789.            1. XCPT_CONTINUE_SEARCH indicates that the exception has not been 
  10790.               handled and tells the operating system to pass the exception to 
  10791.               the next exception handler. 
  10792.            2. XCPT_CONTINUE_EXECUTION indicates that the exception condition 
  10793.               has been corrected and tells the operating system to resume 
  10794.               running the application using the information in the 
  10795.               CONTEXTRECORD. 
  10796.  
  10797.  APIENTRY Defines the function linkage.  The OS/2 header files found in the 
  10798.          ibmcpp\include\os2 directory header files define APIENTRY as _System 
  10799.          linkage. Use the APIENTRY keyword rather than specifying the linkage 
  10800.          type yourself. Note that your exception handler must be an external 
  10801.          function; it cannot be static. 
  10802.  
  10803.  EXCEPTIONREPORTRECORD * Points to a structure that contains high-level 
  10804.          information about the exception. 
  10805.  
  10806.  EXCEPTIONREGISTRATIONRECORD * Points to the record that registered the 
  10807.          exception handler.  The address of the record is always on the stack. 
  10808.  
  10809.  CONTEXTRECORD * Points to a structure that contains information about the 
  10810.          state of the thread at the time of the exception, including the 
  10811.          register contents and the state of the floating-point unit and flags. 
  10812.          When an exception handler returns XCPT_CONTINUE_EXECUTION, the machine 
  10813.          state is reloaded from this structure.  You should only modify the 
  10814.          contents of this structure if you are sure your exception handler will 
  10815.          return XCPT_CONTINUE_EXECUTION. 
  10816.  
  10817.  PVOID   Is a pointer to void that you must pass back unchanged to the 
  10818.          operating system. 
  10819.  
  10820.  The exception handling structures are defined in the <bsexcpt.h> header file 
  10821.  found in the ibmcpp\include\os2 directory. 
  10822.  
  10823.  
  10824. ΓòÉΓòÉΓòÉ 16.8.2. Processing Exception Information ΓòÉΓòÉΓòÉ
  10825.  
  10826. When an exception occurs, the operating system provides a considerable amount 
  10827. of information. Of this, the information contained in the EXCEPTIONREPORTRECORD 
  10828. structure can be quite useful. 
  10829.  
  10830. The EXCEPTIONREPORTRECORD is defined as: 
  10831.  
  10832.    struct _EXCEPTIONREPORTRECORD
  10833.       {
  10834.       ULONG   ExceptionNum;
  10835.       ULONG   fHandlerFlags;
  10836.       struct  _EXCEPTIONREPORTRECORD *NestedERR;
  10837.       PVOID   ExceptionAddress;
  10838.       ULONG   cParameters;
  10839.       ULONG   ExceptionInfo[EXCEPTION_MAXIMUM_PARAMETERS];
  10840.       };
  10841.  
  10842. The structure fields provide the following information: 
  10843.  
  10844.  ExceptionNum 
  10845.          The exception number.  There are several exceptions that you will only 
  10846.          encounter by using an OS/2 exception handler because the VisualAge C++ 
  10847.          default handler passes them to the operating system to handle.  They 
  10848.          are: 
  10849.  
  10850.          XCPT_PROCESS_TERMINATE 
  10851.                    Indicates that the current thread has called DosExit, and 
  10852.                    the process is about to end.  Until your exception handler 
  10853.                    ends, the thread continues as though DosExit had not been 
  10854.                    called. 
  10855.  
  10856.          XCPT_ASYNC_PROCESS_TERMINATE 
  10857.                    Indicates that some other thread in the process has called 
  10858.                    DosExit and that your current thread is about to end also. 
  10859.                    You can decide to continue running the current thread and 
  10860.                    return the exception as handled. 
  10861.  
  10862.          XCPT_ACCESS_VIOLATION 
  10863.                    Indicates an invalid attempt was made to access memory 
  10864.                    (similar to the SIGSEGV signal).  When this exception 
  10865.                    occurs, the ExceptionInfo field provides the address that 
  10866.                    generated the exception and the type of access that was 
  10867.                    attempted (read or write). 
  10868.  
  10869.          XCPT_GUARD_PAGE_VIOLATION 
  10870.                    Indicates that the current thread tried to access a memory 
  10871.                    page marked as a guard page. Usually it means that your 
  10872.                    application has accessed a guard page on the stack.  In most 
  10873.                    cases, you will probably pass the exception to the operating 
  10874.                    system, which will allocate another 4K of committed memory 
  10875.                    for your thread and a new guard page.  The operating system 
  10876.                    requires about 1.5K to place the information about the 
  10877.                    exception on the stack and then call the exception handler. 
  10878.                    If you know you are running out of stack space, you may want 
  10879.                    to end your process. 
  10880.  
  10881.          XCPT_UNABLE_TO_GROW_STACK 
  10882.                    Indicates that the operating system tried to move your guard 
  10883.                    page, but no memory remained on the stack.  If you 
  10884.                    suppressed stack probe generation when you compiled (with 
  10885.                    the /Gs+ option), there may not be enough stack for you to 
  10886.                    even receive the exception, in which case your process 
  10887.                    terminates with an operating system trap. 
  10888.  
  10889.          You can also use the DosRaiseException API to create and raise your 
  10890.          own exceptions that you can then handle with your own exception 
  10891.          handler. 
  10892.  
  10893.  fHandlerFlags 
  10894.          This field indicates how the exception occurred and what you can do to 
  10895.          handle it.  It includes the following bits: 
  10896.  
  10897.          EH_NONCONTINUABLE 
  10898.                    You cannot continue running the thread once you leave the 
  10899.                    exception handler.  If you try to return 
  10900.                    XCPT_CONTINUE_EXECUTION, an error is generated. You cannot 
  10901.                    reset the bit.  However, you can intentionally set the bit 
  10902.                    to make an exception noncontinuable. 
  10903.  
  10904.          EH_UNWINDING 
  10905.                    A longjmp has been done over this exception handler and the 
  10906.                    handler is to be deregistered.  If your function uses a 
  10907.                    mutex semaphore (described in the Toolkit documentation), 
  10908.                    you should release it when you receive this exception. 
  10909.  
  10910.          EH_EXIT_UNWIND 
  10911.                    A DosExit call has been made and the exception has been 
  10912.                    passed back to the operating system.  This exception gives 
  10913.                    you an opportunity to do something before your exception 
  10914.                    handler is deregistered. 
  10915.  
  10916.          EH_NESTED_CALL 
  10917.                    An exception occurred while another exception was being 
  10918.                    handled. This situation should be handled carefully: each 
  10919.                    exception requires about 1.5K of stack, so nesting 
  10920.                    exceptions too deep can cause you to run out of stack. 
  10921.  
  10922.  _EXCEPTIONREPORTRECORD *NestedERR 
  10923.          If a nested exception occurs, the information about the exception is 
  10924.          found in this structure. 
  10925.  
  10926.  ExceptionAddress 
  10927.          This field contains the instruction address where the exception 
  10928.          occurred.  Typically, you cannot determine at run time which function 
  10929.          caused the problem. 
  10930.  
  10931.  ExceptionInfo 
  10932.          For some exceptions, this field may contain additional information. 
  10933.          For example, if XCPT_ACCESS_VIOLATION occurs, it contains the address 
  10934.          at which the memory access failed. 
  10935.  
  10936.  cParameters 
  10937.          This field contains the number of bytes of information. 
  10938.  
  10939.  The CONTEXTRECORD structure contains information about the machine state of 
  10940.  the thread.  It is generally of limited use to a high-level programmer because 
  10941.  to continue a process after a synchronous exception, you would need to modify 
  10942.  the CONTEXTRECORD, and it is extremely difficult to ensure the exception 
  10943.  handler code is correct for all possible conditions.  You should modify the 
  10944.  CONTEXTRECORD only if you have no other alternative to correct your program. 
  10945.  
  10946.  You can use the CONTEXTRECORD to trace the stack and produce useful debugging 
  10947.  information. Because the VisualAge C++ and operating system calling 
  10948.  conventions preserve some registers across calls, you cannot reconstruct the 
  10949.  registers by traversing the stack to recover from the exception. 
  10950.  
  10951.  The 32-bit stack usually looks like the following: 
  10952.  
  10953.                 Γöé         .            Γöé
  10954.            Γöé     Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  10955.            Γöé     Γöé    Return  Address    Γöé             Γöé
  10956.            Γöé     Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ             Γöé
  10957.            Γöö ΓöÇΓöÇΓöÇΓöÇ Γöñ         EBP          Γöé  ΓöÇΓöÇΓöÇ ΓöÉ        Γöé
  10958.                 Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ     Γöé        Γöé   stack  grows
  10959.                 Γöé         .            Γöé     Γöé        Γöé      down
  10960.                          .                 Γöé        Γöé
  10961.                 Γöé         .            Γöé     Γöé        Γöé
  10962.                 Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ     Γöé        Γöé
  10963.                 Γöé    Return  Address    Γöé     Γöé        
  10964.                 Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ     Γöé
  10965.            Γöî ΓöÇΓöÇΓöÇ  Γöé         EBP          Γö£ ΓöÇΓöÇΓöÇΓöÇ Γöÿ
  10966.            Γöé     Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  10967.            Γöé     Γöé         .            Γöé
  10968.            Γöé              .
  10969.            Γöé     Γöé         .            Γöé
  10970.            Γöé     Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  10971.            Γöé     Γöé    Return  Address    Γöé
  10972.            Γöé     Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  10973.            Γöö ΓöÇΓöÇΓöÇΓöÇ Γöñ         EBP          Γöé  ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ  EBP  from  exception  context
  10974.                 Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ              record  points  here
  10975.                 Γöé         .            Γöé
  10976.                 Γöé         .            Γöé
  10977.  
  10978.  Note: 
  10979.  
  10980.    1. If your code is optimized, you may not be able to trace the EBP chain. 
  10981.  
  10982.    2. If the stack is damaged, you may not be able to trace the EBP chain 
  10983.       correctly. 
  10984.  
  10985.    3. You cannot trace over 16-bit calls. 
  10986.  
  10987.    4. You cannot trace over calls to inlined functions. 
  10988.  
  10989.  
  10990. ΓòÉΓòÉΓòÉ 16.8.3. Example of Exception Handling ΓòÉΓòÉΓòÉ
  10991.  
  10992. The following example shows a program similar to the one used for the signal 
  10993. handling example on page Example of a C Signal Handler.  In this example, an 
  10994. exception handler is used instead of a signal handler to detect access to 
  10995. memory that is not valid. 
  10996.  
  10997.  
  10998. Example Illustrating an Exception Handler
  10999.  
  11000. #define  INCL_DOS
  11001. #define  INCL_NOPMAPI
  11002. #include <os2.h>
  11003. #include <stdlib.h>
  11004. #include <setjmp.h>
  11005. #include <stdio.h>
  11006. #include <stddef.h>        /* for _threadid */
  11007.  
  11008. void * tss_array[100];     /* array for 100 thread-specific pointers */
  11009.  
  11010. APIRET APIENTRY MyExceptionHandler(EXCEPTIONREPORTRECORD *,
  11011.                                    EXCEPTIONREGISTRATIONRECORD *,
  11012.                                    CONTEXTRECORD *,
  11013.                                    PVOID);
  11014. #pragma map(_Exception,"MyExceptionHandler")
  11015. #pragma handler(chkptr)
  11016.  
  11017. int chkptr(void * ptr, int size)
  11018. {
  11019.     volatile char c;       /* volatile to insure access occurs */
  11020.     int valid = 0;         /* count of valid bytes */
  11021.     char * p = ptr;        /* to satisfy the type checking for p++ */
  11022.     jmp_buf jbuf;          /* put the jump buffer in automatic storage */
  11023.                            /*   so it is unique to this thread         */
  11024.  
  11025.     PTIB ptib;             /* to get the TIB pointer */
  11026.     PPIB ppib;
  11027.     unsigned int tid = *_threadid;   /* get the thread id */
  11028.     UCHAR FileData [100]
  11029.     ULONG Wrote;
  11030.  
  11031.     /* create a thread specific jmp_buf */
  11032.     tss_array[tid] = (void *) jbuf;
  11033.  
  11034.     if (!setjmp(jbuf)) {   /* provide a point to return to */
  11035.  
  11036.        while (size--)      /* scan the storage */
  11037.        {
  11038.           c = *p++;
  11039.           valid++;
  11040.        }
  11041.     }
  11042.  
  11043.     return valid;                    /* return number of valid bytes */
  11044. }
  11045.  
  11046. /* the exception handler itself */
  11047.  
  11048. APIRET APIENTRY MyExceptionHandler(EXCEPTIONREPORTRECORD * report_rec,
  11049.                                    EXCEPTIONREGISTRATIONRECORD * register_rec,
  11050.                                    CONTEXTRECORD * context_rec,
  11051.                                    PVOID dummy)
  11052. {
  11053.    unsigned int tid = *_threadid;   /* get the thread id */
  11054.  
  11055.    /* check the exception flags */        1
  11056.    if (EH_EXIT_UNWIND & report_rec->fHandlerFlags) /* exiting */
  11057.       return XCPT_CONTINUE_SEARCH;
  11058.  
  11059.    if (EH_UNWINDING & report_rec->fHandlerFlags)   /* unwinding */
  11060.       return XCPT_CONTINUE_SEARCH;
  11061.  
  11062.    if (EH_NESTED_CALL & report_rec->fHandlerFlags) /* nested exceptions */
  11063.       return XCPT_CONTINUE_SEARCH;
  11064.  
  11065.    /* determine what the exception is */  2
  11066.    if (report_rec->ExceptionNum == XCPT_ACCESS_VIOLATION) {
  11067.       /* this is the one that is expected */
  11068.  
  11069.     UCHAR FileData[100];
  11070.     ULONG Wrote;
  11071.  
  11072.     strcpy(FileData, "Detected invalid storage address %d\n\r");
  11073.     DosWrite(2, (PVOID)FileData, strlen(FileData), &Wrote, stepnum);
  11074.       longjmp((int *)tss_array[tid],1);   /* return to the point of the */
  11075.                                           /* setjmp call without        */
  11076.                                           /* restarting the while loop  */
  11077.    } /* endif */
  11078.                                           3
  11079.    return XCPT_CONTINUE_SEARCH;      /* if it is a different exception */
  11080. }
  11081.  
  11082.       1 The first thing an exception handler should do is check the exception 
  11083.       flags.  If EH_EXIT_UNWIND is set, meaning the thread is ending, the 
  11084.       handler tells the operating system to pass the exception to the next 
  11085.       exception handler. It does the same if the EH_UNWINDING flag is set, the 
  11086.       flag that indicates this exception handler is being removed. 
  11087.  
  11088.       The EH_NESTED_CALL flag indicates whether the exception occurred within 
  11089.       an exception handler. If the handler does not check this flag, recursive 
  11090.       exceptions could occur until there is no stack remaining. 
  11091.  
  11092.       2 The handler checks the exception number.  In general, you should check 
  11093.       for only the exceptions that you expect to encounter so any addition of 
  11094.       new exception numbers does not affect your code. Assuming the exception 
  11095.       is XCPT_ACCESS_VIOLATION, the exception handler prints a message and 
  11096.       calls longjmp to return to the chkptr function. 
  11097.  
  11098.       3 If the exception is not the expected one, the handler tells the 
  11099.       operating system to pass it to the next exception handler. 
  11100.  
  11101.  Important  Return XCPT_CONTINUE_EXECUTION from an exception handler only if 
  11102.             you know that the thread can continue to run because either: 
  11103.  
  11104.    1. The exception is asynchronous and can be restarted. 
  11105.    2. You have changed the thread state so that the thread can continue. 
  11106.  
  11107.  If you return XCPT_CONTINUE_EXECUTION when neither of these conditions is 
  11108.  true, you could generate a new exception each time your exception handler 
  11109.  ends, eventually causing your process to lock. 
  11110.  
  11111.  
  11112. ΓòÉΓòÉΓòÉ 16.9. Registering an OS/2 Exception Handler ΓòÉΓòÉΓòÉ
  11113.  
  11114. The VisualAge C++ compiler automatically registers and deregisters the 
  11115. _Exception handler for each thread or process so the _Exception is the first 
  11116. exception handler to be called when an exception occurs. To explicitly register 
  11117. _Exception for a function, use the #pragma handler directive before the 
  11118. function definition. This directive generates the code to register the 
  11119. exception handler before the function runs.  Code to remove the exception 
  11120. handler when the function ends is also generated. 
  11121.  
  11122. The format of the directive is: 
  11123.  
  11124.    #pragma handler(function)
  11125.  
  11126. where function is the name of the function for which the exception handler is 
  11127. to be registered. 
  11128.  
  11129. Note:  If you use DosCreateThread to create a new thread, you must use #pragma 
  11130. handler to register the VisualAge C++ exception handler for the function that 
  11131. the new thread will run. 
  11132.  
  11133. You can register your own exception handler in place of _Exception using these 
  11134. directives: 
  11135.  
  11136.    #pragma map(_Exception, "MyExceptHandler")
  11137.    #pragma handler(myfunc)
  11138.  
  11139. The #pragma map directive tells the compiler that all references to the name 
  11140. _Exception are to be converted to MyExceptHandler.  The #pragma handler 
  11141. directive would normally register the exception handler _Exception for the 
  11142. function myfunc, but because of the name mapping, MyExceptHandler is actually 
  11143. registered.  The compiler also generates code to deregister MyExceptHandler 
  11144. when myfunc returns. 
  11145.  
  11146. If you use the method described above, you can have only one exception handler 
  11147. per module.  You may need to place functions in separate modules to get the 
  11148. exception handling you want. The handler is registered on function entry and 
  11149. deregistered on exit; you cannot register the handler over only part of a 
  11150. function. For more flexibility, you can use OS/2 APIs to register your 
  11151. exception handler. 
  11152.  
  11153. The operating system finds exception handlers by following a chain rooted in 
  11154. the thread information block (TIB).  When you register an exception handler, 
  11155. you place the address of the handler and the chain pointer from the TIB in an 
  11156. EXCEPTIONREGISTRATIONRECORD structure, and then update the TIB to point to the 
  11157. new EXCEPTIONREGISTRATIONRECORD. 
  11158.  
  11159. When you use #pragma handler, the EXCEPTIONREGISTRATIONRECORD is generated and 
  11160. attached to the chain for you.  You can register your own records using the 
  11161. DosSetExceptionHandler and DosUnsetExceptionHandler APIs, as shown in the 
  11162. following example: 
  11163.  
  11164. #define INCL_BASE
  11165. #include <os2.h>
  11166.  
  11167. /* the prototype for the exception handler */
  11168. APIRET APIENTRY MyExceptionHandler(EXCEPTIONREPORTRECORD *,
  11169.                                    EXCEPTIONREGISTRATIONRECORD *,
  11170.                                    CONTEXTRECORD *,
  11171.                                    PVOID);
  11172. int myfunction(...)
  11173. {
  11174.    EXCEPTIONREGISTRATIONRECORD err = { NULL,MyExceptionHandler };
  11175.  
  11176.    DosSetExceptionHandler(&err);  /* register */
  11177.    .
  11178.    .
  11179.    .
  11180.    DosUnsetExceptionHandler(&err);  /* deregister */
  11181. }
  11182.  
  11183. Using the OS/2 APIs provides more flexibility than using #pragma handler. You 
  11184. can register the exception handler over only a part of the function if you 
  11185. want.  You can also register more than one exception handler for a function. 
  11186. When you use DosSetExceptionHandler to register your handler, you can also make 
  11187. the EXCEPTIONREGISTRATIONRECORD part of a larger structure and then access the 
  11188. information in that structure from inside the exception handler. 
  11189.  
  11190. You must deregister the exception handler before the function ends.  If you do 
  11191. not, the next exception that occurs on the thread can have unexpected and 
  11192. undefined results. When you use pragma handler, the exception handler is 
  11193. automatically deregistered for you. 
  11194.  
  11195. The following diagram shows the TIB chain: 
  11196.  
  11197.                TIB
  11198.  Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  11199.  Γöé               .                Γöé
  11200.  Γöé               .                Γöé
  11201.  Γöé               .                Γöé
  11202.  Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  11203.  Γöé  chain  pointer  ( tib _ pexchain )  Γö£ ΓöÇΓöÇΓöÇ ΓöÉ
  11204.  Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ    Γöé
  11205.                                     Γöé
  11206.                Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöÿ
  11207.                Γöé
  11208.                Γöé                            Stack
  11209.                Γöé          Γöî ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÉ
  11210.                Γöé          Γöé                    .                    Γöé
  11211.                Γöé          Γöé                    .                    Γöé
  11212.                Γöé          Γöé                    .                    Γöé
  11213.  Decreasing     Γöé          Γöé                                        Γöé
  11214.  Memory         Γöé          Γöé      EXCEPTIONREGISTRATIONRECORD  1      Γöé
  11215.  Addresses      Γöé          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  11216.      Γöé          Γöé          Γöé  pointer  to  handler  ( ExceptionHandler )  Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ   Handler  Function
  11217.      Γöé          Γöé          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  11218.      Γöé          Γöé    - 1   ΓöÇΓöÇ Γöñ     chain  pointer  ( prev _ structure )      Γöé  ΓöÇΓöÇ ΓöÉ
  11219.      Γöé          Γöé          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ    Γöé
  11220.      Γöé          Γöé          Γöé                    .                    Γöé    Γöé
  11221.      Γöé          Γöé          Γöé                    .                    Γöé    Γöé
  11222.      Γöé          Γöé          Γöé                    .                    Γöé    Γöé
  11223.      Γöé          Γöé          Γöé      EXCEPTIONREGISTRATIONRECORD  2      Γöé    Γöé
  11224.      Γöé          Γöé          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ    Γöé
  11225.      Γöé          Γöé          Γöé  pointer  to  handler  ( ExceptionHandler )  Γö£ ΓöÇΓöÇΓöÇ Γö╝ ΓöÇΓöÇ   Handler  Function
  11226.      Γöé          Γöé          Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ    Γöé
  11227.      Γöé          Γöö ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ  Γöé     chain  pointer  ( prev _ structure )      Γö£ ΓöÇΓöÇΓöÇ Γöÿ
  11228.      Γöé                    Γö£ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ Γöñ
  11229.      Γöé                    Γöé                    .                    Γöé
  11230.      Γöé                    Γöé                    .                    Γöé
  11231.                          Γöé                    .                    Γöé
  11232.  
  11233. TIB Chain 
  11234.  
  11235. Names in parentheses are the names of the fields of the 
  11236. EXCEPTIONREGISTRATIONRECORD structure. 
  11237.  
  11238. Each EXCEPTIONREGISTRATIONRECORD is chained to the next. When an exception 
  11239. occurs, the operating system begins at the TIB and goes to each 
  11240. EXCEPTIONREGISTRATIONRECORD in turn. It calls the exception handler and passes 
  11241. it the exception information. The exception handler either handles the 
  11242. exception or tells the operating system to pass the exception to the next 
  11243. handler in the chain.  If the last exception handler in the chain, identified 
  11244. by chain pointer with value -1, does not handle the exception, the operating 
  11245. system takes the default action. 
  11246.  
  11247. An EXCEPTIONREGISTRATIONRECORD must be on the stack, and each record must be at 
  11248. a higher address than the previous one. 
  11249.  
  11250.  
  11251. ΓòÉΓòÉΓòÉ 16.10. Handling Signals and OS/2 Exceptions in DLLs ΓòÉΓòÉΓòÉ
  11252.  
  11253. Handling signals and OS/2 exceptions in DLLs is no different than handling 
  11254. signals in executable files, providing all your DLLs and the executable files 
  11255. that use them are created using the VisualAge C++ compiler, and only one 
  11256. VisualAge C++ library environment exists for your entire application (your 
  11257. executable module and all DLLs). 
  11258.  
  11259. The library environment is a section of information associated with and 
  11260. statically linked to the VisualAge C++ library itself. You can be sure your 
  11261. program has only one library environment if: 
  11262.  
  11263.    1. It consists of a single executable module.  By definition, a single 
  11264.       module has only one copy of the VisualAge C++ library environment 
  11265.       regardless of whether it links to the library statically or dynamically. 
  11266.  
  11267.    2. Your executable module dynamically links to a single DLL that is 
  11268.       statically bound to the VisualAge C++ runtime library and that uses the 
  11269.       VisualAge C++ library functions. The executable module then accesses the 
  11270.       library functions through the DLL. 
  11271.  
  11272.    3. Your executable modules and DLLs all dynamically link to the 
  11273.       VisualAge C++ runtime library. 
  11274.  
  11275.  Note:  The licensing agreement does not allow you to ship the VisualAge C++ 
  11276.  library DLLs with your application. You can, however, create your own version 
  11277.  of the runtime library and dynamically link to it from all of your modules, 
  11278.  ensuring that only one copy of the library environment is used by your 
  11279.  application. If you call any VisualAge C++ library functions from a user DLL, 
  11280.  you must call them all from that DLL. The method of creating your own runtime 
  11281.  library is described in Creating Your Own Runtime Library DLLs. 
  11282.  
  11283.  If more than one of your modules is statically linked to the VisualAge C++ 
  11284.  library, your program has more than one library environment. Because there is 
  11285.  no communication between these environments, certain operations and functions 
  11286.  become restricted: 
  11287.  
  11288.      Stream I/O.  You can pass the file pointer between modules and read to or 
  11289.       write from the stream in any module, but you cannot open a stream in one 
  11290.       library environment or module and close it in another. 
  11291.  
  11292.      Memory allocation.  You can pass the storage pointer between modules, but 
  11293.       you cannot allocate storage in one library environment and free or 
  11294.       reallocate it in another. 
  11295.  
  11296.      strtok, rand, and srand functions. A call to any of these functions in 
  11297.       one library environment has no effect on calls made in another 
  11298.       environment. 
  11299.  
  11300.      errno and _doserrno values.  The setting of these variables in one 
  11301.       library environment has no effect on their values in another. 
  11302.  
  11303.      Signal and OS/2 exception handlers.  The signal and exception handlers 
  11304.       for a library environment have no effect on the handlers for another 
  11305.       environment. 
  11306.  
  11307.  In general, it is easier to use only one library environment, but not always 
  11308.  possible.  For example, if you are building a DLL that will be called by a 
  11309.  number of applications, you should assume that there may be multiple library 
  11310.  environments and code your DLL accordingly. 
  11311.  
  11312.  The following section describes how to use signal and exception handling when 
  11313.  your program has more than one library environment. 
  11314.  
  11315.  
  11316. ΓòÉΓòÉΓòÉ 16.10.1. Signal and Exception Handling with Multiple Library Environments ΓòÉΓòÉΓòÉ
  11317.  
  11318. When you have multiple library environments, you must treat signal and 
  11319. exception handlers in a slightly different manner than you would with a single 
  11320. library environment. Otherwise, the wrong handler could be called to handle a 
  11321. signal or OS/2 exception. 
  11322.  
  11323. For example, if you have an executable module and a DLL, each with its own 
  11324. library environment, the _Exception exception handler is automatically 
  11325. registered for the executable module when it starts. When the executable module 
  11326. calls a function in the DLL, the thread of execution passes to the DLL.  If an 
  11327. OS/2 exception then occurs in the code in the DLL, it is actually handled by 
  11328. the exception handler in the executable module's library environment.  Any 
  11329. signal handling set up in the DLL is ignored. 
  11330.  
  11331. When you have more than one library environment, you must ensure that an OS/2 
  11332. exception is always handled by the exception handler for the library 
  11333. environment where the exception occurred. 
  11334.  
  11335. Include #pragma handler statements in your DLL for every function in the DLL 
  11336. that can be called from another module.  This directive ensures the exception 
  11337. handler for the DLL's library environment is correctly registered when the 
  11338. function is called and deregistered when the function returns to the calling 
  11339. module. If functions in your executable module can themselves be called back to 
  11340. from a DLL, include a #pragma handler statement for each of them also. 
  11341.  
  11342.  
  11343. ΓòÉΓòÉΓòÉ 16.11. Using OS/2 Exception Handlers for Special Situations ΓòÉΓòÉΓòÉ
  11344.  
  11345. Using exception handlers can be especially helpful in the following situations: 
  11346.  
  11347.      In multithread programs that use OS/2 semaphores. If you acquire a 
  11348.       semaphore and then use longjmp either explicitly or through a signal 
  11349.       handler to move to another place in your program, the semaphore is still 
  11350.       owned by your code.  Other threads in your program may not be able to 
  11351.       obtain ownership of the semaphore. 
  11352.  
  11353.       If you register an exception handler for the function where the semaphore 
  11354.       is requested, the handler can check for the unwind operation that occurs 
  11355.       as a result of a longjmp call.  If it encounters an unwind operation, it 
  11356.       can then release the semaphore. 
  11357.  
  11358.      In system DLLs.  Using an exception handler allows you to run process 
  11359.       termination routines even if your DLL has global initialization and 
  11360.       termination. 
  11361.  
  11362.       When a process terminates, functions are called in the following order: 
  11363.  
  11364.         1. Functions registered with the atexit or _onexit functions. 
  11365.         2. Exception handlers for termination exceptions. 
  11366.         3. Functions registered with the DosExitList API. 
  11367.         4. DLL termination routines. 
  11368.  
  11369.       You can include process termination routines in your exception handler 
  11370.       and they will be performed before the DLL termination routines are 
  11371.       called. 
  11372.  
  11373.  
  11374. ΓòÉΓòÉΓòÉ 16.12. OS/2 Exception Handling Considerations ΓòÉΓòÉΓòÉ
  11375.  
  11376. All the restrictions for signal handling described on page Signal Handling 
  11377. Considerations apply to exception handling as well.  There are also a number of 
  11378. additional considerations you should keep in mind when you use exception 
  11379. handling: 
  11380.  
  11381.      You must register an exception handler whenever you change library 
  11382.       environments to ensure that exception handling is provided for all C 
  11383.       code. 
  11384.  
  11385.      Ensure that you always deregister your exception handler. If you do not, 
  11386.       your process typically ends abnormally.  It is very difficult to discover 
  11387.       this problem through debugging.  If you use #pragma handler, the handler 
  11388.       is automatically deregistered; if you use the OS/2 APIs, you must call 
  11389.       DosUnsetExceptionHandler. 
  11390.  
  11391.      If you register your own exception handler, the OS/2 exceptions you 
  11392.       handle are not seen by a signal handler.  The exceptions you do not 
  11393.       handle are passed to the next exception handler.  If the next handler is 
  11394.       the VisualAge C++ default handler _Exception, it converts the exception 
  11395.       to a signal and calls the appropriate signal handler. 
  11396.  
  11397.      If you are using OS/2 semaphores and an exception occurs while your code 
  11398.       owns a semaphore, you must ensure that the semaphore is released.  You 
  11399.       can release the semaphore either by continuing the exception or by 
  11400.       explicitly releasing the semaphore in the signal handler. 
  11401.  
  11402.      Always check the exception flags to determine how the exception occurred. 
  11403.       Any exception handler can be unwound by a subsequent handler. 
  11404.  
  11405.      Keep your exception handler simple and specific.  Exception handlers are 
  11406.       easier to write and maintain if you limit what they can do.  A handler 
  11407.       that does everything can be very large and very complicated. 
  11408.  
  11409.      Check for and handle only the exceptions that you expect to encounter, 
  11410.       and provide a default exception handler to handle the unexpected.  If the 
  11411.       operating system adds new exceptions, or if you create your own, the 
  11412.       default handler will handle them. 
  11413.  
  11414.      If you are using your own exception handler, it receives the exception 
  11415.       registration record when an exception occurs, as described in Registering 
  11416.       an OS/2 Exception Handler.  Do not use the return address of the calling 
  11417.       function to tell you where to resume execution, because the values of the 
  11418.       registers other than EBP (for example, EBX, EBI, and EDI) at the return 
  11419.       are generally not available to your exception handler. 
  11420.  
  11421.      You need approximately 1.5K of stack remaining for the operating system 
  11422.       to be able to call your exception handler. If you do not have enough 
  11423.       stack left, the operating system terminates your process. 
  11424.  
  11425.      Neither of the VisualAge C++ default exception handlers are available in 
  11426.       the subsystem libraries. Because the subsystem libraries contain no 
  11427.       critical or math functions, the _Lib_excpt function is not required. 
  11428.  
  11429.  
  11430. ΓòÉΓòÉΓòÉ 16.12.1. Restricted OS/2 APIs ΓòÉΓòÉΓòÉ
  11431.  
  11432. When you use the VisualAge C++ default exception handlers, certain OS/2 APIs 
  11433. can interfere with exception handling: 
  11434.  
  11435.  DosCreateThread This API does not automatically register an exception handler 
  11436.          for the new thread.  Use _beginthread instead, or use #pragma handler 
  11437.          before the DosCreateThread call to register the handler for the 
  11438.          thread. 
  11439.  
  11440.  DosExit This API does not perform all necessary library termination routines. 
  11441.          Instead, use exit or _exit, abort, or _endthread, or simply fall out 
  11442.          of main. 
  11443.  
  11444.  DosUnwindException This API can unwind or remove the VisualAge C++ exception 
  11445.          handlers from the stack. Use longjmp instead. 
  11446.  
  11447.  DosSetSignalExceptionFocus Using this API to remove the signal focus from a 
  11448.          VisualAge C++ application may prevent you from receiving SIGINT and 
  11449.          SIGBREAK exceptions from the keyboard. 
  11450.  
  11451.  DosAcknowledgeSignalException This API interferes with the VisualAge C++ 
  11452.          handling of signal exceptions.  The library exception handler 
  11453.          acknowledges signals for you. 
  11454.  
  11455.  DosEnterMustComplete This API can be used to delay the handling of 
  11456.          asynchronous exceptions, including termination exceptions, until a 
  11457.          section of code has ended.  You must call DosExitMustComplete at the 
  11458.          end of the section to reenable the exception handling. 
  11459.  
  11460.  DosEnterCritSec This API prevents execution from switching between threads 
  11461.          until a section of code has ended.  You must call DosExitCritSec at 
  11462.          the end of the critical section of code.  Use these APIs only if you 
  11463.          cannot use a mutex semaphore. If you must use them, keep critical 
  11464.          sections short and avoid including calls that may get blocked. 
  11465.  
  11466.  
  11467. ΓòÉΓòÉΓòÉ 16.12.2. Handling Floating-Point Exceptions ΓòÉΓòÉΓòÉ
  11468.  
  11469. Floating-point exceptions require special exception handling. In general, you 
  11470. cannot retry a floating-point exception without a significant knowledge of both 
  11471. the 80387 chip and the application that generated the exception. Because 
  11472. knowledge of your application is beyond the capabilities of the VisualAge C++ 
  11473. library, it treats a floating-point exception as a terminating condition. 
  11474.  
  11475. You can use the _control87 function and the bit mask values defined in 
  11476. <float.h> to mask floating-point exceptions, that is, to prevent them from 
  11477. being reported. Each bit mask corresponds to a unique floating-point exception 
  11478. that can be masked individually. Masking exceptions also changes the state of 
  11479. the floating-point control word for the 80387 chip. When a floating-point 
  11480. exception is masked, the 80387 chip performs a predetermined corrective action. 
  11481.  
  11482. The bit masks are: 
  11483.  
  11484.  EM_INVALID     Mask exceptions resulting from floating-point operations that 
  11485.                 are not valid.  Such an exception can be caused by a 
  11486.                 floating-point value that is not valid, such as a signalling 
  11487.                 NaN, or by a problem with the 80387 stack.  The corrective 
  11488.                 action taken by the 80387 chip is to return a quiet NaN. 
  11489.  
  11490.                 Note:  Because this type of exception indicates a serious 
  11491.                 problem, you should not mask it off. 
  11492.  
  11493.  EM_DENORMAL    Mask exceptions resulting from the use of denormal 
  11494.                 floating-point values.  The corrective action is to use these 
  11495.                 values and allow for gradual underflow.  This type of exception 
  11496.                 is not meaningful under the VisualAge C++ compiler and is 
  11497.                 masked off by default. 
  11498.  
  11499.  EM_ZERODIVIDE  Mask the divide-by-zero exception.  The 80387 chip returns a 
  11500.                 value of infinity. 
  11501.  
  11502.  EM_OVERFLOW    Mask the overflow exception.  The 80387 chip returns a value of 
  11503.                 infinity. 
  11504.  
  11505.  EM_UNDERFLOW   Mask the underflow exception.  The 80387 chip returns either a 
  11506.                 denormal number or zero. 
  11507.  
  11508.  EM_INEXACT     Mask the exception that indicates precision has been lost. 
  11509.                 Because this type of exception is only useful when performing 
  11510.                 integer arithmetic, while the 80387 chip is used for 
  11511.                 floating-point arithmetic only, the exception is not meaningful 
  11512.                 and the 80387 chip ignores it.  This exception is masked off by 
  11513.                 default. 
  11514.  By default, the following bit masks are masked on by default.  That is, the 
  11515.  exceptions that they correspond to are not masked: 
  11516.  
  11517.      EM_INVALID 
  11518.      EM_ZERODIVIDE 
  11519.      EM_OVERFLOW 
  11520.      EM_UNDERFLOW 
  11521.  These bit masks are masked off by default.  This means that the exceptions 
  11522.  that they correspond to are masked by default: 
  11523.  
  11524.      EM_DENORMAL 
  11525.      EM_INEXACT 
  11526.  
  11527.  For example, to mask the floating-point underflow exception from being 
  11528.  reported, you would code in your source file: 
  11529.  
  11530.      oldstate = _control87(EM_UNDERFLOW, EM_UNDERFLOW);
  11531.  
  11532.  To mask it on again, you would code: 
  11533.  
  11534.      oldstate = _control87(0, EM_UNDERFLOW);
  11535.  
  11536.  You can also reset the entire floating-point control word to the default state 
  11537.  with the _fpreset function.  Both _fpreset and _control87 are described in the 
  11538.  C Library Reference. 
  11539.  
  11540.  Important  Because the VisualAge C++ math functions defined in <math.h> use 
  11541.             the 80387 chip, make sure that when you call any of them, the 
  11542.             floating-point control word is set to the default state to ensure 
  11543.             exceptions are handled correctly by the VisualAge C++ library. 
  11544.  
  11545.  Note also that the state of the floating-point control word is unique for each 
  11546.  thread, and changing it in one thread does not affect any other thread. 
  11547.  
  11548.  
  11549. ΓòÉΓòÉΓòÉ 16.13. Interpreting Machine-State Dumps ΓòÉΓòÉΓòÉ
  11550.  
  11551. Note:  This section provides information to be used for Diagnosis, 
  11552. Modification, or Tuning purposes.  This information is not intended for use as 
  11553. a programming interface. 
  11554.  
  11555. If you rebuild your program with the /TI+ option, the IPMD debugger will 
  11556. identify where in the source an exception took place.  If the problem does not 
  11557. appear or involves many process or timing problems, you can use the kernel 
  11558. debugger instead. For details on using the kernel debugger, see the Kernel 
  11559. Debug Reference. 
  11560.  
  11561. If you specify the /Tx+ option, when a process is ended because of an unhandled 
  11562. or incorrectly handled exception, the exception handler performs a 
  11563. machine-state dump. A machine-state dump consists of a number of runtime 
  11564. messages that show information about the state of the system, such as the 
  11565. contents of the registers and the reason for the exception. This information is 
  11566. sent to file handle 2, which is usually associated with stderr. You can also 
  11567. use the _set_crt_msg_handle function to redirect the messages to a file.  See 
  11568. the C Library Reference for more information about this function. 
  11569.  
  11570. If you do not specify /Tx+, a message is generated giving the exception and the 
  11571. address at which it occurred. 
  11572.  
  11573. For example, the following program generates a floating-point exception. 
  11574. Because the exception cannot be handled, a machine-state dump is performed. 
  11575. Example of a Machine-State Dump shows what is sent to stderr and explains the 
  11576. messages in the dump. 
  11577.  
  11578.  
  11579. Program to Cause a Machine-State Dump
  11580.  
  11581. #include <math.h>
  11582.  
  11583. int main(void)
  11584. {
  11585.    _Packed union SIGNAN {       /* a union which allows us to set */
  11586.       double dbl;               /*  the parts of a double value   */
  11587.       _Packed struct {
  11588.          unsigned int siglow : 26;
  11589.          unsigned int sighigh : 26;
  11590.          unsigned int exp : 11;
  11591.          unsigned int sign : 1;
  11592.       } dblrep;
  11593.    } signan;
  11594.    double x;
  11595.  
  11596.    /* set the double value to a signalling */
  11597.    /* NaN, which the library cannot handle */
  11598.    signan.dblrep.sign = 0;
  11599.    signan.dblrep.exp = 0x7ff;
  11600.    signan.dblrep.sighigh = 0;
  11601.    signan.dblrep.siglow = 1;
  11602.  
  11603.    /* now call a math function with a */
  11604.    /*  signalling NaN to cause a trap */
  11605.    x = atan2(signan.dbl,2.0);
  11606.  
  11607.    /* the program never gets here */
  11608.    return 0;
  11609. }
  11610.  
  11611.  
  11612. Example of a Machine-State Dump
  11613.  
  11614. Floating Point Invalid Operation exception occurred at EIP = 00050000 on
  11615.  thread 0001.      1
  11616. Exception occurred in C Library routine called from EIP = 000112D8. 2
  11617. Register Dump at point of exception:  3
  11618. EAX = 00000001    EBX = 00000000  ECX = 000B0010    EDX = 00140010
  11619. EBP = 00000000    EDI = 00000000  ESI = 00061FCC    ESP = 00061FA8  4
  11620.  CS =     005B  CSLIM = 1BFFFFFF   DS =     0053  DSLIM = 1BFFFFFF
  11621.  ES =     0053  ESLIM = 1BFFFFFF   FS =     150B  FSLIM = 00000030
  11622.  GS =     0000  GSLIM = 00000000   SS =     0053  SSLIM = 1BFFFFFF
  11623. NPX Environment:  5
  11624. CW = 0362      TW = 3FFF  IP = 005B:0001002B   6
  11625. SW = B881  OPCODE = 0545  OP = 0053:00023414
  11626. NPX Stack:  7
  11627. ST(7): exponent = 0000 significand = + 00000000 00000000   8
  11628. Process terminating.   9
  11629.  
  11630.  1   The first line always states the nature of the exception and the place and 
  11631.      thread where the exception occurred. If you specify /Tx-, this is the only 
  11632.      message that is generated. 
  11633.  
  11634.  2   Indicates that the exception occurred within one of the C library 
  11635.      functions.  It also indicates the place and thread where the call to that 
  11636.      library function was made. 
  11637.  
  11638.      You can use the address given in 1 and 2 to determine where in your code 
  11639.      the problem occurred.  To do this, you must create a map file by 
  11640.      specifying either the compiler option /B"/map", or if you are linking your 
  11641.      program separately, the linker option /map. 
  11642.  
  11643.  3   Introduces the register dump. 
  11644.  
  11645.  4   Gives the values contained by each register at the time the exception 
  11646.      occurred. for information on the purpose of each register, see the 
  11647.      documentation for your processor chip. 
  11648.  
  11649.  5   Introduces the state of the numeric processor extension (NPX) at the time 
  11650.      of the exception. 
  11651.  
  11652.  6   Gives the values of the elements in the NPX environment. 
  11653.  
  11654.  7   Introduces the state of the NPX stack at the time of the exception. 
  11655.  
  11656.  8   One copy of this message appears for each valid stack entry in the NPX and 
  11657.      gives the values for each.  In this example, because there is only one 
  11658.      stack entry, the message appears only once.  If there are no valid stack 
  11659.      entries, a different message is issued in place of this message to state 
  11660.      that fact. 
  11661.  
  11662.  9   Confirms that the process is terminating. It is one of several 
  11663.      informational messages that may accompany the initial exception message 
  11664.      and register dump. 
  11665.  
  11666.  In general, a dump will always include items 1, 3, and 4.  Item 2 appears only 
  11667.  if the exception occurred in a VisualAge C++ library function. Items 5 to 8 
  11668.  appear only if the NPX was in use at the time of the exception.  Item 9 may or 
  11669.  may not appear, depending on the circumstances of each exception. 
  11670.  
  11671.  For a list of all the runtime messages and their explanations, see the online 
  11672.  Language Reference. 
  11673.  
  11674.  Note:  If you copy and run the program in Program to Cause a Machine-State 
  11675.  Dump, you will get the same messages as shown in Example of a Machine-State 
  11676.  Dump, but the values given may be different. 
  11677.  
  11678.  
  11679. ΓòÉΓòÉΓòÉ 16.14. Common Problems that Generate Exceptions ΓòÉΓòÉΓòÉ
  11680.  
  11681. The following is a list of some of the common problems that can generate 
  11682. runtime exceptions: 
  11683.  
  11684.      Improper use of memory.  For, using a pointer to an object that has 
  11685.       already been freed can cause an exception, as can corrupting the heap. 
  11686.       In such situations, try rebuilding your program using the Debug Memory 
  11687.       option, /Tm+. 
  11688.  
  11689.      Using an invalid pointer. 
  11690.  
  11691.      Passing an invalid parameter to a system function. 
  11692.  
  11693.      Return codes from library or system calls that are not checked. 
  11694.  
  11695.  
  11696. ΓòÉΓòÉΓòÉ 17. Managing Memory ΓòÉΓòÉΓòÉ
  11697.  
  11698. This section describes techniques you can use to manage the memory of your 
  11699. program more efficiently. It includes information on the tiled and debug 
  11700. versions of the memory management functions (like malloc), and also tells you 
  11701. how to create and use your own heaps of memory. 
  11702.  
  11703.      Differentiating between Memory Management Functions 
  11704.      Managing Memory with Multiple Heaps 
  11705.      Debugging Your Heaps 
  11706.  The runtime functions are described in detail in the C Library Reference. 
  11707.  
  11708.  
  11709. ΓòÉΓòÉΓòÉ 17.1. Differentiating between Memory Management Functions ΓòÉΓòÉΓòÉ
  11710.  
  11711. The memory management functions defined by ANSI are calloc, malloc, realloc, 
  11712. and free. These regular functions allocate and free memory from the default 
  11713. runtime heap. (VisualAge C++ has added another function, _heapmin, to return 
  11714. unused memory to the system.) VisualAge C++ also provides different versions of 
  11715. each of these functions as extensions to the ANSI definition. 
  11716.  
  11717. All the versions actually work the same way; they differ only in what heap they 
  11718. allocate from, and in whether they save information to help you debug memory 
  11719. problems. The memory allocated by all of these functions is suitably aligned 
  11720. for storing any type of object. 
  11721.  
  11722. The following table summarizes the different versions of memory management 
  11723. functions, using malloc as an example of how the names of the functions change 
  11724. for each version. They are all described in greater detail in this section. 
  11725.  
  11726. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  11727. Γöé             Γöé REGULAR VERSION      Γöé DEBUG VERSION      Γöé
  11728. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11729. Γöé DEFAULT HEAP       Γöé malloc          Γöé _debug_malloc      Γöé
  11730. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11731. Γöé USER HEAP        Γöé _umalloc         Γöé _debug_umalloc      Γöé
  11732. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  11733. Γöé TILED HEAP ("/Gt")    Γöé _tmalloc         Γöé _debug_tmalloc      Γöé
  11734. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  11735.  
  11736. To use these extensions, you must set the language level to extended, either 
  11737. with the /Se compiler option or the #pragma langlvl(extended) directive. 
  11738.  
  11739.  
  11740. ΓòÉΓòÉΓòÉ <hidden> Related Information ΓòÉΓòÉΓòÉ
  11741.  
  11742.      Differentiating between Memory Management Functions 
  11743.      Heap-Specific Functions 
  11744.      Tiled Functions 
  11745.      Debug Functions 
  11746.      Heap-Specific Debug Functions 
  11747.      Tiled Debug Functions 
  11748.      Managing Memory 
  11749.      Debugging Your Heaps 
  11750.  
  11751.  
  11752. ΓòÉΓòÉΓòÉ 17.1.1. Heap-Specific Functions ΓòÉΓòÉΓòÉ
  11753.  
  11754. Use the heap-specific versions to allocate and free memory from a user-created 
  11755. heap that you specify.  (You can also explicitly use the runtime heap if you 
  11756. want.)  Their names are prefixed by _u (for "user heaps"), for example, 
  11757. _umalloc, and they are defined in <umalloc.h>. 
  11758.  
  11759. The functions provided are: 
  11760.  
  11761.      _ucalloc 
  11762.      _umalloc 
  11763.      _uheapmin 
  11764.  
  11765.  Notice there is no heap-specific version of realloc or free. Because they both 
  11766.  always check what heap the memory was allocated from, you can always use the 
  11767.  regular versions regardless of what heap the memory came from. 
  11768.  
  11769.  For more information about creating your own heaps and using the heap-specific 
  11770.  memory management functions, see Managing Memory with Multiple Heaps. 
  11771.  
  11772.  
  11773. ΓòÉΓòÉΓòÉ 17.1.2. Tiled Functions ΓòÉΓòÉΓòÉ
  11774.  
  11775. Use the tiled memory management functions to allocate and free memory from the 
  11776. runtime's tiled memory heap. If you have objects that can be accessed by 16-bit 
  11777. code, you should store them in tiled memory. Tiled memory does not cross 64K 
  11778. boundaries, as long as the object is smaller than 64K. Objects larger than 64K 
  11779. are aligned on 64K boundaries, but will also cross 64K boundaries. 
  11780.  
  11781. When you use the tiled memory compiler option, /Gt, all calls to the regular 
  11782. memory management functions are mapped to their tiled versions. You can also 
  11783. call the tiled versions explicitly. 
  11784.  
  11785. Note:  If you parenthesize the calls to the regular memory management 
  11786. functions, they are not mapped to their tiled versions. 
  11787.  
  11788. The names of the tiled versions are prefixed by _t (for "tiled"), for example, 
  11789. _tmalloc, and they are defined in <malloc.h> and <stdlib.h>. 
  11790.  
  11791. The functions provided are: 
  11792.  
  11793.      _tcalloc 
  11794.      _tfree 
  11795.      _theapmin 
  11796.      _tmalloc 
  11797.      _trealloc 
  11798.  
  11799.  You can also create your own heaps of tiled memory. Creating your own heaps is 
  11800.  described in Managing Memory with Multiple Heaps. 
  11801.  
  11802.  For more information about sharing objects between 32-bit and 16-bit code, see 
  11803.  Calling between 32-Bit and 16-Bit Code. 
  11804.  
  11805.  
  11806. ΓòÉΓòÉΓòÉ 17.1.3. Debug Functions ΓòÉΓòÉΓòÉ
  11807.  
  11808. Use these functions to allocate and free memory from the default runtime heap, 
  11809. just as you would use the regular versions. They also provide information that 
  11810. you can use to debug memory problems. 
  11811.  
  11812. Note:  The information provided by these functions is Diagnosis, Modification, 
  11813.        and Tuning information only.  It is not intended to be used as a 
  11814.        programming interface. 
  11815.  
  11816.  When you use the debug memory compiler option, /Tm, all calls to the regular 
  11817.  memory management functions are mapped to their debug versions. You can also 
  11818.  call the debug versions explicitly. 
  11819.  
  11820.  Note:  If you parenthesize the calls to the regular memory management 
  11821.  functions, they are not mapped to their debug versions. 
  11822.  
  11823.  We recommend you place a #pragma strings(readonly) directive at the top of 
  11824.  each source file that will call debug functions, or in a common header file 
  11825.  that each includes. This directive is not essential, but it ensures that the 
  11826.  file name passed to the debug functions can't be overwritten, and that only 
  11827.  one copy of the file name string is included in the object module. 
  11828.  
  11829.  The names of the debug versions are prefixed by _debug_, for example, 
  11830.  _debug_malloc, and they are defined in <malloc.h> and <stdlib.h>. 
  11831.  
  11832.  The functions provided are: 
  11833.  
  11834.      _debug_calloc 
  11835.      _debug_free 
  11836.      _debug_heapmin 
  11837.      _debug_malloc 
  11838.      _debug_realloc 
  11839.  
  11840.  In addition to their usual behavior, these functions also store information 
  11841.  (file name and line number) about each call made to them.  Each call also 
  11842.  automatically checks the heap by calling _heap_check (described below). 
  11843.  
  11844.  Three additional debug memory management functions do not have regular 
  11845.  counterparts: 
  11846.  
  11847.      _dump_allocated 
  11848.  
  11849.       Prints information to file handle 2 (the usual destination of stderr) 
  11850.       about each memory block currently allocated by the debug functions. You 
  11851.       can change the destination of the information with the 
  11852.       _set_crt_msg_handle function. 
  11853.  
  11854.      _dump_allocated_delta 
  11855.  
  11856.       Prints information to file handle 2 about each memory block allocated by 
  11857.       the debug functions since the last call to _dump_allocated or 
  11858.       _dump_allocated_delta. Again, you can change the destination of the 
  11859.       information with the _set_crt_msg_handle function. 
  11860.  
  11861.      _heap_check 
  11862.  
  11863.       Checks all memory blocks allocated or freed by the debug functions to 
  11864.       make sure that no overwriting has occurred outside the bounds of 
  11865.       allocated blocks or in a free memory block. 
  11866.  
  11867.  The debug functions call _heap_check automatically; you can also call it 
  11868.  explicitly. To use _dump_allocated and _dump_allocated_delta, you must call 
  11869.  them explicitly. 
  11870.  
  11871.  In C Set ++ releases prior to VisualAge C++ Version 3.0, you could not mix 
  11872.  debug and regular versions of the memory management functions. For example, 
  11873.  you could not allocate memory with malloc and free it with _debug_free. This 
  11874.  restriction no longer applies; realloc and free (debug or otherwise) can now 
  11875.  handle memory allocated by any other allocation function. 
  11876.  
  11877.  
  11878. ΓòÉΓòÉΓòÉ 17.1.4. Heap-Specific Debug Functions ΓòÉΓòÉΓòÉ
  11879.  
  11880. The heap-specific functions also have debug versions that work just like the 
  11881. regular debug versions.  Use these functions to allocate and free memory from 
  11882. the user-created heap you specify, and also provide information that you can 
  11883. use to debug memory problems in your own heaps. 
  11884.  
  11885. Note:  The information provided by these functions is Diagnosis, Modification, 
  11886.        and Tuning information only.  It is not intended to be used as a 
  11887.        programming interface. 
  11888.  
  11889.  You can call them explicitly, or you can use the debug memory compiler option, 
  11890.  /Tm, to map calls to the heap-specific functions to their debug counterparts. 
  11891.  
  11892.  Note:  If you parenthesize the calls to the heap-specific memory management 
  11893.  functions, they are not mapped to their debug versions. 
  11894.  
  11895.  The names of the heap-specific debug versions are prefixed by _debug_u, for 
  11896.  example, _debug_umalloc, and they are defined in <umalloc.h>. 
  11897.  
  11898.  The functions provided are: 
  11899.  
  11900.      _debug_ucalloc 
  11901.      _debug_uheapmin 
  11902.      _debug_umalloc 
  11903.      _udump_allocated 
  11904.      _udump_allocated_delta 
  11905.      _uheap_check 
  11906.  
  11907.  Notice there is no heap-specific debug version of realloc or free. Because 
  11908.  they both always check what heap the memory was allocated from, you always use 
  11909.  the regular debug versions (_debug_realloc and _debug_free), regardless of 
  11910.  what heap the memory came from. 
  11911.  
  11912.  For more information about debugging memory problems in your own heaps, see 
  11913.  Debugging Your Heaps. 
  11914.  
  11915.  
  11916. ΓòÉΓòÉΓòÉ 17.1.5. Tiled Debug Functions ΓòÉΓòÉΓòÉ
  11917.  
  11918. The tiled functions also have debug versions that work just like the regular 
  11919. and heap-specific debug versions. Use these functions to allocate and free 
  11920. memory from the tiled VisualAge C++ runtime heap.  They also provide 
  11921. information that you can use to debug memory problems with the tiled heap. 
  11922.  
  11923. Note:  The information provided by these functions is Diagnosis, Modification, 
  11924.        and Tuning information only.  It is not intended to be used as a 
  11925.        programming interface. 
  11926.  
  11927.  You can call them explicitly, or you can use the debug memory and tiled memory 
  11928.  compiler options /Tm and /Gt, to map calls to the regular memory management 
  11929.  functions to their tiled debug counterparts. 
  11930.  
  11931.  Note:  If you parenthesize the calls to the heap-specific memory management 
  11932.  functions, they are not mapped to their debug versions. 
  11933.  
  11934.  The names of the tiled debug versions are prefixed by _debug_t, for example, 
  11935.  _debug_tmalloc, and they are defined in <malloc.h> and <stdlib.h>. 
  11936.  
  11937.  The functions provided are: 
  11938.  
  11939.      _debug_tcalloc 
  11940.      _debug_tfree 
  11941.      _debug_theapmin 
  11942.      _debug_tmalloc 
  11943.      _debug_trealloc 
  11944.      _tdump_allocated 
  11945.      _tdump_allocated_delta 
  11946.      _theap_check 
  11947.  
  11948.  For more information about debugging memory problems, see Debugging Your 
  11949.  Heaps. 
  11950.  
  11951.  
  11952. ΓòÉΓòÉΓòÉ 17.2. Managing Memory with Multiple Heaps ΓòÉΓòÉΓòÉ
  11953.  
  11954. VisualAge C++ now gives you the option of creating and using your own pools of 
  11955. memory, called heaps. You can use your own heaps in place of or in addition to 
  11956. the default VisualAge C++ runtime heap to improve the performance of your 
  11957. program. This section describes how to implement multiple user-created heaps 
  11958. using VisualAge C++. 
  11959.  
  11960. Note:  Many readers will not be interested in creating their own heaps. Using 
  11961. your own heaps is entirely optional, and your applications will work perfectly 
  11962. well using the default memory management provided (and used by) the 
  11963. VisualAge C++ runtime library. If you want to improve the performance and 
  11964. memory management of your program, multiple heaps can help you.  Otherwise, you 
  11965. can ignore this section and any heap-specific library functions. 
  11966.  
  11967.  
  11968. ΓòÉΓòÉΓòÉ 17.2.1. Why Use Multiple Heaps? ΓòÉΓòÉΓòÉ
  11969.  
  11970. Using a single runtime heap is fine for most programs. However, using multiple 
  11971. heaps can be more efficient and can help you improve your program's performance 
  11972. and reduce wasted memory for a number of reasons: 
  11973.  
  11974.      When you allocate from a single heap, you may end up with memory blocks 
  11975.       on different pages of memory. For example, you might have a linked list 
  11976.       that allocates memory each time you add a node to the list.  If you 
  11977.       allocate memory for other data in between adding nodes, the memory blocks 
  11978.       for the nodes could end up on many different pages. To access the data in 
  11979.       the list, the system may have to swap many pages, which can significantly 
  11980.       slow your program. 
  11981.  
  11982.       With multiple heaps, you can specify which heap you allocate from. For 
  11983.       example, you might create a heap specifically for the linked list.  The 
  11984.       list's memory blocks and the data they contain would remain close 
  11985.       together on fewer pages, reducing the amount of swapping required. 
  11986.  
  11987.      In multithread applications, only one thread can access the heap at a 
  11988.       time to ensure memory is safely allocated and freed. For example, say 
  11989.       thread 1 is allocating memory, and thread 2 has a call to free.  Thread 2 
  11990.       must wait until thread 1 has finished its allocation before it can access 
  11991.       the heap. Again, this can slow down performance, especially if your 
  11992.       program does a lot of memory operations. 
  11993.  
  11994.       If you create a separate heap for each thread, you can allocate from them 
  11995.       concurrently, eliminating both the waiting period and the overhead 
  11996.       required to serialize access to the heap. 
  11997.  
  11998.      With a single heap, you must explicitly free each block that you 
  11999.       allocate. If you have a linked list that allocates memory for each node, 
  12000.       you have to traverse the entire list and free each block individually, 
  12001.       which can take some time. 
  12002.  
  12003.       If you create a separate heap for that linked list, you can destroy it 
  12004.       with a single call and free all the memory at once. 
  12005.  
  12006.      When you have only one heap, all components share it (including the 
  12007.       VisualAge C++ runtime library, vendor libraries, and your own code).  If 
  12008.       one component corrupts the heap, another component might fail.  You may 
  12009.       have trouble discovering the cause of the problem and where the heap was 
  12010.       damaged. 
  12011.  
  12012.       With multiple heaps, you can create a separate heap for each component, 
  12013.       so if one damages the heap (for example, by using a freed pointer), the 
  12014.       others can continue unaffected. You also know where to look to correct 
  12015.       the problem. 
  12016.  
  12017.  You can create heaps of regular memory, tiled memory, or shared memory, and 
  12018.  you can have any number of heaps of any type. (See Types of Memory for more 
  12019.  information about the different types of memory for heaps.) The only limit is 
  12020.  the space available on your operating system (your machine's memory and 
  12021.  swapper size, minus the memory required by other running applications). 
  12022.  
  12023.  VisualAge C++ provides heap-specific versions of the memory management 
  12024.  functions (malloc and so on), and a number of new functions that you can use 
  12025.  to create and manage your own heaps of memory. Debug versions of all the 
  12026.  memory management functions are available, including the heap-specific ones. 
  12027.  You can also use debug versions with tiled memory and shared memory, which you 
  12028.  couldn't do in previous releases. 
  12029.  
  12030.  Note:  Because multiple heaps and the functions that support them are 
  12031.  extensions to the ANSI language standard, you can only use them when the 
  12032.  language level is set to extended (with the /Se compiler option or #pragma 
  12033.  langlvl(extended) directive). 
  12034.  
  12035.  The following sections describe how to create and use your own heaps.  For 
  12036.  detailed information on each function, refer to the C Library Reference. 
  12037.  
  12038.  
  12039. ΓòÉΓòÉΓòÉ 17.2.2. Creating a Fixed-Size Heap ΓòÉΓòÉΓòÉ
  12040.  
  12041. Before you create a heap, you need to get the block of memory that will make up 
  12042. the heap. You can get this block by calling an OS/2 API (such as DosAllocMem or 
  12043. DosAllocSharedMem) or by statically allocating it. 
  12044.  
  12045. Make sure the block is large enough to satisfy all the memory requests your 
  12046. program will make of it, as well as the internal information for managing the 
  12047. heap. Once the block is fully allocated, further allocation requests to the 
  12048. heap will fail. 
  12049.  
  12050. The internal information requires _HEAP_MIN_SIZE bytes (_HEAP_MIN_SIZE is 
  12051. defined in <umalloc.h>); you cannot create a heap smaller than this. Add the 
  12052. amount of memory your program requires to this value to determine the size of 
  12053. the block you need to get. 
  12054.  
  12055. Also make sure the block is the correct type (regular, tiled, or shared) for 
  12056. the heap you are creating. 
  12057.  
  12058. Once you have the block of memory, create the heap with _ucreate. 
  12059.  
  12060. For example: 
  12061.  
  12062.    Heap_t fixedHeap;    /* this is the "heap handle" */
  12063.    /* get memory for internal info plus 5000 bytes for the heap */
  12064.    static char *block[_HEAP_MIN_SIZE + 5000];
  12065.  
  12066.    fixedHeap = _ucreate(block, (_HEAP_MIN_SIZE+5000),  /* block to use */
  12067.                        !_BLOCK_CLEAN,   /* memory is not set to 0   */
  12068.                        _HEAP_REGULAR,   /* regular memory           */
  12069.                        NULL, NULL);     /* we'll explain this later */
  12070.  
  12071. The !_BLOCK_CLEAN parameter indicates that the memory in the block has not been 
  12072. initialized to 0. If it were set to 0 (for example, by DosAllocMem or memset), 
  12073. you would specify _BLOCK_CLEAN. The calloc and _ucalloc functions use this 
  12074. information to improve their efficiency; if the memory is already initialized 
  12075. to 0, they don't need to initialize it. 
  12076.  
  12077. Note:  DosAllocMem initializes memory to 0 for you.  You can also use memset to 
  12078. initialize the memory; however, memset also commits all the memory at once, 
  12079. which could slow overall performance. 
  12080.  
  12081. The fourth parameter indicates what type of memory the heap contains: regular 
  12082. (_HEAP_REGULAR), tiled (_HEAP_TILED), or shared (_HEAP_SHARED). The different 
  12083. memory types are described in Types of Memory. 
  12084.  
  12085. For a fixed-size heap, the last two parameters are always NULL. 
  12086.  
  12087.  
  12088. ΓòÉΓòÉΓòÉ 17.2.2.1. Using Your Heap ΓòÉΓòÉΓòÉ
  12089.  
  12090. Once you have created your heap, you need to open it for use by calling _uopen: 
  12091.  
  12092.    _uopen(fixedHeap);
  12093.  
  12094. This opens the heap for that particular process; if the heap is shared, each 
  12095. process that uses the heap needs its own call to _uopen. 
  12096.  
  12097. You can then allocate and free from your own heap just as you would from the 
  12098. default heap.  To allocate memory, use _ucalloc or _umalloc. These functions 
  12099. work just like calloc and malloc, except you specify the heap to use as well as 
  12100. the size of block that you want. For example, to allocate 1000 bytes from 
  12101. fixedHeap: 
  12102.  
  12103.    void *up;
  12104.    up = _umalloc(fixedHeap, 1000);
  12105.  
  12106. To reallocate and free memory, use the regular realloc and free functions. Both 
  12107. of these functions always check what heap the memory came from, so you don't 
  12108. need to specify the heap to use. For example, in the following code fragment: 
  12109.  
  12110.    void *p, *up;
  12111.    p = malloc(1000);   /* allocate 1000 bytes from default heap */
  12112.    up = _umalloc(fixedHeap, 1000);  /* allocate 1000 from fixedHeap */
  12113.  
  12114.    realloc(p, 2000);   /* reallocate from default heap */
  12115.    realloc(up, 100);   /* reallocate from fixedHeap    */
  12116.  
  12117.    free(p);            /* free memory back to default heap */
  12118.    free(up);           /* free memory back to fixedHeap    */
  12119.  
  12120. the realloc and free calls look exactly the same for both the default heap and 
  12121. your heap. 
  12122.  
  12123. For any object, you can find out what heap it was allocated from by calling 
  12124. _mheap. You can also get information about the heap itself by calling _ustats, 
  12125. which tells you: 
  12126.  
  12127.      How much memory the heap holds (excluding memory used for overhead) 
  12128.      How much memory is currently allocated from the heap 
  12129.      What type of memory is in the heap 
  12130.      The size of the largest contiguous piece of memory available from the 
  12131.       heap 
  12132.  
  12133.  When you call any heap function, make sure the heap you specify is valid.  If 
  12134.  the heap is not valid, the behavior of the heap functions is undefined. 
  12135.  
  12136.  
  12137. ΓòÉΓòÉΓòÉ 17.2.2.2. Adding to a Fixed-Size Heap ΓòÉΓòÉΓòÉ
  12138.  
  12139. Although you created the heap with a fixed size, you can add blocks of memory 
  12140. to it with _uaddmem. This can be useful if you have a large amount of memory 
  12141. that is allocated conditionally. Like the starting block, you must first get 
  12142. the block to add to the heap by using an OS/2 API or by allocating it 
  12143. statically. Make sure the block you add is the same type of memory as the heap 
  12144. you are adding it to. 
  12145.  
  12146. For example, to add 64K to fixedHeap: 
  12147.  
  12148.    void *newblock;
  12149.    /* get memory block from operating system */
  12150.    DosAllocMem(newblock, 65536, PAG_COMMIT | PAG_WRITE | PAG_READ);
  12151.  
  12152.    _uaddmem(fixedHeap,       /* heap to add to */
  12153.             newblock, 65536, /* block to add   */
  12154.             _BLOCK_CLEAN);   /* DosAllocMem sets memory to 0 */
  12155.  
  12156. Using _uaddmem is the only way to increase the size of a fixed heap. 
  12157.  
  12158. Note:  For every block of memory you add, a small number of bytes from it are 
  12159. used to store internal information. To reduce the total amount of overhead, it 
  12160. is better to add a few large blocks of memory than many small blocks. 
  12161.  
  12162.  
  12163. ΓòÉΓòÉΓòÉ 17.2.2.3. Destroying Your Heap ΓòÉΓòÉΓòÉ
  12164.  
  12165. When you have finished using the heap, close it with _uclose. Once you have 
  12166. closed the heap in a process, that process can no longer allocate from or 
  12167. return memory to that heap. If other processes share the heap, they can still 
  12168. use it until you close it in each of them. Performing operations on a heap 
  12169. after you've closed it causes undefined behavior. 
  12170.  
  12171. To finally destroy the heap, call _udestroy. If blocks of memory are still 
  12172. allocated somewhere, you can force the destruction. Destroying a heap removes 
  12173. it entirely even if it was shared by other processes. Again, performing 
  12174. operations on a heap after you've destroyed it causes undefined behavior. 
  12175.  
  12176. After you destroy your fixed-size heap, it is up to you to return the memory 
  12177. for the heap (the initial block of memory you supplied to _ucreate and any 
  12178. other blocks added by _uaddmem) to the system. 
  12179.  
  12180.  
  12181. ΓòÉΓòÉΓòÉ 17.2.3. Creating an Expandable Heap ΓòÉΓòÉΓòÉ
  12182.  
  12183. With a fixed-size heap, the initial block of memory must be large enough to 
  12184. satisfy all allocation requests made to it. In this section, we will create a 
  12185. heap that can expand and contract. 
  12186.  
  12187. With the VisualAge C++ runtime heap, when not enough storage is available for 
  12188. your malloc request, the runtime gets additional storage from the system. 
  12189. Similarly, when you minimize the heap with _heapmin or when your program ends, 
  12190. the runtime returns the memory to the operating system. 
  12191.  
  12192. When you create an expandable heap, you provide your own functions to do this 
  12193. work (we'll call them getmore_fn and release_fn, although you can name them 
  12194. whatever you choose). You specify pointers to these functions as the last two 
  12195. parameters to _ucreate (instead of the NULL pointers you used to create a 
  12196. fixed-size heap). For example: 
  12197.  
  12198.    Heap_t growHeap;
  12199.    static char *block[_HEAP_MIN_SIZE];  /* get block */
  12200.  
  12201.    growHeap = _ucreate(block, _HEAP_MIN_SIZE,   /* starting block */
  12202.                        !_BLOCK_CLEAN,      /* memory not set to 0 */
  12203.                        _HEAP_REGULAR,      /* regular memory      */
  12204.                        getmore_fn,     /* function to expand heap */
  12205.                        release_fn);    /* function to shrink heap */
  12206.  
  12207. Note:  You can use the same getmore_fn and release_fn for more than one heap, 
  12208. as long as the heaps use the same type of memory and your functions are not 
  12209. written specifically for one heap. 
  12210.  
  12211.  
  12212. ΓòÉΓòÉΓòÉ 17.2.3.1. Expanding Your Heap ΓòÉΓòÉΓòÉ
  12213.  
  12214. When you call _umalloc (or a similar function) for your heap, _umalloc tries to 
  12215. allocate the memory from the initial block you provided to _ucreate. If not 
  12216. enough memory is there, it then calls your getmore_fn. Your getmore_fn then 
  12217. gets more memory from the operating system and adds it to the heap. It is up to 
  12218. you how you do this. 
  12219.  
  12220. Your getmore_fn must have the following prototype: 
  12221.  
  12222.    void *(*getmore_fn)(Heap_t uh, size_t *size, int *clean);
  12223.  
  12224. The uh is the heap to be expanded. 
  12225.  
  12226. The size is the size of the allocation request passed by _umalloc. You probably 
  12227. want to return enough memory at a time to satisfy several allocations; 
  12228. otherwise every subsequent allocation has to call getmore_fn, reducing your 
  12229. program's execution speed. We recommend you return multiples of 64K (the 
  12230. smallest size that DosAllocMem returns). Make sure that you update the size 
  12231. parameter. if you return more than the size requested. 
  12232.  
  12233. Your function must also set the clean parameter to either _BLOCK_CLEAN, to 
  12234. indicate the memory has been set to 0, or !_BLOCK_CLEAN, to indicate that the 
  12235. memory has not been initialized. 
  12236.  
  12237. The following fragment shows an example of a getmore_fn: 
  12238.  
  12239.    static void *getmore_fn(Heap_t uh, size_t *length, int *clean)
  12240.    {
  12241.       char *newblock;
  12242.  
  12243.       /* round the size up to a multiple of 64K */
  12244.       *length = (*length / 65536) * 65536 + 65536;
  12245.  
  12246.       DosAllocMem(&newblock, *length, PAG_COMMIT | PAG_READ | _PAG_WRITE);
  12247.  
  12248.       *clean = _BLOCK_CLEAN;  /* mark the block as "clean" */
  12249.       return(newblock);       /* return new memory block   */
  12250.    }
  12251.  
  12252. Note:  Be sure that your getmore_fn allocates the right type of memory 
  12253. (regular, tiled, or shared) for the heap.  There are also special 
  12254. considerations for shared memory, described under Types of Memory. 
  12255.  
  12256. You can also use _uaddmem to add blocks to your heap, as you did for the fixed 
  12257. heap in Adding to a Fixed-Size Heap. _uaddmem works exactly the same way for 
  12258. expandable heaps. 
  12259.  
  12260.  
  12261. ΓòÉΓòÉΓòÉ 17.2.3.2. Shrinking Your Heap ΓòÉΓòÉΓòÉ
  12262.  
  12263. To coalesce the heap (return all blocks in the heap that are totally free to 
  12264. the system), use _uheapmin. _uheapmin works like _heapmin, except that you 
  12265. specify the heap to use. 
  12266.  
  12267. When you call _uheapmin to coalesce the heap or _udestroy to destroy it, these 
  12268. functions call your release_fn to return the memory to the system.  Again, it 
  12269. is up to you how you implement this function. 
  12270.  
  12271. Your release_fn must have the following prototype: 
  12272.  
  12273.    void (*release_fn)(Heap_t uh, void *block, size_t size);
  12274.  
  12275. Where uh identifies the heap to be shrunk. The pointer block and its size are 
  12276. passed to your function by _uheapmin or _udestroy.  Your function must return 
  12277. the memory pointed to by block to the system. For example: 
  12278.  
  12279.    static void release_fn(Heap_t uh, void *block, size_t size)
  12280.    {
  12281.       DosFreeMem(block);
  12282.       return 0;
  12283.    }
  12284.  
  12285. Note: 
  12286.  
  12287.    1. _udestroy calls your release_fn to return all memory added to the uh heap 
  12288.       by your getmore_fn or by _uaddmem.  However, you are responsible for 
  12289.       returning the initial block of memory that you supplied to _ucreate. 
  12290.  
  12291.    2. Because a fixed-size heap has no release_fn, _uheapmin and _udestroy work 
  12292.       slightly differently. Calling _uheapmin for a fixed-size heap has no 
  12293.       effect but does not cause an error; _uheapmin simply returns 0. Calling 
  12294.       _udestroy for a fixed-size heap marks the heap as destroyed, so no 
  12295.       further operations can be performed on it, but returns no memory.  It is 
  12296.       up to you to return the heap's memory to the system. 
  12297.  
  12298.  
  12299. ΓòÉΓòÉΓòÉ 17.2.4. Types of Memory ΓòÉΓòÉΓòÉ
  12300.  
  12301. There are three different types of memory: 
  12302.  
  12303.    1. Regular 
  12304.  
  12305.       Most programs use regular memory.  This is the type provided by the 
  12306.       default runtime heap. 
  12307.  
  12308.    2. Tiled 
  12309.  
  12310.       Tiled memory is guaranteed not to cross 64K boundaries (as long as the 
  12311.       object being allocated is less than 64K), so it is appropriate for 
  12312.       objects that may be accessed by 16-bit code. If you want to use tiled 
  12313.       memory, make sure you specify that type when you get the initial block 
  12314.       for your heap, when you create the heap, and when you add to your heap 
  12315.       (with _uaddmem or your getmore_fn). Even if you use tiled memory, you 
  12316.       still need to specify the /Gt compiler option to ensure your objects are 
  12317.       correctly aligned. 
  12318.  
  12319.       Note:  When you use /Gt+, the regular versions of the memory management 
  12320.       functions (that use the default heap) are mapped to tiled versions so 
  12321.       that they also return tiled memory. If you parenthesize the function 
  12322.       calls, they are not mapped to the tiled versions and therefore return 
  12323.       regular memory. However, if you replace the default runtime heap with 
  12324.       your own tiled heap, all regular memory management functions will use the 
  12325.       new default heap of tiled memory, regardless of whether the calls are 
  12326.       parenthesized. There are no tiled versions of the heap-specific 
  12327.       functions; to use tiled memory, create a tiled heap and specify it when 
  12328.       you call the functions. 
  12329.  
  12330.    3. Shared 
  12331.  
  12332.       Heaps of shared memory can be shared between processes or applications. 
  12333.       If you want other processes to use the heap you have created, you must 
  12334.       pass them the heap handle and give them access to the heap. 
  12335.  
  12336.       To correctly share a heap, you must observe certain requirements, 
  12337.       described below.  Meeting these requirements is entirely your 
  12338.       responsibility. 
  12339.  
  12340.       For a fixed-size shared heap, you must: 
  12341.  
  12342.                     Allocate the starting block of memory as shared memory. 
  12343.                     Ensure that all processes that use the heap (allocate or 
  12344.                      free memory from it) or that use shared data from the heap 
  12345.                      ("interested" processes) have access to the starting 
  12346.                      block. 
  12347.                     Pass the heap handle to each process that uses the heap 
  12348.                      ("interested" processes do not need the heap handle). 
  12349.                     Call _uopen for the heap in each process that uses it. 
  12350.                     Call _uclose in each process where you called _uopen 
  12351.                      before you destroy the heap. 
  12352.  
  12353.       If you use _uaddmem to expand your heap, you must ALSO: 
  12354.  
  12355.                     Ensure that all interested and using processes have access 
  12356.                      to the new block added by _uaddmem. 
  12357.  
  12358.       If you use getmore_fn and release_fn to dynamically expand and shrink 
  12359.       your heap, you must ALSO: 
  12360.  
  12361.                     Ensure that all interested and using processes have access 
  12362.                      to the new block added by getmore_fn, no matter which 
  12363.                      process called getmore_fn. 
  12364.                     Ensure that getmore_fn can run successfully in any process 
  12365.                      that may call a heap-specific allocation function (such as 
  12366.                      _umalloc) or cause it to be called; and that release_fn 
  12367.                      can run successfully in any process that may call 
  12368.                      _uheapmin or _udestroy or cause them to be called. 
  12369.                      Typically this would mean placing both getmore_fn and 
  12370.                      release_fn in a DLL that is loaded by all processes that 
  12371.                      use the heap handle.  Any data these functions use must 
  12372.                      also be shared. 
  12373.                     Ensure that release_fn revokes the access of each process 
  12374.                      to a shared memory block before it returns that block to 
  12375.                      the system. 
  12376.  
  12377.       For more information about managing shared memory and OS/2 APIs you can 
  12378.       use, see the section on Shared Memory in the Control Program Guide and 
  12379.       Reference. 
  12380.  
  12381.  
  12382. ΓòÉΓòÉΓòÉ 17.2.5. Changing the Default Heap ΓòÉΓòÉΓòÉ
  12383.  
  12384. The regular memory management functions (malloc and so on) always use whatever 
  12385. heap is currently the default for that thread. The initial default heap for all 
  12386. VisualAge C++ applications is the runtime heap provided by VisualAge C++. 
  12387. However, you can make your own heap the default by calling _udefault. Then all 
  12388. calls to the regular memory management functions allocate from your heap 
  12389. instead of the runtime heap. 
  12390.  
  12391. The default heap changes only for the thread where you call _udefault.  You can 
  12392. use a different default heap for each thread of your program if you choose. 
  12393.  
  12394. This is useful when you want a component (such as a vendor library) to use a 
  12395. heap other than the VisualAge C++ runtime heap, but you can't actually alter 
  12396. the source code to use heap-specific calls. For example, if you set the default 
  12397. heap to a tiled or shared heap then call a library function that calls malloc, 
  12398. the library allocates storage in tiled or shared memory. 
  12399.  
  12400. Because _udefault returns the current default heap, you can save the return 
  12401. value and later use it to restore the default heap you replaced. You can also 
  12402. change the default back to the VisualAge C++ runtime heap by calling _udefault 
  12403. and specifying _RUNTIME_HEAP (defined in <malloc.h>). You can also use this 
  12404. macro with any of the heap-specific functions to explicitly allocate from the 
  12405. runtime heap. 
  12406.  
  12407.  
  12408. ΓòÉΓòÉΓòÉ 17.2.6. A Simple Example of a User Heap ΓòÉΓòÉΓòÉ
  12409.  
  12410. The following program shows very simply how you might create and use a heap. 
  12411.  
  12412.  
  12413. Example of a User Heap
  12414.  
  12415. /* the function _umalloc calls to get more storage */
  12416. static void *get_fn(Heap_t uh, size_t *length, int *clean)
  12417. {
  12418.    char *p;
  12419.  
  12420.    /* DosAllocMem sets storage to 0, so it is "clean" */
  12421.    *clean = _BLOCK_CLEAN;
  12422.  
  12423.    /* round the block size to a multiple of 64K for efficiency */
  12424.    *length = (*length / 65536) * 65536 + 65536;
  12425.  
  12426.    /* get the storage from the system)
  12427.    DosAllocMem(ΓöÇ#ΓöÇ, *length, PAG_COMMIT|PAGE_READ|PAGE_WRITE);
  12428.  
  12429.    return p;
  12430. }
  12431.  
  12432. /* the function _heapmin and _destroy
  12433.    call to return storage to the system      */
  12434. static void release_fn(Heap_t uh, void *p, size_t size)
  12435. {
  12436.    DosFreeMem(p);
  12437.    return;
  12438. }
  12439.  
  12440. int main(void)
  12441. {
  12442.    Heap_t myheap;
  12443.    /* startchunk will be the first block of storage on the heap */
  12444.    char startchunk[_HEAP_MIN_SIZE];
  12445.    void *p;
  12446.  
  12447.    /* create a heap starting with the block declared earlier */
  12448.    myheap = _ucreate(startchunk, _HEAP_MIN_SIZE,
  12449.                         !_BLOCK_CLEAN,    /* memory is not set to 0 */
  12450.                         _HEAP_REGULAR,    /* regular memory         */
  12451.                         get_fn, release_fn);
  12452.  
  12453.    if (myheap == NULL)               /* check that valid heap was created */
  12454.       puts("create failed");
  12455.  
  12456.    if (_open(myheap))             /* open heap and check for failure   */
  12457.       puts("open failed");
  12458.  
  12459.    /* allocate from myheap; if necessary, _umalloc calls get_fn */
  12460.       _umalloc calls get_fn
  12461.    p = _umalloc(myheap, 1000);
  12462.    if (p == NULL)             /* check that allocation worked      */
  12463.       puts("allocation failed");
  12464.  
  12465.    p = realloc(p, 100);    /* reallocate from myheap - realloc knows
  12466.                               what heap the storage came from      */
  12467.    free(p);   /* free also knows what heap the storage came from   */
  12468.  
  12469.    /* return unused blocks to system; _heapmin calls release_fn */
  12470.    _uheapmin(myheap);
  12471.  
  12472.    _uclose(myheap);     /* close myheap */
  12473.  
  12474.    /* destroy myheap with FORCE because some storage is still
  12475.       allocated; _udestroy calls release_fn to return storage */
  12476.    _udestroy(myheap, FORCE);
  12477.    return 0;
  12478. }
  12479.  
  12480.  
  12481. ΓòÉΓòÉΓòÉ 17.2.7. A More Complex Example Featuring Shared Memory ΓòÉΓòÉΓòÉ
  12482.  
  12483. The following program shows how you might implement a heap shared between a 
  12484. parent and several child processes. 
  12485.  
  12486. Example of a Shared User Heap - Parent Process shows the parent process, which 
  12487. creates the shared heap. First the main program calls the init function to 
  12488. allocate shared memory from the operating system (using DosAllocSharedMem) and 
  12489. name the memory so that other processes can use it by name. The init function 
  12490. then creates and opens the heap. The loop in the main program performs 
  12491. operations on the heap, and also starts other processes. The program then calls 
  12492. the term function to close and destroy the heap. 
  12493.  
  12494.  
  12495. Example of a Shared User Heap - Parent Process
  12496.  
  12497. #include <umalloc.h>
  12498. #include <stdio.h>
  12499. #include <stdlib.h>
  12500. #include <string.h>
  12501. #define INCL_DOSMEMMGR
  12502. #include <os2.h>
  12503.  
  12504. /* Function to create and open the heap with a named shared memory object */
  12505. static int inithp(Heap_t *uheap, void **init_block)
  12506. {
  12507.    int flags;                            /* to store flags for DosAllocMem */
  12508.    void *p;                              /* to point to the shared memory  */
  12509.    const size_t size = 65536;                    /* always allocate 64K */
  12510.    flags = PAG_COMMIT | PAG_WRITE | PAG_READ;
  12511.  
  12512.    /* allocate shared memory from system */
  12513.    if (DosAllocSharedMem(&p,               /* assign memory block to p */
  12514.                          "\\SHAREMEM\\MYNAME",        /* name memory block */
  12515.                          size, flags))
  12516.       return 1;
  12517.    else
  12518.    {
  12519.       *uheap = _ucreate((char *)p + sizeof(Heap_t), /* heap handle goes at start */
  12520.                      size - sizeof(Heap_t), /*block size,space for heap handle */
  12521.                      _BLOCK_CLEAN,      /* DosAllocSharedMem sets memory to 0 */
  12522.                      _HEAP_SHARED | _HEAP_REGULAR, /* shared or regular heap */
  12523.                      NULL, NULL);                         /* fixed size */
  12524.  
  12525.       if (*uheap = NULL)                          /* check heap was created */
  12526.          return 1;
  12527.       memcpy(p, uheap, sizeof(Heap_t)); /* store heap handle in shared area */
  12528.    }
  12529.  
  12530.    if (_uopen(*uheap))                      /*open heap and check result */
  12531.       return 1;
  12532.    *init_block = p;          /*make initial block point to shared memory */
  12533.    return 0;
  12534. }
  12535.  
  12536. /* Function to close and destroy the heap */
  12537. static int term(Heap_t uheap, void init_block)
  12538. {
  12539.    if (_uclose(uheap))                                     /* close heap */
  12540.       return 1;
  12541.    if (_udestroy(uheap, FORCE))              /* force destruction of heap */
  12542.       return 1;
  12543.  
  12544.    DosFreeMem(init_block);                     /* return memory to system */
  12545.    return 0;
  12546. }
  12547.  
  12548. int main(void)
  12549. {
  12550.    int rc, a;                            /* for return codes, loop iteration */
  12551.    Heap_t uheap;                              /* heap to create           */
  12552.    void *init_block;                          /* initial block to use     */
  12553.    char *p;                                      /* for allocating from heap */
  12554.  
  12555.    /* call init function to create and open the heap  */
  12556.    rc = init(&uheap, &init_block);
  12557.  
  12558.    if (rc)                           /* check for success (0) or failure (1) */
  12559.       return rc;                          /*  if failure, program ends       */
  12560.  
  12561.    /* perform operations on uheap */
  12562.    for (a = 1; a < 10; a++)
  12563.    {
  12564.       p = _umalloc(uheap, 10);                     /* allocate from uheap */
  12565.       if (p == NULL)
  12566.          return 1;
  12567.       memset(p, 'M', _msize(p));             /* set all bytes in p to 'M' */
  12568.  
  12569.       if (system("sample1b.exe"))    /*start new process and check result */
  12570.  
  12571.       p = realloc(p,50);                         /* reallocate from uheap */
  12572.       if (p == NULL)
  12573.          return 1;
  12574.       memset(p, 'R', _msize(p));          /* set all bytes in p to 'R' */
  12575.    }
  12576.  
  12577.    /* call term function to close and destroy the heap */
  12578.    rc = term(uheap, init_block);
  12579.  
  12580.    puts("Sample 1 ending...");
  12581.    return rc;
  12582. }
  12583.  
  12584. Example of a Shared User Heap - Child Process shows the process started by the 
  12585. loop in the parent process.  This process uses DosGetSharedMem to access the 
  12586. shared memory by name, then extracts the heap handle for the heap created by 
  12587. the parent process. The process then opens the heap, makes it the default heap, 
  12588. and performs some operations on it in the loop. After the loop, the process 
  12589. replaces the old default heap, closes the user heap, and ends. 
  12590.  
  12591.  
  12592. Example of a Shared User Heap - Child Process
  12593.  
  12594. #include <umalloc.h>
  12595. #include <stdio.h>
  12596. #include <stdlib.h>
  12597. #include <string.h>
  12598. #define INCL_DOSMEMMGR
  12599. #include <os2.h>
  12600.  
  12601. int main(void)
  12602. {
  12603.    int rc, a;        /* for return code, loop iteration */
  12604.    Heap_t uheap, oldheap;          /* heap to create, old default heap */
  12605.    void *init_block;                /* to point to the shared memory   */
  12606.    char *p;                            /* for allocating from the heap    */
  12607.  
  12608.    /* get the named shared memory block and check result */
  12609.    if (DosGetNamedSharedMem(&init_block, /* assign to init_block */
  12610.                             "\\SHAREMEM\\MYNAME",        /* name of memory */
  12611.                             PAG_READ | PAG_WRITE))     /* flags */
  12612.       return 1;
  12613.  
  12614.    /* extract heap handle from shared memory and assign to uheap */
  12615.    memcpy(&uheap, init_block, sizeof(Heap_t));
  12616.  
  12617.    if (_uopen(uheap))                       /* open heap and check result */
  12618.       return 1;
  12619.  
  12620.    /* register uheap as default runtime heap, save old default */
  12621.    oldheap = _udefault(uheap);
  12622.    if (oldheap == NULL)
  12623.       return 1;
  12624.  
  12625.    /* perform operations on uheap */
  12626.    for (a = 1; a < 10; a++)
  12627.    {
  12628.       p = malloc(10);      /* malloc uses default heap, which is now uheap */
  12629.       memset(p, 'M', _msize(p));
  12630.       free(p);
  12631.    }
  12632.  
  12633.    /* replace original default heap and check result */
  12634.    if (uheap != _default(oldheap))
  12635.       return 1;
  12636.  
  12637.    if (_uclose(uheap))             /* close the heap for this process */
  12638.       return 1;
  12639.  
  12640.    return 0;
  12641.  
  12642.  
  12643. ΓòÉΓòÉΓòÉ 17.3. Debugging Your Heaps ΓòÉΓòÉΓòÉ
  12644.  
  12645. VisualAge C++ provides two sets of functions for debugging your memory 
  12646. problems: 
  12647.  
  12648.    1. Debug Memory Management Functions 
  12649.  
  12650.    2. Heap-Checking Functions 
  12651.  
  12652.    3. Which Should I Use? 
  12653.  
  12654.  
  12655. ΓòÉΓòÉΓòÉ 17.3.1. Debug Memory Management Functions ΓòÉΓòÉΓòÉ
  12656.  
  12657. Debug versions of the heap-specific memory management functions are provided, 
  12658. just as they are for the regular versions. Each debug version performs the same 
  12659. function as its non-debug counterpart.  In addition, the debug version calls 
  12660. _uheap_check to check the heap used in the call, and records the file and line 
  12661. number where the memory was allocated or freed.  You can then use 
  12662. _dump_allocated or _dump_allocated_delta to display information about currently 
  12663. allocated memory blocks. Information is printed to stderr; you can change the 
  12664. destination with the _set_crt_msg_handle function. 
  12665.  
  12666. You can use debug memory management functions for any type of heap, including 
  12667. tiled and shared memory. To use the debug versions, specify the Debug Memory 
  12668. compiler option, /Tm. The VisualAge C++ compiler then maps all calls to memory 
  12669. management functions (regular or heap-specific) to the corresponding debug 
  12670. version. 
  12671.  
  12672. Note:  If you parenthesize the name of a memory management function, the 
  12673. function is not mapped to the debug version. This does not apply to the C++ new 
  12674. and delete functions, which are mapped to their debug versions regardless of 
  12675. parentheses. 
  12676.  
  12677. Prior to Version 2.1 of VisualAge C++, debug memory management functions and 
  12678. tiled memory functions (for example, _tmalloc) were not compatible. You can now 
  12679. specify both /Gt and /Tm together, to map regular memory management functions 
  12680. to tiled debug versions (for example, _debug_tmalloc). 
  12681.  
  12682. Another restriction in earlier versions of VisualAge C++ was that you could not 
  12683. mix debug and non-debug memory management functions, meaning you could not 
  12684. allocate with a regular function and then free the object with the debug 
  12685. version.  This restriction no longer exists. 
  12686.  
  12687.  
  12688. ΓòÉΓòÉΓòÉ 17.3.1.1. Skipping Heap Checks ΓòÉΓòÉΓòÉ
  12689.  
  12690. As stated above, each debug function calls _heap_check (or _uheap_check) to 
  12691. check the heap.  Although this is useful, it can also increase your program's 
  12692. memory requirements and decrease its execution speed. 
  12693.  
  12694. To reduce the overhead of checking the heap on every debug memory management 
  12695. function, you can control how often the functions check the heap with the 
  12696. DDE4_HEAP_SKIP environment variable. This is not required in most applications 
  12697. unless the application is extremely memory intensive. 
  12698.  
  12699. Set DDE4_HEAP_SKIP with the SET command, like any other environment variable. 
  12700. You can set it either in CONFIG.SYS, from the command line, or in your project. 
  12701. The syntax for DDE4_HEAP_SKIP is: 
  12702.  
  12703.   SET DDE4_HEAP_SKIP= increment, [start]
  12704.  
  12705. increment specifies how often you want the debug functions to check the heap. 
  12706. In the above statement, the comma is optional. The start parameter is also 
  12707. optional; you can use it to start skipping heap checks after start calls to 
  12708. debug functions. 
  12709.  
  12710. When you use start parameter to start skipping heap checks, you are trading off 
  12711. heap checks that are done implicitly against program execution speed.  You 
  12712. should therefore start with a small increment (like 5) and slowly increase 
  12713. until the application is usable. 
  12714.  
  12715. For example, if you specify: 
  12716.  
  12717.   SET DDE4_HEAP_SKIP= 10
  12718. then every tenth debug memory function call performs a heap check.  If you 
  12719. specify: 
  12720.  
  12721.   SET DDE4_HEAP_SKIP= 5, 100
  12722. then after 100 debug memory function calls, only every fifth call performs a 
  12723. heap check. Other than the heap check, the debug functions behave exactly the 
  12724. same as usual. 
  12725.  
  12726.  
  12727. ΓòÉΓòÉΓòÉ 17.3.2. Heap-Checking Functions ΓòÉΓòÉΓòÉ
  12728.  
  12729. VisualAge C++ also provides some new functions for validating user heaps: 
  12730. _uheapchk, _uheapset, and _uheap_walk (Each of these functions has a 
  12731. non-heap-specific version that validates the default heap.) 
  12732.  
  12733. Both _uheapchk and _uheapset check the specified heap for minimal consistency; 
  12734. _uheapchk checks the entire heap, while _uheapset checks only the free memory. 
  12735. _uheapset also sets the free memory in the heap to a value you specify. 
  12736. _uheap_walk traverses the heap and provides information about each allocated or 
  12737. freed object to a callback function that you provide.  You can then use the 
  12738. information however you like. 
  12739.  
  12740. These heap-checking functions are defined in <umalloc.h> (the regular versions 
  12741. are also in <malloc.h>). They are not controlled by a compiler option, so you 
  12742. can use them in your program at any time. 
  12743.  
  12744.  
  12745. ΓòÉΓòÉΓòÉ 17.3.3. Which Should I Use? ΓòÉΓòÉΓòÉ
  12746.  
  12747. Both sets of debugging functions have their benefits and drawbacks.  Which you 
  12748. choose to use depends on your program, your problems, and your preference. 
  12749.  
  12750. The debug memory management functions provide detailed information about all 
  12751. allocation requests you make with them in your program. You don't need to 
  12752. change any code to use the debug versions; you need only specify the /Tm 
  12753. compiler option. However, because only calls that have been mapped to debug 
  12754. versions provide any information, you may have to rebuild many or all of your 
  12755. program's modules, which can be time-consuming. 
  12756.  
  12757. On the other hand, the heap-checking functions perform more general checks on 
  12758. the heap at specific points in your program. You have greater control over 
  12759. where the checks the occur. The heap-checking functions also provide 
  12760. compatibility with other compilers that offer these functions. You only have to 
  12761. rebuild the modules that contain the heap-checking calls. However, you have to 
  12762. change your source code to include these calls, which you will probably want to 
  12763. remove in your final code. Also, the heap-checking functions only tell you if 
  12764. the heap is consistent or not; they do not provide the details that the debug 
  12765. memory management functions do. 
  12766.  
  12767. What you may choose to do is add calls to heap-checking functions in places you 
  12768. suspect possible memory problems. If the heap turns out to be corrupted, at 
  12769. that point you may want to rebuild with the /Tm option. 
  12770.  
  12771. Note:  When the debug memory option /Tm is specified, code is generated to 
  12772. pre-initialize the local variables for all functions.  This makes it much more 
  12773. likely that uninitialized local variables will be found during the normal debug 
  12774. cycle rather than much later (usually when the code is optimized). 
  12775.  
  12776. Regardless of which debugging functions you choose, your program requires 
  12777. additional memory to maintain internal information for these functions. If you 
  12778. are using fixed-size heaps, you may have to increase the heap size in order to 
  12779. use the debugging functions. 
  12780.  
  12781. For more information on the debug memory management functions and how to use 
  12782. them, see Debug Functions. 
  12783.  
  12784.  
  12785. ΓòÉΓòÉΓòÉ 18. The IBM System Object Model ΓòÉΓòÉΓòÉ
  12786.  
  12787. The IBM System Object Model (SOM) provides a common programming interface for 
  12788. building and using objects.  SOM improves your C++ programming productivity in 
  12789. two ways: 
  12790.  
  12791.      If you develop or maintain libraries of C++ classes and methods that are 
  12792.       used by other application developers, SOM allows you to release new 
  12793.       versions of a library without requiring users of the library to recompile 
  12794.       their applications. 
  12795.      SOM lets you make your C++ classes and objects accessible to programs 
  12796.       written in other languages, and to write C++ programs that use classes 
  12797.       and objects created using other SOM-supported languages. 
  12798.  
  12799.  You can make classes and methods in existing C++ programs SOM-accessible 
  12800.  without having to rewrite class and method definitions. Although SOM imposes 
  12801.  some restrictions on C++ coding conventions, you should be able to convert 
  12802.  most C++ programs for SOM support with minimal effort. VisualAge C++ can 
  12803.  convert existing C++ classes to SOM classes. This method of creating SOM 
  12804.  classes is sometimes referred to as the Direct-to-SOM or DTS method, and a 
  12805.  Direct-to-SOM or DTS class is one that has been converted to SOM by the 
  12806.  compiler. 
  12807.  
  12808.  The following topics are described in this chapter: 
  12809.  
  12810.      What is SOM? 
  12811.      What is DTS? 
  12812.      SOM and Upward Binary Compatibility of Libraries 
  12813.      SOM and Interlanguage Sharing of Objects and Methods 
  12814.      Differences between SOM and C++ 
  12815.      Converting C++ Programs to SOM Using SOMAsDefault 
  12816.      Creating SOM-Compliant Programs by Inheriting from SOMObject 
  12817.      Creating Shared Class Libraries with SOM 
  12818.      Using SOM Classes in DSOM Applications 
  12819.      Macro Defined for SOM 
  12820.      Pragmas for Using SOM 
  12821.      System Object Model (SOM) Options 
  12822.  
  12823.  This chapter does not describe the entire scope of SOM.  For more detail on 
  12824.  SOM, see the online SOM Programming Guide and the online SOM Programming 
  12825.  Reference. 
  12826.  
  12827.  
  12828. ΓòÉΓòÉΓòÉ 18.1. What is SOM? ΓòÉΓòÉΓòÉ
  12829.  
  12830. SOM defines an interface between programs, or between libraries and programs, 
  12831. so that an object's interface is separated from its implementation.  SOM allows 
  12832. classes of objects to be defined in one programming language and used in 
  12833. another, and it allows libraries of such classes to be updated without 
  12834. requiring client code to be recompiled. 
  12835.  
  12836. A SOM library consists of a set of classes, methods, static functions, and data 
  12837. members.  Programs that use a SOM library can create objects of the types 
  12838. defined in the library, use the methods defined for an object type, and derive 
  12839. subclasses from SOM classes, even if the language of the program accessing the 
  12840. SOM library does not support class typing.  A SOM library and the programs that 
  12841. use objects and methods of that library need not be written in the same 
  12842. programming language.  SOM also minimizes the impact of revisions to libraries. 
  12843. If a SOM library is changed to add new classes or methods, or to change the 
  12844. internal implementation of classes or methods, you can still run a program that 
  12845. uses that library without recompiling. This is not the case for all other C++ 
  12846. libraries, which in some cases require recompilation of all programs that use 
  12847. them whenever the libraries themselves are changed. 
  12848.  
  12849. SOM provides an Application Programming Interface (API) that gives programs 
  12850. access to information about a SOM class or SOM object.  Any SOM class inherits 
  12851. a set of virtual methods that can be used, for example, to find the class name 
  12852. of an object, or to determine whether a particular method is available for an 
  12853. object. These API functions are fully described in the online SOM Programming 
  12854. Guide. 
  12855.  
  12856. You can make your C++ classes and methods SOM-accessible in one of two ways: 
  12857. by using pragmas to direct the compiler in generating a SOM interface for your 
  12858. code, or by explicitly deriving your classes from SOMObject.  Both of these 
  12859. techniques are described later in this chapter. In both cases, VisualAge C++ 
  12860. can also generate Interface Definition Language (IDL) files which are required 
  12861. to make your C++ SOM classes accessible to non-C++ programs. For further 
  12862. details see Interface Definition Language (IDL) Considerations. 
  12863.  
  12864. Once you have a SOM-compliant version of your library, you can add methods, 
  12865. types, and subtypes to that library, or change the implementation of methods, 
  12866. without requiring programs that use your library to be recompiled.  These 
  12867. programs need only be recompiled if they themselves are modified, for example 
  12868. to make use of newly defined types or methods.  See SOM and Upward Binary 
  12869. Compatibility of Libraries for further details. 
  12870.  
  12871.  
  12872. ΓòÉΓòÉΓòÉ 18.1.1. SOM and CORBA ΓòÉΓòÉΓòÉ
  12873.  
  12874. SOM complies with the Common Object Request Broker Architecture (CORBA) 
  12875. standard defined by the Object Management Group.  CORBA is an industry-wide 
  12876. standard for the management of objects across heterogeneous, distributed 
  12877. systems. 
  12878.  
  12879.  
  12880. ΓòÉΓòÉΓòÉ 18.1.2. The Cost of Using SOM ΓòÉΓòÉΓòÉ
  12881.  
  12882. SOM is a powerful tool, but the flexibility that it gives you comes at a price. 
  12883. A program that is SOM-enabled may run more slowly than an equivalent one in 
  12884. native C++.  You should weigh the many benefits of SOM against the negative 
  12885. effect it may have on the performance of your program. 
  12886.  
  12887.  
  12888. ΓòÉΓòÉΓòÉ 18.1.3. SOM and DSOM ΓòÉΓòÉΓòÉ
  12889.  
  12890. Distributed SOM (DSOM) is an extension of SOM that permits the creation of 
  12891. client programs capable of calling the methods of remote SOM objects.  Such 
  12892. method calls are entirely transparent to both the client and the server. When 
  12893. you compile your C++ classes with SOM support, those classes can be used/in 
  12894. DSOM applications. 
  12895.  
  12896. For further details on DSOM, see Using SOM Classes in DSOM Applications. 
  12897.  
  12898.  
  12899. ΓòÉΓòÉΓòÉ 18.2. What is DTS? ΓòÉΓòÉΓòÉ
  12900.  
  12901. If you are an experienced SOM programmer who has used earlier versions of SOM 
  12902. from C or C++ programs, you know that SOM defines bindings for those languages. 
  12903. The language bindings consist of a number of macros plus structure or class 
  12904. definitions in header files with the extensions .h and .ih (for C) and .xh and 
  12905. xih (for C++). They are generated for a particular SOM class by running the SOM 
  12906. Compiler sc.exe on the .idl file for that class interface. The bindings can be 
  12907. used with a wide range of C and C++ compilers and do not require special 
  12908. compiler support. 
  12909.  
  12910. Direct-to-SOM (DTS) is a new and much more flexible way of using SOM in a C++ 
  12911. program. DTS class definitions resemble regular C++ classes, and you can either 
  12912. write them directly or use sc.exe to generate them into files with an .hh 
  12913. extension from existing IDL. DTS C++ class definitions can only be used with 
  12914. C++ compilers like VisualAge C++ that support DTS. 
  12915.  
  12916. DTS provides the same access to SOM functionality that the C++ bindings do but, 
  12917. in addition, DTS supports far more of the C++ language. DTS supports member 
  12918. operators, conversion functions, user-defined new and delete operators, 
  12919. function overloading, stack local SOM objects, and first-class source debugging 
  12920. support for SOM classes. You can write and subclass your DTS classes directly 
  12921. and may never need to write a line of IDL. 
  12922.  
  12923. VisualAge C++ supports DTS C++, but still can be used with C and C++ bindings. 
  12924. SOM DLLs and EXEs can interoperate freely whether constructed using C bindings, 
  12925. C++ bindings, or DTS C++. 
  12926.  
  12927. Warning: Within one single C++ compilation, it is not possible to use both C++ 
  12928. bindings and DTS. A useful rule of thumb is that if you include any .xh header 
  12929. files in your compilation, you must not also include any .hh files, or use the 
  12930. SOMAsDefault pragma or the /Ga option. 
  12931.  
  12932.  
  12933. ΓòÉΓòÉΓòÉ 18.3. Interface Definition Language ΓòÉΓòÉΓòÉ
  12934.  
  12935. The Interface Definition Language (IDL) is a language-independent notation for 
  12936. specifying the interfaces of SOM objects. It is required for implementing DSOM 
  12937. classes, and when making your C++ SOM classes accessible from other languages. 
  12938. VisualAge C++ generates an IDL description of your SOM classes for you. For 
  12939. more information about IDL, see the online SOM Programming Guide. 
  12940.  
  12941.  
  12942. ΓòÉΓòÉΓòÉ 18.4. SOM and Upward Binary Compatibility of Libraries ΓòÉΓòÉΓòÉ
  12943.  
  12944. This section is intended for programmers who are developing or maintaining 
  12945. libraries containing C++ class and object definitions. This section does not 
  12946. describe how to write programs that use a SOM-compliant library. 
  12947.  
  12948. When you make changes to a SOM library that contains C++ class and method 
  12949. definitions, programs that use your library may or may not need to be 
  12950. recompiled in order to work with the new version of the library. Changes to 
  12951. your library that may not require recompilation of client programs include: 
  12952.  
  12953.      Adding new classes, including base classes 
  12954.      Adding new methods or data members to existing classes 
  12955.      Changing or removing private methods or data members from classes 
  12956.      Changing the internal implementation of public or protected methods 
  12957.      Moving member functions from a derived class to a base class. 
  12958.  For more detail on such changes, see the online SOM Programming Guide and the 
  12959.  online SOM Programming Reference. 
  12960.  
  12961.  If you change your library only in the ways described above, and you follow 
  12962.  the rules described in Release Order of SOM Objects, you can provide the new 
  12963.  library to your users in binary form, and their programs will work with the 
  12964.  new library without needing to be recompiled, or even relinked if the library 
  12965.  is a dynamically linked library. 
  12966.  
  12967.  Changes to your library that will require recompilation of client programs 
  12968.  include: 
  12969.  
  12970.      Removing classes 
  12971.      Removing public data members, methods, or static member functions from 
  12972.       existing classes. 
  12973.  
  12974.  In the context of the above list, removing also includes renaming. Renaming an 
  12975.  item from a library is equivalent to removing the item and adding a new item 
  12976.  with the same characteristics.  If you use the SOMMethodName or SOMClassName 
  12977.  pragmas to provide a SOM name for a C++ method or class, changing the SOM name 
  12978.  has the same effect as renaming the C++ method or class name. 
  12979.  
  12980.  Note that if you add the SOMMethodName or SOMNoMangling pragmas for a method 
  12981.  this also changes the SOM name from that supplied by the compiler to that 
  12982.  specified by the pragma.  If there is any likelihood of non-C++ programs using 
  12983.  your SOM classes, use these pragmas for your initial implementation. 
  12984.  
  12985.  The remainder of this section describes details of how SOM provides upward 
  12986.  binary compatibility of libraries.  You do not need to know this information 
  12987.  to create or maintain SOM-compliant libraries, but the information will help 
  12988.  you understand when and why certain SOM pragmas are used (specifically, 
  12989.  SOMReleaseOrder and SOMClassVersion). 
  12990.  
  12991.  
  12992. ΓòÉΓòÉΓòÉ 18.4.1. Release Order of SOM Objects ΓòÉΓòÉΓòÉ
  12993.  
  12994. SOM achieves binary compatibility by arranging all the components of a class 
  12995. into ordered lists, locating them by their position in a list, and by enforcing 
  12996. rules to ensure that the ordering of the lists never changes.  There are three 
  12997. lists maintained for each class. Two lists are for instance data, and one is 
  12998. for member functions. 
  12999.  
  13000. The first list is for public instance data.  The ordering in this list is the 
  13001. declaration order of the public instance data in the class. The corresponding 
  13002. rule that preserves this order and ensures binary upward compatibility is that 
  13003. the declaration order must not change, and that new public data members must be 
  13004. added after all preexisting public members. 
  13005.  
  13006. The second list is for protected and private instance data. This list is 
  13007. ordered and the order preserved in exactly the same manner as for the public 
  13008. instance data list. 
  13009.  
  13010. Adding new public or protected data members only forces you to recompile 
  13011. clients that need to use the new data. 
  13012.  
  13013. Deleting or reordering public data members will break binary compatibility, and 
  13014. require recompilation of all clients and derived classes.  Deleting or 
  13015. reordering protected data members will require recompilation of derived 
  13016. classes, but not of clients since they did not have access to the protected 
  13017. data. 
  13018.  
  13019. The third ordered list is a list of all member functions introduced by the 
  13020. class (both static and nonstatic), plus any static data members in the class. 
  13021.  
  13022. Virtual functions that override virtual functions in base classes do not appear 
  13023. in this list, but do appear in the list belonging to the base class that 
  13024. introduced them.  As a special case of this rule, a class's default 
  13025. constructor, copy constructor, destructor, and default assignment operator are 
  13026. all treated as overrides of virtual functions introduced by SOMObject, and so 
  13027. do not appear in the derived class's list. 
  13028.  
  13029. This third list, called the "release order", is determined in one of two ways. 
  13030. The simpler way is the declaration order of the member functions and static 
  13031. data members, and the resulting compatibility rule is that once again new 
  13032. members must be added after all others in the class declaration. Note that for 
  13033. the purposes of this rule, attributes created using the SOMAttribute pragma 
  13034. behave as though declarations of the _get and _set methods appeared in place of 
  13035. the data declaration. See The SOMAttribute Pragma and set and get Methods for 
  13036. Attribute Class Members for more information. 
  13037.  
  13038. Note also that this third list contains all member functions and static data 
  13039. members, whether their access is public, protected, or private.  This sometimes 
  13040. makes the compatibility rule overly constraining to a class designer, who may 
  13041. prefer to group the member function declarations logically or by access, or 
  13042. even to omit private methods from the class declaration provided to clients of 
  13043. the class. For this reason, VisualAge C++ provides a pragma that can be used to 
  13044. explicitly specify the release order for a class.  If the SOMReleaseOrder 
  13045. pragma is used for a class, then the declaration order of member functions is 
  13046. no longer significant, and the compatibility rule is changed to require that 
  13047. new members be added at the end of the pragma. 
  13048.  
  13049. // Original Class Definition:
  13050. #pragma SOMAsDefault(on) // define ensuing classes as SOM
  13051. class Bicycle {
  13052.   public:
  13053.      int Model;
  13054.      static int Count;
  13055.      Bicycle(); // defined elsewhere
  13056.      void showBicycle(); // defined elsewhere
  13057. #pragma SOMAttribute(Model,publicdata)
  13058. #pragma SOMReleaseOrder( \
  13059.    Model, \
  13060.    Count,\
  13061.    showBicycle()))
  13062. };
  13063. #pragma SOMAsDefault(pop) // resume prior setting of SOMAsDefault
  13064.  
  13065. In the revised version below, new methods and static data members are specified 
  13066. after the existing methods, within the SOMReleaseOrder pragma.  Whether you 
  13067. place the declarations for the new methods and static data members before or 
  13068. after existing ones is not important, as long as you use SOMReleaseOrder to 
  13069. maintain the positions of existing functions in the release order: 
  13070.  
  13071. // Revision:
  13072. #pragma SOMAsDefault(on)
  13073. class Bicycle {
  13074.   public:
  13075.      int Model;
  13076.      static int Count;
  13077.      static int NumberSold;
  13078.      Bicycle();
  13079.      void showBicycle();
  13080.      int sellBicycle(int); // defined elsewhere
  13081. #pragma SOMAttribute(Model,publicdata)
  13082. #pragma SOMReleaseOrder( \
  13083.    Model, \
  13084.    Count, \
  13085.    showBicycle()), \
  13086.    NumberSold, \
  13087.    sellBicycle(int))
  13088. };
  13089. #pragma SOMAsDefault(pop)
  13090.  
  13091. Note that in the example above, it is not necessary to specify the argument 
  13092. type (int) for sellBicycle().  If sellBicycle() were overloaded with multiple 
  13093. argument types (for example, sellBicycle(int) and sellBicycle(int,char*)), you 
  13094. would need to specify both overloads of the function in SOMReleaseOrder. 
  13095.  
  13096. You can use the /Fr (give the release order of a class) option to have the 
  13097. compiler generate a #pragma SOMReleaseOrder for a class.  For further details 
  13098. see The SOMReleaseOrder Pragma. 
  13099.  
  13100.  
  13101. ΓòÉΓòÉΓòÉ 18.4.1.1. Default Release Order Rules ΓòÉΓòÉΓòÉ
  13102.  
  13103. If you do not specify a release order for a class, the compiler orders methods 
  13104. (including the get and set methods of SOM attributes) in the order of their 
  13105. appearance within the class definition. 
  13106.  
  13107. As long as you follow the guidelines given in this section (do not remove any 
  13108. public or protected methods or data members, and do not reorder previously 
  13109. released methods or static data members), you can provide new releases of your 
  13110. library and the programs that use that library will not need to be recompiled. 
  13111. Even if you are providing the library only to C++ programs and do not require 
  13112. SOM's ability to allow cross-language sharing of class and method definitions, 
  13113. this freedom from recompilation gives you more room to make minor adjustments 
  13114. or major enhancements to your library, and it decreases the resistance that 
  13115. those using the library might otherwise have to installing new versions of the 
  13116. library. 
  13117.  
  13118.  
  13119. ΓòÉΓòÉΓòÉ 18.4.2. Version Control for SOM Libraries and Programs ΓòÉΓòÉΓòÉ
  13120.  
  13121. The release order of a class's data members, methods, and static member 
  13122. functions enables SOM client programs to work with new versions of SOM 
  13123. libraries without being recompiled.  This means that a library can be 
  13124. recompiled after client programs have already been compiled and linked to an 
  13125. earlier version of the library.  However, problems can occur if a program is 
  13126. compiled to one version of the library, and then a lower or backlevel version 
  13127. of the library is substituted. SOM implements a form of version control that 
  13128. can detect this situation. 
  13129.  
  13130. The following scenario illustrates how version control works with SOM: 
  13131.  
  13132.    1. A SOM library containing a new version of the Bicycle class is compiled. 
  13133.       The "version" of the class is major version 1, minor version 5 (or, for 
  13134.       simplicity, version 1.5).  This version is assigned within the class 
  13135.       definition, using the SOMClassVersion pragma. 
  13136.  
  13137.    2. A program that uses the SOM library's definition of class Bicycle is then 
  13138.       compiled.  The compiler determines that the version of Bicycle the 
  13139.       program was compiled to is version 1.5.  The program runs successfully 
  13140.       with this version of the library. 
  13141.  
  13142.    3. A new version of the SOM library becomes available, and class Bicycle is 
  13143.       now at version 1.6.  The program that was compiled to version 1.5 still 
  13144.       works, because SOM libraries are upward compatible. 
  13145.  
  13146.    4. The program that uses the Bicycle class is copied to a different system, 
  13147.       and class Bicycle in the SOM library on that system is at version 1.3. 
  13148.  
  13149.    5. When the program using Bicycle is loaded, the SOM runtime determines that 
  13150.       a backlevel version of a Bicycle is being constructed, and it issues a 
  13151.       warning message and ends the program. (If class version control were not 
  13152.       used, the results of this run of the program would be unpredictable.) 
  13153.  
  13154.  SOM verifies that the major version is the same for a client and the objects 
  13155.  it tries to create.  When a SOM class increases its major version number, SOM 
  13156.  assumes that an incompatible change has occurred. 
  13157.  
  13158.  You can use version control to ensure that programs do not experience 
  13159.  unpredictable behavior as a result of using backlevel definitions of classes 
  13160.  when more recent versions of those classes were expected. 
  13161.  
  13162.  Note:  Currently the SOM runtime only tests for a compatible version of a 
  13163.         class the first time an object of that class is instantiated.  This can 
  13164.         lead to problems in programs consisting of multiple compilation units, 
  13165.         in which the uses of an object in one compilation unit expect a 
  13166.         different version from the uses of that object in another compilation 
  13167.         unit. 
  13168.  
  13169.  The following scenario illustrates the problem: 
  13170.  
  13171.    1. A program requests an instance of a SOM class MyClass at version 1 
  13172.       release 3.  The SOM runtime determines that the current version of 
  13173.       MyClass is version 1 release 4, so the object is created successfully. 
  13174.  
  13175.    2. Another compilation unit within the program requests an instance of 
  13176.       MyClass at version 1 release 5 (because that compilation unit was 
  13177.       compiled later than the first compilation unit). The SOM runtime does not 
  13178.       check for version compatibility, because it already did so when the first 
  13179.       MyClass instance was created.  As a result, a program expecting at least 
  13180.       version 1 release 5 of a class is given an object of an earlier (and 
  13181.       possibly incompatible) version of that class. 
  13182.  
  13183.  If you update the version of a SOM class and recompile one of its clients, you 
  13184.  should recompile all the clients of its class to avoid the problem described 
  13185.  above. 
  13186.  
  13187.  
  13188. ΓòÉΓòÉΓòÉ 18.4.3. Recompilation Requirements for SOM Programs ΓòÉΓòÉΓòÉ
  13189.  
  13190. When you make changes to a SOM class, the type of change determines what parts 
  13191. of your program and its client code require recompilation. The following tables 
  13192. show the major types of changes you can make to a SOM class, and what code must 
  13193. be recompiled when you make any such change. 
  13194.  
  13195. Note: 
  13196.  
  13197.    1. Changing the signature or name of a method, or the name of a data member, 
  13198.       or changing the access from private to protected/public or back, is 
  13199.       equivalent to deleting one method or data member and adding another. 
  13200.  
  13201.    2. These tables list the access levels in the first column and the 
  13202.       compilation units that need to be recompiled for adding, changing, and 
  13203.       deleting elements in the second, third, and fourth columns, respectively. 
  13204.       For example, for a private method, the entry under Adding is "Class, 
  13205.       added method". This means that you have to recompile the compilation unit 
  13206.       where the class is defined and, if it is a different compilation unit, 
  13207.       the compilation unit where the new method is defined. 
  13208.  
  13209.    3. Classes that have all member functions declared inline are considered to 
  13210.       be declarations according to the rules of C++. These "declarations" can 
  13211.       appear in several different compilation units.  If you change a member of 
  13212.       such a class, the "class" entry in these tables means that you must 
  13213.       recompile the compilation unit where the SOMBuildClass structures are 
  13214.       created.  See The SOMDefine Pragma for more details. 
  13215.  
  13216.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13217.   Γöé Table 8. Recompilation Required for Method Changes              Γöé
  13218.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13219.   Γöé ACCESS  Γöé ADDING        Γöé CHANGING THE IMPLE-  Γöé DELETING       Γöé
  13220.   Γöé      Γöé            Γöé MENTATION       Γöé           Γöé
  13221.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13222.   Γöé PRIVATE  Γöé Class, added method  Γöé Class, changed    Γöé Class        Γöé
  13223.   Γöé      Γöé            Γöé method        Γöé           Γöé
  13224.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13225.   Γöé PRO-   Γöé Class, added method  Γöé Class, changed    Γöé Class, friends,   Γöé
  13226.   Γöé TECTED  Γöé            Γöé method        Γöé subclasses      Γöé
  13227.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13228.   Γöé PUBLIC  Γöé Class, added method  Γöé Class, changed    Γöé Class, friends,   Γöé
  13229.   Γöé      Γöé            Γöé method        Γöé subclasses, all   Γöé
  13230.   Γöé      Γöé            Γöé            Γöé clients that refer- Γöé
  13231.   Γöé      Γöé            Γöé            Γöé enced method     Γöé
  13232.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13233.  
  13234.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  13235.   Γöé Table 9. Recompilation Required for Data Member Changes            Γöé
  13236.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13237.   Γöé ACCESS  Γöé ADDING        Γöé CHANGING THE TYPE   Γöé DELETING       Γöé
  13238.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13239.   Γöé PRIVATE  Γöé Class, methods using Γöé Class, methods using Γöé Class, methods that Γöé
  13240.   Γöé      Γöé new data, friends   Γöé changed data,     Γöé used data, friends  Γöé
  13241.   Γöé      Γöé            Γöé friends        Γöé           Γöé
  13242.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13243.   Γöé PRO-   Γöé Class, methods using Γöé Class, methods using Γöé Class, methods that Γöé
  13244.   Γöé TECTED  Γöé new data, friends   Γöé changed data, all   Γöé used data, all sub- Γöé
  13245.   Γöé      Γöé            Γöé subclasses and    Γöé classes and friends Γöé
  13246.   Γöé      Γöé            Γöé friends        Γöé           Γöé
  13247.   Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  13248.   Γöé PUBLIC  Γöé Class, methods using Γöé Class, methods using Γöé Class, friends,   Γöé
  13249.   Γöé      Γöé new data, friends   Γöé changed data, all   Γöé subclasses, all   Γöé
  13250.   Γöé      Γöé            Γöé subclasses and    Γöé clients that refer- Γöé
  13251.   Γöé      Γöé            Γöé friends        Γöé enced the data    Γöé
  13252.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  13253.  
  13254.  Note:  Friends are assumed to have intimate knowledge of the implementation of 
  13255.  a class.  Because this knowledge includes knowledge of private data, friends 
  13256.  are assumed to be created using the same language and compiler as the classes 
  13257.  they are friends of, and they require recompilation whenever the class 
  13258.  requires recompilation. 
  13259.  
  13260.  
  13261. ΓòÉΓòÉΓòÉ 18.5. SOM and Interlanguage Sharing of Objects and Methods ΓòÉΓòÉΓòÉ
  13262.  
  13263. You can share C++ classes with other programming languages either by using the 
  13264. SOMAsDefault pragma for those classes, or by deriving the classes from 
  13265. SOMObject.  In either case, SOM restricts you from using certain C++ coding 
  13266. practices.  These are documented in Differences between SOM and C++. This 
  13267. section outlines some of the issues you have to keep in mind if you want to 
  13268. share SOM objects with other languages. See the SOMObjects Developer Toolkit 
  13269. Publications for more details and for information on accessing SOM classes and 
  13270. methods from different programming languages. For more information on the 
  13271. individual  SOM-related pragmas, see the descriptions in Pragmas for Using SOM. 
  13272.  
  13273.  
  13274. ΓòÉΓòÉΓòÉ 18.5.1. SOM Requires a Default Constructor with No Arguments ΓòÉΓòÉΓòÉ
  13275.  
  13276. One restriction SOM imposes that primarily affects interlanguage sharing of SOM 
  13277. objects, is the requirement that all classes have a default constructor that 
  13278. takes no arguments.  In C++ you can declare a class with no default 
  13279. constructor: 
  13280.  
  13281. class X {
  13282.   public:
  13283.     int Xdata;
  13284.     X(int a) {Xdata=a;};
  13285. };
  13286.  
  13287. When you compile a C++ client program that tries to call a nonexistent default 
  13288. constructor, VisualAge C++ issues a compile-time error, even when the SOM class 
  13289. the client is using was compiled separately. If you declare an  X with the 
  13290. statement X b;, given the above class definition (regardless of whether or not 
  13291. it is a SOM class), the compiler issues an error. However, if the class is a 
  13292. SOM class, the compiler must anticipate potential calls to a nonexistent 
  13293. default constructor by SOM clients other than those compiled by VisualAge C++. 
  13294. Rather than generate an arbitrary default constructor (one whose behavior may 
  13295. or may not be the desired behavior for the class), the compiler generates one 
  13296. that results in a runtime error whenever it is called. Note that this behavior 
  13297. makes the class unusable with DSOM, which requires a valid default constructor. 
  13298.  
  13299. In the following example, the defined class does not have a no-argument 
  13300. constructor.  However, it has a constructor that has all default arguments: 
  13301.  
  13302. class X {
  13303.   public:
  13304.     int Xdata;
  13305.     X(int a=3) {Xdata=a;};
  13306. };
  13307.  
  13308. VisualAge C++ generates two constructors for X if class X is a SOM class: a 
  13309. constructor that takes an integer argument whose value is assigned to Xdata, 
  13310. and a constructor that takes no argument and assigns the value 3 to Xdata. 
  13311.  
  13312. Note that it is possible for client code written in another language to 
  13313. construct an object of a class that does not have a default constructor, 
  13314. provided the client code first calls SOMNewNoInit or SOMRenewNoInit for the 
  13315. object, and then invokes the constructor. 
  13316.  
  13317.  
  13318. ΓòÉΓòÉΓòÉ 18.5.2. Accessing Special Member Functions from Other Languages ΓòÉΓòÉΓòÉ
  13319.  
  13320. In C++ you can define an operator== for a class, then use the == operator to 
  13321. determine whether two objects of the class are equal.  Not all languages 
  13322. support this concept of operator overloading.  In order for programs not 
  13323. written in C++ to be able to access special member functions such as overloaded 
  13324. operators, you must provide names with which these functions can be called from 
  13325. non-C++ programs. The compiler uses these names to generate appropriate IDL 
  13326. definitions for these operators. You can rename class operators using the 
  13327. SOMMethodName pragma. The following class definition provides SOM names through 
  13328. which non-C++ programs can access the operators of the class: 
  13329.  
  13330. #include <som.hh>
  13331. class Bicycle:  public SOMObject {
  13332.   public:
  13333.      int model;
  13334.      Bicycle();
  13335.      int operator==(Bicycle& const b) const;
  13336.      int operator <(Bicycle& const b) const;
  13337.      int operator >(Bicycle& const b) const;
  13338.      Bicycle& operator =(Bicycle& const b);
  13339. #pragma SOMMethodName(operator==(),"BicycleEquality")
  13340. #pragma SOMMethodName(operator <(),"BicycleLessThan")
  13341. #pragma SOMMethodName(operator >(),"BicycleGreaterThan")
  13342. #pragma SOMMethodName(operator=(),"BicycleAssign")
  13343. };
  13344.  
  13345. Non-C++ programs can then call these special member functions by referring to 
  13346. their SOM names (BicycleEquality etc.). 
  13347.  
  13348.  
  13349. ΓòÉΓòÉΓòÉ 18.5.3. Assignment Methods ΓòÉΓòÉΓòÉ
  13350.  
  13351. The compiler provides four SOM assignment methods for a SOM class by default, 
  13352. one of which is called when the compiler encounters an assignment operator.  If 
  13353. you define an operator= for a class, the compiler does not generate any 
  13354. assignment methods, in which case calls using the SOM method names will call 
  13355. the appropriate user-defined assignment operator. 
  13356.  
  13357. The SOM assignment methods have the following SOM names and prototypes: 
  13358.  
  13359.     SOMObject *somDefaultAssign(somAssignCtrl *, SOMObject *)
  13360.     SOMObject *somDefaultConstAssign(somAssignCtrl *, SOMObject *)
  13361.     SOMObject *somDefaultVAssign(somAssignCtrl *, SOMObject *)
  13362.     SOMObject *somDefaultConstVAssign(somAssignCtrl *, SOMObject *)
  13363.  
  13364. The somAssignCtrl parameter allows SOM to handle base class assignment to 
  13365. ensure that each base is only assigned once when a base class appears multiple 
  13366. times in an inheritance hierarchy.  A user-defined operator= method does not 
  13367. give you this capability. Therefore, if you code your own assignment method in 
  13368. a class that has multiple parents (not including SOMObject), you should use the 
  13369. SOM assignment methods rather than operator= to ensure correct results. Note 
  13370. that, except when an operator= method is defined, the compiler generates SOM 
  13371. assignment methods for any that are not user-defined. 
  13372.  
  13373. You should place any user-defined assignment methods (operator=) in the release 
  13374. order for the class. You do not need to put compiler-defined assignment methods 
  13375. into the release order unless you want to take their address. Do not put the 
  13376. SOM assignment methods in the release order, because they are introduced in 
  13377. SOMObject. 
  13378.  
  13379. If you want to define a class that can be used by a client either as a C++ 
  13380. class or as a SOM class using the SOM assignment methods, define both the 
  13381. operator= functions and the SOM assignment methods, using conditional 
  13382. compilation to determine which are included in the class definition. 
  13383.  
  13384. All operators you provide for a class, except for the default assignment 
  13385. operator, must be given SOM names using the SOMMethodName pragma, if you want 
  13386. them to be easily callable from non-C++ programs.  Otherwise, their names will 
  13387. be "mangled" by the compiler. This includes the new and delete operators, if 
  13388. you define them at the class level.  You need to specify a SOM name for 
  13389. non-default constructors, because they are overloaded versions of the default 
  13390. constructor.  You do not need to specify a SOM name for the default constructor 
  13391. or the destructor (the compiler automatically gives these functions the names 
  13392. somDefaultInit and somDestruct). 
  13393.  
  13394.  
  13395. ΓòÉΓòÉΓòÉ 18.5.3.1. Invoking Constructors from Other Languages ΓòÉΓòÉΓòÉ
  13396.  
  13397. Given a default constructor of the form: 
  13398.  
  13399. ClassName();
  13400.  
  13401. VisualAge C++ generates a function with the following signature for use by 
  13402. non-C++ programs: 
  13403.  
  13404. void somDefaultInit(this, Environment*, InitVector*);
  13405.  
  13406. The non-C++ program must ensure that the vector pointer and the environment 
  13407. pointer are correctly set or are NULL.  (You should always use a NULL value; 
  13408. the compiler may use a non-NULL value in some cases, but user code that passes 
  13409. a non-NULL value will behave unpredictably.) The presence or absence of the 
  13410. environment pointer is dictated by the callstyle of the class. (See IDL and 
  13411. OIDL Callstyles for further details.) The bindings generated by the SOM 
  13412. compiler normally ensure that the pointers are correctly set or are NULL. 
  13413.  
  13414. Copy constructors have one of the following names generated for them: 
  13415.  
  13416.       somDefaultCopyInit 
  13417.       somDefaultConstCopyInit 
  13418.       somDefaultVCopyInit 
  13419.       somDefaultConstVCopyInit 
  13420.  
  13421.  Other nondefault constructors are given a mangled name unless you supply a SOM 
  13422.  name using the SOMMethodName pragma. 
  13423.  
  13424.  When invoking a nondefault constructor from outside of C++, you should first 
  13425.  create the object using SOMNewNoInit or SOMRenewNoInit, and then invoke the 
  13426.  constructor.  If you use SOMNew or SOMRenew and then invoke the constructor, 
  13427.  you will end up initializing the same object twice. 
  13428.  
  13429.  
  13430. ΓòÉΓòÉΓòÉ 18.5.4. set and get Methods for Attribute Class Members ΓòÉΓòÉΓòÉ
  13431.  
  13432. SOM supports two types of data members: attributes and instance variables. 
  13433. Depending upon the pragma setting, the compiler generates default get and set 
  13434. methods for these attributes if you do not supply your own. If you specify 
  13435. #pragma SOMAttribute(readonly) for an attribute, no set method is generated or 
  13436. definable. An attribute is a nonstatic data member for which you have specified 
  13437. #pragma SOMAttribute. SOM predefines methods to set and get the value of 
  13438. attributes. Attributes have the following properties: 
  13439.  
  13440.      Attributes are the only way of accessing data in classes used in DSOM 
  13441.       applications. 
  13442.  
  13443.       If you fail to declare an attribute and attempt to directly access 
  13444.       instance data in a remote object, you will receive runtime error 20109 
  13445.       from SOM, and a message resembling the following: 
  13446.  
  13447.               somDataResolve error: class <X_Proxy> is abstract with respect to <X>
  13448.  
  13449.      Attributes allow the class implementor to add instrumentation or other 
  13450.       side effects to data access by explicitly defining the _get and _set 
  13451.       methods with the desired function. 
  13452.  
  13453.      You do not need to define methods to set or get the value of an 
  13454.       attribute.  This is done automatically by the compiler.  You can override 
  13455.       these methods where the automatically defined method does not provide the 
  13456.       required functionality. 
  13457.  
  13458.      The names of the set and get methods are consistent and predictable:  for 
  13459.       an attribute j, the methods are _set_j() and _get_j(). (For C++ programs 
  13460.       using the attributes, you can get or set the attributes using the 
  13461.       attribute names rather than the get and set methods.) 
  13462.  
  13463.      You can identify whether the compiler should automatically generate get 
  13464.       or set methods for an attribute, or whether to use a user-defined get or 
  13465.       set method. 
  13466.  
  13467.  Get and set methods have the following signatures for scalars, arrays, and 
  13468.  structs/unions/classes: 
  13469.  
  13470.   // when 'indirect' attribute is not used with SOMAttribute pragma:
  13471.   T _get_var() const volatile;      // scalar var of type T - get
  13472.   void _set_var(T) volatile;        // scalar var of type T - set
  13473.  
  13474.  
  13475.   T& _get_var() const volatile;     // scalar var of type T - get, when
  13476.                                     // SOMAttribute(...,indirect) is specified
  13477.   void _set_var(const volatile T&) volatile;
  13478.                                     // scalar var of type T - set, when
  13479.                                     // SOMAttribute(...,indirect) is specified
  13480.  
  13481.   T* _get_var() const volatile;     // arrays of var of type T - get
  13482.   void _set_var(const volatile T*) volatile;
  13483.                                     // arrays of var of type T - set
  13484.  
  13485.   T _get_var() const volatile;      // structs/unions/classes of type T - get
  13486.   void _set_var(const volatile T&) volatile;
  13487.                                     // structs/unions/classes of type T - set
  13488.  
  13489.  Note that pointers are used rather than references, for arrays of T.  This is 
  13490.  done because the interface treats the type as a pointer to the first array 
  13491.  element rather than as a pointer to the entire array. 
  13492.  
  13493.  You do not need to declare the get and set methods for an attribute in your 
  13494.  class declaration, if you choose to have the compiler automatically generate 
  13495.  them for you.  The compiler treats the get and set methods for an attribute as 
  13496.  being declared whether it encounters a declaration or not.  The SOMAttribute 
  13497.  pragma determines whether the get and set methods are defined by the compiler, 
  13498.  provided by the programmer, or, in the case of the set method, not provided at 
  13499.  all. If the SOMAttribute is not used, attributes are not created. 
  13500.  
  13501.  See The SOMAttribute Pragma for further information on attributes. 
  13502.  
  13503.  
  13504. ΓòÉΓòÉΓòÉ 18.6. Interface Definition Language (IDL) Considerations ΓòÉΓòÉΓòÉ
  13505.  
  13506. The Interface Definition Language (IDL) is a facility for defining the 
  13507. interface of SOM classes. IDL provides a CORBA-compliant description of a SOM 
  13508. class. When you compile a SOM-enabled C++ program with VisualAge C++, the 
  13509. compiler can generate IDL definitions for SOM classes the program defines. If 
  13510. you are writing code in another language and you want to create objects of 
  13511. those SOM classes, you normally use an .idl file to generate a header file for 
  13512. your program so that the SOM classes you use are visible to the compiler in 
  13513. question. The sc translator uses the .idl file to generate the necessary 
  13514. bindings for the other language, and also to load the Interface Repository 
  13515. (IR), which is used by DSOM. 
  13516.  
  13517. If you are creating SOM classes and you anticipate that all users of your 
  13518. classes will be coding only in C++, you do not need to consider the impact of 
  13519. IDL on how you code and on what pragmas you use. However, if there is any 
  13520. likelihood of non-C++ programs using your SOM classes, you need to understand 
  13521. the connections between IDL and VisualAge C++. 
  13522.  
  13523. If you are writing code to work with an existing SOM interface, you may start 
  13524. out with IDL interfaces.  You can use the SOM compiler from the SOMObjects 
  13525. Developer Toolkit if to create a C++ .hh file from the IDL definitions. 
  13526.  
  13527. The remainder of this section explains those connections. 
  13528.  
  13529.  
  13530. ΓòÉΓòÉΓòÉ 18.6.1. Generating IDL for C++ SOM Classes ΓòÉΓòÉΓòÉ
  13531.  
  13532. To generate IDL for a C++ SOM class, you should first ensure that the SOM class 
  13533. is declared in a .hh file (as opposed to the usual .h file used for C++ class 
  13534. declarations).  This .hh file can be included by C++ source files that use the 
  13535. class, just as .h files can.  When you want to generate the IDL for a class, 
  13536. compile the .hh file itself, rather than the C++ source files that include it. 
  13537. The compiler will produce a &3755. file containing the class IDL definition. 
  13538. You do not need to specify any SOM-related options for the IDL to be generated. 
  13539.  
  13540. You can use #pragma SOMIDLTypes within your .hh files to group types together. 
  13541. See The SOMIDLTypes Pragma for further details. 
  13542.  
  13543.  
  13544. ΓòÉΓòÉΓòÉ 18.6.2. IDL Types and C++ Types ΓòÉΓòÉΓòÉ
  13545.  
  13546. IDL names for the following built-in C++ types are identical to those types' 
  13547. C++ names: 
  13548.  
  13549.      short, unsigned short, long 
  13550.      float, double 
  13551.      char. 
  13552.  
  13553.  The following C++ types are mapped to the IDL types indicated: 
  13554.  
  13555.      signed char is mapped to octet 
  13556.      unsigned char is mapped to char 
  13557.      int is mapped to long 
  13558.      long double is mapped to double 
  13559.      unsigned int is mapped to unsigned long 
  13560.      wchar_t maps to unsigned short 
  13561.      char* maps to string when it is a parameter, otherwise it maps to char* 
  13562.      Enumerated types are mapped to integer constants. 
  13563.  
  13564.  
  13565. ΓòÉΓòÉΓòÉ 18.6.3. IDL Names and C++ SOM Pragmas ΓòÉΓòÉΓòÉ
  13566.  
  13567. If you do not use any of the SOM pragmas SOMMethodName, SOMClassName, or 
  13568. SOMNoMangling, the names of SOM class methods and class templates are mangled 
  13569. by VisualAge C++. These mangled names are the names that appear in the 
  13570. program's .idl file, and these names are likely to be long and difficult to 
  13571. understand. Although you can access SOM classes and their methods using these 
  13572. mangled names, this practice is error-prone and unnecessarily complicated.  You 
  13573. can use the above pragmas to make the SOM names for your classes more 
  13574. understandable. 
  13575.  
  13576. IDL requires that class and method names be distinct and case-insensitive. 
  13577. VisualAge C++ normally ensures this by mangling class and method names. 
  13578. Mangling encodes case differences, and also reflects argument types of 
  13579. overloaded methods in their SOM names. 
  13580.  
  13581. If you use the SOMClassName pragma to attach a SOM name to a class, make sure 
  13582. that the name you select is unique without regard to case.  If you use the 
  13583. SOMNoMangling pragma for a class or a range of classes, method names in those 
  13584. classes are not mangled, which creates conflicts between any names that differ 
  13585. only in case, and between different overloads of functions. You can use the 
  13586. SOMMethodName pragma to correct this situation, by associating SOM names with 
  13587. individual methods. 
  13588.  
  13589.      IDL matches methods by their names only.  It does not support method 
  13590.       overloading.  This means that you must differentiate overloaded methods 
  13591.       of a class by using the SOMMethodName pragma on overloaded methods. 
  13592.  
  13593.      IDL is case-insensitive.  If you define a C++ method print to print an 
  13594.       object, and a C++ method of the same class called prInt to print an 
  13595.       integer data member of that object, their IDL names will be the same if 
  13596.       you use the SOMNoMangling pragma, unless you rename one of the methods 
  13597.       using the SOMMethodName pragma. 
  13598.  
  13599.      If you use the SOMNoMangling pragma for a class or a range of classes, 
  13600.       method names in those classes are not mangled. This can result in 
  13601.       multiple overloaded functions mapping to the same name.  The compiler 
  13602.       detects such conflicts and issues an error message.  You can use 
  13603.       SOMMethodName to resolve these conflicts. 
  13604.  
  13605.      Changing the IDL name of a method can break binary compatibility because 
  13606.       IDL matches methods by name only. 
  13607.  
  13608.  
  13609. ΓòÉΓòÉΓòÉ 18.6.4. IDL and OIDL Callstyles ΓòÉΓòÉΓòÉ
  13610.  
  13611. The Common Object Request Broker Architecture (CORBA) defines an implied second 
  13612. parameter of type Environment* for SOM methods and static member functions. 
  13613. This parameter can be used to pass extra information between SOM methods and 
  13614. clients, such as exception information indicating that a SOM method could not 
  13615. be called. In initial releases, SOM did not support this second parameter. 
  13616. This can result in compatibility problems because new code may have the extra 
  13617. parameter while old code, including such classes as SOMObject and SOMClass, may 
  13618. not.  The presence or absence of this second parameter in a class method or 
  13619. static member function is referred to as the method or function's callstyle. 
  13620. The new callstyle with the Environment* parameter is referred to as the IDL 
  13621. callstyle, while the old callstyle without that parameter is referred to as the 
  13622. OIDL callstyle (for "Old IDL"). 
  13623.  
  13624. To preserve binary compatibility with old SOM application code, SOM now 
  13625. supports both callstyles.  This leads to a model where some methods in a 
  13626. program may expect environment pointers, while others may not. 
  13627.  
  13628. The callstyle is determined on a class-by-class basis.  For a given class, 
  13629. either all methods introduced by that class will expect an environment 
  13630. parameter, or none will. 
  13631.  
  13632. Note:  The callstyle of an inherited method is the callstyle of the class in 
  13633. which the method is defined, not the callstyle of the inheriting class. 
  13634.  
  13635. You can specify the callstyle for a class using the SOMCallStyle pragma.  By 
  13636. default, all classes will have the IDL callstyle. 
  13637.  
  13638.  
  13639. ΓòÉΓòÉΓòÉ 18.6.4.1. Callstyles and Pointer-to-Member ΓòÉΓòÉΓòÉ
  13640.  
  13641. You cannot assign the address of an IDL-callstyle method to a pointer to an 
  13642. OIDL-callstyle method, or vice versa.  Whether a pointer to member is an IDL- 
  13643. or OIDL-callstyle pointer depends on the class the pointer to member is 
  13644. declared in.  If the declaring class uses IDL callstyle, the pointer to member 
  13645. can only point to IDL-callstyle methods; otherwise it can only point to 
  13646. OIDL-callstyle methods. Note that conflicts between callstyles are unlikely to 
  13647. occur, because IDL is the default callstyle. 
  13648.  
  13649.  
  13650. ΓòÉΓòÉΓòÉ 18.6.5. C++ Limitations to IDL ΓòÉΓòÉΓòÉ
  13651.  
  13652. When IDL is generated for a C++ class, the bodies of inline functions are not 
  13653. emitted in the IDL.  As a result, if you later translate the IDL file back to a 
  13654. C++ header file, inline function definitions become function declarations with 
  13655. no function body. 
  13656.  
  13657. VisualAge C++ does not support inlining of C++ member functions when IDL is 
  13658. generated, and all member functions of SOM classes are called out-of-line.. 
  13659. Because inlining may be supported in the future, you should consider the bodies 
  13660. of public inline functions to be a part of the public interface of a class if 
  13661. you are concerned about upward binary compatibility of your classes. 
  13662.  
  13663.  
  13664. ΓòÉΓòÉΓòÉ 18.7. Differences between SOM and C++ ΓòÉΓòÉΓòÉ
  13665.  
  13666. SOM imposes a slightly different view of object orientation on its classes than 
  13667. does C++.  This section describes differences between the object-oriented 
  13668. features of C++ and those supported by SOM. The following topics are discussed: 
  13669.  
  13670.      Initializer lists 
  13671.      Function overloading 
  13672.      Data member offsets 
  13673.      Casting to pointer-to-SOM-object 
  13674.      Dereferencing virtual a base pointer to a derived base 
  13675.      Multiple inheritance of a base class 
  13676.      Local classes 
  13677.      Abstract classes 
  13678.      Metaclasses 
  13679.      sizeof 
  13680.      Instance data 
  13681.      Templates 
  13682.      Memory management 
  13683.      Data members implemented as attributes 
  13684.  
  13685.  
  13686. ΓòÉΓòÉΓòÉ 18.7.1. Initializer Lists and Constructors ΓòÉΓòÉΓòÉ
  13687.  
  13688. You cannot use an initializer list to initialize an object of a SOM class, 
  13689. because all SOM classes have constructors, and C++ language rules do not allow 
  13690. classes with constructors to be initialized in this way. 
  13691.  
  13692.  
  13693. ΓòÉΓòÉΓòÉ 18.7.2. Function Overloading ΓòÉΓòÉΓòÉ
  13694.  
  13695. C++ lets you define multiple methods within a class that have the same name, 
  13696. but different combinations of arguments.  These arguments are collectively 
  13697. known as a method's signature, and a class that defines multiple instances of a 
  13698. method with different signatures is said to overload that method.  A class can 
  13699. overload static member functions as well as methods. 
  13700.  
  13701. SOM does not support the C++ concept of function overloading, either for 
  13702. methods or for static member functions.  By default VisualAge C++ generates 
  13703. mangled names for all overloaded functions so that different overloads can be 
  13704. distinguished. If both your SOM classes and the programs that use them are 
  13705. coded in C++, you can easily overload functions because the compiler uses this 
  13706. consistent name-mangling scheme to resolve overloaded calls.  However, if you 
  13707. plan to make your SOM classes accessible to programs written in languages other 
  13708. than C++, you should not rely on C++ name mangling, because the mangled names 
  13709. are often difficult to understand. Instead, you should provide SOM with a 
  13710. function name to call for each signature of an overloaded function.  You do 
  13711. this using the SOMMethodName pragma. The following example shows three 
  13712. declarations of method add() for a class, and three SOMMethodName pragmas that 
  13713. make all three methods clearly accessible to SOM programs written in other 
  13714. languages: 
  13715.  
  13716. class Bicycle : public SOMObject {
  13717.   public:
  13718.      // ...
  13719.      void add(Bicycle& const);
  13720.      void add(int);
  13721.      void add();
  13722. #pragma SOMMethodName(add(Bicycle& const),"AddBike")
  13723. #pragma SOMMethodName(add(int),"AddInt")
  13724. #pragma SOMMethodName(add(),"AddVoid")
  13725. };
  13726.  
  13727. You could avoid the above SOMMethodName pragmas by relying on the C++ mangling 
  13728. scheme, but this would make client code more difficult to write or maintain. 
  13729. For example, the following function in C++: 
  13730.  
  13731. x::operator=(const volatile x);
  13732.  
  13733. is mangled to the following: 
  13734.  
  13735. dts____as__frxzvx
  13736.  
  13737. For classes in which the SOMNoMangling pragma is in effect, you must use the 
  13738. SOMMethodName pragma for all but one of the overloaded versions of a given 
  13739. method or static function.  For the sake of code clarity you should use the 
  13740. SOMMethodName pragma to rename all signatures of a function that is overloaded. 
  13741.  
  13742.  
  13743. ΓòÉΓòÉΓòÉ 18.7.3. Calling Methods Through a NULL Pointer ΓòÉΓòÉΓòÉ
  13744.  
  13745. Some implementations of C++ allow you to call nonvirtual functions through a 
  13746. NULL pointer.  You cannot do this in SOM-enabled C++ programs.  If you call a 
  13747. nonvirtual function through a NULL pointer in a SOM-enabled C++ program, the 
  13748. program may compile successfully but it will not run correctly.  For example, 
  13749. the call to the virtual function vf() below causes a trap in both native C++ 
  13750. and SOM-enabled C++, while the call to the nonvirtual function nvf() causes a 
  13751. trap only in SOM-enabled C++: 
  13752.  
  13753.    class A {
  13754.       public:
  13755.           void nvf();
  13756.           virtual void vf();
  13757.    } *a = NULL;
  13758.  
  13759.    void hoo(){
  13760.         a->nvf();    // OK in C++, traps in DTS C++
  13761.         a->vf();     // Traps in both because virtual.
  13762.    }
  13763.  
  13764.  
  13765. ΓòÉΓòÉΓòÉ 18.7.4. Data Member Offsets ΓòÉΓòÉΓòÉ
  13766.  
  13767. C++ lets you determine the offset of data members into an object.  An 
  13768. expression such as: 
  13769.  
  13770.    int ((char*)&Instance.Member - (char*)&Instance);
  13771.  
  13772. can be used in C++ to determine how far into an instance Instance the member 
  13773. Member is located. This syntax is also supported in SOM.  However, the result 
  13774. of the expression may not be identical for subclasses.  Given: 
  13775.  
  13776.   class Base : public SOMObject { public: int i; } B;
  13777.   class Derived : public Base { /* ... */ } D;
  13778.   #define MyOffset(Obj,Member) int((char*)&Obj.Member - (char*)&Obj)
  13779.  
  13780. the equality MyOffset(B,i) == MyOffset(D,i) may or may not hold, depending on 
  13781. how SOM determines the data reordering scheme for each class. 
  13782.  
  13783. The offsets of data members into an object are contiguous within each 
  13784. access-specifier (public, protected or private), and are assigned to each block 
  13785. in the order of declaration. 
  13786.  
  13787.  
  13788. ΓòÉΓòÉΓòÉ 18.7.5. Casting to Pointer-to-SOM-Object ΓòÉΓòÉΓòÉ
  13789.  
  13790. The structure of SOM objects requires that the memory layout of the instance 
  13791. begin with a pointer to an appropriate method table. This differs from normal 
  13792. C++ objects in which no such pointer is allocated unless the class has virtual 
  13793. functions.  The result of this difference is that it is not generally possible 
  13794. to treat arbitrary storage as a SOM object. In particular, casting 0 to a 
  13795. pointer to a SOM object is not recommended. You can get unexpected results when 
  13796. a SOM pointer is cast to a non-SOM pointer. See Determining which new and 
  13797. delete Operators Are Used for an example of such unexpected results. 
  13798.  
  13799.  
  13800. ΓòÉΓòÉΓòÉ 18.7.6. Dereferencing a Virtual Base Pointer to a Derived Base ΓòÉΓòÉΓòÉ
  13801.  
  13802. In native C++ a pointer to virtual base cannot be explicitly cast to a derived 
  13803. base.  This is allowed in SOM-enabled C++.  The following example illustrates 
  13804. this difference between native and SOM-enabled C++: 
  13805.  
  13806.     #include <som.hh>
  13807.  
  13808.     struct vbstruct : public virtual SOMObject {
  13809.     #pragma SOMDefine(*)
  13810.     };
  13811.  
  13812.     void main() {
  13813.        SOMObject *p = new vbstruct; // always legal
  13814.        vbstruct *q;
  13815.        q = (vbstruct *) p;          // legal for SOM, not for non-SOM
  13816.        q = p;                       // always illegal (need a cast)
  13817.     }
  13818.  
  13819.  
  13820. ΓòÉΓòÉΓòÉ 18.7.7. Multiple Inheritance of a Base Class ΓòÉΓòÉΓòÉ
  13821.  
  13822. SOM does not implement multiple occurrences of the same nonvirtual base.  For 
  13823. example: 
  13824.  
  13825. #ifdef __SOM_ENABLED__
  13826. class A : public SOMObject { /* ... */ };
  13827. #else
  13828. class A { /* ... */ };
  13829. #endif
  13830. class B : public A { /* ... */ };
  13831. class C : public A { /* ... */ };
  13832. class MyClass : public B, C { /* ... */ };
  13833.  
  13834. The compiler issues an error for the definition of class MyClass if class A is 
  13835. a SOM class. If class A is not a SOM class, the program compiles without an 
  13836. error. 
  13837.  
  13838. Note:  The compiler cannot warn you about multiple inheritance errors in SOM 
  13839.        programs when different classes in an inheritance graph are separately 
  13840.        changed and recompiled.  In the following example, assume that each 
  13841.        struct is declared in a separate file and compiled on its own: 
  13842.  
  13843.                  struct s     {};
  13844.                  struct a:s   {}; // based on s
  13845.                  struct b     {};
  13846.                  struct d:a,b {}; // based on a, b, and s
  13847.  
  13848. If the file containing struct b is changed to: 
  13849.  
  13850.    struct b:s   {}; // based on s
  13851.  
  13852. and recompiled individually, the compiler will not warn you of the error, and 
  13853. programs using struct d may behave unpredictably. 
  13854.  
  13855.  
  13856. ΓòÉΓòÉΓòÉ 18.7.8. Local Classes ΓòÉΓòÉΓòÉ
  13857.  
  13858. Local, non-file-scope classes may not be SOM classes. However, a local, 
  13859. non-file-scope class may have a nested class that is a SOM class. In the 
  13860. following example the declaration of class CantBeFromSOM causes a compiler 
  13861. error because it only has the scope of main: 
  13862.  
  13863. class IsFromSOM: SOMObject { /* ... */ };
  13864. void main() {
  13865.    class IsntFromSOM { /* ... */ };
  13866.    class CantBeFromSOM: SOMObject { /* ... */ };
  13867.    }
  13868.  
  13869.  
  13870. ΓòÉΓòÉΓòÉ 18.7.9. Abstract Classes ΓòÉΓòÉΓòÉ
  13871.  
  13872. An abstract class is a class with one or more pure virtual functions.  Abstract 
  13873. C++/SOM classes are supported. If the abstract class does not define a default 
  13874. constructor, VisualAge C++ prevents calls to the constructor from other C++ 
  13875. programs. The IDL generated by VisualAge C++ also prevents calls to a 
  13876. nonexsistent abstract class constructor from programs written in other 
  13877. languages. 
  13878.  
  13879. As usual with C++, you can provide your own method bodies for pure virtual 
  13880. member functions.  If you do this the method bodies must be provided in the 
  13881. same file as the definition of the first member that is not inline, or in the 
  13882. same file as a SOMDefine directive. 
  13883.  
  13884.  
  13885. ΓòÉΓòÉΓòÉ 18.7.10. Classes as Objects ΓòÉΓòÉΓòÉ
  13886.  
  13887. In native C++, a class is a syntactic entity that exists only at compile time; 
  13888. it has no representation outside of the source code that defines it.  A C++ 
  13889. class cannot be an object, and a C++ object cannot be a class.  The strict 
  13890. distinction between classes and objects does not hold for SOM.  A SOM class 
  13891. always exists at runtime, and is itself a SOM object. 
  13892.  
  13893. Because SOM classes are runtime objects, they can provide a number of services 
  13894. to client objects.  For example, a SOM class can respond to specific inquiries 
  13895. regarding the interface of its instances; each SOM class includes a method 
  13896. named somSupportsMethod, which when invoked with any string returns a Boolean 
  13897. value indicating whether the string represents a method supported by instances 
  13898. of the class. SOM class objects can also provide information to clients such as 
  13899. its name, the names of its base classes, the size of its instances, the number 
  13900. of methods it supports, and whether a provided SOM object is an instance of the 
  13901. class. 
  13902.  
  13903. The SOMObjects Toolkit documentation describes a method for extracting the 
  13904. class object of a class, where an object of that class already exists.  For 
  13905. example, you can call obj->somGetClass(), to extract the class object for 
  13906. object obj. 
  13907.  
  13908. Where you need to name the class object but you do not have an instance of it, 
  13909. the Toolkit allows you to code the class name, preceded by an underscore.  For 
  13910. example: 
  13911.  
  13912.    SOMObject* anotherObj;
  13913.    anotherObj->somIsInstanceOf(_Foo); // toolkit syntax
  13914.  
  13915. This syntax is not supported with DTS classes, because it imposes on the user's 
  13916. identifier space as defined by ANSI.  Instead, VisualAge C++ introduces a 
  13917. static member to each class it converts to a SOM class: 
  13918.  
  13919. SOMClass * const __ClassObject
  13920.  
  13921. This static member cannot be added to the release order for the class. You can 
  13922. use the following syntax in place of the toolkit syntax shown above, for DTS 
  13923. classes: 
  13924.  
  13925.    anotherObj->somIsInstanceOf(Foo::__ClassObject);
  13926.  
  13927. Although you can refer to this member as className::__ClassObject from within a 
  13928. C++ program, it is not a "real" data member in that it does not exist in 
  13929. memory.  The compiler resolves references to this member to a pointer to the 
  13930. class object for className. 
  13931.  
  13932.  
  13933. ΓòÉΓòÉΓòÉ 18.7.11. Metaclasses ΓòÉΓòÉΓòÉ
  13934.  
  13935. A SOM class is also an instance of a class, because all SOM classes are 
  13936. objects.  A class whose instances are other classes is called a metaclass.  A 
  13937. metaclass definition specifies the interface of a class, just as a class 
  13938. definition specifies the interface of an object. The SOM metaclass has no 
  13939. conceptual equivalent in C++.  The SOM metaclass exists at runtime, is capable 
  13940. of providing specific services to client code, and may be used as a parent of 
  13941. other metaclasses. For more details on the concept of metaclasses, see the 
  13942. online SOM Programming Guide. 
  13943.  
  13944. When you create a class in SOM, the appropriate metaclass is created 
  13945. automatically if you do not specify one. You can also explicitly create your 
  13946. own metaclasses. You can create a metaclass by deriving from SOMClass, so that 
  13947. your metaclass can perform functions such as keeping track of what SOM classes 
  13948. have been constructed in a program.  (A SOMClass object is constructed for 
  13949. every SOM class used by a program, the first time an object of that class is 
  13950. constructed.)  To create a metaclass, follow these steps: 
  13951.  
  13952.    1. Derive a new class from SOMClass, which is declared in som.hh. 
  13953.    2. Associate this new class with the instance class via the SOMMetaClass 
  13954.       pragma. 
  13955.  
  13956.  For example: 
  13957.  
  13958.   #include <som.hh>
  13959.  
  13960.   class MyMeta : public SOMClass { /* ... */ };
  13961.   class MyClass : public SOMObject {
  13962.      // ...
  13963.      #pragma SOMMetaClass(*,MyMeta)
  13964.   };
  13965.  
  13966.  Note:  The compiler does not distinguish between metaclasses and other 
  13967.  classes.  For SOM to function correctly, you should derive all metaclasses 
  13968.  from SOMClass. 
  13969.  
  13970.  
  13971. ΓòÉΓòÉΓòÉ 18.7.12. offsetof macro ΓòÉΓòÉΓòÉ
  13972.  
  13973. The offsetof macro does not work as well with SOM classes as it does with 
  13974. regular C++ classes.  Its value is determined at runtime, as the relative 
  13975. positioning of the data "blocks" introduced by each base are not known until 
  13976. then.  This means that offsetof is not a reliable way to determine the position 
  13977. of a member within a subclass.  The value of the offsetof macro for a member of 
  13978. a base cannot be assumed to be correct for subclasses of that base. 
  13979.  
  13980.  
  13981. ΓòÉΓòÉΓòÉ 18.7.13. sizeof operator ΓòÉΓòÉΓòÉ
  13982.  
  13983. The sizeof operator works differently for SOM objects than for non-SOM objects. 
  13984. The sizeof operator indicates the size in bytes of the object it is applied to. 
  13985. For non-SOM objects, this size is determined at compile time, and can therefore 
  13986. be used in expressions evaluated at compile time.  For SOM objects, sizeof 
  13987. returns a value that is determined at runtime.  This means that you cannot 
  13988. apply the sizeof operator to SOM objects in situations where the value must be 
  13989. determinable at compile time, such as array bounds (for static initializers), 
  13990. case expressions, bit field lengths, and enumerator initializers.  For example, 
  13991. the following uses of sizeof will cause compilation errors: 
  13992.  
  13993. class MyClass {
  13994.    public:
  13995.       int i:sizeof(Buffer);
  13996. };
  13997. enum { E = sizeof(MyClass) } x;
  13998. try   Buffer myBuffer[sizeof(Buffer)]; // Buffer is a SOM class
  13999. switch(/* ... */) {
  14000.    case sizeof(Buffer): break;
  14001. }
  14002.  
  14003.  
  14004. ΓòÉΓòÉΓòÉ 18.7.14. Instance Data ΓòÉΓòÉΓòÉ
  14005.  
  14006. SOM supports both static data members and arrays.  An array of SOM objects is 
  14007. represented as a pointer to an array of SOM object instances. 
  14008.  
  14009.  
  14010. ΓòÉΓòÉΓòÉ 18.7.15. Templates ΓòÉΓòÉΓòÉ
  14011.  
  14012. You instantiate a template class as with native C++. If you want to avoid 
  14013. compiler mangling of template names, you should also supply a SOM name for any 
  14014. instantiation of a template class.  For example: 
  14015.  
  14016. typedef Stack<int> IntStack;
  14017. #pragma SOMClassName(Stack<int>, "IntStack")
  14018. IntStack MyIntStack;
  14019.  
  14020. This declares an object MyIntStack of type Stack<int>.  This could also be 
  14021. coded as: 
  14022.  
  14023. Stack<int> MyIntStack;
  14024. #pragma SOMClassName(Stack<int>, "IntStack")
  14025.  
  14026. You can achieve the same effect by coding: 
  14027.  
  14028. #pragma define(Stack<int>) // instantiates class Stack<int> from template
  14029. #pragma SOMClassName(Stack<int>, "IntStack")
  14030.  
  14031. Note that the first argument of the SOMClassName pragma (the class to be 
  14032. renamed) must be the template class with its type argument, rather than the 
  14033. typedef. 
  14034.  
  14035. If you plan to make a template class accessible to non-C++ programs, you must 
  14036. define an implementation of the template class for each type that will be 
  14037. requested by those programs.  You can do this either with the SOMDefine pragma, 
  14038. or by instantiating the template within the C++ program.  For example: 
  14039.  
  14040. typedef Stack<int>    IntStack;    // assume Stack is a SOM class
  14041. typedef Stack<double> DoubleStack; // template
  14042. typedef Stack<char>   CharStack;
  14043. typedef Stack<float>  FloatStack;
  14044. // ...
  14045. IntStack i;                        // makes IntStack available
  14046.                                    // to non-C++ programs
  14047. #pragma SOMDefine(Stack<double>)   // makes DoubleStack available
  14048. #pragma SOMDefine(CharStack)       // makes CharStack available
  14049.                                    // FloatStack is not available
  14050.  
  14051. You should then use the SOMClassName pragma to provide SOM names to the 
  14052. template instantiations, so that the compiler does not generate mangled names 
  14053. for those instantiations. 
  14054.  
  14055. When using templates to implement SOM classes, do not include information 
  14056. dependent upon the instantiation type within the class description.  For 
  14057. example, the following code produces a runtime error because the SOMAttribute 
  14058. pragma is processed for both implementations, and each one is incorrect for the 
  14059. other implementation: 
  14060.  
  14061. #include <som.hh>
  14062.  
  14063. template <class T, int S = 5>           // default arg value
  14064. class D : public SOMObject {
  14065.   public:
  14066.       T Velocity;
  14067.   #pragma SOMAttribute(D<int>::Velocity, readonly)
  14068.   #pragma SOMAttribute(D<int, 9>::Velocity, readonly)
  14069. };
  14070.  
  14071. #pragma define(D<int>)
  14072. #pragma define(D<int, 9>)
  14073.  
  14074. Instead, use a single SOMAttribute pragma for each attribute within a template 
  14075. class.  For the above example, the pragma would appear as: 
  14076.  
  14077.    #pragma SOMAttribute(Velocity, readonly)
  14078.  
  14079. In cases within the class description where a class name is expected, such as 
  14080. the SOMNoMangling or SOMNoDataDirect pragmas, you should use an asterisk (*) 
  14081. for the class name. 
  14082.  
  14083.  
  14084. ΓòÉΓòÉΓòÉ 18.7.15.1. Methods of Template Classes ΓòÉΓòÉΓòÉ
  14085.  
  14086. Methods of a template can be renamed using the SOMMethodName pragma. You do not 
  14087. need to rename template methods, but if you plan to make your SOM classes 
  14088. available to non-C++ programs, you can make the interface to your classes 
  14089. simpler by renaming methods.  If you do not rename template methods, the 
  14090. compiler mangles their names, and the mangled names are difficult to remember 
  14091. and are likely to lead to typographical errors. 
  14092.  
  14093. You should use the SOMMethodName pragma to rename the methods of a template 
  14094. class for each type you plan to instantiate the template with from a non-C++ 
  14095. program. For example, if you define a template class: 
  14096.  
  14097. template class <T> class MyTemplate {
  14098.    public:
  14099.       T dataMember;
  14100.       void Push(T item);
  14101.    };
  14102.  
  14103. and you anticipate your template being used with types int and double, you 
  14104. should add pragmas such as the following to the C++ program: 
  14105.  
  14106. #pragma SOMMethodName(MyTemplate<int>::Push(int),"PushInt")
  14107. #pragma SOMMethodName(MyTemplate<double>::Push(double),"PushDouble")
  14108.  
  14109.  
  14110. ΓòÉΓòÉΓòÉ 18.7.16. Memory Management ΓòÉΓòÉΓòÉ
  14111.  
  14112. This section describes how memory is allocated to SOM objects, and tells you 
  14113. how to use the new and delete  operators for memory allocation. 
  14114.  
  14115.  
  14116. ΓòÉΓòÉΓòÉ 18.7.16.1. Heap and Stack Memory Allocation ΓòÉΓòÉΓòÉ
  14117.  
  14118. C++ programs can store objects in two different areas of memory, known as the 
  14119. stack and the heap.  The stack and the heap are implemented by software. They 
  14120. are distinguished by the fact that objects stored on the stack are 
  14121. automatically deleted when the function or block within which they were created 
  14122. passes out of scope, while objects stored on the heap must be explicitly 
  14123. deleted. 
  14124.  
  14125. Objects allocated with the new operator are placed on the heap, including SOM 
  14126. objects.  Automatic objects are usually allocated in the current stack frame. 
  14127. SOM objects that are declared as having automatic duration, rather than as 
  14128. pointers to objects, are usually allocated on the current stack frame.  As with 
  14129. normal C++, the new operator is not called for automatic duration operators. 
  14130.  
  14131.  
  14132. ΓòÉΓòÉΓòÉ 18.7.16.2. Overloading the new and delete Operators ΓòÉΓòÉΓòÉ
  14133.  
  14134. You can overload the new and delete operators either on a class-specific basis 
  14135. or globally.  Because most programs will contain a mixture of SOM and non-SOM 
  14136. objects, the compiler provides two different paths for memory allocation and 
  14137. deallocation using new and delete, one for SOM objects and one for non-SOM 
  14138. objects. 
  14139.  
  14140. You can have multiple, distinguished versions of operator new within a class. 
  14141. The operator delete is restricted to one version per class. 
  14142.  
  14143. SOM accepts an additional parameter to an operator new for a SOM class, which 
  14144. points to the class's class object.  An operator new for a SOM class has one of 
  14145. the following forms: 
  14146.  
  14147.    void *operator new (size_t InstanceSize);
  14148.    void *operator new (SOMClass* ObjClass, size_t InstanceSize);
  14149.  
  14150. The SOM version of the global operator new has the form: 
  14151.  
  14152.    void *operator ::new (SOMClass* ObjClass, size_t InstanceSize);
  14153.  
  14154. You can use the SOMClass* parameter, in both class and global definitions of 
  14155. operator new, to have a pointer to the object's class object passed to the 
  14156. operator. For any class that is a SOM class, the compiler passes this parameter 
  14157. whether you specify it in the operator's declaration or not. You do not specify 
  14158. this argument when invoking new, so there is no way for a call to new to 
  14159. specify its own value for the SOMClass* argument. 
  14160.  
  14161. You cannot have both types of operator new within a class.  You can have both 
  14162. types of global operator new. Note that even if you use placement arguments in 
  14163. an operator new, the SOMClass argument is always the first argument. 
  14164.  
  14165. The SOMClass* argument appears first because this allows the compiler to 
  14166. differentiate between a SOM operator new and a non-SOM operator new that takes 
  14167. a SOMClass* as an argument.  You can use the SOMClass* argument, for example, 
  14168. to print the class name, by calling thisClass->somGetName() where thisClass is 
  14169. a pointer to a SOM class. 
  14170.  
  14171. The delete operator for SOM classes has the same form as for other C++ classes. 
  14172. For a given class, you can have at most one of the following forms of operator 
  14173. delete: 
  14174.  
  14175.    void operator delete(void*);
  14176.    void operator delete(void*, size_t);
  14177.    void operator delete(SOMObject*, size_t);
  14178.  
  14179. For the sake of easily maintained code, you should always include the size_t 
  14180. argument, whether you use it or not, because it allows you to later change to 
  14181. an implementation that does use the argument, without requiring client programs 
  14182. to be recompiled. 
  14183.  
  14184. The first argument is a pointer to the object instance being deleted. Because 
  14185. of the way that SOM uninitializes an instance, the first word of the object 
  14186. still points to the object's method table, which in turn points to the class 
  14187. object.  This gives you access to information about the specific class being 
  14188. deleted. 
  14189.  
  14190. You can also code a SOM version of the global delete operator, of the form: 
  14191.  
  14192.    void operator ::delete(SOMObject*, size_t);
  14193.  
  14194. The type of the first argument is SOMObject to distinguish the function 
  14195. signature from the non-SOM global delete operator.  Note that the compiler 
  14196. recognizes such a replacement based on the exact signature.  You must include 
  14197. both arguments in the declaration. 
  14198.  
  14199. By default, this function calls SOMFree to deallocate the SOM object's storage. 
  14200.  
  14201. The following example shows how you can define new and delete operators for a 
  14202. SOM class.  In the example, the new operator increments a counter each time it 
  14203. is called, and then calls the global new operator to allocate storage for the 
  14204. object.  The delete operator decrements the same counter, and then calls the 
  14205. global delete operator to deallocate the storage.  The counter is a static 
  14206. class member that can be accessed to determine how many objects of the class 
  14207. currently have storage allocated to them by new. 
  14208.  
  14209.    #include <som.hh>
  14210.    class A : public SOMObject {
  14211.      public:  void* operator new(SOMClass*, size_t);
  14212.               void  operator delete(SOMObject*);
  14213.  
  14214.               static int howMany; // # of dynamically alloc instances
  14215.    };
  14216.  
  14217.    int A::howMany;
  14218.  
  14219.    void* A::operator new(SOMClass *cls, size_t sz)
  14220.    {
  14221.        howMany++;
  14222.        return ::operator new(cls, sz);
  14223.    }
  14224.  
  14225.    void A::operator delete(SOMObject* obj)
  14226.    {
  14227.        howMany--;
  14228.        ::operator delete(obj);
  14229.    }
  14230.  
  14231.  
  14232. ΓòÉΓòÉΓòÉ 18.7.16.3. Using new.h in C++ SOM Programs ΓòÉΓòÉΓòÉ
  14233.  
  14234. If you normally include new.h in a program to specify that previously allocated 
  14235. storage is to be used when new is invoked, you should include somnew.h instead 
  14236. if the classes that make use of new are SOM classes. 
  14237.  
  14238.  
  14239. ΓòÉΓòÉΓòÉ 18.7.16.4. Determining which new and delete Operators Are Used ΓòÉΓòÉΓòÉ
  14240.  
  14241. If a SOM class has an operator new or an operator delete, these operators are 
  14242. used for all invocations of new or delete regardless of their signatures. If a 
  14243. SOM class does not have an operator new or an operator delete, the SOM version 
  14244. of the global operator is used. 
  14245.  
  14246. Warning: Memory allocated by SOMMalloc can only be freed by SOMFree, and memory 
  14247. allocated by malloc can only be freed by free.  If you use the SOM function for 
  14248. allocating storage for an object, and the non-SOM version for deallocating it 
  14249. (or vice versa), a runtime exception may occur. 
  14250.  
  14251. For example, the following will cause a runtime exception: 
  14252.  
  14253.    class A : public SOMObject {
  14254.       public:
  14255.          operator delete(void* o, size_t s) { ::delete o; )
  14256.    };
  14257.  
  14258. because class A's delete operator will be invoked when an object of class A is 
  14259. deleted.  The first parameter will point to the object to be deleted.  Note 
  14260. that because the first parameter is declared to be of type void*, this 
  14261. invocation implicitly involves converting a SOM pointer (an A*) into a non-SOM 
  14262. pointer (a void*). The subsequent ::delete o therefore uses the global non-SOM 
  14263. delete operator, which calls free, instead of the global SOM delete operator 
  14264. that calls SOMFree. 
  14265.  
  14266.  
  14267. ΓòÉΓòÉΓòÉ 18.7.17. Volatile Objects ΓòÉΓòÉΓòÉ
  14268.  
  14269. The SOM class member functions are not defined to operate on volatile SOM 
  14270. objects.  If you want to use the volatile qualifier with SOM objects, you must 
  14271. supply volatile versions of the SOM class member functions.  In particular, you 
  14272. must supply volatile versions of the four compiler-supplied operator= functions 
  14273. (described in Accessing Special Member Functions from Other Languages). Note 
  14274. that if you supply a const volatile version of a function, you should also 
  14275. supply a const version of the function for the sake of runtime efficiency. 
  14276.  
  14277.  
  14278. ΓòÉΓòÉΓòÉ 18.7.18. Data Members Implemented as Attributes ΓòÉΓòÉΓòÉ
  14279.  
  14280. You cannot take the address of a data member that is implemented as an 
  14281. attribute. 
  14282.  
  14283. If an attribute is made virtual by the SOMAttribute pragma, it will no longer 
  14284. behave like a normal C++ data member.  Because attributes are accessed using 
  14285. get and set methods, making an attribute virtual in fact makes the get and set 
  14286. methods for the attribute virtual, and such virtual methods can be overridden 
  14287. in a derived class. A derived class that overrides these methods can therefore 
  14288. change the type or other characteristics of the data.  This differs from normal 
  14289. C++ behavior in which a derived class cannot override definitions for data 
  14290. members defined in a base class. 
  14291.  
  14292. SOM methods are all implicitly given system linkage.  If the address is taken 
  14293. of a static member function, the resulting pointer value will be a pointer to a 
  14294. function with system linkage. The resulting pointer can only be assigned to a 
  14295. function pointer that also has system linkage. 
  14296.  
  14297.  
  14298. ΓòÉΓòÉΓòÉ 18.8. Converting C++ Programs to SOM Using SOMAsDefault ΓòÉΓòÉΓòÉ
  14299.  
  14300. The easiest way to convert existing classes to SOM classes is to use the 
  14301. SOMAsDefault pragma or the /Ga (enable implicit SOM mode) compiler option to 
  14302. tell the compiler what classes to treat as SOM classes.  Both the pragma and 
  14303. the option include the required SOM header file som.hh, and implicitly convert 
  14304. all classes to SOM classes until implicit mode is turned off by a subsequent 
  14305. SOMAsDefault pragma. 
  14306.  
  14307. When you implicitly derive classes from SOMObject, the compiler is said to have 
  14308. "implicit SOM mode" turned on. 
  14309.  
  14310. If your programs do not use any of the C++ features that are not supported by 
  14311. SOM (such as multiple virtual inheritance), you should be able to compile and 
  14312. run them without further change.  See Differences between SOM and C++ for 
  14313. information on C++ features that are not supported or are implemented 
  14314. differently for SOM programs. 
  14315.  
  14316. VisualAge C++ converts all structs and C++ classes to SOM classes unless the 
  14317. files in which they are defined are in directories excluded from conversion to 
  14318. SOM by the /Xs compiler option. Files in any directory specified by the /Xs 
  14319. option (as well as certain standard directories of files to exclude) are not 
  14320. converted into SOM classes. See the User's Guide for further details. 
  14321.  
  14322. Unions cannot be SOM classes. 
  14323.  
  14324. Non-virtual multiple inheritance is not allowed. Suppose that a class A has the 
  14325. class B in at least two separate places in its class hierarchy.  If class B is 
  14326. not a virtual base class, class A cannot be a SOM class. 
  14327.  
  14328. Note:  Member functions of implicit SOM classes are given SYSTEM linkage.  This 
  14329. means that pointers that are supposed to point at static member functions of 
  14330. such classes must be explicitly declared SYSTEM. 
  14331.  
  14332.  
  14333. ΓòÉΓòÉΓòÉ 18.9. Creating SOM-Compliant Programs by Inheriting from SOMObject ΓòÉΓòÉΓòÉ
  14334.  
  14335. To make your programs SOM-enabled using this technique, you must first include 
  14336. the following header file in your program, before the first occurrence of a SOM 
  14337. class: 
  14338.  
  14339. #include <som.hh>
  14340.  
  14341. Then, if you want to define a class that is SOM-enabled, you must inherit it 
  14342. from SOMObject, or from a class that itself was inherited from SOMObject.  Note 
  14343. that all classes in a class hierarchy must be SOM classes, if any is a SOM 
  14344. class. 
  14345.  
  14346. #include <som.hh>
  14347. class MyClass : SOMObject { /* ... */ };  // both these classes
  14348. class SubClass : MyClass { /* ... */ };   // are SOM-enabled
  14349.  
  14350. class EnclosingClass { SubClass a; };     // NOT SOM-enabled
  14351.  
  14352. Note that SOMObject has the special property of always being virtual. 
  14353.  
  14354.  
  14355. ΓòÉΓòÉΓòÉ 18.10. Creating Shared Class Libraries with SOM ΓòÉΓòÉΓòÉ
  14356.  
  14357. When you create a shared class library that contains SOM-enabled classes, you 
  14358. must export the following three symbols for each SOM-enabled class, in order to 
  14359. be able to use that class: 
  14360.  
  14361.      SOMClassNameClassData 
  14362.      SOMClassNameCClassData 
  14363.      SOMClassNameNewCLass 
  14364.  
  14365.  You do this by adding each name to its own line in an exports file. 
  14366.  
  14367.  DLLs that are to be dynamically loaded using methods supported by the SOM 
  14368.  Class Manager, such as SOMClassMgr::somFindClsInFile(), should also export an 
  14369.  entry point called SOMInitModule that calls the compiler-defined NewClass 
  14370.  function for each class defined in the DLL. For a DLL defining a single class 
  14371.  whose SOM name is SOMX, this entry point could be written as: 
  14372.  
  14373.     void _Export _System SOMInitModule(long, long, char*)
  14374.     {
  14375.       SOMXNewClass(SOMX_MajorVersion, SOMX_MinorVersion);
  14376.     }
  14377.  
  14378.  For more information about SOMInitModule, see the SOMObjects Developer Toolkit 
  14379.  Publications. 
  14380.  
  14381.  
  14382. ΓòÉΓòÉΓòÉ 18.11. Using SOM Classes in DSOM Applications ΓòÉΓòÉΓòÉ
  14383.  
  14384. Distributed SOM, or DSOM, allows remote objects to appear local to a client 
  14385. program.  Remote objects are implemented "under the covers" by the DSOM 
  14386. runtime.  Remote objects are dynamically subclassed, and must always be treated 
  14387. as possible subclasses.  This means that you must handle DSOM objects using 
  14388. pointer notation. 
  14389.  
  14390. You cannot create or delete DSOM objects with the new and delete operators 
  14391. described in this book. For methods of creating DSOM objects, see the 
  14392. SOMObjects Developer Toolkit Publications. 
  14393.  
  14394. You cannot access data directly for a DSOM object, because the object may 
  14395. reside on a different system. You must use the get and set methods instead. 
  14396. This means you must use the SOMAttribute pragma for all data you want to make 
  14397. accessible through DSOM. For a SOM class to be usable as a DSOM class, #pragma 
  14398. SOMNoDataDirect(on) must be set for the class (the /Gb compiler option sets 
  14399. this pragma on at the start of the compilation unit). For further details see 
  14400. The SOMNoDataDirect Pragma. 
  14401.  
  14402. In DSOM, static data members are local to the current process, they are not 
  14403. managed remotely.  DSOM classes must also have a default constructor. 
  14404.  
  14405.  
  14406. ΓòÉΓòÉΓòÉ 18.12. System Object Model (SOM) Options ΓòÉΓòÉΓòÉ
  14407.  
  14408. This section describes the compiler options available for SOM support in 
  14409. VisualAge C++. The following options are described: 
  14410.  
  14411.       /Fr 
  14412.       /Fs 
  14413.       /Ga 
  14414.       /Gb 
  14415.       /Gz 
  14416.       /Xs 
  14417.  
  14418.  SOM options that affect the same settings as SOM pragmas are effective except 
  14419.  when overridden by those pragmas.  For example, the /Ga compiler option, which 
  14420.  causes all classes to implicitly derive from SOMObject, turns the SOMAsDefault 
  14421.  pragma on at the start of the translation unit.  This pragma remains in effect 
  14422.  until a #pragma SOMAsDefault(off|pop) is encountered in the translation unit. 
  14423.  See Conventions Used by the SOM Pragmas for more information on the 
  14424.  relationship between SOM pragma settings and SOM options. 
  14425.  
  14426.  In addition to the compiler options, the compiler defines a macro, 
  14427.  __SOM_ENABLED__, whose value corresponds to the level of SOM support provided 
  14428.  by the compiler.  If SOM support is not provided for a particular release of 
  14429.  the compiler, __SOM_ENABLED__ is not predefined. 
  14430.  
  14431.  The macro's value is a positive integer constant.  For the first 
  14432.  SOM-supporting release of VisualAge C++, the level of SOM supported is SOM 
  14433.  2.1, so the macro has the value 210. 
  14434.  
  14435.  
  14436. ΓòÉΓòÉΓòÉ 18.12.1. /Ga ΓòÉΓòÉΓòÉ
  14437.  
  14438.   Syntax:
  14439.                                                                                   Default:
  14440.  
  14441.   /Ga[+|-]
  14442.                                                                                   /Ga-
  14443.  
  14444.  This option turns on implicit SOM mode, and also causes the file som.hh to be 
  14445.  included. It is equivalent to placing #pragma SOMAsDefault(on) at the start of 
  14446.  the translation unit. 
  14447.  
  14448.  All classes are implicitly derived from SOMObject until a #pragma 
  14449.  SOMAsDefault(off) is encountered. 
  14450.  
  14451.  For further details see The SOMAsDefault Pragma. 
  14452.  
  14453.  
  14454. ΓòÉΓòÉΓòÉ 18.12.2. /Gb ΓòÉΓòÉΓòÉ
  14455.  
  14456.   Syntax:
  14457.                                                                                   Default:
  14458.  
  14459.   /Gb[+|-]
  14460.                                                                                   /Gb-
  14461.  
  14462.  This option instructs the compiler to disable direct access to attributes. 
  14463.  Instead, the get and set methods are used.  This is equivalent to specifying 
  14464.  #pragma SOMNoDataDirect(on) as the first line of the translation unit. 
  14465.  
  14466.  For further details see The SOMNoDataDirect Pragma. 
  14467.  
  14468.  
  14469. ΓòÉΓòÉΓòÉ 18.12.3. /Gz ΓòÉΓòÉΓòÉ
  14470.  
  14471.   Syntax:
  14472.                                                                                   Default:
  14473.  
  14474.   /Gz[+|-]
  14475.                                                                                   /Gz-
  14476.  
  14477.  Use this option to initialize SOM classes at their point of first use during 
  14478.  the execution of your program. 
  14479.  
  14480.  By default, all SOM classes statically used in your program are initialized at 
  14481.  static initialization time. This makes your program smaller, but may result in 
  14482.  the initialization of classes that are not dynamically used. 
  14483.  
  14484.  With any setting of this option, any reference to a static member of a SOM 
  14485.  class will cause the class to be initialized. 
  14486.  
  14487.  
  14488. ΓòÉΓòÉΓòÉ 18.12.4. /Xs ΓòÉΓòÉΓòÉ
  14489.  
  14490.   Syntax:
  14491.                                                                                   Default:
  14492.  
  14493.   /Xs<directory|->
  14494.                                                                                   /Xs-
  14495.  
  14496.  Use this option to exclude files in the specified directories when implicit 
  14497.  SOM mode is turned on (when classes are implicitly derived from SOM). The 
  14498.  syntax of this option is: 
  14499.  
  14500.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14501.   Γöé                                        Γöé
  14502.   Γöé      ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                            Γöé
  14503.   Γöé            Γöé                            Γöé
  14504.   Γöé >>ΓöÇΓöÇ/XsΓöÇΓöÇΓöÇΓöÇdirectoryΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14505.   Γöé                                        Γöé
  14506.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14507.  where directory is the name of the directory or directories you want to 
  14508.  exclude. Directory names are separated with a semicolon (;). 
  14509.  
  14510.  This option is useful for mixing implicit SOM mode with existing include files 
  14511.  that include declarations of classes you do not want to be implicit SOM 
  14512.  classes. 
  14513.  
  14514.  
  14515. ΓòÉΓòÉΓòÉ 18.12.5. /Fr ΓòÉΓòÉΓòÉ
  14516.  
  14517.   Syntax:
  14518.                                                                                   Default:
  14519.  
  14520.   /Fr<classname>
  14521.                                                                                   None
  14522.  
  14523.  Use this option to have the compiler write the release order of the specified 
  14524.  class to standard output.  The release order is written in the form of a 
  14525.  SOMReleaseOrder pragma.  You can capture the output from this option when 
  14526.  developing new SOM classes, and include the pragma in the class definition. 
  14527.  The syntax of the option is: 
  14528.  
  14529.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14530.   Γöé                                        Γöé
  14531.   Γöé >>ΓöÇΓöÇ/FrΓöÇΓöÇC++ClassNameΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14532.   Γöé                                        Γöé
  14533.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14534.  
  14535.  For further details see Release Order of SOM Objects and The SOMReleaseOrder 
  14536.  Pragma. 
  14537.  
  14538.  
  14539. ΓòÉΓòÉΓòÉ 18.12.6. /Fs ΓòÉΓòÉΓòÉ
  14540.  
  14541.   Syntax:
  14542.                                                                                   Default:
  14543.  
  14544.   /Fs[+|-|file|
  14545.   directory]
  14546.                                                                                   /Fs-
  14547.  
  14548.  Use this option to have the compiler generate an IDL file if a file with an 
  14549.  .hh extension is explicitly specified on the command line. The syntax of the 
  14550.  option is: 
  14551.  
  14552.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14553.   Γöé                                        Γöé
  14554.   Γöé >>ΓöÇΓöÇ/FsΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14555.   Γöé      Γö£ΓöÇ+ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                            Γöé
  14556.   Γöé      Γö£ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                            Γöé
  14557.   Γöé      Γö£ΓöÇfilenameΓöÇΓöÇΓöñ                            Γöé
  14558.   Γöé      ΓööΓöÇdirectoryΓöÇΓöÿ                            Γöé
  14559.   Γöé                                        Γöé
  14560.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14561.  where: 
  14562.  
  14563.       /Fs<+> specifies that an IDL file will be created for every .hh file that 
  14564.       is specified on the command line and is in the current directory.  This 
  14565.       is the default. 
  14566.  
  14567.       /Fs filename.ext is like /Fs +, but the IDL file that is created will 
  14568.       have the specified filename.  If you do not specify an ext, the extension 
  14569.       will be idl. 
  14570.  
  14571.       /Fs directory_name is like /Fs +, but the IDL file that is created will 
  14572.       be put in the directory directory_name rather than the current directory. 
  14573.       directory_name must end with a backslash "\". 
  14574.  
  14575.       /Fs- specifies that no IDL file should be created. 
  14576.  
  14577.  
  14578. ΓòÉΓòÉΓòÉ 18.13. Macro Defined for SOM ΓòÉΓòÉΓòÉ
  14579.  
  14580. VisualAge C++ predefines the __SOM_ENABLED__ macro with a positive integer 
  14581. value, to indicate the level of SOM support provided. Currently the value for 
  14582. __SOM_ENABLED__ is 210, which indicates that the level of SOM support described 
  14583. in this chapter is available.  If __SOM_ENABLED__ is not defined or has a zero 
  14584. value, SOM is not supported by the version of the compiler on which the program 
  14585. is being compiled. 
  14586.  
  14587.  
  14588. ΓòÉΓòÉΓòÉ 18.14. Pragmas for Using SOM ΓòÉΓòÉΓòÉ
  14589.  
  14590. This section describes the pragmas available for SOM support on VisualAge C++. 
  14591. See the previous sections for background information on the reasons and uses 
  14592. for the pragmas. 
  14593.  
  14594. Note:  The SOM pragmas are case-insensitive.  They are shown here in a 
  14595. mixed-case format to make them easier to read.  You can use any combination of 
  14596. upper- and lowercase letters for the pragma names and for the on, off and pop 
  14597. arguments. However, you must still enter C++ tokens such as class, method, and 
  14598. data member names exactly as they are declared in your program. 
  14599.  
  14600.  
  14601. ΓòÉΓòÉΓòÉ 18.14.1. Conventions Used by the SOM Pragmas ΓòÉΓòÉΓòÉ
  14602.  
  14603. Some of the SOM pragmas use certain conventions to specify the scope to which 
  14604. the pragma applies.  This section explains those conventions. 
  14605.  
  14606.  
  14607. ΓòÉΓòÉΓòÉ 18.14.1.1. Pragmas Containing on | off | pop ΓòÉΓòÉΓòÉ
  14608.  
  14609. SOM pragmas containing an argument of on, off, or pop implement a 
  14610. stack-modelled approach to setting their option.  The arguments do the 
  14611. following: 
  14612.  
  14613.  on   Pushes the prior state (on or off) of the pragma onto the pragma's 
  14614.       "stack", and turns the setting on. 
  14615.  off  Pushes the prior state of the pragma onto the pragma's "stack", and turns 
  14616.       the setting off. 
  14617.  pop  Restores the most recently saved state from the pragma's "stack". 
  14618.  
  14619.  The following example shows the effect of the SOMAsDefault pragma with 
  14620.  different settings: 
  14621.  
  14622.      // ...  SOMAsDefault is off, or ON if program compiled with /Ga
  14623.  
  14624.      #pragma SOMAsDefault(on)
  14625.      // ...  SOMAsDefault now on
  14626.  
  14627.      #pragma SOMAsDefault(pop)
  14628.      // ...  SOMAsDefault now off, or ON if program compiled with /Ga
  14629.  
  14630.      #pragma SOMAsDefault(off)
  14631.      // ...  SOMAsDefault now off
  14632.  
  14633.      #pragma SOMAsDefault(pop)
  14634.      // ...  SOMAsDefault now off, or ON if program compiled with /Ga
  14635.  
  14636.  It is recommended that on or off be used only at the beginning of a block, and 
  14637.  pop only at the end of the block.  This ensures that default settings are 
  14638.  preserved around your own settings. 
  14639.  
  14640.  If you pop a pragma more times than you push it with on or off, the results 
  14641.  are unpredictable. 
  14642.  
  14643.  
  14644. ΓòÉΓòÉΓòÉ 18.14.1.2. Pragmas Containing an Asterisk (*) ΓòÉΓòÉΓòÉ
  14645.  
  14646. Certain SOM pragmas accept either a C++ class name or an asterisk (*) as one of 
  14647. their arguments.  You can use the asterisk to indicate that the class the 
  14648. pragma applies to is the class within which the pragma occurs.  For example: 
  14649.  
  14650.    #pragma SOMAsDefault(on)
  14651.    class A {
  14652.       //...
  14653.    #pragma SOMClassVersion(*,3,1)
  14654.    // Version number applies to class A
  14655.    }
  14656.  
  14657.    Class B {
  14658.       // ...
  14659.    #pragma SOMClassVersion(B,3,3)
  14660.    // Could have specified * instead of B
  14661.    }
  14662.  
  14663.    #pragma SOMClassVersion(*,2,5)
  14664.    // Error - not in the scope of any class!
  14665.  
  14666.  
  14667. ΓòÉΓòÉΓòÉ 18.14.2. The SOM Pragma ΓòÉΓòÉΓòÉ
  14668.  
  14669. This pragma causes the compiler to recognize the SOMObject class as the special 
  14670. base for all SOM classes. 
  14671.  
  14672. Note:  The compiler still requires a full declaration for SOMObject. Therefore, 
  14673.        you must include the header file containing this declaration. 
  14674.  
  14675.  There should only be one occurrence of this pragma, and it should be placed in 
  14676.  the same header file in which SOMObject is declared. 
  14677.  
  14678.  The syntax of the pragma is: 
  14679.  
  14680.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14681.   Γöé                                        Γöé
  14682.   Γöé >>ΓöÇΓöÇ#pragma SOMΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14683.   Γöé                                        Γöé
  14684.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14685.  
  14686.  
  14687. ΓòÉΓòÉΓòÉ 18.14.3. The SOMAsDefault Pragma ΓòÉΓòÉΓòÉ
  14688.  
  14689. The setting of this pragma determines how the compiler should treat classes 
  14690. that are not explicitly derived from SOMObject. When the pragma is in effect, 
  14691. all non-local classes are implicitly derived from SOMObject.  When the pragma 
  14692. is not in effect, classes must be explicitly derived from SOMObject in order to 
  14693. be supported for use by SOM programs. 
  14694.  
  14695. The syntax of the pragma is as follows: 
  14696.  
  14697. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14698. Γöé                                        Γöé
  14699. Γöé >>ΓöÇΓöÇ#pragma SOMAsDefault(ΓöÇΓöÇΓö¼ΓöÇonΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14700. Γöé               Γö£ΓöÇoffΓöÇΓöñ                      Γöé
  14701. Γöé               ΓööΓöÇpopΓöÇΓöÿ                      Γöé
  14702. Γöé                                        Γöé
  14703. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14704.  
  14705. The on argument saves the current setting, and turns SOMAsDefault on.  The off 
  14706. argument saves the current setting, and turns SOMAsDefault off.  The pop 
  14707. setting restores the most recently saved but still unrestored setting. See 
  14708. Pragmas Containing on | off | pop for more information on how to use these 
  14709. arguments. 
  14710.  
  14711. When this pragma is turned on for the first time in a compilation unit, it also 
  14712. causes the som.hh header file to be included if it has not already been 
  14713. included. 
  14714.  
  14715. The /Ga compiler option provides the same effect as setting #pragma 
  14716. SOMAsDefault(on) at the start of the translation unit. 
  14717.  
  14718.  
  14719. ΓòÉΓòÉΓòÉ 18.14.4. The SOMAttribute Pragma ΓòÉΓòÉΓòÉ
  14720.  
  14721. Use this pragma to specify that a data member is an attribute, and to 
  14722. communicate IDL information regarding the implementation of attributes. For an 
  14723. explanation of how attributes are used, see set and get Methods for Attribute 
  14724. Class Members. The syntax of the pragma is: 
  14725.  
  14726. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14727. Γöé                                        Γöé
  14728. Γöé                      ΓöîΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ       Γöé
  14729. Γöé                                 Γöé       Γöé
  14730. Γöé >>ΓöÇΓöÇ#pragma SOMAttribute(ΓöÇΓöÇDataMemberΓöÇΓöÇ,ΓöÇΓöÇΓöÇΓö¼ΓöÇindirectΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14731. Γöé                       Γö£ΓöÇnodataΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14732. Γöé                       Γö£ΓöÇnogetΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14733. Γöé                       Γö£ΓöÇnosetΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14734. Γöé                       Γö£ΓöÇprivatedataΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14735. Γöé                       Γö£ΓöÇprotectedataΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14736. Γöé                       Γö£ΓöÇpublicdataΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14737. Γöé                       Γö£ΓöÇreadonlyΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ        Γöé
  14738. Γöé                       ΓööΓöÇvirtualaccessorsΓöÇΓöÿ        Γöé
  14739. Γöé                                        Γöé
  14740. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14741.  
  14742. The pragma must appear within the class definition or declaration in which the 
  14743. data member is defined. Each attribute in a class must be defined in its own 
  14744. pragma. You can only make a non-static data member into an attribute. The 
  14745. member cannot be a reference to an abstract class because the _get/_set 
  14746. functions have to operate on values. The keywords have the following effects: 
  14747.  
  14748.  indirect        The interface (prototype) for the get and set methods of this 
  14749.                  attribute must use one level of indirection for both the 
  14750.                  argument to be set and the return from the get.  This means 
  14751.                  that if the type is normally passed and returned by value, it 
  14752.                  will have its address returned instead. For example, T 
  14753.                  _get_X() actually returns *T, and _set_X(T) actually accepts 
  14754.                  *T as argument. indirect is ignored for structs and arrays. 
  14755.  
  14756.  nodata          The compiler does not allocate any instance data corresponding 
  14757.                  to this attribute, and does not generate definitions for the 
  14758.                  get and set methods.  This means that you must define these 
  14759.                  methods yourself and allocate any instance data these methods 
  14760.                  require. nodata implies that there is no way for C++ code to 
  14761.                  take the address of this variable. The compiler issues an 
  14762.                  error message when you attempt to do this. 
  14763.  
  14764.                  You must write and declare the corresponding get and set 
  14765.                  functions, _get_variable and _set_variable, where variable is 
  14766.                  the attribute's name. 
  14767.  
  14768.  noget           The compiler does not generate a body for the attribute's get 
  14769.                  method. You must provide a body for the get method. 
  14770.  
  14771.  noset           The compiler does not generate a body for the attribute's set 
  14772.                  method. You must provide a body for the set method. This 
  14773.                  qualifier is ignored if the attribute is const. 
  14774.  
  14775.  privatedata     The compiler defines instance data for the member class and 
  14776.                  gives it private access.  This is the default. 
  14777.  
  14778.  protectedata    The instance data for the member class has protected access. 
  14779.  
  14780.  publicdata      The instance data for the member class has public access. 
  14781.  
  14782.  readonly        The attribute is not allowed to have a set method.  The 
  14783.                  compiler does not generate one.  If you provide one, the 
  14784.                  compiler flags it as an error. 
  14785.  
  14786.  virtualaccessors The _get/_set methods will be virtual functions. By default, 
  14787.                  _get and _set are nonvirtual functions. 
  14788.  
  14789.  The access for the _get/_set methods is the same as the access for the data 
  14790.  member.  For example, access for the _get/_set methods of a protected data 
  14791.  member are protected.  By default, access to the data itself is private unless 
  14792.  you specify otherwise with one of the protecteddata or publicdata keywords. If 
  14793.  you do not use the SOMAttribute pragma, the data member is not an attribute. 
  14794.  Attribute qualifiers nodata, privatedata, protectedata, and publicdata are 
  14795.  mutually exclusive. It is an error for the access of an attribute's instance 
  14796.  data to be greater than the access of the attribute.  For example, it is an 
  14797.  error for a private attribute to have public instance data. 
  14798.  
  14799.  If you do not use the SOMNoDataDirect pragma, access to data members uses 
  14800.  direct access if the user code has access to the instance data. 
  14801.  
  14802.   When SOMNoDataDirect is used, the _get/_set methods are used.  The access for 
  14803.  the _get/_set methods is the same as the access for the data member. For 
  14804.  example, access for a protected data member's _get and _set methods would be 
  14805.  protected. 
  14806.  
  14807.  The nodata attribute modifier and the SOMNoDataDirect pragma have different 
  14808.  effects, although their names are similar. 
  14809.  
  14810.  Normally, the compiler creates instance data in the class to implement an 
  14811.  attribute, and generates definitions for get and set methods that access this 
  14812.  "backing" data.  The access class of the methods is that of the attribute, but 
  14813.  the backing data is private.  You can override this with the publicdata or 
  14814.  protecteddata modifiers. 
  14815.  
  14816.  If you do not specify other modifiers or pragmas, then uses of the attribute 
  14817.  are compiled either into direct accesses of the backing data, or into calls to 
  14818.  the get and set methods. The compiler determines whether the code using the 
  14819.  attribute can "see" the backing data, according to the usual C++ access rules. 
  14820.  Because members and friend functions of a class do have access to its private 
  14821.  data, they directly access any backing data for attributes of that class. 
  14822.  Methods in derived classes only have access to public and protected members of 
  14823.  a base class, so can only access backing data that is public or protected. 
  14824.  Private backing data in a base class is not accessible, so uses of public or 
  14825.  protected attributes with private backing data must call _get and _set. 
  14826.  
  14827.  When you add the nodata modifier to an attribute, the compiler no longer 
  14828.  automatically creates backing data, and only declares the get and set methods. 
  14829.  You must supply definitions for them.  Also, uses of the attribute will always 
  14830.  be compiled into get or set calls. 
  14831.  
  14832.  When you use the SOMNoDataDirect pragma on a class, it does not affect the 
  14833.  generation of methods or backing data, but it does affect how uses of the 
  14834.  attribute are compiled. SOMNoDataDirect is an indication to the compiler that 
  14835.  instances of the class may be proxies for remote objects built by DSOM. 
  14836.  Because direct data access is not possible for remote objects, the compiler 
  14837.  must then generate _get/_set calls for all attribute uses, unless the object 
  14838.  is known to be local.  The only object that can be safely assumed local is the 
  14839.  object pointed to by this, so direct data access only happens for accesses 
  14840.  through the this pointer.  This condition is imposed in addition to the access 
  14841.  checks described above. 
  14842.  
  14843.  
  14844. ΓòÉΓòÉΓòÉ 18.14.5. The SOMCallStyle Pragma ΓòÉΓòÉΓòÉ
  14845.  
  14846. Use this pragma to specify the callstyle of the class within which the pragma 
  14847. occurs.  The syntax of this pragma is: 
  14848.  
  14849. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14850. Γöé                                        Γöé
  14851. Γöé >>ΓöÇΓöÇ#pragma SOMCallStyle(ΓöÇΓöÇΓö¼ΓöÇOIDLΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14852. Γöé               ΓööΓöÇIDLΓöÇΓöÇΓöÿ                      Γöé
  14853. Γöé                                        Γöé
  14854. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14855.  
  14856. The OIDL option indicates that the callstyle of methods introduced by the class 
  14857. does not include the Environment* argument, while the IDL option indicates that 
  14858. the callstyle does include the Environment* argument.  The default is for IDL 
  14859. callstyle to be used. 
  14860.  
  14861. For further details see IDL and OIDL Callstyles. 
  14862.  
  14863.  
  14864. ΓòÉΓòÉΓòÉ 18.14.6. The SOMClassInit Pragma ΓòÉΓòÉΓòÉ
  14865.  
  14866. Use this pragma to specify a function that the SOM runtime is to invoke during 
  14867. creation of the class object for the named class. The syntax of this pragma is: 
  14868.  
  14869. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14870. Γöé                                        Γöé
  14871. Γöé >>ΓöÇΓöÇ#pragma SOMClassInit(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇC++PrototypeΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14872. Γöé               ΓööΓöÇC++ClassNameΓöÇΓöÿ                  Γöé
  14873. Γöé                                        Γöé
  14874. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14875.  
  14876. The asterisk indicates that the pragma applies to the innermost enclosing class 
  14877. within which the pragma is found. 
  14878.  
  14879. The C++Prototype is a C++ function prototype without the return type.  For 
  14880. example, the function double sqrt(double) would appear as sqrt(double) in this 
  14881. pragma. 
  14882.  
  14883. A class object is created for a class when the first object of that class is 
  14884. created.  The function called after the class object is created must have the 
  14885. following form: 
  14886.  
  14887.    void FunctionName(SOMClass*);
  14888.  
  14889. The name of the function is not significant.  Once you have declared or defined 
  14890. this function, you can associate it with the class constructor for a class 
  14891. using the pragma: 
  14892.  
  14893.    #pragma SOMClassInit(FunctionName)
  14894.  
  14895. You do not need to use this pragma unless you want to define a function to be 
  14896. called when the class object is created. 
  14897.  
  14898.  
  14899. ΓòÉΓòÉΓòÉ 18.14.7. The SOMClassName Pragma ΓòÉΓòÉΓòÉ
  14900.  
  14901. Use this pragma to specify SOM names for C++ classes and template classes.  You 
  14902. should keep in mind that naming in SOM is not case sensitive, so any names you 
  14903. supply through SOMClassName should be distinguishable from other names 
  14904. regardless of case.  In addition, the Common Object Request Broker Architecture 
  14905. (CORBA) requires that names begin with a letter of the alphabet. 
  14906.  
  14907. If you do not use the SOMClassName pragma, and the SOMNoMangling pragma is not 
  14908. in effect for the class, the compiler mangles the class name, which may make 
  14909. the class difficult to use from non-C++ programs. Mangled names tend to be 
  14910. nonobvious, and accessing them from SOM programs can reduce code readability 
  14911. and increase the likelihood of coding errors. 
  14912.  
  14913. The syntax of the SOMClassName pragma is: 
  14914.  
  14915. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14916. Γöé                                        Γöé
  14917. Γöé >>ΓöÇΓöÇ#pragma SOMClassName(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇ"ΓöÇΓöÇNameOfSomClassΓöÇΓöÇ")ΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14918. Γöé               ΓööΓöÇC++ClassNameΓöÇΓöÿ                  Γöé
  14919. Γöé                                        Γöé
  14920. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14921.  
  14922. The asterisk indicates that the pragma applies to the innermost enclosing class 
  14923. within which the pragma is found. 
  14924.  
  14925. For example: 
  14926.  
  14927.    #pragma SOMAsDefault(on)
  14928.    class MyCppClass { /* ... */ };
  14929.    #pragma SOMClassName(MyCppClass, "MySOMClass")
  14930.    class AnotherClass {
  14931.    #pragma SOMClassName(*,"AnotherSOMClass")
  14932.    //...
  14933.    };
  14934.  
  14935. The requirements for the SOMClassName pragma are: 
  14936.  
  14937.      The class in question must already have been declared when the compiler 
  14938.       encounters the pragma. 
  14939.      The class must be a SOM class. 
  14940.      The SOM class name cannot be the same as a name associated with a 
  14941.       different SOM class.  This means that you cannot write code such as the 
  14942.       following: 
  14943.  
  14944.                class x : SOMObject { int a; };
  14945.                class y : SOMObject { int b; };
  14946.                #pragma SOMClassName(x,"y") // error - there is already a SOM Y class.
  14947.  
  14948.       The compiler will catch this error if the two SOM classes involved are in 
  14949.       the same compilation unit.  If they are in separate compilation units, 
  14950.       the compiler will not issue an error message, and the results of the 
  14951.       program are unpredictable. 
  14952.      The pragma must appear before the compiler needs to access the class to 
  14953.       allocate an instance of the class or one of its subclasses. 
  14954.      If the asterisk (*) is used, the pragma must appear within the 
  14955.       declaration for a SOM class. 
  14956.  
  14957.  Multiple equivalent SOMClassName pragmas are ignored. The compiler issues an 
  14958.  error if it detects multiple SOMClassName pragmas for the same class that are 
  14959.  not equivalent. 
  14960.  
  14961.  
  14962. ΓòÉΓòÉΓòÉ 18.14.8. The SOMClassVersion Pragma ΓòÉΓòÉΓòÉ
  14963.  
  14964. SOM supports explicit version numbering for classes.  The SOM runtime uses this 
  14965. information to ensure that the classes of a SOM library are at least as recent 
  14966. as the version of the library a client program was compiled to.  When you use 
  14967. the SOMClassVersion  pragma, you prevent the compiler from providing version n 
  14968. of a class when a client program was expecting version n+1.  See Version 
  14969. Control for SOM Libraries and Programs for a more in-depth explanation of class 
  14970. versioning.  The syntax of the pragma is: 
  14971.  
  14972. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  14973. Γöé                                        Γöé
  14974. Γöé >>ΓöÇΓöÇ#pragma SOMClassVersion(ΓöÇΓöÇΓö¼ΓöÇC++ClassNameΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇMajorΓöÇΓöÇ,ΓöÇΓöÇMinorΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  14975. Γöé                ΓööΓöÇ*Γö┤Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                Γöé
  14976. Γöé                                        Γöé
  14977. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  14978.  
  14979. You can use the asterisk (*) to indicate that the pragma applies to the 
  14980. innermost enclosing class within which the pragma occurs. If you use the 
  14981. C++ClassName form of the pragma, the class must already have been declared at 
  14982. the point where the pragma is encountered. 
  14983.  
  14984. In the following example, class Q is given a major version of 3 and a minor 
  14985. version of 2: 
  14986.  
  14987.    #pragma SOMAsDefault(on)
  14988.    class Q {
  14989.       public:
  14990.       //...
  14991.    #pragma SOMClassVersion(*,3,2)
  14992.    };
  14993.    #pragma SOMAsDefault(pop)
  14994.  
  14995. The following considerations apply to this pragma: 
  14996.  
  14997.      Both the major and minor version numbers must be provided, and both must 
  14998.       be positive or zero-valued integers. 
  14999.  
  15000.      The compiler issues an error message if you specify multiple conflicting 
  15001.       SOMClassVersion pragmas for a given class. 
  15002.  
  15003.      The class must already be declared at the point where the pragma is 
  15004.       encountered. 
  15005.  
  15006.      In the absence of a SOMClassVersion pragma for a class, the compiler 
  15007.       assumes zero for both version levels. 
  15008.  
  15009.  The SOM runtime treats a zero version value for a class as indicating that 
  15010.  versions do not matter, and consequently does not check for version 
  15011.  compatibility. 
  15012.  
  15013.  
  15014. ΓòÉΓòÉΓòÉ 18.14.9. The SOMDataName Pragma ΓòÉΓòÉΓòÉ
  15015.  
  15016. Use this pragma to specify SOM names for C++ class data members. You only need 
  15017. to use this pragma if you want access to the class of the applicable data 
  15018. member from non-C++ programs.  If you do not use this pragma or the 
  15019. SOMNoMangling pragma, data member names are mangled by the compiler, and the 
  15020. mangled names can lead to coding errors in the non-C++ programs that attempt to 
  15021. use them (because the names are obscure and typically very long). If the member 
  15022. is an attribute, the member's SOM name is used to form the get and set method 
  15023. names. 
  15024.  
  15025. The syntax of the pragma is: 
  15026.  
  15027. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15028. Γöé                                        Γöé
  15029. Γöé >>ΓöÇΓöÇ#pragma SOMDataName(ΓöÇΓöÇC++DataMemberΓöÇΓöÇ,ΓöÇΓöÇ"SomName"ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15030. Γöé                                        Γöé
  15031. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15032.  
  15033. This pragma may only occur within the body of the corresponding class 
  15034. declaration, and only after the corresponding data member has been declared. 
  15035.  
  15036.  
  15037. ΓòÉΓòÉΓòÉ 18.14.10. The SOMDefine Pragma ΓòÉΓòÉΓòÉ
  15038.  
  15039. Use this pragma in classes you define that have all member functions inline. 
  15040. The pragma is not necessary for classes that have at least one non-inline 
  15041. member function.  This pragma (or the point at which the compiler encounters 
  15042. the definition for the first out-of-line function declared within the class) 
  15043. causes the compiler to emit the SOMBuildClass data structures, which are used 
  15044. by the SOM runtime.  The SOMDefine pragma for a class with all inline functions 
  15045. can occur in any compilation unit, but should only appear once across all 
  15046. compilation units.  The syntax of the pragma is: 
  15047.  
  15048. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15049. Γöé                                        Γöé
  15050. Γöé >>ΓöÇΓöÇ#pragma SOMDefine(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15051. Γöé             Γö£ΓöÇonΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                   Γöé
  15052. Γöé             Γö£ΓöÇoffΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                   Γöé
  15053. Γöé             Γö£ΓöÇpopΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                   Γöé
  15054. Γöé             ΓööΓöÇC++ClassNameΓöÇΓöÿ                   Γöé
  15055. Γöé                                        Γöé
  15056. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15057.  
  15058. You can use the asterisk (*) to indicate that the pragma applies to the 
  15059. innermost enclosing class within which the pragma occurs. This version of the 
  15060. pragma does not apply to nested classes of the class where the pragma occurs. 
  15061.  
  15062. For the C++ClassName version, the name of the specified class must be visible 
  15063. at the point where the pragma is encountered. 
  15064.  
  15065. The on, off, and pop settings are independent of the asterisk setting.  Use 
  15066. them to control the default over specific ranges of source. (See Pragmas 
  15067. Containing on | off | pop for information on how to use these arguments.) 
  15068.  
  15069. If a SOMDefine(*) pragma occurs within the body of a class, that class will be 
  15070. defined (assuming it has no out-of-line functions) regardless of the current 
  15071. value set by on/off/pop. 
  15072.  
  15073. Classes that have all member functions defined inline are considered 
  15074. declarations by the C++ language rules.  This means that such classes can be 
  15075. "declared" in several compilation units. Normally, the compiler would have to 
  15076. create a class structure and its data and method tables each time it encounters 
  15077. such a class.  When you use the SOMDefine pragma, you allow the compiler to 
  15078. create only one copy of the class structure, which can reduce your program's 
  15079. storage requirements and improve performance. 
  15080.  
  15081. This pragma is ignored if the class has any out-of-line member functions. 
  15082.  
  15083.  
  15084. ΓòÉΓòÉΓòÉ 18.14.11. The SOMIDLDecl Pragma ΓòÉΓòÉΓòÉ
  15085.  
  15086. Use the SOMIDLDecl pragma to override the IDL declaration that the compiler 
  15087. would otherwise generate for the named type or member function to which the 
  15088. pragma applies.  You can use this pragma to include information related to IDL 
  15089. contexts and IDL exceptions, or to fine-tune translations between char* and 
  15090. string types. The syntax of the pragma is: 
  15091.  
  15092. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15093. Γöé                                        Γöé
  15094. Γöé >>ΓöÇΓöÇ#pragma SOMIDLDecl(ΓöÇΓöÇΓö¼ΓöÇCΓöîΓöÉTypeNameΓöÇΓöÇΓö¼ΓöÇΓöÇ"ΓöÇΓöÇ"IDLDeclaration"ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15095. Γöé              ΓööΓöÇCΓööΓöÿPrototypeΓöÇΓöÿ                   Γöé
  15096. Γöé                                        Γöé
  15097. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15098.  
  15099. The type or member function named must be defined before the pragma is 
  15100. encountered.  For type names, the sequence %N within the string is replaced by 
  15101. the name of the type. 
  15102.  
  15103. The C++Prototype is a C++ function prototype without the return type.  For 
  15104. example, the function double sqrt(double) would appear as sqrt(double) in this 
  15105. pragma. If the prototype has a trailing const, you must include this in the 
  15106. prototype. 
  15107.  
  15108. The following example shows a use of this pragma.  Here the pragma redeclares 
  15109. one of the char* arguments of method P as type string, while keeping the other 
  15110. as type char*, and indicates that the method may raise exception exc1. 
  15111.  
  15112. typedef int type1;
  15113. #pragma SOMIDLDecl (type1, "typedef foobar type1");
  15114.  
  15115. class T : public SOMObject {
  15116.    public:
  15117.       void P(char*, char*);
  15118.       #pragma SOMMethodName(P,"P")
  15119.       #pragma SOMIDLDecl(P, "void P(string, char*) raises(exc1)")
  15120.       // ...
  15121.    };
  15122.  
  15123.  
  15124. ΓòÉΓòÉΓòÉ 18.14.12. The SOMIDLPass Pragma ΓòÉΓòÉΓòÉ
  15125.  
  15126. Use the SOMIDLPass pragma to emit arbitrary text to IDL. The syntax of the 
  15127. pragma is: 
  15128.  
  15129. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15130. Γöé                                        Γöé
  15131. Γöé >>ΓöÇΓöÇ#pragma SOMIDLPass(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ"ΓöÇΓöÇLabelΓöÇΓöÇ","ΓöÇΓöÇStringToEmitΓöÇΓöÇΓöÇΓöÇΓöÇ> Γöé
  15132. Γöé              ΓööΓöÇC++ClassNameΓöÇΓöÿ                   Γöé
  15133. Γöé                                        Γöé
  15134. Γöé >ΓöÇΓöÇ")ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15135. Γöé                                        Γöé
  15136. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15137.  
  15138. The Label field indicates where in the IDL file for a class the string is to be 
  15139. emitted to.  The possible labels are described below.  The pragma accepts any 
  15140. combination of upper- and lowercase characters for a label: 
  15141.  
  15142.  Begin                 Text is emitted at the start of the IDL file, just after 
  15143.                        the controlling #ifdef and #define pair of directives. 
  15144.  
  15145.  End                   Text is emitted at the end of the IDL file, just before 
  15146.                        the controlling #endif directive. 
  15147.  
  15148.  Implementation-Begin  Text is emitted right after the opening brace of 
  15149.                        implentation {. 
  15150.  
  15151.  Implementation-End    Text is emitted just before the closing brace of the 
  15152.                        implementation section. 
  15153.  
  15154.  Interface-Begin       Text is emitted at the start of the interface section 
  15155.                        for the class, right after the opening { brace. 
  15156.  
  15157.  Interface-End         Text is emitted at the end of the interface section of 
  15158.                        the class, immediately before the implementation 
  15159.                        section. 
  15160.  
  15161.  Other text            The compiler ignores a SOMIDLPass pragma whose label 
  15162.                        does not match one of the above.  No warning is given. 
  15163.  
  15164.  The following class definition shows uses of the SOMIDLPass pragma: 
  15165.  
  15166.   class T : public SOMObject {
  15167.         public: boolean somRespondsTo(somId);
  15168.         #pragma SOMIDLTypes(*, boolean, somId)
  15169.         #pragma SOMIDLPass(*,"Begin", "//Top")
  15170.         #pragma SOMIDLPass(*,"End", "//End")
  15171.         #pragma SOMIDLPass(*,"Interface-Begin", "//Int Begin")
  15172.         #pragma SOMIDLPass(*,"Interface-End", "//Int End")
  15173.         #pragma SOMIDLPass(*,"Implementation-Begin", "//Imp Begin")
  15174.         #pragma SOMIDLPass(*,"Implementation-End", "//Imp End")
  15175.      };
  15176.      #pragma SOMIDLPass(T,"Interface-Begin", "//Int Begin 2")
  15177.      #pragma SOMIDLPass(T,"Interface-End", "//Int End 2")
  15178.      #pragma SOMIDLPass(T,"Implementation-Begin", "// ** Imp Begin 2")
  15179.  
  15180.  This example causes IDL to be emitted that looks like the following; 
  15181.  
  15182.   #ifndef T__IDL__
  15183.   #define T__IDL__
  15184.  
  15185.   // Top
  15186.   #include <som.hh>
  15187.  
  15188.   typedef int boolean;
  15189.   typedef void* somId;
  15190.  
  15191.   interface T : SOMObject {
  15192.      // Int Begin
  15193.      // Int Begin 2
  15194.      void f();
  15195.      // Int End
  15196.      // Int End 2
  15197.      Implementation {
  15198.         // Imp Begin
  15199.         // ** Imp Begin 2
  15200.         somRespondsTo : override;
  15201.         // ...
  15202.         // Imp End
  15203.      };
  15204.   };
  15205.  
  15206.   // End
  15207.  
  15208.  SOMIDLPass pragmas are cumulative; each one adds to the text emitted for the 
  15209.  class.  The relative order of the pragmas are retained. 
  15210.  
  15211.  
  15212. ΓòÉΓòÉΓòÉ 18.14.13. The SOMIDLTypes Pragma ΓòÉΓòÉΓòÉ
  15213.  
  15214. Use the SOMIDLTypes pragma to list types that you want the compiler to emit 
  15215. when it generates IDL for the specified class.  The syntax of the pragma is: 
  15216.  
  15217. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15218. Γöé                                        Γöé
  15219. Γöé                       ΓöîΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ           Γöé
  15220. Γöé                             Γöé           Γöé
  15221. Γöé >>ΓöÇΓöÇ#pragma SOMIDLTypes(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇtypeNameΓöÇΓö┤ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15222. Γöé              ΓööΓöÇC++ClassNameΓöÇΓöÿ                  Γöé
  15223. Γöé                                        Γöé
  15224. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15225.  
  15226. The asterisk indicates that the pragma applies to the innermost enclosing class 
  15227. within which the pragma is found. 
  15228.  
  15229. The following directive: 
  15230.  
  15231.    #pragma SOMIDLTypes(MyClass, size_t, AnotherType)
  15232.  
  15233. Would ensure that size_t and AnotherType are emitted whenever IDL is emitted 
  15234. for class MyClass. 
  15235.  
  15236. Uses of this pragma for a given class are cumulative.  This means that each 
  15237. such pragma for a class adds the specified types to the list for the class, and 
  15238. the order in which the types are emitted is the same as the order in which they 
  15239. are encountered. By default (i.e., if no SOMIDLTypes pragma is specified), only 
  15240. the class itself is emitted. 
  15241.  
  15242. Note:  When the compiler encounters a SOMIDLTypes pragma for a type that is 
  15243. defined in a nested include file, it generates only an #include of the IDL file 
  15244. corresponding to that nested include file. In other words, classes and typedefs 
  15245. defined in nested include files are not generated directly in the IDL file. 
  15246. Note that the IDL for the nested include file must be generated separately, 
  15247. because the compiler only generates IDL for declarations in the file being 
  15248. compiled. 
  15249.  
  15250.  
  15251. ΓòÉΓòÉΓòÉ 18.14.14. The SOMMetaClass Pragma ΓòÉΓòÉΓòÉ
  15252.  
  15253. Use this pragma if you want to identify a particular class for SOM to use as 
  15254. the metaclass of a SOM-enabled C++ class.  For more information on SOM 
  15255. metaclasses, see Metaclasses. The syntax of the pragma is: 
  15256.  
  15257. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15258. Γöé                                        Γöé
  15259. Γöé >>ΓöÇΓöÇ#pragma SOMMetaClass(ΓöÇΓöÇΓö¼ΓöÇC++ClassNameΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇ>< Γöé
  15260. Γöé               ΓööΓöÇ*Γö┤Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ   Γö£ΓöÇ"SOMClassName"ΓöÇΓöÇΓöÇΓöñ     Γöé
  15261. Γöé                         ΓööΓöÇC++MetaClassNameΓöÇΓöÿ     Γöé
  15262. Γöé                                        Γöé
  15263. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15264.  
  15265. The C++ClassName indicates what class is to have the specified metaclass as its 
  15266. metaclass.  This form of the pragma can occur at any scope.  The names of all 
  15267. specified C++ classes must be visible. 
  15268.  
  15269. An asterisk (*) in the first position indicates that the innermost enclosing 
  15270. class within which the pragma occurs is the class that will have the specified 
  15271. metaclass. An asterisk in the second position indicates that the innermost 
  15272. enclosing class within which the pragma occurs is the class that will be the 
  15273. metaclass for the specified class. You should never use the asterisk in both 
  15274. positions at once; this may cause the program to enter an infinite loop when an 
  15275. object of the class is created.  In the following example, class Mountain is 
  15276. given a metaclass of Rock, and class Tree is given a metaclass of Plant: 
  15277.  
  15278.    class Mountain: public SOMObject { // ...
  15279.       #pragma SOMMetaClass(*,Rock)
  15280.    }
  15281.    class Plant: public SOMObject { // ...
  15282.       #pragma SOMMetaClass(Tree,*)
  15283.    }
  15284.    class Loop: public SOMObject { // ...
  15285.       #pragma SOMMetaClass(*,*) // Error - will loop infinitely
  15286.    }
  15287.  
  15288. In the version of the pragma that takes a SOM class name as the metaclass, the 
  15289. SOM class name must be enclosed in double quotation marks.  In the version that 
  15290. takes a C++ class name as the metaclass, the metaclass must not be enclosed in 
  15291. double quotation marks. 
  15292.  
  15293. In the absence of a SOMMetaClass pragma, the compiler operates as if SOMClass 
  15294. was specified as the metaclass. 
  15295.  
  15296. The compiler issues an error message if you use multiple inequivalent 
  15297. SOMMetaClass pragmas for a class. 
  15298.  
  15299.  
  15300. ΓòÉΓòÉΓòÉ 18.14.15. The SOMMethodAppend ΓòÉΓòÉΓòÉ
  15301.  
  15302. Use the SOMMethodAppend pragma to generate the IDL "context" and "raises" 
  15303. strings for methods.  The syntax of the pragma is: 
  15304.  
  15305. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15306. Γöé                                        Γöé
  15307. Γöé >>ΓöÇΓöÇ#pragma SOMMethodAppend(ΓöÇΓöÇC++FunctionPrototypeLessReturn,"string"ΓöÇΓöÇ)ΓöÇΓöÇ>< Γöé
  15308. Γöé                                        Γöé
  15309. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15310.  
  15311. The contents of the string will be collected and emitted at the end of the IDL 
  15312. for the function.  The "context" information will be used for CORBA contexts 
  15313. and exceptions.  If the pragma is used more than once for a given method, the 
  15314. strings will be concatenated. 
  15315.  
  15316. The following example illustrates how this pragma is used.  Given: 
  15317.  
  15318.    class X : public SOMObject {
  15319.        void MyNewMethod(int, float);
  15320.        #pragma SOMNoMangling(*)
  15321.        #pragma SOMMethodAppend(MyNewMethod, "raises(\"this, that\")")
  15322.        #pragma SOMMethodAppend(MyNewMethod, "context(\"something\")")
  15323.    };
  15324. the following fragment of IDL will be produced: 
  15325.  
  15326.   void MyNewMethod(in long p__arg1, in float p__arg2)
  15327.     raises("this","that") context("something");
  15328.  
  15329.  
  15330. ΓòÉΓòÉΓòÉ 18.14.16. The SOMMethodName Pragma ΓòÉΓòÉΓòÉ
  15331.  
  15332. Use this pragma to specify SOM names for C++ methods and operators. You only 
  15333. need to use this pragma if you want access to the class of the applicable 
  15334. method from non-C++ programs.  If you do not use this pragma or the 
  15335. SOMNoMangling pragma, method names are mangled by the compiler, and the mangled 
  15336. names can lead to coding errors in the non-C++ programs that attempt to use 
  15337. them (because the names are obscure and typically very long). 
  15338.  
  15339. The syntax of the pragma is: 
  15340.  
  15341. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15342. Γöé                                        Γöé
  15343. Γöé >>ΓöÇΓöÇ#pragma SOMMethodName(ΓöÇΓöÇΓö¼ΓöÇCΓöîΓöÉPrototypeΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ,ΓöÇΓöÇ"SomMethodName"ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15344. Γöé               ΓööΓöÇCΓööΓöÿFunctionNameΓöÇΓöÿ                Γöé
  15345. Γöé                                        Γöé
  15346. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15347.  
  15348. The C++Prototype is a C++ function prototype without the return type.  For 
  15349. example, the function double sqrt(double) would appear as sqrt(double) in this 
  15350. pragma. If the prototype has a trailing const, you must include this in the 
  15351. prototype. 
  15352.  
  15353. The C++FunctionName is an unambiguous C++ function name (one that is not 
  15354. overloaded within the class).  You do not include the function's signature.  If 
  15355. you use this version of the pragma for a function that has more than one 
  15356. overloaded version in a class, the compiler issues an error message. 
  15357.  
  15358. If you do not need to access the class from non-C++ programs, you do not need 
  15359. to use either SOMMethodName or SOMNoMangling for the class. 
  15360.  
  15361. Note:  These pragmas change the SOM name of a method.  As discused in SOM and 
  15362. Upward Binary Compatibility of Libraries, renaming an item is equivalent to 
  15363. removing it and adding a new item with the same characteristics. If there is a 
  15364. possibility that you will access the class from non-C++ programs, use the 
  15365. SOMMethodName or SOMNoMangling pragmas in your initial implementation. 
  15366.  
  15367. You can use a combination of SOMMethodName and SOMNoMangling to give unmangled 
  15368. names to methods of a class that non-C++ programs will access.  The 
  15369. SOMNoMangling pragma (see The SOMNoMangling Pragma) specifies that the C++ name 
  15370. of a method becomes the SOM name of that method.  As long as the method is not 
  15371. an overloaded method or an operator other than the default assignment operator, 
  15372. SOMNoMangling makes the method accessible to non-C++ programs by its C++ name 
  15373. after folding all letters to lowercase. The following example shows a class 
  15374. declaration with a combination of SOMNoMangling and SOMMethodName pragmas: 
  15375.  
  15376.    #pragma SOMAsDefault(on)
  15377.    class Address {
  15378.       public:
  15379.          char* Street;
  15380.          int   Phone;
  15381.    #pragma SOMNoMangling(on)
  15382.          int   call();  // remains as call
  15383.          void  print(); // remains as print
  15384.    #pragma SOMNoMangling(pop)
  15385.          void  update(char* street);
  15386.    #pragma SOMMethodName(update(char),"updatestreet")
  15387.                      // becomes updatestreet
  15388.          void  update(int phone);
  15389.    #pragma SOMMethodName(update(int),"updatephone")
  15390.                      // becomes updatephone
  15391.    };
  15392. #pragma SOMAsDefault(pop)
  15393.  
  15394. The example uses SOMNoMangling to cause the C++ methods call and print to be 
  15395. given SOM names identical to their C++ method names.  The example then 
  15396. explicitly renames the different overloads of update using SOMMethodName, so 
  15397. that calls to those methods from non-C++ programs can be resolved. 
  15398.  
  15399. You should keep in mind that naming in SOM is not case sensitive, so any names 
  15400. you supply through SOMMethodName should be distinguishable from other names 
  15401. regardless of case.  In addition, the Common Object Request Broker Architecture 
  15402. (CORBA) requires that names begin with an alphabetic character.  If you use the 
  15403. SOMMethodName pragma on a method, make sure the SOM name starts with an 
  15404. alphabetic character. 
  15405.  
  15406. The requirements for the SOMMethodName pragma are: 
  15407.  
  15408.      The pragma must occur in the compilation unit that defines the class (the 
  15409.       compilation unit that contains a SOMDefine pragma or the first noninline 
  15410.       function for the class). 
  15411.  
  15412.      The method must already have been declared at the point where the pragma 
  15413.       is encountered. 
  15414.  
  15415.      The class must be a SOM class. 
  15416.  
  15417.      You cannot rename two method signatures in a class to the same name.  The 
  15418.       compiler issues an error if you attempt this. 
  15419.  
  15420.      The name of the member function within the SOMMethodName pragma must be 
  15421.       fully qualified if the pragma occurs outside of the class declaration. 
  15422.       For example, function clear() of class Buffer must be specified as 
  15423.       Buffer::clear(). 
  15424.  
  15425.      A method may only be renamed in conjunction with the class that 
  15426.       introduces it.  This means that you cannot rename a function func() in 
  15427.       subclass B of class A, if func() was introduced by A. 
  15428.  
  15429.      You cannot rename a method to _get_X() or _set_X(), where X is the name 
  15430.       of an attribute for that class.  For example, you cannot do the 
  15431.       following: 
  15432.  
  15433.                class MyClass : SOMObject {
  15434.                   public:
  15435.                      int i;
  15436.                      int foo();
  15437.                #pragma SOMAttribute(i)
  15438.                #pragma SOMMethodName(foo(),"_get_i") // error
  15439.                   };
  15440.  
  15441.       because the SOMAttribute pragma predefines a get and set method for i. 
  15442.       If i were a member of a base class of MyClass rather than of MyClass 
  15443.       itself, the above SOMMethodName pragma would work, but the compiler would 
  15444.       resolve all calls to _get_i()  by calling the get method of the base 
  15445.       class, rather than by calling foo(). 
  15446.  
  15447.  The compiler generates an error message if more than one version of an 
  15448.  overloaded SOM function is found and no SOMMethodName pragma has been used to 
  15449.  rename versions of the function. The error occurs whenever the compiler 
  15450.  detects a version of the function with a signature different from that of the 
  15451.  first instantiated version. The error refers to name clashes.  You can avoid 
  15452.  this error by using SOMMethodName before any overload of a function other than 
  15453.  the first is used. 
  15454.  
  15455.  Note that different instantiations of templates used as SOM classes may have 
  15456.  different names for a method, if SOMMethodName is used on the method for a 
  15457.  given instantiation of the template.  For example: 
  15458.  
  15459.      template class A<T> : public SOMObject {
  15460.         public:
  15461.            Print();
  15462.      };
  15463.      #pragma SOMMethodName(A<int>::Print,"PrintInt")
  15464.      #pragma SOMMethodName(A<char*>::Print,"PrintString")
  15465.  
  15466.  
  15467. ΓòÉΓòÉΓòÉ 18.14.16.1. SOMMethodName and Inheritance ΓòÉΓòÉΓòÉ
  15468.  
  15469. If you rename a method of a class using the SOMMethodName pragma, a method of a 
  15470. derived class, with the same method signature, has the same SOM method name as 
  15471. specified by the pragma. 
  15472.  
  15473.  
  15474. ΓòÉΓòÉΓòÉ 18.14.17. The SOMNoDataDirect Pragma ΓòÉΓòÉΓòÉ
  15475.  
  15476. Use this pragma to have the compiler use get/set methods for instance data 
  15477. access.  See set and get Methods for Attribute Class Members for further 
  15478. details. 
  15479.  
  15480. The syntax of the pragma is: 
  15481.  
  15482. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15483. Γöé                                        Γöé
  15484. Γöé >>ΓöÇΓöÇ#pragma SOMNoDataDirect(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15485. Γöé                Γö£ΓöÇonΓöÇΓöÇΓöñ                     Γöé
  15486. Γöé                Γö£ΓöÇoffΓöÇΓöñ                     Γöé
  15487. Γöé                ΓööΓöÇpopΓöÇΓöÿ                     Γöé
  15488. Γöé                                        Γöé
  15489. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15490.  
  15491. When this pragma is in effect, all public data members can be accessed by get 
  15492. and set methods only, except as specified below. When the pragma is not in 
  15493. effect, nonprivate data members can be accessed directly, or by the get and set 
  15494. methods. However, if a data member has #pragma SOMAttribute(nodata) set, the 
  15495. data member can only be accessed by the get and set methods. 
  15496.  
  15497. Direct access may be used by the following functions, regardless of the setting 
  15498. of this pragma: 
  15499.  
  15500.      Methods of the class (methods can access their own instance data directly 
  15501.       through the this pointer) 
  15502.      Methods of subclasses, again through the this pointer. 
  15503.  
  15504.  Friend classes and methods may use direct access if the pragma is explicitly 
  15505.  turned on within the class declaration (using #pragma SOMNoDataDirect(*)).  If 
  15506.  the pragma is turned on implicitly (using #pragma SOMNoDataDirect(on)), friend 
  15507.  classes and methods must use the get and set methods. 
  15508.  
  15509.  The asterisk (*) indicates that the pragma applies to the innermost enclosing 
  15510.  class within which the pragma occurs.  The asterisk version of the pragma 
  15511.  temporarily overrides any setting obtained by using the on, off, or pop 
  15512.  arguments for the pragma, but only for the class in which it occurs.  It has 
  15513.  no effect on nested classes. 
  15514.  
  15515.  The on, off, and pop arguments are not allowed within the scope of a class. 
  15516.  See Pragmas Containing on | off | pop for more information on how these 
  15517.  arguments are used. 
  15518.  
  15519.  The /Gb compiler option is equivalent to specifying #pragma 
  15520.  SOMNoDataDirect(on) at the beginning of the compilation unit. 
  15521.  
  15522.  If this pragma is in effect when an instance of a SOM class is used by client 
  15523.  code, all SOM object data accesses via pointer or reference (other than those 
  15524.  that use the this pointer) are done indirectly. SOM object data member 
  15525.  accesses done through local or global SOM objects may be done directly. 
  15526.  
  15527.  
  15528. ΓòÉΓòÉΓòÉ 18.14.18. The SOMNoMangling Pragma ΓòÉΓòÉΓòÉ
  15529.  
  15530. Use this pragma to tell the compiler not to mangle the C++ names of methods, 
  15531. static member functions, or instance data when creating SOM names or generating 
  15532. IDL. The syntax of the pragma is: 
  15533.  
  15534. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15535. Γöé                                        Γöé
  15536. Γöé >>ΓöÇΓöÇ#pragma SOMNoMangling(ΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15537. Γöé               Γö£ΓöÇonΓöÇΓöÇΓöñ                      Γöé
  15538. Γöé               Γö£ΓöÇoffΓöÇΓöñ                      Γöé
  15539. Γöé               ΓööΓöÇpopΓöÇΓöÿ                      Γöé
  15540. Γöé                                        Γöé
  15541. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15542.  
  15543. See Conventions Used by the SOM Pragmas for information on how to use the 
  15544. pragma's arguments.  Note that, when the asterisk (*) is used in the pragma, 
  15545. settings of the pragma via on, off, or pop are ignored, but only for the class 
  15546. in which the pragma appears with the asterisk.  This applies even if on, off, 
  15547. or pop are used within the class itself.  However, the asterisk version does 
  15548. not affect nested classes. 
  15549.  
  15550. When the pragma is in effect, the compiler does the following: 
  15551.  
  15552.      Generates lowercase versions of declared method names, with no mangling 
  15553.       applied.  This means that method names do not identify their arguments 
  15554.       and class. 
  15555.      Detects clashes of generated names within a class.  This means that two 
  15556.       overloaded versions of method f, for example f(int) and f(double), result 
  15557.       in a compiler error message.  To correct such a situation, you can use 
  15558.       the SOMMethodName pragma on all but one of the conflicting methods. 
  15559.  
  15560.  Note: 
  15561.  
  15562.    1. The pragma does not apply to compiler-generated functions, which continue 
  15563.       to use mangled names. 
  15564.  
  15565.    2. User-written member functions that begin with an underscore (except _get 
  15566.       and _set members) are always mangled. 
  15567.  
  15568.    3. It is an error to remap two different C++ signatures to the same SOM 
  15569.       name.  This can happen, for example, in a class with overloaded methods 
  15570.       where SOMNoMangling is in effect.  In such cases, you should use a 
  15571.       SOMMethodName pragma to rename all but one of the overloaded methods.  A 
  15572.       SOMMethodName pragma always takes precedence over a SOMNoMangling pragma. 
  15573.  
  15574.  The pragma only applies to methods introduced by a class, not to inherited 
  15575.  methods.  If SOMNoMangling is in effect when the compiler encounters a base 
  15576.  class, the methods of the base class will have unmangled names, as will 
  15577.  methods with the same signatures in any derived class, regardless of the state 
  15578.  of SOMNoMangling in the derived class. 
  15579.  
  15580.  In the following example, MyNewMethod receives a SOM name of mynewmethod, 
  15581.  rather than the mangled version VisualAge C++ would normally generate: 
  15582.  
  15583.      #pragma SOMNoMangling(off)
  15584.      // ...
  15585.      class X : public SOMObject {
  15586.      #pragma SOMNoMangling(*) // overrides SOMNoMangling(off)
  15587.                               // for entire class
  15588.          // ...
  15589.          void MyNewMethod(int, float);
  15590.      };
  15591.  
  15592.  
  15593. ΓòÉΓòÉΓòÉ 18.14.19. The SOMNonDTS Pragma ΓòÉΓòÉΓòÉ
  15594.  
  15595. Warning: 
  15596.  
  15597. This pragma is not intended to be used by programmers. Do not use this pragma 
  15598. in your programs, or the results will be unpredictable. 
  15599.  
  15600. This pragma is automatically inserted in generated .hh files to inform the 
  15601. compiler that the class it applies to was originally a SOM class, and not a C++ 
  15602. class converted to a SOM class by the VisualAge C++. 
  15603.  
  15604.  
  15605. ΓòÉΓòÉΓòÉ 18.14.20. The SOMReleaseOrder Pragma ΓòÉΓòÉΓòÉ
  15606.  
  15607. Use the SOMReleaseOrder pragma to make your SOM classes upward binary 
  15608. compatible (so that client programs can use newer versions of your library 
  15609. without having to recompile their source code each time you issue a new version 
  15610. of the library).  When you extend a class, you can only achieve binary 
  15611. compatibility for users of the class if any added functions or data members are 
  15612. placed at the end of the release order list specified in the pragma. See 
  15613. Release Order of SOM Objects if you want a better understanding of how release 
  15614. order is used to ensure upward binary compatibility. 
  15615.  
  15616. The syntax of the pragma is: 
  15617.  
  15618. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15619. Γöé                                        Γöé
  15620. Γöé >>ΓöÇΓöÇpragma SOMReleaseOrder(ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ> Γöé
  15621. Γöé                                        Γöé
  15622. Γöé   ΓöîΓöÇ,ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ               Γöé
  15623. Γöé                         Γöé               Γöé
  15624. Γöé >ΓöÇΓöÇΓöÇΓö¼ΓöÇ*ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇ)ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  15625. Γöé   Γö£ΓöÇStaticDataMemberΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ                Γöé
  15626. Γöé   ΓööΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓö¼ΓöÇAttributeΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÿ                Γöé
  15627. Γöé    ΓööΓöÇ ! ΓöÇΓöÿ  Γö£ΓöÇCΓöîΓöÉMemberFunctionPrototypeΓöÇΓöñ                 Γöé
  15628. Γöé         Γö£ΓöÇCΓööΓöÿUnambiguousFunctionNameΓöÇΓöñ                 Γöé
  15629. Γöé         ΓööΓöÇ"SOMMethodName"ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ                 Γöé
  15630. Γöé                                        Γöé
  15631. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15632.  
  15633. The pragma must appear within the body of the class declaration. It contains a 
  15634. comma-separated list of release order elements. A release order element may be 
  15635. any of the following: 
  15636.  
  15637.      An asterisk (*).  The asterisk reserves a slot in the release order so 
  15638.       that you can later add a member function or data member at that position 
  15639.       in the list, without requiring client programs to be recompiled. You can 
  15640.       also reserve slots for things like private members that you do not want 
  15641.       to expose to client code. 
  15642.  
  15643.      An attribute  This uses two slots in the release order, one for the 
  15644.       attribute's get method, and one for its set method.  Both slots are used 
  15645.       even for const data members, which do not have a set method, so that you 
  15646.       can later change the method to non-const without breaking binary 
  15647.       compatibility. Regardless of whether you define get and set methods or 
  15648.       let the compiler generate them for you, you can place either the data 
  15649.       member name, or the get and set method names, in the release order. (You 
  15650.       cannot specify both the data member name and the set and get methods.) 
  15651.       For new classes, you should use the data member name, for the sake of 
  15652.       code readability and to ensure that the get and set methods for an 
  15653.       attribute are always consecutive in the release order. For older SOM 
  15654.       classes where you did not allocate consecutive slots for the get and set 
  15655.       methods in the class's release order, you must continue to specify each 
  15656.       method separately in the correct order. 
  15657.  
  15658.      A static data member name.  This uses one slot, for a pointer to the 
  15659.       static data member. 
  15660.  
  15661.      A C++ member function prototype, excluding the return type. This uses one 
  15662.       slot, for a pointer to the function. See below for information on the use 
  15663.       of the exclamation point (!). Note that if the function is not overloaded 
  15664.       within the class you can use the unambiguous function name (see below). 
  15665.  
  15666.      An unambiguous function name (one that is not overloaded by the class in 
  15667.       question or any of its bases). 
  15668.  
  15669.      A SOM method name, enclosed in quotation marks.  This is equivalent to 
  15670.       specifying the C++ member function name, except that you must specify the 
  15671.       simple SOM method name without specifying argument types.  See below for 
  15672.       information on the use of the exclamation point. 
  15673.  
  15674.  
  15675. ΓòÉΓòÉΓòÉ 18.14.20.1. Elements Preceded by ! ΓòÉΓòÉΓòÉ
  15676.  
  15677. Release order elements preceded by an exclamation point (!) let you assert that 
  15678. a member function is to have a slot reserved for it even if the member function 
  15679. was inherited from a base class.  The "!" helps the compiler diagnose 
  15680. unexpected base class evolutions.  This can occur when a base class later 
  15681. introduces a virtual method whose signature matches one that is currently 
  15682. introduced by this class.  If the method is found in the class's release order 
  15683. without the "!", the compiler issues an error message. If you precede the 
  15684. method with "!", you are asserting to the compiler that you are aware of the 
  15685. method's having moved upward in the inheritance structure.  VisualAge C++ 
  15686. preserves binary compatibility in such situations, if you use the "!". 
  15687.  
  15688. The following examples show two versions of a class hierarchy. In the first 
  15689. version, method aMethod() is a member of class Derived: 
  15690.  
  15691.    class Base : public SOMObject {
  15692.        };
  15693.  
  15694.    class Derived : public Base {
  15695.        public:
  15696.           void aMethod();
  15697.        #pragma SOMReleaseOrder(aMethod())
  15698.        };
  15699.  
  15700. This version compiles successfully, because aMethod() is found in the release 
  15701. order of the class that introduced it. Later, a version of aMethod() is added 
  15702. to Base: 
  15703.  
  15704.    class Base : public SOMObject {
  15705.       public:
  15706.          virtual void aMethod();
  15707.        };
  15708.  
  15709.    class Derived : public Base {
  15710.        public:
  15711.           void aMethod();
  15712.        #pragma SOMReleaseOrder(aMethod())
  15713.        };
  15714.  
  15715. A compilation error occurs for this version, because the release order for 
  15716. class Derived contains a method that is no longer introduced by the class (it 
  15717. is now introduced by Base). The compiler considers this an error because the 
  15718. SOMReleaseOrder pragma does not make the inheritance of aMethod() from class 
  15719. Base explicit.  To solve this problem, change the release order pragma to: 
  15720.  
  15721.     #pragma SOMReleaseOrder(!aMethod())
  15722.  
  15723. This informs the compiler that the programmer coding class Derived is aware of 
  15724. the addition of aMethod() to class Base.  The program then compiles 
  15725. successfully. 
  15726.  
  15727.  
  15728. ΓòÉΓòÉΓòÉ 18.14.20.2. Other Requirements ΓòÉΓòÉΓòÉ
  15729.  
  15730. This pragma may only appear within the body of the corresponding class 
  15731. definition.  Only one such pragma is allowed per class.  If you do not provide 
  15732. a release order, the compiler will assume a release order matching the order of 
  15733. declaration within the class body.  Although you can avoid having to specify a 
  15734. release order by always placing new methods and data members below existing 
  15735. ones in the private and protected/public sections of the class definition, use 
  15736. of the SOMReleaseOrder  pragma is strongly recommended for safety and code 
  15737. readability. 
  15738.  
  15739. Items in the release order list must have been declared prior to the pragma, 
  15740. and must appear only once in the list. 
  15741.  
  15742. If a SOMReleaseOrder pragma is given for a class, it must list all the methods 
  15743. and data members introduced by that class. (Compiler-generated methods, such as 
  15744. the four default assignment operators that the compiler provides if you do not 
  15745. define any, must also be listed, if you want to take their address.) The 
  15746. compiler issues a warning message when it encounters a partial list. 
  15747.  
  15748. You can use the /Fr option to have the compiler generate a #pragma 
  15749. SOMReleaseOrder for a class. The release order includes compiler-defined 
  15750. methods.  By default the compiler places methods it generates at the end of the 
  15751. release order. For further details see The SOMReleaseOrder Pragma. 
  15752.  
  15753.  
  15754. ΓòÉΓòÉΓòÉ 18.14.20.3. Templates and Release Orders ΓòÉΓòÉΓòÉ
  15755.  
  15756. Because the SOMReleaseOrder pragma must occur within the declaration for a 
  15757. class, you cannot declare different release orders for different instantiations 
  15758. of a template class.  If you rename methods of a template instantiation using 
  15759. SOMMethodName, you must still indicate the original C++ name of each method in 
  15760. the release order within the template class.  If you want to provide two 
  15761. different release orders for different instantiations of a template, you must 
  15762. make one of the classes a subclass of the template. You can then declare a 
  15763. different release order for that class, using the "!" to indicate your 
  15764. awareness that member functions are derived from a base class. 
  15765.  
  15766.  
  15767. ΓòÉΓòÉΓòÉ 19. ANSI Notes on Implementation-Defined Behavior ΓòÉΓòÉΓòÉ
  15768.  
  15769. VisualAge C++ product supports the requirements of the American National 
  15770. Standard for Information Systems / International Standards Organization - 
  15771. Programming Language C standard, ANSI/ISO 9899-1990[1992], and the current 
  15772. draft of the Working Paper for Draft Proposed American National Standard for 
  15773. Information Systems - Programming Language C++ ANSI X3J16/92-0060, (September 
  15774. 17, 1992), as understood and interpreted by IBM as of March 1993. It also 
  15775. supports the IBM SAA C standards as documented in the Language Reference. This 
  15776. appendix describes how VisualAge C++ behaves where the ANSI C Standard 
  15777. describes behavior as implementation-defined. These behaviors can affect your 
  15778. writing of portable code. 
  15779.  
  15780.  
  15781. ΓòÉΓòÉΓòÉ 19.1. Implementation-Defined Behavior Common to Both C and C++ ΓòÉΓòÉΓòÉ
  15782.  
  15783. The following sections describe how the VisualAge C++ product defines the 
  15784. behavior classified as implementation-defined in the ANSI C Standard. 
  15785.  
  15786.  
  15787. ΓòÉΓòÉΓòÉ 19.1.1. Identifiers ΓòÉΓòÉΓòÉ
  15788.  
  15789.      The number of significant characters in an identifier with no external 
  15790.       linkage is 255. 
  15791.  
  15792.      The number of significant characters in an identifier with external 
  15793.       linkage is 255. 
  15794.  
  15795.      VisualAge C++ compiler truncates all external names to 255 characters. 
  15796.  
  15797.      Case sensitivity: the case of identifiers is respected unless you link 
  15798.       using the /IGNORECASE option of ILINK. 
  15799.  
  15800.  
  15801. ΓòÉΓòÉΓòÉ 19.1.2. Characters ΓòÉΓòÉΓòÉ
  15802.  
  15803.      A character is represented by 8 bits, as defined by the CHAR_BIT macro in 
  15804.       <limits.h>. 
  15805.  
  15806.      The same code page is used for the source and execution set. (Source 
  15807.       characters and strings do not need to be mapped to the execution 
  15808.       character set.) 
  15809.  
  15810.      When an integer character constant contains a character or escape 
  15811.       sequence that is not represented in the basic execution character set, 
  15812.       the char is assigned the character after the backslash, and a warning is 
  15813.       issued. For example, '\q' is interpreted as the character 'q'. 
  15814.  
  15815.      When a wide character constant contains a character or escape sequence 
  15816.       that is not represented in the extended execution character set, the 
  15817.       wchar_t is assigned the character after the backslash, and a warning is 
  15818.       issued. 
  15819.  
  15820.      When an integer character constant contains more than one character, the 
  15821.       last 4 bytes represent the character constant. 
  15822.  
  15823.      When a wide character constant contains more than one multibyte 
  15824.       character, the last wchar_t value represents the character constant. 
  15825.  
  15826.      The default behavior for char is unsigned. 
  15827.  
  15828.      Any sequential spaces in your source program are interpreted as one 
  15829.       space. 
  15830.  
  15831.      All spaces are retained for the listing file. 
  15832.  
  15833.  
  15834. ΓòÉΓòÉΓòÉ 19.1.3. Strings ΓòÉΓòÉΓòÉ
  15835.  
  15836.      VisualAge C++ compiler provides the following additional sequence forms 
  15837.       for strtod, strtol, and strtoul functions in locales other than the C 
  15838.       locale: 
  15839.  
  15840.                inf     infinity     nan
  15841.       All of these sequences are not case sensitive. 
  15842.  
  15843.      When you use DBCS (with the /Sn compiler option), a hexadecimal character 
  15844.       that is a valid first byte of a double-byte character is treated as a 
  15845.       double-byte character inside a string. A 0 is appended to the character 
  15846.       that ends the string. Double-byte characters in strings must appear in 
  15847.       pairs. 
  15848.  
  15849.  
  15850. ΓòÉΓòÉΓòÉ 19.1.4. Integers ΓòÉΓòÉΓòÉ
  15851.  
  15852. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15853. Γöé Table 10. Integer Storage and Range                      Γöé
  15854. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15855. Γöé TYPE           Γöé AMOUNT OF STORAGE     Γöé RANGE (IN <LIMITS.H>)  Γöé
  15856. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15857. Γöé "signed short"      Γöé 2 bytes          Γöé "-32768" to "32767"   Γöé
  15858. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15859. Γöé "unsigned short"     Γöé 2 bytes          Γöé "0" to "65535"      Γöé
  15860. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15861. Γöé "signed int"       Γöé 4 bytes          Γöé "-2147483648" to     Γöé
  15862. Γöé             Γöé              Γöé "2147483647"       Γöé
  15863. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15864. Γöé "unsigned int"      Γöé 4 bytes          Γöé "0" to "4294967295"   Γöé
  15865. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15866. Γöé "signed long"      Γöé 4 bytes          Γöé "-2147483648" to     Γöé
  15867. Γöé             Γöé              Γöé "2147483647"       Γöé
  15868. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15869. Γöé "unsigned long"     Γöé 4 bytes          Γöé "0" to "4294967295"   Γöé
  15870. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15871. Γöé NOTE:  Do not use the values in this table as numbers in a source program.  Γöé
  15872. Γöé Use the macros defined in <LIMITS.H> to represent these values.        Γöé
  15873. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15874.  
  15875.      When you convert an integer to a signed char, the least-significant byte 
  15876.       of the integer represents the char. 
  15877.  
  15878.      When you convert an integer to a short signed integer, the 
  15879.       least-significant 2 bytes of the integer represents the short int. 
  15880.  
  15881.      When you convert an unsigned integer to a signed integer of equal length, 
  15882.       if the value cannot be represented, the magnitude is preserved and the 
  15883.       sign is not. 
  15884.  
  15885.      When bitwise operations (OR, AND, XOR) are performed on a signed int, the 
  15886.       representation is treated as a bit pattern. 
  15887.  
  15888.      The remainder of integer division is negative if exactly one operand is 
  15889.       negative. 
  15890.  
  15891.      When either operand of the divide operator is negative, the result is 
  15892.       truncated to the integer value and the sign will be negative. 
  15893.  
  15894.      The result of a bitwise right shift of a negative signed integral type is 
  15895.       sign extended. 
  15896.  
  15897.      The result of a bitwise right shift of a non-negative signed integral 
  15898.       type or an unsigned integral type is the same as the type of the left 
  15899.       operand. 
  15900.  
  15901.  
  15902. ΓòÉΓòÉΓòÉ 19.1.5. Floating-Point Values ΓòÉΓòÉΓòÉ
  15903.  
  15904. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  15905. Γöé Table 11. Floating Point                           Γöé
  15906. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15907. Γöé TYPE           Γöé AMOUNT OF STORAGE     Γöé RANGE OF EXPONENTS    Γöé
  15908. Γöé             Γöé              Γöé (BASE 10) (IN      Γöé
  15909. Γöé             Γöé              Γöé <FLOAT.H>)        Γöé
  15910. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15911. Γöé "float" (IEEE 32-bit)  Γöé 4 bytes          Γöé "-37" to "38"      Γöé
  15912. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15913. Γöé "double" (IEEE 64-bit)  Γöé 8 bytes          Γöé "-307" to "308"     Γöé
  15914. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  15915. Γöé "long double" (IEEE   Γöé 16 bytes         Γöé "-4931" to "4932"    Γöé
  15916. Γöé 80-bit)         Γöé              Γöé             Γöé
  15917. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  15918.  
  15919.      When an integral number is converted to a floating-point number that 
  15920.       cannot exactly represent the original value, it is truncated to the 
  15921.       nearest representable value. 
  15922.  
  15923.      When a floating-point number is converted to a narrower floating-point 
  15924.       number, it is rounded to the nearest representable value. 
  15925.  
  15926.  
  15927. ΓòÉΓòÉΓòÉ 19.1.6. Arrays and Pointers ΓòÉΓòÉΓòÉ
  15928.  
  15929.      The type of the integer required to hold the maximum size of an array 
  15930.       (the type of the sizeof operator, size_t) is unsigned int. 
  15931.  
  15932.      The type of the integer required to hold the difference between two 
  15933.       pointers to elements of the same array (ptrdiff_t) is int. 
  15934.  
  15935.      When you cast a pointer to an integer or an integer to a pointer, the bit 
  15936.       patterns are preserved. 
  15937.  
  15938.  
  15939. ΓòÉΓòÉΓòÉ 19.1.7. Registers ΓòÉΓòÉΓòÉ
  15940.  
  15941.      The VisualAge C++ compiler optimizes register use and does not respect 
  15942.       the register storage class specifier. 
  15943.  
  15944.      In C programs, you cannot take the address of an object with a register 
  15945.       storage class. This restriction does not apply to C++ programs. 
  15946.  
  15947.  
  15948. ΓòÉΓòÉΓòÉ 19.1.8. Structures, Unions, Enumerations, Bit-Fields ΓòÉΓòÉΓòÉ
  15949.  
  15950.      If a member of a union object is accessed using a member of a different 
  15951.       type, the result is undefined. 
  15952.  
  15953.      If a structure is not packed, padding is added to align the structure 
  15954.       members on their natural boundaries and to end the structure on its 
  15955.       natural boundary. The alignment of the structure or union is that of its 
  15956.       strictest member. If the length of the structure is greater than a 
  15957.       doubleword, the structure is doubleword-aligned.  The alignment of the 
  15958.       individual members is not changed. Packed structures are not padded. See 
  15959.       Mapping for more information. 
  15960.  
  15961.      The default type of an integer bit field is unsigned int. 
  15962.  
  15963.      Bit fields are allocated from low memory to high memory, and the bytes 
  15964.       are reversed. For more information, see Mapping. 
  15965.  
  15966.      Bit fields can cross storage unit boundaries. 
  15967.  
  15968.      The maximum bit field length is 32 bits. If a series of bit fields does 
  15969.       not add up to the size of an int, padding may take place. 
  15970.  
  15971.      A bit field cannot have type long double. 
  15972.  
  15973.      The expression that defines the value of an enumeration constant cannot 
  15974.       have type long double. 
  15975.  
  15976.      An enumeration can have the type char, short, or long and be either 
  15977.       signed or unsigned, depending on its smallest and largest values. 
  15978.  
  15979.       In C++, enumerations are a distinct type, and although they may be the 
  15980.       same size as a data type such as char, they are not considered to be of 
  15981.       that type. 
  15982.  
  15983.  
  15984. ΓòÉΓòÉΓòÉ 19.1.9. Qualifiers ΓòÉΓòÉΓòÉ
  15985.  
  15986.      All access to an object that has a type that is qualified as volatile is 
  15987.       retained. 
  15988.  
  15989.  
  15990. ΓòÉΓòÉΓòÉ 19.1.10. Declarators ΓòÉΓòÉΓòÉ
  15991.  
  15992.      There is no VisualAge C++ limit for the maximum number of declarators 
  15993.       (pointer, array, function) that can modify an arithmetic, structure, or 
  15994.       union type. The only constraint is your system resources. 
  15995.  
  15996.  
  15997. ΓòÉΓòÉΓòÉ 19.1.11. Statements ΓòÉΓòÉΓòÉ
  15998.  
  15999.      Because the case values must be integers and cannot be duplicated, the 
  16000.       maximum number of case values in a switch statement is 4294967296. 
  16001.  
  16002.  
  16003. ΓòÉΓòÉΓòÉ 19.1.12. Preprocessor Directives ΓòÉΓòÉΓòÉ
  16004.  
  16005.      The value of a single-character constant in a constant expression that 
  16006.       controls conditional inclusion matches the value of the character 
  16007.       constant in the execution character set. 
  16008.  
  16009.      Such a constant can have a negative value. 
  16010.  
  16011.      For the method of searching system include source files (specified within 
  16012.       angle brackets) see the User's Guide. 
  16013.  
  16014.      User include files can be specified in double quotation marks, for 
  16015.       example "myheader.h".  For the method of searching user include files, 
  16016.       see the User's Guide. 
  16017.  
  16018.      For the mapping between the name specified in the include directive and 
  16019.       the external source file name, see the User's Guide. 
  16020.  
  16021.      For the behavior of each #pragma directive, see the online or hardcopy 
  16022.       Language Reference. 
  16023.  
  16024.      The __DATE__ and __TIME__ macros are always defined as the system date 
  16025.       and time. 
  16026.  
  16027.  
  16028. ΓòÉΓòÉΓòÉ 19.1.13. Library Functions ΓòÉΓòÉΓòÉ
  16029.  
  16030.      In extended mode (the default) and for all C++ programs, the NULL macro 
  16031.       is defined to be 0.  For all other language levels, NULL is defined to 
  16032.       be:  ((void *)0). 
  16033.  
  16034.      When assert is executed, if the expression is false, the diagnostic 
  16035.       message written by the assert macro has the format: 
  16036.  
  16037.               Assertion failed:  expression, file file_name, line line_number
  16038.  
  16039.      To create a table of the characters set up by the CTYPE functions, use 
  16040.       the program in C Program to Print out CTYPE Characters.  The columns are 
  16041.       organized by function as follows: 
  16042.  
  16043.       (Column 1)         The hexadecimal value of the character 
  16044.       AN                 isalnum 
  16045.       A                  isalpha 
  16046.       C                  iscntrl 
  16047.       D                  isdigit 
  16048.       G                  isgraph 
  16049.       L                  islower 
  16050.       (Column 8)         isprint 
  16051.       PU                 ispunct 
  16052.       S                  isspace 
  16053.       PR                 isprint 
  16054.       U                  isupper 
  16055.       X                  isxdigit 
  16056.  
  16057.      The value returned by all math functions after a domain error (EDOM) is a 
  16058.       NaN. 
  16059.  
  16060.      The value errno is set to on underflow range errors is ERANGE. 
  16061.  
  16062.      If you call the fmod function with 0 as the second argument, fmod returns 
  16063.       0 and a domain error. 
  16064.  
  16065.  
  16066.   C Program to Print out CTYPE Characters
  16067.  
  16068.   #include <stdio.h>
  16069.   #include <ctype.h>
  16070.  
  16071.   int main(void)
  16072.   {
  16073.      int ch;
  16074.  
  16075.      for (ch = 0; ch <= 0xff; ch++)
  16076.         {
  16077.         printf("%#04X ", ch);
  16078.         printf("%3s ", isalnum(ch)  ? "AN" : " ");
  16079.         printf("%2s ", isalpha(ch)  ? "A"  : " ");
  16080.         printf("%2s",  iscntrl(ch)  ? "C"  : " ");
  16081.         printf("%2s",  isdigit(ch)  ? "D"  : " ");
  16082.         printf("%2s",  isgraph(ch)  ? "G"  : " ");
  16083.         printf("%2s",  islower(ch)  ? "L"  : " ");
  16084.         printf("%c",  isprint(ch)  ? ch   : ' ');
  16085.         printf("%3s",  ispunct(ch)  ? "PU" : " ");
  16086.         printf("%2s",  isspace(ch)  ? "S"  : " ");
  16087.         printf("%3s",  isprint(ch)  ? "PR" : " ");
  16088.         printf("%2s",  isupper(ch)  ? "U"  : " ");
  16089.         printf("%2s",  isxdigit(ch) ? "X"  : " ");
  16090.  
  16091.         putchar('\n');
  16092.         }
  16093.         return 0;
  16094.   }
  16095.  
  16096.  
  16097. ΓòÉΓòÉΓòÉ 19.1.14. Error Handling ΓòÉΓòÉΓòÉ
  16098.  
  16099.      See the online Language Reference for a list of the runtime messages 
  16100.       generated for perror and strerror. Note that the value of errno is not 
  16101.       generated with the message. 
  16102.  
  16103.      See the online Language Reference for the lists of the messages provided 
  16104.       with VisualAge C++ compiler. 
  16105.  
  16106.      Messages are classified as shown by the following table: 
  16107.  
  16108.             ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16109.             Γöé TYPE OF MESSAGE    Γöé RETURN CODE      Γöé
  16110.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16111.             Γöé Information      Γöé "0"          Γöé
  16112.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16113.             Γöé Warning        Γöé "0"          Γöé
  16114.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16115.             Γöé Error         Γöé "12"         Γöé
  16116.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16117.             Γöé Severe error     Γöé "16" or "20" or "99" Γöé
  16118.             Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16119.             Γöé            Γöé            Γöé
  16120.             ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16121.  
  16122.      Use the /Wn compile-time option to control the level of messages 
  16123.       generated.  There is also a /Wgrp compiler option that provides 
  16124.       programming-style diagnostics to aid you in determining possible 
  16125.       programming errors. See the User's Guide for further information on this 
  16126.       compiler option. 
  16127.  
  16128.  
  16129. ΓòÉΓòÉΓòÉ 19.1.15. Signals ΓòÉΓòÉΓòÉ
  16130.  
  16131.      The set of signals for the signal function and the parameters and usage 
  16132.       of each signal are described in Signal and OS/2 Exception Handling and in 
  16133.       the C Library Reference under signal. 
  16134.  
  16135.      SIG_DFL is the default signal, and the default action taken is 
  16136.       termination. 
  16137.  
  16138.      If the equivalent of signal(sig, SIG_DFL); is not executed at the 
  16139.       beginning of signal handler, no signal blocking is performed. 
  16140.  
  16141.      Whenever you leave a signal handler, it is reset to SIG_DFL. 
  16142.  
  16143.  
  16144. ΓòÉΓòÉΓòÉ 19.1.16. Translation Limits ΓòÉΓòÉΓòÉ
  16145.  
  16146. The VisualAge C++ compiler can translate and compile programs with the 
  16147. following limits: 
  16148.  
  16149. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  16150. Γöé Table 12. Translation Limits                         Γöé
  16151. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16152. Γöé Nesting levels of:                 Γöé             Γöé
  16153. Γöé                           Γöé             Γöé
  16154. Γöé o  Compound statements               Γöé o  No limit       Γöé
  16155. Γöé o  Iteration control                Γöé o  No limit       Γöé
  16156. Γöé o  Selection control                Γöé o  No limit       Γöé
  16157. Γöé o  Conditional inclusion              Γöé o  No limit       Γöé
  16158. Γöé o  Parenthesized declarators            Γöé o  No limit       Γöé
  16159. Γöé o  Parenthesized expression            Γöé o  No limit       Γöé
  16160. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16161. Γöé Number of pointer, array and function declarators  Γöé o  No limit       Γöé
  16162. Γöé modifying an arithmetic, a structure, a union, and Γöé             Γöé
  16163. Γöé incomplete type declaration             Γöé             Γöé
  16164. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16165. Γöé Significant initial characters in:         Γöé             Γöé
  16166. Γöé                           Γöé             Γöé
  16167. Γöé o  Internal identifiers              Γöé o  255         Γöé
  16168. Γöé o  Macro names                   Γöé o  No limit       Γöé
  16169. Γöé o  External identifiers              Γöé o  255         Γöé
  16170. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  16171. Γöé Number of:                     Γöé             Γöé
  16172. Γöé                           Γöé             Γöé
  16173. Γöé o  External identifiers in a translation unit   Γöé o  1024         Γöé
  16174. Γöé o  Identifiers with block scope in one block    Γöé o  No limit       Γöé
  16175. Γöé o  Macro identifiers simultaneously declared in a Γöé o  No limit       Γöé
  16176. Γöé   translation unit                Γöé o  255         Γöé
  16177. Γöé o  Parameters in one function definition      Γöé o  255         Γöé
  16178. Γöé o  Arguments in a function call          Γöé o  No limit       Γöé
  16179. Γöé o  Parameters in a macro definition        Γöé o  No limit       Γöé
  16180. Γöé o  Parameters in a macro invocation        Γöé o  No limit       Γöé
  16181. Γöé o  Characters in a logical source line       Γöé o  No limit       Γöé
  16182. Γöé o  Characters in a string literal         Γöé o  "LONG_MAX"      Γöé
  16183. Γöé o  Size of an object (in bytes)          Γöé o  127(C),255(C++)   Γöé
  16184. Γöé o  Nested #include files              Γöé o  No limit       Γöé
  16185. Γöé o  Levels in nested structure or union       Γöé o  4294967296 distinct Γöé
  16186. Γöé o  Enumeration constants in an enumeration     Γöé   values        Γöé
  16187. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  16188.  
  16189.  
  16190. ΓòÉΓòÉΓòÉ 19.1.17. Streams and Files ΓòÉΓòÉΓòÉ
  16191.  
  16192.      The last line of a text stream does not require a terminating new-line 
  16193.       character. 
  16194.  
  16195.      Space characters that are written out to a text stream immediately before 
  16196.       a new-line character appear when read. 
  16197.  
  16198.      If Ctrl-Z is found and all remaining source characters to end-of-file are 
  16199.       whitespace, Ctrl-Z is silently ignored.  Subsequent Cntrl-Z's are 
  16200.       considered to be whitespace in this case. 
  16201.  
  16202.       If Ctrl-Z is found ina string or Lstring, it is taken to be part of the 
  16203.       string. 
  16204.  
  16205.       Any other Ctrl-Z is an illegal charater.  An error message is printed and 
  16206.       the character is ignored. 
  16207.  
  16208.      There is no limit to the number of null characters that can be appended 
  16209.       to the end of a binary stream. 
  16210.  
  16211.      The file position indicator of an append mode stream is positioned at the 
  16212.       end of the file. 
  16213.  
  16214.      When a file is opened in write mode, the file is truncated. If the file 
  16215.       does not exist, it is created. 
  16216.  
  16217.      A file of zero length does exist. 
  16218.  
  16219.      For the rules for composing a valid file name, refer to the documentation 
  16220.       for the OS/2 operating system. 
  16221.  
  16222.      For reading, the same file can be simultaneously opened multiple times; 
  16223.       for writing or appending, the file can be opened only once. 
  16224.  
  16225.      When the remove function is used on an open file, remove fails. 
  16226.  
  16227.      When you use the rename function to rename a file to a name that exists 
  16228.       prior to the function call, rename fails. 
  16229.  
  16230.      Temporary files may not be removed if the program terminates abnormally. 
  16231.  
  16232.      When the tmpnam function is called more than TMP_MAX times, tmpnam fails 
  16233.       and returns NULL, and sets errno to ENOGEN. 
  16234.  
  16235.      The output of %p conversion in the fprintf function is equivalent to %x. 
  16236.  
  16237.      The input of %p conversion in the fscanf function is the same as is 
  16238.       expected for %x. 
  16239.  
  16240.      A '-' character that is neither the first not the last character in the 
  16241.       fscanf scan list (%[characters]) is considered to be part of the scan 
  16242.       list. 
  16243.  
  16244.      The possible values of errno on failure of fgetpos are EERRSET, ENOSEEK, 
  16245.       and EBADPOS. 
  16246.  
  16247.      The possible values of errno on failure of ftell are EERRSET, ENOSEEK, 
  16248.       EBADPOS, and ENULLFCB. 
  16249.  
  16250.  
  16251. ΓòÉΓòÉΓòÉ 19.1.18. Memory Management ΓòÉΓòÉΓòÉ
  16252.  
  16253.      If the size requested is 0, the calloc, malloc, and realloc functions all 
  16254.       return a NULL pointer. In the case of realloc, the pointer passed to the 
  16255.       function is also freed. 
  16256.  
  16257.  
  16258. ΓòÉΓòÉΓòÉ 19.1.19. Environment ΓòÉΓòÉΓòÉ
  16259.  
  16260.      You can pass arguments to main through argv, argc, and envp. 
  16261.  
  16262.      If a standard stream is redirected to a file, the stream is fully 
  16263.       buffered, with the exception of stderr, which is line buffered.  If the 
  16264.       standard stream is attached to a character device, it is line buffered. 
  16265.  
  16266.      When the abort function is called, all open files are closed by the 
  16267.       operating system.  The buffers are not flushed.  Any memory files 
  16268.       belonging to the process are discarded. 
  16269.  
  16270.      When the abort function is called, the return code of 3 is returned to 
  16271.       the host environment. 
  16272.  
  16273.      When a program ends successfully and calls the exit function with the 
  16274.       argument 0 or EXIT_SUCCESS, all buffers are flushed, all files are 
  16275.       closed, all storage is released, and the argument is returned. 
  16276.  
  16277.      When a program ends unsuccessfully and calls the exit function with the 
  16278.       argument EXIT_FAILURE, all buffers are flushed, all files are closed, all 
  16279.       storage is released, and the argument is returned. 
  16280.  
  16281.      If the argument passed to the exit function is other than 0, EXIT_FAILURE 
  16282.       or EXIT_SUCCESS, all buffers are flushed, all files are closed, all 
  16283.       storage is released, and the argument is returned. 
  16284.  
  16285.      For the set of environmental names, see Setting Runtime Environment 
  16286.       Variables and the User's Guide. 
  16287.  
  16288.      For the method of altering the environment list obtained by a call to the 
  16289.       getenv function, see the putenv function in the C Library Reference. 
  16290.  
  16291.      For the format and mode of execution of a string on a call to the system 
  16292.       function, see the C Library Reference under system. 
  16293.  
  16294.  
  16295. ΓòÉΓòÉΓòÉ 19.1.20. Localization ΓòÉΓòÉΓòÉ
  16296.  
  16297.      A call to  setlocale(LC_ALL, "") sets the environment to the C default 
  16298.       locale. 
  16299.  
  16300.  
  16301. ΓòÉΓòÉΓòÉ 19.1.21. Time ΓòÉΓòÉΓòÉ
  16302.  
  16303.      The local time zone and daylight saving time zone are EST and EDT. See 
  16304.       Setting Runtime Environment Variables and the tzset function in the C 
  16305.       Library Reference for more information on specifying the time zone. 
  16306.  
  16307.      The era for the clock function starts when the program is started by 
  16308.       either a call from the operating system or a call to system. 
  16309.  
  16310.  
  16311. ΓòÉΓòÉΓòÉ 19.2. C++-Specific Implementation-Defined Behavior ΓòÉΓòÉΓòÉ
  16312.  
  16313. The following sections describe how the VisualAge C++ product defines the 
  16314. behavior classified as implementation-defined in the ANSI C++ Working Paper. 
  16315.  
  16316.  
  16317. ΓòÉΓòÉΓòÉ 19.2.1. Classes, Structures, Unions, Enumerations, Bit Fields ΓòÉΓòÉΓòÉ
  16318.  
  16319.      Class members are allocated in the order declared; access specifiers have 
  16320.       no effect on the order of allocation. 
  16321.  
  16322.      Padding is added to align class members on their natural boundaries and 
  16323.       to end the class on its natural boundary. 
  16324.  
  16325.      An int bit field behaves as an unsigned int for function overloading. 
  16326.  
  16327.  
  16328. ΓòÉΓòÉΓòÉ 19.2.2. Linkage Specifications ΓòÉΓòÉΓòÉ
  16329.  
  16330.      The valid values for the string literal in a linkage specification are: 
  16331.  
  16332.       "C++"          Default 
  16333.  
  16334.       "C"            C language linkage 
  16335.  
  16336.  
  16337. ΓòÉΓòÉΓòÉ 19.2.3. Member Access Control ΓòÉΓòÉΓòÉ
  16338.  
  16339.      Class members are allocated in the order declared; access specifiers have 
  16340.       no effect on the order of allocation. 
  16341.  
  16342.  
  16343. ΓòÉΓòÉΓòÉ 19.2.4. Special Member Functions ΓòÉΓòÉΓòÉ
  16344.  
  16345.      Temporary objects are generated under the following circumstances: 
  16346.  
  16347.         -  During reference initialization 
  16348.         -  During evaluation of expressions 
  16349.         -  In type conversions 
  16350.         -  Argument passing 
  16351.         -  Function returns 
  16352.         -  In throw expressions. 
  16353.  
  16354.      Temporary objects exist until there is a break in the flow of control of 
  16355.       the program. They are destroyed on exiting the scope in which the 
  16356.       temporary object was created. 
  16357.  
  16358.  
  16359. ΓòÉΓòÉΓòÉ 19.3. Migrating Headers from 16-bit C to 32-bit C/C++. ΓòÉΓòÉΓòÉ
  16360.  
  16361. The following section describes the changes you need to make to existing 16-bit 
  16362. C headers for them to work with both 32-bit C and C++ code. 
  16363.  
  16364.  
  16365. ΓòÉΓòÉΓòÉ 19.3.1. Keywords ΓòÉΓòÉΓòÉ
  16366.  
  16367.      When migrating headers, rename any C++ keywords appearing in your C code. 
  16368.  
  16369.       Keywords are identifiers reserved by a programming language for special 
  16370.       use.  In C and C++, keywords are case sensitive.  That means asm may be a 
  16371.       reserved word but ASM need not be. In addition to language specific 
  16372.       keywords, VisualAge C++ also has reserved keywords. 
  16373.  
  16374.       For further information on C, C++ and VisualAge C++ keywords, see the 
  16375.       Language Reference. 
  16376.  
  16377.  
  16378. ΓòÉΓòÉΓòÉ 19.3.2. Structures ΓòÉΓòÉΓòÉ
  16379.  
  16380.      Add #pragma pack statements around declarations of structures that will 
  16381.       be passed to or from 16-bit code. Do not use the _Packed keyword because 
  16382.       it is not supported by C++. 
  16383.  
  16384.      Declare integers in the structures as short or long, not int, so that the 
  16385.       structures have the same size and layout in both 16-bit and 32-bit code. 
  16386.  
  16387.      Create typedefs for your structures, and use #pragma seg16 on those 
  16388.       typedefs to specify that those structures should not cross a 64K boundary 
  16389.       when laid out in memory. 
  16390.  
  16391.      Any structure members that are pointers must be qualified with the _Seg16 
  16392.       type qualifier. For example, far * would be translated to * _Seg16. This 
  16393.       may even need to be done recursively if the 16-bit code will be 
  16394.       manipulating the object pointed at. 
  16395.  
  16396.  
  16397. ΓòÉΓòÉΓòÉ 19.3.3. Function Prototypes ΓòÉΓòÉΓòÉ
  16398.  
  16399.      Prototype your functions using the linkage convention keywords. Do not 
  16400.       use #pragma linkage because it is not supported in C++. 
  16401.  
  16402.      A function pointer that is passed as an argument to a function. When you 
  16403.       use a function pointer as an argument to a second function, specify the 
  16404.       linkage of the function pointed at in the second function's prototype. 
  16405.       This avoids errors when the /Mp or /Ms compiler options are used to set 
  16406.       the default linkage. 
  16407.  
  16408.      If you pass a pointer to a 16-bit function as a member of an aggregate, 
  16409.       array, or class, you must qualify the pointer with _Seg16. The _Seg16 
  16410.       keyword is also required if you use two or more levels of indirection 
  16411.       (for example, a pointer to a pointer). If you pass the pointer directly 
  16412.       as a parameter, the compiler automatically converts it to a 16-bit 
  16413.       pointer and the _Seg16 keyword is not required. 
  16414.  
  16415.  
  16416. ΓòÉΓòÉΓòÉ 19.3.4. Required Conditional Compilation Directives ΓòÉΓòÉΓòÉ
  16417.  
  16418. The following directives must be added to the beginning of each header file: 
  16419.  
  16420.    #if __cplusplus
  16421.    extern "C" {
  16422.    #endif
  16423.  
  16424. The following directives must be added to the end of each header file: 
  16425.  
  16426.    #if __cplusplus
  16427.    }
  16428.    #endif
  16429.  
  16430.  
  16431. ΓòÉΓòÉΓòÉ 19.4. Migrating Headers from 32-bit C Set/2 V1.0 to 32-bit C++ ΓòÉΓòÉΓòÉ
  16432.  
  16433. You need to make the following changes to your existing header files for them 
  16434. to work with both C and C++ code: 
  16435.  
  16436.      Rename any C- or C++-specific keywords. A listing of these can be found 
  16437.       in the Language Reference. 
  16438.  
  16439.      Remove any use of the _Packed keyword and replace it with the appropriate 
  16440.       use of #pragma pack. C++ does not support _Packed. 
  16441.  
  16442.      Remove any use of #pragma linkage and add the appropriate linkage 
  16443.       convention keyword must be added to the prototype. C++ does not support 
  16444.       #pragma linkage directives. 
  16445.  
  16446.      Add to the beginning of each header file: 
  16447.  
  16448.                #if __cplusplus
  16449.                extern "C" {
  16450.                #endif
  16451.  
  16452.      Add to the end of each header file: 
  16453.  
  16454.                #if __cplusplus
  16455.                }
  16456.                #endif
  16457.  
  16458.  
  16459. ΓòÉΓòÉΓòÉ 19.5. Creating New Headers to Work with Both C and C++ (32-bit) ΓòÉΓòÉΓòÉ
  16460.  
  16461. Follow these guidelines to enable your new header files to work with both C and 
  16462. C++ code: 
  16463.  
  16464.      Rename any C- or C++-specific keywords. A listing of these can be found 
  16465.       in the Language Reference. 
  16466.  
  16467.      Add to the beginning of each header file: 
  16468.  
  16469.                #if __cplusplus
  16470.                extern "C" {
  16471.                #endif
  16472.  
  16473.      Add to the end of each header file: 
  16474.  
  16475.                #if __cplusplus
  16476.                }
  16477.                #endif
  16478.  
  16479.      Do not use _Packed in your code; use #pragma pack instead. 
  16480.  
  16481.      Do not use #pragma linkage in your code; use the linkage convention 
  16482.       keywords instead. 
  16483.  
  16484.      Use typedefs for structures to be passed to 16-bit code and specify the 
  16485.       typedef in a #pragma seg16 directive. 
  16486.  
  16487.      Specify the linkage on any identifiers that are pointers to functions. 
  16488.  
  16489.      Use the _Seg16 type qualifier to declare external pointers that will be 
  16490.       shared between 32-bit and 16-bit code (and are declared in both). The 
  16491.       _Seg16 qualifier directs the compiler to store the pointer as a segmented 
  16492.       pointer (with a 16-bit selector and 16-bit offset) that can be used 
  16493.       directly by a 16-bit application. You can also use the pointer in a 
  16494.       32-bit program; VisualAge C++ compiler automatically converts it to a 
  16495.       flat 32-bit pointer when necessary. 
  16496.  
  16497.  
  16498. ΓòÉΓòÉΓòÉ 20. VisualAge C++ Macros and Functions ΓòÉΓòÉΓòÉ
  16499.  
  16500. This appendix lists the predefined macros reserved for use by the VisualAge C++ 
  16501. product. It also includes a list of the intrinsic and built-in functions. For a 
  16502. complete list of all functions in the VisualAge C++ runtime libraries, see the 
  16503. C Library Reference. 
  16504.  
  16505.  
  16506. ΓòÉΓòÉΓòÉ 20.1. Additional VisualAge C++ Predefined Macros ΓòÉΓòÉΓòÉ
  16507.  
  16508. The macros identified in this section are provided to allow customers to write 
  16509. programs that use VisualAge C++ services. Only those macros identified in this 
  16510. section should be used to request or receive VisualAge C++ services. 
  16511.  
  16512. The additional macros offered by the VisualAge C++ compiler are: 
  16513.  
  16514.  _CHAR_UNSIGNED 
  16515.      Indicates default character type is unsigned. Defined when the #pragma 
  16516.      chars(unsigned) directive is in effect, or when the /J+ compiler option is 
  16517.      set. 
  16518.  
  16519.  _CHAR_SIGNED 
  16520.      Indicates default character type is signed. Defined when the #pragma 
  16521.      chars(signed) directive is in effect, or when the /J- compiler option is 
  16522.      set. 
  16523.  
  16524.  __COMPAT__ 
  16525.      Indicates language constructs compatible with earlier versions of the C++ 
  16526.      language are allowed. Defined using the #pragma langlvl(compat) directive 
  16527.      or /Sc compiler option. This macro is defined for C++ programs only. 
  16528.  
  16529.  __cplusplus 
  16530.      Set to the integer 1.  Indicates the product is a C++ compiler. This macro 
  16531.      is defined for C++ programs only. 
  16532.  
  16533.  __DBCS__ 
  16534.      Indicates DBCS support is enabled. Defined using the /Sn compiler option. 
  16535.  
  16536.  __DDNAMES__ 
  16537.      Indicates ddnames are supported. Defined using the /Sh compiler option. 
  16538.  
  16539.  __DEBUG_ALLOC__ 
  16540.      Maps memory management functions to their debug versions. Defined using 
  16541.      the /Tmcompiler option. 
  16542.  
  16543.  __DLL__ 
  16544.      Indicates code for a DLL is being compiled. Defined using the /Ge- 
  16545.      compiler option. 
  16546.  
  16547.  _FP_INLINE_ 
  16548.      Inlines the trigonometric functions (cos, sin, and so on). 
  16549.  
  16550.  __FUNCTION__ 
  16551.      Indicates the name of the function currently being compiled. For C++ 
  16552.      programs, expands to the actual function prototype. 
  16553.  
  16554.  __HHW_INTEL__ 
  16555.      Indicates that the host hardware is an Intel** processor. 
  16556.  
  16557.  __HOS_OS2__ 
  16558.      Indicates that the host operating system is OS/2. 
  16559.  
  16560.  __IBMC__ 
  16561.      Indicates the version number of the VisualAge C compiler. 
  16562.  
  16563.  __IBMCPP__ 
  16564.      Indicates the version number of the VisualAge C++ compiler. 
  16565.  
  16566.  __IMPORTLIB__ 
  16567.      Indicates that dynamic linking is used. Defined using the /Gd option. 
  16568.  
  16569.  _M_I386 
  16570.      Indicates code is being compiled for a 386 chip or higher. 
  16571.  
  16572.  __MULTI__ 
  16573.      Indicates multithread code is being generated. Defined using the /Gm 
  16574.      compiler option. 
  16575.  
  16576.  __NO_DEFAULT_LIBS__ 
  16577.      Indicates that information about default libraries will not be included in 
  16578.      object files. Defined using the /Gd option. 
  16579.  
  16580.  __OS2__ 
  16581.      Set to the integer 1.  Indicates the product is an OS/2 compiler. 
  16582.  
  16583.  __SOM_ENABLED__ 
  16584.      Indicates that native SOM is supported. 
  16585.  
  16586.  __SPC__ 
  16587.      Indicates the subsystem libraries are being used. Defined using the /Rn 
  16588.      compiler option. 
  16589.  
  16590.  __TEMPINC__ 
  16591.      Indicates the template-implementation file method of resolving template 
  16592.      functions is being used.  Defined using the /Ft compiler option. 
  16593.  
  16594.  __THW_INTEL__ 
  16595.      Indicates that the target hardware is an Intel processor. 
  16596.  
  16597.  __TOS_OS2__ 
  16598.      Indicates that the target operating system is OS/2. 
  16599.  
  16600.  __TILED__ 
  16601.      Indicates tiled memory is being used. Defined using the /Gt compiler 
  16602.      option. 
  16603.  
  16604.  __32BIT__ 
  16605.      Set to the integer 1.  Indicates the product is a 32-bit compiler. 
  16606.  
  16607.  The value of the __IBMC__ and __IBMCPP__ macros is 300. One of these two 
  16608.  macros is always defined: when you compile C++ code, __IBMCPP__ is defined; 
  16609.  when you compile C code, __IBMC__ is defined. The macros __OS2__, _M_I386, and 
  16610.  __32BIT__ are always defined also. The remaining macros, with the exception of 
  16611.  __FUNCTION__, are defined when the corresponding #pragma directive or compiler 
  16612.  option is used. 
  16613.  
  16614.  Related Information 
  16615.  
  16616.      #pragma chars. 
  16617.      #pragma langlvl 
  16618.      Code Generation Options in the User's Guide 
  16619.      Source Code Options in the User's Guide 
  16620.      Other Options in the User's Guide 
  16621.  
  16622.  
  16623. ΓòÉΓòÉΓòÉ 20.2. Intrinsic Functions ΓòÉΓòÉΓòÉ
  16624.  
  16625. The VisualAge C++ compiler inlines some functions instead of generating a 
  16626. function call for them. Some of these functions are always inlined; others are 
  16627. inlined only when you compile with the optimization option (/O or /Oc) on. 
  16628.  
  16629.      Functions that Are Inlined when Optimization Is On 
  16630.      Functions that Are Always Inlined 
  16631.  
  16632.  
  16633. ΓòÉΓòÉΓòÉ 20.2.1. Functions that Are Inlined when Optimization Is On ΓòÉΓòÉΓòÉ
  16634.  
  16635. When optimization is on (/O+), VisualAge C++ compiler by default inlines 
  16636. (generates code instead of a function call) the following C library functions: 
  16637.  
  16638.  abs                 _clear87 
  16639.  _control87          fabs 
  16640.  labs                memchr 
  16641.  memcmp              memcpy 
  16642.  memmove             memset 
  16643.  _status87           strcat 
  16644.  strchr              strcmp 
  16645.  strcpy              strlen 
  16646.  strncat             strncmp 
  16647.  strncpy             strrchr 
  16648.  
  16649.  The compiler inlines these functions when you include the appropriate header 
  16650.  file that contains the function prototype and the #define and #pragma 
  16651.  statements for the function. 
  16652.  
  16653.  You can override the inlining either by undefining the macro or by placing the 
  16654.  name of the function in parentheses, thus disabling the processor 
  16655.  substitution. The function then remains a function call, and is not replaced 
  16656.  by the code. The size of your object module is reduced, but your application 
  16657.  program runs more slowly. 
  16658.  
  16659.  Note:  The optimize-for-size compiler option (/Oc) also disables the inlining 
  16660.  of intrinsic functions. 
  16661.  
  16662.  
  16663. ΓòÉΓòÉΓòÉ 20.2.2. Functions that Are Always Inlined ΓòÉΓòÉΓòÉ
  16664.  
  16665. The following functions are built-in functions, meaning they do not have any 
  16666. backing library functions, and are always inlined: 
  16667.  
  16668.  _alloca             _crotl 
  16669.  _crotr              __cxchg 
  16670.  _disable            _enable 
  16671.  _facos              _fasin 
  16672.  _fcos               _fcossin 
  16673.  _fpatan             _fptan 
  16674.  _fsin               _fsincos 
  16675.  _fsqrt              _fyl2x 
  16676.  _fyl2xp1            _f2xm1 
  16677.  _getTIBvalue        _inp 
  16678.  _inpd               _inpw 
  16679.  _interrupt          _lrotl 
  16680.  _lrotr              __lxchg 
  16681.  _outp               _outpd 
  16682.  _outpw              __parmdwords 
  16683.  _rotl               _rotr 
  16684.  _srotl              _srotr 
  16685.  __sxchg 
  16686.  
  16687.  Do not parenthesize the names of these functions. 
  16688.  
  16689.  The built-in functions are all defined in <builtin.h>, in addition to the 
  16690.  standard header definitions. 
  16691.  
  16692.  
  16693. ΓòÉΓòÉΓòÉ <hidden> Related Information ΓòÉΓòÉΓòÉ
  16694.  
  16695.      Functions that Are Inlined when Optimization Is On 
  16696.      Functions that Are Always Inlined 
  16697.      #include in the Language Reference 
  16698.      #define in the Language Reference 
  16699.      #pragma in the Language Reference 
  16700.      /O option in the User's Guide 
  16701.      <builtin.h> 
  16702.  
  16703.  
  16704. ΓòÉΓòÉΓòÉ 21. Locale Categories ΓòÉΓòÉΓòÉ
  16705.  
  16706. This appendix provides a listing of the categories which define a locale, the 
  16707. keywords used in each category, and the values which are valid for each 
  16708. keyword. 
  16709.  
  16710.  The following locate categories are described: 
  16711.  
  16712.      LC_CTYPE Category 
  16713.      LC_COLLATE Category 
  16714.      LC_MONETARY Category 
  16715.      LC_NUMERIC Category 
  16716.      LC_TIME Category 
  16717.      LC_MESSAGES Category 
  16718.      LC_TOD Category 
  16719.      LC_SYNTAX Category 
  16720.  
  16721.  
  16722. ΓòÉΓòÉΓòÉ 21.1. LC_CTYPE Category ΓòÉΓòÉΓòÉ
  16723.  
  16724. This category defines character classification, case conversion, and other 
  16725. character attributes. In this category, you can represent a series of 
  16726. characters by using three adjacent periods as an ellipsis symbol (...). An 
  16727. ellipsis is interpreted as including all characters with an encoded value 
  16728. higher than the encoded value of the character preceding the ellipsis and lower 
  16729. than the encoded value following the ellipsis. 
  16730.  
  16731. An ellipsis is valid within a single encoded character set. 
  16732.  
  16733. For example, \x30;...;\x39; includes in the character class all characters with 
  16734. encoded values from \x30 to \x39. 
  16735.  
  16736. The keywords recognized in the LC_CTYPE category are listed below. In the 
  16737. descriptions, the term "automatically included" means that it is not an error 
  16738. either to include or omit any of the referenced characters; they are assumed by 
  16739. default even if the entire keyword is missing and accepted if present. 
  16740.  
  16741. When a character is automatically included, it has an encoded value dependent 
  16742. on the charmap file in effect. If no charmap file is specified, the encoding of 
  16743. the encoded character set IBM-850 is assumed. 
  16744.  
  16745.  copy    Specifies the name of an existing locale to be used as the source for 
  16746.          the definition of this category. If this keyword is specified, no 
  16747.          other keywords are present in this category. If the locale is not 
  16748.          found, an error is reported and no locale output is created. The copy 
  16749.          keyword cannot specify a locale that also specifies the copy keyword 
  16750.          for the same category. 
  16751.  
  16752.  upper   Defines characters to be classified as uppercase letters. No character 
  16753.          defined for the keywords cntrl, digit, punct, or space can be 
  16754.          specified. The uppercase letters A through Z are automatically 
  16755.          included in this class. 
  16756.  
  16757.          The isupper and iswupper functions test for any character and wide 
  16758.          character, respectively, included in this class. 
  16759.  
  16760.  lower   Defines characters to be classified as lowercase letters. No character 
  16761.          defined for the keywords cntrl, digit, punct, or space can be 
  16762.          specified. The lowercase letters a through z are automatically 
  16763.          included in this class. 
  16764.  
  16765.          The islower and iswlower functions test for any character and wide 
  16766.          character, respectively, included in this class. 
  16767.  
  16768.  alpha   Defines characters to be classified as letters. No character defined 
  16769.          for the keywords cntrl, digit, punct, or space can be specified. 
  16770.          Characters classified as either upper or lower are automatically 
  16771.          included in this class. 
  16772.  
  16773.          The isalpha and iswalpha functions test for any character or wide 
  16774.          character, respectively, included in this class. 
  16775.  
  16776.  digit   Defines characters to be classified as numeric digits. Only the digits 
  16777.          0, 1, 2, 3, 4, 5, 6, 7, 8, 9. can be specified.  If they are, they 
  16778.          must be in contiguous ascending sequence by numerical value. The 
  16779.          digits 0 through 9 are automatically included in this class. 
  16780.  
  16781.          The isdigit and iswdigit functions test for any character or wide 
  16782.          character, respectively, included in this class. 
  16783.  
  16784.  space   Defines characters to be classified as whitespace characters. No 
  16785.          character defined for the keywords upper, lower, alpha, digit, or 
  16786.          xdigit can be specified for space. The characters <space>, 
  16787.          <form-feed>, <newline>, <carriage-return>, <horizontal-tab>, and 
  16788.          <vertical-tab>, and any characters defined in the class blank are 
  16789.          automatically included in this class. 
  16790.  
  16791.          The functions isspace and iswspace test for any character or wide 
  16792.          character, respectively, included in this class. 
  16793.  
  16794.  cntrl   Defines characters to be classified as control characters. No 
  16795.          character defined for the keywords upper, lower, alpha, digit, punct, 
  16796.          graph, print, or xdigit can be specified for cntrl. 
  16797.  
  16798.          The functions iscntrl and iswcntrl test for any character or wide 
  16799.          character, respectively, included in this class. 
  16800.  
  16801.  punct   Defines characters to be classified as punctuation characters. No 
  16802.          character defined for the keywords upper, lower, alpha, digit, cntrl, 
  16803.          or xdigit, or as the <space> character, can be specified. 
  16804.  
  16805.          The functions ispunct and iswpunct test for any character or wide 
  16806.          character, respectively, included in this class. 
  16807.  
  16808.  graph   Defines characters to be classified as printing characters, not 
  16809.          including the <space> character. Characters specified for the keywords 
  16810.          upper, lower, alpha, digit, xdigit, and punct are automatically 
  16811.          included. No character specified in the keyword cntrl can be specified 
  16812.          for graph. 
  16813.  
  16814.          The functions isgraph and iswgraph test for any character or wide 
  16815.          character, respectively, included in this class. 
  16816.  
  16817.  print   Defines characters to be classified as printing characters, including 
  16818.          the <space> character. Characters specified for the keywords upper, 
  16819.          lower, alpha, digit, xdigit, punct, and the <space> character are 
  16820.          automatically included. No character specified in the keyword cntrl 
  16821.          can be specified for print. 
  16822.  
  16823.          The functions isprint and iswprint test for any character or wide 
  16824.          character, respectively, included in this class. 
  16825.  
  16826.  xdigit  Defines characters to be classified as hexadecimal digits. Only the 
  16827.          characters defined for the class digit can be specified, in contiguous 
  16828.          ascending sequence by numerical value, followed by one or more sets of 
  16829.          six characters representing the hexadecimal digits 10 through 15, with 
  16830.          each set in ascending order (for example, A, B, C, D, E, F, a, b, c, 
  16831.          d, e, f). The digits 0 through 9, the uppercase letters A through F, 
  16832.          and the lowercase letters a through f are automatically included in 
  16833.          this class. 
  16834.  
  16835.          The functions isxdigit and iswxdigit test for any character or wide 
  16836.          character, respectively, included in this class. 
  16837.  
  16838.  blank   Defines characters to be classified as blank characters. The 
  16839.          characters <space> and <tab> are automatically included in this class. 
  16840.  
  16841.          The functions isblank and iswblank test for any character or wide 
  16842.          character, respectively, included in this class. 
  16843.  
  16844.  toupper Defines the mapping of lowercase letters to uppercase letters. The 
  16845.          operand consists of character pairs, separated by semicolons. The 
  16846.          characters in each character pair are separated by a comma; the pair 
  16847.          is enclosed in parentheses. The first character in each pair is the 
  16848.          lowercase letter, and the second is the corresponding uppercase 
  16849.          letter. Only characters specified for the keywords lower and upper can 
  16850.          be specified for toupper. The lowercase letters a through z, their 
  16851.          corresponding uppercase letters A through Z, are automatically in this 
  16852.          mapping, but only when the toupper keyword is omitted from the locale 
  16853.          definition. 
  16854.  
  16855.          It affects the behavior of the toupper and towupper functions for 
  16856.          mapping characters and wide characters, respectively. 
  16857.  
  16858.  tolower Defines the mapping of uppercase letters to lowercase letters. The 
  16859.          operand consists of character pairs, separated by semicolons. The 
  16860.          characters in each character pair are separated by a comma; the pair 
  16861.          is enclosed by parentheses. The first character in each pair is the 
  16862.          uppercase letter, and the second is its corresponding lowercase 
  16863.          letter. Only characters specified for the keywords lower and upper can 
  16864.          be specified. If the tolower keyword is omitted from the locale 
  16865.          definition, the mapping is the reverse mapping of the one specified 
  16866.          for the toupper. 
  16867.  
  16868.          The tolower keyword affects the behavior of the tolower and towlower 
  16869.          functions for mapping characters and wide characters, respectively. 
  16870.  
  16871.  You may define additional character classes using your own keywords. A maximum 
  16872.  of 32 classes are supported in total: the 12 standard classes, and up to 20 
  16873.  user-defined classes. The 12 standard classes being composed of the 11 
  16874.  standard classes listed above plus the ALNUM class which contains the total 
  16875.  characters in the ALPHA and DIGIT classes. 
  16876.  
  16877.  The defined classes affect the behavior of wctype and iswctype functions. 
  16878.  
  16879.  Here is an example of the definition of the LC_CTYPE category: 
  16880.  
  16881.  
  16882.      #############
  16883.      LC_CTYPE
  16884.      #############
  16885.      # upper letters are A-Z by default plus the three defined below
  16886.      upper   <A-acute>;<A-grave>;<C-acute>
  16887.  
  16888.      # lower case leters are a-z by default plus the three defined below
  16889.      lower   <a-acute>;<a_grave><c-acute>
  16890.  
  16891.      # space characters are default 6 characters plus the one defined below
  16892.      space   <hyphen-minus>
  16893.  
  16894.      cntrl   <alert>;<backspace>;<tab>;<newline>;<vertical-tab>;\
  16895.              <form-feed>;<carriage-return>;<NUL>;\
  16896.              <SO>;<SI>
  16897.  
  16898.      # default graph, print,punct, digit, xdigit, blank classes
  16899.  
  16900.      # toupper mapping defined only for the following three pairs
  16901.      toupper (<a-acute),<A-acute>);\
  16902.              (<a-grave),<A-grave>);\
  16903.              (<c-acute),<C-acute>);
  16904.  
  16905.      # default upper to lower case mapping
  16906.  
  16907.      # user defined class
  16908.      myclass  <e-ogonek>;<E-ogonek>
  16909.  
  16910.      END LC_CTYPE
  16911.  
  16912.  
  16913. ΓòÉΓòÉΓòÉ 21.2. LC_COLLATE Category ΓòÉΓòÉΓòÉ
  16914.  
  16915. A collation sequence definition defines the relative order between collating 
  16916. elements (characters and multicharacter collating elements) in the locale. This 
  16917. order is expressed in terms of collation values.  It assigns each element one 
  16918. or more collation values (also known as collation weights). The collation 
  16919. sequence definition is used by regular expressions, pattern matching, and 
  16920. sorting and collating functions. The following capabilities are provided: 
  16921.  
  16922.    1. Multicharacter collating elements.  Specification of multicharacter 
  16923.       collating elements (sequences of two or more characters to be collated as 
  16924.       an entity). 
  16925.  
  16926.    2. User-defined ordering of collating elements. Each collating element is 
  16927.       assigned a collation value defining its order in the character (or basic) 
  16928.       collation sequence. This ordering is used by regular expressions and 
  16929.       pattern matching, and unless collation weights are explicitly specified, 
  16930.       also as the collation weight to be used in sorting. 
  16931.  
  16932.    3. Multiple weights and equivalence classes. Collating elements can be 
  16933.       assigned 1 to 6 collating weights for use in sorting. The first weight is 
  16934.       referred to as the primary weight. 
  16935.  
  16936.    4. One-to-many mapping.  A single character is mapped into a string of 
  16937.       collating elements. 
  16938.  
  16939.    5. Many-to-Many substitution.  A string of one or more characters are mapped 
  16940.       to another string (or an empty string).  The character or characters are 
  16941.       ignored for collation purposes. 
  16942.  
  16943.    6. Equivalence class definition.  Two or more collating elements have the 
  16944.       same collation value (primary weight). 
  16945.  
  16946.    7. Ordering by weights.  When two strings are compared to determine their 
  16947.       relative order, the two strings are first broken up into a series of 
  16948.       collating elements.  Each successive pair of elements is compared 
  16949.       according to the relative primary weights for the elements. If they are 
  16950.       equal, and more than one weight is assigned, then the pairs of collating 
  16951.       elements are compared again according to the relative subsequent weights, 
  16952.       until either two collating elements are not equal or the weights are 
  16953.       exhausted. 
  16954.  
  16955.  
  16956. ΓòÉΓòÉΓòÉ 21.2.1. Collating Rules ΓòÉΓòÉΓòÉ
  16957.  
  16958. Collation rules consist of an ordered list of collating order statements, 
  16959. ordered from lowest to highest.  The <NULL> character is considered lower than 
  16960. any other character. The ellipsis symbol ("...") is a special collation order 
  16961. statement.  It specifies that a sequence of characters collate according to 
  16962. their encoded character values. It causes all characters with values higher 
  16963. than the value of the <collating identifier> in the preceding line, and lower 
  16964. than the value for the <collating identifier> on the following line, to be 
  16965. placed in the character collation order between the previous and the following 
  16966. collation order statements in ascending order according to their encoded 
  16967. character values. 
  16968.  
  16969. The use of the ellipsis symbol ties the definition to a specific coded 
  16970. character set and may preclude the definition from being portable among 
  16971. implementations. 
  16972.  
  16973. The ellipsis symbol must be on a line by itself, not the first or last line, 
  16974. and the preceding and succeeding lines must not specify a weight. 
  16975.  
  16976. A collating order statement describes how a collating identifier is weighted. 
  16977.  
  16978. Each <collating-identifier> consists of a character, <collating-element>, 
  16979. <collating-symbol>, or the special symbol UNDEFINED. The order in which 
  16980. collating elements are specified determines the character order sequence, such 
  16981. that each collating element is considered lower than the elements following it. 
  16982. The <NULL> character is considered lower than any other character. Weights are 
  16983. expressed as characters, <collating-symbol>s, <collating-element>s, or the 
  16984. special symbol IGNORE. A single character, a <collating-symbol>, or a 
  16985. <collating-element> represents the relative position in the character collating 
  16986. sequence of the character or symbol, rather than the character or characters 
  16987. themselves. Thus rather than assigning absolute values to weights, a particular 
  16988. weight is expressed using the relative "order value" assigned to a collating 
  16989. element based on its order in the character collation sequence. 
  16990.  
  16991. A <collating-element> specifies multicharacter collating elements, and 
  16992. indicates that the character sequence specified by the <collating-element> is 
  16993. to be collated as a unit and in the relative order specified by its place. 
  16994.  
  16995. A <collating-symbol> can define a position in the relative order for use in 
  16996. weights. Do not use a <collating-symbol> to specify a weight. 
  16997.  
  16998. The <collating-symbol> UNDEFINED is interpreted as including all characters not 
  16999. specified explicitly. Such characters are inserted in the character collation 
  17000. order at the point indicated by the symbol, and in ascending order according to 
  17001. their encoded character values. If no UNDEFINED symbol is specified, and the 
  17002. current coded character set contains characters not specified in this clause, 
  17003. the LOCALDEF utility issues a warning and places such characters at the end of 
  17004. the character collation order. 
  17005.  
  17006. The syntax for a collation order statement is: 
  17007.  
  17008. <collating-identifier> <weight1>;<weight2>;...;<weightn>
  17009.  
  17010. Collation of two collating identifiers is done by comparing their relative 
  17011. primary weights.  This process is repeated for successive weight levels until 
  17012. the two identifiers are different, or the weight levels are exhausted. The 
  17013. operands for each collating identifier define the primary, secondary, and 
  17014. subsequent relative weights for the collating identifier. Two or more collating 
  17015. elements can be assigned the same weight. If two collating identifiers have the 
  17016. same primary weight, they belong to the same equivalence class. 
  17017.  
  17018. The special symbol IGNORE as a weight indicates that when strings are compared 
  17019. using the weights at the level where IGNORE is specified, the collating element 
  17020. should be ignored, as if the string did not contain the collating element. In 
  17021. regular expressions and pattern matching, all characters that are IGNOREd in 
  17022. their primary weight form an equivalence class. 
  17023.  
  17024. All characters specified by an ellipsis are assigned unique weights, equal to 
  17025. the relative order of the characters. Characters specified by an explicit or 
  17026. implicit UNDEFINED special symbol are assigned the same primary weight (they 
  17027. belong to the same equivalence class). 
  17028.  
  17029. One-to-many mapping is indicated by specifying two or more concatenated 
  17030. characters or symbolic names. For example, if the character "<ezset>" is given 
  17031. the string "<s><s>" as a weight, comparisons are performed as if all 
  17032. occurrences of the character <ezset> are replaced by <s><s> (assuming <s> has 
  17033. the collating weight <s>). If it is desirable to define <ezset> and <s><s> as 
  17034. an equivalence class, then a collating element must be defined for the string 
  17035. "ss". 
  17036.  
  17037. If no weight is specified, the collating identifier is interpreted as itself. 
  17038.  
  17039. For example, the order statement 
  17040.  
  17041. <a>   <a>
  17042.  
  17043. is equivalent to 
  17044.  
  17045. <a>
  17046.  
  17047.  
  17048. ΓòÉΓòÉΓòÉ 21.2.2. Collating Keywords ΓòÉΓòÉΓòÉ
  17049.  
  17050. The following keywords are recognized in a collation sequence definition. 
  17051.  
  17052.  copy 
  17053.      Specifies the name of an existing locale to be used as the source for the 
  17054.      definition of this category. If this keyword is specified, no other 
  17055.      keyword shall be present in this category. If the locale is not found, an 
  17056.      error is reported and no locale output is created. The copy keyword cannot 
  17057.      specify a locale that also specifies the copy keyword for the same 
  17058.      category. 
  17059.  
  17060.  collating-element 
  17061.      Defines a collating-element symbol representing a multicharacter collating 
  17062.      element. This keyword is optional. 
  17063.  
  17064.      In addition to the collating elements in the character set, the 
  17065.      collating-element keyword can be used to define multicharacter collating 
  17066.      elements. The syntax is: 
  17067.  
  17068.           "collating-element %s from %s\n", <collating-element>, <string>
  17069.  
  17070.      The <collating-element> should be a symbolic name enclosed between angle 
  17071.      brackets (< and >), and should not duplicate any symbolic name in the 
  17072.      current charmap file (if any), or any other symbolic name defined in this 
  17073.      collation definition. The string operand is a string of two or more 
  17074.      characters that collate as an entity. A <collating-element> defined with 
  17075.      this keyword is only recognized within the LC_COLLATE category. 
  17076.  
  17077.      For example: 
  17078.  
  17079.           collating-element <ch> from "<c><h>"
  17080.           collating-element <e-acute> from "<acute><e>"
  17081.           collating-element <ll> from "ll"
  17082.  
  17083.  collating-symbol 
  17084.      Defines a collating symbol for use in collation order statements. 
  17085.  
  17086.      The collating-symbol keyword defines a symbolic name that can be 
  17087.      associated with a relative position in the character order sequence. While 
  17088.      such a symbolic name does not represent any collating element, it can be 
  17089.      used as a weight. This keyword is optional. 
  17090.  
  17091.      This construct can define symbols for use in collation sequence 
  17092.      statements, between the order_start and order_end keywords. 
  17093.  
  17094.      The syntax is: 
  17095.  
  17096.           "collating-symbol %s\n", <collating-symbol>
  17097.  
  17098.      The <collating-symbol> must be a symbolic name, enclosed between angle 
  17099.      brackets (< and >), and should not duplicate any symbolic name in the 
  17100.      current charmap file (if any), or any other symbolic name defined in this 
  17101.      collation definition. A <collating-symbol> defined with this keyword is 
  17102.      only recognized within the LC_COLLATE category. 
  17103.  
  17104.      For example: 
  17105.  
  17106.           collating-symbol <UPPER_CASE>
  17107.           collating-symbol <HIGH>
  17108.  
  17109.  substitute 
  17110.      The substitute keyword defines a substring substitution in a string to be 
  17111.      collated. This keyword is optional. The following operands are supported 
  17112.      with the substitute keyword: 
  17113.  
  17114.           "substitute %s with %s\n", <regular-expr>, <replacement>
  17115.  
  17116.      The first operand is treated as a basic regular expression. The 
  17117.      replacement operand consists of zero or more characters and regular 
  17118.      expression back-references (for example, \1 through \9). The 
  17119.      back-references consist of the backslash followed by a digit from 1 to 9. 
  17120.      If the backslash is followed by two or three digits, it is interpreted as 
  17121.      an octal constant. 
  17122.  
  17123.      When strings are collated according to a collation definition containing 
  17124.      substitute statements, the collation behaves as if occurrences of 
  17125.      substrings matching the basic regular expression are replaced by the 
  17126.      replacement string, before the strings are compared based on the specified 
  17127.      collation sequence. Ranges in the regular expression are interpreted 
  17128.      according to the current character collation sequence and character 
  17129.      classes according to the character classification specified by the 
  17130.      LC_CTYPE environment variable at collation time. If more than one 
  17131.      substitute statement is present in the collation definition, the collation 
  17132.      process behaves as if the substitute statements are applied to the strings 
  17133.      in the order they occur in the source definition. The substitution for the 
  17134.      substitute statements are processed before any substitutions for 
  17135.      one-to-many mappings. The support of the "substitute" keyword is an IBM 
  17136.      VisualAge C++ extension to the POSIX standard. 
  17137.  
  17138.  order_start 
  17139.      Define collating rules. This statement is followed by one or more 
  17140.      collation order statements, assigning character collation values and 
  17141.      collation weights to collating elements. 
  17142.  
  17143.      The order_start keyword must precede collation order entries.  It defines 
  17144.      the number of weights for this collation sequence definition and other 
  17145.      collation rules. 
  17146.  
  17147.      The syntax of the order_start keyword is: 
  17148.  
  17149.           order_start <sort-rule1>;<sort-rule1>;...;<sort-rulen>
  17150.  
  17151.      The operands of the order_start keyword are optional. If present, the 
  17152.      operands define rules to be applied when strings are compared. The number 
  17153.      of operands define how many weights each element is assigned; if no 
  17154.      operands are present, one forward operand is assumed. If any is present, 
  17155.      the first operand defines rules to be applied when comparing strings using 
  17156.      the first (primary) weight; the second when comparing strings using the 
  17157.      second weight, and so on. Operands are separated by semicolons (;). Each 
  17158.      operand consists of one or more collation directives separated by commas 
  17159.      (,). If the number of operands exceeds the limit of 6, the LOCALDEF 
  17160.      utility issues a warning message. 
  17161.  
  17162.      The following directives are supported: 
  17163.  
  17164.      forward 
  17165.               specifies that comparison operations for the weight level proceed 
  17166.               from the start of the string towards its end. 
  17167.  
  17168.      backward 
  17169.               specifies that comparison operations for the weight level proceed 
  17170.               from the end of the string toward its beginning. 
  17171.  
  17172.      no-substitute 
  17173.               no substitution is performed, such that the comparison is based 
  17174.               on collation values for collating elements before any 
  17175.               substitution operations are performed. 
  17176.  
  17177.               Note: 
  17178.  
  17179.                 1. This is an IBM VisualAge C++ extension to the POSIX 
  17180.                    standard. 
  17181.  
  17182.                 2. When the no-substitute keyword is specified, one-to-many 
  17183.                    mappings are ignored. 
  17184.  
  17185.      position 
  17186.               specifies that comparison operations for the weight level must 
  17187.               consider the relative position of non-IGNOREd elements in the 
  17188.               strings. The string containing a non-IGNOREd element after the 
  17189.               fewest IGNOREd collating elements from the start of the 
  17190.               comparison collates first. If both strings contain a non-IGNOREd 
  17191.               character in the same relative position, the collating values 
  17192.               assigned to the elements determine the order. If the strings are 
  17193.               equal, subsequent non-IGNOREd characters are considered in the 
  17194.               same manner. 
  17195.  
  17196.  order_end 
  17197.      The collating order entries are terminated with an order_end keyword. 
  17198.  
  17199.  Here is an example of an LC_COLLATE category: 
  17200.  
  17201.               LC_COLLATE
  17202.               # ARTIFICIAL COLLATE CATEGORY
  17203.  
  17204.               # collating elements
  17205.    1        collating-element   <ch>  from "<c><h>"
  17206.               collating-element   <Ch>  from "<C><h>"
  17207.               collating-element   <eszet> from "<s><z>"
  17208.  
  17209.               %collating symbols for relative order definition
  17210.  
  17211.               collating-symbol    <LOW>
  17212.    2        collating-symbol    <UPPER-CASE>
  17213.               collating-symbol    <LOWER-CASE>
  17214.               collating-symbol    <NONE>
  17215.  
  17216.  
  17217.    3        order_start forward;backward;forward
  17218.               <NONE>
  17219.    4        <LOW>
  17220.               <UPPER-CASE>
  17221.               <LOWER-CASE>
  17222.  
  17223.    5        UNDEFINED IGNORE;IGNORE;IGNORE
  17224.  
  17225.               <space>
  17226.    6        ...
  17227.               <quotation-mark>
  17228.    7        <a>           <a>;<NONE>;<LOWER-CASE>
  17229.   10        <a-acute>     <a>;<a-acute>;<LOWER-CASE>
  17230.   11        <a-grave>     <a>;<a-grave>;<LOWER-CASE>
  17231.    8        <A>           <a>;<NONE>;<UPPER-CASE>
  17232.   11        <A-acute>     <a>;<a-acute>;<UPPER-CASE>
  17233.   11        <A-grave>     <a>;<a-grave>;<UPPER-CASE>
  17234.   11        <ch>          <ch>;<NONE>;<LOWER-CASE>
  17235.   11        <Ch>          <ch>;<NONE>;<UPPER-CASE>
  17236.    9        <s>           <s>;<s>;<LOWER-CASE>
  17237.   12        <eszet>       "<s><s>";"<eszet><s>";<LOWER-CASE>
  17238.    9        <z>           <z>;<NONE>;<LOWER-CASE>
  17239.               order_end
  17240.  
  17241.  The example is interpreted as follows: 
  17242.  
  17243.  1 collating elements 
  17244.  
  17245.      character <c> followed by <h> collate as one entity named <ch> 
  17246.  
  17247.      character <C> followed by <h> collate as one entity named <Ch> 
  17248.  
  17249.      character <s> followed by <z> collate as one entity named <eszet> 
  17250.  
  17251.  2 collating symbols <LOW>, <UPPER-CASE>, <LOWER-CASE> and <NONE> are defined 
  17252.  to be used in relative order definition 
  17253.  
  17254.  3 up to 3 string comparisons are defined: 
  17255.  
  17256.      first pass starts from the beginning of the strings 
  17257.  
  17258.      second pass starts from the end of the strings, and 
  17259.  
  17260.      third pass starts from the beginning of the strings 
  17261.  
  17262.  4 the collating weights are defined such that 
  17263.  
  17264.      <LOW> collates before <UPPER-CASE>, 
  17265.  
  17266.      <UPPER-CASE> collates before <LOWER-CASE>, 
  17267.  
  17268.      <LOWER-CASE> collates before <NONE>; 
  17269.  
  17270.  5 all characters for which collation is not specified here are ordered after 
  17271.  <NONE>, and before <space> in ascending order according to their encoded 
  17272.  values 
  17273.  
  17274.  6 all characters with an encoded value larger than the encoded value of 
  17275.  <space> and lower than the encoded value of <quotation-mark> in the current 
  17276.  encoded character set, collate in ascending order according to their values; 
  17277.  
  17278.  7 <a> has a: 
  17279.  
  17280.      primary weight of <a>, 
  17281.  
  17282.      secondary weight <NONE>, 
  17283.  
  17284.      tertiary weight of <LOWER-CASE>, 
  17285.  
  17286.  8 <A> has a: 
  17287.  
  17288.      primary weight of <a>, 
  17289.  
  17290.      secondary weight of <NONE>, 
  17291.  
  17292.      tertiary weight of <UPPER-CASE>, 
  17293.  
  17294.  9 the weights of <s> and <z> are determined in a similar fashion to <a> and 
  17295.  <A>. 
  17296.  
  17297.  10 <a-acute> has a: 
  17298.  
  17299.      primary weight of <a>, 
  17300.  
  17301.      secondary weight of <a-acute> itself, 
  17302.  
  17303.      tertiary weight of <LOWER-CASE>, 
  17304.  
  17305.  11 the weights of <a-grave>, <A-acute>, <A-grave>, <ch> and <Ch> are 
  17306.  determined in a similar fashion to <a-acute>. 
  17307.  
  17308.  12 <eszet>  has a: 
  17309.  
  17310.      primary weight determined by replacing each occurence of <eszet> with the 
  17311.       sequence of two <s>'s and using the weight of <s>, 
  17312.  
  17313.      secondary weight determined by replacing each occurence of <eszet> with 
  17314.       the sequence of <eszet> and <s> and using their weights, 
  17315.  
  17316.      tertiary weight is the relative position of <LOWER-CASE>. 
  17317.  
  17318.  
  17319. ΓòÉΓòÉΓòÉ 21.2.3. Comparison of Strings ΓòÉΓòÉΓòÉ
  17320.  
  17321. Compare the strings s1="aAch" and s2="AaCh" using the above LC_COLLATE 
  17322. definition: 
  17323.  
  17324.    1. s1=> "aA<ch>", and s2=> "Aa<Ch>" 
  17325.  
  17326.    2. first pass: 
  17327.  
  17328.         a. substitute the elements of the strings with their primary weights: 
  17329.  
  17330.            s1=> "<a><a><ch>", s2=> "<a><a><ch>" 
  17331.  
  17332.         b. compare the two strings starting with the first element - they are 
  17333.            equal. 
  17334.  
  17335.    3. second pass: 
  17336.  
  17337.         a. substitute the elements of the strings with their secondary weights: 
  17338.  
  17339.            s1=> "<NONE><NONE><NONE>", s2=>"<NONE><NONE><NONE>" 
  17340.  
  17341.         b. compare the two strings from the last element to the first - they 
  17342.            are equal. 
  17343.  
  17344.    4. third pass: 
  17345.  
  17346.         a. substitute the elements of the strings with their third level 
  17347.            weights: 
  17348.  
  17349.            s1=> "<LOWER-CASE><UPPER-CASE><LOWER-CASE>", s2=> 
  17350.            "<UPPER-CASE><LOWER-CASE><UPPER-CASE>", 
  17351.  
  17352.         b. compare the two strings starting from the beginning of the strings: 
  17353.  
  17354.            s2 compares lower than s1, because <UPPER-CASE> is before 
  17355.            <LOWER-CASE>. 
  17356.  
  17357.  Compare the strings s1="a1sz" and s2=>"a2ss": 
  17358.  
  17359.    1. s1=> "a1<eszet>" and s2= "a2ss"; 
  17360.  
  17361.    2. first pass: 
  17362.  
  17363.         a. substitute the elements of the strings with their primary weights: 
  17364.  
  17365.            s1=> "<a><s><s>", s2=> "<a><s><s>" 
  17366.  
  17367.         b. compare the two strings starting with the first element - they are 
  17368.            equal. 
  17369.  
  17370.    3. second pass: 
  17371.  
  17372.         a. substitute the elements of the strings with their secondary weights: 
  17373.  
  17374.            s1=> "<a-acute><eszet><s>", s2=>"<a-grave><s><s>" 
  17375.  
  17376.         b. compare the two strings from the last element to the first - <s> is 
  17377.            before <ezset>. 
  17378.  
  17379.  
  17380. ΓòÉΓòÉΓòÉ 21.3. LC_MONETARY Category ΓòÉΓòÉΓòÉ
  17381.  
  17382. This category defines the rules and symbols used to format monetary quantities. 
  17383. The operands are strings or integers. The following keywords are supported: 
  17384.  
  17385.  copy 
  17386.      Specifies the name of an existing locale to be used as the source for the 
  17387.      definition of this category. If this keyword is specified, no other 
  17388.      keyword should be present in this category. If the locale is not found, an 
  17389.      error is reported and no locale output is created. The copy keyword cannot 
  17390.      specify a locale that also specifies the copy keyword for the same 
  17391.      category. 
  17392.  
  17393.  int_curr_symbol 
  17394.      Specifies the international currency symbol. The operand is a 
  17395.      four-character string, with the first three characters containing the 
  17396.      alphabetic international currency symbol in accordance with those 
  17397.      specified in ISO4217 Codes for the Representation of Currency and Funds. 
  17398.      The fourth character is the character used to separate the international 
  17399.      currency symbol from the monetary quantity. 
  17400.  
  17401.      If not defined, it defaults to the empty string (""). 
  17402.  
  17403.  currency_symbol 
  17404.      Specifies the string used as the local currency symbol. If not defined, it 
  17405.      defaults to the empty string (""). 
  17406.  
  17407.  mon_decimal_point 
  17408.      The string used as a decimal delimiter to format monetary quantities. 
  17409.      If not defined it defaults to the empty string (""). 
  17410.  
  17411.  mon_thousands_sep 
  17412.      Specifies the string used as a separator for groups of digits to the left 
  17413.      of the decimal delimiter in formatted monetary quantities. If not defined, 
  17414.      it defaults to the empty string (""). 
  17415.  
  17416.  mon_grouping 
  17417.      Defines the size of each group of digits in formatted monetary quantities. 
  17418.      The operand is a string representing a sequence of integers separated by 
  17419.      semicolons. Each integer specifies the number of digits in each group, 
  17420.      with the initial integer defining the size of the group immediately 
  17421.      preceding the decimal delimiter, and the following integers defining the 
  17422.      preceding groups. If the last integer is not -1, then the size of the 
  17423.      previous group (if any) is used repeatedly for the rest of the digits. If 
  17424.      the last integer is -1, then no further grouping is performed. If not 
  17425.      defined, mon_grouping defaults to -1 which indicates that no grouping. An 
  17426.      empty string is interpreted as -1. 
  17427.  
  17428.  positive_sign 
  17429.      A string used to indicate a formatted monetary quantity with a 
  17430.      non-negative value. If not defined, it defaults to the empty string (""). 
  17431.  
  17432.  negative_sign 
  17433.      Specifies a string used to indicate a formatted monetary quantity with a 
  17434.      negative value. If not defined, it defaults to the empty string (""). 
  17435.  
  17436.  int_frac_digits 
  17437.      Specifies an integer representing the number of fractional digits (those 
  17438.      to the right of the decimal delimiter) to be displayed in a formatted 
  17439.      monetary quantity using int_curr_symbol. If not defined, it defaults to 
  17440.      -1. 
  17441.  
  17442.  frac_digits 
  17443.      Specifies an integer representing the number of fractional digits (those 
  17444.      to the right of the decimal delimiter) to be displayed in a formatted 
  17445.      monetary quantity using currency_symbol. If not defined, it defaults to 
  17446.      -1. 
  17447.  
  17448.  p_cs_precedes 
  17449.      Specifies an integer set to 1 if the currency_symbol or int_curr_symbol 
  17450.      precedes the value for a non-negative formatted monetary quantity, and set 
  17451.      to 0 if the symbol succeeds the value. If not defined, it defaults to -1. 
  17452.  
  17453.  p_sep_by_space 
  17454.      Specifies an integer set to 0 if no space separates the currency_symbol or 
  17455.      int_curr_symbol from the value for a non-negative formatted monetary 
  17456.      quantity, set to 1 if a space separates the symbol from the value, and set 
  17457.      to 2 if a space separates the symbol and the string sign, if adjacent. If 
  17458.      not defined, it defaults to -1. 
  17459.  
  17460.  n_cs_precedes 
  17461.      An integer set to 1 if the currency_symbol or int_curr_symbol precedes the 
  17462.      value for a negative formatted monetary quantity, and set to 0 if the 
  17463.      symbol succeeds the value. If not defined, it defaults to -1. 
  17464.  
  17465.  n_sep_by_space 
  17466.      An integer set to 0 if no space separates the currency_symbol or 
  17467.      int_curr_symbol from the value for a negative formatted monetary quantity, 
  17468.      set to 1 if a space separates the symbol from the value, and set to 2 if a 
  17469.      space separates the symbol and the string sign, if adjacent. If not 
  17470.      defined, it defaults to -1. 
  17471.  
  17472.  p_sign_posn 
  17473.      An integer set to a value indicating the positioning of the positive_sign 
  17474.      for a non-negative formatted monetary quantity. The following integer 
  17475.      values are recognized: 
  17476.  
  17477.      0        Parentheses surround the quantity and the currency_symbol or 
  17478.               int_curr_symbol. 
  17479.      1        The sign string precedes the quantity and the currency_symbol or 
  17480.               int_curr_symbol. 
  17481.      2        The sign string succeeds the quantity and the currency_symbol or 
  17482.               int_curr_symbol. 
  17483.      3        The sign string immediately precedes the currency_symbol or 
  17484.               int_curr_symbol. 
  17485.      4        The sign string immediately succeeds the currency_symbol or 
  17486.               int_curr_symbol. 
  17487.  
  17488.      The following value may also be specified, though it is not part of the 
  17489.      POSIX standard. 
  17490.  
  17491.      5        Use debit-sign or credit-sign for p_sign_posn or n_sign_posn. If 
  17492.      not defined, it defaults to -1. 
  17493.  
  17494.  n_sign_posn 
  17495.      An integer set to a value indicating the positioning of the negative_sign 
  17496.      for a negative formatted monetary quantity. The recognized values are the 
  17497.      same as for p_sign_posn. If not defined, it defaults to -1. 
  17498.  
  17499.  left_parenthesis 
  17500.      The symbol of the locale's equivalent of ( to form a negative-valued 
  17501.      formatted monetary quantity together with right_parenthesis. If not 
  17502.      defined, it defaults to the the empty string (""). 
  17503.  
  17504.      Note:  This is an IBM-specific extension. 
  17505.  
  17506.  right_parenthesis 
  17507.      The symbol of the locale's equivalent of ) to form a negative-valued 
  17508.      formatted monetary quantity together with left_parenthesis. If not 
  17509.      defined, it defaults to the the empty string (""); 
  17510.  
  17511.      Note:  This is an IBM-specific extension. 
  17512.  
  17513.  debit_sign 
  17514.      The symbol of locale's equivalent of DB to indicate a non-negative-valued 
  17515.      formatted monetary quantity. If not defined, it defaults to the the empty 
  17516.      string (""); 
  17517.  
  17518.      Note:  This is an IBM-specific extension. 
  17519.  
  17520.  credit_sign 
  17521.      The symbol of locale's equivalent of CR to indicate a negative-valued 
  17522.      formatted monetary quantity. If not defined, it defaults to the the empty 
  17523.      string (""); 
  17524.  
  17525.      Note:  This is an IBM-specific extension. 
  17526.  Here is an example of the definition of the LC_MONETARY category: 
  17527.  
  17528.   #############
  17529.   LC_MONETARY
  17530.   #############
  17531.  
  17532.   int_curr_symbol   "<J><P><Y><space>"
  17533.   currency_symbol   "<yen>"
  17534.   mon_decimal_point "<period>"
  17535.   mon_thousands_sep "<comma>"
  17536.   mon_grouping      "3;0"
  17537.   positive_sign     ""
  17538.   negative_sign     "<hyphen-minus>"
  17539.   int_frac_digits   0
  17540.   frac_digits       0
  17541.   p_cs_precedes     1
  17542.   p_sep_by_space    0
  17543.   n_cs_precedes     1
  17544.   n_sep_by_space    0
  17545.   p_sign_posn       1
  17546.   n_sign_posn       1
  17547.   debit_sign        "<D><B>"
  17548.   credit_sign       "<C><R>"
  17549.   left_parenthesis  "<left-parenthesis>"
  17550.   right_parenthesis "<right-parenthesis>"
  17551.  
  17552.   END LC_MONETARY
  17553.  
  17554.  
  17555. ΓòÉΓòÉΓòÉ 21.4. LC_NUMERIC Category ΓòÉΓòÉΓòÉ
  17556.  
  17557. This category defines the rules and symbols used to format non-monetary numeric 
  17558. information. The operands are strings. The following keywords are recognized: 
  17559.  
  17560.  copy 
  17561.      Specifies the name of an existing locale to be used as the source for the 
  17562.      definition of this category. If this keyword is specified, no other 
  17563.      keyword should be present in this category. If the locale is not found, an 
  17564.      error is reported and no locale output is created. The copy keyword cannot 
  17565.      specify a locale that also specifies the copy keyword for the same 
  17566.      category. 
  17567.  
  17568.  decimal_point 
  17569.      Specifies a string used as the decimal delimiter in numeric, non-monetary 
  17570.      formatted quantities. This keyword cannot be omitted and cannot be set to 
  17571.      the empty string. 
  17572.  
  17573.  thousands_sep 
  17574.      Specifies a string containing the symbol that is used as a separator for 
  17575.      groups of digits to the left of the decimal delimiter in numeric, 
  17576.      non-monetary, formatted quantities. 
  17577.  
  17578.  grouping 
  17579.      Defines the size of each group of digits in formatted non-monetary 
  17580.      quantities. The operand is a string representing a sequence of integers 
  17581.      separated by semicolons. Each integer specifies the number of digits in 
  17582.      each group, with the initial integer defining the size of the group 
  17583.      immediately preceding the decimal delimiter, and the following integers 
  17584.      defining the preceding groups. If the last integer is not -1, then the 
  17585.      size of the previous group (if any) is used repeatedly for the rest of the 
  17586.      digits. If the last integer is -1, then no further grouping is performed. 
  17587.      An empty string is interpreted as -1. 
  17588.  Here is an example of how to specify the LC_NUMERIC category: 
  17589.  
  17590.   #############
  17591.   LC_NUMERIC
  17592.   #############
  17593.  
  17594.   decimal_point     "<comma>"
  17595.   thousands_sep     "<space>"
  17596.   grouping          "3;0"
  17597.  
  17598.   END LC_NUMERIC
  17599.  
  17600.  
  17601. ΓòÉΓòÉΓòÉ 21.5. LC_TIME Category ΓòÉΓòÉΓòÉ
  17602.  
  17603. The LC_TIME category defines the interpretation of the field descriptors used 
  17604. for parsing, then formatting, the date and time. Refer to the strftime and 
  17605. strptime functions in the C Library Reference for a description of format 
  17606. specifiers. 
  17607.  
  17608. The following keywords are supported: 
  17609.  
  17610.  copy 
  17611.      Specifies the name of an existing locale to be used as the source for the 
  17612.      definition of this category. If this keyword is specified, no other 
  17613.      keyword should be present in this category. If the locale is not found, an 
  17614.      error is reported and no locale output is created. The copy keyword cannot 
  17615.      specify a locale that also specifies the copy keyword for the same 
  17616.      category. 
  17617.  
  17618.  abday 
  17619.      Defines the abbreviated weekday names, corresponding to the %a field 
  17620.      descriptor. The operand consists of seven semicolon-separated strings. The 
  17621.      first string is the abbreviated name corresponding to Sunday, the second 
  17622.      string corresponds to Monday, and so forth. 
  17623.  
  17624.  day 
  17625.      Defines the full weekday names, corresponding to the %A field descriptor. 
  17626.      The operand consists of seven semicolon-separated strings. The first 
  17627.      string is the full name corresponding to Sunday, the second string to 
  17628.      Monday, and so forth. 
  17629.  
  17630.  abmon 
  17631.      Defines the abbreviated month names, corresponding to the %b field 
  17632.      descriptor. The operand consists of twelve strings separated by 
  17633.      semicolons. The first string is an abbreviated name that corresponds to 
  17634.      January, the second corresponds to February, and so forth. 
  17635.  
  17636.  mon 
  17637.      Defines the full month names, corresponding to the %B field descriptor. 
  17638.      The operand consists of twelve strings separated by semicolons. The first 
  17639.      string is an abbreviated name that corresponds to January, the second 
  17640.      corresponds to February, and so forth. 
  17641.  
  17642.  d_t_fmt 
  17643.      Defines the appropriate date and time representation, corresponding to the 
  17644.      %c field descriptor. The operand consists of a string, which may contain 
  17645.      any combination of characters and field descriptors. 
  17646.  
  17647.  d_fmt 
  17648.      Defines the appropriate date representation, corresponding to the %x field 
  17649.      descriptor. The operand consists of a string, and may contain any 
  17650.      combination of characters and field descriptors. 
  17651.  
  17652.  t_fmt 
  17653.      Defines the appropriate time representation, corresponding to the %X field 
  17654.      descriptor. The operand consists of a string, which may contain any 
  17655.      combination of characters and field descriptors. 
  17656.  
  17657.  am_pm 
  17658.      Defines the appropriate representation of the ante meridian and post 
  17659.      meridian strings, corresponding to the %p field descriptor. The operand 
  17660.      consists of two strings, separated by a semicolon. The first string 
  17661.      represents the ante meridian designation, the last string the post 
  17662.      meridian designation. 
  17663.  
  17664.  t_fmt_ampm 
  17665.      Defines the appropriate time representation in the 12-hour clock format 
  17666.      with am_pm, corresponding to the %r field descriptor. The operand consists 
  17667.      of a string and can contain any combination of characters and field 
  17668.      descriptors. 
  17669.  
  17670.  era 
  17671.      Defines how the years are counted and displayed for each era (or emperor's 
  17672.      reign) in a locale. 
  17673.  
  17674.      No era is needed if the %E field descriptor modifier is not used for the 
  17675.      locale. 
  17676.  
  17677.      For each era, there must be one string in the following format: 
  17678.  
  17679.           direction:offset:start_date:end_date:name:format
  17680.  
  17681.      where 
  17682.  
  17683.      direction 
  17684.               Either a + or - character. The + character indicates the time 
  17685.               axis should be such that the years count in the positive 
  17686.               direction when moving from the starting date towards the ending 
  17687.               date. The - character indicates the time axis should be such that 
  17688.               the years count in the negative direction when moving from the 
  17689.               starting date towards the ending date. 
  17690.  
  17691.      offset 
  17692.               A number of the first year of the era. 
  17693.  
  17694.      start_date 
  17695.               A date in the form yyyy/mm/dd where yyyy, mm and dd are the year, 
  17696.               month and day numbers, respectively, of the start of the era. 
  17697.               Years prior to the year AD 0 are represented as negative numbers. 
  17698.               For example, an era beginning March 5th in the year 100 BC would 
  17699.               be represented as -100/3/5. 
  17700.  
  17701.      end_date 
  17702.               The ending date of the era in the same form as the start_date 
  17703.               above or one of the two special values -* or +*. A value of -* 
  17704.               indicates the ending date of the era extends to the beginning of 
  17705.               time while +* indicates it extends to the end of time. The ending 
  17706.               date may be either before or after the starting date of an era. 
  17707.               For example, the strings for the Christian eras AD and BC would 
  17708.               be: 
  17709.  
  17710.                             +:0:0000/01/01:+*:AD:%EC %Ey
  17711.                             +:1:-0001/12/31:-*:BC:%EC %Ey
  17712.  
  17713.      name 
  17714.               A string representing the name of the era which is substituted 
  17715.               for the %EC field descriptor. 
  17716.  
  17717.      format 
  17718.               A string for formatting the %EY field descriptor. This string is 
  17719.               usually a function of the %EC and %Ey field descriptors. 
  17720.  
  17721.      The operand consists of one string for each era. If there is more than one 
  17722.      era, strings are separated by semicolons. 
  17723.  
  17724.  era_year 
  17725.      Defines the format of the year in alternate era format, corresponding to 
  17726.      the %EY field descriptor. 
  17727.  
  17728.  era_d_fmt 
  17729.      Defines the format of the date in alternate era notation, corresponding to 
  17730.      the %Ex field descriptor. 
  17731.  
  17732.  alt_digits 
  17733.      Defines alternate symbols for digits, corresponding to the %O field 
  17734.      descriptor modifier. The operand consists of semicolon-separated strings. 
  17735.      The first string is the alternate symbol corresponding to zero, the second 
  17736.      string the symbol corresponding to one, and so forth.  A maximum of 100 
  17737.      alternate strings may be specified. The %O modifier indicates that the 
  17738.      string corresponding to the value specified by the field descriptor is 
  17739.      used instead of the value. 
  17740.  
  17741.  
  17742. ΓòÉΓòÉΓòÉ 21.6. LC_MESSAGES Category ΓòÉΓòÉΓòÉ
  17743.  
  17744. The LC_MESSAGES category defines the format and values for positive and 
  17745. negative responses. 
  17746.  
  17747. The following keywords are recognized: 
  17748.  
  17749.  copy 
  17750.      Specifies the name of an existing locale to be used as the source for the 
  17751.      definition of this category. If you specify this keyword, no other keyword 
  17752.      should be present in this category. If the locale is not found, an error 
  17753.      is reported and no locale output is created. The copy keyword cannot 
  17754.      specify a locale that also specifies the copy keyword for the same 
  17755.      category. 
  17756.  
  17757.  yesexpr 
  17758.      The operand consists of an extended regular expression that describes the 
  17759.      acceptable affirmative response to a question that expects an affirmative 
  17760.      or negative response. 
  17761.  
  17762.  noexpr 
  17763.      The operand consists of an extended regular expression that describes the 
  17764.      acceptable negative response to a question that expects an affirmative or 
  17765.      negative response. 
  17766.  Here is an example that shows how to define the LC_MESSAGES category: 
  17767.  
  17768.   #############
  17769.   LC_MESSAGES
  17770.   #############
  17771.   # yes expression is a string that starts with
  17772.   # "SI", "Si" "sI" "si" "s" or "S"
  17773.   yesexpr "<circumflex><left-parenthesis><left-square-bracket><s><S>\
  17774.   <right-square-bracket><left-square-bracket><i><I><right-square-bracket>\
  17775.   <vertical-line><left-square-bracket><s><S><right-square-bracket>\
  17776.   <right-parenthesis>"
  17777.  
  17778.   # no expression is a string that starts with
  17779.   # "NO", "No" "nO" "no" "N" or "n"
  17780.   noexpr "<circumflex><left-parenthesis><left-square-bracket><n><N>\
  17781.   <right-square-bracket><left-square-bracket><o><O><right-square-bracket>\
  17782.   <vertical-line><left-square-bracket><n><N><right-square-bracket>\
  17783.   <right-parenthesis>"
  17784.  
  17785.   END LC_MESSAGES
  17786.  
  17787.  
  17788. ΓòÉΓòÉΓòÉ 21.7. LC_TOD Category ΓòÉΓòÉΓòÉ
  17789.  
  17790. The LC_TOD category defines the rules used to define the beginning, end, and 
  17791. duration of daylight savings time, and the difference between local time and 
  17792. Greenwich Mean time. This is an IBM extension. 
  17793.  
  17794. The following keywords are recognized: 
  17795.  
  17796.  copy 
  17797.      Specifies the name of an existing locale to be used as the source for the 
  17798.      definition of this category. If this keyword is specified, no other 
  17799.      keyword should be present in this category. If the locale is not found, an 
  17800.      error is reported and no locale output is created. The copy keyword cannot 
  17801.      specify a locale that also specifies the copy keyword for the same 
  17802.      category. 
  17803.  
  17804.  timezone_difference 
  17805.      An integer specifying the time zone difference expressed in minutes. If 
  17806.      the local time zone is west of the Greenwich Meridian, this value must be 
  17807.      positive. If the local time zone is east of the Greenwich Meridian, this 
  17808.      value must be negative. An absolute value greater than 1440 (the number of 
  17809.      minutes in a day) for this keyword indicates that the run time library is 
  17810.      to get the time zone difference from the system. 
  17811.  
  17812.  timezone_name 
  17813.      A string specifying the time zone name such as "PST" (Pacific Standard 
  17814.      Time) specified within quotation marks. The default for this field is a 
  17815.      NULL string. 
  17816.  
  17817.  daylight_name 
  17818.      A string specifying the Daylight Saving Time zone name, such as "PDT" 
  17819.      (Pacific Daylight Time), if there is one available.  The string must be 
  17820.      specified within quotation marks. If DST information is not available, 
  17821.      this is set to NULL, which is also the default. This field must be filled 
  17822.      in if DST information as provided by the other fields is to be taken into 
  17823.      account by the mktime and localtime functions. These functions ignore DST 
  17824.      if this field is NULL. 
  17825.  
  17826.  start_month 
  17827.      An integer specifying the month of the year when Daylight Saving Time 
  17828.      comes into effect. This value ranges from 1 through 12 inclusive, with 1 
  17829.      corresponding to January and 12 corresponding to December. If DST is not 
  17830.      applicable to a locale, start_month is set to 0, which is also the 
  17831.      default. 
  17832.  
  17833.  end_month 
  17834.      An integer specifying the month of the year when Daylight Saving Time 
  17835.      ceases to be in effect. The specifications are similar to those for 
  17836.      start_month. 
  17837.  
  17838.  start_week 
  17839.      An integer specifying the week of the month when DST comes into effect. 
  17840.      Acceptable values range from -4 to +4. A value of 4 means the fourth week 
  17841.      of the month, while a value of -4 means fourth week of the month, counting 
  17842.      from the end of the month. Sunday is considered to be the start of the 
  17843.      week. If DST is not applicable to a locale, start_week is set to 0, which 
  17844.      is also the default. 
  17845.  
  17846.  end_week 
  17847.      An integer specifying the week of the month when DST ceases to be in 
  17848.      effect. The specifications are similar to those for start_week. 
  17849.  
  17850.      Note:  The start_week and end_week need not be used. The start_day and 
  17851.      end_day fields can specify either the day of the week or the day of the 
  17852.      month. If day of month is specified, start_week and end_week become 
  17853.      redundant. 
  17854.  
  17855.  start_day 
  17856.      An integer specifying the day of the week or the day of the month when DST 
  17857.      comes into effect. The value depends on the value of start_week. If 
  17858.      start_week is not equal to 0, this is the day of the week when DST comes 
  17859.      into effect. It ranges from 0 through 6 inclusive, with 0 corresponding to 
  17860.      Sunday and 6 corresponding to Saturday. If start_week equals 0, start_day 
  17861.      is the day of the month (for the current year) when DST comes into effect. 
  17862.      It ranges from 1 through to the last day of the month inclusive. The last 
  17863.      day of the month is 31 for January, March, May, July, August, October, and 
  17864.      December. It is 30 for April, June, September, and November. For February, 
  17865.      it is 28 on non-leap years and 29 on leap years. If DST is not applicable 
  17866.      to a locale, start_day is set to 0, which is also the default. 
  17867.  
  17868.  end_day 
  17869.      An integer specifying the day of the week or the day of the month when DST 
  17870.      ceases to be in effect. The specifications are similar to those for 
  17871.      start_day. 
  17872.  
  17873.  start_time 
  17874.      An integer specifying the number of seconds after 12:00 midnight, local 
  17875.      standard time, when DST comes into effect. For example, if DST is to start 
  17876.      at 2:am, start_time is assigned the value 7200; for 12:00 am (midnight), 
  17877.      start_time is 0; for 1:00 am, it is 3600. 
  17878.  
  17879.  end_time 
  17880.      An integer specifying the number of seconds after 12 midnight, local 
  17881.      standard time, when DST ceases to be in effect. The specifications are 
  17882.      similar to those for start_time. 
  17883.  
  17884.  shift 
  17885.      An integer specifying the DST time shift, expressed in seconds.  The 
  17886.      default is 3600, for 1 hour. 
  17887.  
  17888.  uctname 
  17889.      A string specifying the name to be used for Coordinated Universal Time. If 
  17890.      this keyword is not specified, the uctname will default to "UTC". 
  17891.  Here is an example of how to define the LC_TOD category: 
  17892.  
  17893.   #############
  17894.   LC_TOD
  17895.   #############
  17896.   # the time zone difference is 8hrs; the name of the daylight saving
  17897.   # time is PDT, and it starts on the first Sunday of April at
  17898.   # 2:00AM and ends on the second Sunday of October at
  17899.   # 2:00AM
  17900.   timezone_difference +480
  17901.   timezone_name       "<P><S><T>"
  17902.   daylight_name       "<P><D><T>"
  17903.   start_month         4
  17904.   end_month           10
  17905.   start_week          1
  17906.   end_week            2
  17907.   start_day           1
  17908.   end_day             30
  17909.   start_time          7200
  17910.   end_time            3600
  17911.   shift               3600
  17912.   END LC_TOD
  17913.  
  17914.  
  17915. ΓòÉΓòÉΓòÉ 21.8. LC_SYNTAX Category ΓòÉΓòÉΓòÉ
  17916.  
  17917. The LC_SYNTAX category defines the variant characters from the portable 
  17918. character set. LC_SYNTAX is an IBM-specific extension. This category can be 
  17919. queried by the C library function getsyntx to determine the encoding of a 
  17920. variant character if needed. 
  17921.  
  17922. Warning: Customizing the LC_SYNTAX category is not recommended. You should use 
  17923. the LC_SYNTAX values obtained from the charmap file when you use the LOCALDEF 
  17924. utility. 
  17925.  
  17926. The operands for the characters in the LC_SYNTAX category accept the single 
  17927. byte character specification in the form of a symbolic name, the character 
  17928. itself, or the decimal, octal, or hexadecimal constant. The characters must be 
  17929. specified in the LC_CTYPE category as a punct character. The values for the 
  17930. LC_SYNTAX characters must be unique. If symbolic names are used to define the 
  17931. encoding, only the symbolic names listed for each character should be used. 
  17932.  
  17933. The code points for the LC_SYNTAX characters are set to the code points 
  17934. specified.  Otherwise, they default to the code points for the respective 
  17935. characters from the charmap file, if the file is present, or to the code points 
  17936. of the respective characters in the IBM-850 code page. 
  17937.  
  17938. The following keywords are recognized: 
  17939.  
  17940.  copy 
  17941.      Specifies the name of an existing locale to be used as the source for the 
  17942.      definition of this category. If you specify this keyword, no other keyword 
  17943.      should be present. 
  17944.  
  17945.      If the locale is not found, an error is reported and no locale output is 
  17946.      created. The copy keyword cannot specify a locale that also specifies the 
  17947.      copy keyword for the same category. 
  17948.  
  17949.  backslash 
  17950.      Specifies a string that defines the value used to represent the backslash 
  17951.      character. If this keyword is not specified, the value from the charmap 
  17952.      file for the character <backslash>, <reverse-solidus>, or <SM07> is used, 
  17953.      if it is present. 
  17954.  
  17955.  right_brace 
  17956.      Specifies a string that defines the value used to represent the right 
  17957.      brace character. If this keyword is not specified, the value from the 
  17958.      charmap file for the character <right-brace>, <right-curly-bracket>, or 
  17959.      <SM14> is used, if it is present. 
  17960.  
  17961.  left_brace 
  17962.      Specifies a string that defines the value used to represent the left brace 
  17963.      character. If this keyword is not specified, the value from the charmap 
  17964.      file for the character <left-brace>, <left-curly-bracket>, or <SM11> is 
  17965.      used, if it is present. 
  17966.  
  17967.  right_bracket 
  17968.      Specifies a string that defines the value used to represent the right 
  17969.      bracket character. If this keyword is not specified, the value from the 
  17970.      charmap file for the character <right-square-bracket>, or <SM08> is used, 
  17971.      if it is present. 
  17972.  
  17973.  left_bracket 
  17974.      Specifies a string that defines the value used to represent the left 
  17975.      bracket character. If this keyword is not specified, the value from the 
  17976.      charmap file for the character <left-square-bracket>, or <SM06> is used, 
  17977.      if it is present. 
  17978.  
  17979.  circumflex 
  17980.      Specifies a string that defines the value used to represent the circumflex 
  17981.      character. If this keyword is not specified, the value from the charmap 
  17982.      file for the character <circumflex>, <circumflex-accent>, or <SD15> is 
  17983.      used, if it is present. 
  17984.  
  17985.  tilde 
  17986.      Specifies a string that defines the value used to represent the tilde 
  17987.      character. If this keyword is not specified, the value from the charmap 
  17988.      file for the character <tilde>, or <SD19> is used, if it is present. 
  17989.  
  17990.  exclamation_mark 
  17991.      Specifies a string that defines the value used to represent the 
  17992.      exclamation mark character. If this keyword is not specified, the value 
  17993.      from the charmap file for the character <exclamation-mark>, or <SP02> is 
  17994.      used, if it is present. 
  17995.  
  17996.  number_sign 
  17997.      Specifies a string that defines the value used to represent the number 
  17998.      sign character. If this keyword is not specified, the value from the 
  17999.      charmap file for the character <number-sign>, or <SM01> is used, if it is 
  18000.      present. 
  18001.  
  18002.  vertical_line 
  18003.      Specifies a string that defines the value used to represent the vertical 
  18004.      line character. If this keyword is not specified, the value from the 
  18005.      charmap file for the character <vertical-line>, or <SM13> is used, if it 
  18006.      is present. 
  18007.  
  18008.  dollar_sign 
  18009.      Specifies a string that defines the value used to represent the dollar 
  18010.      sign character. If this keyword is not specified, the value from the 
  18011.      charmap file for the character <dollar-sign>, or <SC03> is used, if it is 
  18012.      present. 
  18013.  
  18014.  commercial_at 
  18015.      Specifies a string that defines the value used to represent the commercial 
  18016.      at character. If this keyword is not specified, the value from the charmap 
  18017.      file for the character <commercial-at>, or <SM05> is used, if it is 
  18018.      present. 
  18019.  
  18020.  grave_accent 
  18021.      Specifies a string that defines the value used to represent the grave 
  18022.      accent character. If this keyword is not specified, the value from the 
  18023.      charmap file for the character <grave-accent>, or <SD13> is used, if it is 
  18024.      present. 
  18025.  Here is an example of how the LC_SYNTAX category is defined: 
  18026.  
  18027.   #############
  18028.   LC_SYNTAX
  18029.   #############
  18030.  
  18031.   backslash        "<backslash>"
  18032.   right_brace      "<right-brace>"
  18033.   left_brace       "<left-brace>"
  18034.   right_bracket    "<right-square-bracket>"
  18035.   left_bracket     "<left-square-bracket>"
  18036.   circumflex       "<circumflex>"
  18037.   tilde            "<tilde>"
  18038.   exclamation_mark "<exclamation-mark>"
  18039.   number_sign      "<number-sign>"
  18040.   vertical_line    "<vertical-line>"
  18041.   dollar_sign      "<dollar-sign>"
  18042.   commercial_at    "<commercial-at>"
  18043.   grave_accent     "<grave-accent>"
  18044.  
  18045.   END LC_SYNTAX
  18046.  
  18047.  
  18048. ΓòÉΓòÉΓòÉ 21.8.1. Regular Expressions ΓòÉΓòÉΓòÉ
  18049.  
  18050. Regular Expressions (REs) are used to determine if a character string of 
  18051. interest is matched somewhere in a set of character strings.  You can specify 
  18052. more than one character string for which you wish to determine if a match 
  18053. exists. Regular Expressions use collating values from the current locale 
  18054. definition file in the matching process. 
  18055.  
  18056. The search for a matching sequence starts at the beginning of the string and 
  18057. stops when the first sequence matching the expression is found. The first 
  18058. sequence is the one that begins earliest in the string. If the pattern permits 
  18059. matching several sequences at this starting point, the longest sequence is 
  18060. matched. 
  18061.  
  18062. To use a regular expression, first compile it with regcomp. You can then use 
  18063. regexec to compare the compiled expression to other expressions. If an error 
  18064. occurs, regerror provides information about the error. When you have finished 
  18065. with the expression, use regfree to free it from memory. All of these functions 
  18066. are described in more detail in the C Library Reference. 
  18067.  
  18068.  
  18069. ΓòÉΓòÉΓòÉ 21.9. Basic Matching Rules ΓòÉΓòÉΓòÉ
  18070.  
  18071. Within an RE: 
  18072.  
  18073.      An ordinary character matches itself. The simplest form of regular 
  18074.       expression is a string of characters with no special meaning. 
  18075.      A special character preceded by a backslash matches itself. For basic 
  18076.       regular expressions (BREs), the special characters are: 
  18077.  
  18078.                . [ \ * ^ $
  18079.       For extended regular expressions (EREs), the special characters also 
  18080.       include: 
  18081.  
  18082.                ( ) + ? { |
  18083.       (EREs are supported when you specify the REG_EXTENDED flag.) 
  18084.      A period (.) without a backslash matches any single character.  For EREs, 
  18085.       it matches any character except the null character. 
  18086.      An expression within square brackets ([ ]), called a bracket expression, 
  18087.       matches one or more characters or collating elements. 
  18088.  
  18089.  Note:  Do not use multibyte characters in regular expressions. 
  18090.  
  18091.  Bracket Expressions 
  18092.  
  18093.  A bracket expression itself contains one or more expressions that represent 
  18094.  characters, collating symbols, equivalence or character classes, or range 
  18095.  expressions: 
  18096.  
  18097.  [string] Matches any of the characters specified. For example, [abc] matches 
  18098.          any of a, b, or c. 
  18099.  
  18100.  [^string] Does not match any of the characters in string. The caret 
  18101.          immediately following the left bracket ([) negates the characters that 
  18102.          follow.  For example, [^abc] matches any character or collating 
  18103.          element except a, b, or c. 
  18104.  
  18105.  [collat_sym-collat_sym] Matches any collating elements that fall between the 
  18106.          two specified collating symbols, inclusive. The two symbols must be 
  18107.          different, and the second symbol must collate equal to or higher than 
  18108.          the first. For example, in the "C" locale, [r-t] would match any of r, 
  18109.          s, or t. 
  18110.  
  18111.          Note:  To treat the hyphen (-) as itself, place it either first or 
  18112.          last in the bracket expression, for example: [-rt] or [rt-]. Both of 
  18113.          these expressions would match -, r, or t. 
  18114.  
  18115.  [[.collat_symbl.]] Matches the collating element represented by the specified 
  18116.          single or multicharacter collating symbol collat_symbl. For example, 
  18117.          assuming that <ch> is the collating symbol for ch in the current 
  18118.          locale, [[.ch.]] matches the character sequence ch. (In contrast, [ch] 
  18119.          matches c or h.) If collat_symbl is not a collating element in the 
  18120.          current locale, or if it has no characters associated with it, it is 
  18121.          treated as an invalid expression. 
  18122.  
  18123.  [[=collat_symbl=]] Matches all collating elements that have a weight 
  18124.          equivalent to the specified single or multicharacter collating symbol 
  18125.          collat_symbl. For example, assuming a, ╨ò, and ╨ô belong to the same 
  18126.          equivalence class, [[=a=]] matches any of the three.  If the collating 
  18127.          symbol does not have any equivalents, it is treated as a collating 
  18128.          symbol and matches its corresponding collating element (as for [..]). 
  18129.  
  18130.  [[:char_class:]] Matches any characters that belong to the specified character 
  18131.          class char_class. For example, [[:alnum:]] matches all alphanumeric 
  18132.          characters (characters for which isalnum would return nonzero). 
  18133.  
  18134.  Note:  To use the right bracket (]) in a bracket expression, you must specify 
  18135.  it immediately following the left bracket ([) or caret symbol (^).  For 
  18136.  example, []x] matches the characters ] and x; [^]x] does not match ] or x; 
  18137.  [x]] is not valid. 
  18138.  
  18139.  You can combine characters, special characters, and bracket expressions to 
  18140.  form REs that match multiple characters and subexpressions. When you 
  18141.  concatenate the characters and expressions, the resulting RE matches any 
  18142.  string that matches each component within the RE. For example, cd matches 
  18143.  characters 3 and 4 of the string abcde; ab[[:digit:]] matches ab3 but not abc. 
  18144.  For EREs, you can optionally enclose the concatenation in parentheses. 
  18145.  
  18146.  
  18147. ΓòÉΓòÉΓòÉ 21.10. Additional Syntax Specifiers ΓòÉΓòÉΓòÉ
  18148.  
  18149. You can also use other syntax within an RE to control what it matches: 
  18150.  
  18151.  \(expression\) Matches whatever expression matches.  You only need to enclose 
  18152.          an expression in these delimiters to use operators (such as * or +) on 
  18153.          it and to denote subexpressions for backreferencing (explained later 
  18154.          in this section). For EREs, use the parentheses without the 
  18155.          backslashes: (subexpression) 
  18156.  
  18157.  \n      Matches the same string that was matched by the nth preceding 
  18158.          expression enclosed in \( \) or, for EREs, ( ). This is called a 
  18159.          backreference. n can be 1 through 9. For example, \(ab\)\1 matches 
  18160.          abab, but does not match ac. If fewer than n subexpressions precede 
  18161.          \n, the backreference is not valid. 
  18162.  
  18163.          Note:  You cannot use backreferences in EREs. 
  18164.  
  18165.  expression* Matches zero or more consecutive occurrences of what expression 
  18166.          matches. expression can be a single character or collating symbol, a 
  18167.          subexpression, or a backreference (for BREs). For example, [ab]* 
  18168.          matches ab and ababab; b*cd matches characters 3 to 7 of cabbbcdeb. 
  18169.  
  18170.  expression\{m\} Matches exactly m occurrences of what expression matches. 
  18171.          expression can be a single character or collating symbol, a 
  18172.          subexpression, or a backreference (for BREs). For example, c\{3\} 
  18173.          matches characters 5 through 7 of ababccccd (the first 3 c characters 
  18174.          only). For EREs, use the braces without the backslashes: {m} 
  18175.  
  18176.  expression\{m,\} Matches at least m occurrences of what expression matches. 
  18177.          expression can be a single character or collating symbol, a 
  18178.          subexpression, or a backreference (for BREs). For example, 
  18179.          \(ab\)\{3,\} matches abababab, but does not match ababac. For EREs, 
  18180.          use the braces without the backslashes: {m,} 
  18181.  
  18182.  expression\{m,u\} Matches any number of occurrences, between m and u 
  18183.          inclusive, of what expression matches. expression can be a single 
  18184.          character or collating symbol, a subexpression, or a backreference 
  18185.          (for BREs). For example, bc\{1,3\} matches characters 2 through 4 of 
  18186.          abccd and characters 3 through 6 of abbcccccd For EREs, use the braces 
  18187.          without the backslashes: {m,u} 
  18188.  
  18189.  ^expression Matches only sequences that match expression that start at the 
  18190.          first character of a string or after a new-line character if the 
  18191.          REG_NEWLINE flag was specified. For example, ^ab matches ab in the 
  18192.          string abcdef, but does not match it in the string cdefab. The 
  18193.          expression can be the entire RE or any subexpression of it. 
  18194.  
  18195.          Portability Note  When ^ is the first character of a subexpression, 
  18196.          other implemenations could interpret it as a literal character. To 
  18197.          ensure portability, avoid using ^ at the beginning of a subexpression; 
  18198.          to use it as a literal character, precede it with a backslash. 
  18199.  
  18200.  expression$ Matches only sequences that match expression that end the string 
  18201.          or that precede the new-line character if the REG_NEWLINE flag was 
  18202.          specified. For example, ab$ matches ab in the string cdefab but does 
  18203.          not match it in the string abcdef. The expression must be the entire 
  18204.          RE. 
  18205.  
  18206.          Portability Note  When $ is the last character of a subexpression, it 
  18207.          is treated as a literal character. Other implementations could 
  18208.          interpret is as described above. To ensure portability, avoid using $ 
  18209.          at the end of a subexpression; to use it as a literal character, 
  18210.          precede it with a backslash. 
  18211.  
  18212.  ^expression$ Matches only an entire string, or an entire line if the 
  18213.          REG_NEWLINE flag was specified. For example, ^abcde$ matches only 
  18214.          abcde. 
  18215.  
  18216.  In addition to those listed above, you can also use the following specifiers 
  18217.  for EREs (they are not valid for BREs): 
  18218.  
  18219.  expression+ Matches what one or more occurrences of expression matches.  For 
  18220.          example, a+(bc) matches aaaaabc; (bc)+ matches characters 1 through 6 
  18221.          of bcbcbcbb. 
  18222.  
  18223.  expression? Matches zero or one consecutive occurrences of what expression 
  18224.          matches. For example, b?c matches character 2 of acabbb (zero 
  18225.          occurrences of b followed by c). 
  18226.  
  18227.  expression|expression Matches a string that matches either expression.  For 
  18228.          example, a((bc)|d) matches both abd and ad. 
  18229.  
  18230.  
  18231. ΓòÉΓòÉΓòÉ 21.11. Order of precedence ΓòÉΓòÉΓòÉ
  18232.  
  18233. Like C and C++ operators, the RE syntax specifiers are processed in a specific 
  18234. order. The order of precedence for BREs is described below, from highest to 
  18235. lowest. The specifiers in each category are also listed in order of precedence. 
  18236.  
  18237. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18238. Γöé Collation-related bracket    Γöé [==]  [::]  [..]               Γöé
  18239. Γöé symbols             Γöé                       Γöé
  18240. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18241. Γöé Special characters       Γöé \spec_char                  Γöé
  18242. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18243. Γöé Bracket expressions       Γöé [ΓêÖ                      Γöé
  18244. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18245. Γöé Subexpressions and backrefer-  Γöé \(\)  \n                   Γöé
  18246. Γöé ences              Γöé                       Γöé
  18247. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18248. Γöé Repetition           Γöé *  \{m\}  \{m,\}  \{m,n\}          Γöé
  18249. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18250. Γöé Concatenation          Γöé                       Γöé
  18251. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18252. Γöé Anchoring            Γöé ^  $                     Γöé
  18253. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18254.  
  18255. The order of precedence for EREs is: 
  18256.  
  18257. ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18258. Γöé Collation-related bracket    Γöé [==]  [::]  [..]               Γöé
  18259. Γöé symbols             Γöé                       Γöé
  18260. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18261. Γöé Special characters       Γöé \spec_char                  Γöé
  18262. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18263. Γöé Bracket expressions       Γöé [ΓêÖ                      Γöé
  18264. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18265. Γöé Grouping            Γöé ()                      Γöé
  18266. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18267. Γöé Repetition           Γöé *  +  ?  {m}  {m,}  {m,n}          Γöé
  18268. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18269. Γöé Concetenation          Γöé                       Γöé
  18270. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18271. Γöé Anchoring            Γöé ^  $                     Γöé
  18272. Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18273. Γöé Alternation           Γöé |                      Γöé
  18274. ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18275.  
  18276.  
  18277. ΓòÉΓòÉΓòÉ 22. Mapping ΓòÉΓòÉΓòÉ
  18278.  
  18279. This appendix describes how VisualAge C++ compiler maps data types into storage 
  18280. and the alignment of each data type and the mapping of its bits.  The mapping 
  18281. of identifier names is also discussed, as is the encoding scheme used by the 
  18282. compiler for encoding or mangling C++ function names. 
  18283.  
  18284.      Name Mapping 
  18285.      Data Mapping 
  18286.      Demangling (Decoding) C++ Function Names 
  18287.  
  18288.  
  18289. ΓòÉΓòÉΓòÉ 22.1. Name Mapping ΓòÉΓòÉΓòÉ
  18290.  
  18291. To prevent conflicts between user-defined identifiers (variable names or 
  18292. functions) and VisualAge C++ library functions, do not use the name of any 
  18293. library function or external variable defined in the library as a user-defined 
  18294. function. 
  18295.  
  18296. If you statically link to the VisualAge C++ runtime libraries (using the /Gd- 
  18297. option), all external names beginning with Dos, Vio, or Kbd (in the case given) 
  18298. become reserved external identifiers. These names are not reserved if you 
  18299. dynamically link to the libraries. 
  18300.  
  18301. To prevent conflicts with internal names, do not use an underscore at the start 
  18302. of any of your external names; these identifiers are reserved for use by the 
  18303. compiler and libraries. The internal VisualAge C++ identifier names that are 
  18304. not listed in either the Language Reference or this manual all begin with an 
  18305. underscore (_). 
  18306.  
  18307. If you have an application that uses a restricted name as an identifier, change 
  18308. your code or use a macro to globally redefine the name and avoid conflicts. You 
  18309. can also use the #pragma map directive to convert the name, but this directive 
  18310. is not portable outside of SAA. 
  18311.  
  18312. A number of functions and variables that existed in the IBM C/2 and Microsoft C 
  18313. Version 6.0 compilers are implemented in the VisualAge C++ product, but with a 
  18314. preceding underscore to conform to ANSI naming requirements. When you run the 
  18315. VisualAge C++ compiler in extended mode (which is the default) and include the 
  18316. appropriate library header file, the original names are mapped to the new names 
  18317. for you. For example, the function name putenv is mapped to _putenv. When you 
  18318. compile in any other mode, this mapping does not take place. 
  18319.  
  18320. Note:  Because the name timezone is used as a structure field by the OS/2 
  18321. operating system, the variable _timezone is not mapped to timezone. 
  18322.  
  18323.  
  18324. ΓòÉΓòÉΓòÉ 22.2. Demangling (Decoding) C++ Function Names ΓòÉΓòÉΓòÉ
  18325.  
  18326. When the VisualAge C++ compiler compiles a program, it encodes all function 
  18327. names and certain other identifiers to include type and scoping information. 
  18328. This encoding process is called mangling.  The linker uses the mangled names to 
  18329. ensure type-safe linkage.  These mangled names are used in the object files and 
  18330. in the final executable file.  Tools that use these files must use the mangled 
  18331. names and not the original names used in the source code. 
  18332.  
  18333. VisualAge C++ provides two methods of converting mangled names to the original 
  18334. source code names, demangling functions and the CPPFILT utility. 
  18335.  
  18336.  
  18337. ΓòÉΓòÉΓòÉ 22.2.1. Using the Demangling Functions ΓòÉΓòÉΓòÉ
  18338.  
  18339. The runtime library contains a small class hierarchy of functions that you can 
  18340. use to demangle names and examine the resulting parts of the name.  It also 
  18341. provides a C-language interface you can use in C programs.  The functions use 
  18342. no external C++ features. 
  18343.  
  18344. The demangling functions are available in both the static (.LIB) and dynamic 
  18345. (.DLL) versions of the library. The interface is documented in the <demangle.h> 
  18346. header file. 
  18347.  
  18348. Using the demangling functions, you can write programs to convert a mangled 
  18349. name to a demangled name and to determine characteristics of that name, such as 
  18350. its type qualifiers or scope. For example, given the mangled name of a 
  18351. function, the program returns the demangled name of the function and the names 
  18352. of its qualifiers.  If the mangled name refers to a class member, you can 
  18353. determine if it is static, const, or volatile.  You can also get the whole text 
  18354. of the mangled name. 
  18355.  
  18356. To demangle a name, which is represented as a character array, create a dynamic 
  18357. instance of the Name class and provide the character string to the class's 
  18358. constructor.  For example, to demangle the name f__1XFi, create: 
  18359.  
  18360.    char *rest;
  18361.    Name *name = Demangle("f__1XFi", rest);
  18362.  
  18363. The demangling functions classify names into five categories: function names, 
  18364. member function names, special names, class names, and member variable names. 
  18365. After you construct an instance of class Name, you can use the Kind member 
  18366. function of Name to determine what kind of Name the instance is. Based on the 
  18367. kind of name returned, you can ask for the text of the different parts of the 
  18368. name or of the entire name. 
  18369.  
  18370. For the mangled name f__1XFi, you can determine: 
  18371.  
  18372.    name->Kind() == MemberFunction
  18373.    ((MemberFunctionName *) name)->Scope()->Text() is "X"
  18374.    ((MemberFunctionName *) name)->RootName() is "f"
  18375.    ((MemberFunctionName *) name)->Text() is "X::f(int)"
  18376.  
  18377. If the character string passed to the Name constructor is not a mangled name, 
  18378. the Demangle function returns NULL. 
  18379.  
  18380. For further details about the demangling functions and their C++ and C 
  18381. interfaces, refer to the information contained in the <demangle.h> header file. 
  18382. If you installed using the defaults, this header file should be in the INCLUDE 
  18383. directory under the main VisualAge C++ installation directory. 
  18384.  
  18385.  
  18386. ΓòÉΓòÉΓòÉ 22.2.2. Using the CPPFILT Utility ΓòÉΓòÉΓòÉ
  18387.  
  18388. The VisualAge C++ product also provides the CPPFILT utility to convert mangled 
  18389. names to demangled names. You can use this utility with: 
  18390.  
  18391.      An ASCII text file to substitute demangled names for any mangled names 
  18392.       found in the text. 
  18393.      A binary (object or library) file to produce a list of demangled names 
  18394.       including exported, public, and referenced symbol names. 
  18395.  
  18396.  All CPPFILT output is sent to stdout.  You can use the standard OS/2 
  18397.  redirection symbols to redirect the output to a file. 
  18398.  
  18399.  One of the applications of this utility is creating module definition files 
  18400.  for your C++ DLLs.  Because functions in the DLL have mangled names, when you 
  18401.  list the EXPORTS in your .DEF, you must use the mangled names.  You can use 
  18402.  the CPPFILT utility to extract all the names from the object module for you, 
  18403.  copy the ones you want to export into your .DEF file, and link your object 
  18404.  module into a DLL. 
  18405.  
  18406.  The CPPFILT syntax is: 
  18407.  
  18408.   ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18409.   Γöé                                        Γöé
  18410.   Γöé        ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ  ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ                  Γöé
  18411.   Γöé              Γöé         Γöé                  Γöé
  18412.   Γöé >>ΓöÇΓöÇCPPFILTΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼Γö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇ>< Γöé
  18413.   Γöé        ΓööΓöÇ/optionΓöÇΓöÿ   ΓööΓöÇfilenameΓöÇΓöÿ                   Γöé
  18414.   Γöé                                        Γöé
  18415.   ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18416.  
  18417.  where option is one or more CPPFILT options and filename is the name of the 
  18418.  file containing the mangled names.  If you do not specify a filename, CPPFILT 
  18419.  reads the input from stdin.  If you specify the /B option to run CPPFILT in 
  18420.  binary mode, you must specify a filename. The file specified must be in the 
  18421.  current directory unless you specify the full path name.  CPPFILT will also 
  18422.  search for library files along the paths specified in the LIB environment 
  18423.  variable if it cannot find them in the current directory. 
  18424.  
  18425.  You can specify options in upper- or lowercase and precede them with either a 
  18426.  slash (for example, /B) or a dash (-B). By default, all options are off. 
  18427.  
  18428.  Three options apply to both text and binary files: 
  18429.  
  18430.  /H or /? Display online help on the CPPFILT command syntax and options. 
  18431.  /Q      Suppress the logo and copyright notice display. 
  18432.  /S      Demangle compiler-generated symbol names. 
  18433.  
  18434.  The following options apply only to text files: 
  18435.  
  18436.  /C      Demangle stand-alone class names, meaning names that do not appear 
  18437.          within the context of a function name or member variable. The compiler 
  18438.          does not usually produce these names.  For example, Q2_1X1Y would be 
  18439.          demangled as X::Y if you specify /C.  Otherwise it is not demangled. 
  18440.  
  18441.  /M      Produce a symbol map containing a list of the mangled names and the 
  18442.          corresponding demangled names.  The symbol map is displayed after the 
  18443.          usual CPPFILT output. 
  18444.  
  18445.  /T      Replace each mangled name in the text with its demangled name followed 
  18446.          by the mangled name. (The default is to replace the mangled name with 
  18447.          the demangled name only.) 
  18448.  
  18449.  /W width Set the width of the field for demangled names in the output to width 
  18450.          characters.  If a demangled name is shorter than width, it is padded 
  18451.          to the right with blanks; if longer, it is truncated to width 
  18452.          characters.  If you do not specify the /W option, there is no fixed 
  18453.          width for the field. 
  18454.  
  18455.  The following options apply only to binary (object and library) files: 
  18456.  
  18457.  /B      Run in binary mode.  If you do not explicitly specify this option, 
  18458.          CPPFILT runs in text mode. 
  18459.  
  18460.  /N      Generate the NONAME keyword, used in EXPORTS statements in module 
  18461.          definition files, to indicate that the exported names should be 
  18462.          referenced by their ordinal numbers only and not by name.  Use this 
  18463.          option with the /O option. 
  18464.  
  18465.  /O [ord] Generate an ordinal number for each demangled name.  You can 
  18466.          optionally specify the ordinal number, ord, that CPPFILT should use as 
  18467.          the first number.  The ordinals are generated with the @ symbol and 
  18468.          are consistent with the module definition file syntax.  For example, 
  18469.          if you specify /O 1000, the output for the first name might look like: 
  18470.  
  18471.  
  18472.                   ;ILinkedSequenceImpl::isConsistent() const
  18473.                   isConsistent__19ILinkedSequenceImplCFv    @1000
  18474.          If you specify /O 1000 /N, the output for the same name would be: 
  18475.  
  18476.                   ;ILinkedSequenceImpl::isConsistent() const
  18477.                   isConsistent__19ILinkedSequenceImplCFv    @1000 NONAME
  18478.  
  18479.  /P      Include all public (COMDAT, COMDEF, or PUBDEF) symbols in the output. 
  18480.          Note that if a COMDAT symbol occurs more than once, only the first 
  18481.          occurrence is included in the output. Subsequent occurrences of the 
  18482.          symbol appear in the output as comments. 
  18483.  
  18484.  /R      Include all referenced (EXTDEF) symbols in the output. 
  18485.  
  18486.  /X      Include all exported (EXPDEF) symbols in the output. 
  18487.  
  18488.  Note:  If you do not specify any of /P, /R, or /X options in binary mode, the 
  18489.  output includes only the demangled library and object names without any symbol 
  18490.  names. 
  18491.  
  18492.  For example, given the command: 
  18493.  
  18494.      CPPFILT /B /P /O 1000 /N C:\IBMCPP\LIB\DDE4CC.LIB
  18495.  CPPFILT would produce output like the following: 
  18496.  
  18497.   ;From library:  c:\ibmcpp\lib\dde4cc.lib
  18498.    ;From object file:  C:\ibmcpp\src\IILNSEQ.C
  18499.     ;PUBDEFs (Symbols available from object file):
  18500.      ;ILinkedSequenceImpl::setToPrevious(ILinkedSequenceImpl::Node*&) const
  18501.      setToPrevious__19ILinkedSequenceImplCFRPQ2_19ILinkedSequenceImpl4Node    @1000 NONAME
  18502.      ;ILinkedSequenceImpl::allElementsDo(void*,void*) const
  18503.      allElementsDo__19ILinkedSequenceImplCFPvT1    @1001 NONAME
  18504.      ;ILinkedSequenceImpl::isConsistent() const
  18505.      isConsistent__19ILinkedSequenceImplCFv    @1002 NONAME
  18506.      ;ILinkedSequenceImpl::setToNext(ILinkedSequenceImpl::Node*&) const
  18507.      setToNext__19ILinkedSequenceImplCFRPQ2_19ILinkedSequenceImpl4Node    @1003 NONAME
  18508.      ;ILinkedSequenceImpl::addAsNext(ILinkedSequenceImpl::Node*, ILinkedSequenceImpl::Node*)
  18509.      addAsNext__19ILinkedSequenceImplFPQ2_19ILinkedSequenceImpl4NodeT1    @1004 NONAME
  18510.    ;From object file:  C:\ibmcpp\src\IITBSEQ.C
  18511.     ;PUBDEFs (Symbols available from object file):
  18512.      ;ITabularSequenceImpl::setToPrevious(ITabularSequenceImpl::Cursor&) const
  18513.      setToPrevious__20ITabularSequenceImplCFRQ2_20ITabularSequenceImpl6Cursor    @1034 NONAME
  18514.      ;ITabularSequenceImpl::allElementsDo(void*)
  18515.      allElementsDo__20ITabularSequenceImplFPv    @1035 NONAME
  18516.      ;ITabularSequenceImpl::removeAll(void*,void*)
  18517.      removeAll__20ITabularSequenceImplFPvT1    @1036 NONAME
  18518.      ;ITabularSequenceImpl::addAllFrom(const ITabularSequenceImpl&)
  18519.      addAllFrom__20ITabularSequenceImplFRC20ITabularSequenceImpl    @1037 NONAME
  18520.    ;From object file:  IIAVLKSS.C
  18521.     ;PUBDEFs (Symbols available from object file):
  18522.      ;IAvlKeySortedSetImpl::allElementsDo(void*,void*) const
  18523.      allElementsDo__20IAvlKeySortedSetImplCFPvT1    @1080 NONAME
  18524.      ;IAvlKeySortedSetImpl::isFirst
  18525.   (const IAvlKeySortedSetImpl::Node*) const
  18526.      isFirst__20IAvlKeySortedSetImplCFPCQ2_20IAvlKeySortedSetImpl4Node    @1081 NONAME
  18527.      ;IAvlKeySortedSetImpl::setToPosition(unsigned long,IAvlKeySortedSetImpl::Node*&) const
  18528.      setToPosition__20IAvlKeySortedSetImplCFUlRPQ2_20IAvlKeySortedSetImpl4Node    @1082 NONAME
  18529.      ;IAvlKeySortedSetImpl::locateOrAddElementWithKey(const void*)
  18530.      locateOrAddElementWithKey__20IAvlKeySortedSetImplFPCv    @1083 NONAME
  18531.      .
  18532.      .
  18533.      .
  18534.  
  18535.  
  18536. ΓòÉΓòÉΓòÉ 22.3. Data Mapping ΓòÉΓòÉΓòÉ
  18537.  
  18538. The following section lists each data format and its equivalent C type in 
  18539. VisualAge C++ product, including the alignment and mapping for each. 
  18540.  
  18541. Automatic Variables  When optimization is turned off (/O-), automatic variables 
  18542.                      have the same mapping as other variables, but they are 
  18543.                      mapped on the stack instead of in a data segment. Because 
  18544.                      memory on the stack is constantly reallocated on the 
  18545.                      stack, automatic variables are not guaranteed to be 
  18546.                      retained after the return of the function that used them. 
  18547.  
  18548. When optimization is on, automatic variables are mapped as follows: 
  18549.  
  18550.  Size of Object          Alignment 
  18551.  1-byte                  Byte-aligned 
  18552.  2-byte                  Word-aligned 
  18553.  3-byte and greater      Doubleword-aligned 
  18554.  Note that the variables are ordered to minimize padding. 
  18555.  
  18556.  In VisualAge C++ product, a word consists of 2 bytes (or 16 bits) and a 
  18557.  doubleword consists of 4 bytes (32 bits). 
  18558.  
  18559.    1. Single-Byte Character 
  18560.  
  18561.       Type                  signed char and unsigned char 
  18562.  
  18563.       Alignment             Byte-aligned. 
  18564.  
  18565.       Storage mapping       Stored in 1 byte. 
  18566.  
  18567.  
  18568.    2. Two-Byte Integer 
  18569.  
  18570.       Type                  short and its signed and unsigned counterparts 
  18571.  
  18572.       Alignment             Word-aligned. 
  18573.  
  18574.       Storage mapping       Byte-reversed, for example, 0x3B2C (where 2C is the 
  18575.                             least significant byte and 3B is the most 
  18576.                             significant byte) is represented in storage as: 
  18577.  
  18578.                                                         Toward high memory 
  18579.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18580.                                                         Γöé BYTEΓöé BYTEΓöé
  18581.                                                         Γöé 0  Γöé 1  Γöé
  18582.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18583.                                                         Γöé 2C  Γöé 3B  Γöé
  18584.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18585.  
  18586.  
  18587.    3. Four-Byte Integer 
  18588.  
  18589.       Type                  long, int, and their signed and unsigned 
  18590.                             counterparts 
  18591.  
  18592.       Alignment             Doubleword-aligned. 
  18593.  
  18594.       Storage mapping       Byte-reversed, for example, 0x4A5D3B2C (where 2C is 
  18595.                             the least significant byte and 4A is the most 
  18596.                             significant byte) is represented in storage as: 
  18597.  
  18598.                                                         Toward high memory 
  18599.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18600.                                                         Γöé BYTEΓöé BYTEΓöé BYTEΓöé BYTEΓöé
  18601.                                                         Γöé 0  Γöé 1  Γöé 2  Γöé 3  Γöé
  18602.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18603.                                                         Γöé 2C  Γöé 3B  Γöé 5D  Γöé 4A  Γöé
  18604.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18605.  
  18606.  
  18607.       Note on IEEE Format 
  18608.  
  18609.       In IEEE format, a floating point number is represented in terms of sign 
  18610.       (S), exponent (E), and fraction (F): 
  18611.  
  18612.               (-1)[S] x 2[E] x 1.F
  18613.  
  18614.       In the diagrams that follow, the first two rows number the bits. Read 
  18615.       them vertically from top to bottom.  The last row indicates the storage 
  18616.       of the parts of the number. 
  18617.  
  18618.  
  18619.    4. Four-Byte Floating Point (IEEE Format) 
  18620.  
  18621.       Type                  float 
  18622.  
  18623.       Alignment             Doubleword-aligned. 
  18624.  
  18625.       Bit mapping           In the internal representation, there is 1 bit for 
  18626.                             the sign (S), 8 bits for the exponent (E), and 23 
  18627.                             bits for the fraction (F). The bits are mapped with 
  18628.                             the fraction in bit 0 to bit 22, the exponent in 
  18629.                             bit 23 to bit 30, and the sign in bit 31: 
  18630.  
  18631.                                                         3 32222222 2221111111111
  18632.                                                         1 09876543 21098765432109876543210
  18633.  
  18634.                                                         S EEEEEEEE FFFFFFFFFFFFFFFFFFFFFFF
  18635.  
  18636.       Storage mapping       The storage mapping is as follows: 
  18637.  
  18638.                                                         Toward high memory 
  18639.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18640.                                                         Γöé BYTE 0   Γöé BYTE 1   Γöé BYTE 2   Γöé BYTE 3   Γöé
  18641.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18642.                                                         Γöé      Γöé 111111   Γöé 22221111  Γöé 33222222  Γöé
  18643.                                                         Γöé 76543210  Γöé 54321098  Γöé 32109876  Γöé 10987654  Γöé
  18644.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18645.                                                         Γöé FFFFFFFF  Γöé FFFFFFFF  Γöé EFFFFFFF  Γöé SEEEEEEE  Γöé
  18646.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18647.  
  18648.  
  18649.    5. Eight-Byte Floating Point (IEEE Format) 
  18650.  
  18651.       Type                  double 
  18652.  
  18653.       Alignment             Doubleword-aligned on the 80386 
  18654.  
  18655.       Bit mapping           In the internal representation, there is 1 bit for 
  18656.                             the sign (S), 11 bits for the exponent (E), and 52 
  18657.                             bits for the fraction (F). The bits are mapped with 
  18658.                             the fraction in bit 0 to bit 51, the exponent in 
  18659.                             bit 52 to bit 62, and the sign in bit 63: 
  18660.  
  18661.                                                         6 66655555555 554444444444333333333322222222221111111111
  18662.                                                         3 21098765432 1098765432109876543210987654321098765432109876543210
  18663.  
  18664.                                                         S EEEEEEEEEEE FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  18665.  
  18666.       Storage mapping       The storage mapping is as follows: 
  18667.  
  18668.                                                         Toward high memory 
  18669.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18670.                                                         Γöé BYTE 0   Γöé BYTE 1   Γöé BYTE 2   Γöé ...  Γöé
  18671.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18672.                                                         Γöé      Γöé 111111   Γöé 22221111  Γöé ...  Γöé
  18673.                                                         Γöé 76543210  Γöé 54321098  Γöé 32109876  Γöé    Γöé
  18674.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18675.                                                         Γöé FFFFFFFF  Γöé FFFFFFFF  Γöé FFFFFFFF  Γöé ...  Γöé
  18676.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18677.  
  18678.                                                         Toward high memory 
  18679.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18680.                                                         Γöé BYTE 5   Γöé BYTE 6   Γöé BYTE 7   Γöé
  18681.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18682.                                                         Γöé 44444444  Γöé 55555544  Γöé 66665555  Γöé
  18683.                                                         Γöé 76543210  Γöé 54321098  Γöé 32109876  Γöé
  18684.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18685.                                                         Γöé FFFFFFFF  Γöé EEEEFFFF  Γöé SEEEEEEE  Γöé
  18686.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18687.  
  18688.  
  18689.    6. Ten-Byte Floating Point in Sixteen-Byte Field (IEEE Format) 
  18690.  
  18691.       Type                  long double 
  18692.  
  18693.       Alignment             Doubleword-aligned on the 80386 
  18694.  
  18695.       Bit mapping           In the internal representation, there is 1 bit for 
  18696.                             the sign (S), 15 bits for the exponent (E), and 64 
  18697.                             bits for the fraction (F).  The bits are mapped 
  18698.                             with the fraction in bit 0 to bit 63, the exponent 
  18699.                             in bit 64 to bit 78, and the sign in bit 79: 
  18700.  
  18701.                                                         7 777777777666666
  18702.                                                         9 876543210987654
  18703.  
  18704.                                                         S EEEEEEEEEEEEEEE
  18705.  
  18706.                                                         666655555555554444444444333333333322222222221111111111
  18707.                                                         3210987654321098765432109876543210987654321098765432109876543210
  18708.  
  18709.                                                         FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
  18710.  
  18711.       Storage mapping       The storage mapping is as follows: 
  18712.  
  18713.                                                         Toward high memory 
  18714.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18715.                                                         Γöé BYTE 0   Γöé BYTE 1   Γöé BYTE 2   Γöé ...  Γöé
  18716.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18717.                                                         Γöé      Γöé 111111   Γöé 22221111  Γöé ...  Γöé
  18718.                                                         Γöé 76543210  Γöé 54321098  Γöé 32109876  Γöé    Γöé
  18719.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18720.                                                         Γöé FFFFFFFF  Γöé FFFFFFFF  Γöé FFFFFFFF  Γöé ...  Γöé
  18721.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18722.  
  18723.                                                         Toward high memory 
  18724.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18725.                                                         Γöé BYTE 7   Γöé BYTE 8   Γöé BYTE 9   Γöé
  18726.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18727.                                                         Γöé 66666555  Γöé 77666666  Γöé 77777777  Γöé
  18728.                                                         Γöé 43210987  Γöé 10987654  Γöé 98765432  Γöé
  18729.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18730.                                                         Γöé FFFFFFFF  Γöé EEEEEEEE  Γöé SEEEEEEE  Γöé
  18731.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18732.  
  18733.  
  18734.    7. Null-Terminated Character Strings 
  18735.  
  18736.       Type                  char string[n] 
  18737.  
  18738.       Size                  Length of string (not including null). 
  18739.  
  18740.       Alignment             Byte-aligned. If the length of the string is 
  18741.                             greater than a doubleword, the string is 
  18742.                             doubleword-aligned. 
  18743.  
  18744.       Storage mapping       The string "STRING" is stored in adjacent bytes as: 
  18745.  
  18746.                                                         Toward high memory 
  18747.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18748.                                                         Γöé BYTE 0  Γöé BYTE 1  Γöé BYTE 2   Γöé BYTE 3  Γöé BYTE 4   Γöé BYTE 5  Γöé BYTE 6  Γöé
  18749.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18750.                                                         Γöé "'S'"   Γöé "'T'"   Γöé "'R'"   Γöé "'I'"   Γöé "'N'"   Γöé "'G'"   Γöé "'\0'"  Γöé
  18751.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18752.  
  18753.  
  18754.    8. Fixed-Length Arrays Containing Simple Data Types 
  18755.  
  18756.       Type                  The corresponding VisualAge C++ declaration depends 
  18757.                             on the simple data type in the array. For an array 
  18758.                             of int, for example, you would use something like: 
  18759.  
  18760.                                                            int int_array[n];
  18761.                             For an array of float, you would use something 
  18762.                             like: 
  18763.  
  18764.                                                            float float_array[n];
  18765.  
  18766.       Size                  n * (s + p), where n is the number of elements in 
  18767.                             the array, s is the size of each element, and p is 
  18768.                             the alignment padding. 
  18769.  
  18770.       Alignment             The alignment is the same as that of the simple 
  18771.                             data type of the array elements. For instance, an 
  18772.                             array of short elements would be word-aligned, 
  18773.                             while an array of int elements would be 
  18774.                             doubleword-aligned. If the length of the array is 
  18775.                             greater than a doubleword, the array is 
  18776.                             doubleword-aligned. 
  18777.  
  18778.       Storage mapping       The first element of the array is placed in the 
  18779.                             first storage position.  For multidimensional 
  18780.                             arrays, row-major ordering is used. 
  18781.  
  18782.  
  18783.    9. Aligned Structures 
  18784.  
  18785.       Type                  struct 
  18786.  
  18787.       Size                  Sum of the sizes for each type in the struct plus 
  18788.                             padding for alignment. 
  18789.  
  18790.       Alignment             The first element of the structure is aligned 
  18791.                             according to the alignment rule of the element that 
  18792.                             has the most restrictive alignment rule. If the 
  18793.                             length of the structure is greater than a 
  18794.                             doubleword, the structure is doubleword-aligned. 
  18795.                             The alignment of the individual members is not 
  18796.                             changed. In the following example, types char, 
  18797.                             short, and float are used in the struct.  Because 
  18798.                             float must be aligned on the doubleword boundary, 
  18799.                             and because this is the most restrictive alignment 
  18800.                             rule, the first element must be aligned on the 
  18801.                             doubleword boundary even though it is only a char. 
  18802.  
  18803.                             Note:  The first element will not necessarily 
  18804.                             occupy a doubleword, but it will be aligned on it. 
  18805.  
  18806.                                                            struct y {
  18807.                                                                       char char1;     /* aligns on doubleword */
  18808.                                                                       short short1;   /* aligns on word */
  18809.                                                                       char char2;     /* aligns on byte */
  18810.                                                                       float float1;   /* aligns on doubleword */
  18811.                                                                       char char3      /*aligns on byte */
  18812.                                                                     };
  18813.  
  18814.       Storage mapping       The struct is stored as follows: 
  18815.  
  18816.                                                         Toward high memory 
  18817.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18818.                                                         Γöé BYTE 0   Γöé BYTE 1   Γöé BYTE 2    Γöé BYTE 3   Γöé BYTE 4   Γöé BYTE 5   Γöé
  18819.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18820.                                                         Γöé "char1"   Γöé pad     Γöé "short1"   Γöé "short1"  Γöé "char2"   Γöé pad     Γöé
  18821.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18822.  
  18823.                                                         Toward high memory 
  18824.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18825.                                                         Γöé BYTE 6 Γöé BYTE 7 Γöé BYTE 8 Γöé BYTE 9 Γöé BYTE  Γöé
  18826.                                                         Γöé     Γöé     Γöé     Γöé     Γöé 10   Γöé
  18827.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18828.                                                         Γöé pad   Γöé pad   Γöé "float1Γöé "float1Γöé "float1Γöé
  18829.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18830.  
  18831.                                                         Toward high memory 
  18832.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18833.                                                         Γöé BYTE  Γöé BYTE  Γöé BYTE  Γöé BYTE  Γöé BYTE  Γöé
  18834.                                                         Γöé 11   Γöé 12   Γöé 13   Γöé 14   Γöé 15   Γöé
  18835.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18836.                                                         Γöé "float1Γöé "char3"Γöé pad   Γöé pad   Γöé pad   Γöé
  18837.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18838.  
  18839.                             Note:  This mapping is also true for aligned 
  18840.                             structures in C++ as long as the structure does not 
  18841.                             contain virtual base classes or virtual functions. 
  18842.  
  18843.  
  18844.   10. Unaligned or Packed Structures 
  18845.  
  18846.       Type                  The definition of the structure variable is 
  18847.                             preceded by the keyword _Packed, or the #pragma 
  18848.                             pack directive  or /Sp option is used. For 
  18849.                             instance, the following definition would create a 
  18850.                             packed struct called mystruct with the type struct 
  18851.                             y (defined above): 
  18852.  
  18853.                                                            _Packed struct y mystruct
  18854.  
  18855.       Size                  The sum of the sizes of each type that makes up the 
  18856.                             struct. 
  18857.  
  18858.       Storage mapping       When the _Packed keyword, the #pragma pack(1) 
  18859.                             directive, or /Sp(1) option is used, the structure 
  18860.                             mystruct is stored as follows: 
  18861.  
  18862.                                                         Toward high memory 
  18863.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18864.                                                         Γöé BYTE 0     Γöé BYTE 1     Γöé BYTE 2     Γöé BYTE 3     Γöé BYTE 4    Γöé
  18865.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18866.                                                         Γöé "char1"    Γöé "short1"    Γöé "short1"    Γöé "char2"    Γöé "float1"   Γöé
  18867.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18868.  
  18869.                                                         Toward high memory 
  18870.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18871.                                                         Γöé BYTE 5       Γöé BYTE 6       Γöé BYTE 7       Γöé BYTE 8      Γöé
  18872.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18873.                                                         Γöé "float1"      Γöé "float1"      Γöé "float1"      Γöé "char3"      Γöé
  18874.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18875.                             When #pragma pack(2) or the /Sp(2) option is used, 
  18876.                             mystruct is stored as follows: 
  18877.  
  18878.                                                         Toward high memory 
  18879.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18880.                                                         Γöé BYTE 0   Γöé BYTE 1   Γöé BYTE 2    Γöé BYTE 3   Γöé BYTE 4   Γöé BYTE 5   Γöé
  18881.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18882.                                                         Γöé "char1"   Γöé pad     Γöé "short1"   Γöé "short1"  Γöé "char2"   Γöé pad     Γöé
  18883.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18884.  
  18885.                                                         Toward high memory 
  18886.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18887.                                                         Γöé BYTE 6   Γöé BYTE 7   Γöé BYTE 8    Γöé BYTE 9   Γöé BYTE 10   Γöé BYTE 11   Γöé
  18888.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18889.                                                         Γöé "float1"  Γöé "float1"  Γöé "float1"   Γöé "float1"  Γöé "char3"   Γöé pad     Γöé
  18890.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18891.  
  18892.                             Note:  This mapping is also true for aligned 
  18893.                             structures in C++ as long as the structure does not 
  18894.                             contain virtual base classes or virtual functions. 
  18895.  
  18896.  
  18897.   11. Arrays of Structures 
  18898.  
  18899.       Type                  The definition for an array of struct would look 
  18900.                             like: 
  18901.  
  18902.                                                            struct y mystruct_array[n]
  18903.                             The definition of an array of _Packed struct would 
  18904.                             look like: 
  18905.  
  18906.                                                            _Packed struct y mystruct_array[n]
  18907.  
  18908.       Alignment             Each structure is aligned according to the 
  18909.                             structure alignment rules. This may cause a 
  18910.                             fixed-length gap between consecutive structures. In 
  18911.                             the case of packed structures, there is no padding. 
  18912.  
  18913.       Storage mapping       The first element of the array is placed in the 
  18914.                             first storage position.  Row-major ordering is used 
  18915.                             for multidimensional arrays. 
  18916.  
  18917.                             Note:  This mapping is also true for aligned 
  18918.                             structures in C++ as long as the structure does not 
  18919.                             contain virtual base classes or virtual functions. 
  18920.  
  18921.  
  18922.   12. Structures Containing Bit Fields 
  18923.  
  18924.       Type                  struct 
  18925.  
  18926.       Size                  The sum of the sizes for each type in the struct 
  18927.                             plus padding for alignment. 
  18928.  
  18929.       Alignment             Each structure is aligned according to the 
  18930.                             structure alignment rules. 
  18931.  
  18932.       Storage mapping       Given the following structure: 
  18933.  
  18934.                                                            struct s {
  18935.                                                                       char a;
  18936.                                                                       int b1:4;
  18937.                                                                       int b2:6;
  18938.                                                                       int b3:1;
  18939.                                                                       int   :0;
  18940.                                                                       int b4:7;
  18941.                                                                       char c;
  18942.                                                                     }
  18943.                             struct s would be stored as follows: 
  18944.  
  18945.  
  18946.                                                         ΓöîΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÉ
  18947.                                                         Γöé  byte  Γöé  byte  Γöé  byte  Γöé  byte  Γöé  byte  Γöé  byte  Γöé
  18948.                                                         Γöé  0   Γöé  1   Γöé  2   Γöé  3   Γöé  4   Γöé  5   Γöé
  18949.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöñ
  18950.                                                         Γöé     Γöé   1  Γöé 1 1   2     3    3 4     4 bits
  18951.                                                         0     8   2  Γöé 8 9   4     2    9 0     8 used
  18952.                                                         Γö£ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓöÇΓöÇΓö┤ΓöÇΓö¼ΓöÇΓö¼ΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö¼ΓöÇΓö╝ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöé
  18953.                                                         Γöé  a   Γöé b1 Γöé b2  ΓöébΓöépad Γöé  pad  Γöé  b4  Γöé Γöé  c   Γöé
  18954.                                                         Γöé     Γöé   Γöé   Γöé3Γöé   Γöé     Γöé    Γöé Γöé     Γöé
  18955.                                                         ΓööΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓö┤ΓöÇΓö┤ΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÇΓöÿ
  18956.                                                                               
  18957.                                                                               Γöé
  18958.                                                                               pad
  18959.  
  18960.                             Note: 
  18961.  
  18962.                               a. The second row of the table counts the number 
  18963.                                  of bits used and should be read vertically 
  18964.                                  top-to-bottom. Bits are allocated from 
  18965.                                  least-significant to most-significant within 
  18966.                                  each byte.  In the diagram above, the 
  18967.                                  least-significant bit is on the left. 
  18968.  
  18969.                               b. This mapping is also true for aligned 
  18970.                                  structures in C++ as long as the structure 
  18971.                                  does not contain virtual base classes or 
  18972.                                  virtual functions. 
  18973.  
  18974.  
  18975. ΓòÉΓòÉΓòÉ 23. Glossary ΓòÉΓòÉΓòÉ
  18976.  
  18977. This glossary defines terms and abbreviations that are used in this book. 
  18978. Included are terms and definitions from the following sources: 
  18979.  
  18980.      American National Standard Dictionary for Information Systems, ANSI 
  18981.       X3.172-1990, copyright 1990 by the American National Standards Institute 
  18982.       (ANSI). Copies may be purchased from the American National Standards 
  18983.       Institute, 1430 Broadway, New York, New York 10018. Such definitions are 
  18984.       indicated by the symbol ANSI after the definition. 
  18985.  
  18986.      IBM Dictionary of Computing, SC20-1699. These definitions are indicated 
  18987.       by the registered trademark IBM after the definition. 
  18988.  
  18989.      X/Open CAE Specification.  Commands and Utilities, Issue 4.  July, 1992. 
  18990.       These definitions are indicated by the symbol X/Open after the 
  18991.       definition. 
  18992.  
  18993.      ISO/IEC 9945-1:1990/IEEE POSIX 1003.1-1990. These definitions are 
  18994.       indicated by the symbol ISO.1 after the definition. 
  18995.  
  18996.      The Information Technology Vocabulary, developed by Subcommittee 1, Joint 
  18997.       Technical Committee 1, of the International Organization for 
  18998.       Standardization and the International Electrotechnical Commission 
  18999.       (ISO/IEC JTC1/SC1). Definitions of published parts of this vocabulary are 
  19000.       identified by the symbol ISO-JTC1 after the definition; definitions taken 
  19001.       from draft international standards, committee drafts, and working papers 
  19002.       being developed by ISO/IEC JTC1/SC1 are identified by the symbol ISO 
  19003.       Draft after the definition, indicating that final agreement has not yet 
  19004.       been reached among the participating National Bodies of SC1. 
  19005.  
  19006.   _______________________________________________________________________________________________________
  19007.  
  19008.   A              J              S
  19009.   B              K              T
  19010.   C              L              U
  19011.   D              M              V
  19012.   E              N              W
  19013.   F              O              X
  19014.   G              P              Y
  19015.   H              Q              Z
  19016.   I              R
  19017.  
  19018.  
  19019. ΓòÉΓòÉΓòÉ <hidden> A ΓòÉΓòÉΓòÉ
  19020.  
  19021.  abstract class 
  19022.  
  19023.              1. A class with at least one pure virtual function that is used as 
  19024.                 a base class for other classes. The abstract class represents a 
  19025.                 concept; classes derived from it represent implementations of 
  19026.                 the concept. You cannot have a direct object of an abstract 
  19027.                 class. See also base class. 
  19028.  
  19029.              2. A class that allows polymorphism. There can be no objects of an 
  19030.                 abstract class; they are only used to derive new classes. 
  19031.  
  19032.  abstraction (data) A data type with a private representation and a public set 
  19033.            of operations. The C++ language uses the concept of classes to 
  19034.            implement data abstraction. 
  19035.  
  19036.  access    An attribute that determines whether or not a class member is 
  19037.            accessible in an expression or declaration. 
  19038.  
  19039.  access specifier One of the C++ keywords: public, private, and protected, used 
  19040.            to define the access to a member. 
  19041.  
  19042.  additional heap 
  19043.  
  19044.              1. A Language Environment heap created and controlled by a call to 
  19045.                 CEECRHP. See also below heap, anywhere heap, and initial heap. 
  19046.  
  19047.  address space 
  19048.  
  19049.              1. The range of addresses available to a computer program. ANSI. 
  19050.  
  19051.              2. The complete range of addresses that are available to a 
  19052.                 programmer. See also virtual address space. 
  19053.  
  19054.              3. In the AIX operating system, the code, stack, and data that are 
  19055.                 accessible by a process. 
  19056.  
  19057.              4. The area of virtual storage available for a particular job. 
  19058.  
  19059.              5. The memory locations that can be referenced by a process. 
  19060.                 X/Open. ISO.1. 
  19061.  
  19062.  aggregate 
  19063.  
  19064.              1. An array or a structure. 
  19065.  
  19066.              2. A compile-time option to show the layout of a structure or 
  19067.                 union in the listing. 
  19068.  
  19069.              3. An array or a class object with no private or protected 
  19070.                 members, no constructors, no base classes, and no virtual 
  19071.                 functions. 
  19072.  
  19073.              4. In programming languages, a structured collection of data items 
  19074.                 that form a data type. ISO-JTC1. 
  19075.  
  19076.  alert 
  19077.  
  19078.              1. A message sent to a management services focal point in a 
  19079.                 network to identify a problem or an impending problem. IBM. 
  19080.  
  19081.              2. To cause the user's terminal to give some audible or visual 
  19082.                 indication that an error or some other event has occurred. When 
  19083.                 the standard output is directed to a terminal device, the 
  19084.                 method for alerting the terminal user is unspecified. When the 
  19085.                 standard output is not directed to a terminal device, the alert 
  19086.                 is accomplished by writing the alert character to standard 
  19087.                 output (unless the utility description indicates that the use 
  19088.                 of standard output produces undefined results in this case). 
  19089.                 X/Open. 
  19090.  
  19091.  alignment The storing of data in relation to certain machine-dependent 
  19092.            boundaries. IBM. 
  19093.  
  19094.  American National Standards Institute See ANSI. 
  19095.  
  19096.  angle brackets The characters < (left angle bracket) and > (right angle 
  19097.            bracket). When used in the phrase "enclosed in angle brackets", the 
  19098.            symbol < immediately precedes the object to be enclosed, and > 
  19099.            immediately follows it. When describing these characters in the 
  19100.            portable character set, the names <less-than-sign> and 
  19101.            <greater-than-sign> are used. X/Open. 
  19102.  
  19103.  ANSI (American National Standards Institute) An organization consisting of 
  19104.            producers, consumers, and general interest groups, that establishes 
  19105.            the procedures by which accredited organizations create and maintain 
  19106.            voluntary industry standards in the United States. ANSI. 
  19107.  
  19108.  anywhere heap The VisualAge C++ heap controlled by the ANYHEAP run-time 
  19109.            option. It contains library data, such as VisualAge C++ control 
  19110.            blocks and data structures not normally accessible from user code. 
  19111.            The anywhere heap may reside above 16M. See also below heap, 
  19112.            additional heap, initial heap. 
  19113.  
  19114.  application 
  19115.  
  19116.              1. The use to which an information processing system is put; for 
  19117.                 example, a payroll application, an airline reservation 
  19118.                 application, a network application. IBM. 
  19119.  
  19120.              2. A collection of software components used to perform specific 
  19121.                 types of user-oriented work on a computer. IBM. 
  19122.  
  19123.  application program A program written for or by a user that applies to the 
  19124.            user's work, such as a program that does inventory control or 
  19125.            payroll. IBM. 
  19126.  
  19127.  argument 
  19128.  
  19129.              1. A parameter passed between a calling program and a called 
  19130.                 program. IBM. 
  19131.  
  19132.              2. In a function call, an expression that represents a value that 
  19133.                 the calling function passes to the function specified in the 
  19134.                 call. Also called parameter. 
  19135.  
  19136.              3. In the shell, a parameter passed to a utility as the equivalent 
  19137.                 of a single string in the argv array created by one of the exec 
  19138.                 functions. An argument is one of the options, option-arguments, 
  19139.                 or operands following the command name. X/Open. 
  19140.  
  19141.  array     In programming languages, an aggregate that consists of data 
  19142.            objects, with identical attributes, each of which may be uniquely 
  19143.            referenced by subscripting. IBM. 
  19144.  
  19145.  array element A data item in an array. IBM. 
  19146.  
  19147.  ASCII (American National Standard Code for Information Interchange) The 
  19148.            standard code, using a coded character set consisting of 7-bit coded 
  19149.            characters (8 bits including parity check), that is used for 
  19150.            information interchange among data processing systems, data 
  19151.            communication systems, and associated equipment. The ASCII set 
  19152.            consists of control characters and graphic characters. IBM. 
  19153.  
  19154.            Note:  IBM has defined an extension to ASCII code (characters 
  19155.            128-255). 
  19156.  
  19157.  assembler user exit In the Language Environment a routine to tailor the 
  19158.            characteristics of an enclave prior to its establishment. 
  19159.  
  19160.  automatic data Data that does not persist after a routine has finished 
  19161.            executing. Automatic data may be automatically initialized to a 
  19162.            certain value upon entry and reentry to a routine. 
  19163.  
  19164.  automatic storage Storage that is allocated on entry to a routine or block and 
  19165.            is freed on the subsequent return. Sometimes referred to as stack 
  19166.            storage or dynamic storage. 
  19167.  
  19168.  
  19169. ΓòÉΓòÉΓòÉ <hidden> B ΓòÉΓòÉΓòÉ
  19170.  
  19171.  backslash The character \. This character is named <backslash> in the portable 
  19172.            character set. 
  19173.  
  19174.  base class A class from which other classes are derived. A base class may 
  19175.            itself be derived from another base class. See also abstract class. 
  19176.  
  19177.  based on  The use of existing classes for implementing new classes. 
  19178.  
  19179.  below heap The VisualAge C++ heap controlled by the BELOWHEAP runtime option, 
  19180.            which contains library data, such as VisualAge C++ control block and 
  19181.            data structures not normally accessible from user code. Below heap 
  19182.            always resides below 16M. See also anywhere heap, initial heap, 
  19183.            additional heap. 
  19184.  
  19185.  binary stream 
  19186.  
  19187.              1. An ordered sequence of untranslated characters. 
  19188.  
  19189.              2. A sequence of characters that corresponds on a one-to-one basis 
  19190.                 with the characters in the file. No character translation is 
  19191.                 performed on binary streams. IBM. 
  19192.  
  19193.  bit field A member of a structure or union that contains a specified number of 
  19194.            bits. IBM. 
  19195.  
  19196.  block 
  19197.  
  19198.              1. In programming languages, a compound statement that coincides 
  19199.                 with the scope of at least one of the declarations contained 
  19200.                 within it. A block may also specify storage allocation or 
  19201.                 segment programs for other purposes. ISO-JTC1. 
  19202.  
  19203.              2. A string of data elements recorded or transmitted as a unit. 
  19204.                 The elements may be characters, words or physical records. ISO 
  19205.                 Draft. 
  19206.  
  19207.              3. The unit of data transmitted to and from a device. Each block 
  19208.                 contains one record, part of a record, or several records. 
  19209.  
  19210.  brackets  The characters [ (left bracket) and ] (right bracket), also known as 
  19211.            square brackets. When used in the phrase "enclosed in (square) 
  19212.            brackets" the symbol [ immediately precedes the object to be 
  19213.            enclosed, and ] immediately follows it. When describing these 
  19214.            characters in the portable character set, the names <left-bracket> 
  19215.            and <right-bracket> are used. X/Open. 
  19216.  
  19217.  breakpoint A point in a computer program where execution may be halted. A 
  19218.            breakpoint is usually at the beginning of an instruction where 
  19219.            halts, caused by external intervention, are convenient for resuming 
  19220.            execution. ISO Draft. 
  19221.  
  19222.  built-in 
  19223.  
  19224.              1. A function that the compiler will automatically inline instead 
  19225.                 of making the function call, unless the programmer specifies 
  19226.                 not to inline. 
  19227.  
  19228.              2. In programming languages, pertaining to a language object that 
  19229.                 is declared by the definition of the programming language; for 
  19230.                 example the built-in function SIN in PL/I, the predefined data 
  19231.                 type INTEGER in FORTRAN. ISO-JTC1.  Synonymous with predefined. 
  19232.                 IBM. 
  19233.  
  19234.  
  19235. ΓòÉΓòÉΓòÉ <hidden> C ΓòÉΓòÉΓòÉ
  19236.  
  19237.  C++ class library See class library. 
  19238.  
  19239.  C++ library A system library that contains common C++ language subroutines for 
  19240.            file access, memory allocation, and other functions. 
  19241.  
  19242.  call      To transfer control to a procedure, program, routine, or subroutine. 
  19243.            IBM. 
  19244.  
  19245.  caller    A routine that calls another routine. 
  19246.  
  19247.  carriage-return character A character that in the output stream indicates that 
  19248.            printing should start at the beginning of the same physical line in 
  19249.            which the carriage-return character occurred. The carriage-return is 
  19250.            the character designated by '\r' in the C and C++ languages. It is 
  19251.            unspecified whether this character is the exact sequence transmitted 
  19252.            to an output device by the system to accomplish the movement to the 
  19253.            beginning of the line. X/Open. 
  19254.  
  19255.  CASE (Computer-Aided Software Engineering) A set of tools or programs to help 
  19256.            develop complex applications. IBM. 
  19257.  
  19258.  cast      In the C and C++ languages, an expression that converts the type of 
  19259.            the operand to a specified data type (the operator). IBM. 
  19260.  
  19261.  character 
  19262.  
  19263.              1. A letter, digit, or other symbol that is used as part of the 
  19264.                 organization, control, or representation of data. A character 
  19265.                 is often in the form of a spatial arrangement of adjacent or 
  19266.                 connected strokes. ANSI. 
  19267.  
  19268.              2. A sequence of one or more bytes representing a single graphic 
  19269.                 symbol or control code. This term corresponds to the ISO C 
  19270.                 standard term multibyte character (multi-byte character), where 
  19271.                 a single-byte character is a special case of the multi-byte 
  19272.                 character. Unlike the usage in the ISO C standard, character 
  19273.                 here has no necessary relationship with storage space, and byte 
  19274.                 is used when storage space is discussed. X/Open. ISO.1. 
  19275.  
  19276.  character array An array of type char. X/Open. 
  19277.  
  19278.  character class A named set of characters sharing an attribute associated with 
  19279.            the name of the class. The classes and the characters that they 
  19280.            contain are dependent on the value of the LC_CTYPE category in the 
  19281.            current locale. X/Open. 
  19282.  
  19283.  character constant 
  19284.  
  19285.              1. A constant with a character value. IBM. 
  19286.  
  19287.              2. A string of any of the characters that can be represented, 
  19288.                 usually enclosed in apostrophes. IBM. 
  19289.  
  19290.              3. In some languages, a character enclosed in apostrophes. IBM. 
  19291.  
  19292.  character set 
  19293.  
  19294.              1. A finite set of different characters that is complete for a 
  19295.                 given purpose; for example, the character set in ISO Standard 
  19296.                 646, 7-bit Coded Character Set for Information Processing 
  19297.                 Interchange. ISO Draft. 
  19298.  
  19299.              2. All the valid characters for a programming language or for a 
  19300.                 computer system. IBM. 
  19301.  
  19302.              3. A group of characters used for a specific reason; for example, 
  19303.                 the set of characters a printer can print. IBM. 
  19304.  
  19305.              4. See also portable character set. 
  19306.  
  19307.  character string A contiguous sequence of characters terminated by and 
  19308.            including the first null byte. X/Open. 
  19309.  
  19310.  child     A node that is subordinate to another node in a tree structure. Only 
  19311.            the root node is not a child. 
  19312.  
  19313.  class 
  19314.  
  19315.              1. A C++ aggregate that may contain functions, types, and 
  19316.                 user-defined operators in addition to data. Classes may be 
  19317.                 defined hierarchically, allowing one class to be derived from 
  19318.                 another, and may restrict access to its members. 
  19319.  
  19320.              2. A user-defined data type. A class data type can contain both 
  19321.                 data representations (data members) and functions (member 
  19322.                 functions). 
  19323.  
  19324.  class library A collection of C++ classes. 
  19325.  
  19326.  class name A unique identifier of a class type that becomes a reserved word 
  19327.            within its scope. 
  19328.  
  19329.  class template A blueprint describing how a set of related classes can be 
  19330.            constructed. 
  19331.  
  19332.  C library A system library that contains common C language subroutines for 
  19333.            file access, string operators, character operations, memory 
  19334.            allocation, and other functions. IBM. 
  19335.  
  19336.  client program A program that uses a class. The program is said to be a client 
  19337.            of the class. 
  19338.  
  19339.  COBOL (Common Business-Oriented Language) A high-level language, based on 
  19340.            English, that is primarily used for business applications. 
  19341.  
  19342.  coded character set 
  19343.  
  19344.              1. A set of graphic characters and their code point assignments. 
  19345.                 The set may contain fewer characters than the total number of 
  19346.                 possible characters: some code points may be unassigned. IBM. 
  19347.  
  19348.              2. A coded set whose elements are single characters; for example, 
  19349.                 all characters of an alphabet. ISO Draft. 
  19350.  
  19351.              3. Loosely, a code. ANSI. 
  19352.  
  19353.  code page 
  19354.  
  19355.              1. An assignment of graphic characters and control function 
  19356.                 meanings to all code points; for example, assignment of 
  19357.                 characters and meanings to 256 code points for an 8-bit code, 
  19358.                 assignment of characters and meanings to 128 code points for a 
  19359.                 7-bit code. 
  19360.  
  19361.              2. A particular assignment of hexadecimal identifiers to graphic 
  19362.                 characters. 
  19363.  
  19364.  code point 
  19365.  
  19366.              1. A 1-byte code representing one of 256 potential characters. 
  19367.  
  19368.              2. An identifier in an alert description that represents a short 
  19369.                 unit of text.  The code point is replaced with the text by an 
  19370.                 alert display program. 
  19371.  
  19372.  codeset   Synonym for code element set. IBM. 
  19373.  
  19374.  collating element The smallest entity used to determine the logical ordering 
  19375.            of character or wide-character strings. A collating element consists 
  19376.            of either a single character, or two or more characters collating as 
  19377.            a single entity. The value of the LC_COLLATE category in the current 
  19378.            locale determines the current set of collating elements. X/Open. 
  19379.  
  19380.  collating sequence 
  19381.  
  19382.              1. A specified arrangement used in sequencing. ISO-JTC1. ANSI. 
  19383.  
  19384.              2. An ordering assigned to a set of items, such that any two sets 
  19385.                 in that assigned order can be collated. ANSI. 
  19386.  
  19387.              3. The relative ordering of collating elements as determined by 
  19388.                 the setting of the LC_COLLATE category in the current locale. 
  19389.                 The character order, as defined for the LC_COLLATE category in 
  19390.                 the current locale, defines the relative order of all collating 
  19391.                 elements, such that each element occupies a unique position in 
  19392.                 the order. This is the order used in ranges of characters and 
  19393.                 collating elements in regular expressions and pattern matching. 
  19394.                 In addition, the definition of the collating weights of 
  19395.                 characters and collating elements uses collating elements to 
  19396.                 represent their respective positions within the collation 
  19397.                 sequence. 
  19398.  
  19399.  collation The logical ordering of character or wide-character strings 
  19400.            according to defined precedence rules. These rules identify a 
  19401.            collation sequence between the collating elements, and such 
  19402.            additional rules that can be used to order strings consisting or 
  19403.            multiple collating elements. X/Open. 
  19404.  
  19405.  collection 
  19406.  
  19407.              1. An abstract class without any ordering, element properties, or 
  19408.                 key properties. All abstract classes are derived from 
  19409.                 collection. 
  19410.  
  19411.              2. In a general sense, an implementation of an abstract data type 
  19412.                 for storing elements. 
  19413.  
  19414.  Collection Class Library A set of classes that provide basic functions for 
  19415.            collections, and can be used as base classes. 
  19416.  
  19417.  command   A request to perform an operation or run a program. When parameters, 
  19418.            arguments, flags, or other operands are associated with a command, 
  19419.            the resulting character string is a single command. 
  19420.  
  19421.  compilation unit 
  19422.  
  19423.              1. A portion of a computer program sufficiently complete to be 
  19424.                 compiled correctly. IBM. 
  19425.  
  19426.              2. A single compiled file and all its associated include files. 
  19427.  
  19428.              3. An independently compilable sequence of high-level language 
  19429.                 statements. Each high-level language product has different 
  19430.                 rules for what makes up a compilation unit. 
  19431.  
  19432.  Complex Mathematics library A C++ class library that provides the facilities 
  19433.            to manipulate complex numbers and perform standard mathematical 
  19434.            operations on them. 
  19435.  
  19436.  condition 
  19437.  
  19438.              1. A relational expression that can be evaluated to a value of 
  19439.                 either true or false. IBM. 
  19440.  
  19441.              2. An exception that has been enabled, or recognized, by the 
  19442.                 Language Environment and thus is eligible to activate user and 
  19443.                 language condition handlers. Any alteration to the normal 
  19444.                 programmed flow of an application. Conditions can be detected 
  19445.                 by the hardware/operating system and result in an interrupt. 
  19446.                 They can also be detected by language-specific generated code 
  19447.                 or language library code. 
  19448.  
  19449.  const 
  19450.  
  19451.              1. An attribute of a data object that declares the object cannot 
  19452.                 be changed. 
  19453.  
  19454.              2. A keyword that allows you to define a variable whose value does 
  19455.                 not change. 
  19456.  
  19457.  constant 
  19458.  
  19459.              1. In programming languages, a language object that takes only one 
  19460.                 specific value. ISO-JTC1. 
  19461.  
  19462.              2. A data item with a value that does not change. IBM. 
  19463.  
  19464.  constant expression An expression having a value that can be determined during 
  19465.            compilation and that does not change during the running of the 
  19466.            program. IBM. 
  19467.  
  19468.  constructor A special C++ class member function that has the same name as the 
  19469.            class and is used to create an object of that class. 
  19470.  
  19471.  control character 
  19472.  
  19473.              1. A character whose occurrence in a particular context specifies 
  19474.                 a control function. ISO Draft. 
  19475.  
  19476.              2. Synonymous with nonprinting character. IBM. 
  19477.  
  19478.              3. A character, other than a graphic character, that affects the 
  19479.                 recording, processing, transmission, or interpretation of text. 
  19480.                 X/Open. 
  19481.  
  19482.  conversion 
  19483.  
  19484.              1. In programming languages, the transformation between values 
  19485.                 that represent the same data item but belong to different data 
  19486.                 types. Information may be lost because of conversion since 
  19487.                 accuracy of data representation varies among different data 
  19488.                 types. ISO-JTC1. 
  19489.  
  19490.              2. The process of changing from one method of data processing to 
  19491.                 another or from one data processing system to another. IBM. 
  19492.  
  19493.              3. The process of changing from one form of representation to 
  19494.                 another; for example to change from decimal representation to 
  19495.                 binary representation. IBM. 
  19496.  
  19497.              4. A change in the type of a value. For example, when you add 
  19498.                 values having different data types, the compiler converts both 
  19499.                 values to a common form before adding the values. 
  19500.  
  19501.  coordinated universal time (UTC) Equivalent to Greenwich Mean Time (GMT) 
  19502.  
  19503.  copy constructor A constructor that copies a class object of the same class 
  19504.            type. 
  19505.  
  19506.  current working directory 
  19507.  
  19508.              1. A directory, associated with a process, that is used in 
  19509.                 path-name resolution for path names that do not begin with a 
  19510.                 slash. X/Open. ISO.1. 
  19511.  
  19512.              2. In DOS, the directory that is searched when a file name is 
  19513.                 entered with no indication of the directory that lists the file 
  19514.                 name. DOS assumes that the current directory is the root 
  19515.                 directory unless a path to another directory is specified. IBM. 
  19516.  
  19517.              3. In the OS/2 operating system, the first directory in which the 
  19518.                 operating system looks for programs and files and stores 
  19519.                 temporary files and output. IBM. 
  19520.  
  19521.              4. In the AIX operating system, a directory that is active and 
  19522.                 that can be displayed. Relative path name resolution begins in 
  19523.                 the current directory. IBM. 
  19524.  
  19525.  cursor    A reference to an element at a specific position in a data 
  19526.            structure. 
  19527.  
  19528.  
  19529. ΓòÉΓòÉΓòÉ <hidden> D ΓòÉΓòÉΓòÉ
  19530.  
  19531.  data definition (DD) 
  19532.  
  19533.              1. In the C and C++ languages, a definition that describes a data 
  19534.                 object, reserves storage for a data object, and can provide an 
  19535.                 initial value for a data object. A data definition appears 
  19536.                 outside a function or at the beginning of a block statement. 
  19537.                 IBM. 
  19538.  
  19539.              2. A program statement that describes the features of, specifies 
  19540.                 relationships of, or establishes context of, data. ANSI. 
  19541.  
  19542.              3. A statement that is stored in the environment and that 
  19543.                 externally identifies a file and the attributes with which it 
  19544.                 should be opened. 
  19545.  
  19546.  data definition name See ddname. 
  19547.  
  19548.  data member The smallest possible piece of complete data. Elements are 
  19549.            composed of data members. 
  19550.  
  19551.  data set  Under MVS, a named collection of related data records that is stored 
  19552.            and retrieved by an assigned name. Equivalent to a CMS file. 
  19553.  
  19554.  data structure The internal data representation of an implementation. 
  19555.  
  19556.  data type The properties and internal representation that characterize data. 
  19557.  
  19558.  DBCS (double-byte character set) A set of characters in which each character 
  19559.            is represented by 2 bytes. Languages such as Japanese, Chinese, and 
  19560.            Korean, which contain more symbols than can be represented by 256 
  19561.            code points, require double-byte character sets. 
  19562.  
  19563.            Because each character requires 2 bytes, the typing, display, and 
  19564.            printing of DBCS characters requires hardware and programs that 
  19565.            support DBCS. IBM. 
  19566.  
  19567.  ddname (data definition name) 
  19568.  
  19569.              1. The logical name of a file within an application. The ddname 
  19570.                 provides the means for the logical file to be connected to the 
  19571.                 physical file. 
  19572.  
  19573.              2. The part of the data definition before the equal sign. It is 
  19574.                 the name used in a call to fopen or freopen to refer to the 
  19575.                 data definition stored in the environment. 
  19576.  
  19577.  DD statement (data definition statement) 
  19578.  
  19579.              1. In MVS, serves as the connection between the logical name of a 
  19580.                 file and the physical name of the file. 
  19581.  
  19582.              2. A job control statement that defines a file to the operating 
  19583.                 system, and is a request to the operating system for the 
  19584.                 allocation of input/output resources. 
  19585.  
  19586.  decimal constant 
  19587.  
  19588.              1. A numerical data type used in standard arithmetic operations. 
  19589.  
  19590.              2. A number containing any of the digits 0 through 9. IBM. 
  19591.  
  19592.  declaration 
  19593.  
  19594.              1. In the C and C++ languages, a description that makes an 
  19595.                 external object or function available to a function or a block 
  19596.                 statement. IBM. 
  19597.  
  19598.              2. Establishes the names and characteristics of data objects and 
  19599.                 functions used in a program. 
  19600.  
  19601.  default constructor A constructor that takes no arguments, or, if it takes 
  19602.            arguments, all its arguments have default values. 
  19603.  
  19604.  default locale 
  19605.  
  19606.              1. The C locale, which is always used when no selection of locale 
  19607.                 is performed. 
  19608.  
  19609.              2. A system default locale, named by locale-related environmental 
  19610.                 variables. 
  19611.  
  19612.  define directive A preprocessor statement that directs the preprocessor to 
  19613.            replace an identifier or macro invocation with special code. 
  19614.  
  19615.  definition 
  19616.  
  19617.              1. A data description that reserves storage and may provide an 
  19618.                 initial value. 
  19619.  
  19620.              2. A declaration that allocates storage, and may initialize a data 
  19621.                 object or specify the body of a function. 
  19622.  
  19623.  delete 
  19624.  
  19625.              1. A C++ keyword that identifies a free storage deallocation 
  19626.                 operator. 
  19627.  
  19628.              2. A C++ operator used to destroy objects created by new. 
  19629.  
  19630.  demangling The conversion of mangled names back to their original source code 
  19631.            names. During C++ compilation, identifiers such as function and 
  19632.            static class member names are mangled (encoded) with type and 
  19633.            scoping information to ensure type-safe linkage. These mangled names 
  19634.            appear in the object file and the final executable file. Demangling 
  19635.            (decoding) converts these names back to their original names to make 
  19636.            program debugging easier. See also mangling. 
  19637.  
  19638.  denormal  Pertaining to a number with a value so close to 0 that its exponent 
  19639.            cannot be represented normally. The exponent can be represented in a 
  19640.            special way at the possible cost of a loss of significance. 
  19641.  
  19642.  derived class A class that inherits from a base class.  All members of the 
  19643.            base class become members of the derived class. You can add 
  19644.            additional data members and member functions to the derived class. A 
  19645.            derived class object can be manipulated as if it is a base class 
  19646.            object. The derived class can override virtual functions of the base 
  19647.            class. 
  19648.  
  19649.  descriptor PL/I control block that holds information such as string lengths, 
  19650.            array subscript bounds, and area sizes, and is passed from one PL/I 
  19651.            routine to another during run time. 
  19652.  
  19653.  destructor A special member function that has the same name as its class, 
  19654.            preceded by a tilde (~), and that "cleans up" after an object of 
  19655.            that class, for example, freeing storage that was allocated when the 
  19656.            object was created. A destructor has no arguments and no return 
  19657.            type. 
  19658.  
  19659.  device    A computer peripheral or an object that appears to the application 
  19660.            as such. X/Open. ISO.1. 
  19661.  
  19662.  difference Given two sets A and B, the difference (A-B) is the set of all 
  19663.            elements contained in A but not in B.  For bags, there is an 
  19664.            additional rule for duplicates: If bag P contains an element m times 
  19665.            and bag Q contains the same element n times, then, if m>n, the 
  19666.            difference contains that element m-n times. If m<=n, the difference 
  19667.            contains that element zero times. 
  19668.  
  19669.  directory A type of file containing the names and controlling information for 
  19670.            other files or other directories. IBM. 
  19671.  
  19672.  display   To direct the output to the user's terminal. If the output is not 
  19673.            directed to the terminal, the results are undefined. X/Open. 
  19674.  
  19675.  dot       The file name consisting of a single dot character (.). X/Open. 
  19676.            ISO.1. 
  19677.  
  19678.  double-byte character set See DBCS. 
  19679.  
  19680.  double-precision Pertaining to the use of two computer words to represent a 
  19681.            number in accordance with the required precision. ISO-JTC1. ANSI. 
  19682.  
  19683.  doubleword A contiguous sequence of bits or characters that comprises two 
  19684.            computer words and is capable of being addressed as a unit. IBM. 
  19685.  
  19686.  dump      To copy data in a readable format from main or auxiliary storage 
  19687.            onto an external medium such as tape, diskette, or printer. IBM. 
  19688.  
  19689.  dynamic   Pertaining to an operation that occurs at the time it is needed 
  19690.            rather than at a predetermined or fixed time. IBM. 
  19691.  
  19692.  dynamic link library (DLL) A file containing executable code and data bound to 
  19693.            a program at load time or run time. The code and data in a dynamic 
  19694.            link library can be shared by several applications simultaneously. 
  19695.  
  19696.  dynamic storage Synonym for automatic storage. 
  19697.  
  19698.  
  19699. ΓòÉΓòÉΓòÉ <hidden> E ΓòÉΓòÉΓòÉ
  19700.  
  19701.  EBCDIC (extended binary-coded decimal interchange code) A coded character set 
  19702.            of 256 8-bit characters. IBM. 
  19703.  
  19704.  element   The component of an array, subrange, enumeration, or set. 
  19705.  
  19706.  empty string 
  19707.  
  19708.              1. A string whose first byte is a null byte. Synonymous with null 
  19709.                 string. X/Open. 
  19710.  
  19711.              2. A character array whose first element is a null character. 
  19712.                 ISO.1. 
  19713.  
  19714.  encapsulation Hiding the internal representation of data objects and 
  19715.            implementation details of functions from the client program. This 
  19716.            enables the end user to focus on the use of data objects and 
  19717.            functions without having to know about their representation or 
  19718.            implementation. 
  19719.  
  19720.  enclave   In the Language Environment for MVS and VM, an independent 
  19721.            collection of routines, one of which is designated as the main 
  19722.            routine. An enclave is roughly analogous to a program or run unit. 
  19723.  
  19724.  entry point In assembler language, the address or label of the first 
  19725.            instruction that is executed when a routine is entered for 
  19726.            execution. 
  19727.  
  19728.  enumeration constant In the C or C++ language, an identifier, with an 
  19729.            associated integer value, defined in an enumerator. An enumeration 
  19730.            constant may be used anywhere an integer constant is allowed. IBM. 
  19731.  
  19732.  enumerator In the C and C++ language, an enumeration constant and its 
  19733.            associated value. IBM. 
  19734.  
  19735.  equivalence class 
  19736.  
  19737.              1. A grouping of characters that are considered equal for the 
  19738.                 purpose of collation; for example, many languages place an 
  19739.                 uppercase character in the same equivalence class as its 
  19740.                 lowercase form, but some languages distinguish between accented 
  19741.                 and unaccented character forms for the purpose of collation. 
  19742.                 IBM. 
  19743.  
  19744.              2. A set of collating elements with the same primary collation 
  19745.                 weight. 
  19746.  
  19747.                 Elements in an equivalence class are typically elements that 
  19748.                 naturally group together, such as all accented letters based on 
  19749.                 the same base letter. 
  19750.  
  19751.                 The collation order of elements within an equivalence class is 
  19752.                 determined by the weights assigned on any subsequent levels 
  19753.                 after the primary weight. X/Open. 
  19754.  
  19755.  escape sequence 
  19756.  
  19757.              1. A representation of a character. An escape sequence contains 
  19758.                 the \ symbol followed by one of the characters: a, b, f, n, r, 
  19759.                 t, v, ', ", x, \, or followed by one or more octal or 
  19760.                 hexadecimal digits. 
  19761.  
  19762.              2. A sequence of characters that represent, for example, 
  19763.                 nonprinting characters, or the exact code point value to be 
  19764.                 used to represent variant and nonvariant characters regardless 
  19765.                 of code page. 
  19766.  
  19767.              3. In the C and C++ language, an escape character followed by one 
  19768.                 or more characters. The escape character indicates that a 
  19769.                 different code, or a different coded character set, is used to 
  19770.                 interpret the characters that follow. Any member of the 
  19771.                 character set used at runtime can be represented using an 
  19772.                 escape sequence. 
  19773.  
  19774.              4. A character that is preceded by a backslash character and is 
  19775.                 interpreted to have a special meaning to the operating system. 
  19776.  
  19777.              5. A sequence sent to a terminal to perform actions such as moving 
  19778.                 the cursor, changing from normal to reverse video, and clearing 
  19779.                 the screen. Synonymous with multibyte control. IBM. 
  19780.  
  19781.  exception 
  19782.  
  19783.              1. Any user, logic, or system error detected by a function that 
  19784.                 does not itself deal with the error but passes the error on to 
  19785.                 a handling routine (also called throwing the exception). 
  19786.  
  19787.              2. In programming languages, an abnormal situation that may arise 
  19788.                 during execution, that may cause a deviation from the normal 
  19789.                 execution sequence, and for which facilities exist in a 
  19790.                 programming language to define, raise, recognize, ignore, and 
  19791.                 handle it; for example, (ON-) condition in PL/I, exception in 
  19792.                 ADA. ISO-JTC1. 
  19793.  
  19794.  exception handler 
  19795.  
  19796.              1. Exception handlers are catch blocks in C++ applications. Catch 
  19797.                 blocks catch exceptions when they are thrown from a function 
  19798.                 enclosed in a try block. Try blocks, catch blocks, and throw 
  19799.                 expressions are the constructs used to implement formal 
  19800.                 exception handling in C++ applications. 
  19801.  
  19802.              2. A set of routines used to detect deadlock conditions or to 
  19803.                 process abnormal condition processing. An exception handler 
  19804.                 allows the normal running of processes to be interrupted and 
  19805.                 resumed. IBM. 
  19806.  
  19807.  executable file A regular file acceptable as a new process image file by the 
  19808.            equivalent of the exec family of functions, and thus usable as one 
  19809.            form of a utility. The standard utilities described as compilers can 
  19810.            produce executable files, but other unspecified methods of producing 
  19811.            executable files may also be provided. The internal format of an 
  19812.            executable file is unspecified, but a conforming application cannot 
  19813.            assume an executable file is a text file. X/Open. 
  19814.  
  19815.  executable program A program that has been link-edited and therefore can be 
  19816.            run in a processor. IBM. 
  19817.  
  19818.  extension 
  19819.  
  19820.              1. An element or function not included in the standard language. 
  19821.  
  19822.              2. File name extension. 
  19823.  
  19824.  
  19825. ΓòÉΓòÉΓòÉ <hidden> F ΓòÉΓòÉΓòÉ
  19826.  
  19827.  file scope A name declared outside all blocks and classes has file scope and 
  19828.            can be used after the point of declaration in a source file. 
  19829.  
  19830.  first element The element visited first in an iteration over a collection. 
  19831.            Each collection has its own definition for first element. For 
  19832.            example, the first element of a sorted set is the element with the 
  19833.            smallest value. 
  19834.  
  19835.  for statement A looping statement that contains the word for followed by a 
  19836.            list of expressions enclosed in parentheses (the condition) and a 
  19837.            statement (the action). Each expression in the parenthesized list is 
  19838.            separated by a semicolon. You can omit any of the expressions, but 
  19839.            you cannot omit the semicolons. 
  19840.  
  19841.  function  A named group of statements that can be called and evaluated and can 
  19842.            return a value to the calling statement. IBM. 
  19843.  
  19844.  function call An expression that moves the path of execution from the current 
  19845.            function to a specified function and evaluates to the return value 
  19846.            provided by the called function. A function call contains the name 
  19847.            of the function to which control moves and a parenthesized list of 
  19848.            values. IBM. 
  19849.  
  19850.  function definition The complete description of a function. A function 
  19851.            definition contains an optional storage class specifier, an optional 
  19852.            type specifier, a function declarator, optional parameter 
  19853.            declarations, and a block statement (the function body). 
  19854.  
  19855.  function prototype A function declaration that provides type information for 
  19856.            each parameter. It is the first line of the function (header) 
  19857.            followed by a ; (semicolon). The declaration is required by the 
  19858.            compiler at the time that the function is declared, so that the 
  19859.            compiler can check the type. 
  19860.  
  19861.  function template Provides a blueprint describing how a set of related 
  19862.            individual functions can be constructed. 
  19863.  
  19864.  
  19865. ΓòÉΓòÉΓòÉ <hidden> G ΓòÉΓòÉΓòÉ
  19866.  
  19867.  global    Pertaining to information available to more than one program or 
  19868.            subroutine. IBM. 
  19869.  
  19870.  global variable A symbol defined in one program module that is used in other 
  19871.            independently compiled program modules. 
  19872.  
  19873.  GMT (Greenwich Mean Time) The solar time at the meridian of Greenwich, 
  19874.            formerly used as the prime basis of standard time throughout the 
  19875.            world. GMT has been superseded by coordinate universal time (UTC). 
  19876.  
  19877.  Greenwich Mean Time See GMT. 
  19878.  
  19879.  
  19880. ΓòÉΓòÉΓòÉ <hidden> H ΓòÉΓòÉΓòÉ
  19881.  
  19882.  header file A text file that contains declarations used by a group of 
  19883.            functions, programs, or users. 
  19884.  
  19885.  heap      An unordered flat collection that allows duplicate elements. 
  19886.  
  19887.  heap storage An area of storage used for allocation of storage whose lifetime 
  19888.            is not related to the execution of the current routine. The heap 
  19889.            consists of the initial heap segment and zero or more increments. 
  19890.  
  19891.  hexadecimal constant A constant, usually starting with special characters, 
  19892.            that contains only hexadecimal digits. Three examples for the 
  19893.            hexadecimal constant with value 0 would be '\x00', '0x0', or '0X00'. 
  19894.  
  19895.  
  19896. ΓòÉΓòÉΓòÉ <hidden> I ΓòÉΓòÉΓòÉ
  19897.  
  19898.  I18N      Abbreviation for internationalization. 
  19899.  
  19900.  identifier 
  19901.  
  19902.              1. One or more characters used to identify or name a data element 
  19903.                 and possibly to indicate certain properties of that data 
  19904.                 element. ANSI. 
  19905.  
  19906.              2. In programming languages, a token that names a data object such 
  19907.                 as a variable, an array, a record, a subprogram, or a function. 
  19908.                 ANSI. 
  19909.  
  19910.              3. A sequence of letters, digits, and underscores used to identify 
  19911.                 a data object or function. IBM. 
  19912.  
  19913.  if statement A conditional statement that contains the keyword if, followed by 
  19914.            an expression in parentheses (the condition), a statement (the 
  19915.            action), and an optional else clause (the alternative action). IBM. 
  19916.  
  19917.  include directive A preprocessor directive that causes the preprocessor to 
  19918.            replace the statement with the contents of a specified file. 
  19919.  
  19920.  include file See header file. 
  19921.  
  19922.  include statement In the C and C++ languages, a preprocessor statement that 
  19923.            causes the preprocessor to replace the statement with the contents 
  19924.            of a specified file. IBM. 
  19925.  
  19926.  incomplete type A type that has no value or meaning when it is first declared. 
  19927.            There are three incomplete types: void, arrays of unknown size and 
  19928.            structures and unions of unspecified content. A void type can never 
  19929.            be completed. Arrays of unknown size and structures or unions of 
  19930.            unspecified content can be completed in further declarations. 
  19931.  
  19932.  indirection 
  19933.  
  19934.              1. A mechanism for connecting objects by storing, in one object, a 
  19935.                 reference to another object. 
  19936.  
  19937.              2. In the C and C++ languages, the application of the unary 
  19938.                 operator * to a pointer to access the object the pointer points 
  19939.                 to. 
  19940.  
  19941.  inheritance A technique that allows the use of an existing class as the base 
  19942.            for creating other classes. 
  19943.  
  19944.  initial heap The VisualAge C++ heap controlled by the HEAP runtime option and 
  19945.            designated by a heap_id of 0.  The initial heap contains dynamically 
  19946.            allocated user data. 
  19947.  
  19948.  initializer An expression used to initialize data objects. In the C++ 
  19949.            language, there are three types of initializers: 
  19950.  
  19951.              1. An expression followed by an assignment operator is used to 
  19952.                 initialize fundamental data type objects or class objects that 
  19953.                 have copy constructors. 
  19954.              2. An expression enclosed in braces ( { } ) is used to initialize 
  19955.                 aggregates. 
  19956.              3. A parenthesized expression list is used to initialize base 
  19957.                 classes and members using constructors. 
  19958.  
  19959.  input stream A sequence of control statements and data submitted to a system 
  19960.            from an input unit. Synonymous with input job stream, job input 
  19961.            stream. IBM. 
  19962.  
  19963.  instance  An object-oriented programming term synonymous with object. An 
  19964.            instance is a particular instantiation of a data type. It is simply 
  19965.            a region of storage that contains a value or group of values. For 
  19966.            example, if a class box is previously defined, two instances of a 
  19967.            class box could be instantiated with the declaration: 
  19968.  
  19969.                       box box1, box2;
  19970.  
  19971.  instantiate To create or generate a particular instance or object of a data 
  19972.            type. For example, an instance box1 of class box could be 
  19973.            instantiated with the declaration: 
  19974.  
  19975.                       box box1;
  19976.  
  19977.  instruction A program statement that specifies an operation to be performed by 
  19978.            the computer, along with the values or locations of operands.  This 
  19979.            statement represents the programmer's request to the processor to 
  19980.            perform a specific operation. 
  19981.  
  19982.  instruction scheduling An optimization technique that reorders instructions in 
  19983.            code to minimize execution time. 
  19984.  
  19985.  integer constant A decimal, octal, or hexadecimal constant. 
  19986.  
  19987.  internationalization The capability of a computer program to adapt to the 
  19988.            requirements of different native languages, local customs, and coded 
  19989.            character sets. X/Open. 
  19990.  
  19991.            Synonymous with I18N. 
  19992.  
  19993.  I/O Stream library A class library that provides the facilities to deal with 
  19994.            many varieties of input and output. 
  19995.  
  19996.  iteration The process of repeatedly applying a function to a series of 
  19997.            elements in a collection until some condition is satisfied. 
  19998.  
  19999.  
  20000. ΓòÉΓòÉΓòÉ <hidden> K ΓòÉΓòÉΓòÉ
  20001.  
  20002.  keyword 
  20003.  
  20004.              1. A predefined word reserved for the C and C++ languages, that 
  20005.                 may not be used as an identifier. 
  20006.  
  20007.              2. A symbol that identifies a parameter in JCL. 
  20008.  
  20009.  
  20010. ΓòÉΓòÉΓòÉ <hidden> L ΓòÉΓòÉΓòÉ
  20011.  
  20012.  label     An identifier within or attached to a set of data elements. ISO 
  20013.            Draft. 
  20014.  
  20015.  Language Environment Abbreviated form of IBM Language Environment for MVS and 
  20016.            VM. Pertaining to an IBM software product that provides a common 
  20017.            runtime environment and runtime services to applications compiled by 
  20018.            Language Environment-conforming compilers. 
  20019.  
  20020.  last element The element visited last in an iteration over a collection. Each 
  20021.            collection has its own definition for last element. For example, the 
  20022.            last element of a sorted set is the element with the largest value. 
  20023.  
  20024.  lexically Relating to the left-to-right order of units. 
  20025.  
  20026.  library 
  20027.  
  20028.              1. A collection of functions, calls, subroutines, or other data. 
  20029.                 IBM. 
  20030.  
  20031.              2. A set of object modules that can be specified in a link 
  20032.                 command. 
  20033.  
  20034.  line      A sequence of zero or more non-new-line characters plus a 
  20035.            terminating new-line character. X/Open. 
  20036.  
  20037.  link      To interconnect items of data or portions of one or more computer 
  20038.            programs; for example, linking of object programs by a linkage 
  20039.            editor to produce an executable file. 
  20040.  
  20041.  linker    A computer program for creating load modules from one or more object 
  20042.            modules by resolving cross references among the modules and, if 
  20043.            necessary, adjusting addresses. IBM. 
  20044.  
  20045.  literal 
  20046.  
  20047.              1. In programming languages, a lexical unit that directly 
  20048.                 represents a value; for example, 14 represents the integer 
  20049.                 fourteen, "APRIL" represents the string of characters APRIL, 
  20050.                 3.0005E2 represents the number 300.05. ISO-JTC1. 
  20051.  
  20052.              2. A symbol or a quantity in a source program that is itself data, 
  20053.                 rather than a reference to data. IBM. 
  20054.  
  20055.              3. A character string whose value is given by the characters 
  20056.                 themselves; for example, the numeric literal 7 has the value 7, 
  20057.                 and the character literal CHARACTERS has the value CHARACTERS. 
  20058.                 IBM. 
  20059.  
  20060.  loader    A routine, commonly a computer program, that reads data into main 
  20061.            storage. ANSI. 
  20062.  
  20063.  load module All or part of a computer program in a form suitable for loading 
  20064.            into main storage for execution.  A load module is usually the 
  20065.            output of a linkage editor. ISO Draft. 
  20066.  
  20067.  local 
  20068.  
  20069.              1. In programming languages, pertaining to the relationship 
  20070.                 between a language object and a block such that the language 
  20071.                 object has a scope contained in that block. ISO-JTC1. 
  20072.  
  20073.              2. Pertaining to that which is defined and used only in one 
  20074.                 subdivision of a computer program. ANSI. 
  20075.  
  20076.  locale    The definition of the subset of a user's environment that depends on 
  20077.            language and cultural conventions. X/Open. 
  20078.  
  20079.  localization The process of establishing information within a computer system 
  20080.            specific to the operation of particular native languages, local 
  20081.            customs, and coded character sets. X/Open. 
  20082.  
  20083.  
  20084. ΓòÉΓòÉΓòÉ <hidden> M ΓòÉΓòÉΓòÉ
  20085.  
  20086.  macro     An identifier followed by arguments (may be a parenthesized list of 
  20087.            arguments) that the preprocessor replaces with the replacement code 
  20088.            located in a preprocessor #define directive. 
  20089.  
  20090.  main function An external function with the identifier main that is the first 
  20091.            user function-aside from exit routines and C++ static object 
  20092.            constructors-to get control when program execution begins. Each C 
  20093.            and C++ program must have exactly one function named main. 
  20094.  
  20095.  makefile  A text file containing a list of your application's parts.  The make 
  20096.            utility uses makefiles to maintain application parts and 
  20097.            dependencies. 
  20098.  
  20099.  mangling  The encoding during compilation of identifiers such as function and 
  20100.            variable names to include type and scope information.  The prelinker 
  20101.            uses these mangled names to ensure type-safe linkage. See also 
  20102.            demangling. 
  20103.  
  20104.  map file  A listing file that can be created during the prelink or link step 
  20105.            and that contains information on the size and mapping of segments 
  20106.            and symbols. 
  20107.  
  20108.  mask      A pattern of characters that controls the keeping, deleting, or 
  20109.            testing of portions of another pattern of characters. ISO-JTC1. 
  20110.            ANSI. 
  20111.  
  20112.  member    A data object or function in a structure, union, or class. Members 
  20113.            can also be classes, enumerations, bit fields, and type names. 
  20114.  
  20115.  member function 
  20116.  
  20117.              1. An operator or function that is declared as a member of a 
  20118.                 class. A member function has access to the private and 
  20119.                 protected data members and member functions of objects of its 
  20120.                 class. Member functions are also called methods. 
  20121.  
  20122.              2. A function that performs operations on a class. 
  20123.  
  20124.  method    In the C++ language, a synonym for member function. 
  20125.  
  20126.  migrate   To move to a changed operating environment,  usually to a new 
  20127.            release or version of a system. IBM. 
  20128.  
  20129.  mode      A collection of attributes that specifies a file's type and its 
  20130.            access permissions. X/Open. ISO.1. 
  20131.  
  20132.  module    A program unit that usually performs a particular function or 
  20133.            related functions, and that is distinct and identifiable with 
  20134.            respect to compiling, combining with other units, and loading. 
  20135.  
  20136.  multibyte character A mixture of single-byte characters from a single-byte 
  20137.            character set and double-byte characters from a double-byte 
  20138.            character set. 
  20139.  
  20140.  multicharacter collating element A sequence of two or more characters that 
  20141.            collate as an entity.  For example, in some coded character sets, an 
  20142.            accented character is represented by a non-spacing accent, followed 
  20143.            by the letter.  Other examples are the Spanish elements ch and ll. 
  20144.            X/Open. 
  20145.  
  20146.  multiple inheritance An object-oriented programming technique implemented in 
  20147.            the C++ language through derivation, in which the derived class 
  20148.            inherits members from more than one base class. 
  20149.  
  20150.  mutex     A flag used by a semaphore to protect shared resources. The mutex is 
  20151.            locked and unlocked by threads in a program.  A mutex can only be 
  20152.            locked by one thread at a time and can only be unlocked by the same 
  20153.            thread that locked it.  The current owner of a mutex is the thread 
  20154.            that it is currently locked by. An unlocked mutex has no current 
  20155.            owner. 
  20156.  
  20157.  
  20158. ΓòÉΓòÉΓòÉ <hidden> N ΓòÉΓòÉΓòÉ
  20159.  
  20160.  name      In the C++ language, a name is commonly referred to as an 
  20161.            identifier. However, syntactically, a name can be an identifier, 
  20162.            operator function name, conversion function name, destructor name or 
  20163.            qualified name. 
  20164.  
  20165.  nested class A class defined within the scope of another class. 
  20166.  
  20167.  newline character A character that in the output stream indicates that 
  20168.            printing should start at the beginning of the next line.  The 
  20169.            newline character is designated by '\n' in the C and C++ language. 
  20170.            It is unspecified whether this character is the exact sequence 
  20171.            transmitted to an output device by the system to accomplish the 
  20172.            movement to the next line. X/Open. 
  20173.  
  20174.  node      In a tree structure, a point at which subordinate items of data 
  20175.            originate. ANSI. 
  20176.  
  20177.  NULL      In the C and C++ languages, a pointer that does not point to a data 
  20178.            object. IBM. 
  20179.  
  20180.  null character (NUL) The ASCII or EBCDIC character '\0' with the hex value 00, 
  20181.            all bits turned off. It is used to represent the absence of a 
  20182.            printed or displayed character. This character is named <NUL> in the 
  20183.            portable character set. 
  20184.  
  20185.  null pointer The value that is obtained by converting the number 0 into a 
  20186.            pointer; for example, (void *) 0.  The C and C++ languages guarantee 
  20187.            that this value will not match that of any legitimate pointer, so it 
  20188.            is used by many functions that return pointers to indicate an error. 
  20189.            X/Open. 
  20190.  
  20191.  null string 
  20192.  
  20193.              1. A string whose first byte is a null byte. Synonymous with empty 
  20194.                 string. X/Open. 
  20195.  
  20196.              2. A character array whose first element is a null character. 
  20197.                 ISO.1. 
  20198.  
  20199.  null value A parameter position for which no value is specified. IBM. 
  20200.  
  20201.  number sign The character #, also known as pound sign and hash sign. This 
  20202.            character is named <number-sign> in the portable character set. 
  20203.  
  20204.  
  20205. ΓòÉΓòÉΓòÉ <hidden> O ΓòÉΓòÉΓòÉ
  20206.  
  20207.  object 
  20208.  
  20209.              1. A region of storage.  An object is created when a variable is 
  20210.                 defined or new is invoked.  An object is destroyed when it goes 
  20211.                 out of scope. (See also instance.) 
  20212.  
  20213.              2. In object-oriented design or programming, an abstraction 
  20214.                 consisting of data and the operations associated with that 
  20215.                 data. See also class. IBM. 
  20216.  
  20217.              3. An instance of a class. 
  20218.  
  20219.  object code Machine-executable instructions, usually generated by a compiler 
  20220.            from source code written in a higher level language (such as the C++ 
  20221.            language). For programs that must be linked, object code consists of 
  20222.            relocatable machine code. 
  20223.  
  20224.  object module 
  20225.  
  20226.              1. All or part of an object program sufficiently complete for 
  20227.                 linking.  Assemblers and compilers usually produce object 
  20228.                 modules. ISO Draft. 
  20229.  
  20230.              2. A set of instructions in machine language produced by a 
  20231.                 compiler from a source program. IBM. 
  20232.  
  20233.  object-oriented programming A programming approach based on the concepts of 
  20234.            data abstraction and inheritance.  Unlike procedural programming 
  20235.            techniques, object-oriented programming concentrates not on how 
  20236.            something is accomplished, but on what data objects comprise the 
  20237.            problem and how they are manipulated. 
  20238.  
  20239.  octal constant The digit 0 (zero) followed by any digits 0 through 7. 
  20240.  
  20241.  open file A file that is currently associated with a file descriptor. X/Open. 
  20242.            ISO.1. 
  20243.  
  20244.  operand   An entity on which an operation is performed. ISO-JTC1. ANSI. 
  20245.  
  20246.  operating system (OS) Software that controls functions such as resource 
  20247.            allocation, scheduling, input/output control, and data management. 
  20248.  
  20249.  operator function An overloaded operator that is either a member of a class or 
  20250.            that takes at least one argument that is a class type or a reference 
  20251.            to a class type. 
  20252.  
  20253.  operator precedence In programming languages, an order relation defining the 
  20254.            sequence of the application of operators within an expression. 
  20255.            ISO-JTC1. 
  20256.  
  20257.  overflow 
  20258.  
  20259.              1. A condition that occurs when a portion of the result of an 
  20260.                 operation exceeds the capacity of the intended unit of storage. 
  20261.  
  20262.              2. That portion of an operation that exceeds the capacity of the 
  20263.                 intended unit of storage. IBM. 
  20264.  
  20265.  overloading An object-oriented programming technique that allows you to 
  20266.            redefine functions and most standard C++ operators when the 
  20267.            functions and operators are used with class types. 
  20268.  
  20269.  
  20270. ΓòÉΓòÉΓòÉ <hidden> P ΓòÉΓòÉΓòÉ
  20271.  
  20272.  pack      To store data in a compact form in such a way that the original form 
  20273.            can be recovered. 
  20274.  
  20275.  parameter 
  20276.  
  20277.              1. In the C and C++ languages, an object declared as part of a 
  20278.                 function declaration or definition that acquires a value on 
  20279.                 entry to the function, or an identifier following the macro 
  20280.                 name in a function-like macro definition. X/Open. 
  20281.  
  20282.              2. Data passed between programs or procedures. IBM. 
  20283.  
  20284.  parent process 
  20285.  
  20286.              1. The program that originates the creation of other processes by 
  20287.                 means of spawn or exec function calls. See also child process. 
  20288.  
  20289.              2. A process that creates other processes. 
  20290.  
  20291.  partitioned data set (PDS) A data set in direct access storage that is divided 
  20292.            into partitions, called members, each of which can contain a 
  20293.            program, part of a program, or data. IBM. 
  20294.  
  20295.  path name 
  20296.  
  20297.              1. A string that is used to identify a file. A path name consists 
  20298.                 of, at most, {PATH_MAX} bytes, including the terminating null 
  20299.                 character.  It has an optional beginning slash, followed by 
  20300.                 zero or more file names separated by slashes.  If the path name 
  20301.                 refers to a directory, it may also have one or more trailing 
  20302.                 slashes.  Multiple successive slashes are considered to be the 
  20303.                 same as one slash.  A path name that begins with two successive 
  20304.                 slashes may be interpreted in an implementation-dependent 
  20305.                 manner, although more than two leading slashes will be treated 
  20306.                 as a single slash.  The interpretation of the path name is 
  20307.                 described in pathname resolution. ISO.1. 
  20308.  
  20309.              2. A file name specifying all directories leading to the file. 
  20310.  
  20311.  pattern   A sequence of characters used either with regular expression 
  20312.            notation or for path name expansion, as a means of selecting various 
  20313.            characters strings or path names, respectively. The syntaxes of the 
  20314.            two patterns are similar, but not identical. X/Open. 
  20315.  
  20316.  period    The character (.). The term period is contrasted against dot, which 
  20317.            is used to describe a specific directory entry. This character is 
  20318.            named <period> in the portable character set. 
  20319.  
  20320.  pipe      To direct data so that the output from one process becomes the input 
  20321.            to another process.  The standard output of one command can be 
  20322.            connected to the standard input of another with the pipe operator 
  20323.            (|).  Two commands connected in this way constitute a pipeline. IBM. 
  20324.  
  20325.  pointer   In the C and C++ languages, a variable that holds the address of a 
  20326.            data object or a function. IBM. 
  20327.  
  20328.  pointer to member An operator used to access the address of non-static members 
  20329.            of a class. 
  20330.  
  20331.  portable character set The set of characters specified in POSIX 1003.2, 
  20332.            section 2.4: 
  20333.  
  20334.                       <NUL>
  20335.                       <alert>
  20336.                       <backspace>
  20337.                       <tab>
  20338.                       <newline>
  20339.                       <vertical-tab>
  20340.                       <form-feed>
  20341.                       <carriage-return>
  20342.                       <space>
  20343.                       <exclamation-mark>     !
  20344.                       <quotation-mark>       "
  20345.                       <number-sign>          #
  20346.                       <dollar-sign>          $
  20347.                       <percent-sign>         %
  20348.                       <ampersand>            &
  20349.                       <apostrophe>           '
  20350.                       <left-parenthesis>     (
  20351.                       <right-parenthesis>    )
  20352.                       <asterisk>             *
  20353.                       <plus-sign>            +
  20354.                       <comma>                ,
  20355.                       <hyphen>               -
  20356.                       <hyphen-minus>         -
  20357.                       <period>               .
  20358.                       <slash>                /
  20359.                       <zero>                 0
  20360.                       <one>                  1
  20361.                       <two>                  2
  20362.                       <three>                3
  20363.                       <four>                 4
  20364.                       <five>                 5
  20365.                       <six>                  6
  20366.                       <seven>                7
  20367.                       <eight>                8
  20368.                       <nine>                 9
  20369.                       <colon>                :
  20370.                       <semicolon>            ;
  20371.                       <less-than-sign>       <
  20372.                       <equals-sign>          =
  20373.                       <greater-than-sign>    >
  20374.                       <question-mark>        ?
  20375.                       <commercial-at>        @
  20376.  
  20377.                       <A>                    A
  20378.                       <B>                    B
  20379.                       <C>                    C
  20380.                       <D>                    D
  20381.                       <E>                    E
  20382.                       <F>                    F
  20383.                       <G>                    G
  20384.                       <H>                    H
  20385.                       <I>                    I
  20386.                       <J>                    J
  20387.                       <K>                    K
  20388.                       <L>                    L
  20389.                       <M>                    M
  20390.                       <N>                    N
  20391.                       <O>                    O
  20392.                       <P>                    P
  20393.                       <Q>                    Q
  20394.                       <R>                    R
  20395.                       <S>                    S
  20396.                       <T>                    T
  20397.                       <U>                    U
  20398.                       <V>                    V
  20399.                       <W>                    W
  20400.                       <X>                    X
  20401.                       <Y>                    Y
  20402.                       <Z>                    Z
  20403.  
  20404.                       <left-square-bracket>  [
  20405.                       <backslash>            \
  20406.                       <reverse-solidus>      \
  20407.                       <right-square-bracket> ]
  20408.                       <circumflex>           ^
  20409.                       <circumflex-accent>    ^
  20410.                       <underscore>           _
  20411.                       <low-line>             _
  20412.                       <grave-accent>         `
  20413.  
  20414.                       <a>                    a
  20415.                       <b>                    b
  20416.                       <c>                    c
  20417.                       <d>                    d
  20418.                       <e>                    e
  20419.                       <f>                    f
  20420.                       <g>                    g
  20421.                       <h>                    h
  20422.                       <i>                    i
  20423.                       <j>                    j
  20424.                       <k>                    k
  20425.                       <l>                    l
  20426.                       <m>                    m
  20427.                       <n>                    n
  20428.                       <o>                    o
  20429.                       <p>                    p
  20430.                       <q>                    q
  20431.                       <r>                    r
  20432.                       <s>                    s
  20433.                       <t>                    t
  20434.                       <u>                    u
  20435.                       <v>                    v
  20436.                       <w>                    w
  20437.                       <x>                    x
  20438.                       <y>                    y
  20439.                       <z>                    z
  20440.  
  20441.                       <left-brace>           {
  20442.                       <left-curly-bracket>   {
  20443.                       <vertical-line>        |
  20444.                       <right-brace>          }
  20445.                       <right-curly-bracket>  }
  20446.                       <tilde>                ~
  20447.  
  20448.  portability The ability of a programming language to compile successfully on 
  20449.            different operating systems without requiring changes to the source 
  20450.            code. 
  20451.  
  20452.  precedence The priority system for grouping different types of operators with 
  20453.            their operands. 
  20454.  
  20455.  predefined macros Frequently used routines provided by an application or 
  20456.            language for the programmer. 
  20457.  
  20458.  preprocessor A phase of the compiler that examines the source program for 
  20459.            preprocessor statements that are then executed, resulting in the 
  20460.            alteration of the source program. 
  20461.  
  20462.  private   Pertaining to a class member that is only accessible to member 
  20463.            functions and friends of that class. 
  20464.  
  20465.  process 
  20466.  
  20467.              1. An instance of an executing application and the resources it 
  20468.                 uses. 
  20469.  
  20470.              2. An address space and single thread of control that executes 
  20471.                 within that address space, and its required system resources. A 
  20472.                 process is created by another process issuing the fork[] 
  20473.                 function. The process that issues the fork[] function is known 
  20474.                 as the parent process, and the new process created by the 
  20475.                 fork[] function is known as the child process. X/Open. ISO.1. 
  20476.  
  20477.  protected Pertaining to a class member that is only accessible to member 
  20478.            functions and friends of that class, or to member functions and 
  20479.            friends of classes derived from that class. 
  20480.  
  20481.  prototype A function declaration or definition that includes both the return 
  20482.            type of the function and the types of its parameters. See function 
  20483.            prototype. 
  20484.  
  20485.  public    Pertaining to a class member that is accessible to all functions. 
  20486.  
  20487.  
  20488. ΓòÉΓòÉΓòÉ <hidden> Q ΓòÉΓòÉΓòÉ
  20489.  
  20490.  qualified name Used to qualify a nonclass type name such as a member by its 
  20491.            class name. 
  20492.  
  20493.  queue     A sequence with restricted access in which elements can only be 
  20494.            added at the back end (or bottom) and removed from the front end (or 
  20495.            top). A queue is characterized by first-in, first-out behavior and 
  20496.            chronological order. 
  20497.  
  20498.  
  20499. ΓòÉΓòÉΓòÉ <hidden> R ΓòÉΓòÉΓòÉ
  20500.  
  20501.  register storage class specifier A specifier that indicates to the compiler 
  20502.            within a block scope data definition, or a parameter declaration, 
  20503.            that the object being described will be heavily used. 
  20504.  
  20505.  redirection In the shell, a method of associating files with the input or 
  20506.            output of commands. X/Open. 
  20507.  
  20508.  reentrant The attribute of a program or routine that allows the same copy of a 
  20509.            program or routine to be used concurrently by two or more tasks. 
  20510.  
  20511.  regular expression 
  20512.  
  20513.              1. A mechanism to select specific strings from a set of character 
  20514.                 strings. 
  20515.  
  20516.              2. A set of characters, meta-characters, and operators that define 
  20517.                 a string or group of strings in a search pattern. 
  20518.  
  20519.              3. A string containing wildcard characters and operations that 
  20520.                 define a set of one or more possible strings. 
  20521.  
  20522.  regular file A file that is a randomly accessible sequence of bytes, with no 
  20523.            further structure imposed by the system. X/Open. ISO.1. 
  20524.  
  20525.  relation  An unordered flat collection class that uses keys, allows for 
  20526.            duplicate elements, and has element equality. 
  20527.  
  20528.  runtime library A compiled collection of functions whose members can be 
  20529.            referred to by an application program during runtime execution. 
  20530.            Typically used to refer to a dynamic library that is provided in 
  20531.            object code, such that references to the library are resolved during 
  20532.            the linking step.  The runtime library itself is not statically 
  20533.            bound into the application modules. 
  20534.  
  20535.  
  20536. ΓòÉΓòÉΓòÉ <hidden> S ΓòÉΓòÉΓòÉ
  20537.  
  20538.  scalar    An arithmetic object, or a pointer to an object of any type. 
  20539.  
  20540.  scope 
  20541.  
  20542.              1. That part of a source program in which a variable is visible. 
  20543.  
  20544.              2. That part of a source program in which an object is defined and 
  20545.                 recognized. 
  20546.  
  20547.  semaphore An object used by multithread applications for signalling purposes 
  20548.            and for controlling access to serially reusable resources. Processes 
  20549.            can be locked to a resource with semaphores if the processes follow 
  20550.            certain programming conventions. 
  20551.  
  20552.  sequence  A sequentially ordered flat collection. 
  20553.  
  20554.  session   A collection of process groups established for job control purposes. 
  20555.            Each process group is a member of a session. A process is considered 
  20556.            to be a member of the session of which its process group is a 
  20557.            member. A newly created process joins the session of its creator. A 
  20558.            process can alter its session membership. There can be multiple 
  20559.            process groups in the same session. X/Open. ISO.1. 
  20560.  
  20561.  shell     A program that interprets sequences of text input as commands. It 
  20562.            may operate on an input stream or it may interactively prompt and 
  20563.            read commands from a terminal. X/Open. 
  20564.  
  20565.            This feature is provided as part of OpenEdition MVS Shell and 
  20566.            Utilities feature licensed program. 
  20567.  
  20568.  signal 
  20569.  
  20570.              1. A condition that may or may not be reported during program 
  20571.                 execution. For example, SIGFPE is the signal used to represent 
  20572.                 erroneous arithmetic operations such as a division by zero. 
  20573.  
  20574.              2. A mechanism by which a process may be notified of, or affected 
  20575.                 by, an event occurring in the system. Examples of such events 
  20576.                 include hardware exceptions and specific actions by processes. 
  20577.                 The term signal is also used to refer to the event itself. 
  20578.                 X/Open. ISO.1. 
  20579.  
  20580.              3. In AIX operating system operations, a method of interprocess 
  20581.                 communication that simulates software interrupts. IBM. 
  20582.  
  20583.  signal handler A function to be called when the signal is reported. 
  20584.  
  20585.  slash     The character /, also known as solidus. This character is named 
  20586.            <slash> in the portable character set. 
  20587.  
  20588.  S-name    An external non-C++ name in an object module produced by compiling 
  20589.            with the NOLONGNAME option. Such a name is up to 8 characters long 
  20590.            and single case. 
  20591.  
  20592.  source file A file that contains source statements for such items as 
  20593.            high-level language programs and data description specifications. 
  20594.            IBM. 
  20595.  
  20596.  source program A set of instructions written in a programming language that 
  20597.            must be translated to machine language before the program can be 
  20598.            run. IBM. 
  20599.  
  20600.  space character The character defined in the portable character set as 
  20601.            <space>. The space character is a member of the space character 
  20602.            class of the current locale, but represents the single character, 
  20603.            and not all of the possible members of the class. X/Open. 
  20604.  
  20605.  specifiers Used in declarations to indicate storage class, fundamental data 
  20606.            type and other properties of the object or function being declared. 
  20607.  
  20608.  stack frame The physical representation of the activation of a routine. The 
  20609.            stack frame is allocated and freed on a LIFO (last in, first out) 
  20610.            basis. A stack is a collection of one or more stack segments 
  20611.            consisting of an initial stack segment and zero or more increments. 
  20612.  
  20613.  stack storage Synonym for automatic storage. 
  20614.  
  20615.  standard error An output stream usually intended to be used for diagnostic 
  20616.            messages. X/Open. 
  20617.  
  20618.  standard input 
  20619.  
  20620.              1. An input stream usually intended to be used for primary data 
  20621.                 input. X/Open. 
  20622.  
  20623.              2. The primary source of data entered into a command. Standard 
  20624.                 input comes from the keyboard unless redirection or piping is 
  20625.                 used, in which case standard input can be from a file or the 
  20626.                 output from another command. IBM. 
  20627.  
  20628.  standard output 
  20629.  
  20630.              1. An output stream usually intended to be used for primary data 
  20631.                 output. X/Open. 
  20632.  
  20633.              2. In the AIX operating system, the primary destination of data 
  20634.                 coming from a command. Standard output goes to the display 
  20635.                 unless redirection or piping is used, in which case standard 
  20636.                 output can go to a file or to another command. IBM. 
  20637.  
  20638.  statement An instruction that ends with the character ; (semicolon) or several 
  20639.            instructions that are surrounded by the characters { and }. 
  20640.  
  20641.  static    A keyword used for defining the scope and linkage of variables and 
  20642.            functions. For internal variables, the variable has block scope and 
  20643.            retains its value between function calls. For external values, the 
  20644.            variable has file scope and retains its value within the source 
  20645.            file. For class variables, the variable is shared by all objects of 
  20646.            the class and retains its value within the entire program. 
  20647.  
  20648.  storage class specifier One of: auto, register, static, or extern. 
  20649.  
  20650.  stream 
  20651.  
  20652.              1. A continuous stream of data elements being transmitted, or 
  20653.                 intended for transmission, in character or binary-digit form, 
  20654.                 using a defined format. 
  20655.  
  20656.              2. A file access object that allows access to an ordered sequence 
  20657.                 of characters, as described by the ISO C standard. Such objects 
  20658.                 can be created by the fdopen or fopen functions, and are 
  20659.                 associated with a file descriptor. A stream provides the 
  20660.                 additional services of user-selectable buffering and formatted 
  20661.                 input and output. X/Open. 
  20662.  
  20663.  string    A contiguous sequence of bytes terminated by and including the first 
  20664.            null byte. X/Open. 
  20665.  
  20666.  string literal Zero or more characters enclosed in double quotation marks. 
  20667.  
  20668.  struct    An aggregate of elements, having arbitrary types. 
  20669.  
  20670.  structure A construct (a class data type) that contains an ordered group of 
  20671.            data objects. Unlike an array, the data objects within a structure 
  20672.            can have varied data types. A structure can be used in all places a 
  20673.            class is used. The initial projection is public. 
  20674.  
  20675.  subscript One or more expressions, each enclosed in brackets, that follow an 
  20676.            array name. A subscript refers to an element in an array. 
  20677.  
  20678.  subsystem A secondary or subordinate system, usually capable of operating 
  20679.            independently of or asynchronously with, a controlling system. ISO 
  20680.            Draft. 
  20681.  
  20682.  superset  Given two sets A and B, A is a superset of B if and only if all 
  20683.            elements of B are also elements of A.  That is, A is a superset of B 
  20684.            if B is a subset of A. 
  20685.  
  20686.  support   In system development, to provide the necessary resources for the 
  20687.            correct operation of a functional unit. IBM. 
  20688.  
  20689.  switch statement A C or C++ language statement that causes control to be 
  20690.            transferred to one of several statements depending on the value of 
  20691.            an expression. 
  20692.  
  20693.  system default A default value defined in the system profile. IBM. 
  20694.  
  20695.  
  20696. ΓòÉΓòÉΓòÉ <hidden> T ΓòÉΓòÉΓòÉ
  20697.  
  20698.  tab character A character that in the output stream indicates that printing or 
  20699.            displaying should start at the next horizontal tabulation position 
  20700.            on the current line. The tab is the character designated by '\t' in 
  20701.            the C language. If the current position is at or past the last 
  20702.            defined horizontal tabulation position, the behavior is unspecified. 
  20703.            It is unspecified whether the character is the exact sequence 
  20704.            transmitted to an output device by the system to accomplish the 
  20705.            tabulation. X/Open. 
  20706.  
  20707.            This character is named <tab> in the portable character set. 
  20708.  
  20709.  task 
  20710.  
  20711.              1. In a multiprogramming or multiprocessing environment, one or 
  20712.                 more sequences of instructions treated by a control program as 
  20713.                 an element of work to be accomplished by a computer. ISO-JTC1. 
  20714.                 ANSI. 
  20715.  
  20716.              2. A routine that is used to simulate the operation of programs. 
  20717.                 Tasks are said to be nonpreemptive because only a single task 
  20718.                 is executing at any one time. Tasks are said to be lightweight 
  20719.                 because less time and space are required to create a task than 
  20720.                 a true operating system process. 
  20721.  
  20722.  task library A class library that provides the facilities to write programs 
  20723.            that are made up of tasks. 
  20724.  
  20725.  template  A family of classes or functions with variable types. 
  20726.  
  20727.  template class A class instance generated by a class template. 
  20728.  
  20729.  template function A function generated by a function template. 
  20730.  
  20731.  text file A file that contains characters organized into one or more lines. 
  20732.            The lines must not contain NUL characters and none can exceed 
  20733.            {LINE_MAX}-which is defined in limits.h-bytes in length, including 
  20734.            the new-line character. The term text file does not prevent the 
  20735.            inclusion of control or other non-printable characters (other than 
  20736.            NUL). X/Open. 
  20737.  
  20738.  this      A C++ keyword that identifies a special type of pointer in a member 
  20739.            function, that references the class object with which the member 
  20740.            function was invoked. 
  20741.  
  20742.  thread    The smallest unit of operation to be performed within a process. 
  20743.            IBM. 
  20744.  
  20745.  tilde     The character ~. This character is named <tilde> in the portable 
  20746.            character set. 
  20747.  
  20748.  trap      An unprogrammed conditional jump to a specified address that is 
  20749.            automatically activated by hardware. A recording is made of the 
  20750.            location from which the jump occurred. ISO-JTC1. 
  20751.  
  20752.  type      The description of the data and the operations that can be performed 
  20753.            on or by the data.  See also data type. 
  20754.  
  20755.  type definition A definition of a name for a data type. IBM. 
  20756.  
  20757.  type specifier Used to indicate the data type of an object or function being 
  20758.            declared. 
  20759.  
  20760.  
  20761. ΓòÉΓòÉΓòÉ <hidden> U ΓòÉΓòÉΓòÉ
  20762.  
  20763.  undefined behavior Referring to a program or function that may produce 
  20764.            erroneous results without warning because of its use of an 
  20765.            indeterminate value, or because of erroneous program constructs or 
  20766.            erroneous data. 
  20767.  
  20768.  underflow 
  20769.  
  20770.              1. A condition that occurs when the result of an operation is less 
  20771.                 than the smallest possible nonzero number. 
  20772.  
  20773.              2. Synonym for arithmetic underflow, monadic operation. IBM. 
  20774.  
  20775.  union 
  20776.  
  20777.              1. In the C or C++ language, a variable that can hold any one of 
  20778.                 several data types, but only one data type at a time. IBM. 
  20779.  
  20780.              2. For bags, there is an additional rule for duplicates: If bag P 
  20781.                 contains an element m times and bag Q contains the same element 
  20782.                 n times, then the union of P and Q contains that element m+n 
  20783.                 times. 
  20784.  
  20785.  unrecoverable error An error for which recovery is impossible without use of 
  20786.            recovery techniques external to the computer program or run. 
  20787.  
  20788.  
  20789. ΓòÉΓòÉΓòÉ <hidden> V ΓòÉΓòÉΓòÉ
  20790.  
  20791.  variable  In programming languages, a language object that may take different 
  20792.            values, one at a time. The values of a variable are usually 
  20793.            restricted to a certain data type. ISO-JTC1. 
  20794.  
  20795.  variant character A character whose hexadecimal value differs between 
  20796.            different character sets.  On EBCDIC systems, such as S/390, these 
  20797.            13 characters are an exception to the portability of the portable 
  20798.            character set. 
  20799.  
  20800.                       <left-square-bracket>  [
  20801.                       <right-square-bracket> ]
  20802.                       <left-brace>           {
  20803.                       <right-brace>          }
  20804.                       <backslash>            \
  20805.                       <circumflex>           ^
  20806.                       <tilde>                ~
  20807.                       <exclamation-mark>     !
  20808.                       <number-sign>          #
  20809.                       <vertical-line>        |
  20810.                       <grave-accent>         `
  20811.                       <dollar-sign>          $
  20812.                       <commercial-at>        @
  20813.  
  20814.  virtual function A function of a class that is declared with the keyword 
  20815.            virtual. The implementation that is executed when you make a call to 
  20816.            a virtual function depends on the type of the object for which it is 
  20817.            called, which is determined at run time. 
  20818.  
  20819.  visible   Visibility of identifiers is based on scoping rules and is 
  20820.            independent of access. 
  20821.  
  20822.  
  20823. ΓòÉΓòÉΓòÉ <hidden> W ΓòÉΓòÉΓòÉ
  20824.  
  20825.  white space 
  20826.  
  20827.              1. Space characters, tab characters, form-feed characters, and 
  20828.                 new-line characters. 
  20829.  
  20830.              2. A sequence of one or more characters that belong to the space 
  20831.                 character class as defined via the LC_CTYPE category in the 
  20832.                 current locale. In the POSIX locale, white space consists of 
  20833.                 one or more blank characters (space and tab characters), 
  20834.                 new-line characters, carriage-return characters, form-feed 
  20835.                 characters, and vertical-tab characters. X/Open. 
  20836.  
  20837.  wide character A character whose range of values can represent distinct codes 
  20838.            for all members of the largest extended character set specified 
  20839.            among the supporting locales. 
  20840.  
  20841.  wide-character string A contiguous sequence of wide-character codes terminated 
  20842.            by and including the first null wide-character code. X/Open. 
  20843.  
  20844.  word boundary Any storage position at which data must be aligned for certain 
  20845.            processing operations. The halfword boundary must be divisible by 2; 
  20846.            the fullword boundary by 4; and the doubleword boundary by 8. IBM. 
  20847.  
  20848.  working directory Synonym for current working directory. 
  20849.  
  20850.  write 
  20851.  
  20852.              1. To output characters to a file, such as standard output or 
  20853.                 standard error. Unless otherwise stated, standard output is the 
  20854.                 default output destination for all uses of the term write. 
  20855.                 X/Open. 
  20856.  
  20857.              2. To make a permanent or transient recording of data in a storage 
  20858.                 device or on a data medium. ISO-JTC1. ANSI. 
  20859.  
  20860.  
  20861. ΓòÉΓòÉΓòÉ <hidden>  ΓòÉΓòÉΓòÉ
  20862.  
  20863. For more information on masking floating-point exceptions, see Handling 
  20864. Floating-Point Exceptions.