home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / smart / sm_guid2.inf (.txt) < prev    next >
Encoding:
OS/2 Help File  |  1995-05-16  |  80.3 KB  |  2,304 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. The SMART User's Guide ΓòÉΓòÉΓòÉ
  3.  
  4.    The SMART2 User's Guide
  5.  
  6.        Version 2.1B
  7.        May 1995
  8.  
  9.    (C) 1991, 1994, 1995 One Up Corporation
  10.  
  11.  Notice 
  12.  Table of Contents 
  13.  
  14.  
  15. ΓòÉΓòÉΓòÉ 2. Notice ΓòÉΓòÉΓòÉ
  16.  
  17. ** NOTICE ** 
  18.  
  19. This document may not, in whole or in part, be copied, reproduced, photocopied, 
  20. translated, or reproduced to any electronic medium or machine readable form 
  21. without prior written consent from One Up Corporation. 
  22.  
  23. This publication could contain technical inaccuracies or typographical errors. 
  24. As changes are periodically made to the information herein; these changes may 
  25. be incorporated in new additions of the publication. One Up Corporation may 
  26. make improvements and/or changes in the product and/or the program described in 
  27. this publication at any time. 
  28.  
  29. One Up Corporation is not responsible for any direct or indirect damage or loss 
  30. of business resulting from inaccuracies or omissions in this publication.  The 
  31. specifications contained in this document are subject to change without notice. 
  32.  
  33. SMART - Source Migration Analysis Reporting Toolset is a trademark of One Up 
  34. Corporation. OS/2, Presentation Manager are trademarks of the International 
  35. Business Machines Corporation. IBM is a registered trademark of the 
  36. International Business Machines Corporation. Other trademarks are property of 
  37. their respective companies. 
  38.  
  39. CONTENTS 
  40.  
  41.  
  42. ΓòÉΓòÉΓòÉ 3. Table of Contents ΓòÉΓòÉΓòÉ
  43.  
  44.  Chapter 1 - Introduction 
  45.   SMART - Concepts 
  46.   The Analysis/Migration Process 
  47.   What this Document Contains 
  48.   Where is the Remaining Documentation? 
  49.  Chapter 2 - Installation 
  50.   Before You Begin 
  51.   Installing SMART 
  52.   Setup Options 
  53.  Chapter 3 - Getting Started 
  54.   Getting Ready 
  55.   The Analysis Process 
  56.   The Migration Process 
  57.   Completing The Migration 
  58.   The SMART Viewer 
  59.   The SMART Resource Translator 
  60.   The SMART Win Help Translator 
  61.   Graphical Resource Conversion 
  62.   The SMART Editor Development Tool 
  63.  Chapter 4 - Techniques 
  64.   Preparing Your Source Code 
  65.   Reading the Analysis Summary Reports 
  66.   Reading the Analysis Display/Report 
  67.   Interpreting the Analysis 
  68.   Use of Common Functions 
  69.   Source Migration Format Considerations 
  70.   File Extension Mapping 
  71.   Source Migration Comment Code Removal 
  72.   Increased Productivity with The SMART Editor 
  73.  Chapter 5 - Reference 
  74.   Migration Formats 
  75.   Specifications and Restrictions 
  76.   SMART Files 
  77.   Technical Support 
  78.  
  79. CONTINUE - Chapter 1 
  80.  
  81.  
  82. ΓòÉΓòÉΓòÉ 4. Chapter 1 - Introduction ΓòÉΓòÉΓòÉ
  83.  
  84. Chapter 1 - Introduction 
  85.  
  86.   SMART - Concepts 
  87.   The Analysis/Migration Process 
  88.   What this Document Contains 
  89.   Where is the Remaining Documentation? 
  90.  
  91. CONTINUE - SMART - Concepts 
  92. BACK - Table of Contents 
  93.  
  94.  
  95. ΓòÉΓòÉΓòÉ 4.1. SMART - Concepts ΓòÉΓòÉΓòÉ
  96.  
  97. SMART - Concepts 
  98.  
  99.   NOTE: REFERENCES TO SOURCELINK, SMART VIEWER, MIGRATION and RESOURCE 
  100. CONVERSION are only applicable with the Analysis AND Migration version of 
  101. SMART.  If you are only licensed for the Analysis version of SMART, you may 
  102. ignore information in this and other documents to those functions that you may 
  103. not have in this product. 
  104.  
  105.   SMART - Source Migration Analysis Reporting Toolset provides analysis and 
  106. source code migration assistance from one platform to another or one version to 
  107. another on a given platform.  This version of SMART executes on the OS/2 
  108. platform and is used for the migration of 'C' and C++ source code from Windows 
  109. 16 bit to OS/2 32 bit or OS/2 16 bit to OS/2 32 bit or Win32 to OS/2 32 bit 
  110. depending upon the licensed, installed tables. 
  111.  
  112.   The process of porting source code from one platform to another is indeed 
  113. difficult and subjective. 
  114.  
  115.   In fact, exploiting the features of one platform, and using proprietary 
  116. libraries, classes, and objects may make it severely difficult to port to 
  117. another platform without a major rewrite of the source code. 
  118.  
  119.   There is no pat solution or utility to port all code to a target platform, 
  120. and we dare say there most probably never will be.  However, with the proper 
  121. tools, methodology, techniques and training the effort required in the 
  122. migration of source code can be GREATLY reduced. 
  123.  
  124.   The most appropriate solution for this process is to use productive computer 
  125. tools to perform tasks that are easily identified, routine, and labor intensive 
  126. and provide a knowledge base to contain information related to all occurrence 
  127. types of differences between the platforms.  The human element is most 
  128. appropriately applied where the complexity of the issue is too complicated for 
  129. the computer analysis.  It is advantageous to provide the programming 
  130. professional with powerful productivity tools to make global changes based on 
  131. the migration issues of complex nature. 
  132.  
  133.   SMART is designed to assist in the analysis and migration of native source 
  134. code from one platform to another or one version of an operating environment to 
  135. another on the same platform. 
  136.  
  137.   The platform dependent data is contained in the migration dictionary (table) 
  138. and the migration database files. 
  139.  
  140.   This process is based on finding keywords (API calls, symbols, parameters, 
  141. typedefs, etc) that differ between the source and target platforms in the 
  142. migration. No attempt is made to analyze the intended use of the application 
  143. source code.  As such, there is no intent to evaluate platform exploitation, or 
  144. evaluate the use of the source code for application functionality such as MDI, 
  145. DDEML, communication, LAN, and etc. The base API keyword differences are 
  146. categorized into groups to represent the difficulty in migration, ranging from 
  147. a simple literal replacement to the case where the functionality does not exist 
  148. in the target platform. 
  149.  
  150.   In the Analysis process, SMART will analyze source code and prepare a report 
  151. (display) providing a detailed evaluation of the migration requirements. 
  152.  
  153.   Furthermore, in the migration process, SMART will process the user specified 
  154. source files and create migrated source files.  The migrated source file will 
  155. contain automatic migration changes (where possible) and in all cases will 
  156. provide in-line commented code for the developer to complete the migration. 
  157.  
  158. CONTINUE - The Analysis/Migration Process 
  159. BACK - Chapter 1 - Introduction 
  160. CONTENTS 
  161.  
  162.  
  163. ΓòÉΓòÉΓòÉ 4.2. The Analysis/Migration Process ΓòÉΓòÉΓòÉ
  164.  
  165. The Analysis/Migration Process 
  166.  
  167.   There are several key concepts regarding the operation of the SMART Toolset 
  168. including: The List-of-Files, keyword, category and hit. 
  169.  
  170.   A List-of-Files is a text file that contains all of the fully qualified 
  171. filenames for the source files to be processed by SMART.  Typically this will 
  172. include all program source files (.C) and all header files (.H).  Resource 
  173. files are migrated in a separate process using the resource translator 
  174. (Windows->OS/2 Migration only). 
  175.  
  176.   Keywords are items that are the basis for the definition of the interface to 
  177. a platform and may represent API (Application Programming Interface) calls, 
  178. symbols, parameters, structures, and typedefs.  Keywords are the basis for 
  179. migration with SMART.  As keywords are encountered in the SMART Analysis and/or 
  180. Migration processes SMART will look to the migration tables to indicate the 
  181. appropriate change as required. 
  182.  
  183.   Category is a key concept in the SMART process of source code migration.  All 
  184. of the items to be considered for migration are identified by its migration 
  185. difficulty.  The "category" of difficulty increases in effort and consideration 
  186. and range from a category of "000" to the most difficult category of "050". 
  187.  
  188.   There is one additional category of "999" indicating that the keyword has not 
  189. been defined.  This simply indicates that a keyword is identified for 
  190. migration, but the explanation for the migration has not yet been defined in 
  191. the SMART database. 
  192.  
  193.   The definitions for the difficulty categories are as follows: 
  194.  
  195.   000  Informational only - An exact match of the keyword exists in the target 
  196. platform but there is change in the size of type. (e.g. short to a long). 
  197.  
  198.   010  Literal replacement or Automatic migration - An equivalent definition 
  199. exists in the target platform but a literal change in the keyword is required 
  200. (e.g., LPSTR to PSZ) or keywords that are automatically migrated through the 
  201. use of MiCL Commands. 
  202.  
  203.   020  Replacement with parameter changes - Equivalent functionality exists in 
  204. the target platform but parameters or fields of a structure differ slightly 
  205. from the source platform definition (e.g., SetWindowPos to WinSetWindowPos). 
  206. Also  included are parameters that are not applicable or required on the target 
  207. platform (e.g., MakeProcInstance). 
  208.  
  209.   030  Change with more / less API calls - Equivalent functionality exists in 
  210. the target platform but it must be implemented with  more, or sometimes less, 
  211. function calls (e.g., DlgDirList).  Also included are items which map to one of 
  212. several choices depending upon the type of parameter used (e.g., GetObject). 
  213.  
  214.   040  Logic changes required - Similar functionality exists in the target 
  215. platform but the logic required to emulate the functionality must be reworked 
  216. (e.g., CreatePatternBrush). 
  217.  
  218.   050  Functionality does not exist - There is no means provided to perform the 
  219. same functionality in the target platform (e.g., GetKeynameText).  Workaround 
  220. coding must be implemented, where possible. 
  221.  
  222.   999  Dictionary entry not defined - The database does not currently have a 
  223. complete description for the migration of the keyword. 
  224.  
  225.   A Hit is simply a term referring to a match between a keyword in your source 
  226. code and an item in the migration database indicating that a code change may be 
  227. required. 
  228.  
  229. CONTINUE - What this Document Contains 
  230. BACK - SMART - Concepts 
  231. CONTENTS 
  232.  
  233.  
  234. ΓòÉΓòÉΓòÉ 4.3. What this Document Contains ΓòÉΓòÉΓòÉ
  235.  
  236. What this Document Contains 
  237.  
  238.   This document, contains an introduction in the use of the application 
  239. development tool SMART. 
  240.  
  241.   Detailed information regarding individual functions, dialog panels, controls, 
  242. parameters and options is available in the on-line documentation accessible 
  243. when SMART is running.  By pressing "F1" or accessing the on-line help through 
  244. the "Help" menu items you can obtain details regarding the specific operation 
  245. of SMART. 
  246.  
  247.   Neither this document nor the SMART on-line help will attempt to cover 
  248. specific platform migration issues beyond the help found in the on-line 
  249. migration data base access through the SMART Viewer.  Migration issues are 
  250. covered in the documentation of the specific platforms and are left to the 
  251. developer to research. 
  252.  
  253.   This document may make reference to utilities and functions that may be 
  254. specific to a particular platform and may not be included in your licensed copy 
  255. of SMART. 
  256.  
  257.   Programming UDMD dictionaries, including programming with MiCL Commands is 
  258. fully explained in the document file "SMART2 Programming Guide" found in the 
  259. SMART2 Desktop Folder. 
  260.  
  261.   The complete documentation of The SMART Editor is found in the separate 
  262. manual entitled "The SMART Editor Technical Manual". 
  263.  
  264.   The chapters of this document flow in a logical order to acquaint you with 
  265. the concepts, principles and general introduction to SMART. 
  266.  
  267.   Chapter 1 - Introduction 
  268.  
  269.    An introduction to the SMART methodology of source code migration and the 
  270. functionality of the SMART Toolset. 
  271.  
  272.   Chapter 2 - Installation 
  273.  
  274.    Step-wise instructions in the installation of SMART. 
  275.  
  276.   Chapter 3 - Gettiong Started 
  277.  
  278.    A guided introductory tutorial for executing the analysis and migration 
  279. processes. 
  280.  
  281.   Chapter 4 - Techniques 
  282.  
  283.    A set of topics covering important techniques in the use of SMART. 
  284.  
  285.   Chapter 5 - Reference 
  286.  
  287.    A chapter related to reference topics including migration formats 
  288. specifications and technical support for this product. 
  289.  
  290. CONTINUE - Where is the Remaining Documentation? 
  291. BACK - Analysis/Migration Process 
  292. CONTENTS 
  293.  
  294.  
  295. ΓòÉΓòÉΓòÉ 4.4. Where is the Remaining Documentation? ΓòÉΓòÉΓòÉ
  296.  
  297. Where is the Remaining Documentation? 
  298.  
  299.   It's on-line and accessible as you run SMART.  We intentionally put the 
  300. details of all the parameters, options and definitions of the dialog controls 
  301. on-line.  This puts your reference material where you need it most - 
  302. contextually sensitive at the point of processing. 
  303.  
  304.   While you are processing SMART press "F1" to obtain help at any menu item or 
  305. dialog panel.  You can also use the menu items under "Help" on your main menu 
  306. bar to browse through the SMART On-Line help facility.  In addition to the 
  307. index and contents panels, you can view panels on additional One-Up products, 
  308. reference material and tutorials on the Analysis or Migration processes. 
  309.  
  310. CONTINUE - Chapter 2 - Installation 
  311. BACK - What This Document Contains 
  312. CONTENTS 
  313.  
  314.  
  315. ΓòÉΓòÉΓòÉ 5. Chapter 2 - Installation ΓòÉΓòÉΓòÉ
  316.  
  317. Chapter 2 - Installation 
  318.  
  319.   Before You Begin 
  320.   Installing SMART 
  321.   Setup Options 
  322.  
  323. CONTINUE - Before You Begin 
  324. BACK - Where is the Remaining Documentation? 
  325. CONTENTS 
  326.  
  327.  
  328. ΓòÉΓòÉΓòÉ 5.1. Before You Begin ΓòÉΓòÉΓòÉ
  329.  
  330. Before You Begin 
  331.  
  332.   Before you begin the installation of SMART you may wish to take a moment to 
  333. insure that you are prepared for the installation. 
  334.  
  335.   You can install SMART from CD-ROM or you can install from Diskette.  If you 
  336. have this product on CD-ROM you can create diskettes for installation by 
  337. executing the command MAKADSK or MAKMDSK (Depending on whether you have the 
  338. analysis version of SMART or the Analysis and Migration).  This command file 
  339. requires that you specify the full drive and directory path of the SMART base 
  340. files on the CD-ROM. 
  341.  
  342.   If you are licensed for The SMART Editor, The SMART Editor documentation 
  343. regarding installation in The SMART Editor Technical Manual.  Your installation 
  344. of SMART will consist of an Install diskette and one or more migration table 
  345. diskettes depending upon your license. 
  346.  
  347.   The hard disk space requirements for the basic installation is as follows: 
  348.  
  349.   SMART Source Migration:
  350.    Win3.1 -> OS/2 2.1 -   8 megabytes
  351.    Win32 -> OS/2 2.1 -   12 megabytes
  352.    OS/2 16->32 bit -     3 megabytes
  353.   The SMART Editor:       2 megabytes
  354.  
  355.   If you have received this product on CD-ROM you can perform a mini-install of 
  356. the SMART on your hard disk (requiring only 15 KBYTES) and run from the CD-ROM. 
  357.  
  358.   This space only considers the installation files and does not include files 
  359. created during the run time execution of either SMART or The SMART Editor. 
  360.  
  361.   Depending upon the migration formats chosen, you may experience file 
  362. requirements over five or six times the original source code space in the 
  363. source migration and The SMART Editor hyperlink data base build. 
  364.  
  365. CONTINUE - Installing SMART 
  366. BACK - Chapter 2 - Installation 
  367. CONTENTS 
  368.  
  369.  
  370. ΓòÉΓòÉΓòÉ 5.2. Installing SMART ΓòÉΓòÉΓòÉ
  371.  
  372. Installing SMART 
  373.  
  374.   The installation of SMART is simple. 
  375.  
  376.  1.  Start by inserting the SMART Installation diskette into your floppy drive 
  377.     (A or B) or change directory to the CD-ROM directory containg the SMART 
  378.     files. (Depending upon the source of your SMART installation files). 
  379.  
  380.  2.  From an OS/2 command line, type:  a: (or b:), then  install 
  381.  
  382.  3.  A SMART installation window will appear to guide you through the 
  383.     installation. 
  384.  
  385.  4.  When ready, select "Install" from the main installation menu bar. 
  386.  
  387.  5.  You will be requested to specify the directory that will contain all of 
  388.     the SMART executing files and will be the root for subsequent 
  389.     sub-directories to contain sample files and migration tables. 
  390.  
  391.  6.  You will also have an opportunity to select other installation parameters, 
  392.     including the Platform Tables to be installed (For Full disk installation). 
  393.  
  394.  7.  Responding to all of the installation pop-up panels with an "Ok" (Enter 
  395.     key) will result in the default installation. 
  396.  
  397.  8.  It is recommended that you store the SMART DLLs in the directory with the 
  398.     other SMART executables.  To do so, you must have a "." (current path) in 
  399.     the LIBPATH statement in your CONFIG.SYS file.  If not, then you must store 
  400.     the DLL in a path specified by the LIBPATH statement. 
  401.  
  402.  9.  At the conclusion of the installation of SMART a desktop icon will be 
  403.     created for the SMART application and the SMART Viewer and two SMART 
  404.     Information Files. 
  405.  
  406. 10.  If you have not already installed The SMART Editor, please follow the 
  407.     instructions in Chapter 3 of The SMART Editor Technical Manual to properly 
  408.     install this companion application. You should install The SMART Editor 
  409.     before SMART if you are licensed for this product. 
  410.  
  411. CONTINUE - Setup Options 
  412. BACK - Before You Begin 
  413. CONTENTS 
  414.  
  415.  
  416. ΓòÉΓòÉΓòÉ 5.3. Setup Options ΓòÉΓòÉΓòÉ
  417.  
  418. Setup Options 
  419.  
  420.   After you have successfully installed SMART on your computer you may need to 
  421. modify the initial setup options in the SMART application. 
  422.  
  423.  1.  Open the Setup Options dialog panel by selecting "Setup Options" under the 
  424.     "Options" main menu item. 
  425.  
  426.  2.  Check to insure that your editor is specified in this panel.  If you have 
  427.     installed The SMART Editor, your editor name will be SLSTART. If you are 
  428.     using any other editor, enter the path and filename of the editor in the 
  429.     "Editor/Browser" entry field. 
  430.  
  431.  3.  The next item of importance is to insure that you have specified the 
  432.     appropriate SMART Migration Table filename in the Tables Selection panel, 
  433.     under the "Tables" main menu item. 
  434.  
  435.  4.  Both SMART and The SMART Editor allow you to drag-and-drop a selected font 
  436.     from the OS/2 system font palette onto the menu bar of the application in 
  437.     order to set all window fonts. After you have dropped the selected font, 
  438.     close and reopen the application to propagate the selected font throughout 
  439.     the application. 
  440.  
  441.  5.  Once you have installed The SMART Editor you can register the SMART Viewer 
  442.     REXX macro (SMVIEWER.REX) under the "Macro" menu item.  To accomplish this, 
  443.     pull down the "Macro" menu list in The SMART Editor and select "Define Menu 
  444.     Item".  Choose "Add" and complete the dialog panel to register SMVIEWER.REX 
  445.     as a macro item, with your chose of accelerator key. Using this macro, you 
  446.     can mouse click on a source platform keyword and press your chosen 
  447.     accelerator key to display SMART Viewer on-line migration help. 
  448.  
  449.   Within SMART Viewer you can drop your chosen font on the client area of the 
  450. application. After you have set the application font you can set the fonts for 
  451. each of the on-line display windows. 
  452.  
  453.   The following chapters in this document will guide you through the basic 
  454. functionality in the Analysis and Migration processes of SMART. 
  455.  
  456. CONTINUE - Chapter 3 - Getting Started 
  457. BACK - Installing SMART 
  458. CONTENTS 
  459.  
  460.  
  461. ΓòÉΓòÉΓòÉ 6. Chapter 3 - Getting Started ΓòÉΓòÉΓòÉ
  462.  
  463. Chapter 3 - Getting Started 
  464.  
  465.   Getting Ready 
  466.   The Analysis Process 
  467.   The Migration Process 
  468.   Completing The Migration 
  469.   The SMART Viewer 
  470.   The SMART Resource Translator 
  471.   The SMART Win Help Translator 
  472.   Graphical Resource Conversion 
  473.   The SMART Editor Development Tool 
  474.  
  475. CONTINUE - Getting Ready 
  476. BACK - Setup Options 
  477. CONTENTS 
  478.  
  479.  
  480. ΓòÉΓòÉΓòÉ 6.1. Getting Ready ΓòÉΓòÉΓòÉ
  481.  
  482. Getting Ready 
  483.  
  484.   You may wish to become familiar with SMART by using the sample source code 
  485. files supplied in the installation of SMART under the "Samples" sub-directory. 
  486. You can follow along with this chapter and use the steps as a general tutorial, 
  487. or you may wish to strike out on your own and explore the SMART functionality 
  488. on your own files. 
  489.  
  490.   Before you start processing, it is always a good idea to backup your original 
  491. source code. SMART Source Migration generates source code.  Sparing you the 
  492. pain of inadvertently overwriting original source code, it is well advised to 
  493. "hide" your original code during your processing. 
  494.  
  495.   SMART creates analysis files in the same directory as the source code being 
  496. analyzed. If you are running from CD-ROM and using the application sample 
  497. files, you will need to copy these files to your read/write hard drive. 
  498.  
  499.   It is also advised that you always use the option to generate the changed 
  500. code using the extension mapping.  This will insure that a SMART process 
  501. creates a file of similar name, having a different file extension to maintain 
  502. uniqueness.  Using this technique, you can simply rerun the process, if needed, 
  503. without losing the original source file. 
  504.  
  505.   You will most probably wish to run the SMART migration process multiple times 
  506. on a sample code set with different format options to insure that you achieve 
  507. the desired results for your particular needs. 
  508.  
  509. CONTINUE - The Analysis Process 
  510. BACK - Chapter 3 - Getting Started 
  511. CONTENTS 
  512.  
  513.  
  514. ΓòÉΓòÉΓòÉ 6.2. The Analysis Process ΓòÉΓòÉΓòÉ
  515.  
  516. The Analysis Process 
  517.  
  518.   The analysis of source code for an evaluation of the migration and porting 
  519. effort is accomplished through the use of SMART Analysis Procedure. 
  520.  
  521.   This procedure simply consists of creating a text file (called a 
  522. List-of-Files) with the fully qualified filenames of the files to be analyzed, 
  523. and then perform the analysis procedure. 
  524.  
  525.   The results of the analysis can be viewed on-screen and printed using The 
  526. SMART Editor or a word processing application. 
  527.  
  528.   First, create your analysis directories and sub-directories. 
  529.  
  530.   Each separate analysis should be performed from a separate directory. The 
  531. directory will contain the "List-of-Files" file, and subsequently will contain 
  532. analysis files created by the SMART Analysis process. 
  533.  
  534.   If separate analyses are to be created, each to represent a different 
  535. component of the product under analysis, an individual sub-directory should be 
  536. created to contain the analysis files.  Each "List-of-Files" for individual 
  537. analyses should have a different filename, even though they will be in a 
  538. different sub-directory for ease of identification. Sub-directories can be 
  539. created from The SMART Editor using the "Copy"  function under the "More" main 
  540. menu selection. 
  541.  
  542.   Select the directory to create the new sub-directory in the "TO" section of 
  543. the "Copy" dialog panel.  Type the name of the new sub-directory in the "TO" 
  544. "File" entry panel and press "Make Dir.". Note that you will automatically be 
  545. placed in this new sub-directory. 
  546.  
  547.   Copy the source files to be analyzed to a backup directory  (and appropriate 
  548. sub-directories) that will be used in this analysis. Create the "List-of-Files" 
  549. files containing the files for the  analysis.  Use the "Maintain List-of-Files" 
  550. function under the "Files" main menu item in SMART or the equivalent function 
  551. in The SMART Editor under the "Link" main menu.  The files in this list may 
  552. span multiple directories and even drives. 
  553.  
  554.   Execute "Analyze Code" under the "Analysis" Menu selection. Take care to 
  555. select the proper option on the setup panel for this function. 
  556.  
  557.   The standard options will have only the "Send Analysis Output to Editor" 
  558. checked (all other options unchecked).  The  "List-of-Files" filename should be 
  559. shown in the "List-of-Files" entry panel.  If you chose to create a The SMART 
  560. Editor Link Database, you will be able to hyperlink to points of change from 
  561. the report created from this analysis  procedure. 
  562.  
  563.   NOTE: Multiple instances of SMART can be run at the same time if running more 
  564. than one analysis.  This may speed processing. 
  565.  
  566.   At the completion of the analysis, you will be able to print the analysis 
  567. report from SMART (as displayed at the completion of the analysis). 
  568.  
  569.   Select "Printer Setup" to select appropriate printer, and then choose "Job 
  570. Properties" to select "Landscape" for the printing mode. Close the printing 
  571. setup panels with "Ok". 
  572.  
  573.   Select "Formatting" and set the following parameters for the printed format. 
  574. Uncheck "Date/Time..." and "Word Wrap". 
  575.  
  576.   Set all page margins to 0.0. 
  577.  
  578.   Press "Select Fonts".  Uncheck "Display" but leave "Printer" fonts checked. 
  579. Select the smallest "Courier" font available, "Normal" style. 
  580.  
  581.   Close the "Formatting panels with "Ok". One last check before printing - 
  582. insure that "Print File" on the "Print" dialog panel is selected (instead of 
  583. "Print Select"). Press "Ok" on the "Print" dialog panel to print the analysis 
  584. report. Removal and Backup of Analysis Files. 
  585.  
  586.   To save the analysis files to floppy disk, select "Pack up Analysis Files" 
  587. from the "Analysis" menu in SMART  If you are running multiple analyses, you 
  588. may wish to perform this step after each analysis.  You will need a floppy disk 
  589. with blank sufficient space to perform this function.  You will also need a 
  590. copy of the compression utility "PKZIP2.EXE" from PKWARE (not included with 
  591. this application). 
  592.  
  593.   The captured data in these analysis files contains absolutely no other 
  594. information than appears in the analysis report.  The data is in text and 
  595. binary format and is used to rerun the analysis report if necessary with 
  596. different file combinations or analysis options.  The files copied to the 
  597. floppy disk are of the analysis report, a compress file containing the analysis 
  598. numerical summary data, and the text format of the List-of-Files file used for 
  599. the analysis. 
  600.  
  601.   After the analysis data is copied to the floppy disk, you can remove the 
  602. small summary analyses files by selecting the  "Remove Temp Analysis Files" 
  603. from the "Analysis" menu.  Insure that the proper "List-of-Files" file is used 
  604. in this process.  If multiple analyses are performed, this process must be 
  605. performed for each List-of-Files used.  This process will delete all "*.??^" 
  606. files associated with the analysis. 
  607.  
  608.   The 'EFFORT' value calculated for the Analysis Report is a relative number 
  609. related to the number of hours required to complete the migration.  The is a 
  610. subjective number and varies depending upon the developers experience in the 
  611. migrating platforms, and the tools, techniques and methodologies uses in the 
  612. migration.  The One Up Corporation Porting Work Shops may greatly reduce your 
  613. porting effort through the techniques taught in these Work Shop sessions. 
  614.  
  615.   It is suggested that you proceed through a complete migration of the sample 
  616. code provided in the installation of this product, or other small sample of 
  617. your source code to determine the relative difference between the reported 
  618. EFFORT from SMART and the hours required in your actual process. The EFFORT 
  619. value from the SMART Analysis should be used as a guide only and may not bear 
  620. any  correspondence to the actual time required in any porting process. 
  621.  
  622.   The EFFORT value does not include any time required to prepare your code for 
  623. migration, nor the correction of any compilation errors introduced by the 
  624. migration process, or time required in learning the target or source platform 
  625. programming internals. 
  626.  
  627. CONTINUE - The Migration Process 
  628. BACK - Getting Ready 
  629. CONTENTS 
  630.  
  631.  
  632. ΓòÉΓòÉΓòÉ 6.3. The Migration Process ΓòÉΓòÉΓòÉ
  633.  
  634. The Migration Process 
  635.  
  636.   The migration process of SMART processes the specified source files and 
  637. generates migrated files with code changes and in-line comments.  The 
  638. List-of-Files file contains the fully qualified filenames to migrate (as in the 
  639. Analysis Process). 
  640.  
  641.   The migrated files will be placed in the same directory as the source files 
  642. (with mapped extensions if desired). 
  643.  
  644.   The Migration Configuration dialog panel provides the user with the 
  645. opportunity to select migration formats and options for each category of 
  646. difficulty.  It is highly recommended that you test various output migration 
  647. formats with a small set of sample code in order to determine the best format 
  648. for your intended purpose. 
  649.  
  650.   Prior to executing the Migration Procedure, you will want to perform the 
  651. Analysis Procedure on the source code to be migrated. 
  652.  
  653.   Create the "List-of-Files" files containing the files for the  analysis.  Use 
  654. the "Maintain List-of-Files" function under the "Files" main menu item in SMART 
  655. or the equivalent function in The SMART Editor under the "Link" main menu.  The 
  656. files in this list may span multiple directories and even drives. 
  657.  
  658.   If you have created the List-of-Files in the Analysis procedure, you may wish 
  659. to modify the list for migrating a sub set of the original List-of-Files or 
  660. simply migrate the full code set. 
  661.  
  662.   Execute "Migrate Code" under the "Migration" Menu selection. Take care to 
  663. select the proper option on the setup panel for this function. 
  664.  
  665.   You will have a great latitude of options in the configuration of the 
  666. Migration process. Refer to the Migration Configuration Dialog Panel for an 
  667. explanation of these options. The typical default selections include use of 
  668. commented code (as opposed to 'ifdef' blocks). 
  669.  
  670.   If you are using The SMART Editor you will want to create a link database for 
  671. hyperlinking to migrated changes, otherwise uncheck this option.  If building 
  672. The SMART Editor Database you may wish to set the DB options to link on the 
  673. migration keyword list. 
  674.  
  675.   You may wish to use the files in the samples directory of the SMART 
  676. installation to try migrations with various options and see the results. 
  677.  
  678.   Rerunning the Migration process with the same List-of-Files and the same file 
  679. extension mapping will overwrite the original migration files.  Recursive 
  680. migration of the same files may give unpredictable results. Note that the 
  681. migration process creates a new List-of-Files file containing the new migrated 
  682. file names which you may wish to use for a number of purposes, including The 
  683. SMART Editor Link Database build. 
  684.  
  685.   You can now proceed through the migrated files to complete the migration 
  686. according to the in-line comments that have been placed in the migrated code. 
  687. Use of an editor with hyperlink source code access, like The SMART Editor will 
  688. be a valuable asset in quickly pulling up on-line help and accessing all 
  689. references to a migrated function, structure, etc. 
  690.  
  691.   After you have made all changes to the migrated code, you can use the 
  692. "Remove Comments and Tagged Code" to remove migration comment, examples and 
  693. other code that has been inserted in the source files to assist you in the 
  694. migration process. 
  695.  
  696. CONTINUE - Completing The Migration 
  697. BACK - The Analysis Process 
  698. CONTENTS 
  699.  
  700.  
  701. ΓòÉΓòÉΓòÉ 6.4. Completing the Migration ΓòÉΓòÉΓòÉ
  702.  
  703. Completing the Migration 
  704.  
  705.   SMART identifies Category 000 keywords (which may require no migration at 
  706. all) and automatically makes the changes for Category 010.  This may account 
  707. for 50-70% of the changes required in the migration.  The remaining changes are 
  708. identified by the comment insertion according to the options that you have 
  709. chosen in the Migration Options Panel. 
  710.  
  711.   These remaining changes, due to their categories, must be evaluated and 
  712. changed as you deem necessary.  You may wish to write a replacement function 
  713. for the API call and change the name to call this new function or you may need 
  714. to go to each change indicated and rewrite a portion of the code depending upon 
  715. the usage.  Any combination of techniques may be used.  You are the best one to 
  716. decide how you should approach this completion effort based upon productivity, 
  717. compatibility and other criteria. 
  718.  
  719.   In general, you may have chosen to restate the source code for the Category 
  720. 020 changes. Since, by definition, these changes may require little effort, the 
  721. original restated code is a good starting point. 
  722.  
  723.   In most cases, you will want to make use of The SMART Editor to hyperlink to 
  724. each type of change and make the decided change "across the board".  You will 
  725. also find The SMART Editor useful to find all occurrences of a structure, or 
  726. function call before you make a change to a field or parameter to insure you 
  727. fully understand its use. 
  728.  
  729.   You may also find The SMART Editor valuable in making global replacements for 
  730. a number of strings in all source files. 
  731.  
  732.   It is highly recommended that you become familiar with The SMART Editor 
  733. before you begin your migration.  It will surely save you many hours of 
  734. searching though your source code to find and display specific keywords, 
  735. functions and other elements of your code. 
  736.  
  737.   Take the time to go through the tutorial in The SMART Editor Technical 
  738. Manual.  It will only require about thirty minutes of your time and will 
  739. provide you with a general understanding of the functionality of this product. 
  740.  
  741.   With the use of The SMART Editor you will have context sensitive access to 
  742. the on-line help for the IBM development help facility. 
  743.  
  744.   The other productive tool in the SMART Toolset is the SMART Viewer.  Using 
  745. this on-line viewer you will be able to access the migration help of any 
  746. specified keyword.  Using these techniques, you may desire to have less comment 
  747. inserted in-line with the migrated code and prefer to use the SMART Viewer for 
  748. migration assistance for each encountered keyword. 
  749.  
  750.   The comment tags at the end of each migration inserted line are coded for 
  751. identification and removal.  You can use these tags for searching (using The 
  752. SMART Editor).  You can adopt techniques of tagging each line as you complete 
  753. the migration.  There are several REXX macros provided with SMART to be used 
  754. with The SMART Editor to enable  personal tagging of the migration lines as you 
  755. proceed with your work. 
  756.  
  757.   When complete, you can easily remove all tagged lines and tags using the menu 
  758. item under "Migration" entitled "Remove Tagged Code Lines...".  The dialog 
  759. panel associated with this function allows you to specify the particular lines 
  760. or tags to be removed. 
  761.  
  762. CONTINUE - The SMART Viewer 
  763. BACK - The Migration Process 
  764. CONTENTS 
  765.  
  766.  
  767. ΓòÉΓòÉΓòÉ 6.5. The SMART Viewer ΓòÉΓòÉΓòÉ
  768.  
  769. The SMART Viewer 
  770.  
  771.   The SMART Viewer provides a context sensitive on-line help to the SMART 
  772. Migration knowledge base.  By providing a topic name, you can display 
  773. information regarding the migration of the specified keyword.  The display 
  774. windows that are available in this utility are "Topic", "Template", 
  775. "Prototype",  "Example", and "References". An additional window "History" 
  776. provides a list of all topics accessed in the current session. 
  777.  
  778.   The SMART Viewer is invoked from The SMART Editor through the supplied Rexx 
  779. Macro "SMVIEWER.REX".  Simply mouse click on a Source Platform keyword and 
  780. invoke the Rexx Macro with an assigned hot-key.  If you are using an editor 
  781. other than The SMART Editor, you will want to create a macro or other linking 
  782. function to spawn SMART Viewer with topic names. 
  783.  
  784.   The SMART Viewer communicates externally through the proxy process 
  785. "SMARTVUE.EXE", which eliminates starting a new instance each time a request 
  786. for a new topic is desired. 
  787.  
  788.   SMART View contains a search panel which allows you to enter a desired topic 
  789. (keyword) name for viewing. 
  790.  
  791.   Selected text from the "Template", "Prototype", and "Example" window displays 
  792. can be copied to the clipboard buffer providing "cut" and "paste" programming 
  793. capability from the migration data base to your editor. 
  794.  
  795.   Additional functionality for this utility of SMART is explained in the SMART 
  796. Viewer on-line help facility. 
  797.  
  798. CONTINUE - The SMART Resource Translator 
  799. BACK - Completing The Migration 
  800. CONTENTS 
  801.  
  802.  
  803. ΓòÉΓòÉΓòÉ 6.6. The SMART Resource Translator ΓòÉΓòÉΓòÉ
  804.  
  805. The SMART Resource Translator 
  806.  
  807. (It is necessary to use this utility only when migrating from Windows to OS/2. 
  808. Resources do not require translating when migrating from one version of OS/2 to 
  809. another.) 
  810.  
  811.   The SMART Windows to OS/2 Resource Conversion utility (SMARTRC.EXE) provides 
  812. source-to-source conversion of Windows resource definition files to OS/2 
  813. resource definition files.  Support is provided for converting the following 
  814. resource definition statements: 
  815.  
  816.  - ACCELERATORS 
  817.  - AUTO3CHECKSTATE 
  818.  - AUTOCHECKSTATE 
  819.  - AUTORADIOBUTTON 
  820.  - BITMAP 
  821.  - CAPTION 
  822.  - CHECKBOX 
  823.  - CLASS 
  824.  - COMBOBOX 
  825.  - CONTROL 
  826.  - CTEXT 
  827.  - CURSOR 
  828.  - DEFPUSHBUTTON 
  829.  - DIALOG 
  830.  - EDITTEXT 
  831.  - FONT 
  832.  - GROUPBOX 
  833.  - ICON 
  834.  - LISTBOX 
  835.  - LTEXT 
  836.  - MENU 
  837.  - MENUITEM 
  838.  - POPUP 
  839.  - PUSHBUTTON 
  840.  - RADIOBUTTON 
  841.  - RCDATA 
  842.  - RTEXT 
  843.  - SCROLLBAR 
  844.  - SEPARATOR 
  845.  - STATE3 
  846.  - STRINGTABLE 
  847.  - STYLE 
  848.  - USERBUTTON 
  849.  
  850. SMARTRC also recognizes and processes the following preprocessor directives: 
  851.  
  852.  - #define 
  853.  - #elseif 
  854.  - #else 
  855.  - #endif 
  856.  - #if 
  857.  - #ifdef 
  858.  - #ifndef 
  859.  - #include 
  860.  - #undef 
  861.  - rcinclude 
  862.  
  863. Additional functionality includes: 
  864.  
  865.     Automatic reformatting of all Windows resource definition statements to 
  866. the equivalent OS/2 format. 
  867.     Automatic generation of alternate accelerator key sequences. 
  868.     Automatic reformatting of strings contained in RCDATA to produce 
  869. equivalent binary representation in the RES file. 
  870.     Automatic conversion of mnemonic characters. 
  871.     Automatic scaling and recalculation of OS/2 dialog units from Windows 
  872. dialog units. 
  873.     Automatic remapping of Windows dialog control styles to OS/2 dialog 
  874. control styles. 
  875.     Automatic remapping of common dialog  control identifiers to equivalent 
  876. OS/2 common dialog control identifiers. 
  877.     Automatic detection of named-resources and generation of header file to 
  878. assign integer identifiers. 
  879.     Optional dialog font mapping from Windows font name and point size to OS/2 
  880. font name and point size. 
  881.     Code page conversion of text strings from Windows code page to OS/2 code 
  882. page. 
  883.  
  884.   The general philosophy of converting resource definition statements is that 
  885. SMARTRC will attempt to convert everything and anything that it understands. 
  886. For those statements which do not have an equivalent statement in OS/2 SMARTRC 
  887. will identify the file and line number on which the statement occurs.  In 
  888. addition, SMARTRC will identify any conversion which may result in slightly 
  889. different functionality in OS/2.  It is up to the developer to decide how to 
  890. proceed with any statement in error. 
  891.  
  892.   If SMARTRC detects named-resources, it will generate an include file with a 
  893. .HHH extension containing integer definitions for those resources.  The user 
  894. either needs to rename this .HHH file and include it in the top .RC file or 
  895. copy its contents into an existing .H file that is already included.  It is 
  896. also a good practice for the user to start at the top-most .RC file when 
  897. migrating so just one .HHH file will be created and all of the generated ID 
  898. numbers will be sequential. 
  899.  
  900.   SMARTRC is a utility that can be executed from SMART through the interface 
  901. dialog panel associated with "Translate Resources..." under the "Resources" 
  902. menu item or can be run from a command line or embedded in a batch command 
  903. file.  If the Resource Translator encounters a problem during the conversion 
  904. process, it will output information, warning or error messages.  For a detailed 
  905. explanation of these messages, select the "Help, Help Contents" menu item in 
  906. the SMART application, then go to "Utility Processes, Resource Translator 
  907. Topics, Resource Translator Messages". 
  908.  
  909.   Although SMARTRC contains many run time options, simply specifying the 
  910. resource filename without options will process with the system default 
  911. parameters. 
  912.  
  913. CONTINUE - Graphical Resource Conversion 
  914. BACK - The SMART Viewer 
  915. CONTENTS 
  916.  
  917.  
  918. ΓòÉΓòÉΓòÉ 6.7. Win Help Translation ΓòÉΓòÉΓòÉ
  919.  
  920. Win Help Translation 
  921.  
  922. (It is necessary to use this utility only when migrating from Windows to OS/2. 
  923. Help files do not require translating when migrating from one version of OS/2 
  924. to another.) 
  925.  
  926.   The SMART Windows to OS/2 Help Translator Conversion utility (SMARTHLP.EXE) 
  927. provides conversion of Windows help files to OS/2 help files.  This utility can 
  928. be executed from SMART through the interface dialog panel associated with 
  929. "Translate Win Help..." under the "Resources" menu item or can be run from a 
  930. command line or embedded in a batch command file. 
  931.  
  932.  Follow these steps to convert a Windows RTF (Rich Text Format) file to an OS/2 
  933. help file. 
  934.  
  935.  1. Create an HPJ file that contains the name of the RTF file to be converted 
  936.     along with any bitmap names that are needed.  A sample HPJ file is located 
  937.     in ..SMARTAUX\SAMPLE.HPJ. 
  938.  
  939.  2. To access the the Win Help Translator dialog panel, choose "Resources" from 
  940.     the SMART main dialog panel.  From the Resources pulldown choose "Translate 
  941.     Win Help". 
  942.  
  943.  3. On the Win Help Translator dialog panel, enter the name (including path) of 
  944.     the HPJ file in the "Input Filename" field. 
  945.  
  946.  4. Choose the rest of the options as they apply.  Generally, most of the 
  947.     options will be needed. 
  948.  
  949.  5. If the output will be used by an application, choose "Output .HLP file". 
  950.     If the output will be independent, like a "users' reference", choose 
  951.     "Output .INF file".  To view the output, create an .INF file and use the 
  952.     VIEW command (in OS/2). 
  953.  
  954.  6. Another useful option is "Send Error file to Editor".  Then, errors can be 
  955.     viewed. 
  956.  
  957.  7. When all options have been chosen, press "ok". 
  958.  
  959.  8. SMART does not display a status on the conversion process for a HELP 
  960.     document.  If the "Send Error File to Editor" option is chosen, then the 
  961.     process will be complete when the error file is displayed.  Otherwise, 
  962.     watch the OS/2 window in the backgound to ensure that the Help conversion 
  963.     process is complete. 
  964.  
  965.  9. Output from the Help conversion will depend on the options chosen.  If 
  966.     nothing was entered in the "Output Filename" the file will be written to 
  967.     the same directory as the input file. 
  968.  
  969. 10. Unless the "Convert to IPF Only" option is chosen, the IPF file produced by 
  970.     SMART will automatically be sent to the IPF compiler.  In that case, an INF 
  971.     or HLP file will be produced (depending on the option chosen).  If the 
  972.     "Convert to IPF Only" option IS chosen, only the IPF file will be produced 
  973.     and will not be compiled. 
  974.  
  975.  Note:  Error messages are explained in the online help.  To view the error 
  976. message explanations, choose HELP from the Win Help Translator dialog panel. 
  977. Then choose "Win Help Translator Topics".  After that choose "Win Help 
  978. Translator Messages". 
  979.  
  980. Please note that the IPF compiler (IPFC.EXE) is required for SMART Win Help 
  981. translation. IPF (Information Processing Facility) is available from the IBM 
  982. Developers Toolkit. 
  983.  
  984. WIN HELP TRANSLATION LIMITATIONS 
  985.  
  986. The .RTF format can specify a more general document than the IPF's tag 
  987. language.  Because of this, some word-processing functionality available with 
  988. Windows help files cannot be translated to the PM IPF system.  The following 
  989. are the word processing functionalities that cannot be supported: 
  990.  
  991.    Headers and Footers are not supported and will be ignored. 
  992.  
  993.    Metafiles and Macintosh pictures are not supported and will be ignored. 
  994. You may convert these pictures to bitmaps rather than use these unsupported 
  995. formats. 
  996.  
  997.    Scaling and cropping of pictures are not supported and are ignored. 
  998.  
  999.    Outline, shadow, small-cap and all-cap character attributes are not 
  1000. supported and are ignored. 
  1001.  
  1002.    Revision marking, tables, side-by-side paragraphs, centered paragraphs, 
  1003. right-justified paragraphs, paragraph borders, and paragraph leaders are not 
  1004. supported and are ignored. 
  1005.  
  1006.    Decimal, right, and center tabs are not supported and are ignored. 
  1007.  
  1008.    Margins, paragraph indentations, and tabs are approximated to the nearest 
  1009. character width. 
  1010.  
  1011.    Line spacing before, within, and after paragraphs is approximated to the 
  1012. nearest system font character height. 
  1013.  
  1014.    Text does not flow around left or right-margin images, but follows 
  1015. immediately below the image. 
  1016.  
  1017.    Monochrome images appear in black and white instead of the text foreground 
  1018. and background colors. 
  1019.  
  1020.    Character attributes of bold, underline and italics work correctly in all 
  1021. combinations, except for all three together.  It produces red text. 
  1022.  
  1023.    A maximum of 64KB of keys information can be provided. 
  1024.  
  1025.    There are cosmetic differences in the way that hypertext links are 
  1026. displayed on the screen and in the mouse and keyboard interfaces to those 
  1027. links. 
  1028.  
  1029. CONTINUE - Graphical Resource Conversion 
  1030. BACK - The SMART Resource Translator 
  1031. CONTENTS 
  1032.  
  1033.  
  1034. ΓòÉΓòÉΓòÉ 6.8. Graphical Resource Conversion ΓòÉΓòÉΓòÉ
  1035.  
  1036. Graphical Resource Conversion 
  1037.  
  1038.   (It is necessary to use this utility only when migrating from Windows to 
  1039. OS/2.  Resource files do not require translating when migrating from one 
  1040. version of OS/2 to another.) 
  1041.  
  1042.   The SMART Windows to OS/2 Graphical Resource Conversion utility 
  1043. (SMARTCVT.EXE) provides binary conversion of Windows icon, cursor, and bitmap 
  1044. files to OS/2  pointer files and bitmap files, respectively. 
  1045.  
  1046.   Both icon and cursor files are referred to as pointer files in OS/2.  The 
  1047. graphical format of Windows icons and cursors is significantly different from 
  1048. OS/2 pointer files. 
  1049.  
  1050.   SMARTCVT is a utility that can be executed from SMART through the interface 
  1051. dialog panel associated with "Convert Graphical Resources..." under the 
  1052. "Resources" menu item or can be run from a command line or embedded in a batch 
  1053. command file.  If the Graphical Resource Converter encounters a problem during 
  1054. the conversion process, it will output information, warning or error messages. 
  1055. For a detailed explanation of these messages, select the "Help, Help Contents" 
  1056. menu item in the SMART application, then go to "Utility Processes, Graphical 
  1057. Resource Converter Topics, Graphical Resource Converter Messages". 
  1058.  
  1059.   The summary information output by SMARTCVT at the completion of file 
  1060. conversion recaps the entire conversion process.  Following is an example of 
  1061. the output contained in the summary information: 
  1062.  
  1063.   Files Processed:   10
  1064.   Files Converted:   10
  1065.   Warnings:    0  Errors:    0
  1066.  
  1067. CONTINUE - The SMART Editor Development Tool 
  1068. BACK - The SMART Win Help Translator 
  1069. CONTENTS 
  1070.  
  1071.  
  1072. ΓòÉΓòÉΓòÉ 6.9. The SMART Editor Development Tool ΓòÉΓòÉΓòÉ
  1073.  
  1074. The SMART Editor Development Tool 
  1075.  
  1076.   The SMART Editor is a feature rich programming development tool combining 
  1077. hyperlink source code access, a fully functional editor, and many file 
  1078. manipulation utility functions. 
  1079.  
  1080.   Features: 
  1081.  
  1082.    Build hyperlinks to key elements of your source code. 
  1083.    REXX Macro interface. 
  1084.    Full IBM Workframe interface. 
  1085.    Spawn Compiles directly from The SMART Editor and hyperlink to errors. 
  1086.    Context sensitivity to all IBM development help files (if installed). 
  1087.    Edit with multiple windows, any size files. 
  1088.    Create functional call tree and other documentation display - all hyperlink 
  1089. sensitive. 
  1090.    Unsurpassed methods for navigating directories, drives and source code. 
  1091.    Hyperlink capabilities make learning new code a breeze. 
  1092.    Print SMART analysis and source code with format from within The SMART 
  1093. Editor. 
  1094.    Interface with SMART provides automatic hyperlink to all points of change. 
  1095.  
  1096.   Please refer to The SMART Editor Technical Manual for full explanation 
  1097. regarding the powerful functionality available with this tool. 
  1098.  
  1099. CONTINUE - Chapter 4 - Techniques 
  1100. BACK - Graphical Resource Conversion 
  1101. CONTENTS 
  1102.  
  1103.  
  1104. ΓòÉΓòÉΓòÉ 7. Chapter 4 - Techniques ΓòÉΓòÉΓòÉ
  1105.  
  1106. Chapter 4 - Techniques 
  1107.  
  1108.   Preparing Your Source Code 
  1109.   Reading the Analysis Display/Report 
  1110.   Interpreting the Analysis 
  1111.   Use of Common Functions 
  1112.   Source Migration Format Considerations 
  1113.   File Extension Mapping 
  1114.   Source Migration Comment Code Removal 
  1115.   Increased Productivity with The SMART Editor 
  1116.  
  1117. CONTINUE - Preparing Your Source Code 
  1118. BACK - The SMART Editor Development Tool 
  1119. CONTENTS 
  1120.  
  1121.  
  1122. ΓòÉΓòÉΓòÉ 7.1. Preparing Your Source Code ΓòÉΓòÉΓòÉ
  1123.  
  1124. Preparing Your Source Code 
  1125.  
  1126.   Planning a strategy for the analysis and/or migration of your source code 
  1127. will greatly pay back in the long run. 
  1128.  
  1129.   It is essential that your original source code be backed up to insure that an 
  1130. inadvertently mis-chosen option, especially in the migration process, does not 
  1131. prevent you from restoring to your original code state. 
  1132.  
  1133.   Both the Analysis and Migration processes of SMART should not be considered 
  1134. one-shot processes.  You may wish to run the Analysis a number of times, with 
  1135. global code changes to change the outcome.  Likewise, you may find that you 
  1136. want to make global changes to your code fixing a recurring hit to reduce the 
  1137. migration effort before you even apply SMART. 
  1138.  
  1139.   For example, after a review of the initial analysis run, changing a parameter 
  1140. type through your code may significantly reduce the Effort reported in the 
  1141. analysis.  After looking at the reported keyword hits in your code, you may 
  1142. decide to write a number of common functions that replace the source platform 
  1143. API calls and make global replacements for these calls to your new functions. 
  1144. You can rerun the Analysis Process and see the resulting effort changes. 
  1145. Likewise for other changes that may involve macro #defines, or typedefs. 
  1146.  
  1147.   You may be surprised at the results of these preprocessing changes and how 
  1148. they might reduce your porting effort. 
  1149.  
  1150.   Likewise, you may wish to rerun the Migration Process after analyzing the 
  1151. resulting initial results.  It may be that you need different formatting 
  1152. options in the Migration Process, or you find that you can make global changes 
  1153. to a syntax widely used to eliminate repetitive reporting from SMART of this 
  1154. migration hit. 
  1155.  
  1156.   Essentially, anything that you can do to your code to simplify that migration 
  1157. process will greatly reduce the whole porting effort. 
  1158.  
  1159. CONTINUE - Reading the Summary Reports 
  1160. BACK - Chapter 4 - Techniques 
  1161. CONTENTS 
  1162.  
  1163.  
  1164. ΓòÉΓòÉΓòÉ 7.2. Reading the Summary Reports ΓòÉΓòÉΓòÉ
  1165.  
  1166. Reading the Summary Reports 
  1167.  
  1168. For each analysis that you run, a summary report files is created and can be 
  1169. printed using the SMART 'Print Analysis Report' process. 
  1170.  
  1171. A cover page preceeds the summary reports when they are printed with 
  1172. information regarding the date and time of the report along with the user 
  1173. supplied report title. 
  1174.  
  1175. A summary report is created with the standard Migration Analysis process, and 
  1176. the Resource Translation Analysis (if the Windows migration tables are 
  1177. selected). 
  1178.  
  1179.  The report lines for the cover page and their description follows: 
  1180.  
  1181.  SMART Source Code Migration Analysis Report - Cover Report Heading. 
  1182.  
  1183.  [Next one to three lines] - User supplied report title (first line appears on 
  1184. each page of the report). 
  1185.  
  1186.  Prepared: [Date - Time] - Date stamp of the summary report. 
  1187.  
  1188.  Printed: [Date - Time] - Date stamp of the report printing. 
  1189.  
  1190.  Summary: [Filename] - Filename(s) of the Summary report files. 
  1191.  
  1192.  Report: [Filename] - Filename(s) of the Primary Analysis report file. 
  1193.  
  1194.  The report lines for the Migration Analysis Report Summary and their 
  1195. description follows: 
  1196.  
  1197.  Total File Count - Number of files processed in the Analysis. 
  1198.  
  1199.  Total File Size (Bytes) - Total size of files processed in the Analysis. 
  1200.  
  1201.  Total Source Lines - Total number of lines processed. 
  1202.  
  1203.  Total Code Lines - Total number of lines processed excluding comment lines and 
  1204. null (skip) lines. 
  1205.  
  1206.  Total Category xxx Hits - Total number of keyword encounters by category type. 
  1207.  
  1208.  Total Migration Hits - Total number of all keyword encounters. 
  1209.  
  1210.  Total Cat 000 and 010 Hits Auto Migrated - Total number of keyword encounters 
  1211. that will be automatically migrated using SMART. 
  1212.  
  1213.  Total Hits MiCL Processed - Total number of keyword encounters that will be 
  1214. migrated using MiCL commands in either the primary Migration Database or a 
  1215. UDMD. 
  1216.  
  1217.  Total Hits Processed with UDMD - Total number of keyword encounters were 
  1218. encountered from a UDMD. 
  1219.  
  1220.  Total Hits Excluded - Total number of keyword encounters were excluded from 
  1221. processing based on a user supplied exclude list. 
  1222.  
  1223.  Total Migration Keyword Instances - Total number of keyword encounters that 
  1224. represented different keywords. 
  1225.  
  1226.  **NOTE** - The following effort estimates and productivity gains are 
  1227. calculated from a number of generalized factors and assumptions.  The actual 
  1228. effort that you may encounter will depend upon your individual experience and 
  1229. productivity, in addition to unique difficulties that may be encountered in 
  1230. your coding.  Please use these values as a comparative guideline only. 
  1231.  
  1232.  Estimated Migration Effort Without SMART - An estimation of the total number 
  1233. of migration hours required to migrate this project without any use of SMART. 
  1234.  
  1235.  Savings from SMART Base Migration - An estimation of the total number of 
  1236. migration hours saved by the base use of SMART without any productivity gains 
  1237. from automatic migration. 
  1238.  
  1239.  Savings from Cat 010 Auto Migrate - An estimation of the total number of 
  1240. migration hours saved by the automatic migration from SMART. 
  1241.  
  1242.  Savings from Keyword Exclusions - An estimation of the total number of 
  1243. migration hours not required due to exclusion from the user specified keyword 
  1244. exclude list. 
  1245.  
  1246.  ** Net Migration Effort ** - An estimation of the total number of migration 
  1247. hours remaining to complete the project after processing with SMART. 
  1248.  
  1249.  Percent Effort Reduction using SMART - A calculation of the net estimated 
  1250. migration effort as a percentage of the total estimated effort without the use 
  1251. of SMART. 
  1252.  
  1253.  The report lines for the Resource Translation Analysis Report Summary 
  1254. (provided with Windows migration Analysis only) and their description follows: 
  1255.  
  1256.  Total Resource File Count - Number of files processed in the Resource 
  1257. Analysis. 
  1258.  
  1259.  Total Resource File Size (Bytes) - Size of files processed in the Resource 
  1260. Analysis. 
  1261.  
  1262.  Total Dialog Templates - Number of Dialogs encountered in the Analysis. 
  1263.  
  1264.  Total Dialog Code Lines - Number of lines of code for the Dialogs. 
  1265.  
  1266.  Ave Code Lines Per Dialog - Indicates the code lines size of the average 
  1267. dialog. 
  1268.  
  1269.  Total Menu Template Code Lines - Number of coding lines in the Menus. 
  1270.  
  1271.  Total StringTable Code Lines - Number of coding lines in the String Tables. 
  1272.  
  1273.  Total Accelerator Table Code Lines - Number of coding lines in the Accelerator 
  1274. Tables. 
  1275.  
  1276.  **NOTE** - The following effort estimates and productivity gains are 
  1277. calculated from a number of generalized factors and assumptions.  The actual 
  1278. effort that you may encounter will depend upon your individual experience and 
  1279. productivity, in addition to unique difficulties that may be encountered in 
  1280. your coding.  Please use these values as a comparative guideline only. 
  1281.  
  1282.  Estimated Translation Effort Without SMART - Estimated migration hours to 
  1283. convert the resource files without the use of SMART. 
  1284.  
  1285.  Savings from SMART Resource Translator - Estimated migration hours saved in 
  1286. the effort to convert the resource files with the use of SMART automation. 
  1287.  
  1288.  ** Net Translation Effort ** - An estimation of the total number of migration 
  1289. hours required to translate the resource files with SMART. 
  1290.  
  1291.  Percent Effort Reduction using SMART - A calculation of the net estimated 
  1292. translation effort as a percentage of the total estimated effort without the 
  1293. use of SMART. 
  1294.  
  1295. CONTINUE - Reading the Analysis Display/Report 
  1296. BACK - Preparing Your Source Code 
  1297. CONTENTS 
  1298.  
  1299.  
  1300. ΓòÉΓòÉΓòÉ 7.3. Reading the Analysis Display/Report ΓòÉΓòÉΓòÉ
  1301.  
  1302. Reading the Analysis Display/Report 
  1303.  
  1304.   Each keyword is categorized by the level of difficulty required to migrate to 
  1305. the target platform.  These categories can also be viewed as the amount of 
  1306. programmer interaction and expertise required for the migration. The currently 
  1307. defined categories and their description are as follows: 
  1308.  
  1309.   000  Informational only - An exact match of the keyword exists in the target 
  1310. platform but there is change in the size of type. (e.g. short to a long). 
  1311.  
  1312.   010  Literal replacement - An equivalent definition exists in the target 
  1313. platform but a literal change in the keyword is required (e.g., LPSTR to PSZ). 
  1314.  
  1315.   020  Replacement with parameter changes - Equivalent functionality exists in 
  1316. the target platform but parameters or fields of a structure differ slightly 
  1317. from the source platform definition (e.g., SetWindowPos to WinSetWindowPos). 
  1318. Also  included are parameters that are not applicable or required on the target 
  1319. platform (e.g., MakeProcInstance). 
  1320.  
  1321.   030  Change with more / less API calls - Equivalent functionality exists in 
  1322. the target platform but it must be implemented with  more, or sometimes less, 
  1323. function calls (e.g., DlgDirList).  Also included are items which map to one of 
  1324. several choices depending upon the type of parameter used (e.g., GetObject). 
  1325.  
  1326.   040  Logic changes required - Similar functionality exists in the target 
  1327. platform but the logic required to emulate the functionality must be reworked 
  1328. (e.g., CreatePatternBrush). 
  1329.  
  1330.   050  Functionality does not exist - There is no means provided to perform the 
  1331. same functionality in the target platform (e.g., GetKeynameText).  Workaround 
  1332. coding must be implemented, where possible. 
  1333.  
  1334.   999  Dictionary entry not defined - The database does not currently have a 
  1335. complete description for the migration of the keyword. 
  1336.  
  1337.   Throughout the analysis report there are several column and section  headings 
  1338. used to display counts of various pieces of information. 
  1339.  
  1340.   These column and section headings are defined as follows: 
  1341.  
  1342. File Detail Report: 
  1343.  
  1344.  PATH/FILENAME - Full path specification of the file(s) 
  1345.  SIZE - File size in bytes 
  1346.  LINES - Number of lines in the file 
  1347.  CODE - Number of lines containing code in the file 
  1348.  HITS - Number of times a keyword was identified 
  1349.  PCT HITS - Percentage of hits per line of code (i.e., HITS / CODE) 
  1350.  INSTS - Number of unique keywords that were identified 
  1351.  PCT INST - Percentage of unique keywords per line of code (i.e., INSTS / CODE) 
  1352.  EFFORT - Calculation of the relative amount of work required to migrate the 
  1353. code in the file 
  1354.  CAT xxx - Number of hits in each category 
  1355.  
  1356. Keyword Detail Report: 
  1357.  
  1358.  CATEGORIES - Breakdown by category of the keywords found 
  1359.  TYPES - Breakdown by type of the keywords found (function calls, messages, 
  1360. symbol definitions, and typedef statements) 
  1361.  AREAS - Breakdown by functional area of the keywords found 
  1362.  KEYWORDS - Breakdown by individual keyword.  Ordered by category and from the 
  1363. most number of occurrences to the least number of occurrences. 
  1364.  HITS - Number of times a keyword for the specified item was identified. 
  1365.  PCT HITS - Percentage of all hits identified (i.e., HITS / section total HITS) 
  1366.  FILES - Number of files that a keyword for the specified item was found 
  1367.  INSTS - Number of unique keywords that were identified for the specified item 
  1368.  PCT INST - Percentage of all unique keywords identified (i.e., INSTS / section 
  1369. total INSTS) 
  1370.  EFFORT - Calculation of the relative amount of work required to migrate the 
  1371. code for the specified item 
  1372.  
  1373. CONTINUE - Interpreting the Analysis 
  1374. BACK - Reading the Summary Reports 
  1375. CONTENTS 
  1376.  
  1377.  
  1378. ΓòÉΓòÉΓòÉ 7.4. Interpreting the Analysis ΓòÉΓòÉΓòÉ
  1379.  
  1380. Interpreting the Analysis 
  1381.  
  1382.   The analysis portion of SMART actually generates two related reports.  Each 
  1383. report presents the detailed analysis from a different perspective.  The two 
  1384. reports together should give you a thorough understanding of the amount of code 
  1385. that requires migration and the amount of effort that will be involved.  A 
  1386. brief overview of the contents of the analysis report is relevant here before 
  1387. discussing how to interpret the data contained in the  report. 
  1388.  
  1389.   The file detail report presents a detailed analysis of each source file. This 
  1390. includes all of the items previously defined for the file detail report. 
  1391.  
  1392.   The keyword detail report presents a more thorough breakdown of the keywords 
  1393. identified during the analysis.  The analysis data is broken down four 
  1394. different ways.  The first is a breakdown by category showing the counts of the 
  1395. keywords as identified by their respective category. The second is a breakdown 
  1396. by the types of the keywords.  The third is a breakdown of the identified 
  1397. keywords by the various functional areas that a keyword is classified.  The 
  1398. fourth is a breakdown by the individual keywords.  This last breakdown shows 
  1399. each and every keyword that was identified and the number of occurrences. 
  1400.  
  1401.   The analysis report contains a lot of valuable information about your source 
  1402. code.  Once you understand how to interpret the data you will be able to more 
  1403. accurately size and evaluate the migration effort.  In addition you can rerun 
  1404. the analysis program on your code during the migration process to give you 
  1405. accurate progress statistics.  We begin the interpretation with the file detail 
  1406. portion of the analysis report. 
  1407.  
  1408.   The first thing to be learned from the file detail report is simply how many 
  1409. lines of code are in each file and in the entire the application. This forms 
  1410. the basis for determining the relative distribution of the keywords in the 
  1411. code. 
  1412.  
  1413.   The total number of hits, shown at the bottom of this part of the report, 
  1414. tells you how many changes must be made to the code.  The percentage of hits 
  1415. times the number of lines of code tells you how many lines of code must be 
  1416. changed.  Don't get overly excited at this  point if this number is rather 
  1417. large.  Until we examine the keyword detail report you don't know how many of 
  1418. these will be automatically migrated by  SMART. 
  1419.  
  1420.   Next look at the total number of instances.  This is the number of unique 
  1421. keywords that must be migrated.  What this really tells you is  approximately 
  1422. how many individual keywords the programmer(s) will have to be familiar with in 
  1423. order to make various decisions during the migration. Since many migration 
  1424. issues and changes related to a specific keyword are the same or similar for 
  1425. all occurrences of that keyword the actual effort is reduced to deciding what 
  1426. needs to be changed and simply repeating the change for each occurrence. 
  1427. Again, many of these changes may be  automatically migrated by SMART. 
  1428.  
  1429.   At this point the effort number that is shown for each file has very little 
  1430. significance unless you have migrated source before.  The effort calculation is 
  1431. based on the relative difficulty of  migrating a keyword -- category 030 items 
  1432. are more difficult to migrate than category 020 items.  Since the actual time 
  1433. to migrate a section of code also depends on the experience and knowledge of 
  1434. the programmer and on the tools being used the amount of actual time that the 
  1435. effort number translates to will be different for each person. 
  1436.  
  1437.   In order to translate the effort number to actual time it is necessary to 
  1438. migrate several source files containing a mix of keywords in each of the 
  1439. difficulty categories.  Using the actual time and the effort calculations for 
  1440. those migrated files you get an approximate time value for each effort unit. 
  1441.  
  1442.   The last portion of the file detail report is the breakdown of the hits by 
  1443. their respective categories.  These numbers can assist you in assigning groups 
  1444. of files to programmers with different levels of expertise.  A file that is 
  1445. mostly composed of category 020 items can be assigned to someone with little 
  1446. experience on the target platform since most of the keywords are relatively 
  1447. simply to migrate. 
  1448.  
  1449.   In fact, the changes required for almost all of the category 020 items is 
  1450. exactly a one-to-one change as detailed in the migration database.  Files that 
  1451. contain category 040 and 050 items can be assigned to your more experienced 
  1452. programmers since these items require a more in-depth knowledge of what the 
  1453. code is attempting to do on the source platform and how the logic can be 
  1454. restructured to implement the same functionality on the target platform. 
  1455.  
  1456.   In general, the file detail section provides a quantitative analysis of the 
  1457. source code showing how much must be changed.  On the other hand, the keyword 
  1458. detail section provides more of a qualitative analysis of those changes.  In 
  1459. the keyword detail report we get to the real nitty-gritty of what is contained 
  1460. in the source code. 
  1461.  
  1462.   The first section, CATEGORIES, presents the first indication of how the 
  1463. migration breaks down by difficulty.  Collectively the six columns of data can 
  1464. tell you a lot about how much effort will be involved and  where that effort 
  1465. will be concentrated. 
  1466.  
  1467.   The HITS, PCT HITS, and FILES columns tell you the volume of physical changes 
  1468. that have to be made. Even minor changes can require a great deal of time if 
  1469. the item occurs thousands of times or exists in hundreds of files.  Time is 
  1470. required to open files, locate and enter changes, and save the files. 
  1471.  
  1472.   Review the INSTS and PCT INSTS columns to identify the number of unique items 
  1473. that have to be migrated at each difficulty category.  There are two things 
  1474. that may be learned from this information.  First, while there may be a large 
  1475. number of HITS in a particular category it may be that they are isolated to a 
  1476. few particular keywords.  This would actually indicate that less work is 
  1477. required compared to the situation where a large number of instances occur with 
  1478. a large number of hits. 
  1479.  
  1480.   When we look at the KEYWORDS section it will be more evident if that is the 
  1481. case, but this section can give use a good indication of where the effort is 
  1482. concentrated.  Second, look at the distribution of the hits and instances among 
  1483. the various categories.  Most likely the majority of the hits as well as the 
  1484. instances are in categories 020 or less. The desired trend is for the numbers 
  1485. to decrease significantly from  category 020 to category 050.  Obviously the 
  1486. fewer category 040 and 050 items the less difficult the migration.  The last 
  1487. column, EFFORT, is a good indicator of where you will spend most of the time 
  1488. during the migration. Depending on the number of instances of category 030 and 
  1489. 040 items it is possible that the effort for these categories can be greatly 
  1490. reduced. 
  1491.  
  1492.   The next section, TYPES, is mostly for information purposes only. A couple of 
  1493. useful things about your migration effort can still be learned from it. 
  1494. Function and message items typically require the most effort since  program 
  1495. logic can be affected.  Symbol items require the least effort since most of the 
  1496. time it requires a simple change to a bit flag or a #define statement.  The 
  1497. typedef items typically require modifications  to structure field references 
  1498. and aren't significantly difficult items. 
  1499.  
  1500.   The next section, AREAS, is again mostly for information purposes only.  This 
  1501. section can help in staffing the migration and assigning programmers to work on 
  1502. individual areas of the project.  By analyzing the various functional areas 
  1503. that require migration and the numbers associated with each you can decide what 
  1504. expertise on both the source and target platform is required.  For example, if 
  1505. large portions of the migration are in the bitmap, color-palette, and 
  1506. drawing-tool areas you will want to make sure you assign a programmer with 
  1507. graphics expertise to the project. 
  1508.  
  1509.   The last section, KEYWORDS, shows exactly what keywords were identified in 
  1510. the source and their frequency of occurrence.  Since the keywords are organized 
  1511. by category and listed in decreasing order of occurrence it is very easy to see 
  1512. what needs to be changed.  It is also here that you can see if you have an even 
  1513. distribution of hits on each keyword or if there are a lot of hits on 
  1514. relatively few keywords. 
  1515.  
  1516.   For example, if you have 800 hits in category 030 but 450 of them are 
  1517. SendMessage and 250 are SelectObject then the amount of effort can be reduced. 
  1518. This is because the programmer will have only to look at these two items, 
  1519. decide the general migration changes to be applied, and make the changes (thus 
  1520. eliminating 700 of the 800 hits). 
  1521.  
  1522.   On the other hand, if the hits are fairly evenly distributed in a category it 
  1523. will require more time since many more decisions on migration changes will have 
  1524. to be performed. This is especially important when looking at the category 040 
  1525. and 050 items since these items may require significant logic changes to the 
  1526. application. 
  1527.  
  1528.   One additional thing to note is the relationship of the  various keywords in 
  1529. a category. If you see several keywords which relate  to the same functionality 
  1530. it may be possible that all of those keywords  will be migrated by a change to 
  1531. a single portion of the code.  For  example, if you encounter a set of mouse 
  1532. related messages in category 040 then all of these will most likely be resolved 
  1533. in the same manner or with a single change to the code. 
  1534.  
  1535.   There are a few items that warrant special consideration when evaluating the 
  1536. SMART analysis report.  The current knowledge-base technology may 
  1537. over-categorize a keyword resulting in a higher relative effort than is 
  1538. actually required.  There are many functions and messages which  have a 
  1539. one-to-many mapping to the target platform.  In these cases the actual 
  1540. migration depends upon the intention of the function or the value of one or 
  1541. more parameters (e.g., a flag set in a variable). 
  1542.  
  1543.   When more than one choice exists for the migration SMART will use the higher 
  1544. category level for the analysis report so as not to significantly underestimate 
  1545. the effort.  For example, the Windows RegisterClass function is categorized as 
  1546. category 040.  If the class uses the default cursor and icon then it actually 
  1547. is a category 020 item.  Yet, if a class specific cursor, icon, or background 
  1548. brush is used it is a category 040 since this would require logic changes. 
  1549. Category 040 would be used by SMART since it would depend on the values in the 
  1550. WNDCLASS structure.  Be aware that you may have some keywords that are 
  1551. overclassified. 
  1552.  
  1553.   One of the suggested techniques to significantly increase the speed of the 
  1554. migration is to use macros or to implement functions for category 030 and 040 
  1555. items that have high hit counts.  This eliminates larger, redundant blocks of 
  1556. migrated code that implement the intended functionality and also localizes the 
  1557. debugging effort to a single function. If this technique is applied to your 
  1558. migration effort then you should take into consideration that the keywords 
  1559. implemented in this manner are actually category 020 items instead of category 
  1560. 030 or 040. 
  1561.  
  1562. CONTINUE - Use of Common Functions 
  1563. BACK - Reading the Analysis Display/Report 
  1564. CONTENTS 
  1565.  
  1566.  
  1567. ΓòÉΓòÉΓòÉ 7.5. Use of Common Functions ΓòÉΓòÉΓòÉ
  1568.  
  1569. Use of Common Functions 
  1570.  
  1571.   Significant improvements in your migration effort may be achieved through the 
  1572. use of common functions.  Common functions refers to the implementation of 
  1573. source platform functions as their equivalent target platform functions.  Since 
  1574. the migration of many keywords involves replacing the existing function call 
  1575. with multiple lines of code, using common functions can reduce the amount of 
  1576. code and coding changes required. 
  1577.  
  1578.   Selecting candidates for common functions is a very subjective process. You 
  1579. must evaluate the analysis report for your application and review the 
  1580. difficulty and hit counts for each of the keywords.  As a general rule a 
  1581. keyword is a candidate if the hit count is at least twenty (20)  and the 
  1582. difficulty category is 030 or higher.  Once a candidate is identified you must 
  1583. review the use of that keyword throughout the application.  If the keyword is 
  1584. used in generally the same context throughout the application then you will 
  1585. probably gain migration speed by implementing the particular function or 
  1586. defining an appropriate macro. 
  1587.  
  1588.   As an example, assume that the analysis report for a Windows application 
  1589. shows that GetMenuString occurs 100 times.  This is a category 030 keyword 
  1590. since the flag may specify the menu item either by command or by position.  If 
  1591. we examine the code and find that all of the calls are requested by command 
  1592. then we could decide to just implement GetMenuString as a macro which sends the 
  1593. MM_QUERYITEMTEXT messages.  On the other hand if we have a mix of requests by 
  1594. both command and position we could decide to implement GetMenuString as a 
  1595. function which sent the appropriate messages based on the specified flag. 
  1596.  
  1597.   It is recommended that you place all common functions into a single, 
  1598. separate source file or library.  Doing so can ease your effort during the 
  1599. debugging phase and allows you to begin abstracting functionality for future 
  1600. migrations. 
  1601.  
  1602. CONTINUE - Source Migration Format Considerations 
  1603. BACK - Interpreting the Analysis 
  1604. CONTENTS 
  1605.  
  1606.  
  1607. ΓòÉΓòÉΓòÉ 7.6. Source Migration Format Considerations ΓòÉΓòÉΓòÉ
  1608.  
  1609. Source Migration Format Considerations 
  1610.  
  1611.   Each Category of the Migration Process offers a popup dialog panel to select 
  1612. the format of the inserted comments in the migrated code.  These options 
  1613. include: Long, short or no comment, template, prototype, example code, restate 
  1614. original code and ignore migration. 
  1615.  
  1616.   It may appear convenient to insert all of the above items in-line with your 
  1617. source code. However, in general, the more you put in your code the more 
  1618. difficult it is to read.  It is better to insert less in your code and use the 
  1619. SMART Viewer to display information pertaining to the keywords as necessary. 
  1620. You also have the option to clip and paste from the SMART Viewer display panels 
  1621. to your code. 
  1622.  
  1623.   After you have reviewed the Analysis report and made any necessary code 
  1624. changes, you may wish to ignore the Category 000 hits. 
  1625.  
  1626.   Restatement of the original code has been offered as an option particularly 
  1627. for the Windows to OS/2 migration.  This uncommented restatement allows you to 
  1628. rerun the Analysis Process during your process of completing the migration to 
  1629. determine the amount of code left to complete.  Simply remove this code 
  1630. restatement as you make the necessary changes. 
  1631.  
  1632.   You may also use this restatement as a starting point for code modification. 
  1633.  
  1634.   In any case it is recommended that you try various options on the sample code 
  1635. or a small set of you source code to determine what works best for you. 
  1636.  
  1637. CONTINUE - File Extension Mapping 
  1638. BACK - Use of Common Functions 
  1639. CONTENTS 
  1640.  
  1641.  
  1642. ΓòÉΓòÉΓòÉ 7.7. File Extension Mappings ΓòÉΓòÉΓòÉ
  1643.  
  1644. File Extension Mapping 
  1645.  
  1646.   File extension mapping allows you to control the name of the generated source 
  1647. file in the Migration process for source migration, the process for commenting 
  1648. out #ifdef code and the process for removing tagged code. 
  1649.  
  1650.   In all cases where SMART generates new source files the files are placed in 
  1651. the same directory as the original, with the file extension changed.  The 
  1652. alternative to this process is to request that the original file be 
  1653. overwritten.  For obvious reasons this is not recommended. 
  1654.  
  1655.   You can control the extension mapping by specifying the map for each file 
  1656. extension encountered in your processing.  The data for this mapping is 
  1657. contained in the test file MAPEXT.DAT in the main SMART directory. 
  1658.  
  1659.   You can maintain this data from the popup dialog selected in the processes 
  1660. that offer extension mapping such as the Migration Process. 
  1661.  
  1662.   The mapping data simply contains the original extension and then the 
  1663. extension for the map. 
  1664.  
  1665.   The mapping data will not accept wildcards, but is explicitly defined.  You 
  1666. will note that several layers of mapping is defined in the default data.  For 
  1667. example ".C" is mapped to ".C__X", and ".C__X" is mapped to ".C__Y".  This 
  1668. allows you to perform multiple mapping processes while saving each set of files 
  1669. in the processes. 
  1670.  
  1671.   Please note that the mapping data is case sensitive.  If your files are in 
  1672. lower case, the mapping data must be specified in lower case. 
  1673.  
  1674.   You will be notified if SMART encounters a file that cannot be mapped, due to 
  1675. missing mapping data, during the process requiring the map. 
  1676.  
  1677.   The SMART Resource Translator accepts wildcards and does not use this mapping 
  1678. data. 
  1679.  
  1680. CONTINUE - Source Migration Comment Code Removal 
  1681. BACK - Source Migration Format Considerations 
  1682. CONTENTS 
  1683.  
  1684.  
  1685. ΓòÉΓòÉΓòÉ 7.8. Source Migration Comment Code Removal ΓòÉΓòÉΓòÉ
  1686.  
  1687. Source Migration Comment Code Removal 
  1688.  
  1689.   You can automatically remove comment tagged code with SMART.  Comment tagged 
  1690. code is defined by having a short unique set of identification characters. 
  1691.  
  1692.   All of the migration insertion code has tags identified by "SM$:".  The 
  1693. dialog selection panel shown above specifies that codes that are used by SMART. 
  1694. Using this panel you can select the commented code that you wish to remove at 
  1695. any point in your migration process. 
  1696.  
  1697.   The four fields entitled "Other Tagged Lines" allows you to remove code that 
  1698. may have been tagged by you for your own identification purposes. 
  1699.  
  1700.   This process also allows you to just remove the tags without removing the 
  1701. code on the lines.  In this case the tags are removed at the end of the line, 
  1702. leaving the remaining code. To fit into this class of tagging, the tags must be 
  1703. at the end of the line and proceeded by a double slash ("//") and a space. 
  1704.  
  1705.   You may wish to explore the functionality of this process with a file form 
  1706. the sample code that has been migrated. 
  1707.  
  1708. CONTINUE - Increased Productivity with The SMART Editor 
  1709. BACK - File Extension Mapping 
  1710. CONTENTS 
  1711.  
  1712.  
  1713. ΓòÉΓòÉΓòÉ 7.9. Increased Productivity with The SMART Editor ΓòÉΓòÉΓòÉ
  1714.  
  1715. Increased Productivity with The SMART Editor 
  1716.  
  1717.   The SMART Editor is provided, and has been specifically designed, to increase 
  1718. your productivity through the speed and ease of source code navigation and the 
  1719. integration of file manipulation\utilities. 
  1720.  
  1721.   The single most unique feature of The SMART Editor is hyperlink access to 
  1722. your source code. Once you have built a hyperlink data base for your code set, 
  1723. you can mouse click to any function definition or popup a list of all 
  1724. references to a function, symbol or other key element of your code. 
  1725.  
  1726.   You can request that this database be created as a result of the SMART 
  1727. Analysis or Migration Process, or you can create the link data base within The 
  1728. SMART Editor application. 
  1729.  
  1730.   In your migration process, if you wish to look at all the places where a 
  1731. function is used, simply double click with the right mouse button on the 
  1732. function in question, and The SMART Editor will create a display of all 
  1733. references. 
  1734.  
  1735.   Since The SMART Editor displays are both hyperlink sensitive and editable, 
  1736. you may double click (left mouse button) on the filename-line number for any of 
  1737. the displayed references and The SMART Editor will immediately open the file at 
  1738. the point of reference. 
  1739.  
  1740.   Another powerful feature of The SMART Editor is the ability to perform 
  1741. multiple file, string searches and provide a hyperlink display file of all 
  1742. strings found for your immediate access. You can use your "List-of-Files" from 
  1743. the SMART Analysis or Migration as the input file specification to this search 
  1744. process. 
  1745.  
  1746.   In addition to the powerful source code access function The SMART Editor 
  1747. allows you to spawn compiles and hyperlink to the point of error. 
  1748.  
  1749.   The SMART Editor has been specifically designed to assist you in productively 
  1750. maintaining your code.  The integration of the features and the powerful 
  1751. navigation functionality will greatly reduce your time and effort in porting 
  1752. your code. 
  1753.  
  1754. CONTINUE - Chapter 5 - Reference 
  1755. BACK - Source Migration Comment Code Removal 
  1756. CONTENTS 
  1757.  
  1758.  
  1759. ΓòÉΓòÉΓòÉ 8. Chapter 5 - Reference ΓòÉΓòÉΓòÉ
  1760.  
  1761. Chapter 5 - Reference 
  1762.  
  1763.   Migration Formats 
  1764.   SMART Files 
  1765.   Specifications and Restrictions 
  1766.   Technical Support 
  1767.  
  1768. CONTINUE - Migration Formats 
  1769. BACK - Increased Productivity with The SMART Editor 
  1770. CONTENTS 
  1771.  
  1772.  
  1773. ΓòÉΓòÉΓòÉ 8.1. Migration Formats ΓòÉΓòÉΓòÉ
  1774.  
  1775. Migrated code formats are user configurable.  A number of options relating to 
  1776. the migrated code are available. 
  1777.  
  1778. The Format References include the following formats: 
  1779.  
  1780.    Original source code (before migration) 
  1781.    Format - 'ifdef' and '/*...*/' comments 
  1782.    Format - 'ifdef' and '//' comments 
  1783.    Format - NO 'ifdef' and '/*...*/' comments 
  1784.    Format - NO 'ifdef' and '//' comments 
  1785.    Format - '//' comments and NO Tags 
  1786.    Format - '//', Short comments and Prototypes 
  1787.    Format - '/*...*/', Long comments, Prototypes and Examples 
  1788.    Format - Source code with migration comments removed 
  1789.  
  1790. CONTINUE - Original source code (before migration) 
  1791. BACK - Chapter 5 - Reference 
  1792. CONTENTS 
  1793.  
  1794.  
  1795. ΓòÉΓòÉΓòÉ 8.1.1. Original source code (before migration) ΓòÉΓòÉΓòÉ
  1796.  
  1797. Original Source Code 
  1798.  
  1799.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1800.    * pathname in the OFSTRUCT structure.
  1801.    */
  1802.   wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);
  1803.  
  1804.   _lclose (wFileTemp);
  1805.  
  1806.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));
  1807.  
  1808. CONTINUE - Format - 'ifdef' and '/*...*/' comments 
  1809. BACK - Migration Formats 
  1810. CONTENTS 
  1811.  
  1812.  
  1813. ΓòÉΓòÉΓòÉ 8.1.2. Format - 'ifdef' and '/*...*/' comments ΓòÉΓòÉΓòÉ
  1814.  
  1815. Format - 'ifdef' and '/*...*/' comments 
  1816.  
  1817. /* SM$:FO  C:\TEST\TEST.C - 03/28/94 14:25:07                */
  1818.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1819.    * pathname in the OFSTRUCT structure.
  1820.    */
  1821. #ifndef OS221
  1822.   wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);/* SM$:O */
  1823. #else
  1824.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  /* SM$:M3 */
  1825.   DosOpen (,,,,,,,)                          /* SM$:M3 */
  1826.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              /* SM$:M2 */
  1827.   /*                                   SM$:C
  1828.    * OpenFile Cat:030 Type:010 Area:130                  SM$:K
  1829.    * Replace with DosOpen, DosDelete, or DosQueryPathInfo         SM$:S
  1830.    *                                   SM$:C
  1831.    * LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  1832.    *                                   SM$:C
  1833.    * OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  1834.    * Use DosQueryPathInfo to replace OpenFile function call        SM$:S
  1835.    */                                 /* SM$:C */
  1836. #endif
  1837.  
  1838. #ifndef OS221
  1839.   _lclose (wFileTemp);                         /* SM$:O */
  1840. #else
  1841.   DosClose (wFileTemp);                        /* SM$:M1 */
  1842.   /*                                   SM$:C
  1843.    * _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  1844.    */                                 /* SM$:C */
  1845. #endif
  1846.  
  1847. #ifndef OS221
  1848.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           /* SM$:O */
  1849. #else
  1850.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           /* SM$:R */
  1851.   WinLoadString (,,,,);                         /* SM$:M2 */
  1852.   /*                                    SM$:C
  1853.   * LoadString Cat:020 Type:010 Area:060                 SM$:K
  1854.   * Replace with WinLoadString                      SM$:S
  1855.   */                                  /* SM$:C */
  1856. #endif
  1857.  
  1858. CONTINUE - Format - 'ifdef' and '//' comments 
  1859. BACK - Original source code (before migration) 
  1860. Migration Formats 
  1861. CONTENTS 
  1862.  
  1863.  
  1864. ΓòÉΓòÉΓòÉ 8.1.3. Format - 'ifdef' and '//' comments ΓòÉΓòÉΓòÉ
  1865.  
  1866. Format - 'ifdef' and '//' comments 
  1867.  
  1868. // SM$:FO  C:\TEST\TEST.C - 03/28/94 14:30:22
  1869.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1870.    * pathname in the OFSTRUCT structure.
  1871.    */
  1872. #ifndef OS221
  1873.   wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);// SM$:O
  1874. #else
  1875.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  // SM$:M3
  1876.   DosOpen (,,,,,,,)                          // SM$:M3
  1877.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              // SM$:M2
  1878.   // OpenFile Cat:030 Type:010 Area:130                  SM$:K
  1879.   // Replace with DosOpen, DosDelete, or DosQueryPathInfo         SM$:S
  1880.   //                                   SM$:C
  1881.   // LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  1882.   //                                   SM$:C
  1883.   // OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  1884.   // Use DosQueryPathInfo to replace OpenFile function call        SM$:S
  1885. #endif
  1886.  
  1887. #ifndef OS221
  1888.   _lclose (wFileTemp);                         // SM$:O
  1889. #else
  1890.   DosClose (wFileTemp);                        // SM$:M1
  1891.   // _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  1892. #endif
  1893.  
  1894. #ifndef OS221
  1895.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           // SM$:O
  1896. #else
  1897.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           // SM$:R
  1898.   WinLoadString (,,,,);                         // SM$:M2
  1899.   // LoadString Cat:020 Type:010 Area:060                 SM$:K
  1900.   // Replace with WinLoadString                      SM$:S
  1901. #endif
  1902.  
  1903. CONTINUE - Format - NO 'ifdef' and '/*...*/' comments 
  1904. BACK - Format - 'ifdef' and '/*...*/' comments 
  1905. Migration Formats 
  1906. CONTENTS 
  1907.  
  1908.  
  1909. ΓòÉΓòÉΓòÉ 8.1.4. Format - NO 'ifdef' and '/*...*/' comments ΓòÉΓòÉΓòÉ
  1910.  
  1911. Format - NO 'ifdef' and '/*...*/' comments 
  1912.  
  1913. /* SM$:FO  C:\TEST\TEST.C - 03/28/94 14:32:18                */
  1914.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1915.    * pathname in the OFSTRUCT structure.
  1916.    */
  1917.   /* wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE); SM$:O */
  1918.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  /* SM$:M3 */
  1919.   DosOpen (,,,,,,,)                          /* SM$:M3 */
  1920.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              /* SM$:M2 */
  1921.   /*                                   SM$:C
  1922.    * OpenFile Cat:030 Type:010 Area:130                  SM$:K
  1923.    * Replace with DosOpen, DosDelete, or DosQueryPathInfo         SM$:S
  1924.    *                                   SM$:C
  1925.    * LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  1926.    *                                   SM$:C
  1927.    * OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  1928.    * Use DosQueryPathInfo to replace OpenFile function call        SM$:S
  1929.    */                                 /* SM$:C */
  1930.  
  1931.   /* _lclose (wFileTemp);                         SM$:O */
  1932.   DosClose (wFileTemp);                        /* SM$:M1 */
  1933.   /*                                   SM$:C
  1934.    * _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  1935.    */                                 /* SM$:C */
  1936.  
  1937.   /* LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           SM$:O */
  1938.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           /* SM$:R */
  1939.   WinLoadString (,,,,);                         /* SM$:M2 */
  1940.   /*                                    SM$:C
  1941.   * LoadString Cat:020 Type:010 Area:060                 SM$:K
  1942.   * Replace with WinLoadString                      SM$:S
  1943.   */                                  /* SM$:C */
  1944.  
  1945. CONTINUE - Format - NO 'ifdef' and '//' comments 
  1946. BACK - Format - 'ifdef' and '//' comments 
  1947. Migration Formats 
  1948. CONTENTS 
  1949.  
  1950.  
  1951. ΓòÉΓòÉΓòÉ 8.1.5. Format - NO 'ifdef' and '//' comments ΓòÉΓòÉΓòÉ
  1952.  
  1953. Format - NO 'ifdef' and '//' comments 
  1954.  
  1955. // SM$:FO  C:\TEST\TEST.C - 03/28/94 14:33:45
  1956.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1957.    * pathname in the OFSTRUCT structure.
  1958.    */
  1959.   // wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);SM$:O
  1960.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  // SM$:M3
  1961.   DosOpen (,,,,,,,)                          // SM$:M3
  1962.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              // SM$:M2
  1963.   // OpenFile Cat:030 Type:010 Area:130                  SM$:K
  1964.   // Replace with DosOpen, DosDelete, or DosQueryPathInfo         SM$:S
  1965.   //                                   SM$:C
  1966.   // LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  1967.   //                                   SM$:C
  1968.   // OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  1969.   // Use DosQueryPathInfo to replace OpenFile function call        SM$:S
  1970.  
  1971.   // _lclose (wFileTemp);                         SM$:O
  1972.   DosClose (wFileTemp);                        // SM$:M1
  1973.   // _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  1974.  
  1975.   // LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           SM$:O
  1976.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           // SM$:R
  1977.   WinLoadString (,,,,);                         // SM$:M2
  1978.   // LoadString Cat:020 Type:010 Area:060                 SM$:K
  1979.   // Replace with WinLoadString                      SM$:S
  1980.  
  1981. CONTINUE - Format - '//' comments and NO Tags 
  1982. BACK - Format - NO 'ifdef' and '/*...*/' comments 
  1983. Migration Formats 
  1984. CONTENTS 
  1985.  
  1986.  
  1987. ΓòÉΓòÉΓòÉ 8.1.6. Format - '//' comments and NO Tags ΓòÉΓòÉΓòÉ
  1988.  
  1989. Format - '//' comments and NO Tags 
  1990.  
  1991. Note:   Option chosen to insert Short comment and Prototype only. Elimination 
  1992. of tags on commented lines prevents automatic removal of inserted code! 
  1993.  
  1994. // SM$:FO  C:\TEST\TEST.C - 03/28/94 14:34:59
  1995.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  1996.    * pathname in the OFSTRUCT structure.
  1997.    */
  1998.   // wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);
  1999.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);
  2000.   DosOpen (,,,,,,,)
  2001.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);
  2002.   // OpenFile Cat:030 Type:010 Area:130
  2003.   // Replace with DosOpen, DosDelete, or DosQueryPathInfo
  2004.   //
  2005.   // LPSTR replaced with PSZ - Cat:010 Type:030 Area:990
  2006.   //
  2007.   // OF_PARSE Cat:020 Type:030 Area:130
  2008.   // Use DosQueryPathInfo to replace OpenFile function call
  2009.  
  2010.   // _lclose (wFileTemp);
  2011.   DosClose (wFileTemp);
  2012.   // _lclose replaced with DosClose - Cat:010 Type:010 Area:130
  2013.  
  2014.   // LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));
  2015.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));
  2016.   WinLoadString (,,,,);
  2017.   // LoadString Cat:020 Type:010 Area:060
  2018.   // Replace with WinLoadString
  2019.  
  2020. CONTINUE - Format - '//', Short comments and Prototypes 
  2021. BACK - Format - NO 'ifdef' and '//' comments 
  2022. Migration Formats 
  2023. CONTENTS 
  2024.  
  2025.  
  2026. ΓòÉΓòÉΓòÉ 8.1.7. Format - '//', Short comments and Prototypes ΓòÉΓòÉΓòÉ
  2027.  
  2028. Format - '//', Short comments and Prototypes 
  2029.  
  2030. // SM$:FO  C:\TEST\TEST.C - 03/28/94 14:37:08
  2031.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  2032.    * pathname in the OFSTRUCT structure.
  2033.    */
  2034.   // wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);SM$:O
  2035.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  // SM$:M3
  2036.   DosOpen (,,,,,,,)                          // SM$:M3
  2037.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              // SM$:M2
  2038.   // OpenFile Cat:030 Type:010 Area:130                  SM$:K
  2039.   // Replace with DosOpen, DosDelete, or DosQueryPathInfo         SM$:S
  2040.   //                                   SM$:C
  2041.   // APIRET APIENTRY DosOpen(PSZ pszFileName, PHFILE pHf,         SM$:P
  2042.   //  PULONG pulAction, ULONG  cbFile, ULONG  ulAttribute,        SM$:P
  2043.   //  ULONG  fsOpenFlags, ULONG  fsOpenMode, PEAOP2 peaop2);       SM$:P
  2044.   // APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName,          SM$:P
  2045.   //  ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf);        SM$:P
  2046.   // APIRET APIENTRY DosSearchPath(ULONG flag, PSZ pszPathOrName,     SM$:P
  2047.   //  PSZ pszFilename, PBYTE pBuf, ULONG cbBuf);             SM$:P
  2048.   // APIRET APIENTRY DosDelete(PSZ pszFile);               SM$:P
  2049.   //                                   SM$:C
  2050.   // LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  2051.   //                                   SM$:C
  2052.   // OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  2053.   // Use DosQueryPathInfo to replace OpenFile function call        SM$:S
  2054.   //                                   SM$:C
  2055.   // APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName,          SM$:P
  2056.   //  ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf);        SM$:P
  2057.  
  2058.   // _lclose (wFileTemp);                         SM$:O
  2059.   DosClose (wFileTemp);                        // SM$:M1
  2060.   // _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  2061.  
  2062.   // LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           SM$:O
  2063.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           // SM$:R
  2064.   WinLoadString (,,,,);                         // SM$:M2
  2065.   // LoadString Cat:020 Type:010 Area:060                 SM$:K
  2066.   // Replace with WinLoadString                      SM$:S
  2067.   //                                    SM$:C
  2068.   // LONG APIENTRY WinLoadString (HAB hab, HMODULE hModResource,      SM$:P
  2069.   //  ULONG idString, LONG lBufferMax, PSZ pszBuffer);          SM$:P
  2070.  
  2071. See Also: 
  2072.  
  2073. CONTINUE - Format - '/*...*/', Long comments, Prototypes and Examples 
  2074. BACK - Format - '//' comments and NO Tags 
  2075. Migration Formats 
  2076. CONTENTS 
  2077.  
  2078.  
  2079. ΓòÉΓòÉΓòÉ 8.1.8. Format - '/*...*/', Long comments, Prototypes and Examples ΓòÉΓòÉΓòÉ
  2080.  
  2081. Format - '/*...*/', Long comments, Prototypes and Examples 
  2082.  
  2083. // SM$:FO  C:\TEST\TEST.C - 03/28/94 14:38:42
  2084.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  2085.    * pathname in the OFSTRUCT structure.
  2086.    */
  2087.   // wFileTemp = OpenFile ((LPSTR)szFile, (LPOFSTRUCT)&of, OF_PARSE);SM$:O
  2088.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  // SM$:M3
  2089.   DosOpen (,,,,,,,)                          // SM$:M3
  2090.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              // SM$:M2
  2091.   // OpenFile Cat:030 Type:010 Area:130                  SM$:K
  2092.   // Replace with DosOpen to open a file.  Use DosQueryPathInfo      SM$:L
  2093.   // specifying FIL_QUERYFULLNAME to parse the file name.  Use      SM$:L
  2094.   // DosSearchPath to query the fully qualified path name of a      SM$:L
  2095.   // file.  Use DosDelete to delete a file.                SM$:L
  2096.   //                                   SM$:C
  2097.   // APIRET APIENTRY DosOpen(PSZ pszFileName, PHFILE pHf,         SM$:P
  2098.   //  PULONG pulAction, ULONG  cbFile, ULONG  ulAttribute,        SM$:P
  2099.   //  ULONG  fsOpenFlags, ULONG  fsOpenMode, PEAOP2 peaop2);       SM$:P
  2100.   // APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName,          SM$:P
  2101.   //  ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf);        SM$:P
  2102.   // APIRET APIENTRY DosSearchPath(ULONG flag, PSZ pszPathOrName,     SM$:P
  2103.   //  PSZ pszFilename, PBYTE pBuf, ULONG cbBuf);             SM$:P
  2104.   // APIRET APIENTRY DosDelete(PSZ pszFile);               SM$:P
  2105.   //                                   SM$:C
  2106.   // Windows:                               SM$:X
  2107.   //  OFSTRUCT OFStruct;                         SM$:X
  2108.   //  HFILE hFile = OpenFile ("TEST.DAT", &OFStruct,           SM$:X
  2109.   //          OF_CREATE);                    SM$:X
  2110.   // OS/2:                                SM$:X
  2111.   //  HFILE hFile;                            SM$:X
  2112.   //  ULONG ulAction;                          SM$:X
  2113.   //  DosOpen ("TEST.DAT", &hFile, &ulAction, FILE_NORMAL,        SM$:X
  2114.   //   OPEN_ACTION_CREATE_IF_NEW |                   SM$:X
  2115.   //   OPEN_ACTION_REPLACE_IF_EXISTS, OPEN_ACCESS_READWRITE |      SM$:X
  2116.   //   OPEN_SHARE_DENYNONE, NULL);                   SM$:X
  2117.   //                                   SM$:C
  2118.   // LPSTR replaced with PSZ - Cat:010 Type:030 Area:990         SM$:1
  2119.   //                                   SM$:C
  2120.   // OF_PARSE Cat:020 Type:030 Area:130                  SM$:K
  2121.   // Use DosQueryPathInfo specifying FIL_QUERYFULLNAME to         SM$:L
  2122.   // query the full path of a file.  This replaces the OpenFile      SM$:L
  2123.   // function call.                            SM$:L
  2124.   //                                   SM$:C
  2125.   // APIRET APIENTRY DosQueryPathInfo(PSZ pszPathName,          SM$:P
  2126.   //  ULONG ulInfoLevel, PVOID pInfoBuf, ULONG cbInfoBuf);        SM$:P
  2127.  
  2128.   // _lclose (wFileTemp);                         SM$:O
  2129.   DosClose (wFileTemp);                        // SM$:M1
  2130.   // _lclose replaced with DosClose - Cat:010 Type:010 Area:130      SM$:1
  2131.  
  2132.   // LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           SM$:O
  2133.   LoadString (hInst, IDS_UNTITLED, sz, sizeof(sz));           // SM$:R
  2134.   WinLoadString (,,,,);                         // SM$:M2
  2135.   // LoadString Cat:020 Type:010 Area:060                 SM$:K
  2136.   // Replace with WinLoadString                      SM$:L
  2137.   //                                    SM$:C
  2138.   // LONG APIENTRY WinLoadString (HAB hab, HMODULE hModResource,      SM$:P
  2139.   //  ULONG idString, LONG lBufferMax, PSZ pszBuffer);          SM$:P
  2140.   //                                    SM$:C
  2141.   // Windows:                               SM$:X
  2142.   //  int iLen = LoadString (hInst, 1, szBuf, sizeof(szBuf));       SM$:X
  2143.   // OS/2:                                 SM$:X
  2144.   //  LONG lLen = WinLoadString (hAB, hMod, 1, sizeof(szBuf),       SM$:X
  2145.   //          szBuf);                       SM$:X
  2146.  
  2147. CONTINUE - Format - Source code with migration comments removed 
  2148. BACK - Format - '//', Short comments and Prototypes 
  2149. Migration Formats 
  2150. CONTENTS 
  2151.  
  2152.  
  2153. ΓòÉΓòÉΓòÉ 8.1.9. Format - Source code with migration comments removed ΓòÉΓòÉΓòÉ
  2154.  
  2155. Format - Source code with migration comments removed 
  2156.  
  2157.   /* Open the file with the OF_PARSE flag to obtain the fully qualified
  2158.    * pathname in the OFSTRUCT structure.
  2159.    */
  2160.   wFileTemp = OpenFile ((PSZ)szFile, (LPOFSTRUCT)&of, OF_PARSE);  // SM$:M3
  2161.   DosOpen (,,,,,,,)                          // SM$:M3
  2162.   DosQueryPathInfo (, FIL_QUERYFULLNAME,,);              // SM$:M2
  2163.   DosClose (wFileTemp);                        // SM$:M1
  2164.   WinLoadString (,,,,);                        // SM$:M2
  2165.  
  2166. CONTINUE - SMART Files 
  2167. BACK - Format - '/*...*/', Long comments, Prototypes and Examples 
  2168. Migration Formats 
  2169. CONTENTS 
  2170.  
  2171.  
  2172. ΓòÉΓòÉΓòÉ 8.2. SMART Files ΓòÉΓòÉΓòÉ
  2173.  
  2174. The SMART generates a number of files related to Analysis and Migration. Also, 
  2175. a set of files may be created as a result of The SMART Editor creating a 
  2176. hyperlink database for the source files processed by SMART. 
  2177.  
  2178. These files are listed below: 
  2179.  
  2180.   SMART Dictionary and Migration Database files (one set per directory) 
  2181.    XXXXXXXX.TBL - Dictionary 
  2182.    SMART1DB.D1 - Database 
  2183.    SMART1DB.D2 - Database 
  2184.    SMART1DB.D3 - Database 
  2185.    SMART1DB.D4 - Database 
  2186.    SMART1DB.K1 - Database 
  2187.  
  2188.   Analysis and Migration files (in List-of-Files Directory) 
  2189.    XXXXXXXX.LST - List-of-Files 
  2190.    (List-of-Files).RPT - Analysis report 
  2191.    (List-of-Files).LOG - Logfile from The SMART Editor (SLBUILD) 
  2192.    (List-of-Files).RSP - Response File for The SMART Editor (SLBUILD) 
  2193.    (List-of-Files).LNK - Analysis Keyword List 
  2194.    (List-of-FileX).LOG - Logfile from The SMART Editor (SLBUILD) (Migrated 
  2195. files) 
  2196.    (List-of-FileX).RSP - Response File for The SMART Editor (SLBUILD) 
  2197. (Migrated files) 
  2198.    (List-of-FileX).LNK - Migration Keyword List 
  2199.  
  2200.   Analysis and Migration Files (in directories with original source files) 
  2201.    XXXXXXXXX.X_X - Migrated Source file with mapped extension 
  2202.    (source file)_^ - Binary analysis data file (one for each source file) 
  2203.  
  2204.   The SMART Editor Database Link files and report displays (from DB Build) 
  2205.   (in directory with List-of-Files) 
  2206.    SLINK2DB.D1 - The SMART Editor Link Database file 
  2207.    SLINK2DB.D2 - The SMART Editor Link Database file 
  2208.    SLINK2DB.K1 - The SMART Editor Link Database file 
  2209.    SLINK2DB.K2 - The SMART Editor Link Database file 
  2210.    SLINK2DB.K3 - The SMART Editor Link Database file 
  2211.    SL_CALL.RPT - The SMART Editor Call Tree display report 
  2212.    SL_DLGBOX.RPT - The SMART Editor Dialog Template display report 
  2213.    SL_FUNCT.RPT - The SMART Editor Functions List display report 
  2214.    SL_GLOB.RPT - The SMART Editor Globals display report 
  2215.    SL_MODS.RPT - The SMART Editor Files display report 
  2216.    SL_UNREF.RPT - The SMART Editor Unreferenced Functions display report 
  2217.    SL_USER.RPT - The SMART Editor User Links display report 
  2218.    (contains keywords found in Migration or Analysis from SMART processes) 
  2219.  
  2220.   SMART Resource Translator 
  2221.    resourcefilename.ERR - Default error filename 
  2222.    resourcefilename.HHH - Default generated header filename 
  2223.    resourcefilename.SUM - Default summary filename 
  2224.    resourcefilename.RCX - Default translated resource filename 
  2225.  
  2226.   Other SMART Files 
  2227.    MAPEXT.DAT - File extension mapping data (SMART directory). 
  2228.  
  2229. CONTINUE - Specifications and Restrictions 
  2230. BACK - Format - Source code with migration comments removed 
  2231. CONTENTS 
  2232.  
  2233.  
  2234. ΓòÉΓòÉΓòÉ 8.3. Specifications and Restrictions ΓòÉΓòÉΓòÉ
  2235.  
  2236. Specifications and Restrictions 
  2237.  
  2238.    Maximum path and file length   255
  2239.    Maximum Migration Database Path length   47
  2240.    Maximum directory levels    10
  2241.    Maximum ifdef name length   40
  2242.    Maximum "List-of-Files" data   64K
  2243.    (unless created by an editor)
  2244.    Maximum lines of code in any one file  32767
  2245.    Maximum code line length    512
  2246.    Supported preprocessor statements:
  2247.    #if, #ifdef, # if defined, #else, #elseif, #endif
  2248.  
  2249.    Analysis and Migration- syntax not supported:
  2250.  
  2251.    - Keywords within quotation marks
  2252.    - Keywords within macro define statements
  2253.    - Fields of a structure are not identified for migration
  2254.    - Context of a parameter within a call
  2255.  
  2256.    Resource Translator (Windows Only) restrictions:
  2257.  
  2258.    - Macros cannot be used for any of the reserved resource
  2259.      definition keywords.
  2260.    - Preprocessor conditional statements must begin and end
  2261.      within a single file.
  2262.    - Preprocessor conditional statements within a DIALOG
  2263.      resource definition template are properly evaluated but
  2264.      are not output to the converted resource file.
  2265.    - #include and rcinclude statements are not recognized within
  2266.      any multiline resource statements.
  2267.    - #define statements are not recognized within any multiline
  2268.      resource statements.
  2269.    - Macro definitions which contain parameter substitutions are
  2270.      currently  not processed.
  2271.    - Can either replace the existing files with the converted files
  2272.      or save the converted file with a different file extension.
  2273.    - When converting dialog units as outlined in the Dialog
  2274.      Conversion  section the conversion is relative to the
  2275.      system font for the current display resolution.
  2276.  
  2277. CONTINUE - Technical Support 
  2278. BACK - SMART Files 
  2279. CONTENTS 
  2280.  
  2281.  
  2282. ΓòÉΓòÉΓòÉ 8.4. Technical Support ΓòÉΓòÉΓòÉ
  2283.  
  2284. Technical Support 
  2285.  
  2286.   Internet:
  2287.      Send questions or comments to devcon@vnet.ibm.com
  2288.  
  2289.   CompuServe:
  2290.      Obtain access to the IBM OS/2 Developer Forum 2.
  2291.      To obtain access to the Developer Connection section, please
  2292.      send a note to CompuServe userid 73423,2767.
  2293.      To access the forum, type GO OS2DF2 at the ! prompt; then
  2294.      select the Developer Connection section.
  2295.  
  2296.   OS/2 BBS:
  2297.      The DEVCON CFORUM, under TalkLink, is a feature under the
  2298.      IBMLink Commercial Services.  Customers in the U.S. can call
  2299.      1-800-547-1283; customers outside of the U.S. should contact
  2300.      their local IBM Marketing Representative.
  2301.  
  2302. BACK - Specifications and Restrictions 
  2303. CONTENTS 
  2304.