[GRASS5] all color in vectors and areas
Eric G. Miller
egm2 at jps.net
Fri Mar 30 10:12:56 EST 2001
On Fri, Mar 30, 2001 at 12:15:53AM -0800, Eric G. Miller wrote:
> On Fri, Apr 06, 2001 at 01:53:06AM -0300, Fernando Pacheco wrote:
> > Hello:
> > I write a function D_translate_color_to_RGB(char *) in
> > src/libes/display/tran_color.c to translate user input string like
> > indigo or magenta or grey or 255,0,127 or (((255|0|||127)-- or
> > somestring255somestring0somestring127somestring to typedef RGB defined
> > in src/include/color.h then I can use all the colors in vectors
> > (d.vect) and areas (d.area). I'm sending to you my 2 new files, and a
> > d.area using the new library function. The function can substitute the
> > D_translate_color.
> >
> > I'm not a experience C program but my users like the new colors.
> > Fernando Pacheco.
>
> Thanks for your effort. Couple things I noticed in your function:
>
> Use of C++ style comments. AFAIK, these are allowed in ISO C99, but
> many older compilers will choke. Second (and worse) you are returning a
> locally scoped variable. This may work on some systems, but on others
> it will (and properly should) cause a segfault:
I'm a moron. Ignore this nonsense. Plain structures return fine.
Note to self: Go to sleep when tired!
--
Eric G. Miller <egm2 at jps.net>
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list