delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/07/07/19:46:39

Sender: nate AT cartsys DOT com
Message-ID: <3783E638.2140AC88@cartsys.com>
Date: Wed, 07 Jul 1999 16:43:52 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.10 i586)
MIME-Version: 1.0
To: djgpp AT delorie DOT com
Subject: Re: Hmmm, weird problem...
References: <377F7C68 DOT B7AA796B AT primus DOT com DOT au> <931161155 DOT 20731 AT www DOT remarq DOT com>
Reply-To: djgpp AT delorie DOT com

Clemens Valens wrote:
> 
> How do you initialize "tok"? Your code seems to work if you
> initialize it to NULL for each token. Remember that realloc
> tries to reallocate the same memory if possible. If it
> can't it will allocate some other block. I am not sure if
> it will copy data from the old block to the new block.

Yes, it will (otherwise it would be rather useless).
-- 

Nate Eldredge
nate AT cartsys DOT com

- Raw text -


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