TIP: Click on subject to list as thread! ANSI
echo: c_echo
to: Darin McBride
from: Auke Reitsma
date: 1998-08-26 21:02:00
subject: MDEBUG

Hi Darin,

On 25 Aug 98, 10:02, you wrote to Auke Reitsma

 AR>> - I suspect it behaves badly in the presence of strdup().

 DM> 1. strdup() is non-standard.

Yeah. But so what. It is so useful that if it didn't exist you'd have to
invent it ... if it weren't in Snippets.

 DM> 2. This is one reason I hate functions that return dynamically
 DM> allocated memory without providing an opposite method to clean it
 DM> up.

Nah. The opposite method for strdup() is free().

 DM>   Even a simple unstrdup() would be helpful to remind everyone
 DM> to clean up...  malloc/calloc have free, fopen has fclose, ...

1:  #define unstrdup(x) free(x)

2:  ... windows has deltree c:\windows. ;-)

3:  ... new has delete, but newt does not have deletet ...

Greetings from
 _____
 /_|__|  Auke Reitsma, Delft, The Netherlands.
/  | \  --------------------------------------

--- GEcho 1.00
* Origin: Home by the C (Auke.Reitsma{at}net.hcc.nl) (2:281/400.20)
SEEN-BY: 396/1 622/419 632/371 633/260 267 270 371 634/397 635/506 728 810
SEEN-BY: 639/252 670/213 218
@PATH: 281/400 1 280/801 270/101 396/1 633/260 635/506 728 633/267

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