Feedback Search Top Backward Forward

A Look at EPM 6.0x

Written by Paul Floyd




I'll try to concentrate on the programming oriented features that have been added to EPM 6.0x.

OS/2 has shipped with a version of EPM since OS/2 2.0. This version of EPM, 5.5x, has some restrictions, most notably, the E macros are compiled to 16-bit p-code, which affects speed and also forces the E.EX module to be split, with some pieces in EXTRA.EX, due to the 64Kbyte limit. EPM 5.5x is also limited to 255 characters per line. Clearly, then, there was some need for an improved version of EPM. EPM 5.5x is also the default text editor used by C-Set++ 2.1 and Watcom C/C++ 10. The upgrade to C-Set++ 2.1, VisualAge C++ 3.0, comes with its own programmers editor, LPEX. So, what future is there for EPM?


I got my copy of EPM 6.03 from the web. The zip file includes files (unpacked with a program called LOADRAM) for the executables, DLLs, bitmaps and macros. I put the executables and bitmaps in a directory in my EPMPATH environment variable, E:\EDITORS\EPM603. I copied the DLLs to my C:\OS2\DLL directory. I made a separate directory for the macros, E:\EDITORS\EPM603\MACROS. If you want to recompile the macros, it is probably best to keep the compiled .EX files separate from the ones you already know work!. Since I want to use EPM 6.03 in preference to EPM 5.51 shipped with Warp, I put the EPM 6.03 path before the path for EPM 5.51 (in the PATH, DPATH, LIBPATH and EPMPATH statements). I recompiled the .E macros to get the C/C++ brace style I prefer, and to add the CustEPM package. That used the CustEPM macros and latest EPM macros on the DevCon CDs.

What's new in EPM 6.0x?

Well, first of all, EPM 6 is a 32-bit PM application, meaning all of the E macro files can be compiled into a single E.EX module.


Figure 1: The EPM 6.0x standard toolbar.

As the above figure shows, EPM 6.0x sports an almost word-processor looking toolbar. Buttons on the toolbar can be dragged and dropped to rearrange their order. The toolbar itself has a popup menu to allow buttons to be created, edited and deleted. Modified toolbars can be saved, and a customized toolbar can be selected in the EPM settings notebook. The toolbar can also be turned off.

Figure 2: Toolbar edit command dialogue box.

The action that is performed when a toolbar button is pressed is similar to issuing an EPM editor command in the command dialogue.

Figure 3: The EPM with 6.0x programmer toolbar.

Only one alternative toolbar is provided with EPM 6.0x, the programmers toolbar, as shown above. This has many of the features of a programming environment, allowing source files to be built, and to jump between syntax errors. Figure 3 also shows EPM with a completed build in the text window, the build was performed by clicking on the build button on the toolbar.

Syntax Highlighting

Figure 4: Highlighted source code in EPM 6.0x. The colours can be changed. Note also the bitmap background "Watson Works". This can also be changed.

EPM 6.0x comes with support for several languages: C/C++, Rexx, the E macro language, IPF, OS/2 resource scripts, IBM Bookmaster and TeX/LaTeX. Other languages can be added, but you would have to write your own keywords file (e.g., EPMKWDS.PAS for Pascal). The provided C/C++ keywords files include functions and macros defined in the OS/2 toolkit, so are both approximately 400 Kbytes. The keyword files for other languages are more modest in size, 40-60 Kbytes.

The keyword highlighting can be turned on and off dynamically, and there is a button to do this on the programmers button bar.

One problem I have with the syntax highlighting is that it conflicts with the syntax error highlighting generated by C-Set++ 2.1, if EPM 6.0x is used instead of EPM 5.5x.


The tags functions of EPM 6.03 are rather undocumented. The .INF files refer to tags, and then say to look at the on-line help for more information. Opening the tags dialogues and pressing the help button only goes to the main help page, that is, there is no on-line help. Well, after a bit of playing around, I worked out how the tags work. Basically, tags allow you to search for and jump to subroutines very quickly.

First of all, you specify a tags file, TAGS.EPM by default. Then you make a list of files you want to use, wildcards are acceptable, so you might specify *.C and *.H. These files are then scanned and a list of line numbers and function names are stored in TAGS.EPM. You can then either use the programmers toolbar or the Search->Tags main menu bar for the find procedure functions. The most common use for this I see is if you are editing a header file, and you see a function prototype, you can just put the insertion point on the name of the function you want, click on CurrProc on the programmers tool bar, and you are there! Alternatively, you can use FindProc, and either type in the function name or use the list tags dialogue box to find the function you want.

Figure 5: The tags list dialogue box.

I have a few little gripes with the tags functions. If you are used to using a C++ browser, you may find the tags function a little simplistic. It doesn't handle class methods very well, for instance if you have class myclass { mymethod(); };

and you use CurrProc to look for mymethod(), it will look for mymethod(), not myclass::mymethod(). Also I found that the dialogue boxes used by the programmers toolbar and the main menu to control the files used in the tags file were different and also could have inconsistent contents.

DDE Support

EPM now works as a DDE server and client. The package comes with a small sample program (with source) that runs as a DDE server, and issues commands to EPM, acting as a client.

Popup menus

Mouse button 2, when clicked inside the text area, brings up a context menu. The menu that appears depends on whether text is marked or not, and if it is, whether the mouse was clicked inside or outside marked text. The popup menu provides commonly used functions pertinent to what is clicked on. Some of the menu items may be greyed out; for instance, if no text is marked and the user clicks button 2 over space that is not a word, then the "Mark Word," "Mark Identifier," "Find Identifier" and "Uppercase/Lowercase" menu items will be disabled.

Figure 6: Unmarked text popup menu.

Figure 7: Marked text popup menu.

Binary edit mode

Specifying /bin after the EPM command line (or after E for the internal EPM commands) causes the file to be loaded in binary. In this case, carriage return and line feed characters (0x0D and 0x0A) will be visible.

What has changed in EPM 6.0x?

Wider margins

The 255 column limit is now over and done with, now, up to 1600 characters can be displayed on a line. Lines can be longer than this even, though it isn't possible to scroll horizontally beyond 1600 characters.

Drag and Drop

EPM 6.0x makes quite extensive use of drag and drop. You can mark text, and drag it to the desktop or any open folder, where it will be saved as an automatically named file. You can also drag and drop text between separate copies of EPM.

Enhanced Search Dialogue Box

There are several new features in the EPM 6.03 search dialogue box. As well as the old grep style search, there is now the option for enhanced grep, and for searching for discrete words rather than substrings. The search can start at the cursor or the top or bottom of the file. Lastly there is a negate search option, that is search for anything but "string".

Other Changes

Most of these changes are either cosmetic or not geared towards developers, so I will only briefly mention them. The look of EPM has changed, with the bitmap background and the parchment like turned up corner of the document. The "Top of File" and "Bottom of File" of EPM 5.5x has gone. Text searching has been sped up and increased in scope to include things like grep searching. EPM now has an EPM desktop icon. Spell checking is faster, and EPM now supports dynamic spell checking as you type. VoiceType support has been added.

Bugs and other nasties

I've had a few small problems with printing with EPM 6.02. EPM 5.51 had no such problems. When you print something, you get a dialogue box with a status bar. With 5.51, the status bar moves as it should, filling from left to right. With 6.02 the status bar is never painted to, instead, I hear a series of beeps. Usually it still prints, but at least once, it has hung. The documentation can be very sparse in places, if not non-existent. Other than that I've found EPM to be very stable, in hundreds if not thousands of hours of use.

Where to get EPM 6.0x

EPM 6.03 is on The Developer Connection, volume 8. Email for further details. This includes the editor package itself, the compiler, and the latest macro source files.

EPM 6.03 can be obtained on the Boca ServiceLine BBS, 1-407- 443-8000 in the U.S.A. It is also available on several FTP sites, such as /pub/comp/os/os2/editors/ and /os2/editors/

The Future of EPM

IBM has not yet announced what it has planned to do with EPM. Perhaps it will be sold as a product in its own right. Perhaps it will be bundled in a CSD. Perhaps it will be included in OS/2 3.1.