═══ 1. The SMART Editor User's Guide ═══ The SMART Editor User's Guide Version 2.1B September 1995 (C) 1991, 1994, 1995 One Up Corporation All Rights Reserved Notice Table of Contents ═══ 2. Notice ═══ ** NOTICE ** This document may not, in whole or in part, be copied, reproduced, photocopied, translated, or reproduced to any electronic medium or machine readable form without prior written consent from One Up Corporation. This publication could contain technical inaccuracies or typographical errors. As changes are periodically made to the information herein; these changes may be incorporated in new additions of the publication. One Up Corporation may make improvements and/or changes in the product and/or the program described in this publication at any time. One Up Corporation is not responsible for any direct or indirect damage or loss of business resulting from inaccuracies or omissions in this publication. The specifications contained in this document are subject to change without notice. SMART - Source Migration Analysis Reporting Toolset is a trademark of One Up Corporation. OS/2, Presentation Manager are trademarks of the International Business Machines Corporation. IBM is a registered trademark of the International Business Machines Corporation. Other trademarks are property of their respective companies. CONTENTS ═══ 3. Table of Contents ═══ Chapter 1 - Introduction Chapter 2 - Hyperlinks Chapter 3 - Installation and Setup Chapter 4 - Getting Started - A Tutorial Chapter 5 - Using Help Chapter 6 - Utility Programs SLStart Utility SLBuild Utility IBM WorkFrame/2 Interface Rexx Interface Chapter 7 - How To ... String Replacements Create a List-of-Files Use Search for Changes Copy Files Delete Files Find Files Walk Braces Walk Parens Change Case Change Edit Mode Refresh a Display Select Text Re-Align Code Use Auto Indent Use Word Wrap Enter Special Characters Use Undo-Redo Setup Options Choose Fonts Choose Colors Create a Link Database Set If Defines Point to a new Database Indremental Update Create User Links Use Clip Files Create a Clip Library Clip View Help Clip Windows QuickHelp Display a File in Two Windows Create a Compile Window Lock Scroll Two Windows Create Private Directories Create General Directories Delete Directories Use 'C' Templates Define User Macro Files Direct Macro Output to a File Direct Macro Output to a Window Single Step a Rexx Macro File Use Tracks Use Shutdown and Startup Macros Popup an OS/2 Command Window Define User Command Files Register a Command Set Assign Alternate Command Processor Use Drag and Drop Process WorkFrame/2 Errors Disable File Passing Notification of Files Restore Application Auto-Open a File Print a File Define User Reference Files Incremental Backup to Diskette Snapshots Set Selection parameters Use Hyperlinks Use HyperTracks Startup Arguments Chapter 8 - Tips and Techniques Navigational Tips Common Accelerator Keys Scrolling Memory Management What is Saved and Where Use of a 3 Button Mouse File Drag and Drop Text Selection Split Screen and Selected Text Displaying Columns Information in the Status Box Searching Changed Files Undo Tracks HyperTracks Place Markers Compiling Source Code Changing Directories Building a Search File List Code Snippet Library Pseudo Source Files File HouseKeeping Left Justify Code The Copy Function Use Parameters for Incremental Backup Selecting Files Find an Item in a List Box Finding the Size 'Delete' Warnings Link to a Function Link Database Update Connect to View Help Connect to Microsoft QuickHelp Using SLSTART to Open Filesnames Spawn OS/2 Command Files Spawn DOS Command Files Run 'Grep' Qualify Make Filenames for Hyperlinking Errors Assign Accelerator Keys Create Project Oriented Instances Multiple Instances of The SMART Editor Chapter 9 - Macros S_ Macros - Alphabetically S_ Macros - Functional Groups S_ Macros - Reference Definitions Glossary of Terms Appendix A - Specifications Appendix B - Keys Reference Chapter 1 - Introduction ═══ 4. Chapter 1 - Introduction ═══ Chapter 1 - Introduction Welcome to SLink - The SMART Editor Source code maintenance and creation is much more than typing program code. A great deal of the effort in the creation or maintenance of program source code is finding, copying, moving, and in general, having complete access to your source code. The SMART Editor has been created to provide you with an integrated environment for analyzing, accessing, and changing source code files. This integrated environment, presented with a graphical interface, will give you a refreshing new experience in programming. The hyperlink, context sensitive display of your source code and on-line help will provide you with a direct, and effortless connection to the information that you need to learn and maintain programs. All of this power initially may be intimidating to the first time user. There are over 100 menu item and hot key selections for the functions contained in this environment. The SMART Editor has been specifically designed for ease of use. The learning curve for this environment is short. You just need to be patient and recognize that after a short period of use you will master the power of The SMART Editor. This technical manual is designed to help you become familiar with the SMART Editor functions. As you begin to use this product you will find your own style of use. You will find the functions that best suit your needs. You will find a balance between the use of the mouse and the use of accelerator keys that are most effective in menu and function selection. You will find integrated function combinations that give you the productivity that you are looking for. This Technical Manual is written with different views of The SMART Editor. You may have sufficient experience with a previous version of The SMART Editor and can immediately use the powerful features of this product. Otherwise, you may wish to get a guided tour of the basic functionality of The SMART Editor by starting in Chapter 4, "Getting Started - A Guided Tutorial". Instructions for the installation of this product is provided in Chapter 3, "Installation". An overview of The SMART Editor access to source code and help is provided in Chapter 2, "HyperLinks". Chapter 7 "Utilities" will give you an insight into the use of utility programs associated with The SMART Editor. If you wish to use this technical manual as a quick reference to specific The SMART Editor functions, Chapters 7, "How To...", and Chapter 8, "Tips and Techniques" provide a direct, recipe style format to answer your questions in getting maximum performance from The SMART Editor. The appendix of this manual contains a wealth of reference material. Appendix B, "Keys Reference" contains a reference sheet of accelerator keys. The context sensitive help available when you run The SMART Editor will provide detail information on each menu function and dialog panel. The chapters of this document are listed below for your reference.  Chapter 1 - "Introduction" - A general description of the organization of this manual including chapter content and presentation conventions.  Chapter 2 - "HyperLinks" - An description of the numerous methods for accessing source code. Some attention is made to the difference in each of these methods.  Chapter 3 - "Installation" - The SMART Editor product installation considerations and some notes regarding the installation process are discussed in this chapter.  Chapter 4 - "Getting Started - A Guided Tutorial" - This chapter will provide you with an excellent chance to be come familiar with the major The SMART Editor Functions. Please take the time to read and follow the guided tour presented in this chapter.  Chapter 5 - "Getting Help" - The SMART Editor provided three help systems. The use of on-line help is explained in detail in this chapter.  Chapter 6 - "Utilities" - The utility programs SLSTART, and SLBuild are explained in this chapter.  Chapter 7 - "How To..." - A powerful chapter with direct explanations, in a cook book format, of the most useful features and processes of The SMART Editor. These instruction packets are indexed for your direct access.  Chapter 8 - "Tips and Techniques" - Another powerful chapter with direct suggestions to improve your use of The SMART Editor.  Chapter 9 - "Macros" - The Rexx Macro interface and The SMART Editor macro function calls are explained in this chapter.  Glossary of Terms - An alphabetical listing of The SMART Editor terms and their definitions.  Appendix A, "Specifications" - The SMART Editor Specifications.  Appendix B, "Keys reference" - A reference sheet containing all of the accelerator keys for the selection of menu items and functions. Table of Contents ═══ 5. Chapter 2 - Hyperlinks ═══ Chapter 2 - Hyperlinks HyperLinks and Other Access Methods Definition: hyperlink (hi'per link) v. Extensive joining of similar subjects. [Colloq.] rapidly navigating text material with mouse clicks on keywords. The eloquent power of SourceLink is most evident when you can select a keyword with a mouse click and immediately display the source of references to the keyword. You can accomplish an involved task of locating, and reviewing all of the occurrences of a particular variable with simple mouse clicks. SourceLink creates an integrated environment for finding, clipping, changing, and analyzing source code over a large number of files. Lets explore the ways in which SourceLink provides you with a direct connection to your source code.  When you mouse click on a word, the word automatically becomes the object of a multi-file string search. Select "Search" from the "More" menu, and SourceLink will find all occurrences of the selected word throughout the path and sub-directories that you have specified. SourceLink will automatically display a list of the locations of the search string. Double click on any one of the locations displayed in the search list. The file represented by this location will be opened and displayed. The search string in question will appear at the top of your screen. Continue to click on each occurrence location and you will display every file where the search string appears.  Click on a filename in any displayed text, and the file will automatically be opened and displayed on your screen. If the filename is followed by a line number in parentheses, the file will be displayed at the specified line number. Furthermore, if a column number follows the line number, SourceLink will position the cursor at the specified column and select the word at the cursor. This will work for compiler error messages, the "Find" file list, the function definition list, and anywhere that a filename is displayed in an edit or read-only window. Whenever you have a file list displayed, you can click on any one of the filenames and display the file. The SourceLink "Find" file function creates a list of files found. Compiler errors can be linked directly to their source with a mouse double click.  Click on a directory path in any displayed text, and SourceLink will automatically change directory to the specified path.  A complete hyperlink structure of your function definitions, references, globals, #defines, and user selected keywords can be created by SourceLink. Refer to Chapter 7, "How To..." topic "Create a Link Database" and "Use HyperLink for Navigation" in this manual. During this process a Link database, along with a "Function Call Tree", "Function Alphabetical Listing" and a listing of "Functions within Source Modules", "Defines", Globals, "User Specified Links" and "Dialog Templates" are created. Display any one of these files, click on a keyword or filename and you will immediately be placed at the code identified by the reference. Hyperlinking through your source code is indeed a powerful and effortless feature of SourceLink. You will certainly feel more connected to all of your source code. Your Choice of Access Methods Your choice of the different access methods supported by SourceLink depends upon your needs, how often the access is made, and the intended purpose of the access. String Search If you need to find an isolated occurrence of a text string, not already in your hyperlink database, the simplest method is to use the "Search" function from the "More" menu bar. If you have the text string already displayed in an edit window: a single mouse click will automatically place the string in the search window. Select the base path for the search and press "Ok". The results from this multi-file string search will be a display file automatically placed on your screen. Each found occurrence of the search string will be shown with the fully qualified filename and line number of the find. Double click your mouse on any occurrence location and the source code for that occurrence will be displayed. Go back to the search list display by pressing + or selecting "Back" from the main menu bar. If you have a three button mouse, the right (third) button will activate the "Back" process. Now you are in a position to double click on another occurrence of the search string. You can also use a split window to perform these finds. By the way - if you have a disabled mouse you can manually select and link text, as described in the previous paragraphs, by using the menu selections "Select String" and "Link to Def (Filename)" in the "Edit" Menu. If the text strings to be found are in a single file, simply press or select "Current Searches" under the "Edit" Menu. These string searches operate on the currently opened file. Opening files directly SourceLink understands filenames. You can double click on a filename, and it will be opened immediately! If the filename is followed by a line number and column number in parentheses, the filename will be open at the specified line number and column. This is the case for the list of occurrences in the string search that was previously discussed. It will also appear in many other places. Compile Error Lists When you compile your programs, use a command file that will direct the error list to a filename. You can use SLSTART to send this file directly back to SourceLink at the completion of the compile. Many compilers use the "filename(line_number)" format for their error listing. Double click on any error location (filename) and the file will be opened at the reference line number. Select "Back" to return to the error list and proceed through all of the error items that you wish to view (or change). Find Files The "More" menu item "Find" performs file finds. This serves as a directory listing, with hyperlink capabilities. You can specify date/time and/or attribute parameters, and specify the root directory for the search. When the find is completed a list of files meeting the selection criteria is displayed. Double-click on any one of the filenames, and the file will be opened. Tracks "Tracks", the menu item in "Ref", displays a list of filenames and location line numbers where you have been for the last 35 places. Double click on any line item and - you guessed it - you will be placed back at this point in the designated file. If you wish to save these tracks, you can use the clip file function to save the complete track file. Place the clip file mode into append and select the specific tracks that you wish to send to the clip file. At the end of any SourceLink session, your tracks file will automatically be saved as LASTTRKS.LOG in the SLINK2 directory. Open this file, double-click on the desired files and they will be opened for a new session. HyperTracks As you double click to hyperlink you way though your source code, you are laying down a HyperTrack. At any point you can traverse this track, Backward and Forward with the accelerator keys + and +. Files that you have opened, and not yet closed, are remembered by SourceLink (up to the maximum number specified in the "Setup Options"). The files are listed as menu items at the bottom of the main "File" menu. Click on any one of these files (menu items) and display this file with the cursor at the last location. Press + or select the main menu item "Back" and you will go back to the last file displayed. This is a useful tool for toggling between two files. Repeatedly pressing +<-> or selecting "Circulate File Buffers" under the main menu item "File" will walk you through all of the opened files. (Note: SourceLink does not hold a file open, but creates a buffer copy of the file for access). Accessing Reference Files A whole list of files ready for immediate access is listed under the main menu item "Ref". You can define your own favorite files to be placed in this list. Not all of the listed files may be available since they may not have even been created yet. You can access the last "Find" files list, or the last string "Search" list, and so on. These files are stored in your SL_TEMP2 directory as specified in CONFIG.SYS. If you have used a ram disk for the TEMP2 directory, some of the SourceLink created "Ref" files will not be available after you re-boot your operating system. The reference files related to Linked Source (described below) contain many references to filenames that can be double clicked for instant access. Linking Files and Accessing Source Keywords One of the most powerful features of SourceLink is the ability to link keywords and elements of your source files. You can build a database containing the definitions and references in each of your applications for both 'C', C++ and MASM source files. The detailed step instructions for this process is contained in Chapter 4, "Getting Started - A Guided Tutorial" under the topic "Linking Files", and in Chapter 6, "How To..." under the "Database Functions" topics. An introduction and overview for Linking Files is provided here. If you are learning program code, or you are tracing program function calls, or you have a need for quickly accessing the source definitions or references of functions, you will find SourceLink invaluable. Link Basics SourceLink will provide you with context sensitive hyperlinks to the function definitions and references of function calls for the files of your choice. The functions may be defined in 'C', C++ or MASM source code. The function references may appear in any context such as an argument within another call such as WinDlgBox(...). The link process consists of creating a file containing a list of all of the source files to be 'linked' for a purpose (typically a single executable). The files to be linked do not have to be from the same directory. The file combination does not have to be compilable. You may choose source code from a part of an application and some source files from a library. The second step in this "Link" process is to build the link database and create the link reports (display files). It is important to note that all of the Link database files and report files created by SourceLink will be stored in the same directory that contains the "List-of-Files" file that you created for a database. You may have only one Link database per directory. However you may create multiple directories, each containing a different database to represent different versions of a set of source files. You can switch between different Link databases by specifying the Link directory path with the menu item "Current DB Path" under the main menu item "Link". Also note that the algorithm for locating function definitions assumes traditional coding styles. 'C' and C++ coding allows for some unusual coding styles that may cause difficulty in function definition location. If you discover a function not located by SourceLink during the Link process, you may wish to change the definition line to a standard format. Likewise, SourceLink looks for a comment preceding the function definition line and assumes that this comment relates to the following function. Unfortunately the coding world is not a simple, perfect place to classify and anticipate all possibilities. The database pointers to functions and function call references are accurate only as long as the source code does not change. If you are changing the files that you have linked, eventually you will find that the access may be off by a number of lines. At any time you can select an "Incremental Update" of the link database, or you can rebuild the complete database. After using SourceLink you will find, for your own code, where the trade off in time will be for a complete re-build of the Link database as opposed to using the incremental update. The incremental update function operates like a make file, scanning only those files that have been changed since the last database build or update. Link Reports As a result of the Link database creation or update, a set of valuable reports (display files) are created. The "Function Definition List" provides an alphabetical list of all functions defined in the source files that are linked. The location of each function definition is shown as a filename, line number and column. If you double click on the location (Path), the source of the definition will be displayed. You can even locate a function in this list by using the current string search (). The "Call Tree" will be a helpful start to assist you in the analysis of new code. The call tree root starts at the function that you specified in the creation of this display. Each function reference from this starting point is traced in a tree structure. Both the location of the function reference, and the location of the definition is provided in this display. Duplicate branches are not retraced, but they are referenced, having previously been traced. Note that in the "Call Tree" display, some compiler error lists, and other reports, the fully qualified filenames are not provided - only the filenames are given. If you double-click on these filenames, SourceLink will look for the file in the current directory. Knowing this, you may need to change the system current directory by selecting "File", "Open/New", and the appropriate path, then "Cancel". This procedure will set the current directory (assuming you have chosen the "Directory Tracking" setup option). The "Module/Function List" provides a useful list of each function defined within a source module. You can see at a glance the functions that are contained in each of your source files. The "Unreferenced Functions List" list all functions that are defined but not referenced in the source code. The "#define List" gives a list of all #define variables included in your source. For this reason you should include all header files related to your project, but probably not system header files. The "Global List" provides a list of all globals. The "User Specified Link List" gives a list of all keywords matching the User Specified Links. The "Dialog List" will highlight dialog templates if you have included .RC and .DLG files in your Link Database build. Hyperlinking through Your Source Code Once you have linked the required source files into the SourceLink Link database, you can mouse click your way through your source code. A double click with your left mouse button on any of the keywords included in the hyperlink database will open the source file at the point of the definition. If there are multiple definitions, a list of the occurrences will be displayed, then you can double click on the location of your choice. If you have selected "Link To Comment" in the setup options, your function definition link will place you at the beginning of the comment preceding the function definition. Otherwise, you will be placed at the definition line of the function. If you double click on a function name with your right button (or center button with a three-button mouse) you will get a list displaying all references to the keyword. Double click on the location (filename, line number) for any reference, and you will open the source file with the point of reference. Sailing through Your Source Code By using a combination of the methods described above, you can glide through your source code with ease. You are armed with a multitude of functions to access your code:  Double click Function names.  Double click Function references.  Trace call logic through the "Current Call Tree".  Find string locations across multiple files with "Search".  Open files with a double click on the filename.  Access compile errors by double clicking on the error location.  Create a list of files with the "Find" function.  Go back where you have been with "Tracks" and HyperTracks. Create HyperLinked Documentation There are no rules that say all hyperlinks must be program source code. You may find it helpful to include your own text files that contain documentation and create hyperlink documents. Peace of Mind SourceLink not only provides you with the speed of directly accessing your source code, but also a freedom of movement about your code base. You will feel more relaxed and confident in moving about, finding elements of your code, and accessing source code. Table of Contents ═══ 6. Chapter 3 - Installation and Setup ═══ Chapter 3 - Installation and Setup The Installation and Setup Process The installation process will transfer the files for The SMART Editor to your computer hard disk. You will have an opportunity to edit and make changes to your CONFIG.SYS file. The SMART Editor Installation program even has a "Remove" procedure to remove all of the installed files for reinstallation or product update. You will have the option to specify the installation drive and path. You will also have the option to verify or skip the installation of The SMART Editor Icon and menu selection in the desktop menu group of your choice. Requirements The SMART Editor Installation requires approximately two megabytes of hard disk storage. This includes approximately 90KB of storage for the sample files. This does not include the storage required for each of The SMART Editor Link database and report files which will result from your source file linkage. It will also not include the TEMP2 storage for runtime files created as a result of file finds or string searches. We would highly recommend that you install The SMART Editor SAMPLE files and proceed through Chapter 4, "Getting Started - A Guided Tutorial" in this Technical Manual. After the tour, you can delete the \SLINK2\SAMPLE directory containing these files and get a chance to use The SMART Editor "Delete" function, if you desire. Installing The SMART Editor The SMART Editor will be installed as part of The SMART installation process if you have chosen The SMART Editor Installation Option. Configuring The SMART Editor with Setup Options At the completion of the installation process you have the opportunity to launch The SMART Editor program. If you choose to do so, you will start The SMART Editor, and display the README.NOW file supplied with the installation programs. Initially you may wish to configure The SMART Editor setup options for your specific preferences. You may refer to a detailed description of the configuration controls under the "Set Screen Colors", "Set Screen Font" and "The SMART Editor Options" in Chapter 8, "Functional Reference". 1. Select "Options" from the main menu bar. (Press +.) 2. Select "Setup Options" from this menu. (Press letter .) 3. The initial default options have already been set for you, however you may change any of these initial setup options. 4. Select "Screen Colors" in the "Options" menu. 5. Set the foreground and background colors for the current file (README.NOW), the default Read-Only files to be opened, and the Edit files to be opened. Press "Save" after each color selection. Press the "Return" push-button when you have finished. 5. Select "Screen Font" in the "Options" menu. 6. Choose the font of your liking for all file displays. System VIO - Size 8-12 is the most popular and will display the "Function Call Tree" properly. Press "Save". 7. When you have finished setting the options, press "Ok" on the main Options Panel. You are required to perform the setup for Insert/Overwrite Keyboard response. Failure to set this option properly will cause inappropriate Undo and Redo actions if your screen is in the overwrtite mode. Various levels of OS/2 2.0 have different functionality related to this mode. Some have all entry windows follow a common Insert/Overwrite mode, while you may have all windows independently controlled. At this time refer , "Functional Reference" to set the "Independent Insert/Overwrite" switch in the Setup Options dialog panel. This test is repeated here for your convenience. First access the Setup Options Panel. 1. Select "Options" from the main menu bar. (Press +.) 2. Select "Setup Options" from this menu. (Press letter .) When "Independent Insert/Overwrite" switch is checked, The SMART Editor will correspond to the OS/2 system action where each window on the desktop has its own insert/overwrite state. When this entry is not checked, the insert/overwrite state is the same for all windows on the desktop. To determine which mode your version of OS/2 supports, do the following:  Enter text into the Startup Macro data entry box  Enter text into the Closing Macro data entry box  Press the Insert key in one of the data entry boxes  Place the cursor in the other data entry box  Note the results - if the state of the second data entry box changes to agree with the state of the first data entry box, then you do not have independent insert/overwrite windows, so do NOT check this box. If the state of the second data entry box does not change, then you do have independent insert/overwrite windows, so you must check this box. This concludes the basic installation and initial configuration of The SMART Editor. You may wish to proceed to Chapter 4, "Getting Started - A Guided Tutorial", for a guided, hands-on introduction to The SMART Editor. Hiding Unused NDX Files The .NDX files in the directory \SLINK2\HELPINDX provide the index access to the OS/2 Help Facility (Viewdoc). This installation procedure may have provided you with a number of NDX files that are related to .INF help files that are not installed in you system. You will save processing time and resources if you take the time to remove or hide the NDX files that you will not be using. The filenames of the NDX files in \SLINK2\HELPINDX roughly correspond to the .INF file that each is indexing. Remove access to the unused files by simply renaming the files from xxx.NDX to xxx.NDY. This will hide unused NDX files from processing by The SMART Editor. Additional Installation Information Installation files. SLINK2.EXE - Primary The SMART Editor executable SLSTART.EXE - SLStart executable SLBUILD.EXE - Command line (batch) Link Database build program. SLINK2.HLP - Help for The SMART Editor SLINK2.INI - The SMART Editor Configuration file SLINK2DB.DLL - The SMART and SMART Editor DLL SLINK2DB.DBD - The SMART Editor Database Definition file README.NOW - Installation readme file INSTALL.EXE - Install executable (deleted at end of installation) SLINST.HLP - Install Help (deleted at end of installation) Installation Directories and additional files. \SLINK\SAMPLES - contains The SMART Editor sample files for tutorial. \HELPINDX - contains .NDX indexing files for Help access. \MACROS - contains system supplied REXX macro files \TEMP - contains system temporary and backup files Required Environment Settings  SET PATH=path Path for SLStart executable  SET BOOKSHELF=[Path1];[Path2]; Path for .INF Help files  SET HELPFILES=[Path1]\*.HLP;[PATH2]\*.HLP... Path for any Microsoft QuickHelp help files (if installed) Table of Contents ═══ 7. Chapter 4 - Getting Started ═══ Chapter 4 - Getting Started Introduction This guided tutorial will only take a few minutes of your time, but will greatly improve your understanding of the functionality of The SMART Editor. You will actually perform many of the primary The SMART Editor functions on the set of sample files supplied with the installation of this product. Additional detailed information regarding the functions described in this chapter are found elsewhere in this Technical Manual. Navigational Tips The SMART Editor generally conforms to the standard graphical control for Presentation Manager (PM) applications. The SMART Editor is also compliant with the IBM System Application Architecture (SAA) and CUA guidelines. If you are familiar with the PM interface, you should have no difficulty navigating about The SMART Editor. The SMART Editor makes extensive use of accelerator keys for control selection and text manipulation. Many of the menu items can be selected by using an accelerator key sequence (eg. +

) or simply using the standard PM convention of typing the underscored letter within the menu item name (the items in the main menu bar can be selected by first pressing the key). The accelerator keys for the menu items are shown on the menus. The accelerator keys for edit and text manipulation are shown in the "Keys Help" section of the on-line "Help" for The SMART Editor (,,), and listed for your quick reference in Appendix B, "Keys Reference". You will find the following accelerator keys particularly helpful while viewing and editing files: Accelerator Keys  Control+End - Go to end of file.  Control+Home - Go to beginning of file.  Keypad Plus(+) - Place selected text in paste buffer.  Keypad Minus(-) - Cut selected text and place in paste buffer.  Shift+Insert or (F12) - Insert text from paste buffer.  F11 - Select the word at the cursor.  ALT+O - Selection panel for file open.  ALT+B - Return to last displayed file ("Back"). Also, 3rd button on a three button mouse. On 2 button mouse hold left button down and press right button.  F5 - String search in current file. (The Current file is the file displayed on the screen. If the screen is split, the Current file has the focus.)  F6 - String replacement in the current file.  ALT+W - Display an OS/2 command window.  Control+A - Close all files.  ALT+F4 - Close all files and minimize The SMART Editor.  ALT+Esc - Switch to the previous OS/2 screen group or application.  ALT+Q - Help Window (Microsoft QuickHelp, if installed).  ALT+V - Context Sensitive IBM View Help (if installed).  Control+V - Enter and view a help topic (View Help).  F1 - The SMART Editor On-Line Help from any menu or dialog panel. The SMART Editor On-Line Help The extensive The SMART Editor Help facility is provided with this version of The SMART Editor. You can access Help in several different ways.  You can browse through The SMART Editor Help by first selecting "Help" then "General Help" from the main menu bar or pressing . If you select (double click) the highlighted help hyperlinks, you will be able to step through the help panels in the same way that you would step through The SMART Editor functions by selecting menu items.  You can highlight a menu item and press . To highlight a menu item: first press , then use the arrow keys to position the highlight over the desired menu item.  You can get Help from any dialog panel by pressing the "Help" push-button on the panel when it is in view, or by pressing .  You can search through the Help Index using a keyword. First select "Help Index" from the "Help" menu. Select "Services" from the menu bar of the Help panel. Select "Search" and enter the desired keyword into the entry box of the search panel. The SMART Editor Help Facility is structured in the same pattern as the menu selection panels. This is to say - the File function help panels are described under the main topic "File", in the same way that the menu selection items are shown. The "Keys Help" panel is particularly useful and is easily displayed by selecting "Keys Help" under the "Help" menu. You can display prior panels of your help display by pressing . You will exit the on-line help by pressing when there are no more previous panels. Displaying Files You most likely opened The SMART Editor with the installation README.NOW file. Now lets open a couple of other files and browse through your set of sample files. 1. Select "Open/New" from the "File" menu, or simply press +. 2. Double click on the file named LINK.C in the directory SMART\SAMPLES\SLINK. 3. Now select "Open/New" from the "File" menu again (+). 4. This time check "Open-Read Only" and double click on the file named LINKXR.C in the \SMART\SAMPLES\SLINK directory. You now have three files opened Press + to pull down the main "File" menu. Note that the three files that you opened are listed at the bottom of this menu. The current file title information is show at the top of the application in the title bar space. The line number is shown in the status window at the lower left corner of The SMART Editor. (The column number can be displayed if desired, by choosing the proper option in the "Options" "Setup Options" panel). Press + (or select "Back" under the "More" menu) to display the last previously displayed file. Alternately pressing + will toggle the display between two files. If you have a three buttoned mouse you can use the third button to perform this task, or chord the buttons on a two button mouse. Now let's display multiple files on your screen. Split Screen Select "More" from the main menu bar. Select "Window Configuration". Select one of the split formats, and watch as the screen splits into two display areas. The current (or active) window has the focus, and can be set active by simply clicking on the display area with your mouse (left button). To display one of the other files that you have available, simply press , to pull down the "File" menu, then press one of the numbers that represents any one of the files. (The current file is always number 1.) You can also place a new file on the split screen by pressing + ("File Open/New") and selecting another file to open. Now lets go back to a single file display. Select "More" from the main menu bar. Select "Window Configuration". Choose the full screen format (the first item in this menu). Text Manipulation The following steps will provide you with an introduction to the text manipulation controls. Additional controls will be explored in the "Edit" section of this chapter. 1. Go to the end of the displayed file by pressing +. 2. Go back to the beginning by pressing +. 3. Scroll up and down by pressing , , or by using the up and down Arrow keys. 4. Advance forward or backward a word at a time by pressing +. 5. End-of-line is found by pressing . After you have finished browsing through the files that you opened, close all of the files by selecting "Close ALL Files" from the "File" menu, or simply press +. Alternatively, you can close selected files by using "File Housekeeping" from the "File" menu, or closing each file as it is displayed using "Close Current File" from the "File" menu. String Searches String searches are a breeze with The SMART Editor. Simply click on the word to be searched and select "Search" under the "More" menu (press +). Set the base search directory path, the file specification to search, and press "Ok". The SMART Editor will search all specified files and return with a display listing of all occurrences of the string. You can click on the location (path,filename,line number) identified with any one of the string locations and The SMART Editor will immediately open the file at the search string location. Let's try an example, now. 1. Open and display LINK.C in \SMART\SAMPLES\SLINK. 2. Locate "WinDlgBox" as follows: a. Press (Current file string search). b. Type WinDlgBox in the entry box. c. Press "Ok". 3. Select the phrase "WinDlgBox" displayed at the top of the display screen by clicking once with your mouse on any letter in this phrase. 4. Select "Multi-File String Search" under "More", or simply press +. 5. Note that "WinDlgBox" has automatically been entered as your search string. You could have come directly here and typed the search string into the entry box. 6. Select the \SMART\SAMPLES\SLINK base path from the "Directories" list box. 7. Press "Ok" to start the search. 8. At the completion of the search, a list of the findings will be displayed on your screen. Note that each listed item contains the location of the occurrence. 9. Double click on any one of the locations (path,filename,line number, column number) to display the source code. Be sure and click on the text string between the drive designator and the file extension (between ':' and '.') 10. Press + to return to the search listing after you have displayed the file containing the search string occurrence. 11. You can also use the split screen format to display the search list on one part of your screen, and the files containing the search string on the other part of the screen. Finding Files The SMART Editor "Find" file function provides you with a direct approach in locating and browsing files. This The SMART Editor feature contains the file hyperlink capability as described previously, with many additional capabilities.  You can specify wildcards within filenames.  You can qualify the search starting at a specific directory.  You can specify time stamp parameters to extract files within a given time frame. The "Find" file process begins by selecting "Find" from the "More" menu, or by pressing +. 1. Select the base directory \SMART\SAMPLES\SLINK from the "Directories" list box, or type this directory into the "Base Dir:" entry box. 2. Note that the "Enter file to find:" entry box contains "*.*". If you wish to find only the "C" files in this directory, type "*.C" into this box or press the "*.C" push-button. 3. Press the "Find" pushbutton to start the process. 4. At the completion of finding all of the files indicated in the file specification, a list of the files found will be displayed on your screen. 5. Double click on any filename to display the file. 6. Press + after you have the file displayed to return to the files list, or press the third button on your mouse. Next time, if you wish to set time or attribute parameters on your file find, press the "Parameters" pushbutton to display a "Parameters" dialog panel to set your specifications. Linking Files One of the most powerful features of The SMART Editor is the ability to mouse click through your source code using the hyperlink features of The SMART Editor. In order for The SMART Editor to know the structure of your source code, you must first create a Link data base of your code. This linkage is performed in two simple steps. 1. Specify the files to be linked. 2. Scan and build the Link data base. Once this linkage is created, you will be able to view the documentation reports, including a display of your "Call Tree", that will be automatically generated as part of the linkage process. You will also be able to click on a function name in your source code and be able to immediately display the source file where this function is defined. You can click on a function name and have all locations of the reference for this function displayed on your screen. Mouse clicking each reference item location will display the source code for the reference. A link data base can be created for many different applications. Each data base will be stored along with the documentation reports in a directory of your choice. Where ever you create the "List of Files" file, so will be placed all of the system generated files of the linkage. The following steps will create a link data base for The SMART Editor sample application. Please Note: The sample files do not represent any workable program, or application and will not compile. The files are for demonstration purposes only. Let's build a link data base of your sample files. Creating a Files List 1. Select "Link" from the main menu bar. 2. Select "Maintain a list of Files..." from this menu. 3. When the "List of Files" dialog panel appears, select the SMART\SAMPLES\SLINK directory. Then type LINK.LST into the entry box labeled "File". 4. Press "Ok". 5. Since this file is new, you will be asked to verify a creation of this new file. Say "Ok". 6. At this point, an empty "Files List" panel will appear. 7. We wish to add file names to this list, so press the "Add" pushbutton on this panel. 8. A new file selection box will appear for adding files to our list. 9. Select the SMART\SAMPLES\SLINK directory from the directory list box. 10. Press the "*.C" pushbutton to display all of the "C" source files in this directory. 11. Press the "Select ALL" pushbutton, then press "Add" from this panel to add all of the "C" files to your list. (Don't be concerned about adding the same file twice. The SMART Editor will check and prevent this condition.) 12. Now lets pick up the assembly language file, the header file (.H) and the resource file (.RC). Press the "*.*" pushbutton. 13. Mouse click on the file named LINK.ASM, LINK.H and LINK.RC. These filenames will appear in the "File" entry box of this panel. 14. Press the "Add" pushbutton to add these files to the "List of Files". 15. Now that we are finished, press the "Close" pushbutton. 16. If you like the "List of Files" that is displayed, press the "Store" pushbutton on the "Files List" panel. If you would like to make any changes you can use the "Delete", "Delete ALL", or "Add" functions from this panel. Back to the main screen of The SMART Editor we will continue our link process, proceeding to the second phase of our process. Creating the Link 1. Select "Link" from the main menu. 2. At this point we are ready to create the Link data base. If you think that the source code to be linked has any #ifdef conditional statements, then you can select "Create DB (w/#ifdef)" from the "Link" menu. If no ifdefs exist, then choose "Create The SMART Editor DB" from the "Link" menu. Your sample code has #ifdefines. Select "Create DB (w/#ifdef)". 3. Initially you will be requested to specify which "List of Files" you want to link from. Since we just created a list, it will be suggested as the list in the "File" entry box. If you are re-creating an existing Link base, you will need to enter the specific "List of Files" file that is appropriate. 4. Press "Ok" to start the creation process. 5. Since you chose "Create with ifdefs", The SMART Editor will first scan for all #ifdefs. When complete, a panel of ifdefs will be displayed for you. 6. Set the "OPEN" definition to a "1" as follows: a. Select the symbol "OPEN" in the list box. b. Press the pushbutton labelled "Set Selected To the Defined Value" (the default is 1). c. Press "Ok". 7. A link option panel will be displayed now. Select all link options. 8. Now the link creation will proceed through two scan passes and inform you of its progress. 9. At the completion of the Link creation, a set of display reports will be automatically generated. (We will view these later). 10. After the call tree is scaled, and the "Call Tree" report file is completed, you are finished with the Link process. Reference Files The menu item under the main menu bar selection "Ref" provides immediate access to a number of The SMART Editor system created files. There is even an opportunity for you to register your own favorite files for easy access. Any one of the files listed on this menu can be accessed by pressing the access keys: ,,(and the identifier of the file in the menu: 1 through H). Let's start by browsing through one of the Link reports that we just created during our linkage process. Select the "Call Tree" under the "Ref" main menu. The function call tree for the sample files will appear on your screen. We will come back to this tree a bit later. Now select the "Function Definitions List" under "Other Link Displays". This will display an alphabetical list of all of the functions defined in our sample source code. Please note the format of the entries. The function name is followed by the fully qualified path and filename of the file that contains the definition of the function. The number in brackets is the line number and column number of the function definition. This format is our standard hyperlink file format. Now to use The SMART Editor hyperlink connection. Using the hyperlink feature If you will double click (left mouse button) on the function name, The SMART Editor will link you directly to the definition of the function. If you double click on the path and filename, The SMART Editor will open the file at the line specified. Go ahead, double click on the function name "Changeling". Note that the file opened at the comment preceding the function definition. It did so because we chose this setup option, otherwise it would have been opened at the function definition line. Now go back to the function list (press +). This time double click with your right (or center) mouse button on the function "Editor". The double mouse click with the right button will display a list of all references of the function in our source code. Please note that the format of the list of references includes the path, filename, and line number of the reference. Now you can double click on any one of the filenames with the left mouse button an immediately display the point of reference. Press + to return back to the reference list after each display. Let's go back to the "Call Tree Report". Press ,,<8>. Again you will note that the filename with line numbers are indicated for each function. The filename with the "*" is the location of the definition, the other filename identified the place where the function was invoked. Since the fully qualified file name is not given, the file must be in the current path in order to double click on each file name to display the source code. You can set the current directory by pressing + and selecting a directory path, and then press "Cancel". You can always double click on any function name in this call tree to display either the definition or the references of the function. Click on several function names and display the source code. (Remember, you can return to this display after each selection by pressing +.) Would you like to know where you have been? Select the "Tracks" menu item in "Ref" (or simply press ,,<6>). What you see are your "Tracks"; a list of items that represents the place in each file when you switched to another display. Its no surprise that the format of these tracks allows us to double click on any one of the lines to place ourselves back where we came from. Before we leave this reference section, please note that you can register your own favorite files in the place of A through H by simply selecting "Define Files Ahoy..." and completing the information in the dialog panel which will appear. Editing Files The SMART Editor contains many standard editing functions, along with a number of powerful, and a few unique features in both the "Edit" and "More" menus. We will only take a moment to highlight a few of these features. An edit event in The SMART Editor is defined as either a text insertion or text deletion. The object can be a character, a character string, or a file. The SMART Editor tracks your edit events (up to 254 for each file that you have opened.) You may undo or "redo an undo" for any one of the last edit events up until you last saved your file , or until the maximum number of undos was reached. To perform a single undo, press +; or select "Undo" under the "Edit" menu. If you decide that you want to "undo the undo" or redo the last undo, press +. If you want to run through a series of undos and redos, select "Undo/Redo Multiple..." from the "Edit" menu. A dialog panel will appear. With this panel you can see the number of operations that are available, and you can use the slider to perform multiple undos and redos. Brace Finding The "'C' Braces" functions provide you with three opportunities to help locate matching braces with "C" source code. Let try an example. 1. Open and display the file LINKFILE.C. (Press +, then select LINKFILE.C in the directory SMART\SAMPLES\SLINK). 2. Goto line "162" by pressing +, then enter 162 in the dialog panel which appears. Press "Ok" to complete this process. 3. Select a cursor position between the two braces at line 159 and 169 by simply mouse clicking on any text between these two lines. 4. To select the text bounded by the braces for the code surrounding the current cursor position; select "'C' Braces" under the "Edit" menu; then select "Braces", then "Select Braced Code" or just press +. 5. The braced code is now selected. Note very carefully that the cursor is now on the outside of the lower brace (and may be somewhat difficult to see blinking). 6. If you perform step (4) again, you will be selecting the next outer set of braces, since the cursor in now outside the inner brace set. Go ahead, select this braced text. (+). (Please note that brace finding is a relatively slow process to locate if the braces cover a great number of code lines). Clip File Functions The SMART Editor Clip File functions provide you with the tools to capture, save, and manipulate multiple paste buffers. Clip files are stored on disk and provide a nonvolatile means of storing small sections of source code. You can use the clip functions to create a library of source code snippets; saving your favorite pieces of code for quick reference. The "CLIP" menu lists an assortment of functions to cut, paste, and name clip files. Before you use a clip file function for the first time, you should make sure that the current clip filename is what you intend. When you install The SMART Editor, the clip file was named and placed in your TEMP directory. Naming the Clip File You can set the clip file name as follows: 1. Select "Rename Clip File..." from the "Clip" menu, or press ,,. 2. Enter the fully qualified name of your new clip file, or press the "Select" pushbutton to select an existing filename. 3. Press "Ok" to complete the transaction. You can rename the clip file at any time. You may wish to use a filename in the TEMP directory in order to use the clip file as a temporary buffer. The clip file can be useful as an interface between other applications that create paste files such as Microsoft's QuickHelp and the OS/2 Presentation Manager Help facility. All you will need to do is to coordinate the output paste filename of the application with the filename of The SMART Editor Clip File. More Functions The SMART Editor "More" functions consist of an assortment of tools. The following paragraphs will cover the use of several of the functions found on this menu. Sync Scroll "Sync Scroll" is a useful feature to provide you with the capability of easily comparing two files. After you split the display screen and open two files, you can lock their vertical scroll bars such that a movement in the designated master file will create an automatic movement in the other file. Let's watch this feature in action. 1. Select "More" then "Window Configuration" from the main menu bar. 2. Select on of the split screen formats. Choose the vertical split for this demonstration. (Fifth from the top in this menu). 3. Open the file LINK.C. 4. Open the file LINKFILE.C. 5. Both files should be present on your screen; side by side. 6. Now designate the "master" file by clicking on the text area. Let's use the left file as the master. 7. Select "Sync Scroll" from the "More" and "Window Control" menu. The two file displays are now locked together. When ever you change the display position in the master file (left) the other file (right) will move accordingly. Try , or move the elevator box within the scroll bar and watch the position movement. If you what to display the line number of any line, simple mouse down on the line and the line number will be shown in the status window. Please note that any movement in the master file effects a corresponding movement in the other file. The reverse is not true. If you wish to reposition the corresponding displays, you can move the other file independent of the master. With the focus on the right file (mouse down on the right file), press . Note that the master file was not repositioned. Before you leave this display, make sure that you have released the scroll synchronization. Select "Sync Scroll". If you forget to release this synchronization, you will continue to lock the two displays together throughout this session. Copying Files A number of powerful functions have been incorporated into The SMART Editor "Copy" Function.  You can select multiple files, even subdirectories to copy from.  The SMART Editor will automatically create the sub-directories during the copy process.  You will be notified when a floppy disk is full. Simply insert an empty floppy and the copy process will continue.  You can set time parameters for your copy. The date stamp on each file to copy is checked against your settings. Incremental transfers are easy.  You can choose to move your files and sub-directories to reorganize you hard disk.  You can even create new directories from this The SMART Editor function. To access the "Copy" function, simply select "Copy File(s)" under "More" or press +. The Copy dialog panel is separated into Source file specification and Destination file specification.  You can simply type a filename to copy "from" and a filename to copy "to", for a single file copy.  You can select a number of files from a directory and copy these files to a destination directory.  You can specify a file set with wildcards, and copy all files matching the wild card specifications to a destination directory.  You can specify that files in all sub-directories of the base directory be copied also. In this case equivalent sub-directories below the destination directory will be automatically created.  You can create a new directory by simply typing the directory name into the Copy "To" file entry box and pressing the "Mk Dir" pushbutton. This new directory will be a subdirectory of the path shown as "TO" "Dir:". Copy "C" Samples Let's create a temporary sub-directory and copy the sample files. 1. Select the "Copy File(s)" function from the "More" menu, or press +. 2. Select the drive and path for the "From" specification to be \SMART\SAMPLES\SLINK using the "From" directories list box. 3. Press the "*.C" pushbutton, since we are only interested in restoring the "C" files from the floppy. 4. Select the drive and path for the "To" directory specification to be \SMART\SAMPLES\SLINK. 5. Create a new sub-directory by typing "Copyfile" in the entry field labelled "TO File:". Next, press "Make Dir." to make this new directory. Notice that The SMART Editor automatically placed you in this directory, ready to complete the copy process. 6. Press the "Copy" pushbutton. As you can see there are many, many selection capabilities that can be chosen from this panel. This function is very powerful, and easy to use once you become acquainted with the controls. Deleting Files and Directories The file and directory delete functionality of The SMART Editor can make cleaning your hard drive and getting rid of unused files very easy. Essentially you can delete a single file or a selected group of files. You can delete with wildcard specification. You can even delete files in the base directory and its sub-directories. During this process, you may also remove the sub-directories and even the base directory itself. You can clean house with The SMART Editor. There are a number of verification checks along the way to help prevent you from deleting files that you wish to save. However, you still must R-E-A-D the notices and respond accordingly. Let's delete the "C" files in the SMART\SAMPLES\SLINK\COPYFILE directory that we just created. 1. Select "Delete File(s)" under "More", or press +. 2. Select \SMART\SAMPLES\SLINK\COPYFILE from the directories list box. 3. Check the checkbox labelled "Remove THIS Directory". This option will remove all files and remove the directory header. 4. When you are ready, press the "Delete" pushbutton. 5. You will be asked to verify this delete process; just in case you pressed "Delete" and changed your mind. Read these advisory panels very carefully, and response with the appropriate answer or response. 6. During the "Delete" process you will be advised of the files being deleted, and you can note the amount of drive space that is available as a result of removing the files. Spawn an external Process You can use the "Start" functions to spawn a compile or run an executable program, or command file. Let's simulate a compile and send the resulting error list back to The SMART Editor.  Select "Define Menu Item" under "Start".  "Press "Add".  Enter "SLStart Test" in "Menu Item Legend".  Enter "SLSTART.EXE" in "Enter Filename ...".  Type "\SMART\SAMPLES\SLINK\MAK.ERR" in arguments.  Uncheck "Command File". (SLSTART is an executable).  Press "Ok".  Press "Ok" at the "Command Menu Item" dialog panel. When you are ready to create a command file for compiling your programs, you will want to prepare a file that is similar to the following: CD C:\MYDIR NMAKE MYAPP.EXE > MAK.ERR SLSTART MAK.ERR Now you can register this command file under "Start" and assign an accelerator key for spawning your compile. Going back to our simple SlStart test, select "SLStart Test" as a menu item under "Start". SlStart will pass the "MAK.ERR" filename to The SMART Editor and you will see a "Files Waiting" notice on the main title bar of The SMART Editor. Press to open the file. Note that if the screen was blank and you were not in a The SMART Editor process, The SMART Editor would have automatically opened this file (Refer to the "Auto Open Waiting (if Free) option under the "Options" menu). Using Help The SMART Editor contains three help facilities: 1. The SMART Editor on-line help. 2. View help (provided with OS/2 1.3 and 2.0). 3. Help window. This feature will support an OS/2 window which you can install a number of other help systems including Microsoft QuickHelp. All three facilities are context sensitive. Without going into a great deal of detail at this time (These facilities are fully documented in the Chapter 7, "Getting Help"), let's use the View Help. 1. Select "Enter View Help..." from the "Help" main menu bar or simply press +. 2. Type a topic name such as "Copy". If you had clicked on a topic in a file display, the topic would automatically appear here. 3. Press "Lookup". Help for this topic will appear over your The SMART Editor application display. Press + to close this help session, or press + to minimize the help facility for future reference. 4. If The SMART Editor find more that one Help file with your specified topic, a list box will be displayed for your choice of files. If you would like detailed information regarding the three help facilities supported by The SMART Editor, go to Chapter 7, "Getting Help". Tour Complete This concludes the guided tour of The SMART Editor. The next chapter, Chapter 7 and 8, "How To ...", will provide you with advanced hints and tips in the use of The SMART Editor. Table of Contents ═══ 8. Chapter 5 - Using Help ═══ Chapter 5 - Using Help On-Line Help The SMART Editor supports three help facilities:  The The SMART Editor application on-line help.  ViewHelp - a general on-line help system supplied with the OS/2 operating system.  A general help window created as a child process of The SMART Editor. You may start Microsoft QuickHelp in this window, or you may start any other application which you wish to switch to with a hot-key sequence. This chapter explores the use of these three help facilities. The SMART Editor On-Line Help The The SMART Editor On-Line Help system provides detailed explanation for each menu item and dialog panel. The format and content of this help is similar to Chapter 8, "Functional Reference" of this technical manual. The The SMART Editor on-line help facility also contains reference to the errors returned from general input-output calls, REXX functions, and the S_Macros provided by The SMART Editor. You can access The SMART Editor Help using a number of methods.  You can select "General Help" from the main "Help" menu and browse through The SMART Editor help panels using the hyperlinked keywords. The structure of links is similar to the menu structure of The SMART Editor. The first selection panel contains the main menu items. You will be able to navigate through the help as you do the menu structure of The SMART Editor.  You can select the "Help Index" and select a help topic from the help index list box.  You can select the "Help Contents" and find your topic in this directory of topics.  You can select "Services" from the Help panel menu, then select "Search" from the "Services" menu to find a help topic.  You may directly find a help topic by highlighting a menu item and pressing .  If you want help on the main menu item; press and use the right or left arrow key to highlight the main menu item. Then press .  If you want help on a sub-menu item; press and the underscored letter of the main menu item that you desire. You may also mouse click on the main menu item. Next use the up or down arrow to highlight the sub-menu item that you wish to obtain help. Now press .  If you have a dialog panel displayed, you can obtain help for this panel by pressing . Please note that help for the pop-up message panels is not contained in the on-line help system, but is found in Appendix D, "Messages" in this technical manual. Access to the accelerator keys help panel is obtained by viewing the "Keys Help" item under the "Help Menu". "Help" Navigational Tips The help facility contains a number of useful features. A few of these features for the on-line help are listed below.  A help window can be copied to the paste buffer with the "Copy" function under the Help Window, "Services" menu.  A help window can be copied to the filename TEMP.TXT (in the current directory) with the "Copy to File" menu item, also under the Help Window, "Services" menu.  You can find a topic by using the "Search" function under the Help Window, "Services" menu.  Select "Previous" under the Help Window "Options" menu (or press ) to view the previous panel. If no previous panel exists, this command will close the Help Window.  You can size the Help Window as you desire for your viewing. Size the main The SMART Editor Help Window first, then size the individual Help panel accordingly. Unfortunately the operating system will not remember your sizing of this help window the next time the help window is opened. OS/2 View On-Line Help The View system and The SMART Editor On-Line help use a similar display format. The difference is that the View system uses help document files that are specified by you. They may represent any subject matter related to the operating system, a development subsystem, or help file supplied as part of another application product. Each of the help files for View have an extension of "INF" such as CMDREF.INF. You can direct The SMART Editor to search a specific help file or a set of help files for your desired topic. The ViewHelp facility is context sensitive, within The SMART Editor. When you mouse down on a text string in any displayed file, the word under the cursor will be parsed and placed in The SMART Editor search buffer. This string is passed to the View document as the topic for help. There are several different means to direct View to the desired document files.  You can specify the topic in the entry box of the dialog panel associated with the "Enter View Help" menu item under the main "Help" menu.  You have the choice of using the automatic lookup feature of The SMART Editor, or directly specifying an .INF file to be searched for the desired topic.  If you want to browse around in a Help file, without regard to an opening topic, you can select the file to open and press "Open .INF". This is a good way to start to explore a new subject like "REXX". The SMART Editor supplies a set of help indexing files with an extension of .NDX stored in the installation directory \SLINK2\HELPINDX. These files have been specifically prepared from each of the OS/2 system, and development help files (.INF) supplied with the OS/2 operating system and the C-SET/2 Development Toolkits. You will also note that indexing files have also been supplied for the IBM OS/2 1.3 Development Toolkit Help files. These are provided since many developers are porting products from OS/2 1.3 to OS/2 2.0 and need to access both toolkit help files. The index files are in text format and are named to correspond with the .INF counter part. The format for these indices should be apparent when you look at the file. You can modify the .NDX index files and even create your own index file for an application that does not have this index or for an .INF file that you have created. Essentially the .NDX file is used as a lookup table to relate the desired help topic to a specific .INF file. Once The SMART Editor knows the .INF filename, ViewDoc can be invoked to present help using this topic and filename. Help Window The The SMART Editor Help window is a semi-general purpose OS/2 window that you may start any application that you wish to switch to with the accelerator key sequence +. When this window is started, a dialog panel will be displayed which will allow you to set the startup parameters. When the window is initially started The SMART Editor search buffer contents will be passed to the help program as part of the startup arguments. This window will specifically work with the Miscrosoft QuickHelp help system. You may also use it for the SourceLine calculator SourceCalc. Essentially this window is started as a child window of The SMART Editor and will automatically be closed when you close The SMART Editor. When you are using Microsoft Quickhelp you will find that this help system is not context sensitive using graphical screens. Each time you press + to switch to the QuickHelp window, you will need to press (search) and type the help topic or close this window between uses. There are a number of very useful features available with QuickHelp.  Text in the QuickHelp window can be copied to the OS/2 paste buffer for your use in a The SMART Editor edit session with the menu items "Mark" and "Copy" under the QuickHelp window system menu (the bar icon in the upper left corner).  You may copy the Quickhelp text or example to a paste file of your choice. If you coordinate the naming of the QuickHelp paste file and The SMART Editor Clip file, you will have an immediate interface between these two programs.  The startup parameters for Quickhelp are described in detail in the QuickHelp help topic "QuickHelp Options". You may want to read the QuickHelp help documentation and determine the best startup parameters for your use of this product.  One useful option is set as the default for the startup of QuickHelp by The SMART Editor. This is the "-rb" parameter. This parameter will allow you to view the previous QuickHelp panel by pressing the right mouse button (button 2). You can switch between this help window and The SMART Editor by the accelerator key sets + and +. Using any one or all three of the help facilities described in this chapter will provide you with an enormous amount of on-line help and useful information. Clip Help into Your Source Code In addition to looking up information in these help files, one important feature is to clip information directly from the help file for insertion into your source code. This can accomplished in several keystrokes. To clip help from the IBM View facility, select "Services" and "Copy". The complete current help panel will be copied to the paste buffer. At this point you have the option of inserting the full paste buffer into your source code at the current cursor postion or working with the clip file as an intermediate working file. To insert the paste buffer into the current file displayed in The SMART Editor press or +. To use the clip file as an intermediate work file, select "Paste to Clip File" under the "Clip" menu, or press +. You then have the opportunity to select the specific text to be inserted into your source code using the standard editing functions of The SMART Editor. Press ,,<4> ("Clip File" under the "Ref" menu) to display the inserted help text in the Clip File. You may also find a number of other methods that suit you best to extract help text for your source code. Free up your Bookshelves As you learn to navigate the on-line help facilities available from The SMART Editor you will find a wealth of quickly accessed information at your fingertips. You may find yourself relying less on printed material in your develop processes and seek on-line help first. Table of Contents ═══ 9. Chapter 6 - Utility Programs ═══ Utility Programs and Interfaces SLStart Utility SLBuild Utility IBM WorkFrame/2 Interface Rexx Interface Table of Contents ═══ 9.1. SLStart Utility ═══ SLStart Utility The SLStart program performs an important function with The SMART Editor and represents a different perspective for working with an application like The SMART Editor. The SMART Editor is indeed a large program. The last thing you probably want to do is close and reopen The SMART Editor many times during your computer session. You don't have to do this. Many users start-up a instance or two of The SMART Editor when they boot OS/2 and keep these sessions running throughout their work day. SLStart provides a method to pass filenames to The SMART Editor from other processes during the course of your programming session. Say, for instance, you wish to spawn a compile and have the error list passed back to The SMART Editor at the end of the compile. All of this, while you continue to work on your project. Easily done. Simply add a line in the command file that started your NMAKE for the project: SLSTART ERROR.LST Any argument following the executable name will be passed to The SMART Editor for display. The argument /F will force The SMART Editor to open the file specified in the call regardless of what The SMART Editor option are set regarding opening waiting files or what process state The SMART Editor may be in. In addition to the filename you may append the line number and even a read-only flag to specify how the file is to be opened. The format for line-number and read-only is: SLSTART C:\MYAPP\MYFILE.C(123)R SLStart works like this. When you start this tiny program, SLStart looks for an existing session of The SMART Editor and through a DDE session passes the input arguments directly to The SMART Editor. It's just as if you had started The SMART Editor with the arguments directly, except a whole lot faster. Once the arguments are passed, SLStart promptly closes itself. When you double click on a filename in the WorkFrame/2, SLStart passes this name to The SMART Editor. This is why you need to configure the WorkFrame with SLStart as the editor and NOT The SMART Editor. You certainly don't need to start another instance of The SMART Editor just to display this new file. Of course, if SLStart does not find an instance of The SMART Editor running, it will start one. There are some factors which affect the relationship between SLStart and The SMART Editor.  The options in the "Options" menu of The SMART Editor affect this relationship.  If "Ignore SLStart" is checked, this instance of The SMART Editor will not respond to request by SLStart. This is useful if you have several instances of The SMART Editor running on your desktop, and wish to insure that a specific instance receive files from SLStart.  "Disable Project ID" relates to multiple instance of The SMART Editor, each defined with their own identification. If an instance of The SMART Editor is started with a Project ID, it will only receive filenames from an SLStart send a corresponding ID. A project identified The SMART Editor is started with an argument /P:xxx, where xxx is the project ID.  SLStart must contain a similar argument in order to communicate with a specific project. You can refer to "Store The SMART Editor INI File" under "Options" in Chapter 8, "Functional Reference" (page 8-201).  You can automatically open files sent from SLStart by checking "Auto Open Waiting (if Free)" under the "Options" Menu. Free means having a blank screen showing, and not being in another The SMART Editor Process (eg. "Copy Files"). SLStart is very effective in spawning a compile or MAKE and sending the results back to The SMART Editor. Start by creating a process command file with your requirements for the MAKE: C: CD MYDIR NMAKE MYAP.EXE > MAK.ERR SLSTART.EXE MAK.ERR You can register this command file under the menu "Start" for quick access. After the make is complete the results (directed to MAK.ERR) will be sent to The SMART Editor through SLStart for display. Once you display the compile error list, you can hyperlink directly to the source of the error by double clicking on the filename/line number as displayed in the error list. The SMART Editor "understands" a number of compiler error formats.  path/filename(line:column) - IBM C-Set++ Compile error list  path/filename(line) : - Microsoft, Watcom  path/filename line column : - Various Greps  path/filename line : - Borland  path/filename : line - MKS GREP If the filename is not fully qualified with the path, you will need to change The SMART Editor current directory to that of the source file. You can do this in a number of ways. Double click on the path if standing free, or select the path from a text string and press +. You can also use a REXX Macro provide a list of paths for selection. You may wish to use an argument in you compile string to qualify the filename as follows: icc /Sm ... /c $(SRCPATH)\filename.c Note that the example above uses a symbol for the source path. This symbol must be previously defined in the make file as in the following example: SRCPATH = c:\slink2\sample You will find many uses for SLStart in directing files to The SMART Editor. If you work using the OS/2 Command Line, you can send a file to The SMART Editor by simply typing SLStart [filename]. SLStart will append the current directory of your command line and append the filename for The SMART Editor to open. Chapter 6 - Utility Programs and Interfaces Table of Contents ═══ 9.2. SLBuild Utility ═══ SLBuild Utility SlBuild is a convenience utility for building, updating, and generating reports with your Link Data Base. This utility can be run from the command line. A log file is used to output all messages and progress information for this process. Essentially SLBuild performs all of the functions that are available in the Link build process, except the control is from the arguments supplied to this utility or from a response file prepared by you before running the utility. The one additional function performed by this utility is to provide you with a file listing all of the #if Defines in your source code. This function is requested with the argument "/S=xxx,yyy" (where xxx and yyy are the path of the existing database and the filename of the output list. Due to the large number of input items, the details of the argument list must be carefully understood and prepared. This list can be displayed on your screen with the argument "/H". Specification of the response file is with the argument "/C=xxx". The arguments for SLBuild are listed below: SLBUILD arg arg arg arg... Where arg = /B=xxxx (Build new database.) xxxx = Path and filename for 'List of Files'. /O=x...x (Build Options (required with /B)): D = #Defines. G = Globals. S = User Specified. B = Dialog Templates. Example: /O=G,S /U=xxxx (Update existing database.) xxxx = Database Path. /P=xxxx (Build or Update with Preprocessor defines.) xxxx = Path and filename for define list. /S=dbdb,llll (Scan for Preprocessor variables and create list.) dbdb = Path of existing Database. llll = Path and filename for define list output. /R=I...C:xxxx (Create database reports (with /B or /U only)): I = Conditional create (if Db changes or Report does not exist). F = Functions Definition report. M = Module/Functions Definition report. C:xxxx = Function Call Tree report. xxxx (Following 'C:' specifies root function of call tree. U = Unreferenced functions. D = #Defines. G = Globals. S = User Specified. B = Dialog Templates. /L=xxxx (Specify the process Log File.) xxxx = Path and filename for Log File. Default: SLBUILD.LOG in path for SLINK2 /X=xxxx (User Specified Link List.) xxxx = Path and filename for User list. /C=xxxx (Command Response file. One line per parameter) xxxx = Path and filename for Response File. Example: /B=J:\MYDATA\LINK.LST. /X=J:\MYDATA\USER.LST. /D Notify The SMART Editor to point to this database after creation. /H (Display this help screen. Ignore other Arguments.) Chapter 6 - Utility Programs and Interfaces Table of Contents ═══ 9.3. IBM WorkFrame/2 ═══ IBM WorkFrame/2 The SMART Editor is fully compatible with the WorkFrame. The following paragraphs explain the compatibility features. Be sure and configure The SMART Editor using SLStart.EXE as the "Editor" filename in the WorkFrame/2. You can invoke The SMART Editor to open files from the WorkFrame in several different ways.  In any WorkFrame Panel that has files listed, you call select the desired files to open and press "Process", or double click on the filename.  You can also drag the filenames and release them over The SMART Editor. Press the left mouse button down on the files to drag and drop. Now while holding the left mouse button open, press the right (or center for 3 button mouse) button down to start the dragging operation.  When you drag the files over The SMART Editor you can release the mouse buttons and The SMART Editor will "catch" the files.  You will see "Files Waiting" on The SMART Editor titlebar (unless the files are automatically opened). Press to open the files.  You can also drag files from the WorkFrame/2 Project file list directly into the listbox for building a List-of-Files.  Process Compile Errors with the WorkFrame/2  You can use the WorkFrame/2 to spawn a MAKE or compile and interactively process the resulting compile errors. First make sure that you have the "Send Errors" switch set in configuration of the WorkFrame for The SMART Editor. Likewise insure that you have you have checked the "Enable WorkFrame/2 Errors" option in the "Options" menu of The SMART Editor. At the conclusion of the MAKE or compile, you can send the resulting errors to The SMART Editor by simply double clicking on the error of your choice. The SMART Editor will request all errors in the same source file from the WorkFrame and prepare a listbox to work the errors. If your The SMART Editor screen is blank, and the "Auto Open Waiting" option was set, the Errors session will begin automatically. Otherwise you need to press to open the source file in error and start the errors processing. Refer to the "Errors List Dialog Panel" topic in Chapter 8, Functional Reference (page 8-208) for detailing in processing through these errors. You can switch back to the WorkFrame/2 to select another sourcefile in error, or close the errors session. Chapter 6 - Utility Programs and Interfaces Table of Contents ═══ 9.4. Rexx Interface ═══ Rexx Interface The SMART Editor has a full interface to the IBM REXX Macro Language. It is not our purpose in this manual to explain the REXX language, other than to make reference to this powerful Macro Language. The details and syntax of the language can be found in many reference documents including the REXX manuals which can be obtained through IBM. There are a number of good books which you might also find at your local technical bookstore to help you program in REXX. A good starting point for the REXX language is through the Help file REXX.INF. Just press + and select the file REXX.INF. Press "Open INF" to start with the table of contents for this help file. Several REXX Macros have been supplied to you in the installation of The SMART Editor. They can be found in the directory \SLINK2\MACROS. In additional to knowing the syntax of REXX you need to be familiar with The SMART Editor interface to REXX. Please refer to the section starting with "Macro Menu" in the on-line help. The SMART Editor contains many function calls built into the Rexx Interface to provide access to The SMART Editor functionality from within your macro file. Chapter 6 - Utility Programs and Interfaces Table of Contents ═══ 10. Chapter 7 - How To... ═══ How To... Perform Functions This chapter will provide you with the recipes for performing many of the powerful features that are available in The SMART Editor. Additional information regarding The SMART Editor Editor features is found in other chapters of this manual including Chapter 4, "Getting Started - A Guided Tutorial", Chapter 6 "Using Help", Chapter 7 "Utilities". The SMART Editor on-line help provides a detailed explanation for each menu item and dialog panel. The topics in this chapter are organized into functional groups. A quick reference for these topics is provided below. Multi-File Functions String Replacements Create a List-of-Files Use Search for Changes Copy Files Delete Files Find Files Edit Functions Walk Braces Walk Parens Change Case Change Edit Mode Refresh a Display Select Text Re-Align Code Use Auto Indent Use Word Wrap Enter Special Characters Use Undo-Redo Setup Functions Setup Options Choose Fonts Choose Colors Database Functions Create a Link Database Set If Defines Point to a new Database Indremental Update Create User Links Clip Functions Use Clip Files Create a Clip Library Clip View Help Clip Windows QuickHelp Multi-Window Functions Display a File in Two Windows Create a Compile Window Lock Scroll Two Windows Directory Functions Create Private Directories Create General Directories Delete Directories Macro Functions Use 'C' Templates Define User Macro Files Direct Macro Output to a File Direct Macro Output to a Window Single Step a Rexx Macro File Save and Restore Environment Functions Use Tracks Use Shutdown and Startup Macros Run Command Functions Popup an OS/2 Command Window Define User Command Files Register a Command Set Assign Alternate Command Processor Interface with Other Applications Use Drag and Drop Process WorkFrame/2 Errors Disable File Passing Notification of Files Restore Application Auto-Open a File Other Functions Print a File Define User Reference Files Incremental Backup to Diskette Snapshots Set Selection parameters Use Hyperlinks Use HyperTracks Startup Arguments Table of Contents ═══ 10.1. String Replacements ═══ Perform Multi-File/Multi-String Replacement This is powerful feature for making sweeping changes across your source files. You can make multiple string replacements in multiple files. You can verify each replacement, or verify each file, or make the replacements without verification. First Define Files to be Updated First create a "List of Files" file, specifying all of the files that you wish to change. Use the "Maintain a List of Files..." menu selection under the "Link" menu. (See how to "Create a List of Files", page 5-7) Then Define Search and Replace Text The next step is to create a text file containing pairs of text strings. Each replace string set contains 2 lines: a line containing the string to be searched, followed by a line containing the replace string. Each line is terminated by a carriage return. WinMessageBox DisplayMessage LinkStruct LinkStructure Perform Replacements  Select "Multi-file/String Replace..." from the "More" menu.  Select "Ok" to the advisory message box that appears.  Press "Select Files" in the Multi-Files Multi-Strings Replacement dialog panel.  Select the "List of Files" file you created.  Press the "Select Replacements" in the Multi-Files Multi-Strings Replacement dialog panel.  Select the file of text strings you created.  Press "Ok" to start the replacement process.  Answer "Yes" to the request for verification of strings and files.  Answer "Yes" and "Ok" to all of the subsequent panels throughout this replacement process (press ). You can turn verification off during the process by selecting the push-button "Verify Off" when shown, or answering the verification message boxes with a "No". Chapter 7 - How To... Table of Contents ═══ 10.2. Create a List-of-Files ═══ Create a List-of-Files The SMART Editor uses a List-of-Files file for defining a link database and for the multi-file search and replace. You can also use the List-of-Files to define files that are copied on a regular basis. The "Maintain a List of Files" function under the "Link" menu enables you to build the List-of-Files. Define the Filename for the List-of-Files  Select "Maintain a List of Files" from the "Link" menu.  Select the filename of the file to contain the List-of-Files from the "Select File for List-of-Files" dialog-box. Define the Files Contained in the List-of-Files  Select "Add" from the "Files List" dialog panel to define the contents of the List-of-Files file.  Select the filenames of all of the files to be added from the "Add Files to List" dialog panel. You can add files from multiple directories.  Select "Add" from the "Add Files to List" dialog panel to copy the selected filenames to the List-of-Files file.  Select "Return" from the "Add Files to List" dialog panel when you are finished adding files.  Select "Store" from the "Files List" dialog panel to save the contents of the list-of-files file. Chapter 7 - How To... Table of Contents ═══ 10.3. Use Search for Changes ═══ Use Search and Multiple Windows for making Code Changes This is a powerful feature for finding all occurrences of a text string and making changes across your source files. This is accomplished through the "Search" menu function and hyperlinking to each source. Search For All Occurrences of a String  Select "Multi-File String Search" from the 'More' menu.  Enter the desired search string in the "Enter Search String" data entry box in the Multi-File String Search and Retrieve dialog panel. You can check the "Case Sensitive" checkbox to specify a case sensitive search.  Insure that the "Search List of Files" is unchecked.  Select the desired directory in the "Base Directory" in the Multi-File String Search and Retrieve dialog panel. You can check the "Search Sub Dirs" checkbox to look in the base directory and all sub-directories.  Select the files to be searched. You can specify a predefined template such as *.*, *.C, and *.H, or your own template, or you can specify a specific filename.  Select "OK" in the Multi-File String Search and Retrieve dialog panel to execute the search.  The results will be placed in the file L##Srch.Lst file which resides in the SL_TEMP2 directory as defined in CONFIG.SYS; ## identifies the instance of The SMART Editor for whom the list was generated. It is easily accessed from the "String Search List" in the "Ref" menu. The SMART Editor will automatically open the file in read-only mode and display it in the current window. View the Source Code Containing the Matched Strings  Double click on the filename of an occurrence of the matched string within the LnnSrch.Lst file. The SMART Editor will automatically open the corresponding source file and you will be positioned with the cursor on the matched string.  Make any desired changes to the source.  To return to the L##Srch.Lst file, select "Last File" from the "File Buffers" entry under the "More" menu, or press +, or press the left mouse button and while holding it down press the right mouse button then release both buttons. The SMART Editor will display the L##Srch.Lst file.  Repeat this process to look at the remaining matches. Chapter 7 - How To... Table of Contents ═══ 10.4. Copy Files ═══ Copy Files A number of powerful functions have been incorporated into The SMART Editor Editor "Copy" Function. You can select multiple files and subdirectories to copy from. The SMART Editor will automatically create the subdirectories during the copy process. You will be notified when a floppy disk is full. Simply insert an empty floppy and the copy process will continue. Access the Copy Function  Select "Copy Files..." from the "More" menu or press +. Define the Source (Copy From)  Select the source directory containing the files to be copied.  You can select a single file to copy.  You can select a wildcard of files to copy.  You can specify that subdirectories are to be included. Select the "Include All Sub-Dirs" checkbox in the Copy/Move Files dialog panel.  You can specify that the source files are contained in a list-of-files file. Select the "'From' is a List" checkbox in the Copy/Move Files dialog panel. You must first create the list-of-files. See "How to Create The SMART Editor Editor List-of-files", page 5-7. Define the Destination (Copy To)  You must select the destination directory to contain the files to be copied.  You can create a destination directory. See "How to Create Directories", page 5-38. Define the Verification Level Desired  Select "Verify - Overwrite" in the Copy/Move Files dialog panel to be notified whenever a destination file is going to be overwritten.  Select "Verify Sub-Dir" in the Copy/Move Files dialog panel to selectively copy and verify subdirectories. Define File Parameters  See "How to Set Selection Parameters (time/date/attributes)", page 5-56. Activate the Copy Process  Select "Copy" in the Copy/Move Files dialog panel to copy the defined source files to the defined destination.  Select "Move" in the "Copy/Move Files" dialog panel to move the defined source files to the defined destination. Chapter 7 - How To... Table of Contents ═══ 10.5. Delete Files ═══ Delete Files The file and directory delete functionality of The SMART Editor can make cleaning up your hard drive and getting rid of unused files very easy. Essentially you can delete a single file or a selected group of files. You can delete with wildcard specification. You can even delete files in the base directory and its sub-directories. During this process, you may also remove the sub-directories and even the base directory itself. You can clean house with The SMART Editor. Access the Delete Function  Select "Delete Files"from the "More" menu or press +. Delete Files  You must select the directory containing the files to be deleted.  You can select a single file to delete.  You can select a wildcard of files to delete.  Select the "Delete All Files Displayed" in the Delete Files/Directories dialog panel to specify that all files in the current directory are to be deleted.  Select "Delete Sub-Dir Files" in the Delete Files/Directories dialog panel to specify that files in subdirectories are to be deleted. Delete Directories  See "How to Delete Directories", page 5-39. Define the Verification Level Desired  Select "Verify Each File Delete" in the Delete Files/Directories dialog panel to be prompted to each file delete.  Select "Verify Sub-Dir" in the Delete Files/Directories dialog panel to selectively delete subdirectories. Activate the Delete Process  Select "Delete" in the "Delete Files/Directories dialog panel to delete the defined files and directories. Chapter 7 - How To... Table of Contents ═══ 10.6. Find Files ═══ Find Files The The SMART Editor "Find" file function provides you with a direct approach in locating and browsing files. You can specify to search multiple drives. You can specify wildcards within filenames. You can qualify the search starting at a specific directory. You can specify time stamp parameters to extract files within a given time frame. Access the Find Function  Select "Find Files..." from the "More" menu or press +. Define the Directories  You must select the base directory. You can select "Root is Base Directory" from the Find File dialog panel to start the search at the root directory. If this is not selected, the current directory is the base directory.  Select "Search Sub-Dirs" from the Find File dialog panel to include all subdirectories in the search. Define the Files  You can enter a specific filename.  You can enter a wildcard for filenames. Define File Parameters  See "How to Set Selection Parameters (time/date/attributes)", page 5-56. Activate the Find Process  Select "Multi-Drive/Dir" in the Find Files dialog panel to have all of the files found on multiple drives included in the same listing.  Select "Find First Only" in the Find Files dialog panel to stop the search after the first match is found.  Select "Find" in the Find Files dialog panel to search for the predefined files.  The results will be placed in L##Find.Lst file which resides in the SL_TEMP2 directory as defined in CONFIG.SYS; ## identifies the instance of The SMART Editor for whom the list was generated. It is easily accessed from the "Find Files List" in the "Ref" menu. The SMART Editor will automatically open the file in read-only mode and display it in the current window. Chapter 7 - How To... Table of Contents ═══ 10.7. Walk Braces ═══ Walk Braces in Source Code The SMART Editor provides you with three functions to help locate matching braces within a "C" source program. You can walk the beginning braces, walk the ending braces, or highlight successive levels of braced code. This is accomplished from the braces functions under the "Braces" entry under the "Edit" menu. Open the File  Select "Open/New..." from the "File" menu or press +.  Select the name of the "C" source file. The SMART Editor will open and display the file. Walk Beginning Braces  When you are positioned within a nested set of braces, it is often desirable to locate beginning braces.  To find the innermost beginning brace, select "Find Beginning Brace" from the "Braces" entry under the "Edit" menu. The SMART Editor will position the cursor on the first left brace it finds when searching the file backwards.  To find the next level left brace, you must move the cursor left one position so the cursor is outside the brace. Then select "Find Beginning Brace" from the "Braces" entry under the "Edit" menu. The SMART Editor will position the cursor on the next left brace it finds. You can repeat this process to walk the beginning braces contained in your file. Walk Ending Braces  When you are positioned within a nested set of braces, it is often desirable to locate ending braces.  To find the innermost ending brace, select "Find Ending Brace" from the "Braces" entry under the "Edit" menu or press +. The SMART Editor will position the cursor on the first right brace it finds when searching the file.  To find the next level right brace, you must select "Find Ending Brace" from the "Braces" entry under the "Edit" menu or press + again. The SMART Editor will position the cursor on the next right brace it finds. You can repeat this process to walk the ending braces contained in your file. Select Braced Code  When you are positioned within a nested set of braces, you may select all the code contained within the braces.  To select the text bounded by the braces surrounding the current cursor position, select "Select Braced Code" from the "Braces" entry under the "Edit" menu or press +. The SMART Editor will select the braced code.  To select the next outer set of braced code, you must select "Select Braced Code" from the "Braces" entry under the "Edit" menu or press + again.  (Please note that brace finding is a slow process and may take a while if the braces span a large number of lines). Chapter 7 - How To... Table of Contents ═══ 10.8. Walk Parens ═══ Walk Parens in Source Code The SMART Editor provides you with three functions to help locate matching parens within a "C" source program. You can walk the opening parens, walk the closing parens, or highlight successive levels of parenthesis code. This is accomplished from the parens functions under the "Parens" entry under the "Edit" menu. Open the File  Select "Open/New..." from the "File" menu or press +.  Select the name of the "C" source file. The SMART Editor will open and display the file. Walk Beginning Parens  When you are positioned within a nested set of parens, it is often desirable to locate opening parens.  To find the innermost opening parens, select "Find Beginning Parens" from the "Parens" entry under the "Edit" menu. The SMART Editor will position the cursor on the first opening it finds when searching the file backwards.  To find the next level opening parens, you must move the cursor left one position so the cursor is outside the paren. Then select "Find Beginning Paren" from the "Parens" entry under the "Edit" menu again. The SMART Editor will position the cursor on the next opening parens it finds. You can repeat this process to walk the opening parens contained in your file. Walk Ending Parens  When you are positioned within a nested set of parens, it is often desirable to locate closing parens.  To find the innermost closing parens, select "Find Ending Paren" from the "Parens" entry under the "Edit" menu. The SMART Editor will position the cursor on the first closing paren it finds when searching the file.  To find the next level closing paren, you must select "Find Ending Paren" from the "Parens" entry under the "Edit" menu again. The SMART Editor will position the cursor on the next closing paren it finds. You can repeat this process to walk the closing parens contained in your file. Select Parened Code  When you are positioned within a nested set of parens, you may select all the code contained within the parens.  To select the text within the parens surrounding the current cursor position, select "Select Parened Code" from the "Parens" entry under the "Edit" menu.  To select the next outer set of parened code, select "Select Parened Code" from the "Parens" entry under the "Edit" menu. Chapter 7 - How To... Table of Contents ═══ 10.9. Change Case ═══ Change the Case of Selected Text The SMART Editor provides you with four functions to change the case of selected text. You can change to all upper case, change to all lower case, reverse the case, or make each word start with upper case followed by lower case. This is accomplished from the "Edit" menu "Cases" functions. Open the File  Select "Open/New..." from the "File" menu or press +.  Select the name of the source file. The SMART Editor will open and display the file. Change to Upper Case  Select the text you want to change.  Select "To Upper Case" from the "Cases" entry under the "Edit" menu. Change to Lower Case  Select the text you want to change.  Select "To Lower Case" from the "Cases" entry under the "Edit" menu. Change to First Upper  Select the text you want to change.  Select "First Upper" from the "Cases" entry in the "Edit" menu. Reverse the Case  Select the text you want to change.  Select "Reverse Case" in "Cases" entry, "Edit" menu. Chapter 7 - How To... Table of Contents ═══ 10.10. Change Edit Mode ═══ Change the File Edit Mode Change the File Edit Mode A The SMART Editor file can exist in edit mode, which permits updates, or read-only mode. When a file is opened, it is opened in the default file mode specified in The SMART Editor Editor setup options. This can be overridden. You can also specify a different color for each file mode; for example, blue for edit mode files and cyan for read-only files. Set Default File Mode  Select "Setup Options..." from the "Options" menu or press +.  If you want The SMART Editor files to be opened in Read-only mode, select the "Default Open - Read-only Mode" checkbox. If this box is checked, the file will be opened in read-only mode. Set Default File Mode Color  Select "Set Screen Colors..." from the "Options" menu.  Select the desired Read-only mode foreground and background colors, press "Save", then Select "Default Read-only Screen" to set the default read-only mode colors.  Select the desired Edit mode foreground and background colors, press "Save", then Select "Default Edit Screen" to set the default read-only mode colors.  Press "Return" when you have completed your color selections and saved the desired color combinations. Open The SMART Editor File in Non-default File Mode  Select "Open/New..." from the "File" menu or press +.  Select the name of The SMART Editor Editor file you want to open.  The "Open File - Read Only" checkbox in the File Open/New dialog panel will reflect the default file mode; if the default is Read-only, the checkbox will be checked. Change the File Mode of an Opened The SMART Editor File  You can change the file mode of a file after it is opened by selecting "Change File Edit Mode" from the "Edit" menu or by pressing +.  If you are in edit mode and the file has been changed, The SMART Editor will prompt you to save the file before changing the mode to read-only. Chapter 7 - How To... Table of Contents ═══ 10.11. Refresh a Display ═══ Refresh a File Display The SMART Editor allows you to refresh The SMART Editor current file. A fresh copy of the file will be read into The SMART Editor Editor buffer. If the file has been changed, it can not be refreshed. The SMART Editor files are automatically refreshed whenever a file is sent to The SMART Editor via SLStart unless the file has been changed. Refresh the Current The SMART Editor File  Select "Refresh" from the "File" menu.  The file is read into the current buffer. Automatically Refresh an Opened The SMART Editor File  From an external process or command, enter "SLStart" followed by the name of the file to be automatically opened.  If the specified file is in the current open buffer list, it will be replaced. If the file is not in the current open buffer list, it will be opened. Chapter 7 - How To... Table of Contents ═══ 10.12. Select Text ═══ Select Text Without the Use of a Mouse You have all of the functionality of The SMART Editor at your fingertips through the use of the keyboard as well as the mouse. Text Selection  Select a character by pressing + or +.  Select a word by pressing ++ or ++.  Select a page by pressing + or +.  Select a line by pressing + or + or +. String Selection  Select a string for Search or Linking by pressing . Code Selection  Select braces within a 'C' program by pressing +. Chapter 7 - How To... Table of Contents ═══ 10.13. Re-Align Code ═══ Left Justify Source Code (Re-Align your Code) The SMART Editor provides you with the ability to align your code. By using the "Left Justify" functionality from the "Edit" menu, you can left align your source code. Simply position the cursor at the position on the line where you want the text to begin and select "Left Justify Line at Cursor" from the "Edit" menu or press . Repeat this process for each line you want to justify. Please note that the cursor cannot be positioned to the right of the end-of-line. To "Left Justify" a short line to the far left, you will need to insert tabs or spaces to lengthen the line first. Chapter 7 - How To... Table of Contents ═══ 10.14. Use Auto-Indent ═══ Use Auto-Indent The SMART Editor provides you with the ability to align your code as you type. By enabling the "Auto Indent" function from the "Setup Options" dialog panel on the "Options" menu, you can auto indent your source code. This causes the cursor to be positioned below the leftmost position of the previous line whenever you press at the end of a line.  Select "Setup Options..." from the "Options" menu or press +.  Enable the "Auto Indent" toggle on The SMART Editor Editor Options dialog panel. If the "Auto Indent" checkbox is checked, it is active.  Select "OK" on the "The SMART Editor Options" dialog panel. Chapter 7 - How To... Table of Contents ═══ 10.15. Use Word Wrap ═══ Use Word Wrap The SMART Editor provides you with the ability to word wrap. This causes all characters extending beyond the right edge of the screen to be continued on the next display line. Set Default Word Wrap Mode  Select "Setup Options..." from the "Options" menu or press +.  If you want The SMART Editor files to be opened in Word Wrap mode, select the "Word Wrap" checkbox. If this box is checked, the file will be opened in word wrap mode.  Move the slider to the left or press the left arrow to perform multiple undos.  Move the slider to the right or press the right arrow to perform multiple redos. Chapter 7 - How To... Table of Contents ═══ 10.16. Enter Special Characters ═══ Entering Non-Keyboard ASCII characters The The SMART Editor editor allows you to enter non-keyboard ASCII characters by entering the key + the numeric value of the ASCII character from the keypad. For example, +"007" is the bell character. +"9" is the tab character. Chapter 7 - How To... Table of Contents ═══ 10.17. Use Undo-Redo ═══ Use Undo-Redo An edit event in The SMART Editor is defined as either a text insertion or text deletion. The object can be a character, a character string, or a file. The SMART Editor tracks your edit events (up to 255 for each file that you have opened.) You may undo or redo an undo for any of the last edit events until you save your file, or until the maximum number of undos is reached. Set Default Number of Undo-Redo Edit Events  Select "Setup Options..." from the "Options" menu or press +.  Enter the number of undo-redo edit events per The SMART Editor edit mode file to be saved in the "Max Undo\Redos" data entry box in The SMART Editor Setup Options dialog panel.  Select "OK" on The SMART Editor Options dialog panel. Perform a Single Undo  To undo the last edit event, select "Undo" from the "Undo/Redo" entry under the "Edit" Menu or press +. Perform a Single Redo  To restore the last undo edit event, select "Redo" from the "Undo/Redo" entry under "Edit" Menu or press +. Perform Multiple Undo\Redo Events  Select "Undo/Redo Multiple..." from the "Undo/Redo" entry under "Edit" menu. An Undo\Redo dialog panel will appear. With this panel you can see how many operations are available, and you can use the slider to perform multiple Undos and Redos.  Select "Undo" to perform a single undo.  Select "Redo" to perform a single redo.  Move the slider to the left or press the left arrow to perform multiple undos.  Move the slider to the right or press the right arrow to perform multiple redos. After you undo an edit event, you will have a corresponding redo available until you enter a new edit event. Chapter 7 - How To... Table of Contents ═══ 10.18. Setup Options ═══ The SMART Editor Setup Options The SMART Editor Setup Options You can define setup options which customizes The SMART Editor for your environment. For example, if you have limited memory available to your system, you can reduce the number of opened files and undo-redo events saved. Set The SMART Editor Options  Select "Setup Options" from the "Options" menu or press +. Customize The SMART Editor Execution  You can control the number of opened files by entering the number in the "Max Opened Files" data entry box in The SMART Editor Editor Options dialog panel.  You can disable the creation of backup files when opening a file for editing. The SMART Editor automatically creates a backup of your file whenever it is opened in edit mode. To disable file backups, select "Disable Edit File Backups" in The SMART Editor Editor Options dialog panel.  You can control the maximum number of edit events per The SMART Editor file prior to taking a snapshot, or disable snapshots entirely. (See "How To Create and Restore Snapshots", page 5-55.)  You can control the number of undo/redo events to be saved per The SMART Editor file. (See "How To Use Undo-Redo", page 5-21.)  You can control the amount of memory available to The SMART Editor for building and updating your Link database.  You can control the default directory for The SMART Editor functions. If you select "Directory Tracking" in the "The SMART Editor Options" dialog panel, the current directory is maintained between functions. Customize File Access  You can specify the number of spaces allocated to the tab character by entering the number in the "Tab Spacing" data entry box in The SMART Editor Editor Options dialog panel. This number may appear misleading if you do not use the system monofaced font.  You can convert tabs to spaces when you save the file by selecting the "Tabs to Spaces - Save" in The SMART Editor Editor Options dialog panel.  You can specify the default file open mode for all files. They can be opened in edit mode or read-only mode. (See "How to Change File Mode", page 5-18.)  You can specify auto indent mode as the default for all files. (See "How To Use Auto Indent", page 5-20.) Customize Display Screen  You can display horizontal or vertical scroll bars for all The SMART Editor file display windows. Select "Horizontal Scroll Bar" or "Vertical Scroll Bar" in The SMART Editor Editor Options dialog panel. Save Setup Options  Select "Ok" in The SMART Editor Editor Options dialog panel. Chapter 7 - How To... Table of Contents ═══ 10.19. Choose Fonts ═══ Choose Fonts The SMART Editor allow you to set the typeface, size and style of the font used on all The SMART Editor files. Select "Set Screen Font..." from the "Options" menu to choose your font. Define the Font  Select the typeface from the list of available typefaces. As an entry is selected, the typeface of the sample box is updated and the "Size" listbox is updated.  Select the size from the list of available type sizes for the selected typeface. As an entry is selected, the type size of the sample box is updated.  Select the "Bold Style" if desired. The typeface in the sample box is updated.  Select the "Italic Style" if desired. The typeface in the sample box is updated.  Select "Save" from the "Set Screen Font" dialog panel to save your font selections. Chapter 7 - How To... Table of Contents ═══ 10.20. Choose Colors ═══ Choose Colors You can define the colors of your The SMART Editor windows. You can define one color for all edit mode files, another color for all read-only mode files, and a different color for each specific file you have currently opened. Select "Set Screen Colors..." from the "Options" menu to choose your colors. Set the Screen Colors  Select "Set Screen Colors..." from the "Options" menu.  Select the foreground color and background color. The sample box is updated to reflect your selections. Press "Save" to save your selection. Assign the Colors to a Screen  Select "Current Screen Colors" from the "Set Screen Colors" dialog panel to assign the predefined colors to The SMART Editor current file. This is a temporary assignment. When the file is closed, the color is no longer assigned.  Select "Default Read-only screen" from the Set Screen Colors dialog panel to assign the predefined colors to the all read-only files.  Select "Default Edit Screen" from the Set Screen Colors dialog panel to assign the predefined colors to the all edit files. Save the Screen Colors  Repeat the process for each screen you want to define.  Select "Save" from the "Set Screen Colors" dialog panel to save your changes after each color set combination selection. Chapter 7 - How To... Table of Contents ═══ 10.21. Create a Link Database ═══ Create a Link Database One of the most powerful features of The SMART Editor is the ability to mouse click through your source code using the hyperlink features of The SMART Editor. In order for The SMART Editor to know of the structure of your source code, you must first create a Link Database of your code. This linkage is performed in two simple steps. You must specify the files to be linked. (Maintain a List of Files). You must then scan and build the link Database. Define the Files to be Included in the Database  Select "Maintain a List of Files..." from the "Link" menu to create the Link Database List-of-Files file (See "How to Create a List-of-Files", page 5-7.)  This list contains the filenames of all of the source files that are to be included in the link database. You should include all applicable source files. Include all files where you either define or reference items to be linked.  You must create the List-of-Files in the directory which is to contain the generated database and report files. The List-of-Files can reside in any directory and does not have to be in the directory of the source files. Create a Link Database Without Ifdefs  Select "Create The SMART Editor DB..." from the "Link" menu.  Select the filename of the file containing the List-of-Files from the Select File for List-of-Files dialog panel. Create a Link Database With Ifdefs  Select "Create DB (w/#if def)..." from the "Link" menu.  Select the filename of the file containing the List-of-Files from the Select File for List-of-Files dialog panel.  The SMART Editor will scan each of the files contained in the List-of-Files - looking for IFDEFs. Select the Items to be Included in the Link Database  The SMART Editor will always include functions in the database.  Select "#define Symbols" if you want symbols to be included in the database.  Select "Global Variables" if you want global variables to be included in the database.  Select "Dialog Templates" if you want dialog templates to be included in the database.  Select "User Specified Link List" if you want to specify a list of other items you want included in the database. If you select this option, you must enter the name of the file that contains your link list. (See "How to Create a User Specified Link List", page ).  (Please note that the time to create the database and the size of the database is increased for each type of item that is to be included in the database.)  Select "Root Function Name for Call Tree" if you want to generate a Function Call Tree. You must enter the function name for the top of the tree; "main" is the default.  The SMART Editor will scan each of the files contained in the List-of-Files twice - looking for item definitions and references. The SMART Editor will create the link database and default report files in the directory containing the List-of-Files file. Chapter 7 - How To... Table of Contents ═══ 10.22. Set If Defines ═══ Set #If Defines  All #IFDEF symbols will be displayed with an initial assignment of 0. A symbol value of non-zero indicates that the IFDEF symbol is defined and subsequent code will be included; a symbol value of 0 indicates that the IFDEF symbol is not defined and subsequent code will be ignored.  You can specify ifdefs are defined by selecting the ifdefs you want defined and selecting "Set '1'" in the Set IFDEF Defines dialog panel and then selecting "Set Selected to Define Value".  You can assign any numeric value to each symbol. Enter the numeric value in the "New Define Value" data entry box in the "Set IFDEF Defines" dialog panel. Select the ifdefs you want to assign to the new define value, and select "Set Selected to Define Value" in the "Set IFDEF Defines" dialog panel.  Select "Ok" to create The SMART Editor Editor database. The SMART Editor will scan each of the files contained in the List-of-Files twice - looking for function definitions and references within the defined ifdefs. The SMART Editor will create the link database and default report files in the directory containing the List-of-Files file. Note that if you build a Link Database containing #ifdefs, without using the menu selection "Create DB (w/#ifdefs)", The SMART Editor will ignore all #ifdef keywords and include all code in the database build. Chapter 7 - How To... Table of Contents ═══ 10.23. Point to a New Database ═══ Point to a New Database You can create different versions of a program by creating a separate link database with different ifdefs defined. You can also have link databases for different programs or different sets of source code files. You must build each database in a different directory; there can be only one link database in a directory. Create the Link Database  The first step in creating a link database is the creation of the database List-of-Files. (See "How to Create a Link Database", page 5-25.)  You must create the List-of-Files in the directory which is to contain the generated database; the contents of the List-of-Files can reside in any directory.  For example, if your source files are in a directory \MYSOURCE, you can create subdirectories \MYSOURCE\Version1 and \MYSOURCE\Version2. Go to subdirectory Version1 and create your list-of-files with appropriate ifdefs defined. Build the database. It will reside in subdirectory, Version1. Do the same for subdirectory Version2. Point to the Link Database  Prior to accessing the generated database reports ("Ref" menu: "Call Tree", or "Other Link Displays") and prior to hyperlinking to functions (See "How to Use Hyperlink for Navigation", page 5-27), you must tell The SMART Editor which database you want to access. You will automatically be set to the new database following a new database creation or update.  Select "Current DB Path..." from the "Link" menu or press +

.  Select the path containing the List-of-Files and database. Chapter 7 - How To... Table of Contents ═══ 10.24. Incremental Update ═══ Incremental Update Your Link Database You can perform an incremental update of your database to reflect any new changes to your source code without going through the complete build process. You can also add or delete source files, incrementally, from your Link database.  Select "Incremental Update DB..." in the "Link" menu.  Verify the database to be updated. If the database path displayed in the pop-up message box is not the path intended, answer "Cancel" to this verification and select "Current DB Path..." under the "Link" menu to select the desired database. Chapter 7 - How To... Table of Contents ═══ 10.25. Create User Links ═══ Create Your Own Links in a Link Database The SMART Editor always adds functions to your link database. The SMART Editor allows you to optionally add all symbols, global variables, and dialog templates to your database. You can also define your own items that you want to add to the database. This gives you the power to hyperlink on the items of your choice. You must create a file containing the items that you want to include in the database. When you build the database, you specify that you have user defined items and you specify the filename that contains those items. This gives you the ability to link on items that are only referenced in your source, but not defined. First Define Items to be Linked The first step is to create a text file containing the items to be linked. Each item is contained on a separate line. If you want an item to appear in the call tree at the point of reference, add a comma and a "C" to the item specification. Each line is terminated by a carriage return. All item specifications are case sensitive. The specification can be a full word or a mask of leading characters followed by an asterisk. Win* MyStuff,C A_Macro Dos*,C Include the User List in the Database Build  Select "Create The SMART Editor DB..." or "Create DB (w/#if def) from the "Link" menu.  Select the List-of-Files that contains the list of source files to be included in the database. (See "How to Create s List-of-Files", page 5-7.)  Select the "User Specified Link List Filename" in the Link Options dialog panel. Select or enter the name of the file containing the items you want linked.  Select "Proceed" to build the database. (See "How to Create a Link Database", page 5-25.) Chapter 7 - How To... Table of Contents ═══ 10.26. Use Clip Files ═══ Use Clip Files The The SMART Editor Clip File functions provide you with the tools to capture, save and manipulate multiple paste buffers. Clip files are stored on disk and provide a permanent or temporary means of storing small sections of source code. You can use the clip functions to create a library of source code snippets; saving your favorite pieces of code for quick reference. (See "How To Create a Clip Library", page 5-31.) The clip file can be useful as an interface between other applications that create paste files such as Microsoft's QuickHelp and the OS/2 Presentation Manager Help facility. All you need to do is to coordinate the output paste filename of an application with the filename of The SMART Editor Editor Clip File. Set the Clip Filename  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select the name of the clip library; e.g. SNIPPETS.CLP. If the file does not exist, The SMART Editor will create it.  You can rename the clip file at any time. You may wish to use a filename in the SL_TEMP2 directory in order to use the clip file as a temporary buffer. Set the Clip File Mode  Select "Clip File Mode - Append" from the "Clip" menu. This is a toggle check menu item. When the entry is checked, the clip file is in append mode. When the entry is not checked, it is in replace mode. Add Text to the Clip File  Select text from an opened The SMART Editor file and select "Select to Clip File" from the "Clip" menu or press +. The selected text will be copied to the clip file.  In your The SMART Editor file, copy or cut text to the paste buffer, then select "Paste to Clip File" from the "Clip" menu or press +. The contents of the paste buffer will be copied to the clip file. Retrieve Text From the Clip File  Select "Clip File to Paste" from the "Clip" menu. The clip file will be copied to the paste buffer.  Move the cursor to the location within your The SMART Editor file for inserting clip data. Select "Paste Clip File at Cursor" or press +. The clip file will be inserted at the cursor location.  Select "Display Clip File" from the "Clip" menu and The SMART Editor will open the clip file and display it. You can treat it as any other The SMART Editor file. You can update it and save it. Using the Clip File with Help Systems  See "How to Clip Examples From ViewHelp", page 5-32.  See "How to Clip Examples From A QuickHelp Window", 5-33. Chapter 7 - How To... Table of Contents ═══ 10.27. Create a Clip Library ═══ Create a Clip Library This feature allows you to create and access your own library of frequently used text. This is useful for prototypes of function definitions, templates for function headers, and the like. Define Name of Library You must first create the Clip Library file.  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select the name of the clip library; e.g. MY_FUNCS.LIB. If the file does not exist, The SMART Editor will create it. Put the Clip File in Append Mode  Select "Clip File Mode - Append" from the "Clip" menu. This is a toggle. When the entry is checked, the clip file is in append mode. Add the Library Elements  Select "Open/New..." from the "File" menu or press +.  Select the name of the file containing the text you want to include in the library. The SMART Editor will open and display the file.  Select the text you want to add to the clip library.  Select "Select to Clip file" from the "Clip" menu or press +. The SMART Editor will append the selected text to the clip file. Chapter 7 - How To... Table of Contents ═══ 10.28. Clip View Help ═══ Clip View Help You can access ViewHelp Information files, clip ViewHelp text, and add it to your source program or your clip library (refer to How To "Create a Clip Library" page 5-31). Access ViewHelp  Select "Enter ViewHelp..." from the "Help" menu or press +.  In the "Enter help document, or environment variable" data entry box within the ViewHelp dialog panel, enter the name of the Information file or the environment variable within CONFIG.SYS that points to the ViewHelp files in the system, e.g. PROGREF.  If you know the topic you want to view, in the "Enter help topic" data entry box within the ViewHelp dialog panel, enter the topic.  Select "Set Document" to display the ViewHelp information. Clip ViewHelp Text  When you have found the help text that you wish to clip, select "Services" from the ViewHelp main menu.  Select "Copy to File" or press + to copy the current help topic to the ViewHelp TEXT.TMP file, overwriting the data in that file.  Select "Append to File" or press + to append the current help topic to the ViewHelp TEXT.TMP file.  The TEXT.TMP file is created by the ViewHelp facility and it resides in the root directory. Capture the ViewHelp Text If you want to insert the clipped ViewHelp text into your The SMART Editor file:  Select "Open/New..." from the "File" menu or press +.  Select the name of The SMART Editor Editor file where you want the help text to appear. The SMART Editor will open and display the file.  Move the cursor to the position where the help text is to be inserted.  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the "Clip File - Filename" dialog panel.  Select TEXT.TMP from the root directory.  Select "Paste Clip File at Cursor" or press +. If you want to insert the clipped ViewHelp text into your clip library:  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the "Clip File - Filename" dialog panel.  Select the name of the clip library; e.g. MY_FUNCS.LIB.  Select "Display Clip File" from the "Clip" menu.  Move the cursor to the position where the help text is to be inserted.  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select TEXT.TMP from the root directory.  Select "Paste Clip File at Cursor" or press +. Chapter 7 - How To... Table of Contents ═══ 10.29. Clip Windows QuickHelp ═══ Clip Examples from a QuickHelp Window Clip Examples from a QuickHelp Window You can access QuickHelp files, clip QuickHelp text, and add it to your source program or your clip library (see How To "Create a Clip Library", page 5-31). Access QuickHelp  Select "Enter Help Window..." from the "Help" menu or press +.  In the "Enter Help Path\Filename" data entry box within the Start Help dialog panel, enter the name of the QuickHelp file. The default is "QH.EXE".  In the "Enter Help Parameters" data entry box within the "Start Help" dialog panel, enter the QuickHelp parameters (the default is "-m32 -l33 -rb -q"). These parameters control the size and appearance of the QuickHelp window.  Select "Start" to display QuickHelp window. Define the QuickHelp Paste File  Select "Rename Paste File" from the QuickHelp "File" menu.  Enter the name of the clip file that is to contain the clipped help text. This can be a previously defined clip library.  Select "Overwrite" from the QuickHelp "Paste Mode" menu to copy the current help text to the QuickHelp Paste file, overwriting the data in that file.  Select "Append" from the QuickHelp "Paste Mode" menu to append the current help text to the QuickHelp Paste file. Clip QuickHelp Text  When you have found the help text that you wish to clip, Select "Current Window" or "Current Topic" from the QuickHelp "Paste" menu.  The selected text will be copied or appended to the QuickHelp Paste file. Capture the QuickHelp Text If you want to insert the clipped QuickHelp text into your The SMART Editor file:  Select "Open/New..." from the "File" menu or press +.  Select the name of The SMART Editor Editor file where you want the help text to appear. The SMART Editor will open and display the file.  Move the cursor to the position where the help text is to be inserted.  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select the clip file that was previously named in the "Rename Paste File" from the QuickHelp "File" menu.  Select "Paste Clip File at Cursor" or press +. If you want to insert the clipped QuickHelp text into your clip library:  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select the name of the clip library; e.g. MY_FUNCS.LIB.  Select "Display Clip File" from the "Clip" menu.  Move the cursor to the position where the help text is to be inserted.  Select "Rename Clip File..." from the "Clip" menu.  Press "Select" in the Clip File - Filename dialog panel.  Select the clip file that was previously named in the "Rename Paste File" from the QuickHelp "File" menu.  Select "Paste Clip File at Cursor" or press +. Chapter 7 - How To... Table of Contents ═══ 10.30. Display One File in Two Windows ═══ Display One File in Two Windows The SMART Editor does not allow you to open the same file in multiple windows. You can use the clip file to achieve this purpose. Open the File in window #1  Select "Open/New..." from the "File" menu or press +.  Select the name of the file. The SMART Editor will open and display the file. Put the Clip File in Replace Mode  Select "Clip File Mode - Append" from the "Clip" menu. This is a toggle. When the entry is checked, the clip file is in the append mode otherwise it is in the replace mode. Display File in window #2  Select the text you want to view in the second window.  Select "Select to Clip File" from the "Clip" menu or press +. The SMART Editor will copy the selected text to the clip file.  Select the desired split screen format from "Window Configuration" in the "More" menu.  Select "Display Clip File" from the "Clip" menu to display the file in the second window.  To insure that you view the file in window #2 but do not update it, make sure the file edit mode is Read-Only. The clip file will be opened in the default edit mode as specified in the "Options" Menu: "Setup Options...". If it is opened in Edit mode and you want to change it to Read-only mode, select "Change File Edit mode" from the "Edit" menu or press +. If you choose to edit both windows, make sure that you replaced the changed text in window #1 with the changes you made in the second window. Chapter 7 - How To... Table of Contents ═══ 10.31. Create a Compile Window ═══ Create a Compile Window You can create an OS/2 window to do your compile, direct the errors to a file, specify the error file as a user reference file within The SMART Editor, open the error file and hyperlink to each error. While the program is being compiled, you can continue to edit any of the files being compiled or other files. This creates a productive environment for developing applications. Create the Compile Window  Open an OS/2 window. Select "Show OS/2 Window" from the "More" menu or press +.  Run a command file to compile your program, pipe the output to a file, and beep when done; e.g. nmake myprogm.exe > mak.err SLSTART.EXE mak.err Open the error file  When the compile is done, you will hear a beep. Open the error file by pressing ("Open Waiting Files"). HyperLink to Error Source File  Change the directory to the path containing the source code. Select "Open/New..." from the "File" menu or press +. Select the directory containing the source code. When the Dir: entry displays the directory containing the source code, press ("Cancel").  Within the make error file, double click on the filename containing the error. The SMART Editor will open the file at the line specified. You can update the source file if you desire.  Select "Last File" or press +. This will bring you back to the make error file. The last access error will still be highlighted. Double click on the filename containing the next error as you did before. Chapter 7 - How To... Table of Contents ═══ 10.32. Lock Scroll Two Windows ═══ Lock Scroll Two Windows Lock Scroll Two Windows "Sync Scroll" is a useful feature to provide you with the capability of easily comparing two files. After you split the display screen and open two files, you can lock their vertical scroll bars such that a movement in the designated master file will create an automatic movement in the other file. Split the Screen  Select "More" from the main menu bar.  Select "Window Configuration" from the "More" menu.  Select one of the split screen formats. Open the Files  Select "Open/New..." from the "File" menu or press +.  Select the name of the first file. The SMART Editor will open and display the file.  Move to the other window. You can click on the empty window or select "Swap Focus" from the "Window Control" entry under the "More" menu.  Select "Open/New..." from the "File" menu or press +.  Select the name of the second file. The SMART Editor will open and display the file. Lock Scroll the Files  Place the focus on the window you want to define as the Master.  Select "Sync Scroll" from the "Window Control" entry under the "More" menu. The two file displays are now locked together. When you change the display position in the master file, the other file will move accordingly. The reverse is not true. If you wish to reposition the corresponding displays, you can move the second file independent of the master. Disable the Lock Scroll  Select "Sync Scroll" from the "Window Control" entry under the "More" menu to release the scroll synchronization. Chapter 7 - How To... Table of Contents ═══ 10.33. Create Private Directories ═══ Create Private Directories The SMART Editor provides you with the ability to protect your private directories and files from general usage. By using the "File Attributes" functionality from the "More" menu, you can specify that a directory, subdirectory and files can be hidden or available for read only. Select the Files  Select "File Attributes..." from the "More" menu.  From the File Attributes dialog panel, select the directories and files that are to be affected.  Select the "Include All Sub-Directories" checkbox if sub-directories are to be included.  Select "Set Files Only", "Set Directory Header Only", or "Set Files and Directory Headers" to indicate whether files, directories, or both are to affected. Select the Attributes  Select "Archive", "Read-only", "Hidden" or "System" attributes. The selected attributes will be set on each defined file or directory. The deselected attributes will be cleared on each defined file or directory. Set the Attributes  Select "Set Attributes" to update all defined files and directories with all defined attributes. Chapter 7 - How To... Table of Contents ═══ 10.34. Create General Directories ═══ Create General Directories The SMART Editor allows you to create directories by command. Also, when you copy files and subdirectories to diskettes, sub-directories are automatically created as needed.  Select "Copy Files..." from the "More" menu.  Select the base directory in the "To" directory side of the Copy/Move Files dialog panel. The new directory will be a sub-directory off of this base destination directory.  You can type in a directory name in the "To" "File" data entry box in the Copy/Move Files dialog panel. Select "Make Dir" and the directory will be created.  If you select "Make Dir" from the Copy/Move Files dialog panel and there is no directory name entered in the "To" "File" data entry box (*.*), the new directory name is derived from the last directory name in the current "From" directory. Chapter 7 - How To... Table of Contents ═══ 10.35. Delete Directories ═══ Delete Directories & Files The SMART Editor allows you to delete directories as well as files by selecting "Delete Files..." from the "More" menu. Delete the Current Directory  Select "Delete Files..." from the "More" menu.  Select the current directory in the Delete Files/Directories dialog panel.  Select "Remove THIS Directory" in the Delete Files/Directories dialog panel.  Select "Delete" in the Delete Files/Directories dialog panel. All files within the current directory will be deleted and the directory will be deleted. Delete Sub-Directories  Select "Delete Files..." from the "More" menu.  Select the current directory in the Delete Files/Directories dialog panel.  Select "Remove Sub-Directories" in the Delete Files/Directories dialog panel.  Check "Verify Sub-Directories" in the Delete Files/Directories dialog panel if you want to be prompted prior to deleting each sub-directory.  Select "Delete" in the Delete Files/Directories dialog panel. All subdirectories and their files will be deleted. Chapter 7 - How To... Table of Contents ═══ 10.36. Use "C" Templates ═══ Use "C" Templates "C" Templates enable you to enter an identifier, press an accelerator key, and have the identifier replaced by predefined text. Automated 'C' templates are generated from the supplied macro "SMARTC.REX" in the "SLINK2\MACROS" directory. You can modify this macro to meet your specific template needs. You can also add your own templates. The supplied template generates code for the following: for, while, if, braces, switch, case, do, comments, function header. Enter the Template Identifier  Place the cursor at the position you want the template inserted.  Type an identifier for the desired template. f Generates "for( ; ; )" and then positions you before the first semicolon. b Generates an open brace "{" on a separate line, a blank line, and a closing brace "}" on a separate line, and then positions you on the line between the braces. w Generates "while( )" and then positions you between the parentheses. s Generates "switch( )" and then positions you between the parentheses. c Generates "case :" and then positions you before the colon. d Generates "do" on a separate line, an open brace on a separate line, a blank line, and a closing brace with a while clause "} while ( )" on a separate line, and then positions you on the line between the braces. i Generates "if( )" and then positions you between the parentheses. cl Prompts you for comment text, generates "/* Your Comment Text */" followed by a newline and then positions you at the first character of the next line. ce Prompts you for comment text, generates "// Your Comment Text" at column 45 of the current line if it is available, otherwise is generates a newline above the current line and adds the comment to column 45 of the new line. Then it positions you following the comment. h Prompts you for Header text and generates the following function header: Invoke the Template Macro  Select "Templates" from the "Macro" Menu or press . This invodes the template macro "\SLINK2\MACROS\SMARTC.REX". The template code replaces the identifier. Chapter 7 - How To... Table of Contents ═══ 10.37. Define User Macro Files ═══ Define User Macro Files The SMART Editor allows you to register up to fifteen of your own macro files. Once you have defined a macro, you can run it from the drop down menu under "User Defined Macros" in the "Macro" menu. You can optionally assign an accelerator key to the macro and run it using that accelerator key. Display the List of User Defined Macros  Select "Define Menu Item" in the "Macro" menu.  The SMART Editor will display all user defined macros in a listbox.  Select "Add" from the Macro Menu Items dialog panel. Define the New Macro  Specify the legend in the Add Macro Menu Item dialog panel. This is the text that will appear in the "User Defined Macros" drop down menu.  Select or enter the macro filename.  You can optionally specify an argument that will be passed to the macro when it is executed.  You can optionally specify an accelerator key that will be associated with the macro.  You can optionally specify that you are to be notified when the macro is completed. Run the Macro  If the macro was assigned an accelerator key, you can enter the accelerator key to run the macro.  Select "User Defined Macros" from the "Macro" menu. Select the macro from the "User Defined Macros" drop down menu. Chapter 7 - How To... Table of Contents ═══ 10.38. Direct Macro Output to a File ═══ Run a Rexx Macro File With the Output Piped To a File The SMART Editor permits Rexx macros to be run in three different environments. You can run a macro file with all output directed to a file. You can run a macro with all output directed to the interactive macro window. You can run a Rexx statement in interactive mode. However, when the interactive macro window is active, all output is directed to the interactive window. Clear the Macro Output File  Select "Clear Macro Output" from the "Macro" menu. Select and Run a Macro File  Select "Run Macro File" from the "Macro" menu.  Select the macro filename.  Enter any arguments you want to pass to the macro.  Select "Trace On" if you want trace statements to be embedded in the output file.  The SMART Editor will run the macro. Run a User Defined Macro  Select "User Defined Macros" from the "Macro" menu.  Select the predefined macro you want to run.  The SMART Editor will run the macro. Display the Macro Output File  Unless the Interactive Window exists, The SMART Editor will pipe the output to a file, "SL_@##.Out". This file is stored in the SL_TEMP2 directory defined in "CONFIG.SYS"; @ defines the day of the week, ## defines the current instance of The SMART Editor.  Select "Macro Output" from the "Ref" menu to display the macro output. Chapter 7 - How To... Table of Contents ═══ 10.39. Direct Macro Output to a Window ═══ Run a Rexx Macro File With the Output Displayed in a Window The SMART Editor permits Rexx macros to be run in three different environments. You can run a macro file with all output directed to a file. You can run a macro with all output directed to the interactive macro window. You can run a Rexx statement in interactive mode. However, when the interactive macro window is active, all output is directed to the interactive window. Make the Interactive Window Active  Select "Interactive Macro Window" from the "Macro" menu. Select and Run a Macro  Select "Run Macro File" from the "Macro" menu or select "Run Macro File" from the "File" menu in the Interactive Commands window.  Select the macro filename.  Enter any arguments you want to pass to the macro.  Select "Trace On" if you want trace statements to be embedded in the output window.  The SMART Editor will run the macro.  The SMART Editor will display all output in the Interactive Macro window. Run a User Defined Macro  If the macro was assigned an accelerator key, you can enter the accelerator key to run the macro.  Select "User Defined Macros" from the "Macro" menu.  Select the predefined macro you want to run.  The SMART Editor will run the macro.  The SMART Editor will display all output in the Interactive Macro window. Chapter 7 - How To... Table of Contents ═══ 10.40. Single Step a Rexx Macro File ═══ Single Step a Rexx Macro File In order to single step through a macro file, you must have the interactive menu active and trace must be enabled. Make the Interactive Window Active  Select "Interactive Macro Window" from the "Macro" menu. Select and Run a Macro with the Output Displayed in a Window  Select "Run Macro File" from the "Macro" menu or select "Run Macro File" from the "File" menu in the Interactive Commands window.  Select the macro filename.  Enter any arguments you want to pass to the macro.  Select "Trace On".  The SMART Editor will run the first statement in the macro file and display the trace information in the interactive Macro window. Single Step Through the Macro File  To execute the next statement in the macro file, either press "Enter" in the interactive window data entry box, or select "Trace Next" from the "File" menu in the Interactive window.  To re-execute the last statement in the macro file, either enter an equal sign "=" in the interactive window data entry box and press "Enter", or select "Trace Last" from the "File" menu in the Interactive window.  You can enter any OS/2 or Rexx command in the interactive window data entry box and it will be executed and traced. Turn Trace Off  To turn trace off while in Single Step mode, you must enter "Trace Off" in the interactive window data entry box and press "Enter". Chapter 7 - How To... Table of Contents ═══ 10.41. Use Tracks ═══ Use "Tracks" to Re-Create Prior The SMART Editor Environment The SMART Editor keeps a "Tracks" reference file which contains entries that represent the filename and cursor position for each file when you switch to another display. It's no surprise that the format of these tracks allows us to double click on any one of the lines to place ourselves back where we came from. Saving The SMART Editor Environment  The The SMART Editor environment (opened The SMART Editor files) is automatically saved in the system LASTTRKS.LOG file. This file resides in the SLINK2 directory defined in your CONFIG.SYS file. If The SMART Editor current instance contains its own INI file, the LASTTRKS.LOG file is stored with the INI file. Restoring the Previous The SMART Editor Environment  Open the file LASTTRKS.LOG.  Click on each file that you want redisplayed. They will be opened and positioned at the cursor position that was active when the track entry was made. Chapter 7 - How To... Table of Contents ═══ 10.42. Use Shutdown and Startup Macros ═══ Use Shutdown and Startup Macros Use the Supplied Shutdown Macro to Save the Current The SMART Editor Environment The SMART Editor allows you to define a macro that will be automatically run when The SMART Editor is closed. The SMART Editor supplies the macro "SAVE_ENV.REX" in the "SLINK2\MACROS" directory. This macro opens an ASCII text file. The name of the file can be passed in as an argument or it will prompt for the name of the file. The macro writes an ASCII line of data for each opened The SMART Editor file. This contains the line, column, edit mode and word wrap mode for the file. Run the Supplied Shutdown Macro Automatically  Select "Setup Options" from the "Options" menu.  Select "Shutdown Macro" from the Setup Options dialog box.  Select or enter the name of the macro file, "SAVE_ENV.REX".  Enter the name of the file that will contain the environment information as an argument. This filename will be passed to the macro when it is executed.  The SMART Editor will automatically run this macro when The SMART Editor is closed. Selectively Run the Supplied Shutdown Macro  Add the supplied shutdown macro to your list of User Defined Macros. (See "Define User Macro Files", page 5-41.)  Run the Shutdown Macro when you want to save the current environment. If the macro was assigned an accelerator key, you can enter the accelerator key to run the macro. Otherwise, select "User Defined Macros" from the "Macro" menu and then select the macro from the "User Defined Macros" drop down menu. Define Your Own Shutdown Macro  Write your own shutdown macro.  To run your shutdown macro automatically, add your shutdown macro to the "Shutdown Macro" Setup Options panel as described above.  To selectively run the shutdown macro, add your shutdown macro to your list of User Defined Macros. (See "Define User Macro Files", page 5-41.) Use the Supplied Startup Macro to Restore the Previous The SMART Editor Environment The SMART Editor allows you to define a macro that will be automatically run when The SMART Editor is opened. The SMART Editor supplies the macro "REST_ENV.REX" in the "SLINK2\MACROS" directory. This macro reads the ASCII text file created by the "SAVE_ENV.REX" macro. (See "Use the Supplied Shutdown Macro to Save the Current Environment", page 5-45.) The name of the file can be passed in as an argument or it will prompt for the name of the file. The macro opens and positions each file described in the environment ASCII file. Run the Supplied Startup Macro Automatically  Select "Setup Options" from the "Options" menu.  Select "Startup Macro" from the Setup Options dialog box.  Select or enter the name of the macro file, "REST_ENV.REX".  Enter the name of the file that will contain the environment information as an argument. This filename will be passed to the macro when it is executed. This should be the name of the file used in the "SAVE_ENV.REX" macro.  The SMART Editor will automatically run this macro when The SMART Editor is opened. Selectively Run the Supplied Startup Macro  Add the supplied start-up macro to your list of User Defined Macros. (See "Define User Macro Files", page .)  Run the Startup Macro when you want to restore the previous environment. If the macro was assigned an accelerator key, you can enter the accelerator key to run the macro. Otherwise, select "User Defined Macros" from the "Macro" menu and then select the macro from the "User Defined Macros" drop down menu. Define Your Own Startup Macro  Write your own start-up macro.  To run your start-up macro automatically, add your start-up macro to the "Startup" Setup Options panel as described above.  To selectively run the start-up macro, add your start-up macro to your list of User Defined Macros. (See "Define User Macro Files", page .) Chapter 7 - How To... Table of Contents ═══ 10.43. Popup an OS/2 Command Window ═══ Popup an OS/2 Command Window You can easily popup an OS/2 command window from within The SMART Editor.  Just select "Show OS/2 Window" from the "More" menu or press + and an OS/2 command file is ready for your use. It will open to the current directory path of wherever you are in The SMART Editor. Chapter 7 - How To... Table of Contents ═══ 10.44. Define User Command Files ═══ Define User Command Files The SMART Editor allows you to register up to fifteen of your own command files. Once you have defined a command file, you can run it from the drop down menu under the "Start" menu. You can optionally assign an accelerator key to the command file and run it using that accelerator key. These processes are independent (detached) from The SMART Editor. You may close The SMART Editor and the processes running will not be terminated. Display the List of User Defined Commands  Select "Define Menu Item" in the "Start" menu.  The SMART Editor will display all user defined command files in a listbox.  Select "Add" from the Command Menu Items dialog panel. Define the New Command File  Specify the legend in the Add Command Menu Item dialog panel. This is the text that will appear in the drop down menu under the "Start" menu.  Select or enter the command filename.  You can optionally specify an argument that will be passed to the command file when it is executed.  You can optionally specify an accelerator key that will be associated with the command file.  You should check the Command File checkbox to indicate that CMD.EXE or an alternative command processor will be executed. the Command File  If the command file was assigned an accelerator key, you can enter the accelerator key to run the command file.  Select the "Start" menu. Select the command name from the drop down menu. Chapter 7 - How To... Table of Contents ═══ 10.45. Register a Command Set ═══ Register a Set of Commands and Run The SMART Editor allows you to register and run a set of commands to be executed. This will allow you to enter something simple like "COPY c:\myfile A:" or a set of commands like "C: & CD \mydir & DIR *.* > dir.txt & SLStart dir.txt". This convenience option eliminates the requirement for creating a separate command file for simple operations, if you choose to do so. Note that the command line above uses the ampersand to concatenate multiple commands on the same command line; up to 127 characters are allowed. The command line shown above sets a path, gets a directory (directed to a file), then sends this back to The SMART Editor via SLSTART. Display the List of User Defined Commands  Select "Define Menu Item" in the "Start" menu.  The SMART Editor will display the names of all user defined command files or sets of commands in a listbox.  Select "Add" from the Command Menu Items dialog panel. Define the New Set of Commands  Specify the legend in the Add Command Menu Item dialog panel. This is the text that will appear in the drop down menu under the "Start" menu.  Enter the set of commands.  You can optionally specify an accelerator key that will be associated with the set of commands.  You should check the Command File checkbox to indicate that CMD.EXE or an alternative command processor will be executed. Run the Set of Commands  If the set of commands was assigned an accelerator key, you can enter the accelerator key to run the commands.  Select the "Start" menu. Select the command name from the drop down menu. Chapter 7 - How To... Table of Contents ═══ 10.46. Assign an Alternate Command Processor ═══ Assign an Alternate Command Processor You can specify the command processor such as "4OS2" that will be used for the command files under the "Start" menu, the generated The SMART Editor OS/2 window, and OS/2 commands within a Rexx macro. The default is "CMD.EXE".  Select "Setup Options..." under the "Options" menu or press "CTRL>+.  Select or enter the filename of the command processor that you want to use under Command Processor in The SMART Editor Editor Setup Options dialog panel. Chapter 7 - How To... Table of Contents ═══ 10.47. Use Drap and Drop ═══ Use File Drag and Drop between Applications The SMART Editor supports the OS/2 file drag and drop function. You can select multiple files from any application that supports the drag and drop function, use the right mouse button to drag the files to The SMART Editor, and The SMART Editor will open the dropped files. Not all applications support this feature and/or may not be compatible with The SMART Editor Editor format. The SMART Editor supports a file drop in the main edit window, over the minimized The SMART Editor icon, and in the "Files List" listbox in the "Maintain List of Files" function under the "Link" menu. Example of Drag and Drop  Resize The SMART Editor Editor window so that you can display The SMART Editor with another OS/2 window.  Select the files in the application listbox which you wish to open in The SMART Editor.  Press and hold the right mouse button to drag the selected files to The SMART Editor Editor window. Release to drop files. Chapter 7 - How To... Table of Contents ═══ 10.48. Process Workframe/2 Errors ═══ Process Workframe/2 Errors You can process compile errors directly from the IBM WorkFrame/2. This process may sound involved, however with a bit of experience it works quite easily. Now you can have the power and flexibility of both The SMART Editor and the IBM WorkFrame/2 working in unison. Configure the Workframe/2 Environment  Configure the Workframe/2 editor to be "SLSTART.EXE" with the parameters "%a %z".  Be sure and have your WorkFrame/2 Language settings set to "IBM C-Set/2" (assuming you are using the IBM compiler), otherwise you will not have access to on-line help for the errors, nor will you be able to go directly to the column position of the selected error (you will be able to just go to the line number). Configure The SMART Editor Environment  Select "Enable WorkFrame/2 Errors" under the "Options" menu.  Check "Enable WorkFrame/2 Errors" Run The SMART Editor  An errors session can be started without a running instance of The SMART Editor. In this case, specify SLStart as the Workframe/2 editor and it will be used to automatically start The SMART Editor.  You can also start with an instance of The SMART Editor running (minimized or sized as you like). Compile Your File  Compile your file or run a 'make' from the WorkFrame/2 "Action" menu.  In the WorkFrame/2 Monitor window, your compile errors will scroll by. Send the Errors to The SMART Editor  At the conclusion of your compile, you can send these errors to The SMART Editor in either of two methods.  You can double click on an error line in the Monitor Window within the Workframe. You will be notified when the WorkFrame has transfered the source code file representing the error; "Files Waiting" will appear on The SMART Editor Editor title bar.  You can select an error line (single mouse click), then press the right mouse button down (center button for 3 button mice) and drag the errors over The SMART Editor. Release the mouse button to complete the drop. Process the Errors  Open The SMART Editor Editor "Files" menu, and press "Open Waiting Files". The source code for the error will appear in The SMART Editor Editor window, an "Errors" menu item will appear, and an ErrorsList listbox will appear. The "Errors" menu item on the main menu bar is present only during an errors session with the Workframe/2. You have the freedom to perform any The SMART Editor functions while you are in a WorkFrame/2 error session.  You can select any error for this source file by selecting the error from The SMART Editor Editor ErrorsList box or by selecting Next or Prior error from the "Errors" menu.  You can even get help for any of the errors by pressing the "Help" button within the "ErrorsList box" or by selecting "Error Help" from the "Errors" menu.  If you wish to "Hide" this ErrorsList Box, you can do so by selecting "Hide Errors List" from the "Errors" menu. If you wish to later show the box, press "Show Errors List" under the "Errors" menu. Close the Error Session  When you have completed your session with this particular source file in error press "Close Errors List" from the "Errors" menu.  The errors session will automatically be closed with a specific source file if you close the WorkFrame/2 Monitor Window.  The errors session will automatically be closed with a specific source file if you select another source file with errors from the WorkFrame/2 Monitor Window. Chapter 7 - How To... Table of Contents ═══ 10.49. Disable File Passing ═══ Disable Files From Being Passed to The SMART Editor You can prevent The SMART Editor from accepting any files from any other application.  Check "Ignore SLSTART" under the "Options" menu.  If this is the only instance of The SMART Editor, SLStart will create a new instance if a file is to be passed. Chapter 7 - How To... Table of Contents ═══ 10.50. File Notification ═══ Notify When a File is Passed to The SMART Editor You can inform The SMART Editor that you want to be notified whenever a file is being sent to you from another application.  Check "Notify - Received File(s) from the "Options" menu.  You will receive a 'BEEP-BEEP' (Road-Runner style) when files are sent from SLSTART and ready to be opened using "Open Waiting Files" under the "File" menu.  The The SMART Editor title bar will indicate "Waiting Files" whether this item is checked or not checked. Chapter 7 - How To... Table of Contents ═══ 10.51. Restore Application ═══ Restore The SMART Editor When a File is Passed to The SMART Editor Restore The SMART Editor When a File is Passed to The SMART Editor You can inform The SMART Editor that you want to have The SMART Editor restored from a minimized icon upon receipt of filenamesfrom SLSTART.  Check "Restore - Received File(s)" from the "Options" menu. Chapter 7 - How To... Table of Contents ═══ 10.52. Auto-Open a File ═══ Automatically Open a File Passed to The SMART Editor You can inform The SMART Editor that you want files sent from SLSTART to be automatically opened (without waiting "Files Waiting").  The SMART Editor will only open the files being passed if The SMART Editor is inactive and if the current screen is blank.  Check "Auto Open Waiting (if free)" from the "Options" menu. Chapter 7 - How To... Table of Contents ═══ 10.53. Print a File ═══ Print a File or Part of a File You can format and print The SMART Editor Editor file or a portion of The SMART Editor Editor file. The SMART Editor does pagination automatically, and prints the filename, date/time stamp and page number at the top of each page. You select printing through the "Printing" option on the "More" menu. The printing is performed from The SMART Editor Editor created print file as if you entered "Print" from the OS/2 command line. Open the File  Select "Open/New..." from the "File" menu or press +.  Select the name of the file. The SMART Editor will open and display the file. Print the File  To print the entire file, select "Printing" from the "More" menu and then select "Print Current File/Select" from the "Printing" menu or press +

.  Select "Ok" to the advisory message box that appears and the file will be printed. Print Selected Text  Select the text you want to print.  Select "Printing" from the "More" menu and then select "Print Current File/Select" from the "Printing" menu or press +

.  You can set the formatting options for the printed file by selecting and setting the options in "Formatting Options" from the "Printing" menu. Chapter 7 - How To... Table of Contents ═══ 10.54. Define User Reference Files ═══ User reference files provide you with the capability of easily accessing up to eight user defined files. You can define your own user reference files by using the "Ref" menu "Define Files A->H" function. Define User Reference File  Select "Define Ref Files A->H..." from the "Ref" menu. You can define eight reference files: A through H.  To define a reference file, select "Add" in the "User Ref Files Menu Item" dialog panel.  Select the name of the file you want to be defined as user reference file.  If you want the "Ref" menu to display a description other than the path and filename of the reference file, enter a description of the file in the "Menu File Legend" data entry box. Open User Reference File  To open a User Reference File, Select the file listed under the "Ref" menu. (The path and filename of User Reference File or the entered "Menu File Legend" will be displayed. You can also type the accelerator key sequence ,,and the letter of the file selection (A through H). Chapter 7 - How To... Table of Contents ═══ 10.55. Incremental Backup to Diskette ═══ Incremental Backup to Diskette You can easily do incremental source code backup from The SMART Editor. By creating a backup list file that contains the list of files to be copied, you can specify which files are to be copied. The files can be contained in multiple directories. By using the parameters functionality from the Copy panel, you can define the date/time range of the files to be copied, thereby limiting the copy to only those files which have changed. Define the Files to be Copied You must create a List of Files file, specifying all of the files that you wish to copy; e.g. BACKUP.LST. Use the "Maintain a List of Files..." menu selection under the "Link" menu. (See how to "Create a List of Files", page 5-7.) Define the Date/time Stamp of the Files to be Copies  Select "Copy Files..." from the "More" menu.  Select "Parameters" from the Copy/Move dialog panel.  Select "After" or "Equal" in the Parameters dialog panel.  Enter the desired date and time. Copy the files  Select the list of files ( BACKUP.LST ) in the "From" directory/files boxes in the Copy/Move dialog panel.  Enable the "'From' is a List" checkbox. This informs The SMART Editor that the "From" file is a list of files.  Select the diskette drive from the "To" Directory list from the Copy/Move dialog panel; e.g. A:  Select "Copy" from the Copy/Move dialog panel and The SMART Editor will copy all files that are defined in the BACKUP.LST list of files if they satisfy the date/time stamp defined in the parameters. Chapter 7 - How To... Table of Contents ═══ 10.56. Snapshots ═══ Create and Restore File Snapshots The SMART Editor provides you with the ability to automatically save each edit mode file as a temporary file, called a snapshot. This is based upon the number of edit events executed in that file. You can also take a snapshot at will using the "Take a Snapshot" command from the "Snapshot" entry under the "More" menu. The "Snapshot Restore..." command from the "Snapshot" entry under the "More" menu prompts you for restoring the snapshot. Set Default Snapshot Edit Events  Select "Setup Options..." from the "Options" menu or press +.  Select the "Snapshot Edit Events" checkbox in The SMART Editor Editor Options dialog panel to enable snapshots. This checkbox will be checked when the automatic snapshot function (auto save) is enabled.  Enter the number of edit events per The SMART Editor edit mode file to be executed prior to taking a snapshot in the "Snapshot Edit Events" data entry box in The SMART Editor Editor Options dialog panel.  Select "OK" on the "The SMART Editor Options" dialog panel. Take a Snapshot  You can force a snapshot on a specific The SMART Editor file by selecting "Take a Snapshot" from the "Snapshot" entry under the "More" menu or by pressing +. Restore Snapshots  Select "Snapshot Restore..." from the "Snapshot" entry under the "More" menu.  If you want to restore all snapshots, select "Restore All" from the Snapshot Files dialog panel. The SMART Editor will open the snapshot file under the original filename.  You can selectively restore snapshots. The Snapshot Files dialog panel displays each snapshot file with its original filename, the cursor location within that file when the snapshot was taken, the date/time stamp of the snapshot, and the snapshot filename. Select the snapshots that you want to restore, then select "Restore Selected". Please note that when a snapshot is restored to your display the first line of the file is a date/time stamp and filename information line. You may wish to delete this line after you have verified that the restored file is the correct file intended. Snapshots are maintained for a day before they are automaticlly deleted. You can double click on this first line, over the filename, to position yourself at the line number of the cursor when the snapshot was taken. Chapter 7 - How To... Table of Contents ═══ 10.57. Set Selection Parameters ═══ Set Selection Parameters (Time/Date/Attributes) You can qualify the files that are copied, moved or found by specifying file selection parameters. Access the Selection Parameters for a Copy or Move  Select "Copy Files..." from the "More" menu.  Select "Parameters..." from the Copy/Move Files dialog panel. Access the Selection Parameters for a Find  Select "Find Files..." from the "More" menu.  Select "Parameters..." from the Find File dialog panel. Define Date\Time Selection Parameters  You can specify all files with a date and time equal to, or later than, the specified date and time are to be included. Select the "After (Incl)" checkbox in the Parameters dialog panel and enter the date and time in the appropriate data entry boxes.  You can specify all files with a date and time equal to the specified date and time are to be included: select the "Equal (Date)" checkbox in the Parameters dialog panel and enter the date and time in the appropriate data entry boxes.  You can specify all files with a date and time before the specified date and time are to be included. Select the "Before" checkbox in the Parameters dialog panel and enter the date and time in the appropriate data entry boxes. Define File Attributes Selection Parameters  Select the "File Attributes" checkbox in the Parameters dialog panel.  Select the desired attribute checkboxes in the Parameters dialog panel.  Select "Ok". Chapter 7 - How To... Table of Contents ═══ 10.58. Use HyperLinks ═══ Use HyperLinks for Navigation This is powerful feature of The SMART Editor which allows you to rapidly navigate text material with mouse clicks on keywords. You can complete an involved task of locating, and reviewing all of the occurrences of a particular variable with simple mouse clicks. Hyperlink with Search  Click on a word. It automatically becomes the object of a multi-file string search.  Select "Multi-File String Search..." from the "More" menu or press +, and The SMART Editor will automatically display a list of the location of each occurrence of the search string.  Double click on any one of the locations and the file identified by the location will be displayed at the line and column of the search string occurance. Hyperlink with File List  Whenever you have a file list displayed, you can click on any one of the filenames and display the file.  The The SMART Editor "Find" file function creates a list of files found.  Compiler errors can be linked directly to the source with a mouse double click.  At any point where a filename (and line number) are displayed, the file will automatically be opened and displayed on your screen. If the filename is followed by a line number in parentheses, the file will be displayed at the specified line number. Hyperlink with Functions  A complete hyperlink structure of your linked definitions and references can be created by The SMART Editor. (See "How to Create a Link Database", page 5-25.)  Double clicking on a linked item with the left mouse button will create a list of all matching item definitions contained in The SMART Editor current database. Clicking on any entry within that list will open the associated source file and position the cursor at the item. If only one definition exists then you will be positioned directly at the source point of the definition.  Double clicking on a linked item with the right mouse button will create a list of all matching definitions and references contained in The SMART Editor current database. Clicking on any entry within that list will open the associated source file and position the cursor at the item.  If you specify "Link to Comment" in the "Setup Options..." in the "Options" menu, The SMART Editor will position the cursor at the comment preceding the function definition. Chapter 7 - How To... Table of Contents ═══ 10.59. Use HyperTracks ═══ Use HyperTrack for Navigation A hyperlink path includes all hyperlinks for symbols, defines, globals, dialog boxes and your own private link specifications; this is dependent upon the options selected when the current database was built. The SMART Editor keeps track of all hyperlinks. The SMART Editor allows you to go backward and forward along an established hyperlink path. Hypertracking is like the multiple Undo/Redo function. After you have double clicked (or opened files) on your way through your source code, you may traverse backward along this path by selecting to hyperlink in the reverse direction. You then have the option of moving forward along the previously created hyperpath by selecting to hyperlink in the forward direction. HyperTrack Back  Establish a hyperlink path. (See "How to Use HyperLink for Navigation", page 5-57.)  Select "Backwards" from the "HyperTrack" entry on the "More" menu or press +. The SMART Editor will return the cursor to the backward link in the hypertrack chain. HyperTrack Forward  Establish a hyperlink path. (See "How to Use HyperLink for Navigation", page 5-57.)  Select "Forwards" from the "HyperTrack" entry on the "More" menu or press +. The SMART Editor will return the cursor to the forward link in the hypertrack chain. Chapter 7 - How To... Table of Contents ═══ 10.60. Startup Arguments ═══ Start The SMART Editor with Arguments You can start The SMART Editor with file arguments and The SMART Editor will open each of the specified files. You can also start The SMART Editor minimized as an icon on your desktop. Running The SMART Editor From the Command Line  At the OS/2 command line, enter "SLSTART" followed by the names of the files you want The SMART Editor to open. You may wish to start The SMART Editor with the "Tracks" file to selectively open the files from the last session. For example: SLSTART File1.C File2.C or SLSTART c:\SLINK2\LASTTRKS.LOG  You will save a great deal of time using SLSTART to open new files instead of closing and restarting The SMART Editor. Starting The SMART Editor Minimized as an Icon  Start The SMART Editor with an argument of "/m" to begin the session with the application minimized. ═══ 11. Chapter 8 - Tips and Techniques ═══ Tips and Techniques These tips have come from many hours of use and experimentation with the product. Undoubtedly, you will find many more useful techniques that will make The SMART Editor more productive in your development and programming. Since the topics are not in alphabetical order in this chapter, a quick reference is listed below (see "Index" for alphabetical reference): Navigational Tips Common Accelerator Keys Scrolling Memory Management What is Saved and Where Use of a 3 Button Mouse File Drag and Drop Text Selection Split Screen and Selected Text Displaying Columns Information in the Status Box Searching Changed Files Undo Tracks HyperTracks Place Markers Compiling Source Code Changing Directories Building a Search File List Code Snippet Library Pseudo Source Files File HouseKeeping Left Justify Code The Copy Function Use Parameters for Incremental Backup Selecting Files Find an Item in a List Box Finding the Size 'Delete' Warnings Link to a Function Link Database Update Connect to View Help Connect to Microsoft QuickHelp Using SLSTART to Open Filesnames Spawn OS/2 Command Files Spawn DOS Command Files Run 'Grep' Qualify Make Filenames for Hyperlinking Errors Assign Accelerator Keys Create Project Oriented Instances Multiple Instances of The SMART Editor Table of Contents ═══ 11.1. Navigational Tips ═══ Navigational Tips The SMART Editor conforms to the standard graphical control for Presentation Manager (PM) applications. The SMART Editor is also generally compliant with the IBM System Application Architecture (SAA) and CUA guidelines. If you are familiar with the PM interface, you should have no difficulty navigating about The SMART Editor. The SMART Editor makes extensive use of accelerator keys for control selection and text manipulation. Many of the menu items can be selected by using an accelerator key sequence (eg. +

) or simply using the standard PM convention of typing the underscored letter within the menu item name (the items in the main menu bar can be selected by first pressing the key). The accelerator keys for the menu items are shown on the menus. The accelerator keys for edit and text manipulation are shown in the "Keys Help" section of the on-line help for The SMART Editor (). You will also find Appendix B, "Keys Reference" useful as a reference. You may wish to copy the Keys Reference page and keep the copy handy as a reference. You will find the following accelerator keys particularly helpful while viewing and editing files: Chapter 8 - Tips and Techniques Table of Contents ═══ 11.2. Common Accelerator Keys ═══ Common Accelerator Keys  Control+End - Go to end of file.  Control+Home - Go to beginning of file.  Keypad Plus(+) - Place selected text in paste buffer. If text is not selected, whole line in placed in paste buffer.  Keypad Minus(-) - Cut selected text and place in paste buffer. If text is not selected, whole line is cut and placed in paste buffer.  Shift+Insert or (F12) - Insert text from paste buffer.  ALT+O - Selection panel for file open.  ALT+B or third mouse button - Return to last displayed file ("Back").  F5 - String search in current file. (The "Current" file is the file displayed on the screen. If the screen is split, the "Current" file has the focus.)  F6 - String replacement in the current file.  Control+E - Toggle the Edit Mode in the current file between Read Only and Edit.  Control+A - Close all files.  ALT+X - Close all files with save if changed.  ALT+Esc - Switch to the previous OS/2 screen group or application.  F1 - The SMART Editor On-Line Help.  ALT+Q - Help Window (Microsoft QuickHelp, if installed).  ALT+V - Context Sensitive IBM View Help (if installed).  Control+V - Enter and view a help topic (View Help). There are many more useful accelerator keys. Refer to Appendix B, Keys Reference for the complete list. A few moments exploring these key stroke accelerators will provide you with a great deal of productivity. You can choose a comfortable balance between the use of the mouse on a menu selection and an accelerator key sequence. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.3. Scrolling ═══ Scrolling Vertical scrolling through a file can be accomplished by various methods, with different results and speeds.  Arrow down or up moves the cursor a line at a time. When the cursor reaches the end (top or bottom) of the screen, the text will be scrolled a line at a time.  Pressing or scrolls the text a page at a time. A page is defined as the number of text lines that can be displayed and will depend upon the sizing of The SMART Editor Editor Application window. When you scroll using these keys, the cursor always remains on the screen and will be positioned at the upper left hand corner.  Using the scrollbar with the mouse will cause the text to scroll but will keep the cursor stationary in its last position, even as it goes off screen. To reestablish the cursor position to an on-screen position you will have to press the left mouse button on a character within the visible screen. This may require a little practice to remember.  If you are going to the top of your file, press +.  If you are going to the bottom of your file, press +.  If you know the line number, press + and enter the line number. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.4. Memory Management ═══ Memory Management In order to achieve higher performance The SMART Editor will use as much of your system memory resource as practical. You can reduce the amount of file buffer space utilized by reducing the number of files that are 'opened'. The parameter that affects this allocation is the "Max Open Files" data in The SMART Editor Editor "Setup Options". When you are building a new link data base, updating an existing data base or creating Link reports, you should try and free up memory. Please close all opened files and stop any applications that are not necessary. In doing so, The SMART Editor will use this available memory to increase the performance of the data base processes. The "Build DB Buffersize" parameter in The SMART Editor Editor "Setup Options" panel will allow you to tune the performance of the Link database build and Link report generation. This parameter will default to 1,024 kilobytes (KB). This is also the maximum value that this parameter can be set. If you encounter severe memory swapping, this parameter should be set to a lower value. The minimum size is 16KB. If you have a very large source base this parameter may greatly affect the time to build a Link data base and create report files. Saving edit steps for the Undo function also uses memory resources. Up to 255 edit events can be tracked for each opened file. Setting this number to a lower value will conserve your system memory. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.5. What is Saved and Where ═══ What is Saved and Where Depending upon the setup options that you have chosen, The SMART Editor performs many save operations.  Each file that you open for edit, or you change from read-only to edit mode will be copied to the directory you specified in the SL_BACKUP2 environment variable of your CONFIG.SYS file. This will preserve the state of the file before you can ever make a change. You can disabled this function by checking "Disable File Backups" under "Setup Options".  An original file will not be overwritten by changes until you specifically say to do so, either when you close the file, close The SMART Editor, perform "HouseKeeping" or change to read-only mode. There will be no surprises here.  If you have chosen to activate the automatic "Snapshot" option, each file in edit mode will be copied to the \BACKUP directory after a number of edit events. You specify the number of events. An event is either an insert or delete. This can be a keystroke, or a complete, large text section. Each snapshot overwrites the previous snapshot of the same file. You have access to this most current snapshot and can restore this file at any time. The snapshot files are deleted at the end of a SMART Editor Editor session. They are available if The SMART Editor is prematurely aborted as from a general system failure or system re-boot.  The data for edit Undo and Redo is maintained in your TEMP directory. This data, and the ability to "Undo" or "Redo" is removed after the closing of any file, or after The SMART Editor is terminated or closed for any reason. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.6. Use of a 3 Button Mouse ═══ Use of a 3 Button Mouse The SMART Editor supports the use of a three button mouse. The "Last File" function is activated by pressing the third button. You can simulate the third button for the "Last File" function by pressing the left (button1) mouse button and, while still holding it down, press the right (button2) mouse button; then release both buttons. You can simulate the action of a three button mouse with a two button mouse as follows. Hold the left button down and press the right button to simulate a 3Button mouse click. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.7. File Drag and Drop ═══ File Drag and Drop OS/2 versions 1.3 and higher support the file Drag and Drop operations. Not all applications support this feature. The SMART Editor will receive file names if compatible with the Direct Manipulation format for copying files. The SMART Editor will automatically open files that are dropped over The SMART Editor Editor Icon, when minimized, or over the main edit window. The SMART Editor will also automatically load filenames that are dropped in the "Contents" listbox of the "Maintain a List of Files" function. You can test the ability of The SMART Editor to receive filenames by selecting a file, or files, in another application then pressing the right (button2) mouse button and dragging the icon over The SMART Editor. If The SMART Editor does not recognize the format, you will get an invalid drop icon. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.8. Text Selection ═══ Text Selection Besides mouse selection of text, there are many key strokes that will select text on your screen. These accelerator keys for text selection will provide you with alternate methods to choose your style of use for this product. Please take a few moments and test the "Text Selection" keys shown in Appendix B, "Keys Reference". Here are some additional hints in text selection. If you use the mouse to select text to the end of a line, you may or may not want the carriage return at the end of the line. This character does not display, but will appear as the last space on the line. The space to the right of the end-of-line cannot be selected. This space may appear as blanks, but in fact it is nonexistent. If you 'mouse down' in this open space, the cursor will be placed preceding the carriage return character. If you perform a function that selects a string, such as "Current Searches", you can copy the whole line by pressing the keypad <+> two times. The first time the selected string will be copied to the paste buffer. The second time, you will copy the complete line to the paste buffer. If you type or insert over selected text, the selected text will be replaced by the typed, or inserted string. This speeds the replacement process considerably. To replace one string with another string:  First select the string that will be the replacement by pressing .  Press the keypad <+> key to place the selection in the buffer.  Now select the string that is to be replaced. Move the cursor to the string and press .  Press or + to complete the replacement. Select a line by pressing + or keypad <+> with nothing selected. Select a number of lines by repeatedly pressing + (or ). The selection starts at the cursor position. Normally a single mouse click over a word, variable, function or whatever will place the parsed string in a special The SMART Editor Editor buffer which automatically becomes the object of a search (either in the current file or globally across multiple files). If the parsing algorithm does not suit your need for a specific occasion execute the following alternative steps:  Select the complete string to be searched with either your mouse, or by using accelerator key strokes.  Once the string is selected and highlighted on your screen, select "Select String" or press to place the selected string in the search buffer. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.9. Split Screen and Selected Text ═══ Split Screen and Selected Text If you have a split screen displayed and you wish to save the display of selected text, select "Swap Focus" from the "Window Control" entry under the "More" menu to change the focus (and cursor) between the two screens. If you use the mouse to change the focus from one of the split panels to the other, you will loose the previous selection, since the mouse down function will automatically select the word at the mouse position. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.10. Displaying Columns ═══ Displaying Columns The SMART Editor "Setup Options" allows you to choose displaying cursor column position or not. The cursor column number is displayed following the line number to the left of the horizontal scroll bars. The calculation of the cursor position on a line with (considering tabs) requires a moment that you may not wish to spare, particularly if you are scrolling through a large file. The calculation of the position may not be accurate unless you are using the system monofaced font for the file display. The choice of displaying the column position is up to you and your requirements. Information in the Title Bar The information in The SMART Editor Editor Application Title Bar identifies the currently displayed file. The data in this line may contain an assortment of the following items:  The application name "The SMART Editor".  The project name, if applicable.  The current filename in parenthesis. Typically this is the fully qualified filename, unless the path is excessively long. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.11. Information in the Status Box ═══ Information in the Status Box The File Status bar appears to the left of the horizontal scroll bars for each window. The information in The SMART Editor Editor File Status bar identifies the current status of the file. The data in this line may contain an assortment of the following items:  The current line number position of the cursor will be displayed first.  If chosen as an option, the next item on this status bar line will be the column position of the cursor.  The edit mode will be displayed next. The code will be "r" for read-only, or "e" for edit mode.  The word wrap mode will be displayed next. If the file has word wrap active, a code of "w" will appear next.  If the file is in edit mode and it has been changed the code "c" with be shown.  If the file is in character insert mode, an "i" will appear, otherwise an "o" will be displayed for overwrite mode. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.12. Searching Changed Files ═══ Searching Changed Files Please note that the "Multi-File String Search" function on the "More" menu scans disk files. If you have changed files in your The SMART Editor buffers, you may want to save these files before the search, or understand that the found locations may be different than the displayed files. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.13. Undo ═══ Undo The edit events are tracked by the Undo processor, and tracks each file separately. If have chosen the option to save 99 events for undo and redo, then you will be saving that number of events for each opened file. Once you close a file or save a file the undo counter will be reset to zero. Also, after you have performed one or more undos, you will have the opportunity for redo until the next edit event occurs for the file, at which time all available redos are discarded. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.14. Tracks ═══ Tracks The "Tracks" reference file is a useful way to go back to previously displayed files, whether they have been closed or not. The tracks process keeps a stack of the last 35 file positions. Every time you display a new file the top of display, line number and file name are saved in the tracks file. At any time you can display these history tracks by selecting "Tracks" under the "Ref" menu. At the close of a SMART Editor Editor session, this tracks data is saved in a file by the name of LASTTRKS.LOG in the directory containing the current INI file. If you wish to start a new session and open the files from a previous session: open the LASTTRKS.LOG file and double click on the files you wish to open. These files will be opened at the previous line number and will be opened in the edit mode or read-only as they were in the previous session. If you perform this restart often, you may wish to define the LASTTRKS.LOG file as one of the user defined files under the "Ref" menu for quick access. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.15. HyperTracks ═══ HyperTracks HyperTrack is the ability to go backward and forward along an established hyperlink path. You can hot key your way back from a hyperlink trip. The SMART Editor keeps track of all hyperlinks. The SMART Editor allows you to go backward and forward along an established hyperlink path. Hypertracking is like the multiple Undo/Redo function. After you have double clicked (or opened files) on your way through your source code, you may traverse backward along this path by selecting to hyperlink in the reverse direction. You then have the option of moving forward along the previously created hyperpath by selecting to hyperlink in the forward direction. Use the "HyperTracks" entry on the "More" menu or press + or + to go backwards and forwards along the hyperlink path. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.16. Place Markers ═══ Place Markers You can save you place within a file with the use of place markers. Although The SMART Editor will save your place as you switch the display from one file to another, you are responsible for saving you place as you move about within a file. Since The SMART Editor only uses one buffer for each different file, you may loose your current place (if that is important) when you double click on a function to access the source of the function. The source may be the same file that you are currently displaying. In this case you will change locations in the same file and loose your original place. Place Markers are available when you need them. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.17. Compiling Source Code ═══ Compiling Source Code Here are a few helpful hints that you might find useful if you are using The SMART Editor in conjunction with a compiler for your program development. You may wish to build a compile command file containing an output pipe to save all error messages to a filename of your choice. You can register this command file under The SMART Editor Editor Menu "Start". When you want to launch a compile just select this command under "Start". To spawn a compile (or make) from The SMART Editor, and have the error file automatically appear at the doorstep of The SMART Editor create the following command file (NOTE: the first line of the command file changes the directory of MAKEFILE for NMAKE and sets the directory path for "mak.err"): C: & CD \YourDir NMAKE.EXE YourProg.exe > mak.err SLSTART.EXE mak.err Once the compilation is completed, SLSTART will place the error file in a buffer and you will be notified ("FILES WAITING" will be displayed in the title bar). Select "Open Waiting Files" under the "File" menu to open all waiting files. You can also specify "Notify Received File" if you want The SMART Editor to beep when a file(s) is sent by SLSTART and waiting to be opened. If you double click on the error location (filename, line number) the file in error will be displayed with the error line at the top of your display. If the file in error is not in the current directory, you may need to change the current The SMART Editor directory. If there are many files in many different directories, you may wish to convert all of the filenames to be fully qualified. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.18. Changing Directories ═══ Changing Directories If you use the "Directory Tracking" option as set in the "Setup Options...", The SMART Editor will keep track of your current directory as you move from function to function. If you do not choose for The SMART Editor to track your directory, each function will retain the directory that you chose while using the function. If you wish to change the pointer to the Link data base, select "Current DB Path" under the "Link" menu. If you need to change The SMART Editor Editor current directory: select "File" "Open/New..."; select the desired directory path; then press "Cancel". This step will change the directory path without opening a new file. You can also make good use of the "Directories" button above each directory list box. Pressing this button will popup a dialog and list panel to mainatin a list of common directories. You will want to add A:\ to this list. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.19. Building a Search File List ═══ Building a Search File List The SMART Editor provides immediate access to all linked definitions and function references within the Link data base created for your source files. If you also wish to have ready access to other objects within your source code, you can do so by saving the "Search" files for these strings.  Make a list of the strings that you access often.  Perform a "Multi-String String Search..." from the "More" menu or by pressing + for each string.  Once the display file of the found occurrences is on your screen, select "Save As" under the "Save" entry under the "File" menu to save the search list file. You can name this file to identify the string search that it contains. After you have completed your list of searches and saves, you will have an excellent source of reference for future use. When you wish to access the references for these special strings, you need simply to open the appropriate search list file, and double click on the location of the desired reference. Please note that these references, as with the Link database, are only as accurate as the number of changes within the source code. As you make changes to the source code, you will eventually need to re-"Search" the strings and build new search string list files. If you really want to get efficient, you can create a file containing all of the strings that you searched, with their corresponding string list file names (similar to the "Current Function Def. List" created as part of the Link creation by The SMART Editor). With this file, you have a hyperlink cross reference of all of the searched strings their occurrence files. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.20. Code Snippet Library ═══ Code Snippet Library If you wish to save your favorite code segments for immediate access you can build a clip library. Select the code snippet that you wish to save. This piece of code can be a sequence of calls to perform a given function that may be required to be inserted throughout your code. This snippet may be the structure of a complicated call with alternate arguments, completely commented. In any case, Select "Rename Clip File" under "Clip" on the main menu and name this snippet so that you will be able to easily recognize the file in your clip library. Now select "Select to Clip File" to save the text selection in your designated file. Don't forget, you can place the Clip File mode into "Append" and select non contiguous text segments to be stored in one clip file. Once your clip library is built, you can insert the clip files at the cursor position in your text by selecting "Paste Clip File at Cursor" or placing the file into the paste buffer by selecting "Clip File to Paste". You can also create a Rexx Macro to insert the code snippet into your source. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.21. Pseudo Source File ═══ Pseudo Source File A Pseudo Source File is simply a simple 'C' file that is not part of your compiled source code but is used to create the "Call Tree Report". If you are creating a Dynamic Link Library or a program library, you may not have the concept of a "Main" function for the root of your call tree. To create a root for your source call tree simply create a source "C" file with a "Main" procedure that calls each of the functions in your library. Be sure to add this new source file to the List-of-Files file for your data Link database construction. Main() { GetUshort(); AsciiEditProc(); MultiTypeProc(); } You may also think of other ways to use Pseudo Source Files to solve other "Call Tree" difficulties. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.22. File HouseKeeping ═══ File HouseKeeping If you are opening and changing a number of file during a SMART Editor Editor edit session, you may need to use the "File Housekeeping" function often. Select "File Housekeeping" under the "File" Menu and perform the necessary saves or closes as required. If you are using The SMART Editor in a read-only mode for all files (for source code analysis), files will automatically be discarded from The SMART Editor Editor buffers once the maximum open files number is reached. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.23. Left Justify ═══ Left Justify You can quickly reformat you code using the "Left Justify Line at Cursor" function under the "Edit" menu. Just place the cursor where you wish the first character of a code line to start and press . Please note that you cannot place the cursor past the end of the line. You may need to type spaces or tabs in the line to initially get the line long enough to justify at the desired column. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.24. The Copy Function ═══ The Copy Function The The SMART Editor "Copy Files..." function is indeed flexible. Here a few hints that may not be totally apparent as you read instructions for this function in other parts of this manual. You can quickly create a new sub-directory as follows:  Select the base path for the sub-directory and insure that it is displayed as the "To" "Dir:" path.  Type the name of the sub-directory to be created in the "To" "File:" entry box.  Press "Make Dir". The directory will be created and the "To" path will automatically be changed to this new sub-directory. There is also another clever way to create a new sub-directory. If you press "Make Dir" with "*.*" showing in the "To" "File" entry box, you will create a sub-directory from the "To" "Dir: that has the same name as the last directory name in the "From" "Dir: path. This is most useful when you are copying a set of files from your hard disk to a diskette on your floppy drive, or you are creating a new directory tree identical to an existing tree. (This saves typing in the directory name). If you make an error in the directory creation, skip over to The SMART Editor Editor "Delete Files..." function and remove the sub-directory in error. Remember, sub-directories are automatically created as necessary in the destination directory when you have chosen "Include all Sub-Dirs". Chapter 8 - Tips and Techniques Table of Contents ═══ 11.25. Use Parameters for Incremental Backup ═══ Use Parameters for Incremental Backup The The SMART Editor "Copy Files..." function takes on a different character when you set the "Parameters" panel with a time/date argument. Now you can use the "Copy Files..." function to copy all files in a particular directory tree that have changed after a specific date/time as specified by you. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.26. Selecting Files ═══ Selecting Files Whenever you need to select multiple files in a list box, you may find it quicker to select ALL files (if a pushbutton is available), then deselect the unwanted files. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.27. Finding an Item in a List Box ═══ Finding an Item in a List Box Most of The SMART Editor Editor listboxes are loaded alphabetically. You may skip to the items starting with a specific letter by simply placing the focus on the list box and typing in the first letter of the item desired. If there are multiple items all starting with the same letter, at least you will be positioned to the first occurrence of the items having the same first letter. Also, you may have noted the back slash "\" character in the directory list boxes. Selecting this item will place you directly at the root of the current drive, without having to walk up a directory tree. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.28. Finding File Size ═══ Finding File Size You can quickly determine a file size (and date stamp) by simply selecting the file (single mouse click) in the "Open/New..." dialog panel under the "File" menu. This information is displayed near the top of the panel. You can get the size of a number of files and the total space of a specified directory or directory tree by using the "Find Files..." function. Enter the wildcard file specification which will give you the desired results and press "Ok". Chapter 8 - Tips and Techniques Table of Contents ═══ 11.29. 'Delete' Warnings ═══ The "Delete" function is very powerful, but requires some attention if you don't wish to make an erroneous deletion. Please make your deletion specifications carefully. And most of all, read the advisory messages that are displayed before any deletions are made. These messages will tell you what is to be deleted. The most common error is starting a wildcard deletion in the wrong directory path. This "Delete Files..." function makes cleaning your disk of unused files a much easier operation than using the command line. However some care and caution is advised. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.30. Link to a Function ═══ Link to a Function If you have built a Link database you can display the source of a function definition or a list of its references to be displayed with the double click of the left or second mouse button. However, if you are not quite sure of the spelling, or the case of the Function name, you can find the function in one of two ways. You can display the "Functions Definitions List" report and use the "Current String Searches" functions to locate the function name. Once found in this report display, you can double click to display the desired information. An alternative method to locate a function is to pull down the "Link To..." selection under the "Link" menu and type in the leading characters of the desired function name. If multiple functions are found that satisfy the name criteria, you will be given a list to choose from. This same mechanism works for any items built in the Link database. There are separate reports listing symbols, variables, dialog templates, unreferenced functions, and user defined items. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.31. Link Database Update ═══ Link Database Update When you create a Link database the link pointers are accurate until you make a change to the source code. Minor changes over a few number of files may remain tolerable for some time, but eventually the pointers are off far enough to require an update. You may choose to completely rebuild the database. You may also choose to perform an "Incremental Update" of the Link database. The "Incremental Update" checks the date stamp on each of the files listed in the List-of-Files file against the time stamp of the database and will change all of the links associated with a source file that have been changed. Due to the overhead required in this update, you may find it quicker to re-create the database rather than update the database. Your own testing on your data will provide you with the answer to this question. Use S_Listbox for Quick Access to Frequently Used Directories You can create a Rexx Macro which builds or displays a listbox of commonly used directories. You can register this macro so that it is easily accessible. The SMART Editor provides a listbox API as a SMART Editor Editor function for Rexx. This is a VERY useful function. Now you can bring up a list box of any items that you wish to select. Within the listbox function you can add and delete lines of the listbox. If you select an item within the list, the selected item will be returned to your Rexx macro. All you need to do is specify a file that will contain the text items for the listbox. The SMART Editor provides a macro, "ChgDir.Rex", which contains the S_LISTBOX command and the S_CD command. The contents of the listbox is contained in the file "ChgDir.Lst". The S_LISTBOX command displays the listbox, enables you to update it and select an entry. The S_CD command then changes the directory to the selected entry. The SMART Editor supplies a macro, "Listbox.Rex", which contains the S_LISTBOX command and the S_SET_DB_PATH command. The contents of the listbox is contained in the file "CHGB.REX". The S_LISTBOX command displays the listbox, enables you to update it and select an entry. The S_SET_DB_PATH command then changes the link database directory to the selected entry. You can register the macros under the "Macro" menu so that they appear in the User Defined Macros drop down list and can optionally be accessed by an accelerator key. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.32. Connect to View Help ═══ Connect to View Help To insure that you are properly "connected" to the IBM Help facility please verify the following:  Insure that the paths for all .NDX files are either listed in the CONFIG.SYS "SET DPATH= " statement or the \HELPINDX directory path.  Insure that your CONFIG.SYS contains an entry "SET BOOKSHELF=[Path1];[Path2];" where [Path] is the path for any .INF Files. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.33. Connect to Microsoft Quick Help ═══ Connect to Microsoft Quick Help To insure that you are properly "connected" to the Microsoft Quick Help facility, verify the following:  Insure that your CONFIG.SYS file has an entry "SET HELPFILES=[Path1]\*.HLP;[PATH2]\*.HLP..." where [Path] is the path for any QuickHelp .HLP files.  NOTE: help files for specific applications (such as DLGEDT.HLP) are NOT Quick help files and are not in a compatible format for QuickHelp. These files should not appear in the same path as the QuickHelp files.  Insure that the QuickHelp executable "QH.EXE" is in a path defined in CONFIG.SYS. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.34. Using SLSTART to Open Filenames ═══ Using SLSTART to Open Filenames SLSTART is a SMART Editor Editor monitor program used to pass filenames for The SMART Editor to open. You can specify SLSTART as the editor of choice in the IBM WorkFrame/2; you can then open multiple files without creating multiple instances. You can use SLSTART in make or compile command files to send an error file automatically back to The SMART Editor. SLStart Utility Chapter 8 - Tips and Techniques Table of Contents ═══ 11.35. Spawn OS/2 Command File ═══ Spawn OS/2 Command File You can easily spawn a command file from The SMART Editor. First create a command file, such as to compile or make an project. Next, register this command file as a menu item under "Start" by selecting "Define Command Menu Item", and then "Add". To spawn this command, simply select the menu item. These processes are independent (detached) from The SMART Editor. You may close The SMART Editor and the processes running will not be terminated. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.36. Spawn Dos Command File ═══ Spawn Dos Command File You can run a Dos program and send the results back to The SMART Editor. Write a Dos command file ".BAT" to perform your Dos function like the following: C: CD \DOSAPPS ** any environment settings available from the command line** DOSPROG.EXE > outfil.txt EXIT Let's say the name of this file is "DOSDOO.BAT". Now write a OS/2 command file that you will spawn from The SMART Editor as follows: COMMAND.COM /C DOSDOO.BAT SLSTART C:\DOSAPPS\outfil.txt EXIT This command file invokes the Dos command processor on your Dos command file. SLSTART gets the results back to The SMART Editor. NOTE: This works real fine unless you have to have special DOS switch settings that must be made from a DOS object window. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.37. Run a "Grep" from The SMART Editor ═══ Run "Grep" from The SMART Editor The SMART Editor supplies a "GrepFind.Rex" macro file which allows you to run Grep from within The SMART Editor. This macro assumes that you have a "GREP.EXE" in your PATH. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.38. Qualify Make File Filenames for Hyperlinking Errors ═══ Qualify Make File Filenames for Hyperlinking Errors To insure that your source code files are fully qualified in the compile error output, you will want to place the fully qualified filename of the source file at the end of the compile options as follows: icc /Sm ... /c $(SRCPATH)\filename.c Note that the example above uses a symbol for the source path. This symbol must be previously defined in the make file as follows: SRCPATH = c:\slink2\sample If your source code, make file and object files are all in the same directory this qualification is not necessary. However, if you wish to insure the proper hyperlink to the source file you will want to qualify the filename of the source file in the make compile. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.39. Assign Accelerator Keys ═══ Assign Accelerator Keys Assign Accelerator Keys You can assign your own accelerator key sequences to your macros in the process of registering your macros with The SMART Editor ("Macro" menu) or commands in the process of registering your commands with The SMART Editor ("Start" menu). Any accelerator key sequence you choose will override any The SMART Editor assignment, For example, I choose to define the start up macro to "F3" because I use this display a lot. This assignment overrides the CUA definition for "F3" to close the application. Also note that the assignment of accelerator keys is limited to F1-F12, 0-9 (on the keyboard) and a-z. You cannot assign "SHIFT" alone with a keyboard key ("F" keys are Ok). If you duplicate an assignment for both a macro and a command menu item, the macro item overrides the command item. If you override a system or application accelerator key sequence, the default will automatically return when you de-assign the key sequence from the Macro or Command menu item. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.40. Create Project Oriented Instances ═══ Create Project Oriented SMART Editor Instances You can configure The SMART Editor for specific projects. In this way each instance of The SMART Editor can maintain a Project identity. Each instance can maintain its own command files, macro files, tracks file, directories, reference files and pointer to the project link database. The procedure is quite simple. (1) In a directory that you wish to be "home base" for the project, drop a SMART Editor Editor configuration file (SLINK2.INI). Select "Store The SMART Editor .INI..." from the Options menu. (2) Copy an icon of The SMART Editor and create a project desktop folder, or display another The SMART Editor icon object on your desktop. (3) Select "settings" and name this instance of The SMART Editor as your project. Also, specify the default directory as the directory that you dropped a copy of SLINK2.INI into from step (1) above. (4) Now when you start The SMART Editor, it will look into the default startup directory for the configuration file for this specific instance. When you close this instance of The SMART Editor, a LASTRKS.LOG file will be stored in the same directory as the project INI file, ready to pick up where you left off the next time you open this instance of The SMART Editor. If The SMART Editor starts and cannot find a configuration file in the default directory, the configuration file in the \SLINK2 directory will be used. As another important part of this Project Configuration, SLSTART and The SMART Editor provide close hand-holding. If you have multiple instances of The SMART Editor running, and you wish to insure that files are directed from SLSTART to a specific instance o The SMART Editor you can use a special identification parameter. In the setting for your project The SMART Editor specify a startup parameter of "/p:ID" where ID is any short project identification code such as "COMM". Now any time you wish to direct a file from SLSTART, place this same parameter as an argument to SLSTART, along with the filename to open. You can turn off The SMART Editor Editor Project ID after The SMART Editor has been started by simply selecting the "Disable Project ID" menu item under "Options". If you run with only one instance of The SMART Editor at a time, this ID is not necessary. Remember, when you have an instance of The SMART Editor identified with a project ID, that instance will ONLY receive filenames from an SLSTART with a corresponding project ID. All others will be ignored. Chapter 8 - Tips and Techniques Table of Contents ═══ 11.41. Multiple Instances of The SMART Editor ═══ Multiple Instances of The SMART Editor There may be times when you wish to have more than one instance of The SMART Editor running. Each instance of The SMART Editor will maintain its own instance data. Chapter 8 - Tips and Techniques Table of Contents ═══ 12. Chapter 9 - Macros ═══ The SMART Editor S_Macros The S_Macros provide windows into the SMART Editor functions from your Rexx Macro calls. These callable functions have been implemented as part of the Rexx Interface. S_Macros - Alphabetically S_Macros - Functional Groups S_Macros - Reference Definitions Table of Contents ═══ 12.1. S_Macros - Alphabetically ═══ S_ Macros Listed Alphabetically S_BEG_OF_FILE Move the cursor to the beginning of the current file. S_BEG_OF_LINE Move the cursor to the beginning of the current line. S_BEG_OF_SCREEN Move the cursor to the beginning of the current page. S_CAN_I_WRITE (Filename, ReturnVariable) Can the specified file be written to. S_CD (New_pathname) Change the current directory. S_CHG_CASE (Case_mode) Change the case of the selected text. S_CHG_CLIP_MODE Change the mode of the clip file. S_CHG_EDITMODE Change the edit mode of the current file. S_CHG_WORDWRAP Change the word wrap mode of the current file. S_CLEAR_MACRO_OUTPUT Clear the macro output file. S_CLOSE_ALL_FILES Close all The SMART Editor files. S_CLOSE_CURR_FILE Close The SMART Editor current file. S_CLOSE_FILE (File_handle) Close the specified non-The SMART Editor file. S_CLOSE_SL_FILE (Buffer_number) Close The SMART Editor file contained in the specified buffer. S_COPY_CLIP_TO_PASTE Copy the clip file to the paste buffer. S_COPY_PASTE_TO_CLIP Copy the paste buffer to the clip file. S_COPY_SEL_TO_CLIP Copy the selected text to the clip file. S_COPY_SEL_TO_PASTE Copy the selected text to the paste buffer. S_CUT_SEL_TO_PASTE Cut the selected text to the paste buffer. S_DEL_CHAR Delete the current character. S_DEL_LINE Delete the current line. S_DEL_SELECTED Delete the selected text. S_DEL_TO_EOL Delete to end of line. S_DEL_WORD Delete the current word. S_DISPLAY_CLIP Display the clip file. S_DISPLAY_REF_FILE (Reference_file_id) Display the specified reference file. S_DOES_FILE_EXIST (Filename, ReturnVariable) Does the specified file exist. S_END_OF_FILE Move the cursor to the end of the current file. S_END_OF_LINE Move the cursor to the end of the current line. S_END_OF_SCREEN Move the cursor to the end of the current page. S_GET_BUFF_COL_NUM (Buffer_number, ReturnVariable) Get the column number of the specified The SMART Editor file. S_GET_BUFF_EDITMODE (Buffer_number, ReturnVariable) Get the edit mode of the specified The SMART Editor file. S_GET_BUFF_FILENAME (Buffer_number, ReturnVariable) Get the file name of the specified The SMART Editor file. S_GET_BUFF_LINE_NUM (Buffer_number, ReturnVariable) Get the current line number of the specified The SMART Editor file. S_GET_BUFF_WORDWRAP (Buffer_number, ReturnVariable) Get the word wrap mode of the specified The SMART Editor file. S_GET_CLIP_FILENAME (ReturnVariable) Get the clip file name. S_GET_COL_NUM (ReturnVariable) Get the current column number. S_GET_CURR_CHAR (ReturnVariable) Get the character at the cursor. S_GET_CURR_CHGSTATUS (ReturnVariable) Get the change status of The SMART Editor current file. S_GET_CURR_EDITMODE (ReturnVariable) Get the edit mode of The SMART Editor current file. S_GET_CURR_FILENAME (ReturnVariable) Get the filename of The SMART Editor current file. S_GET_CURR_SL_DIR (ReturnVariable) Get The SMART Editor current directory. S_GET_CURR_STRING (ReturnVariable) Get the 'C' keyword at the cursor. S_GET_CURR_WORD (ReturnVariable) Get the word at the cursor. S_GET_CURR_WORDWRAP (ReturnVariable) Get the word wrap mode of The SMART Editor current file. S_GET_CURSOR_POS (ReturnVariable) Get the cursor position of The SMART Editor current file. S_GET_DISK_SPACE (DriveNum, ReturnVariable) Get the available disk space for the specified drive. S_GET_ENV_INFO (EnvironmentVariable, ReturnVariable) Get the environment information for the specified environment variable. S_GET_FILE_BUFFNUM (Filename, ReturnVariable) Get the buffer number for the specified The SMART Editor file. S_GET_FILE_INFO (Filename, ReturnVariable) Get the file size and date and time for the specified file. S_GET_LINE_LEN (ReturnVariable) Get the length of the current line. S_GET_LINE_NUM (ReturnVariable) Get the current line number. S_GET_NUM_SL_FILES (ReturnVariable) Get the number of opened The SMART Editor files. S_GET_REF_FILENAME (ReferenceFileId, ReturnVariable) Get the file name of the specified reference file. S_GET_SELECTED_SIZE (ReturnVariable) Get the length of the selected text. S_GET_SELECTED_TEXT (ReturnVariable) Get the selected text. S_GET_SL_INI_PATH (ReturnVariable) Get the path of the current SLINK2.INI file. S_GOTO_BEG_BRACE Move the cursor to the beginning brace. S_GOTO_BUFF (Buffer_number) Display The SMART Editor file contained in the specified buffer. S_GOTO_COL (Column_number) Move the cursor to the specified column number. S_GOTO_END_BRACE Move the cursor to the ending brace. S_GOTO_LINE (Line_number) Move the cursor to the specified line number. S_GOTO_MARK (Marker_number) Move the cursor to the specified marker. S_GOTO_POS Move the cursor to the saved cursor position. S_INDENT Indent the current line to the beginning of the previous line. S_INSERT_CLIP Insert the clip file at the current cursor position. S_INSERT_FILE (Filename) Insert the specified file at the current cursor position. S_INSERT_LINE (String) Insert the specified string at the current cursor position and append a carriage return. S_INSERT_PASTE Insert the paste buffer at the current cursor position. S_INSERT_STRING (String) Insert the specified string at the current cursor position. S_IS_DRIVE_PROTECTED (Drive, ReturnVariable) Is the specified drive write protected. S_IS_FILE_BINARY (Filename, ReturnVariable) Is the specified file contain non_ascii data. S_LISTBOX (Listbox_filename, Title, ReturnVariable) Display, update and select from a listbox. S_MARK_CURR_POS (Marker_number) Set the specified marker to the current cursor position. S_MSG (Line1, Line2,Line3, ReturnVariable) Display a message and wait for the user to respond. S_NEXT_CHAR Move the cursor right one character. S_NEXT_LINE Move the cursor down one line. S_NEXT_PAGE Move the cursor down one page. S_NEXT_WORD Move the cursor right one word. S_OPEN_FILE (Exists_mode, Newfile_mode, Filename, ReturnVariable) Open the specified non-The SMART Editor file. S_OPEN_SL_FILE (Open_mode, Edit_mode, Wrap_mode, Filename) Open the specified The SMART Editor file. S_PREV_BUFFER Display the file previously displayed in The SMART Editor current window. S_PREV_CHAR Move the cursor left one character. S_PREV_LINE Move the cursor up one line. S_PREV_PAGE Move the cursor up one page. S_PREV_WORD Move the cursor left one word. S_PRINT_CURR_FILE Print the current file. S_PRINT_SELECTED Print the selected text. S_PROMPT (Prompt_msg, ReturnVariable) Display a Message and return the user's string response. S_READ_FILE (file_handle, length, ReturnVariable) Read the specified non-The SMART Editor file. S_REDO Redo the last undo edit function. S_RENAME_CLIP_FILE (New_clipname) Rename the clip file. S_REPLACE (Search_string, Replace_string, ReturnVariable) Replace all occurrences of the search string with the replace string within the current file. S_SEARCH_BACK (Case_sensitive, String) Search backwards within the current file for the specified string. S_SEARCH_FWD (Case_sensitive, Top_of_file, String) Search forwards within the current file for the specified string. S_SEARCH_NEXT Search for the next occurrence of the previously defined string. S_SET_DB_PATH (DBpath) Set the path for the link database. S_SAVE_ALL_FILES Save all changed The SMART Editor files. S_SAVE_CURR_FILE Save The SMART Editor current file. S_SAVE_POS Save the current cursor position. S_SAVE_SL_FILE (Buffer_number) Save the specified The SMART Editor file. S_SAVEAS_CURR_FILE (New_filename) Save the current file with the specified file name. S_SELECT_BRACED_CODE Select the code within braces. S_SELECT_LINE Select the current line. S_SELECT_PAGEDOWN Select the next page. S_SELECT_PAGEUP Select the previous page. S_SELECT_WORD Select the current word. S_SPLIT_SCREEN (Split_mode) Split the screen. S_SWAP_FOCUS Swap the focus to the other window in a split screen. S_SWAP_WINDOWS Swap the files in a split screen. S_SYNC_SCROLL Synch scroll the files in a split screen. S_WRITE_FILE (Handle, Length, Data_to_write, ResultVariable) Write to the specified non-The SMART Editor file. S_UNDO Undo the last edit function. Chapter 9 - Macros Table of Contents ═══ 12.2. S_Macros - Functional Groups ═══ S_ Macros Listed by Functionality Cursor Movement The Cursor Movement macros permit the control of the cursor within the opened The SMART Editor files.  S_BEG_OF_FILE  S_BEG_OF_LINE  S_BEG_OF_SCREEN  S_END_OF_FILE  S_END_OF_LINE  S_END_OF_SCREEN  S_GOTO_BEG_BRACE  S_GOTO_COL  S_GOTO_END_BRACE  S_GOTO_LINE  S_GOTO_MARK  S_GOTO_POS  S_INDENT  S_MARK_CURR_POS  S_NEXT_CHAR  S_NEXT_LINE  S_NEXT_PAGE  S_NEXT_WORD  S_PREV_CHAR  S_PREV_LINE  S_PREV_PAGE  S_PREV_WORD  S_SAVE_POS The SMART Editor Files The The SMART Editor File macros control the manipulation of The SMART Editor files.  S_CHG_EDITMODE  S_CHG_WORDWRAP  S_CLOSE_ALL_FILES  S_CLOSE_CURR_FILE  S_CLOSE_SL_FILE  S_DISPLAY_REF_FILE  S_GOTO_BUFF  S_INSERT_FILE  S_OPEN_SL_FILE  S_PREV_BUFFER  S_PRINT_CURR_FILE  S_SAVE_ALL_FILES  S_SAVE_CURR_FILE  S_SAVE_SL_FILE  S_SAVEAS_CURR_FILE External Files The External File macros control the manipulation of external files.  S_CAN_I_WRITE  S_CD  S_CLOSE_FILE  S_DOES_FILE_EXIST  S_IS_FILE_BINARY  S_OPEN_FILE  S_READ_FILE  S_WRITE_FILE Edit The Edit macros allow the editing of a The SMART Editor file.  S_CHG_CASE  S_DEL_CHAR  S_DEL_LINE  S_DEL_SELECTED  S_DEL_TO_EOL  S_DEL_WORD  S_INSERT_LINE  S_INSERT_STRING  S_PRINT_SELECTED  S_REDO  S_SELECT_BRACED_CODE  S_SELECT_LINE  S_SELECT_PAGEDOWN  S_SELECT_PAGEUP  S_SELECT_WORD  S_UNDO Paste The Paste macros allow the movement of data from a The SMART Editor file to the paste buffer and back.  S_COPY_SEL_TO_PASTE  S_CUT_SEL_TO_PASTE  S_INSERT_PASTE Clip The Clip macros manipulate data into and out of The SMART Editor current clip file.  S_CHG_CLIP_MODE  S_COPY_CLIP_TO_PASTE  S_COPY_PASTE_TO_CLIP  S_COPY_SEL_TO_CLIP  S_DISPLAY_CLIP  S_INSERT_CLIP  S_RENAME_CLIP_FILE Get The Get macros retrieve information and data.  S_GET_BUFF_COL_NUM  S_GET_BUFF_EDITMODE  S_GET_BUFF_FILENAME  S_GET_BUFF_LINE_NUM  S_GET_BUFF_WORDWRAP  S_GET_CLIP_FILENAME  S_GET_COL_NUM  S_GET_CURR_CHAR  S_GET_CURR_CHGSTATUS  S_GET_CURR_EDITMODE  S_GET_CURR_FILENAME  S_GET_CURR_SL_DIR  S_GET_CURR_WORD  S_GET_CURR_STRING  S_GET_CURR_WORDWRAP  S_GET_CURSOR_POS  S_GET_DISK_SPACE  S_GET_ENV_INFO  S_GET_FILE_BUFFNUM  S_GET_FILE_INFO  S_GET_LINE_LEN  S_GET_LINE_NUM  S_GET_NUM_SL_FILES  S_GET_REF_FILENAME  S_GET_SELECTED_SIZE  S_GET_SELECTED_TEXT  S_GET_SL_INI_PATH Search and Replace The Search and Replace macros search The SMART Editor current file for the specified string and optionally replace that data.  S_REPLACE  S_SEARCH_BACK  S_SEARCH_FWD  S_SEARCH_NEXT Windows The Windows macros allow the manipulation of files in a split screen.  S_SPLIT_SCREEN  S_SWAP_FOCUS  S_SWAP_WINDOWS  S_SYNC_SCROLL Misc The Misc macros define the remaining built in The SMART Editor macros.  S_CLEAR_MACRO_OUTPUT  S_IS_DRIVE_PROTECTED  S_LISTBOX  S_MSG  S_PROMPT  S_SET_DB_PATH Chapter 9 - Macros Table of Contents ═══ 12.3. S_Macros - Reference Definitions ═══ S_Macros - Reference Definitions S_BEG_OF_FILE Move the cursor to the beginning of the current file. Reference  + S_BEG_OF_LINE Move the cursor to the beginning of the current line within the current file. Reference  S_BEG_OF_SCREEN Move the cursor to the beginning of the current page within the current file. + S_CAN_I_WRITE Check if the specified file can be written to and return the result. Arguments  Filename - the name of the file to check  ReturnVariable - the name of the variable to contain the the results Return Values  "TRUE" if the specified file can be written to  "FALSE" if the specified file cannot be written to Examples  S_CAN_I_WRITE MyFilename WriteIsOK  S_CAN_I_WRITE 'C:\MYFILES\FILEA.TXT' Result S_CD Change the directory to the specified path. Arguments  Path - the new directory path Examples  S_CD 'C:\OS2\SYSTEM'  S_CD '..' S_CHG_CASE Change the case of the selected text. Arguments  Case Mode 1 = all upper case 2 = all lower case 3 = first character of each word upper case, rest lower 4 = reverse case Examples  S_CHG_CASE 2 Reference  "Edit" menu, "Cases" S_CHG_CLIP_MODE Changes the state of the file mode of The SMART Editor current clip file. The file modes are "Replace" or "Append". Reference  "Clip" menu, "Clip File Mode - Append" S_CHG_EDITMODE Change the file edit mode of the current file. The file edit modes are read-only and edit. The file mode will not be changed for hex files. The file mode will not be changed if the file has been updated. Reference  "Edit" menu, "Change File Edit Mode" S_CHG_WORDWRAP Change the word wrap mode of the current file. Reference  "Edit" menu, "Word Wrap" S_CLEAR_MACRO_OUTPUT Clear the macro output file. The macro output file contains all output generated from non-interactive Rexx macros. The Macro Output is stored in the file SL_@##.Out in the SL_TEMP2 directory defined in CONFIG.SYS; @ defines the day of the week, ## identifies the current instance of The SMART Editor. The "Ref" menu "Macro Output" reference file displays the macro output file. Reference  "Macro" menu, "Clear Macro Output" S_CLOSE_ALL_FILES Close all The SMART Editor files. If the file has changed, it will be saved first. If the file is in hex mode, it will not be saved. Reference  "File" menu, "Close All Files with Save" S_CLOSE_CURR_FILE Close The SMART Editor current file. If the file has been changed, it will be saved first. Reference  "File" menu, "Close Current File" S_CLOSE_FILE Close the specified external (non-The SMART Editor) file. Arguments  File Handle - this is returned to the user by the "S_OPEN_FILE" macro Examples  S_CLOSE_FILE MyFileHandle S_CLOSE_SL_FILE Close The SMART Editor file specified by Buffer_Number, the buffer number containing the file to be closed. If the file has been changed, it will be saved first. Arguments  Buffer_Number - the buffer number containing the file to be closed. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu). Examples  S_CLOSE_SL_FILE MyFileBuffernum  S_CLOSE_SL_FILE 3 S_COPY_CLIP_TO_PASTE Copy The SMART Editor current clip file to the paste buffer. The clip file must be less than 64k. Reference  "Clip" menu, "Clip File to Paste" S_COPY_PASTE_TO_CLIP Copy the paste buffer to The SMART Editor current clip file. Reference  "Clip" menu, "Paste to Clip File" S_COPY_SEL_TO_CLIP Copy the selected text in The SMART Editor current file to The SMART Editor current clip file. Reference  "Clip" menu, "Select to Clip File" S_COPY_SEL_TO_PASTE Copy the current selection to the paste buffer. If there is no selection, the current line will be copied to the paste buffer. Reference  "Edit" menu, "Copy" S_CUT_SEL_TO_PASTE Copy the current selection to the paste buffer. If there is no selection, the current line will be copied to the paste buffer. The copied text is then deleted from The SMART Editor file. The current file must be in edit mode. Reference  "Edit" menu, "Cut" S_DEL_CHAR Delete the character at the current cursor position in the current file. S_DEL_LINE Delete the line containing the cursor in the current file. Reference  + S_DEL_SELECTED Delete the selected text in the current file. Reference  "Edit" menu, "Delete" S_DEL_TO_EOL Delete the text from the current cursor position to the end of the line in the current file. Reference  + S_DEL_WORD Delete the word containing the cursor in the current file. S_DISPLAY_CLIP Display The SMART Editor current clip file. The clip file becomes The SMART Editor current file. Reference  "Clip" menu, "Display Clip File" S_DISPLAY_REF_FILE Display the specified reference file. This pertains to the "Ref" pull down menu. Arguments  Reference File - the id of the reference file to be displayed 0 Find Files List 1 String Search List 2 Multiple Definitions List 3 Multiple XRef List 4 Clip File 5 Current Hexadecimal Format 6 Tracks 7 Macro Output A-H User Define Reference File Examples  S_DISPLAY_REF_FILE RefFileNum  S_DISPLAY_REF_FILE A Reference  "Ref" menu S_DOES_FILE_EXIST Check if the specified non_The SMART Editor file exists and return the result. Arguments  Filename - the name of the file to check  ReturnVariable - the name of the variable to contain the the results Return Values  "TRUE" if the specified file exists  "FALSE" if the specified file does not exist Examples  S_DOES_FILE_EXIST MyFilename FileExists  S_DOES_FILE_EXIST 'C:\MYFILES\FILEA.TXT' Result S_END_OF_FILE Move the cursor to the end of the current file. Reference  + S_END_OF_LINE Move the cursor to the end of the current line within the current file. Reference  S_END_OF_SCREEN Move the cursor to the end of the current page within the current file. S_GET_BUFF_COL_NUM Retrieve the current column number of the current line in The SMART Editor file contained in the specified buffer. Arguments  Buffer_number - the buffer number containing the desired file. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu).  ReturnVariable - the name of the variable to contain the results Return Values  Column number Examples  S_GET_BUFF_COL_NUM 2 ColumnNumber  S_GET_BUFF_COL_NUM MasterFileBufferNum ColNumInMaster S_GET_BUFF_EDITMODE Retrieve the edit mode of The SMART Editor file contained in the specified buffer. Arguments  Buffer_number - the buffer number containing the desired file. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu).  ReturnVariable - the name of the variable to contain the results Return Values  "READONLY" or "EDIT" Examples  S_GET_BUFF_EDITMODE 2 EditMode  S_GET_BUFF_EDITMODE MasterFileBufferNum EditModeOfMaster S_GET_BUFF_FILENAME Retrieve the filename of The SMART Editor file contained in the specified buffer. Arguments  Buffer_number - the buffer number containing the desired file. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu).  ReturnVariable - the name of the variable to contain the results Return Values  Filename Examples  S_GET_BUFF_FILENAME 2 Name2  S_GET_BUFF_FILENAME LinkedBufferNum LinkedFilename S_GET_BUFF_LINE_NUM Retrieve the current line number in The SMART Editor file contained in the specified buffer. Arguments  Buffer_number - the buffer number containing the desired file. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu).  ReturnVariable - the name of the variable to contain the results Return Values  Line number Examples  S_GET_BUFF_LINE_NUM 2 ColumnNumber  S_GET_BUFF_LINE_NUM MasterFileBufferNum LineNumInMaster S_GET_BUFF_WORDWRAP Retrieve the word wrap mode of The SMART Editor file contained in the specified buffer. Arguments  Buffer_number - the buffer number containing the desired file. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu).  ReturnVariable - the name of the variable to contain the results Return Values  "WRAP" or "NOWRAP" Examples  S_GET_BUFF_WORDWRAP 2 WrapMode  S_GET_BUFF_WORDWRAP MasterFileBufferNum WrapModeOfMaster S_GET_CLIP_FILENAME Retrieve the filename of The SMART Editor current clip file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Path and Filename of the clip file Examples  S_GET_CLIP_FILENAME Clipfile S_GET_COL_NUM Retrieve the column number of the cursor within The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Column Number Examples  S_GET_COL_NUM ColumnNumber S_GET_CURR_CHAR Retrieve the character at the cursor in The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Character pointed to by cursor in current The SMART Editor file Examples  S_GET_CURR_CHAR CurrCharacter S_GET_CURR_CHGSTATUS Retrieve the change status of The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  "TRUE" if the current file has been changed  "FALSE" if the current file has not been changed Examples  S_GET_CURR_CHGSTATUS ChangeStatus S_GET_CURR_EDITMODE Retrieve the the edit mode of The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  "READONLY" or "EDIT" Examples  S_GET_CURR_EDITMODE EditMode S_GET_CURR_FILENAME Retrieve the filename of The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Filename of The SMART Editor current file Examples  S_GET_CURR_FILENAME CurrentFilename S_GET_CURR_SL_DIR Retrieve the name of The SMART Editor current directory. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Pathname of The SMART Editor current directory Examples  S_GET_CURR_SL_DIR CurrentDirectory S_GET_CURR_STRING Retrieve the current string in the current file. A string is delimited by a 'C' coding keyword delimiters as implemented by The SMART Editor. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Keyword String pointed to by cursor in current file Examples  S_GET_CURR_STRING CurrentWord S_GET_CURR_WORD Retrieve the current word in The SMART Editor current file. A word is a string delimited by a space, or a newline. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Word pointed to by cursor in current The SMART Editor file Examples  S_GET_CURR_WORD CurrentWord S_GET_CURR_WORDWRAP Retrieve the the word wrap mode of The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  "WRAP" or "NOWRAP" Examples  S_GET_CURR_WORDWRAP WordwrapMode S_GET_CURSOR_POS Retrieve the offset of the cursor in The SMART Editor current file. This is relative to the beginning of the file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Cursor position Examples  S_GET_CURSOR_POS CursorPosition S_GET_DISK_SPACE Retrieve the available disk space on the specified disk. Arguments  Drive - the letter of the specified drive  ReturnVariable - the name of the variable to contain the results Return Values  Available Space Examples  S_GET_DISK_SPACE C SpaceOnDriveC  S_GET_DISK_SPACE CurrentDrive SpaceOnCurrDrive S_GET_ENV_INFO Retrieve the information for the specified environment variable. Arguments  Environment Variable - the environment variable contained in CONFIG.SYS  ReturnVariable - the name of the variable to contain the results Return Values  String containing the environment data from CONFIG.SYS Examples  S_GET_ENV_VAR PathEnvironmentVariable PathEnvironmentData  S_GET_ENV_VAR 'SL_BACKUP2' BackupDirectory S_GET_FILE_BUFFNUM Retrieve The SMART Editor buffer number containing the specified The SMART Editor file. Arguments  Filename - the name of The SMART Editor file  ReturnVariable - the name of the variable to contain the results Return Values  Buffer number containing the specified The SMART Editor file Examples  S_GET_FILE_BUFFNUM SearchFilename SearchBufferNum  S_GET_FILE_BUFFNUM 'C:\text\Search.lst' SearchBufferNum S_GET_FILE_INFO Retrieve the date, time and size of the specified file. Arguments  Filename - the name of The SMART Editor file  ReturnVariable - the name of the variable to contain the results Return Values  File information - "Size: nnnnnnn Date: mm/dd/yy hh:mm:ss" Examples  S_GET_FILE_INFO MyFile FileInfo  S_GET_FILE_INFO 'C:\CONFIG.SYS' ConfigFileInfo S_GET_LINE_LEN Retrieve the length of the current line in The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Length Examples  S_GET_LINE_LEN LineLength S_GET_LINE_NUM Retrieve the current line number in The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Line number Examples  S_GET_LINE_NUM LineNumber S_GET_NUM_SL_FILES Retrieve the number of opened files. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Number of files Examples  S_GET_NUM_SL_FILES NumberOfOpenedFiles S_GET_REF_FILENAME Retrieve the filename of the specified reference file. Arguments  Reference File Number 1 = Find File 2 = Search File 3 = Multiple Definitions File 4 = Multiple References File 5 = Macro Output File  ReturnVariable - the name of the variable to contain the results Return Values  Filename Examples  S_GET_REF_FILENAME 5 MacroOutputFilename  S_GET_REF_FILENAME 2 FindFileList S_GET_SELECTED_SIZE Retrieve the length of the selected text in The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Length Examples  S_GET_SELECTED_SIZE LengthOfSelectedText S_GET_SELECTED_TEXT Retrieve the selected text within The SMART Editor current file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  String containing the selected text Examples  S_GET_SELECTED_TEXT SelectedText S_GET_SL_INI_PATH Retrieve the path containing The SMART Editor current INI file. Arguments  ReturnVariable - the name of the variable to contain the results Return Values  Path of the current INI file Examples  S_GET_SL_INI_PATH PathOfINI S_GOTO_BEG_BRACE Move the cursor to the preceding beginning brace ( { ) and highlight it. Reference  "Edit" menu, "Braces", "Find Beginning Brace" S_GOTO_BUFF Make the file in the indicated buffer The SMART Editor current file. Arguments  Buffer_Number - the buffer number containing the file to be made current. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu). Examples  S_GOTO_BUFF BufferContainingMasterFile  S_GOTO_BUFF 2 S_GOTO_COL Move the cursor to the specified column number within the current file. If the desired column is contained within a TAB, the cursor will be positioned at the next tab location; this macro does not replace tabs with spaces. Arguments  Column number Examples  S_GOTO_COL 40  S_GOTO_COL CommentPosition S_GOTO_END_BRACE Move the cursor to the following ending brace ( } ) and highlight it. Reference  "Edit" menu, "Braces", "Find Ending Brace" S_GOTO_LINE Move the cursor to the specified line number within the current file. Arguments  Line number Examples  S_GOTO_LINE 123  S_GOTO_LINE LineOfSavedFunction Reference  "Edit" menu, "GoTo Line" S_GOTO_MARK (Marker_number) Move the cursor to the position saved by the specified marker number. The marker must have been previously set by the "S_MARK_CURR_POS" macro or by "Set Marker" in the "Place Markers" submenu under the "More" menu. Arguments  Marker number - this can be 0 through 9 Examples  S_GOTO_MARK MarkForFunctionX  S_GOTO_MARK 2 Reference  "More" menu, "Place Markers", "GoTo Marker" S_GOTO_POS Move the cursor to the last saved position. The saved position is defined by the S_SAVE_POS macro. The saved position is set by The SMART Editor automatically when the following commands are executed: "Find Beginning Brace", "Find Ending Brace", "Goto Marker", "Goto Line", and "Link-To". Reference  "More" menu, "Cursor", "GoTo Cursor Position" S_INDENT Move the cursor to the position on the current line so that it is lined up with the left justified position of the previous line. This command is used when you create a new line and want to position at the indention of the previous line. Reference  "Options", "Setup Options", "Auto Indent" S_INSERT_CLIP Copy The SMART Editor current clip file to the current position in The SMART Editor current file. The clip file must be less than 64k. The current The SMART Editor file must be in edit mode. Reference  "Clip" menu, "Paste Clip File at Cursor" S_INSERT_FILE Open the specified file and read it into the current file at the current cursor position. A binary file cannot be inserted. The current The SMART Editor file must be in edit mode. The filesize of the inserted file is limited to 64k. Arguments  Filename - the name of the file to be inserted Examples  S_INSERT_FILE FileToBeInserted  S_INSERT_FILE 'F:\SLINK2\TEMP\SL_CLIP.TXT' Reference  "Edit" menu, "Paste File at Cursor" S_INSERT_LINE Insert the designated string into the current file at the current cursor position and append a carriage return. The maximum string length is 80 characters. The current file must be in edit mode. Arguments  String to insert Examples  S_INSERT_LINE 'This is a new line of text'  S_INSERT_LINE CommonLineOfData S_INSERT_PASTE Copy the paste buffer to the current cursor position within the current file. The current file must be in edit mode. Reference  "Edit" menu, "Paste" S_INSERT_STRING Insert the designated string into the current file at the current cursor position. The maximum string length is 80 characters. The current file must be in edit mode. Arguments  String to insert Examples  S_INSERT_STRING 'Programmed by Joe'  S_INSERT_STRING CommonStringToInsert S_IS_DRIVE_PROTECTED Check if the specified drive is write protected. Arguments  Drive - the letter of the specified drive  ReturnVariable - the name of the variable to contain the results Return Values  "TRUE" if the drive is write protected  "FALSE" if the drive is not write protected Examples  S_IS_DRIVE_PROTECTED A ItIsProtected  S_IS_DRIVE_PROTECTED Drive ItIsProtected S_IS_FILE_BINARY Check if the specified file is binary (contains non-ascii data). Arguments  Filename - the name of the file to check  ReturnVariable - the name of the variable to contain the results Return Values  "TRUE" if the file is binary  "FALSE" if the file is not binary Examples  S_IS_FILE_BINARY MyFilename IsBinary  S_IS_FILE_BINARY 'D:\User\File.def' IsBinary S_LISTBOX Display a listbox and allow the user to update it. The listbox entries are contained in a file which is updated with the user's additions and deletions. The arguments must be separated by a comma. The listbox entries will be read from the listbox file and the listbox will be displayed. The user can press the "ADD" pushbutton to add entries to the listbox. The user can press the "DELETE" pushbutton to delete entries from the listbox. To select an entry, click on an entry in the listbox and press the "OK" pushbutton, or double-click on an entry in the listbox. This entry will be returned to the calling macro. The user can press the "STORE" pushbutton to update the listbox file with all added and deleted entries and then exit the listbox with no selected entries. The user can press the "OK" pushbutton, or double-click on an entry in the listbox, to update the listbox file with all added and deleted entries and then exit the listbox with the currently selected entry. Arguments  ListFilename - the name of the file containing the listbox entries, each entry is contained on a separate line within the file.  ListboxTitle - the title of the listbox  ReturnVariable - the name of the variable to contain the the results Return Values  "CANCEL" - returned when the user presses the "Cancel" pushbutton  "NOSEL" - returned when the user presses the "Store" pushbutton  Entry selected from the listbox Examples  S_LISTBOX ListFilename', Title of the Listbox, SelectedItem' S_MARK_CURR_POS Set the specified marker number to the current cursor position within the current file. If the marker is already set, it will be reset. Arguments  Marker number - this can be 0 through 9 Examples  S_MARK_CURR_POS 2  S_MARK_CURR_POS LocationOfFunctionX Reference  "More" menu, "Place Markers", "Set Marker" S_MSG Display a specified message and allow the user to respond OK or CANCEL. The message is limited to three lines, each a maximum of 59 characters, each terminated with a comma. Arguments  Message line 1 - maximum length 59, terminated with a comma  Message line 2 - maximum length 59, terminated with a comma  Message line 3 - maximum length 59, terminated with a comma  ReturnVariable - the name of the variable to contain the the results Return Values  "OK" or "CANCEL" Examples  S_MSG 'First Line, , Third Line, UserResult' S_NEXT_CHAR Move the cursor to the next character in the current file. Reference  S_NEXT_LINE Move the cursor to the next line in the current file. Reference  S_NEXT_PAGE Move the cursor to the next page in the current file. Reference  S_NEXT_WORD Move the cursor to the next word in the current file. Reference  + S_OPEN_FILE Open the specified non-The SMART Editor file and return the file handle. Arguments  File exists mode O = Open the file if it exists R = Replace the file if it exists  New file mode C = Create the file if it does not exist F = Error if the file does not exist  Filename - the name of the file to be opened  ReturnVariable - the name of the variable to contain the the results Return Values  File handle Examples  S_OPEN_FILE R C NewFilename NewFileHandle  S_OPEN_FILE O F 'C:\CONFIG.SYS' ConfigHandle S_OPEN_SL_FILE Opens the specified file, read it into The SMART Editor buffer, and make it available to The SMART Editor for editing. If the file exists, it is opened in the default file mode (edit or read-only); otherwise it is opened in edit mode. If the file is binary, it will be opened in hexadecimal mode. The SMART Editor current drive and directory are updated. Arguments  Open mode 0 = error if the file doesn't exist 1 = create the file if it doesn't exist  Edit mode R = read-only E = edit D = default edit mode  Word wrap mode Y = wrap N = no wrap  Filename - the name of the file to be opened Examples  S_OPEN_SL_FILE 1 E N MyFile  S_OPEN_SL_FILE 0 R Y 'E:\CONFIG.SYS' Reference  "File" menu, "Open/New" S_PREV_BUFFER Display and make current the file that was previously displayed in the current window. Reference  "More" menu, "File Buffers", "Last File" S_PREV_CHAR Move the cursor to the previous character in the current file. Reference  S_PREV_LINE Move the cursor to the previous line in the current file. Reference  S_PREV_PAGE Move the cursor to the previous page in the current file. Reference  S_PREV_WORD Move the cursor to the previous word in the current file. Reference  + S_PRINT_CURR_FILE Print the current file. Hexadecimal files are not printed. Reference  "More" menu, "Printing", "Print Current File/Select" S_PRINT_SELECTED Print the selected text in the current file. Hexadecimal files are not printed. Reference  "More" menu, "Printing", "Print Current File/Select" S_PROMPT Display a specified prompt message, allow the user to enter a response and press OK, or press CANCEL. The prompt message is limited to 60 characters and must be terminated with a comma. The return data is limited to 255 characters. Arguments  Prompt message - the prompt message to be displayed  ReturnVariable - the name of the variable to contain the the results Return Values  If the user enters a response and presses OK, the response is returned.  If the user presses CANCEL, then "CANCEL" is returned. Examples  S_PROMPT 'Enter the Filename,' NewFilename  S_PROMPT PromptMessage, UserResponse S_READ_FILE Read the specified non-The SMART Editor file and return the data read. Arguments  File handle - this is returned to the user by the "S_OPEN_FILE" macro  Length - the number of bytes to read (max 255)  ReturnVariable - the name of the variable to contain the the results Return Values Examples  S_READ_FILE MyFileHandle LenToRead DataBuffer  S_READ_FILE MyFileHandle 100 DataBuffer S_REDO Restore the current file to the state prior to the last "Undo" function. Reference  "Edit" menu, "Undo/Redo", "Redo" S_RENAME_CLIP_FILE Rename The SMART Editor current clip file. Arguments  Filename - the path and filename of the clip file Examples  S_RENAME_CLIP_FILE 'F:\WORKFILE.TXT'  S_RENAME_CLIP_FILE TempClipFile Reference  "Clip" menu, "Rename Clip File" S_REPLACE Search The SMART Editor current file for the specified search string and replace it with the specified replace string. The maximum search string length is 80 characters. The maximum replace string length is 255 characters. There is no verification permitted - all strings found will be replaced. The count of replacements made will be returned. Arguments  Search string - the string to search for terminated with a comma  Replace string - the replace string terminated with a comma  ReturnVariable - the name of the variable to contain the the results Return Values  Number of replacements made Examples  S_REPLACE 'LookingFor, ReplacedBy, NumberReplaced'  S_REPLACE 'String to Find, Replace String,' NumberReplaced Reference  "Edit" menu, "Replace String" S_SEARCH_BACK Search backwards in The SMART Editor current file for the specified string and highlight the found text. The maximum string length is 79 characters. Arguments  Case Sensitive 0 = not case sensitive 1 = case sensitive  String - the string to search for Examples  S_SEARCH_BACK 1 LookingFor  S_SEARCH_BACK CASE_SENSITIVE 'MyFunction' Reference  "Edit" menu, "Current Searches", "Search Backward" S_SEARCH_FWD Search The SMART Editor current file for the specified string and highlight the found text. The maximum string length is 79 characters.  Case Sensitive 0 = not case sensitive 1 = case sensitive  Top 0 = search from the current position 1 = search from the top of the file  String - the string to search for Examples  S_SEARCH_FWD 1 0 LookingFor  S_SEARCH_FWD CASE_SENSITIVE TOP 'MyFunction' Reference  "Edit" menu, "Current Searches", "Search Current File" Examples  S_SEARCH_FWD 1 0 looking_for S_SEARCH_NEXT Search again The SMART Editor current file for the predefined string and highlight the found text. The string must have been defined by the "S_SEARCH_FWD" or "S_SEARCH_BACK" macro. Reference  "Edit" menu, "Current Searches", "Continue Search" S_SET_DB_PATH Set the path for the link database. Arguments  Path - the path for the link database. Examples  S_SET_DB_PATH MyProject  S_SET_DB_PATH 'D:\Work\CurrentDB' S_SAVE_ALL_FILES Save all The SMART Editor files. Any file in hexadecimal mode will not be saved. Reference  "File" menu, "Save", "Save All" S_SAVE_CURR_FILE Save The SMART Editor current file. If the file is in hexadecimal mode, it will not be saved. Reference  "File" menu, "Save", "Save Current" S_SAVE_POS Save the position of the cursor within the current file. This should be used for saving the position of the cursor on a temporary basis. The SMART Editor automatically saves the cursor (and overwrites your saved position) when the following commands are executed: "Find Beginning Brace", "Find Ending Brace", "Goto Marker", "Goto Line", and "Link-To". Use "S_MARK_CURR_POS" to save the cursor position for a longer period. Reference  "More" menu, "Cursor", "Save Cursor Position" S_SAVE_SL_FILE Save the file specified by Buffer Number, the buffer number containing the file to be saved. If the file is in hexadecimal mode, it will not be saved. Arguments  Buffer_Number - the buffer number containing the file to be saved. This can be 0 through the maximum number of files opened. The buffer number relates to the position of the file in the files list (displayed at the end of the "File" menu). Examples  S_SAVE_SL_FILE BufferNumOfMyFile S_SAVEAS_CURR_FILE Save the current file with a new filename. If the file is in hexadecimal mode, it will not be saved. Arguments  Filename - the new name of the file Examples  S_SAVEAS_CURR_FILE UpdatedFile  S_SAVEAS_CURR_FILE 'D:\Slink2\Temp\OrigFile.C' Reference  "File" menu, "Save As" S_SELECT_BRACED_CODE Select the text contained by the next higher level of braces ( {...} ) in The SMART Editor current file. Reference  "Edit" menu, "Braces", "Select Braced Code" S_SELECT_LINE Select the line containing the cursor in The SMART Editor current file. S_SELECT_PAGEDOWN Select the next page in the current file. Reference  + S_SELECT_PAGEUP Select the previous page in the current file. Reference  + S_SELECT_WORD Select the word containing the cursor in The SMART Editor current file. A word is a string delimited by a space, or a newline. S_SPLIT_SCREEN This macro defines a full window or split screen for displaying The SMART Editor files. Arguments  Split screen mode 0 = full screen 1 = horizontal split - 2 equal halves 2 = horizontal split - smaller on top 3 = horizontal split - smaller on bottom 4 = vertical split - 2 equal halves 5 = vertical split - smaller on left 6 = vertical split - smaller on right Examples  S_SPLIT_SCREEN 2 Reference  "More" menu, "Window Configuration" S_SWAP_FOCUS Swap the focus on a split screen. The focus is moved from the active window to the inactive window, thereby activating the inactive window and making it The SMART Editor current file. Reference  "More" menu, "Window Control", "Swap Focus" S_SWAP_WINDOWS Swap the files displayed on a split screen; each file is moved to the other display window. Reference  "More" menu, "Window Control", "Swap Windows" S_SYNC_SCROLL Lock two The SMART Editor files together so they will scroll together. The display must be in a split screen mode. Reference  "More" menu, "Window Control", "Sync Scroll" S_WRITE_FILE (Handle, Length, Data_to_write, ResultVariable) Write the specified data to the specified file and return the actual count of data written. Arguments  File handle - this is returned to the user by the "S_OPEN_FILE" macro  Length - the number of bytes to write (max 255)  Data to write  ReturnVariable - the name of the variable to contain the the results Return Values  Number of bytes written. Examples  S_WRITE_FILE MyFileHandle 14 'This is a File' Count  S_WRITE_FILE MyFileHandle LENGTH(DATA) DATA BytesWritten S_UNDO Restores the current file to the state prior to the last edit function. Reference  "Edit" menu, "Undo/Redo", "Undo" Chapter 9 - Macros Table of Contents ═══ 13. Glossary of Terms ═══ Glossary of Terms A accelerator key A key combination that carries out a function in The SMART Editor. active window The window which has the focus and where the next keystroke will apply. The file in the active window is The SMART Editor current file. The name of the file in the active window is displayed on The SMART Editor banner. auto-indent A feature that positions the cursor on the new line at a position which lines up with the left justified position of the previous line whenever is pressed. B back The SMART Editor command which displays the previous file in the window which has the focus. base directory The starting or highest level directory. This must be defined for The SMART Editor "Find" and "Search" commands. buffer A portion of storage to hold temporary input or output data. button A button in a dialog box, when pressed, carries out or cancels the defined action. C Call Tree A graphic display of the calling relationships of the functions defined in a The SMART Editor database. The functions are shown as a branching structure that resembles a tree. Functions are shown as branches off of the top-level function, known as the call tree root. A Call Tree report is automatically generated every time you create or update a The SMART Editor database. case sensitive A feature that specifies that the associated function or string is to be considered a match only if the item matches exactly on upper and lower case. Cases The The SMART Editor commands supporting upper and lower case text conversions. check box A small square box that appears in a dialog box and can be set or cleared. When the check box is set, an X or check mark appears in the box. click To press and release a mouse button quickly. When you click on a word in a The SMART Editor file, the word is selected and becomes the default for the next search or link-to command. clip file An easily accessible file used to store data. The SMART Editor defines a default clip file. You can maintain multiple clip files by renaming the active clip file. close To remove a file from The SMART Editor. You can choose to save an updated file before closing it. current Call Tree The Call Tree report for The SMART Editor current database. It can be accessed from The SMART Editor Reference menu. current DB path The SMART Editor current database path. You can define the current DB path from The SMART Editor Link menu. current Function Def List The Function Definition List for The SMART Editor current database. It can be accessed from The SMART Editor Reference menu. current Hexadecimal Format A view of the current file in hexadecimal format. This display can be accessed from The SMART Editor Reference menu. current Mod/Functions List The Module/Function List for The SMART Editor current database. It can be accessed from The SMART Editor Reference menu. current database The The SMART Editor database which resides in the current DB path. current file The file which is contained in The SMART Editor active window. The name of the current The SMART Editor file is displayed on The SMART Editor banner. cut To move text from a The SMART Editor file to the paste buffer. D database An organized collection of related files and data. data entry box A box within a dialog panel where you type information needed to carry out the chosen command. The data entry box may be blank when the dialog panel appears or it may contain default data. #define list A report generated from The SMART Editor database when #defines are included in the database. This report lists each #define item defined in the database. This list is in alphabetical order. de-selected A de-selected listbox is a listbox which has no selections highlighted. dialog list A report generated from The SMART Editor database when dialogs are included in the database. This report lists each dialog item (DLGTEMPLATE or WINDOWTEMPLATE) defined in the database. This list is in alphabetical order. dialog panel A rectangular box that either requests or provides information. directory A collection of files and subdirectories that are stored on the same location on a disk. directory tracking A feature that defines whether a directory is maintained between The SMART Editor commands. For example, the directory defined for a Copy command would become the default directory for the next command (e.g. "Search", "Delete", etc). disabled A disabled option is an option which is not selected or is not active. double click To rapidly press and release a mouse button twice without moving the mouse. If you double click on a word in a Sourcelink file with the left button, The SMART Editor will execute the link-to-definition command; If you double click on a word in a Sourcelink file with the right button, The SMART Editor will execute the link-to-reference command. drive A device used for storing and retrieving data. E edit mode A file display mode which allows a file to be changed. enabled An enabled option is an option which has been selected or is active. environment variable A programmer-specified operating system parameter that is used to identify configuration information to the runtime system. These are contained in the CONFIG.SYS file. F file attribute A characteristic of a file. For example, a file can be assigned a Read Only attribute which specifies that the file cannot be updated. find The SMART Editor command that locates all of the copies of the specified file(s). Find Files List The SMART Editor reference file which contains the results of the last Find Files command. Each file found is listed with its size and date/time stamp. focus The window that has the focus is the window containing The SMART Editor current file. It is the active window. font A graphic design applied to all numbers, symbols and characters in the alphabet. A font comes in different sizes and provides different styles such as bold and italic. full path The directions to a file. This includes the drive, directories, and filename. For example, C:\MYAPP\SLDB\DOCCALL.RPT contains the file DOCCALL.RPT which resides in the SLDB subdirectory under the MYAPP directory on drive C. function definition A function definition is the source for a function; e.g. myfunc( int, int ). Function Definition List A report generated from The SMART Editor database which lists each of the functions defined in the associated The SMART Editor database in alphabetical order. Each function is displayed with the path of the module in which it resides and the line number within that module. Double-clicking on an entry opens the source file and moves the cursor to the desired function definition. A Function Definition List is automatically generated every time you create or update a The SMART Editor database. function reference A function reference is a reference to a function; e.g. myfunc( iFirstInt, iSecondInt ). G global list A report generated from The SMART Editor database when globals are included in the database. This report lists each global item defined in the database. This list is in alphabetical order. H hexadecimal format Each character in the file is displayed with its hexadecimal value. There are 16 characters displayed per line; the ASCII characters are also displayed on the right (if the character is printable). highlighted Selected text that may be affected by your next action. Highlighted text appears in a different color. hyperlink path A path saved by The SMART Editor which includes all hyper-text linkage within the current session. You can walk this path by hypertracking. hyper-text linkage A feature that allows you to go to an item by double-clicking on it. For example, if you double click on a full path, that file will be opened and displayed as the current The SMART Editor window. If you double click on a function, The SMART Editor will search the current The SMART Editor database for a match on that function definition or reference depending on which button was clicked. If only one match is found, the source file will be opened and the cursor will be positioned at that function. If multiple matches were found, a file containing a listing of the matches will be displayed and you can double click on the specific entry and the source file will be opened and the cursor will be positioned at that function. hypertrack A feature that allows you to go forwards and backwards along a hyperlink path. After you have double clicked (or opened files), you can traverse backwards along this path by hypertracking in the reverse direction (hyertrack backwards). You then have the option of retracing your steps and moving forward along the previously created hyperpath by hypertracking forwards. I IFDEF A preprocessor compiler command that allows source code to be ignored. When building The SMART Editor database with IFDEFs, The SMART Editor will prompt you to set the desired preprocessor variables, and then skip the functions contained within the ignored code. The #if, #ifdef, #if defined, #else and #endif preprocessor commands are processed by The SMART Editor. IFDEF defines The variables found on the IFDEF preprocessor statements are considered by The SMART Editor to be IFDEF defines. For example, the preprocessor statement "#if defined MODE_A || !defined MODE_B" would generate the IFDEF defines MODE_A and MODE_B. When building a The SMART Editor database with IFDEFs, you would be prompted to define the value of MODE_A and MODE_B (whether or not they are set). L last file The SMART Editor command which displays and makes current the file that was previously current in the window which has the focus. left justify at cursor The SMART Editor command which moves the current line of data to begin at the location of the cursor. link To interconnect items of data or portions of one or more programs. linked function A function which resides in The SMART Editor database. link-to-item The SMART Editor command which prompts for the search function(s), then searches The SMART Editor current database for all functions that match the search function. Item refers to either definitions or references. Multiple matches are stored in the Multiple Definition List or Multiple XRef List reference file. link-to-definition The SMART Editor command which searches The SMART Editor current database for all definitions of the previously defined function. Multiple matches are stored in the Multiple Definition List reference file. link-to-reference The SMART Editor command which searches The SMART Editor current database for all references to the previously defined function. Multiple matches are stored in the Multiple XRef List reference file. listbox Within a dialog panel a box listing available choices. If all the choices won't display, the listbox has a vertical scroll bar. list-of-files The SMART Editor file which contains a list of full path filenames. This file is created with the "Maintain a List of Files" command. This file is needed when creating a The SMART Editor database, when copying files and the source is defined as a list, and when doing a multiple file string replace. lock A file attribute that controls access to the file. M macro language A command programming language which extends the power of an application. The SMART Editor uses IBM's Rexx macro language. macro output The output generated from a Rexx macro which was run from The SMART Editor. main function A program entry named 'main' that is the first user function to obtain control when program execution begins. marker A number associated with a saved position within a The SMART Editor file. mask A pattern of characters that control the testing or selection of another pattern of characters. menu A list of items, most of which are The SMART Editor commands. Menu names appear in the menu bar below The SMART Editor banner. Microsoft QuickHelp A help system which enables you to reference multiple libraries from Microsoft; e.g. help on the Microsoft C compiler, OS/2. minimize To temporarily exit The SMART Editor and save it as an icon. module A source file containing functions linked in a The SMART Editor database. Module/Function List The SMART Editor report which lists the function definitions for each module defined in The SMART Editor database. The modules are listed in alphabetical order. The functions are listed in the order they appear within the source module. Each function is displayed with the path of the module in which it resides and the line number within that module. Double clicking on an entry opens the source file and moves the cursor to the desired function definition. A Module/Function List is automatically generated every time you create or update a The SMART Editor database. Multi-File Search List The SMART Editor reference file containing the matches found from the last Multi-file string search command. Each match found is listed with the full path of the file containing the match, the line number where the string was found, and the line containing the matched string. Double clicking on an entry opens the source file and moves the cursor to the matched string. Multiple Definition List The SMART Editor reference file containing the results from the last link-to-definition command when multiple definitions are found in the database. This list can also be generated by double-clicking on a function with the left button. Each file satisfying the link is listed with the full path of the file containing the match, the line number where the function definition was found, and the line number containing the matched function definition. Double clicking on an entry opens the source file and moves the cursor to the desired function definition. Multiple XRef List The SMART Editor reference file containing the results from the last link-to-reference command when multiple definitions are found in the database. This list can also be generated by double clicking on a function with the right button. Each file satisfying the link is listed with the full path of the file containing the match, the line number where the function definition was found, and the line number containing the matched function definition. Double-clicking on an entry opens the source file and moves the cursor to the desired function. N navigation The process of moving. You can navigate within a file or between The SMART Editor files. next file The SMART Editor command that makes the next file in The SMART Editor open file list the current The SMART Editor file. The list of opened The SMART Editor files appears at the end of the file menu. O online help The SMART Editor help information that can be retrieved interactively by way of the key or by clicking on the "Help" button contained within a dialog panel. open To display the contents of a file on the screen. When you open a file it is refered to as a The SMART Editor file. P paste A command to transfer the contents of The SMART Editor buffer to the current The SMART Editor file or clip file. path name The sequence of directories in a hierarchical file system that must be traversed to locate a particular file. project An instance of The SMART Editor for a specific project having its own identity. In this manner a specific instance of The SMART Editor can have its own command files, macro files, reference files, directories, and default database. You can use the project identifier to direct files from SLStart to this specific instance of The SMART Editor. R read only mode The file mode that specifies that a file can be opened but not edited. received files Files passed to The SMART Editor from other applications (e.g. WorkFrame/2) or command files via the SLStart program. redo A command to restore the last undo edit function. reference file A system file or quick access file retrieved from The SMART Editor reference menu. refresh The SMART Editor command to replace the current file with a clean copy from disk. Rexx The 'RE'structured e'X'tended e'X'ecutor language is a general purpose programming macro language supported by OS/2 and The SMART Editor. root directory The highest directory of a drive. S save To write The SMART Editor updated file to disk. search To scan for a match on a defined string. scroll bars The bars at the bottom and right edge of the screen with which you can move text up or down, left or right, in order to see parts of a file that cannot fit on the screen. select To highlight an item by clicking it with the mouse or using key combinations. Selecting does not initiate an action; it defines the text that will be acted upon by a future action. SLStart A monitor and loading program used for passing files for Sourcelink to open. This is used with the IBM WorkFrame/2 program to open multiple files without creating multiple instances. This is also used in command files (e.g. make or compile) to send a file automatically back to The SMART Editor. snapshot A copy of The SMART Editor file saved automatically if specified on The SMART Editor options menu. The SMART Editor banner The title bar on the top of The SMART Editor screen which displays the name and status of The SMART Editor current file. The SMART Editor buffer A temporary storage area that holds selected text. The SMART Editor backup directory The SMART Editor directory where files opened in edit mode are copied when they are opened. The SMART Editor file A file opened by The SMART Editor and available for display and/or editing. The SMART Editor Link database A database containing all of the linked function definitions and references, and all of the defines from the IFDEF preprocessor statements. The source files contained within the database are listed in a The SMART Editor List-of-Files file which resides in the same directory as the generated database. split screen The The SMART Editor screen divided into two windows; each window can contain a different file. string A word or group of words containing ASCII characters. sync scroll To lock two files together so they scroll together; you must have a split screen to activate this The SMART Editor command. The active window becomes the master. When the master window is scrolled, the other window scrolls too. When the other window is scrolled, the master window does not follow. T template A pattern of characters that control the testing or selection of another pattern of characters. Template Macro The SMART Editor has provided automated 'C' templates which identify the word at the current cursor position and replace the word with generated code. For example, f is replaced by for( ; ; ). This macro can be customized by the user. thread A unit of execution within a program. trace The ability to get information about the current Rexx command when running a Rexx macro. tracks A history of The SMART Editor file accesses. Each time a The SMART Editor file is moved out of a The SMART Editor window, an entry is made into the tracks The SMART Editor history reference file. Each entry contains the file name and the last line number referenced. The latest entry is stored on the top of the list. U undo A command to delete the last edit command. If the previous edit function is a redo, the previous redo edit function is deleted. Unreferenced Function List A report generated from The SMART Editor database which lists each function defined in the database but not referenced. This list is in alphabetical order. User Defined List A list of items to be included in The SMART Editor database. User Specified Link List A report generated from The SMART Editor database which lists each item that matches the User Defined List and is referenced in the database. This list is in alphabetical order. V verify An option which creates a confirmation message prior to executing the specified command. For example, when executing a replace with verify enabled, The SMART Editor displays a confirmation prior to replacing the matched string. W Waiting Files Files passed to The SMART Editor from other applications (e.g. WorkFrame/2) or command files via the SLStart program wildcard A character that represent other characters. For example, The SMART Editor refers to the *.* wildcard which indicates any filename with any file extension; the *.C wildcard indicates any filename with a C file extension. The SMART Editor allows you to define your own wildcard. For example, if you wanted all files beginning with db, you could specify a wildcard of db*.*. word wrap A feature that moves text from the end of a line to the next line when the right edge of the screen is reached. You do not press at the end of each line of a paragraph. WorkFrame/2 The IBM Workframe/2 application. Table of Contents ═══ 14. Appendix A - Specifications ═══ Appendix A - Specifications The SMART Editor Version 2.0 Specifications Operating System - OS/2 Version 2 or higher (32 Bit versions) Supports 3 button mouse ("Back" function) - such as Mouse Systems White Mouse and Mouse Systems PC Mouse III Language Support for linking - 'C', C++* and ASM source code Max Values Maximum Number of Files 'open'- 22 Maximum file pathlength - 127 Number of path directory levels - 10 Maximum function name length - 40 Maximum ifdef name length - 40 Maximum entries in tracks file - 35 Maximum levels in Call Tree - 50 Size of paste buffer (KB) - 64 Maximum string length (search buffer) - 80 Minimum edit events for snapshot - 10 Maximum edit events for snapshot - 63,999 Maximum undo edit events/file - 255 Maximum size of file for Hex Display (bytes) - 150,000 Number of place markers - 10 Maximum functions and references - virtually unlimited Maximum size of inserted file (KB) - 64 Maximum size of List-of-Files file (KB) - 64 Maximum size of listbox data (KB) - 64 Maximum size of selected text (KB) - 64 Maximum text line length - 254 Maximum ViewHelp environment variable - 1,064 Maximum Undos saved per opened, edit file - 255 Minimum Build Buffersize (KB) - 16 Maximum Build Buffersize (KB) - 1,024 The SMART Editor (SLINK) database path length - 47 Number of The SMART Editor databases per directory - 1 Number of concurrent users per database - 1 Number of preprocessor variables per database - 1000 Number of preprocessor constants per database - 500 (when a number resides on a preprocessor statement; (e.g. #if pp_value > 1 || pp_value < 5 ... 1 and 5 are preprocessor constants) Maximum number of User Macro menu items - 16 Maximum number of User Command menu items - 16 Maximum number of characters in Command menu item - 127 Maximum number of concurrent running macros - 1 Number of hours Snapshots are retained - 24 Supported preprocessor statements (C and C++ Source) #if #ifdef #if defined #else #elif #endif (ASM Source) if ife ifdef ifndef else elseif elseife elseifdef elseifndef endif Supported preprocessor operators (C and C++ Source) || ! > => < <= != == (ASM Source) AND OR GT GE LT LE EQ NE Supported #define operators (C, C++ Source) #define (ASM Source) EXTRN ABS EQU Supported Global operators (C, C++ Source) (ASM Source) EXTRN BYTE WORD DWORD FWORD QWORD TBYTE Supported dialog keywords (C, C++ Source) DLGTEMPLATE WINDOWTEMPLATE NOTES C++ support does not include function overloading, class scope, and class inheritance with this version. Member functions (methods) will be parsed as functions but not associated with a specific class. Structures, typedefs, enums are not supported by automatic hyperlinks. If 0 is used as a preprocessor argument, the remaining preprocessor line is ignored (e.g. #if 0 || pp_value == 5 ... pp_value is not processed by The SMART Editor) Table of Contents ═══ 15. Appendix B - Keys Reference ═══ Appendix B - Keys Reference ====|=================|===============|==============| | ALT or Key | CONTROL | SHIFT | | * = ALT menu | | | | # = key alone | | | ====|=================|===============|==============| A | Attributes | CloseAll | | ----|-----------------|---------------|--------------| B | *Back/Last file | | | ----|-----------------|---------------|--------------| C | *Copy | Close | | ----|-----------------|---------------|--------------| D | *Delete | Del Line | | ----|-----------------|---------------|--------------| E | *Edit | ChgEditMode | | ----|-----------------|---------------|--------------| F | *File | MaintainList | | ----|-----------------|---------------|--------------| G | Goto Line | Goto Cursor | | ----|-----------------|---------------|--------------| H | *Help | Hsk | | ----|-----------------|---------------|--------------| I | *Clip | | | ----|-----------------|---------------|--------------| J | | | | ----|-----------------|---------------|--------------| K | *Link | Del to EOL | | ----|-----------------|---------------|--------------| L | Select Line | LinkTo Item | | ----|-----------------|---------------|--------------| M | GotoMarker | | | ----|-----------------|---------------|--------------| N | *Find | RenameClip | | ----|-----------------|---------------|--------------| O | Open | Options | | ----|-----------------|---------------|--------------| P | Print | Curr DB Path | | ----|-----------------|---------------|--------------| Q | DisplayHelp | Start Help | | ----|-----------------|---------------|--------------| R | *Ref | | | ----|-----------------|---------------|--------------| S | *Search | SaveCursor | | ----|-----------------|---------------|--------------| T | *ToolSet | SnapShot | | ----|-----------------|---------------|--------------| U | Undo | Redo | | ----|-----------------|---------------|--------------| V | | | | ----|-----------------|---------------|--------------| W | *Window | WordWrap | | ----|-----------------|---------------|--------------| X | Close/Min | Close/Exit | | ---|-----------------|---------------|--------------| Y | | | | ----|-----------------|---------------|--------------| Z | | | | ----|-----------------|---------------|--------------| 0 | Set Mark 0 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 1 | Set Mark 1 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 2 | Set Mark 2 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 3 | Set Mark 3 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 4 | Set Mark 4 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 5 | Set Mark 5 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 6 | Set Mark 6 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 7 | Set Mark 7 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 8 | Set Mark 8 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| 9 | Set Mark 9 | | | |(ALT+KP)AsciiChar| | | ----|-----------------|---------------|--------------| F1 | # Online Help | | | ----|-----------------|---------------|--------------| F2 | # Extended Help | | SwapWindows | | (ALT)Swap Focus | | | ----|-----------------|---------------|--------------| F3 | # Close Pgm | | Sync Scroll | ----|-----------------|---------------|--------------| F4 | # Save | MultUndo/Redo | SaveAs | ----|-----------------|---------------|--------------| F5 | # Search | Search Bk | Cont Search | ----|-----------------|---------------|--------------| F6 | # Replace | | MultiFileRepl| ----|-----------------|---------------|--------------| F7 | # Left Justify | Append Clip | ClipToPaste | ----|-----------------|---------------|--------------| F8 | # Ending Brace | Select Brace | Beg Brace | ----|-----------------|---------------|--------------| F9 | # Keys Help | PasteToClip | SelectToClip | | (ALT) Minimize | | | ----|-----------------|---------------|--------------| F10| # Goto/From | | Help on Help | ----|-----------------|---------------|--------------| F11| # Select String | LinkToRef | LinkToDef | ----|-----------------|---------------|--------------| F12| | | | ----|-----------------|---------------|--------------| - | (KB-)Cut | | | | (ALT)Next File | | | ----|-----------------|---------------|--------------| + | (KB+)Copy | | | ----|-----------------|---------------|--------------| Esc| # Cancel | DispSwList | | | (ALT)Hide Help | | | ----|-----------------|---------------|--------------| Ins| # Paste | InsertClip | Insert File | ----|-----------------|---------------|--------------| Home| Beg of Line | Beg of File | Beg of Page | ----|-----------------|---------------|--------------| End| End of Line | End of File | End of Page | ----|-----------------|---------------|--------------| Table of Contents