Again error with graphics.h
David Bateman
adb014 at gmail.com
Tue May 27 06:37:34 CDT 2008
David Bateman wrote:
> Andrea Spadaccini wrote:
>
>> 2008/5/27 Jaroslav Hajek <highegg at gmail.com>:
>>
>>
>>>> $ cd src
>>>> $ make graphics.h
>>>>
>>>>
>>> is graphics.h created after this command?
>>> Building graphics.h requires awk. Do you have awk installed? Is it set
>>> properly in the Makeconf file?
>>>
>> You are right, it is not created! I thought that I had read that it
>> was correctly created.
>> I've got AWK.
>>
>> Here's the error:
>> andrea at beriserv:~/octave-hg/octave/src$ make graphics.h
>> making defaults.h from defaults.h.in
>> defaults.h is unchanged
>> making graphics.h
>> mawk: ./genprops.awk: line 413: syntax error at or near ,
>> mawk: ./genprops.awk: line 439: syntax error at or near ,
>>
>> Thanks,
>>
>>
>
>
> Lines 413 and 439 correspond to the only lines in genprops.awk that call
> the gensub function. gensub is a gawk extension to awk and so in fact
> you don't just need awk but rather gawk.. Perhaps we should either test
> for this in teh configure or remove the use of gensub from genprops.awk
>
> D.
>
>
>
In fact the change is fairly easy, just replace
dval = gensub (/^.*\{(.*)\}.*$/, "\"\\1\"", "g", dval);
with
gsub (^.*\{(.*)\}.*$/, "\"\\1\"", dval);
at line 413 and
class_name = gensub (/^.*BEGIN_PROPERTIES\((.*)\)/, "\\1", "g");
with
class_name = $0;
gsub (/^.*BEGIN_PROPERTIES\((.*)\)/, "\\1", class_name);
at line 439. I believe gsub is compatible with awk.
D.
More information about the Help-octave
mailing list