|
@@ -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 @@ int main(int argc, char *argv[])
|
|
|
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 @@ int main(int argc, char *argv[])
|
|
|
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);
|