TIP: Click on subject to list as thread! ANSI
echo: os2
to: Mike Ruskai
from: Will Honea
date: 1999-11-16 23:48:03
subject: Missing Window control..

MIKE RUSKAI wrote to WILL HONEA on 11-16-1999

MR> Cripes.  I guess that means they just did an equality comparison
MR> with FILE_DIRECTORY, rather than a bitwise AND, or using a bit field
MR> (my preference), etc.
MR> 
MR> Pretty stupid.

I traced the Post Road code and that's exactly what they did.  I've
got several years worth of this kind of crap collected in one of my
YGBSM files - amazing what 'professional' programmers will do at
times.
 My favorite was a set of utilities by a well known and respected
software house.  In C code, they were returning a pointer to an
automatic variable which pointed to a memory location on the stack.

char *routine(struct TIME *local_time)
{
   char day_of_week[9];
   ( some code )
   return day_of_week;
}

When we reported it as a bug, their reply was:

'This routine is designed to be used only as a calling argument so the
stack is not modified before the value is copied. for example: 
printf(file,"%s", routine( local_time)).'

There were at least 30 of these little goodies in their commercial
library and they absolutely refused to correct it - all the while
admitting that the return pointed to out-of-scope non-allocated
memory!
 So much for that vendor!

 
Will Honea 
--- Maximus/2 2.02
* Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)

SOURCE: echoes via The OS/2 BBS

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™.