[GRASS-dev] making g.remove less verbose
Hamish
hamish_nospam at yahoo.com
Wed Sep 27 12:10:16 EDT 2006
Jachym Cepicky wrote:
>
> one question: in cmd/remove.c, lines 61 to 64 list of raster files is
> printed to stderr:
>
> G_warning(
> _("[%s@%s] is a base map. Remove reclassed map%s
> first:"),
> name, mapset, (nrmaps > 1 ? "s" : ""));
(_("map%s"), >1?"s":"") is bad. "s" to make plural doesn't always translate.
>
> fprintf(stderr, " %s", *rmaps);
> for(rmaps++; *rmaps; rmaps++)
> fprintf(stderr, ",%s", *rmaps);
> fprintf(stderr, "\n");
>
> which leds to
>
> g.remove rast=pokus
> WARNING: [pokus at jachym] is a base map. Remove reclassed map first:
> tmp at jachym
>
> would it make sence, rewrite this fprintfs to G_warning too, so the
> result would be:
>
> WARNING: [pokus at jachym] is a base map. Remove reclassed map first:
> WARNING: tmp at jachym
Try and include all text in one G_warning(). It will wrap and indent
multi-line text correctly. The above code might overflow it's buffer
though, which would be bad.. so maybe keep the existing way?
Hamish
More information about the grass-dev
mailing list