[GRASS-dev] G_strip does not strip line breaks(?)

Hamish hamish_nospam at yahoo.com
Mon Nov 27 17:22:29 EST 2006


Jachym Cepicky wrote:
> while testing r.quant, I found out, that r.quant is not able to parse
> "help" input correctly, because last "\n" character of the input is
> not being striped.
> 
> r.quant uses G_strip (lib/gis/strings.c) for this purpose, which
> strips only " " and "\t" characters, but not "\n".
> 
> I prepared this patch for strings.c. Do you think, it could be
> applied?

just to note, please be very very careful when subtly changing the
behavior of core lib functions. it is likely this may subtly break many
modules in the process. (ie do so only if you are willing to perform a
full audit or it fixes a clear bug)


> I added 
> G_chop(buff)
> to raster/r.quant/read_rules.c
> works nice

great.


Hamish




More information about the grass-dev mailing list