[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: problem with new_item()
From: |
pcazallas |
Subject: |
Re: problem with new_item() |
Date: |
Wed, 26 May 2010 08:10:00 -0700 (PDT) |
Clemens Ladisch wrote:
>
> pcazallas wrote:
>> But after filling the whole ITEM** array, when I print the value of each
>> item from the first, all of them have stored the last one given to
>> new_item()...
>
> Item's don't have their own buffers, they just remember the pointer
> passed to new_item() (see the man page). It looks as if you used the
> same buffer for all items.
>
> You have to allocate a separate string buffer for each item.
>
>
> HTH
> Clemens
>
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/bug-ncurses
>
>
Thanks, it's working after implementing your tip =)
--
View this message in context:
http://old.nabble.com/problem-with-new_item%28%29-tp28679696p28682131.html
Sent from the Gnu - Ncurses mailing list archive at Nabble.com.