TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan De Boyne Pollard
from: Charles Gaefke
date: 1997-01-09 00:11:58
subject: Re: DosFindFirst

JD>   It is uninformed, narrowminded, and foolish to think that the _dos_xxxx
JD>   functions are "portable" or "generic".  As the
name suggests, they are
JD>   *DOS* functions, and are provided with DOS C++ compilers as wrappers for
JD>   the DOS API (which can only be accessed directly using assembly
JD>   language).

    I don't appreciate you referring to me as such.  But I'll overlook it.  If
you'll reread what I wrote:

  >     It also states this is for DOS, Windows, Win386, Win32, OS/2 1.x(all),
  > OS/2-32(DOS/PM).

    That leads me to believe it IS portable.  Plus, I have a program that uses
the _dos_findfirst function, and I compile it for 32-bit OS/2, 32-bit Win95, 
and 16-bit DOS, without changing the code, and it works perfectly fine.  True,
it may not be that efficient.  But, my application is for use with another 
application.. and the time will come (and it's not too far away) that my 
application will no longer have a use.  So, with that in mind, I'm more 
interested in making my code portable than I am specializing it for each 
platform.

JD>   So instead of _gaining_ from stubbornly sticking to the old DOS wrapper
JD>   functions, you are in fact _losing_ by doing so.  Compare the solution

    No I am not.  I could do

#ifdef __OS2__
    (specific OS/2 code)
#else
    (code for all other platforms)
#endif

    But I don't believe it is necessary.  _dos_findfirst works just FINE.  For
all I know my Watcom compiler does the above for me, making the OS/2 code just
as efficient as if it I had coded it especially for OS/2.  

    It so happens my application was originally designed as a DOS application,
and has been ported to OS/2 and Win95, mainly by switching compilers from 
Borland to Watcom.  So you'll have to pardon the "archaic" DOS code.  

    FYI future projects of mine will be just the opposite - I will design them
for OS/2 use, and maybe I'll port them to DOS and Win95.  

    So, sir, I thank you for your feedback.  I appreciate your information, 
but I do not appreciate your condescending attitude.

    Good day.


C. Gaefke
[lotl2{at}telerama.lm.com]
[CDRMail Author]

--- RG0511/CDRMAIL 1.06b
* Origin: LOTL/2 * 412 746 3592 * lotl2.slip.lm.com * USofA (1:129/230)
SEEN-BY: 50/99 54/99 270/101 620/243 625/0 160 640/201 711/401 409 410 413
SEEN-BY: 711/430 808 809 934 955 712/311 407 505 506 517 623 624 704 841
SEEN-BY: 713/317 800/1
@PATH: 129/230 11 270/101 712/624 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.