[GRASS-dev] [GRASS-SVN] r68127 - grass/trunk/lib/gis

On Wed, Mar 23, 2016 at 5:29 PM, <svn_grass@osgeo.org> wrote:

Author: hcho
Date: 2016-03-23 14:29:40 -0700 (Wed, 23 Mar 2016)
New Revision: 68127

Modified:
   grass/trunk/lib/gis/parser_standard_options.c
Log:
parser: Fix indentation

Please, see:

https://trac.osgeo.org/grass/browser/grass/trunk/tools/grass_indent.sh
https://trac.osgeo.org/grass/wiki/Submitting/C#Indentation

Modified: grass/trunk/lib/gis/parser_standard_options.c

--- grass/trunk/lib/gis/parser_standard_options.c 2016-03-23
19:54:16 UTC (rev 68126)
+++ grass/trunk/lib/gis/parser_standard_options.c 2016-03-23
21:29:40 UTC (rev 68127)
@@ -659,26 +659,26 @@
        break;

     case G_OPT_M_LOCATION:
- Opt->key = "location";
- Opt->type = TYPE_STRING;
- Opt->required = NO;
- Opt->multiple = NO;
- Opt->label = _("Location name");
- Opt->description = _("Location name (not location path)");
- Opt->gisprompt = "old,location,location";
- Opt->key_desc = "name";
- break;
+ Opt->key = "location";
+ Opt->type = TYPE_STRING;
+ Opt->required = NO;
+ Opt->multiple = NO;
+ Opt->label = _("Location name");
+ Opt->description = _("Location name (not location path)");
+ Opt->gisprompt = "old,location,location";
+ Opt->key_desc = "name";
+ break;

Vaclav, that script completely removes tabs and I didn’t want to introduce a big revision for no reason other than changing those two options to match the rest of the file.

···

On Wed, Mar 23, 2016 at 10:59 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Wed, Mar 23, 2016 at 5:29 PM, <svn_grass@osgeo.org> wrote:

Author: hcho
Date: 2016-03-23 14:29:40 -0700 (Wed, 23 Mar 2016)
New Revision: 68127

Modified:
grass/trunk/lib/gis/parser_standard_options.c
Log:
parser: Fix indentation

Please, see:

https://trac.osgeo.org/grass/browser/grass/trunk/tools/grass_indent.sh
https://trac.osgeo.org/grass/wiki/Submitting/C#Indentation

Modified: grass/trunk/lib/gis/parser_standard_options.c

— grass/trunk/lib/gis/parser_standard_options.c 2016-03-23 19:54:16 UTC (rev 68126)
+++ grass/trunk/lib/gis/parser_standard_options.c 2016-03-23 21:29:40 UTC (rev 68127)
@@ -659,26 +659,26 @@
break;

case G_OPT_M_LOCATION:

  • Opt->key = “location”;
  • Opt->type = TYPE_STRING;
  • Opt->required = NO;
  • Opt->multiple = NO;
  • Opt->label = _(“Location name”);
  • Opt->description = _(“Location name (not location path)”);
  • Opt->gisprompt = “old,location,location”;
  • Opt->key_desc = “name”;
  • break;
  • Opt->key = “location”;
  • Opt->type = TYPE_STRING;
  • Opt->required = NO;
  • Opt->multiple = NO;
  • Opt->label = _(“Location name”);
  • Opt->description = _(“Location name (not location path)”);
  • Opt->gisprompt = “old,location,location”;
  • Opt->key_desc = “name”;
  • break;

On Wed, Mar 23, 2016 at 11:29 PM, Huidae Cho <grass4u@gmail.com> wrote:

Vaclav, that script completely removes tabs and I didn't want to introduce
a big revision for no reason other than changing those two options to match
the rest of the file.

I think there is no need to do that. There is a lot of files in the source
code which do not comply with any (!) version of the indent script. If you
want the file to be consistent, why not to be consistent with the script
and actually use it? If inconsistencies with Submitting guidelines are OK,
why change anything? Perhaps it will turn into the new style itself in time
if we won't be reverting it back. We can also say that we actually want
everything to be consistent and do that big change.

I partly agree with you, but I think at least there should be consistency in the same file. Those two options had 4 spaces, but others have tabs or 8 spaces. Well, there is still inconsistency… Why don’t we use the indent script for all files?

···

On Wed, Mar 23, 2016 at 11:52 PM, Vaclav Petras <wenzeslaus@gmail.com> wrote:

On Wed, Mar 23, 2016 at 11:29 PM, Huidae Cho <grass4u@gmail.com> wrote:

Vaclav, that script completely removes tabs and I didn’t want to introduce a big revision for no reason other than changing those two options to match the rest of the file.

I think there is no need to do that. There is a lot of files in the source code which do not comply with any (!) version of the indent script. If you want the file to be consistent, why not to be consistent with the script and actually use it? If inconsistencies with Submitting guidelines are OK, why change anything? Perhaps it will turn into the new style itself in time if we won’t be reverting it back. We can also say that we actually want everything to be consistent and do that big change.