[GRASS5] Re: rules in r.colors

Markus Neteler neteler at itc.it
Wed May 19 11:42:53 EDT 2004


On Mon, May 17, 2004 at 12:49:39PM +1200, Hamish wrote:
> > > With the new rules code you did, it is possible to read in text
> > > files of color rules. I was suggesting to use this same code to
> > > access user-defined files rather than a limited set of color table
> > > files located in the $GISBASE/etc/colors folder. It is indeed a
> > > different objective than yours was.
> > 
> > Right. So it should be a separate option, e.g. "file=".
> 
> Another solution (which I'm not endorsing here, just pointing out) is to
> use a flag to specify the rules file is local file.
> 
> 
> eg non-functional pseudo-code:
> 
> if(flag_local->answer)
>     strcpy(filename, opt_rules->answer);
> else {
>     strcpy(filename, "$GISBASE/etc/colors/");
>     strcat(filename, opt_rules->answer);
> }
> fp1 = fopen(filename, "r");
> 
> 
> 
> I don't like -l flags as they can be confused with -1 in some fonts.

What about making this a function? For integration into the
parser part (as done in 5.7 to find the installed DB drivers)
?

 Markus




More information about the grass-dev mailing list