[GRASS5] Re: proj bugs

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Jul 7 08:43:26 EDT 2003


On Mon, 7 Jul 2003, Markus Neteler wrote:

> On Sun, Jul 06, 2003 at 08:16:47PM +1200, H Bowman wrote:
> > 'd.where --help' now launches into the program instead of returning to
> > the terminal prompt..
>
> Yes, because the G_parser section is not following the standard any more
> (due to the requested revert of my change).
> Only solutions are:
>
>  - make it standard (revert the revert of changes)
>  - hack in --help, help, -h (see e.g. r.mapcalc)
>
> Something like:
>    if (argc > 1 && strcmp(argv[1], "help") == 0)
>
> Change to whatever you prefer.

The following patch works:
 Index: main.c
===================================================================
RCS file: /grassrepository/grass/src/display/d.where/cmd/main.c,v
retrieving revision 1.11
diff -u -r1.11 main.c
--- main.c      4 Jul 2003 09:19:03 -0000       1.11
+++ main.c      7 Jul 2003 12:40:42 -0000
@@ -39,9 +39,9 @@
                         "transformation parameters defined in current
location
if available";


-    /* if (G_parser(argc,argv))
-       exit(1);*/
-    if (argc > 1 && G_parser(argc,argv));
+    if (argc > 1 && G_parser(argc,argv))
+       exit(1);
+

     if ( ((G_projection() == PROJECTION_LL) && wgs84->answer) ||
         ((G_projection() != PROJECTION_LL) && (latlong->answer || wgs84->answer)) )

(which is what it was originally).

But what was the specific problem with GRASS 5.1? Maybe we could work
around it.




More information about the grass-dev mailing list