On Sat, 6 Jul 2013, Artur Tarassow wrote:
Hi all,
I obtain a segmentation fault after defining a simple string.
But first I have to say that I updated to current cvs by applying the
usual linux command:
<terminal>
cvs update -d -P && ./configure --enable-build-doc --enable-gtk3
--enable-openmp --prefix=/usr && make clean -j2 && make -j2 &&
sudo
make install -j2
<\terminal>
Nevertheless, the built date is shown to be 2013-06-10, but it should
be a more recent version, right?
Yes, CVS has been updated several times since then. The latest
revision is from today, 2013-07-06. The only slightly doubtful thing
I see above is "make clean -j2". I don't think I've ever tested a
parallel "make clean", though I'd be surprised if that's the source
of the problem. You could try a straight "make clean" and see if
that makes any difference.
The segementation fault emerges after running this script:
<hansl>
open denmark
win = $windows
if win = 1
sprintf functions "%s",
"C:\Users\artur.tarassow\Dropbox\gretl_script"
else
sprintf functions "%s", "/home/artur/Dropbox/gretl_script"
endif
<\hansl>
I'm not sure about earlier versions, but this scripts runs OK using
current CVS.
Note, however, that use of the "sprintf" command is not required in
this case, and wastes CPU cycles. You can just say
string functions
if win = 1
functions = "C:\Users\artur.tarassow\Dropbox\gretl_script"
else
functions = "/home/artur/Dropbox/gretl_script"
endif
Allin Cottrell