[GRASS-SVN] r72610 - grass/trunk/general/g.region

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 9 04:19:58 PDT 2018


Author: martinl
Date: 2018-04-09 04:19:57 -0700 (Mon, 09 Apr 2018)
New Revision: 72610

Modified:
   grass/trunk/general/g.region/local_proto.h
   grass/trunk/general/g.region/main.c
Log:
revert r72590


Modified: grass/trunk/general/g.region/local_proto.h
===================================================================
--- grass/trunk/general/g.region/local_proto.h	2018-04-08 16:52:56 UTC (rev 72609)
+++ grass/trunk/general/g.region/local_proto.h	2018-04-09 11:19:57 UTC (rev 72610)
@@ -12,7 +12,6 @@
 #define PRINT_NANGLE 0x100
 #define PRINT_GMT    0x200
 #define PRINT_WMS    0x400
-#define PRINT_WF     0x800
 
 /* zoom.c */
 int zoom(struct Cell_head *, const char *, const char *);

Modified: grass/trunk/general/g.region/main.c
===================================================================
--- grass/trunk/general/g.region/main.c	2018-04-08 16:52:56 UTC (rev 72609)
+++ grass/trunk/general/g.region/main.c	2018-04-09 11:19:57 UTC (rev 72610)
@@ -13,7 +13,6 @@
  *   	    	Read the file COPYING that comes with GRASS for details.
  ****************************************************************************/
 
-#include <dirent.h> 
 #include <string.h>
 #include <stdlib.h>
 #include <math.h>
@@ -40,11 +39,8 @@
     const char *value;
     const char *name;
     const char *mapset;
-    char *windows_path = G_malloc(1024);
     char **rast_ptr, **vect_ptr;
     int pix;
-    DIR *d;
-    struct dirent *dir;
 
     struct GModule *module;
     struct
@@ -52,7 +48,7 @@
 	struct Flag
 	    *update, *print, *gprint, *flprint, *lprint, *eprint, *nangle,
 	    *center, *res_set, *dist_res, *dflt, *z, *savedefault,
-	    *bbox, *gmt_style, *wms_style, *list;
+	    *bbox, *gmt_style, *wms_style;
     } flag;
     struct
     {
@@ -169,11 +165,6 @@
     flag.update->description = _("Do not update the current region");
     flag.update->guisection = _("Effects");
 
-    flag.list = G_define_flag();
-    flag.list->key = 'L';
-    flag.list->description = _("List available regions");
-    flag.list->guisection = _("Print");
-
     /* parameters */
 
     parm.region = G_define_standard_option(G_OPT_M_REGION);
@@ -371,7 +362,7 @@
     G_option_required(flag.dflt, flag.savedefault, flag.print, flag.lprint,
                       flag.eprint, flag.center, flag.gmt_style, flag.wms_style,
                       flag.dist_res, flag.nangle, flag. z, flag.bbox, flag.gprint,
-                      flag.res_set, flag.update, flag.list, parm.region, parm.raster,
+                      flag.res_set, flag.update, parm.region, parm.raster,
                       parm.raster3d, parm.vect, parm.north, parm.south, parm.east,
                       parm.west, parm.top, parm.bottom, parm.rows, parm.cols,
                       parm.res, parm.res3, parm.nsres, parm.ewres, parm.tbres,
@@ -859,21 +850,6 @@
     if (print_flag)
 	print_window(&window, print_flag, flat_flag);
 
-    if (flag.list->answer) {
-          mapset = G_mapset_path();
-          sprintf(windows_path, "%s/%s", mapset, "windows");
-          d = opendir(windows_path);
-
-          if (d) {
-            while ((dir = readdir(d)) != NULL) {
-              if (dir->d_type == DT_REG) {
-                printf("%s\n", dir->d_name);
-              }
-            }
-            closedir(d);
-          }
-    }
-
     exit(EXIT_SUCCESS);
 }
 



More information about the grass-commit mailing list