ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2007/05/16/13:39:51

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Message-ID: <464B3B4F.1040501@drv.nu>
Date: Wed, 16 May 2007 12:11:43 -0500
From: Daniel Verkamp <daniel AT drv DOT nu>
User-Agent: Thunderbird 2.0.0.0 (Windows/20070326)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: How to count the occurance of a character in a string?
References: <20070511181210 DOT GT3209 AT freenet DOT de> <f22p42$bu7$1 AT aioe DOT org> <20070512111553 DOT GO1881 AT freenet DOT de> <f24kg3$k88$1 AT aioe DOT org> <20070515164057 DOT GC1818 AT freenet DOT de> <f2f79a$1i6$1 AT aioe DOT org> <20070516160358 DOT GA20179 AT freenet DOT de>
In-Reply-To: <20070516160358.GA20179@freenet.de>
X-Enigmail-Version: 0.95.0
Reply-To: djgpp AT delorie DOT com

Michelle Konzack wrote:
> But since strdupa() does not exist under DJGPP, I have some problems
>
>   

Do you really need the special behavior of strdupa() versus the standard
strdup()? The only difference I can see from my local man page is that
strdupa() uses alloca() (allocates memory on the stack instead of the
heap), which shouldn't cause any functional differences except that you
must call free() on the pointer that strdup() returns (and not the one
strdupa() returns!).

-- Daniel Verkamp

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019