HDTenEightyP/NetNews huggingface dataset:
From: jasonc@leland.Stanford.EDU (Jason Campbell)
Subject: Re: REXX WAITFOR cmd?
Organization: DSG, Stanford University, CA 94305, USA
Date: Wed, 22 Jul 92 05:42:42 GMT

In article <92202.121337SPS2@psuvm.psu.edu> Steven P. Sedlmeyer <SPS2@psuvm.psu.edu> writes:
>In article <9207182258.AA10355@cs.utexas.edu>, HARPER@VTVM1.CC.VT.EDU (Scott
>Harper) says:
>>
>>   What REXX command do I use to scan the system's output for a text string?
>>   I would like REXX to invoke a program then wait for a specific string to
>>   occur (a prompt) before continuing.  This is basically the same as the
>>   WAITON function found in many communications package scripting languages...

>You might try something like the following
>/* start a process and look for a string in stdout */

....

>address cmd 'start command | RXQUEUE'  /* pipe stdout into rexx queue */
>found = false            /* string not found */
>Do until found           /* loop until we find string in stdout */
>   pull line             /* pull line from queue */

This will probably seek input from the console when nothing is pending on
the queue (at least I think the documentation says it will).  I'm not sure 
what will happen when REXX is waiting on the console and data appears on 
the queue.

At any rate, another solution, which will ignore keyboard input:

'@start <some-command-here> | RXQUEUE'
do forever
  s = linein("queue:")
  if pos(target_string, s) > 0 then leave
end


Jason.
-- 
Jason Campbell | not talking for SU | "OS/2...saving the world thru software!"
1->  jasonc@leland.Stanford.EDU |2->  Prodigy: KSJB81e |3->  (415)497-3937
                                         -- Antidisestablishmentarians unite!
Newsgroups: comp.os.os2.programmer
From: gah@hood.hood.caltech.edu (Glen Herrmannsfeldt)
Subject: stack size
Summary: how big a stack can, and should, one have?
Keywords: stack
Organization: California Institute of Technology, Pasadena
Date: Wed, 22 Jul 1992 18:38:03 GMT

link386 seems to have a 2k default stack.

I just finished a series of bug reports to bug-gcc that I finally
decided were due to too small a stack.  I call to getchar() would
write over parts of program memory.


Then I tried different stack sizes with link386.

4k, 256k, 4MB, 64MB, 1GB, 256MB.

Up to 64MB ran fine, fast, etc.  Apparently it does not need to 
allocate the whole thing in real or swap space.

At 1GB it refused to load.

At 256MB it got an internal processing error, which, if I figure out
how, I will report to IBM.  (Any one from IBM?  How do I do this?)

It seems that there is little penalty for a big stack, and a large
penalty (clobbered memory) for a small stack.  Why not have a big default
stack?

Has anyone else experienced any of this?

Remember, a call to getchar() and nothing else will overflow a 2K stack!
Newsgroups: comp.os.os2.programmer
From: os2man@panix.com (Larry Salomon Jr.)
Subject: Re: Need help changing stdout to binary mode...
Date: Wed, 22 Jul 1992 01:58:30 GMT
Organization: PANIX Public Access Unix, NYC

In <1992Jul20.182736.27933@cgrg.ohio-state.edu> bpowell@osc.edu (Brian Powell) writes:

>andrewb@lynx.cs.washington.edu (Andrew Berg) writes:
>: rommel@jonas.bofe.sub.org (Kai Uwe Rommel) writes:
>: : To get a binary version of stdout, you could use
>: : 
>: : 	FILE *stdout2 = fdopen(1, "wb");
>: : 
>: : The file handle 1 is stdout. C Set/2 does also (like many other
>: 
>: What is the handle number on stdin?  My guess is 2, but I'm hesetant to try 
>: it having had problems with indiscreetly trying things like that in the past.

>Handle 0 is stdin, at least under UNIX.  I assume it is the same under
>OS/2 since the stdout == 1 is the same.  Handle number 2 is stderr...

This is correct.  0 is stdin, 1 is stdout, and 2 is stderr.  I know this is
documented somewhere, but I can't remember where (maybe DosRead, DosWrite,
or DosPutMessage).
-- 
Cheers,
Q
-----------------------------------------------------------------------
"If you still choose not to decide,   | "My other account is in the
Newsgroups: comp.os.os2.programmer
Subject: Re: How do I prevent reboots ??? 
From: jstewart@desire.wright.edu
Date: 22 Jul 92 02:16:04 EST
Organization: Wright State University 

In article <1992Jul20.154606.24962@bmerh85.bnr.ca>, jcyr@bnr.ca (Jean Cyr) writes:
> 
> I am writting an OS/2 PM application that needs to prevent the user from causing
> a re-boot by using CTRL-ALT-DEL at the keyboard. The 2.0 desktop incorporates such
> functionallity in it builtin desktop lock. How do I achieve similar results ? I need
> to be able to process key strokes, while dissabling CTRL-ALT-DEL processing.
> 
> Thanks
> 
> Jean
> 
> 
	On a similar not I was wondering if anyone knew how to turn the desktop
lock on or off from within a program.  Oh, and a request to IBM, it'd be nice
if you could use lockup w/o a passwd(i.e. just a screen saver).

						Thanks,

							John Stewart
From: francis@vnet.ibm.com (Tim Francis)
Date: Thu, 30 Jul 92 18:44:54 EDT
Subject: Workframe/2 doesn't do HPFS?
Newsgroups: comp.os.os2.programmer
Reply-To: francis@vnet.ibm.com
Organization: IBM Canada Lab, WorkFrame/2 development
Disclaimer: This posting represents the poster's views, not those of IBM

In article <30JUL199214240782@venus.tamu.edu>,
tcf9033@venus.tamu.edu (FREY, TONY C) writes:
>
> does Workframe/2 not support HPFS? The reason I ask is I was working on a
>project called PARTITION, which had all the extensions for the various files
>(.c,.mak,.dep, etc) but Link386 and Nmake both bailed when they hit the
>filename saying that they had to convert it to 8.3 format. What gives? The
>IBM OS/2 compiler can't use the benefit of long filenames????  Do I just
>have something set up wrong???

WorkFrame/2 is most definitely enabled for HPFS filenames; unfortunately,
NMAKE is not.     -tim

In <19920713.064302.212@almaden.ibm.com>, dmm@vnet.ibm.com (dave) writes:
>
>The NMAKE group got HPFS support written shortly before GA, but the PTB
>wouldn't let them put it into the GA product.  Go figure.  There is an
>APAR open for this 8.3 problem, though.  Call up the support line and
>get your name added to the list of people wanting a fix for APAR PJ04801.
>Disclaimer: I work over 1000 miles from the NMAKE group, so don't flame
>me.
>
>Dave Mooney                                              dmm@vnet.ibm.com
> C Set/2 Development, IBM Canada Lab, 844 Don Mills Rd, Toronto, Ontario
>           "Everybody's happy, they're finally all the same"
Xref: sparky comp.os.os2.programmer:3705 comp.lang.fortran:2795
From: harris@garfield.catt.ncsu.edu (Michael Harris)
Subject: Re: OUTLINE FONT METRICS
Organization: North Carolina State University
Date: Sun, 26 Jul 1992 20:16:59 GMT

daveb@netcom.com (Dave Briccetti) writes:

>ddesroch@oracle.uucp (David DesRoches) writes:
>OK, so I've chosen this really cool OUTLINE font that I want to scale to say,
>32 points.  I compute the necessary character cell dimensions, call
>GpiSetCharBox() and GpiSetCharSet() to select my new logical font.
> 
>QUESTION: How do I get the metrics for this font AT THE SELECTED POINT SIZE?
>Calling GpiQueryFontMetrics() at this point returns the same metrics structure
>I got back from my initial font query, with metrics designed around a 12 point
>font or so.
>
>My only current idea is to compute the ratio of logical.lMaxBaselineExt to
>physical(base).lMaxBaselineExt and multiply the metrics by this ratio to
>scale them (ascent, descent, maxwidth) to the point size I'm using.  This
>seems bogus and prone to round-off error.
> 
>Am I missing something?

Alternatively, you could query *some* of the info via GpiQueryTextBox.
______________________________________________________________________________
     Michael Harris - harris@catt.ncsu.edu or harris@carvm3.vnet.ibm.com
 System Administrator, Computer & Technologies Theme Program, NC State Univ.
(My opinions are my own and do not represent those of NCSU or IBM Corporation)
From: daveb@netcom.com (Dave Briccetti)
Newsgroups: comp.os.os2.programmer
Subject: Re: Dynamic dialog boxes
Date: 26 Jul 92 18:01:47 GMT
Article-I.D.: netcom.g2km!cm.daveb
Organization: Netcom - Online Communication Services  (408 241-9760 guest)

ekl@fics.uucp writes:
: I have a need for creating dynamic dialog boxes. I can *not* load a 
: template from the resource file. 
: 
: So, my question is, does anyone know of any sample code which 
: illustrates how to do this?
: 
: Should I create a DLGTEMPLATE-structure and the use WinCreateDlg(), or
: would it be easier to use WinCreateWindow() for the box itself, followed
: by a WinCreateWindow() for each control? Ideas, anyone?
: 
Eirik: If you're comfortable enough with C and PM to dynamically create
those data structures, then the WinCreateDlg approach is a good way to
go.  I did it years ago, but unfortunately can't find any sample code for
you.  I'll be happy to look over your code if you can't get it to work.
-- 

Dave Briccetti, Owner, Dave Briccetti & Associates
OS/2 Developer/Consultant
P.O. Box 1713
Lafayette, CA  94549-7013
Newsgroups: comp.os.os2.programmer
From: orville%weyrich@tnet.com (Orville R. Weyrich)
Subject: ObjectVision 2.0 for OS/2
Reply-To: tnet.com!weyrich!orville
Organization: Weyrich Computer Consulting
Date: Sun, 26 Jul 92 07:00:45 GMT

Someone recently posted saying that Borland had released ObjectVision 2.0
for OS/2 2.0 (but no BC++ yet).

What can OV be used for? Will it work with IBM's CSET/2? Will it work
with gnu gcc2.1? Does it provide the same functionality as Turbo Pascal
6.0's TurboVision? Does it provide the same functionality that IBM's
CUA Library does? What is it's street price?


orville

--------------------------------------       **********************************
Orville R. Weyrich, Jr.                          Weyrich Computer Consulting
Certified Data Processor                       POB 5782, Scottsdale, AZ 85261
Certified Systems Professional                      Voice: (602) 391-0821
Certified Computer Programmer                Internet: orville%weyrich@tnet.com
--------------------------------------       **********************************
Newsgroups: comp.os.os2.programmer
From: Ed.Holzwarth@bbs.oit.unc.edu (Ed Holzwarth)
Subject: Listbox with GCC
Organization: Extended Bulletin Board Service
Date: Fri, 24 Jul 1992 03:15:07 GMT

Does anyone have some working code to get listboxes to work under GCC?  I
tried just registering and creating the window with the WC_LISTBOX class,
and although that creates a listbox, all my WM_COMMANDs are disabled. 
What I need is some example code that creates a listbox that shows how to
add to it also.

I'm also having trouble getting drag-n-drop to work, so if anyone has
example GCC code for that, I'd love to see that as well.

Thanks for any help....

--
   The opinions expressed are not necessarily those of the University of
     North Carolina at Chapel Hill, the Campus Office for Information
        Technology, or the Experimental Bulletin Board Service.
           internet:  bbs.oit.unc.edu or 152.2.22.80
From: ts@cup.portal.com (Tim W Smith)
Newsgroups: comp.os.os2.programmer
Subject: Re: link386, why not ld?
Date: Thu, 23 Jul 92 09:05:29 PDT
Organization: The Portal System (TM)

> I have tried will not print anything out until they are finished
> running!  Kind of hard to make it interactive... :)  Any reasoning
> or philosophical discussions would be appreciated.

Philosophically, it is not hard to make programs that only print when they
are done interactive.  All it requires is a belief in predestination rather
than free will.

--Tim Smith
From: jan@acpub.duke.edu (Jan Gittelman)
Newsgroups: comp.os.os2.programmer
Subject: IOPL summary
Keywords: IOPL Ring 2 I/O ports
Date: 24 Jul 92 14:43:16 GMT


Summary on IOPL

1. IOPL'd code has to be 16 bit, can't be 32 bit. So for that matter do device
   drivers. All 2.0 device drivers according to IBM are 16 bits.

2. To run a 16 bit IOPL routine with 32 bit programs, the user needs to make
   the IOPL routines into a DLL. I haven't tried it yet (just using all 16 
   bits), but no doubt I will soon.

3. IBM does have plans to include inp and outp routines in their next release
   of CSET/2.

4. I have managed to get 16 bit versions of inp and outp to run properly using
   the following sample from Barry King, who cribbed it from an issue of OS/2
   Monthly Magazine. - THANKS MUCHO!

   Sample code:

   #include <conio.h>      // for outp()
   int main()
   {
       outp( 0x60, 0xE9 );
       return 0;
   }
 
   The .DEF looks like this:
 
   NAME ....
   DESCRIPTION ....
   PROTMODE
   SEGMENTS  _IOSEG CLASS 'IOSEG_CODE' iopl
 

5. I have NOT managed to get my own assembler routines to run in Ring 2. Any
   further information would be welcome.

5. There is some documentation and users stating that the DosPortAccess 
   routine is necessary to actually perform i/o. I've run my code with and 
   without it and haven't seen a difference.

Thanks to everyone to gave me information. 
Jan
Newsgroups: comp.os.os2.programmer
From: mg@elan (Michael Golan)
Subject: Re: Can someone at IBM please explain why developers should develop for OS/2?
Organization: Princeton University, Dept. of Computer Science
Date: 28 Jul 92 16:26:27 GMT

brian%jensen.cs.utah.edu@cs.utah.edu (Brian Sturgill) writes:

>What I want from IBM is simple:  I want them to send me a clear signal
>that they can compete with Microsoft.  I want them to actively
>recruit ISV's and to fix the bugs of OS/2 2.0.  Most importantly I want
>to see open, honest communication of IBM's strategy with respect
>to OS/2.  I want to see a plan, and that plan implemented in
>a non-sloppy manner.  In short, I want IBM to give me a reason
>to develop for OS/2 2.0.  As things stand currently, I'm afraid
>I've wasted my time learning about OS/2.  I have a product for 2.0 in
>beta now -- once NT comes out -- will I have any customers?

>I have gotten a number of responses to my last message privately.
>I hope that those people and those others that considered responding,
>will do so now, publically  If you don't then IBM will think I'm one lone nut
>and perhaps won't get the message.

IBM - get the message. Brian is not alone, but most of us are to cynic
to believe IBM can change for real. All of what Brian site is correct.
I haven't got the OS/2 development tools exactly for that reason, and using
it as a dos development platform.

The most annoying thing are all those bugs that Brian mentioned. They are
real. We meet them every day. IBM had four months to fix them and did
practically nothing

Michael Golan
mg@princeton.edu
From: os2man@panix.com (Larry Salomon Jr.)
Newsgroups: comp.os.os2.programmer
Subject: Re: PM Programming - Graphic Spaces?
Date: 30 Jul 92 03:28:29 GMT
Distribution: comp
Organization: PANIX Public Access Unix, NYC

What you probably want to do is create a metafile and play the metafile
into the HPS to view it.  A metafile is created by an OD_METAFILE HDC
(see DevOpenDC) and is played using GpiPlayMetafile.

See Graham Winn's book on programming for PM (VNR is the publisher, but
I'm not sure of the title) for a lot of info about metafiles.

-- 
Cheers,
Q
-----------------------------------------------------------------------
"If you still choose not to decide,   | "My other account is in the
Newsgroups: comp.os.os2.programmer
From: bergstro@src.honeywell.com (Pete Bergstrom)
Subject: IBM programmer assistance (was re: Can someone at IBM..)
To: comp.os.os2.programmer
Posted-Date: Thu, 30 Jul 92 08: 44:34 CDT
Organization: Honeywell Systems & Research Center
Date: Thu, 30 Jul 1992 13:44:34 GMT
Received-Date: Thu, 30 Jul 92 08: 44:35 CDT

From: stewart@wimsey.bc.ca (Jim Stewart):
>IBM:
>
>This is another voice from the wilderness. You could reduce the noise on
>the net fairly inexpensivly...
>
>Put the online API references and selected tools (dialog editor and help
>compiler) on the net.  Think of it as an investment. 
>
>js who_will_use_gcc_anyway

I suggest you look at purchasing the IBM OS/2 2.0 Toolkit (list $119,
mail order from Programmer's Paradise $79).  It contains complete
headers, a full library against which you can link your object files,
and a really good set of online references.  From memory, I have at
least 6 of the 17 reference books online (Prog ref 1,2,3, REXX ref,
IPF ref, SOM ref, more, I think).

It includes the help compiler (IPF), the SOM compiler and libraries,
some sort of REXX library (I haven't gotten into that yet), dialog
editor (it will animate your dialogs to let you try them out), a new
version of the icon editor and gobs of pretty good program examples.
The examples are also substantial in their completeness and good
documentation.  One in particular is an application template with the
skeletal structure for everything already in place.  Just plug in your
functionality and you don't have to mess with a lot of the tedious
crap that you otherwise might.

The only thing that this package is missing is a librarian utility.
This is a significant mistake, IMO. I would like to see IBM distribute
a decent librarian program along with the toolkit, even if they have
an improved version for the CSet/2 package.

Pete

Newsgroups: comp.os.os2.programmer
From: bauwens@acs.ucalgary.ca (Luc Bauwens)
Subject: Re: Run ZTC 32-Bit DosX Code under OS/2!!!
Date: Sat, 25 Jul 92 16:33:59 GMT
Organization: The University of Calgary, Alberta

In article <=!jmdvp.feustel@netcom.com> feustel@netcom.com (David Feustel) writes:
>I just got the X-32VM 32-bit dos extender from Flashtek. This item was
>accompanied by an IBM update of VDPMI.SYS. With this software I
>successfully ran a ZTC 32-bit dos application in an os/2 dos box.
>Very nice and very fast!

So does the DOS extender that comes free with Watcom Fortran 9.0/386 (and,
I am sure, also Watcom C 9.0).  It's called DOS4GW and it's a
subset of DOS4G from Rational Systems, Inc.

Luc B



Newsgroups: comp.os.os2.programmer
From: dlb5404@tamsun.tamu.edu (Daryl Biberdorf)
Subject: The expensive IBM doc set
Organization: Texas A&M University, College Station
Date: Wed, 29 Jul 1992 17:10:30 GMT

In article <1992Jul29.154428.12738@njitgw.njit.edu> dic5340@hertz.njit.edu (David Charlap) writes:
>In article <1992Jul28.021436.2865@hellgate.utah.edu> brian%jensen.cs.utah.edu@cs.utah.edu (Brian Sturgill) writes:
>>Why does IBM charge so much for the hardcopy manual set?
>Perhaps because it consists of 17 large volumes?

Something that I haven't seen mentioned in this discussion (or I may have
missed it) is that you don't have to buy all 17 volumes.  Each volume
has its own IBM publication number, so you can order them separately
(or so a Team OS/2 member tells me).

Now, would someone who was rich enough to pay the $300 volunteer to
post the title and publication number (and maybe even a brief
description) of each volume in the set?  Chances are, most of us will
only need a handful of volumes to get our job done.

Daryl
-- 
Daryl Biberdorf  N5GJM    dlb5404@rigel.tamu.edu  or  dlb5404@tamsun.tamu.edu
        "You're not messy.  You're organizationally impaired."
                _Real_Life_Adventures_, July 3, 1992 
Newsgroups: comp.os.os2.programmer
From: os2man@panix.com (Larry Salomon Jr.)
Subject: Re: Button Press..HELP!!!!
Date: Wed, 22 Jul 1992 02:05:24 GMT
Organization: PANIX Public Access Unix, NYC

In <harris.711681425@garfield.catt.ncsu.edu> harris@garfield.catt.ncsu.edu (Michael Harris) writes:

>joiner@cs.umn.edu (Jay Joiner) writes:

>>  Of course, if you have two or more buttons, then you have
>>to differentiate somehow.  One theory I had was to save the window handle
>>for each button when you create them with WinCreateWindow, and then
>>query to find out which caused the WM_COMMAND message to be sent using
>>the parameters.  I don't have any 2.0 docs, so I don't know the correct way
>>to handle these cases.

>The best way is to give each of your buttons a unique window id.  One of
>the message parameters contains the window id of the button pushed. (I don't
>have my docs handy so I am not sure which one it is at the moment.)

I just jumped into this conversation, so pardon me if this has been answered:
Pushbuttons send a WM_COMMAND message with SHORT1FROMMP(mpParm1) equal to
the id of the button that was pressed.
-- 
Cheers,
Q
-----------------------------------------------------------------------
"If you still choose not to decide,   | "My other account is in the
Newsgroups: comp.os.os2.programmer
From: sip1@ellis.uchicago.edu (Timothy F. Sipples)
Subject: Re: Basic compiler
Reply-To: sip1@midway.uchicago.edu
Organization: Dept. of Econ., Univ. of Chicago
Date: Wed, 29 Jul 1992 15:14:16 GMT

In article <98.2a7677ea@ivgate> bill.hirt@mtask.omahug.org writes:
>Is there a basic compiler for OS/2? Or does anyone know of one planned to take
>advantage of OS/2 2.0? We have several basic programs at work under DOS we'd be
>interested in moving to OS/2 if there is a decent compiler out there. If anyone
>has any experience with an OS/2 basic compiler, please speak up.

I suggest getting ahold of the TINF guide (tinf27.zoo), available via
anonymous ftp from ftp-os2.nmsu.edu.  There are about half a dozen
BASIC packages listed in this guide, and you can then contact the
various vendors and ask for information (to add to any responses you
receive here).

-- 
Get the OS/2 FREQ. ASKED QUESTIONS LIST | Timothy F. Sipples
from 128.123.35.151, anonymous ftp,     | Internet: sip1@ellis.uchicago.edu
directory pub/os2/all/faq, or from      | Dept. of Econ., U. Chicago, 60637
LISTSERV@BLEKUL11.BITNET (send "HELP"). | Tsongas > Perot > Clinton.  Yay.
Newsgroups: comp.os.os2.programmer
From: feustel@netcom.com (David Feustel)
Subject: Re: Run ZTC 32-Bit DosX Code under OS/2!!!
Date: Sat, 25 Jul 92 01:39:13 GMT
Organization: DAFCO: OS/2 Software Support & Consulting

Unfortunately, it appears that the fix to DPMI.SYS doesn't make the
virtual memory support part of DPMI work yet. Still, if you have 16
meg ram on your system...
-- 
Dave Feustel N9MYI <feustel@netcom.com>
---
What's the different between a Salem Witch Hunter and a modern day
Drug Warrior? - 3 centuries.
Newsgroups: comp.os.os2.programmer
From: dandrews@bilver.uucp (Dave Andrews)
Subject: Re: IBMLINK - WARNING!
Organization: W. J. Vermillion - Winter Park, FL
Date: Wed, 22 Jul 1992 12:59:36 GMT

In article <_!dms=m.grega@netcom.com> grega@netcom.com (Greg Altman) writes:
>
>Calling IBMLINK DOES NOT get you a better treatment then calling the 800
>number.

This is true, but sometimes IBMLink is the preferable way to go.  I find
that I can report problems via ETR (electronically) in more precise terms
than I can talking to a level-1 person at the support center.  I can also
pick up any technical response on my schedule rather than have to be
chained to my desk awaiting a callback from the IBMer.

It is probably easier to escalate a problem via the 800 number though.
While your problem was eventually handled when the duty manager got
involved, you always had the right to ask to speak to the duty manager
yourself.

It does take some time (years!) before you learn to negotiate the
labyrinth that is IBM support.  But after you've grown accustomed to it,
and found out that the severity levels really do mean something, you
can usually make the service people do business with you.

(And yes, sometimes it helps to make noise!  IBM management hates noise.
Most people do.)

- David Andrews
  dandrews@bilver.oau.org
From: m-lp9966@JED.CS.NYU.EDU (Lewis Perin)
Newsgroups: comp.os.os2.programmer
Subject: Re: fopen(f,"r") vs fopen(f,"rb") what's the diff?
Date: 25 Jul 92 19:57:26 GMT
Organization: New York University

In article <1992Jul25.175848.29166@unixg.ubc.ca> ochealth@unixg.ubc.ca (ochealth) writes:

   A number of UNIX programs I have ported to OS/2 using emx or gcc
   choke on binary files, unless I modify them.

   for example:
   f = fopen(name,"r") must be changed to f=fopen(name,"rb")
   etc.

   I was wondering just what happens when you don't open as binary.
   Will it return EOF when it sees ^Z or what?

That's been my experience; I'm in the middle of porting a giant UNIX app.

   This is sort of troubling to me, since EMX is desing to make
   porting UNIX easier  Was fopen changed to make it more compatible
   with OS/2 or what. From what I've read "r" and "rb" are handled the
   same in UNIX.

The way I read K&R's 2nd edition, emx is correct.

Cheers, Lew