Hi all,
most of modules assume that separator is limited to one character.
Recently I have added to libgis G_option_to_separator() which gets
separator character from the option [1]. Some of modules also accepts
more characters as separator. Maybe it's good time to consolidate it.
The question is - should be separator limited to one character or not.
I would say that for horizontal separator one char should be enough.
In some cases (eg. vertical separator in `db.select`) more characters
(`char *`) as a separator also make sense. If we limit separator to
one character, we need to handle such cases separately, eg. by adding
G_option_to_separator_as_string().
What do you think? Martin
[1] http://grass.osgeo.org/programming7/parser_8c.html#ad7e371d6e2ef54f8e739e93de68d651b
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
Hi,
On 30 January 2013 15:22, Martin Landa <landa.martin@gmail.com> wrote:
Hi all,
most of modules assume that separator is limited to one character.
Recently I have added to libgis G_option_to_separator() which gets
separator character from the option [1]. Some of modules also accepts
more characters as separator. Maybe it's good time to consolidate it.
The question is - should be separator limited to one character or not.
I would say that for horizontal separator one char should be enough.
In some cases (eg. vertical separator in `db.select`) more characters
(`char *`) as a separator also make sense. If we limit separator to
one character, we need to handle such cases separately, eg. by adding
G_option_to_separator_as_string().
What do you think? Martin
I like multi-character separator. For example, once I generated LaTeX
table with some GRASS command. Even though "&" is sufficient I wanted
nice source, so I used " & ". For row separator (e.g., CRLF on MS
Windows) and for HTML/XML, multi-character separators are always
needed.
Vaclav
[1] http://grass.osgeo.org/programming7/parser_8c.html#ad7e371d6e2ef54f8e739e93de68d651b
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Hi,
2013/1/31 Vaclav Petras <wenzeslaus@gmail.com>:
[...]
I like multi-character separator. For example, once I generated LaTeX
table with some GRASS command. Even though "&" is sufficient I wanted
nice source, so I used " & ". For row separator (e.g., CRLF on MS
Windows) and for HTML/XML, multi-character separators are always
needed.
it make sense, if no objections I will change G_option_to_separator()
to return separator as a string.
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa
Hi,
2013/2/2 Martin Landa <landa.martin@gmail.com>:
[...]
it make sense, if no objections I will change G_option_to_separator()
to return separator as a string.
changed in r54960. I have also updated in r54961 the modules which are
using G_option_to_separator() to support multi-character separators.
TODO: update rest of modules which have separator as an option to use
G_option_to_separator().
Martin
--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa