From the Editor
Written by Larry Salomon, Jr.
There has to be a section of Murphy's law's that deal with computers and specifically with making announcements. Immediately after announcing the EDM/2 Web site, the address changed and EDM/2 missed the next issue. The new URL is http://os2man.netsysdev.telerate.com . Ah, what three letters can do to a person.
The Web site is growing nicely. A Gotcha section has been added which will grow into a repository of programming pitfalls, and it utilizes HTML forms to allow you to contribute directly to the page. Additionally, a weekly From the editor section was added to allow me to tell you about things that you should know as an OS/2 developer in a more timely fashion. Let's face it; if you read things once a month here, there's a good chance that the information is no longer valid by that time. Finally, a Feedback section was added to give you the opportunity to sound off; tell us what you think about anything. We'll be glad for your feedback.
In any case, as we get more time, more things will get updated so keep a lookout and send us any feedback you have!
Last issue's article on IPC Between DOS Processes was incorrectly described as having been authored by Mike Ruddy. It was instead written by Leif N. Eriksen.
Infoworld, Brian Livingston, et al.
Those of you who are fortunate enough to read Infoworld on a regular basis probably know who Brian Livingston is - he is a "pro-Windows and everything else can go to hell" kind of a person - but in his July 24 column, he said something quite upsetting. Paraphrased, "if you are one of the 3 people who don't have a preview copy of Windows 95..." I've seen this attitude before and always make sure I send off some email to correct the situation; this time was no different. I told Brian that I've been using OS/2 since 1989 and have been quite happy with it. I have had no reason nor desire to go to Windows and probably never will. I selected the "Send" button and figured that was that.
Boy was I wrong.
His response was infuriating. Not only did he insult me by telling me that I should be saving his columns for the general availability of Windows 95, but he added "salt to the wound" by telling me in a post script that "the other two people also complained."
In the words of Bugs Bunny, "this means war."
My reply to him can be found in the From the editor section for the week beginning July 24. The only thing I request is, if you are like me and are happy with OS/2, that you drop him a line to tell him so. His email address is email@example.com . I am not encouraging you to flame him to a cinder. Simply let him know which operating system you will use on August 24. The amount of mail coming into his mailbox should help him to adjust his opinion.
Stewart Alsop, on the other hand, always seems to come on strong in his columns. While I won't deny that he has a bite, he did surprise me also this past week. I have had email "discussions" (more like me venting a bit of frustration at him) with him and have always considered him to be another Windows bigot. I told him this in a recent email to which he responded, again paraphrasing, "that is an amusing concept." He enforced that with the claim that he has used a Mac since 1985, a fact I did not remember until after I read that. Well, at least I can't claim that he's so anti-IBM because he's so pro-Windows. Maybe there is a bit of objectivity in him after all...
And Nicholas Petreley has to be out on a limb there. He's the only vocal pro-OS/2 writer there (the keyword is "vocal") and that has to be stressful. Help him out, people; if you know of some hot new product or development tool, let him know about it. He'll thank you for it, guaranteed. His address is firstname.lastname@example.org .
It's That Time Again
Gordon will, starting this issue, begin another round of C++ compiler comparisons, and he definitely has some interesting things to tell you. He plans to review two compilers per month, but that will depend on his schedule in future months. A related note is that, because this issue is quite large due to the screen shots included in the compiler review, the Introduction to PM Programming column will not be a part of this month's issue.
...And Speaking of Reviewing
I have received a couple of tentative offers from people willing to try to be our Software Review columnist. If you are interested, simply let me know; the only commitment you have to keep is to review one development-related application per month.
Spread the Word
If you haven't visited the #os/2 channel on IRC yet, it's about time you did. There are IRC clients for most platforms and it isn't really that addicting <grin>. In #os/2, you can get your questions answered about configuration problems, user problems, and even programming problems. It's helpful for the "I need the answer now" problem. Some problems go unanswered but it's always worth a try, and the "regulars" are great fun. I'm always in there (with the nickname of Q--, unsurprisingly) and so are many other very knowledgeable people.
Please Wait Another Month
I made a promise in June to demonstrate how to make transparent windows, but this month has kept me quite busy, and I will continue to be so until August 15, when the ColoradOS/2 presentations are due to Wayne Kovsky. In fact, if I hadn't cancelled last month's issue, I would have done so this month. Please be patient; I will fulfill this promise next issue.
One Final Note
This is wrong, but I'm going to say it anyway: the 2nd edition of my book should hit the shelves in the U.S. on approximately September 1, according to John Wiley and Sons. It is entitled, The Art of OS/2 Warp Programming. If you want more information, stop by the "official" web site, also located at http://os2man.netsysdev.telerate.com. Enjoy this issue!
Learn REXX with The REXX Cookbook and The Rexx Files
Author: Merrill Callaway
Product Description and Ordering Information
The REXX Cookbook (later added link to review) is a unique tutorial designed to teach anyone, even non-programmers, to program in REXX by presenting detailed explanations of over 40 useful REXX programs. These programs and several more are on the companion disk THE REXX FILES. Those who have experienced the frustration of trying to write real world code after finding only fragmentary examples in reference books will really appreciate the programs in this book.
Charles Daney of Quercus Systems and author of Programming in REXX, published by McGraw Hill, had this to say to Mr. Callaway after he reviewed it:
"I was really impressed with the amount of work you put in on this. It's one of the most detailed computer books I've ever seen, and not just trivial detail either, but good solid information. And some of your examples are among the best I've seen anywhere. The stuff on PostScript, SQL, DB2/2, AmiPro, etc. should be really valuable to many."
Callaway works from the premise that reference books on programming have too high a degree of abstraction and generalization to be tutorials, since they attempt to cover every case for every instruction. Learners must decipher templates and syntax diagrams rather than view explicit code in the context of a complete, concrete program. His book makes learning REXX far easier than ever before, because readers can see actual code used and explained in context. It is a bonus that the book's programs are so useful in their own right. There was as much software development as writing to produce this book. For instance one example project is an Inter-Process Control REXX program that combines VX-REXX by WATCOM, REXX and DB2/2 by IBM, and AmiPro by Lotus Development.
Another unique program uses REXX and PostScript together to print envelopes quickly without needing to open a word processor. It even keeps a database of your personal addresses handy. There are some essential system utility programs to back up your .INI files, some EPM and TSPF editor macros, and even a program to teach you how to use the parse instruction. The level of difficulty is graduated so the book is suitable for beginners and experts alike. Everyone will find useful REXX code in The REXX Cookbook. Combined with any standard or online REXX reference, it rounds out a COMPLETE COURSE in REXX FLUENCY. Callaway says, "The REXX Cookbook is the very book I wished I'd had when I was learning to program in REXX!"
The REXX Cookbook is OS/2 Accredited.
How to order
VISA/MasterCard orders may email or telephone with credit card number and expiration date.
Checks or money orders (made payable to Whitestone) US Bank in US dollars are also acceptable (mail to publisher's address above).
Price: Deluxe Set (book and disk): $42.90 (book ONLY: $27.95)
Shipping and handling USA: $5.00
Mindy Ported to OS/2
I have completed a port of Mindy 1.3 to OS/2.
Mindy is an implementation of the Dylan language but Mindy is not Dylan yet.
Dylan is a general-purpose Object Oriented Dynamic Language designed by Apple Computer.
Quoting from Apple's Dylan Home Page at http://www.cambridge.apple.com/dylan/dylan.html:
"Dylan is a new language developed at Apple. It is a bold new effort to create a powerful, practical tool for writing mainstream commercial applications. We believe it combines the best qualities of static languages (small, fast programs) with the best qualities of dynamic languages (rapid development, code that's easy to read, write and maintain)."
Credits for Mindy, and therefore 99% of this port, go to the Gwydion Project at Carnegie Mellon University.
Mindy is freely available and the modified source and executables have been uploaded to hobbes.nmsu.edu. The file is named mindy13.zip and it should be in the /os2/dev32/ directory. While you are there, get /os2/unix/emx09a/emxrt.zip if you don't have it. It contains DLLs required by the Mindy executables. hobbes.nmsu.edu is mirrored at ftp.cdrom.com in /pub/os2/. I only tested the port under OS/2 Warp.
The Gwydion project released Mindy 1.3 but please send bug reports to me if you use this port. They have much better things to do than fix my bugs. <grin>
Introduction to OS/2 Programming in C Course
From Distributed Systems Laboratories Education Services
The five day course, Introduction to OS/2 Programming in C, is now available. DSL can schedule this course at your site, or provide materials under a license agreement. Rates are determined by volume and location (Country). All courses are taught in English, although translation services are available.
The Intro to OS/2 Programming course will begin a complete OS/2 series of courses, including Advanced OS/2 Programming, Intro to PM Programming, and Advanced PM Programming.
Other courses already available include a two day Intro to OS/2, Overview of Object-Oriented Analysis and Design, C/C++ Programming, DCE Architecture and Internals, UNIX System Optimization and Performance Evaluation, UNIX System calls, Borland's Delphi, and more.
Introduction to OS/2 Programming in C
This five day, instructor-lead course will provide an introduction to programming under IBM's OS/2 operating system, v2.x and higher. The majority of the class will be spent in laboratory exercises, interspersed with lecture and examples. This course provides the beginning concepts which are followed up in the Advanced OS/2 programming course, and the Presentation Manager Programming courses. As a prerequisite, all students must know and have experience with the C programming language. Familiarity with the Workplace Shell, from a user standpoint, is helpful.
Students are welcome to bring a copy of their own source code editor. The standard OS/2 'E' and 'EPM' editors will be provided.
The target audience for this course is Application and System software developers, designers, and maintainers.
This course will provide the student with technical and practical experience with:
For more information, or to schedule a course, contact Gregory Bryant at 800-890-8676, 513-698-5108, or fax 513-698- 4490.
Distributed Systems Laboratories is a division of Delta Music Systems, Inc.
(OS/2 is a registered trademark of IBM Corporation.)
SpeedPascal/2 version 1.0
SpeedPascal/2 is a Borland Pascal 7.0 compatible compiler and an integrated development environment (IDE) with a host of features designed to ease the task of writing OS/2 Presentation Manager(TM) programs. At last, you can use the productive programmer's language of choice on the world's most productive operating system:
NO runtime royalites!
The SpeedPascal/2 environment is a suite of tools centered around a Multiple Document Interface editor. From the IDE, you can access the power of the SpeedPascal/2 tools:
We're pretty proud of our IDE here at SpeedSoft. If you prefer to use your own editor, that's fine with us. You still have access to the tools you need:
SpeedPascal/2 for OS/2 is just the beginning for SpeedSoft. We're committed to being a cross-platform solution, and to providing you with the best tools around for any platform. We're currently at work with major vendors of Pascal products to see that your favorite libraries get ported to SpeedPascal/2.
Download the information brochure at:
Compuserve: OS2DF1 forum, REXX/Other, file SPDBRO.TXT
A completely functional demo version is available at the same Compuserve forum and through the Web page. The demo can also be downloaded by anonymous ftp at 184.108.40.206, change to the OS2 directoy and transfer (in binary mode) the file speedos2.zip.
Limited Time Offer
From now until July 31st, 1995, SpeedSoft is offering the SpeedPascal/2 compiler for the price of $129! (Sorry, we can't discount the manual hardcopies.) After this period the price will be $179.
For all Benelux customers (Belgium, Netherlands and Luxembourg):
For all other European customers:
SpeedSoft GbR Nrnberger & Partner
Technical information about DB2 for OS/2 on WWW
More than 300 pages of technical information about DB2 for OS/2 (DB2/2) Version 1 available at WWW from http://www.nta.no/brukere/olea/db2book.
The material is offered as eight PostScript files, and ranges from beginners tutorial to quite complicated. Areas covered include:
RexxBase Has Been Updated to Version 2.02
June 15, 1995
American Coders, LTD release an update to its shareware program RexxBase. RexxBase is a REXX API DLL that allows REXX programs to use dBase III and IV DBF, DBT, NDX and MDX files. This update contains several bug fixes, program enhancements and documentation changes. The newest release can be found in the file RXBAS202.ZIP.
The following is a list of the program changes.
OS/2 USERS GROUP MEETINGS
[Editor's note - EDM/2 does not normally publish dates of SIG meetings, but these dates were posted well enough in advance and contain topics that deal with application development, so we made an exception by eliminating the non- relevant dates.]
New York, NY
All meetings will be held at the offices of the IBM Corporation 590 Madison Avenue in New York City, starting at 6 PM.
All are welcome.
Call the NYPC Voice BBS at 212-533-NYPC and enter menu code OST for last minute changes. For other information call Bill Zack at 203-255-2979. //-->
Safetynet's StopLight is Now Available
Safetynet, Inc. has made available for Internet downloading its StopLight for OS/2 security software. StopLight for OS/2 goes far beyond Workplace Shell protection, and provides:
EDM/2 Now Distributed to BBS's in Denmark
EDM/2 announces the addition of Jesper Nielsen as a new network distributor. Jesper's responsibility is in the distribution of EDM/2 to various bulletin boards in Denmark. Send email to email@example.com for more information.
Comprehensive OS/2 TCP/IP application homepage
The TCP/IP applications list has been converted to HTML and moved. It is available at http://wc62.residence.gatech.edu/sorensen/tcpip.html.
This page lists all known shareware/freeware/demoware TCP/IP applications for OS/2 and is catagorized. It is updated based upon when hobbes.nmsu.edu cleans its /incoming directory.
Please e-mail any suggestions, additions, changes, etc. to firstname.lastname@example.org (or use the mailto: tag on the page). The author is also on the IRC channel #OS/2 as No_one.
FYI - the text based version is outdated, and the wc51 server should no longer be considered stable.
'Games' Was A Hit
Lachlan O'Dea (email@example.com) writes:
Thank you for your excelent Gearing Up For Games article in EDM/2. It was very interesting and easy to understand. I'm a good programmer, but I'm relatively new to OS/2 and I've never touched DIVE.
I look forward to future articles by you on game programming in OS/2. EDM/2 keeps getting better and better!
...So Was 'EXE Optimization'
Steve Snyder (firstname.lastname@example.org) writes:
Having just read your very good articles on EXE optimization ("Building Smaller OS/2 Executables", EDM issues 3-3 and 3-4), I have a question.
It concerns the use of the LINK386 /BASE switch. You state that the use of /BASE:0x10000 eliminates the need for fixups, making the EXE smaller and the loading of it faster. I tried it on my program and in fact the 1.5MB EXE size shrunk by 80k!
Now my question: Is there a downside to using this switch? If not, I don't understand why IBM did not make this the default. This looks so much like a free lunch that I'm looking for the hidden cost.
Thanks for the informative articles.
Pete Cassetta responds:
Thanks for your nice comments about my articles.
I was very glad to hear that your 1.5 MB EXE shrunk by 80K when you began using the /BASE:0x10000 linker switch! I suppose this switch does sound like something for nothing, but in this case you can have a free lunch. There is absolutely no downside to using this switch. If you benchmark your program carefully, you should see an improvement in load time as well. This switch simply causes the linker to resolve internal fixups at link time instead of leaving them in there to be resolved at load time. OS/2 allows this because its designers wisely decided that all EXEs would load at a base address of 0x10000. Hence the load address is always known at link time.
The question of why LINK386 doesn't use /BASE:0x10000 by default for EXEs is a good one. I really don't know the answer, though I imagine there must be some historical or philisophical reason. You may be interested to know that the authors of C-Set++ agree with you that this switch should be on by default. If you compile and link by calling the ICC program that comes with C-Set++, it turns on the /BASE:0x10000 switch by default when calling LINK386. ICC actually turns on three size-related switches by default:
/align:16 /exepack /base:65536 (taken from an ICC-generated command-line)Because of this, many programs built with C-Set++ get these switches turned on with no explicit effort on the part of their author. If you are using C-Set++, then I expect you wrote your own makefile which calls LINK386 directly. In this case you have to turn on the /BASE switch yourself.
So don't fear the /BASE:0x10000 switch; it is a friend and should be used when linking all your EXE files.
Request or Two
Paul D. Walker (email@example.com) writes:
I have looked forward to the 'zine since I first discovered and read all the issues last year. I have enjoyed the publication as, I am sure, many others have. Since you did not receive any letters last month, I thought that I would at least break the silence and give you my support (whoopee!) Well, enough of that.
What I would like to see is either a continuation of installable file systems (and the nuts and bolts of how to), or something on the internals (as far as anyone can find out) of HPFS.
In general, I have found the third year of your publication (so far) to be the best yet. I especially enjoyed the articles on reducing code size, especially with todays programs getting bloated beyond everything imaginable (my simple clipper programs frequently go over 700KB nowadays because of the overhead of my library on top of clippers library.)
Please keep up the good work. Please continue your introduction to PM programming (as one day soon I will go back and read all the articles and start programming under OS/2 myself...or wait for Visual Age (*grin*) and any other topic that you might be interested in yourself. If you are interested in a particular thing, then you can bet that someone else will be. (At least that is what an older more experienced DJ told me years ago when I was learning the trade...)
Looking forward to the next issue...
Dirk Wissmann (firstname.lastname@example.org) writes:
I absolutely appreciate your EDM/2 and I like the articles written there. Especially the "Introduction to PM Programming" is a favourite one, which I always read to increase my knowledge.
But now I have reached the point where I have to use something, that was covered in no issue until now (including Vol. 3 Iss. 6): creation and handling of notebooks.
When looking on the themes which were published in the section PM Programming, almost everything was important. And in my opinion, creating a notebook is as important as all the other themes - just think about making your PM application configurable.
So how about this theme? Will this be something for an EDM/2 in the near future, or will it take a longer time until it will show up?
Larry Salomon responds:
As you might imagine, EDM/2 is dependent on the voluntary works of the contributors, so we cannot give a satisfactory answer since we do not know who will be submitting what. While I would love to get to the "meat" of things in the column, I want to avoid rushing the column since I felt that was a significant problem with the first effort at it. PM programming is quite difficult; rushing things would leave out significant details in all likelihood and might confuse the readers.
Your feedback has been noted, however, and I will try to fish for someone to write an article on this topic.
Solving a Programming Problem
Mark Mathews (email@example.com) writes:
I'm slowly porting DEU 5.3 (DOOM editor. DOOM? What's DOOM? <grin>) over to OS/2. It's now drawing maps. I'm trying to figure out how to use mouse messages. I tried using WM_BUTTON1CLICK and WM_BUTTON2CLICK but if I try to double click the mouse I still activate the WM_BUTTON1CLICK. What I want to do is to click once to mark an object on the map or to click twice and edit the object. I don't have to mark an object to edit it. 'Mark' is used to select more than 1 item. So how do I distinguish between all these different mouse messages?
Larry Salomon responds:
There is no way to automatically do it, so you have to use some voodoo magic to get what you want. When you get the WM_BUTTON1CLICK message, call WinQuerySysValue(HWND_DESKTOP,SV_DBLCLKTIME) and start a timer (WinStartTimer) with the value returned. If you get a WM_BUTTON1DBLCLK message before you get the appropriate WM_TIMER message, then you process the "double click event" otherwise you process the "single click event".
Don't forget to call WinStopTimer!
I've used just about every PM control (including containers) with great success, but it may be the lowly Button control which finally drives me insane.
My particular problem is with the BS_BITMAP style. I have used the BS_ICON style with no problem. I am attempting to create a button, with bitmap, in the client area of my main window using WinCreateWindow. When I specify BS_ICON and the appropriate .ICO file, the button is displayed and functions correctly. When I specify BS_BITMAP and a .BMP file, nothing is displayed.
Any help would be greatly appreciated!
Larry Salomon responds:
This was a bug in the 2.x toolkit. Are you using that or the Warp toolkit? I haven't verified the "fix" that I have hoped for in the latter.
Web Site Feedback
Kevin Porter (firstname.lastname@example.org) writes:
This may be beyond your control but an "expand all" button when reading the magazine would be very helpful, since there's a significant delay each time an expand is done.
It's nice to find the stuff on-line, i've been off the distribution since my account moved a while ago and it's nice to see your work continuing/maturing. Hope it's going well for you. Keep up the good work!
Thanks for the compliments and comments. We are held hostage by Peter Childs, the author of the INF-HTML package until we get time to convert the issues to HTML format directly.
Mark Noble (email@example.com) writes:
The EDM/2 WWW setup is well done, however there's one thing that I'd like to see. I don't know what's involved in this, but if it isn't to difficult, is there any way you could "gather" all of the Q&A sections into one page? If the load on the server gets a little high, this might help.
[Editor's note - Mark did this for us, but we have been too busy to incorporate it into the Web site.]
I received the info doc telling me how to subscribe to EDM/2 and where to find the back issues via FTP. I think the location is wrong and needs updating:
It said hobbes.nmsu.edu /pub/os2/32bit/program/newsltr, but I found it in /os2/newsltr instead.
Was this doc obtained from the mail server (firstname.lastname@example.org) or from some other location? If the former, it should have been changed by now, so you might re- request it to check. If from some other location, I have no control over this, but you could send email to the site admin and tell them to get the document again.
Thanks for pointing this out.