Re: appending a clist row
- From: learfox furry ao net
- To: Clemens Kirchgatterer <clemens linux-austria com>
- Cc: GTK Application Development List <gtk-app-devel-list gnome org>
- Subject: Re: appending a clist row
- Date: Fri, 5 Jan 2001 20:38:02 -0800 (PST)
/* Allocate a blank array of strings. */
text = (char **)malloc(clist_columns * sizeof(char *));
if(text != NULL)
{
/* Set each pointer to point to an allocated empty string. */
for(i = 0; i < clist_columns; i++)
text[i] = strdup("");
}
just for my curiosity: why do you use strdup() instead of passing the
const char * "" ?
I got the impression that the array and or strings within would be
modified.
I don't know if they are so just to be on the safe side I made coppies.
--
Sincerely, ,"-_ \|/
-Capt. Taura M. , O=__ --X--
..__ ,_JNMNNEO=_ /|\
OMNOUMmnne. {OMMNNNEEEEOO=_
UOOOBIOOOEOMMn. 'LONMMMMNNEEEOOO=.__..,,..
UUOOEUUOOOOOOOObe '"=OMMMMWNEEEOOOOO,"=OEEEOO=,._
OOUUUIEEIOONNOIUbe. "7OMMMMNNNNNWWEEEEOOOOOO" "'.
EEBNNMMMNWNWWEEIMMNe. __ 7EMMMNNNNNWWWEEEEEEEOO. " .
NNMMMMWWWMMMWEINMMMNn "=BBEEEEMMMMMMMMNNNWWWEEOOOOO=._ .
http://furry.ao.net/~learfox/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]