Re: [ng-spice] History and command completion
--
On Sat, 11 Nov 2000 11:00:46 widlok wrote:
>Hi,
> Yes, You are right about the pointers. Other solution could be to change
>cp_unquote in such way that it will not making a copy of the string but
>rather overwriting given string. I am not sure, but I will try to check it.
>
>You wrote (I don't remember where) that the calloc() might cause problems
>with tfree(). I am not sure, but I think that it is not possible. As far as
>I know calloc() uses malloc() inside, but don't take it for sure.
>
> Regards
> Michael
>
+ Al Davis calloc code. (Thanks to you)
Good, so i feel better now. The patches i sent should run. You may check only
in variable.c why we have the segfault. But it seems that paolo has fixed the
problem.
I think that the cp_unquote should be left as it is. My patch had resolved
the memory leak anywhere this function is called. So try to fix only the
variable.c problem instead of reversing all the patch. Reversing the patch
seems to be a big job as Arno said.
The original code has tried to free the cp_unquote result in some files. see
for example com_chdir.c and xgraph.c. Unfortunately this effort has not been
done in many files.
I think that fixing variable.c problem is better than changing cp_unquote
code.
Best regards.
Dezai Glao
HotBot - Search smarter.
http://www.hotbot.com
Partial thread listing: