[GRASS-dev] r.colors: rules file list unsorted
Hamish
hamish_nospam at yahoo.com
Tue Jan 30 19:38:58 EST 2007
Paul Kelly wrote:
>
> I've added the updated version to CVS now. There are two new
> functions: G_ls() prints a directory listing in column format to the
> specified stream.
> G__ls() stores a list of the files in a directory in an array. (It is
> a lower level function used by G_ls().)
>
> I've also updated lib/init/set_data.c to use these two new functions
> for listing locations and mapsets during the text-based startup.
> Hopefully they will be useful in many other places too, both to
> replace usage of system("ls") etc. and also to reduce cloned code for
> directory listing.
what about:
void G_ls(const char *dir, FILE *stream, int singlecolumn)
where singlecolumn is boolean: 0 prints column output, 1 prints one file
per line.
I can think of one place it might be useful, "i.group -g".
I don't like "int multicolumn" as it might be mistaken to mean number
of columns, not a boolean switch. (which is another idea, -1,0 means
auto, otherwise as specified)
Hamish
More information about the grass-dev
mailing list