logo separator

[mkgmap-dev] Error in style file relations?

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Feb 2 14:00:04 GMT 2018

Hi Steve,

I've tried it with Minkos style which uses this as last line in the lines file
include 'inc/compat_lines';

I see this error message:
Error in style: Error: (inc/compat_lines:124): Unrecognised command 'no'

line 124 is:
mkgmap:carpool_compat=yes  { setaccess=no; set mkgmap:bus=yes; set mkgmap:emergency=yes; set mkgmap:carpool=yes }

I assume it should be
mkgmap:carpool_compat=yes  { setaccess no; set mkgmap:bus=yes; set mkgmap:emergency=yes; set mkgmap:carpool=yes }

but maybe WanMil meant
mkgmap:carpool_compat=yes  { set access=no; set mkgmap:bus=yes; set mkgmap:emergency=yes; set mkgmap:carpool=yes }

I've never fully understood that syntax.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Steve Ratcliffe <steve at parabola.me.uk>
Gesendet: Freitag, 2. Februar 2018 14:04
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: Re: [mkgmap-dev] Error in style file relations?


Hi

Here is a patch to fix the problem where commands that
are not separated by a semi-colon are not ignored.

Various possible errors are now caught instead of
being silently ignored.

In the original relation file that Gerd fixed, there was the
following:

$route=road & $network='e-road' {
   apply {
        add ref='${ref}';
        add int_ref='${int_ref}';
        add network='e-road'                # missing semi-colon
        add mkgmap:fast_road='yes';
   }
}

this was being read as:

$route=road & $network='e-road' {
   apply {
     add ref='${ref}';
        add int_ref='${int_ref}';
        add network='e-road' | 'add' | 'mkgmap:fast_road' | '=' | 'yes';
   }
}

Since 'e-road' does not contain any variables, then it was always
the value that 'network' was set to.

Now you do not need any of the semi-colons, so the original code
would be read as intended.

I don't believe that there were any more similar errors
in the style file, so this patch should have no effect for the
default style.

Of course it may find errors in custom styles, or something that did not
work before may suddenly start to work as intended causing a difference.

..Steve


More information about the mkgmap-dev mailing list