[GRASS-SVN] r64466 - grass/trunk/display/d.info

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Feb 4 13:05:10 PST 2015


Author: martinl
Date: 2015-02-04 13:05:10 -0800 (Wed, 04 Feb 2015)
New Revision: 64466

Modified:
   grass/trunk/display/d.info/main.c
Log:
d.info: remove monitors-related code (see #2577)


Modified: grass/trunk/display/d.info/main.c
===================================================================
--- grass/trunk/display/d.info/main.c	2015-02-04 20:22:18 UTC (rev 64465)
+++ grass/trunk/display/d.info/main.c	2015-02-04 21:05:10 UTC (rev 64466)
@@ -24,7 +24,7 @@
 int main(int argc, char *argv[])
 {
     struct GModule *module;
-    struct Flag *rflag, *dflag, *fflag, *eflag, *bflag, *gflag, *sflag;
+    struct Flag *rflag, *dflag, *fflag, *eflag, *bflag, *gflag;
     double st, sb, sl, sr;
     double ft, fb, fl, fr;
 
@@ -65,12 +65,7 @@
     gflag->description =
 	_("Display geographic coordinates and resolution of entire frame");
 
-    sflag = G_define_flag();
-    sflag->key = 's';
-    sflag->description =
-	_("Print path to support files of currently selected monitor");
-
-    G_option_required(rflag, dflag, fflag, eflag, bflag, gflag, sflag, NULL);
+    G_option_required(rflag, dflag, fflag, eflag, bflag, gflag, NULL);
     
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
@@ -126,50 +121,7 @@
 	fprintf(stdout, "nsres=%.15g\n", -D_get_d_to_u_yconv() );
     }
 
-    if (sflag->answer) {
-        const char *curr_mon;
-
-        curr_mon = G_getenv_nofatal("MONITOR");
-        if (!curr_mon) {
-            G_warning(_("No monitor is currently selected"));
-        }
-        else {
-            char *p;
-            char tmpdir[GPATH_MAX], mon_path[GPATH_MAX];
-            struct dirent *dp;
-            DIR *dirp;
-
-            G_temp_element(tmpdir);
-            strcat(tmpdir, "/");
-            strcat(tmpdir, "MONITORS");
-            strcat(tmpdir, "/");
-            strcat(tmpdir, curr_mon);
-
-            G_file_name(mon_path, tmpdir, NULL, G_mapset());
-            fprintf(stdout, "path=%s\n", mon_path);
-            
-            dirp = opendir(mon_path);
-            if (!dirp) {
-                G_warning(_("No support files found for monitor <%s>"), curr_mon);
-            }
-            else {
-                 while ((dp = readdir(dirp)) != NULL) {
-                     if (!dp->d_name || dp->d_type != DT_REG)
-                         continue;
-
-                     p = strrchr(dp->d_name, '.');
-                     if (!p)
-                         p = dp->d_name;
-                     else
-                         p++; /* skip '.' */
-                     
-                     fprintf(stdout, "%s=%s%c%s\n", p,
-                             mon_path, HOST_DIRSEP, dp->d_name);
-                 }
-            }
-        }
-    }
-    
+   
     D_close_driver();
 
     exit(EXIT_SUCCESS);



More information about the grass-commit mailing list