[GRASS-SVN] r30712 - grass/trunk/general/g.mapsets

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Mar 24 07:19:11 EDT 2008


Author: martinl
Date: 2008-03-24 07:19:11 -0400 (Mon, 24 Mar 2008)
New Revision: 30712

Modified:
   grass/trunk/general/g.mapsets/description.html
   grass/trunk/general/g.mapsets/main_cmd.c
Log:
g.mapsets: (cosmetics) message cleaning, some minor changes in manual, tcl/tk-related code removed


Modified: grass/trunk/general/g.mapsets/description.html
===================================================================
--- grass/trunk/general/g.mapsets/description.html	2008-03-24 07:30:20 UTC (rev 30711)
+++ grass/trunk/general/g.mapsets/description.html	2008-03-24 11:19:11 UTC (rev 30712)
@@ -30,7 +30,7 @@
 their data accessed by the user.  The user can modify the
 listing and order in which these mapsets are accessed by
 modifying the mapset search path; this can be done using
-the <em>g.mapsets</em> command.  This program allows the
+the <em>g.mapsets</em> command. This program allows the
 user to use other's relevant map data without altering the
 original data layer, and without taking up disk space with
 a copy of the original map. The <tt>mapname at mapsetname</tt>
@@ -95,8 +95,7 @@
 
 <em>g.mapsets</em> sets the current <em>mapset search
 path</em> to the <em>mapsets</em> named on the command
-line.  If <b>g.mapsets</b> is typed but no <em>mapset</em>
-
+line. If <em>g.mapsets</em> is typed but no <em>mapset</em>
 names are specified by the user on the command line, the
 program will print the user's current mapset search path,
 list available mapsets, and prompt the user for a new
@@ -118,11 +117,12 @@
 
 <h2>SEE ALSO</h2>
 
-<em><a HREF="g.access.html">g.access</a><br>
-<a HREF="g.copy.html">g.copy</a><br>
-<a HREF="g.gisenv.html">g.gisenv</a><br>
-<a HREF="g.list.html">g.list</a><br>
-<a HREF="g.mapset.html">g.mapset</a>
+<em>
+  <a HREF="g.access.html">g.access</a>,
+  <a HREF="g.copy.html">g.copy</a>,
+  <a HREF="g.gisenv.html">g.gisenv</a>,
+  <a HREF="g.list.html">g.list</a>,
+  <a HREF="g.mapset.html">g.mapset</a>
 </em>
 
 <h2>AUTHOR</h2>
@@ -134,6 +134,5 @@
 Greg Koerper, 
 ManTech Environmental Technology, Inc.
 
-
 <p>
 <i>Last changed: $Date$</i>

Modified: grass/trunk/general/g.mapsets/main_cmd.c
===================================================================
--- grass/trunk/general/g.mapsets/main_cmd.c	2008-03-24 07:30:20 UTC (rev 30711)
+++ grass/trunk/general/g.mapsets/main_cmd.c	2008-03-24 11:19:11 UTC (rev 30712)
@@ -8,7 +8,7 @@
  *               Markus Neteler <neteler itc.it>, 
  *               Moritz Lennert <mlennert club.worldonline.be>
  * PURPOSE:      set current mapset path
- * COPYRIGHT:    (C) 1994-2007 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1994-2008 by the GRASS Development Team
  *
  *               This program is free software under the GNU General Public
  *               License (>=v2). Read the file COPYING that comes with GRASS
@@ -43,13 +43,10 @@
     struct Flag *print;
     struct Flag *list;
 
-    if (argc < 2)
-	execl("/bin/sh", "sh", "-c", "$GISBASE/etc/g.mapsets.tcl", NULL);
-
     G_gisinit (argv[0]);
 
     module = G_define_module();
-    module->keywords = _("general");
+    module->keywords = _("general, settings");
     module->description =
 	_("Modifies the user's current mapset "
 	"search path, affecting the user's access to data existing "
@@ -98,10 +95,12 @@
 	    mapset = *ptr;
 	    if (G__mapset_permissions (mapset) < 0)
 	    {
-		fprintf (stderr, "\7ERROR: [%s] - no such mapset\n", mapset);
-		fprintf (stderr, "\nAvailable mapsets:\n\n");
-		G_ls(G_location_path(), stderr);
-		exit(EXIT_FAILURE);
+		G_fatal_error(_("Mapset <%s> not found"), mapset);
+		/*
+		  G_message(_("Available mapsets:"));
+		  G_ls(G_location_path(), stderr);
+		  exit(EXIT_FAILURE);
+		*/
 	    }
 	    nchoices++;
 	    strcat (Path, mapset);
@@ -130,12 +129,13 @@
 	    mapset = *ptr;
 	    if (G__mapset_permissions (mapset) < 0)
 	    {
-		fprintf (stderr, "\7ERROR: [%s] - no such mapset\n", mapset);
-		fprintf (stderr, "\nAvailable mapsets:\n\n");
-		G_ls(G_location_path(), stderr);
-		exit(EXIT_FAILURE);
+		G_fatal_error(_("Mapset <%s> not found"), mapset);
+		/*
+		  G_message(_("Available mapsets:"));
+		  G_ls(G_location_path(), stderr);
+		  exit(EXIT_FAILURE);
+		*/
 	    }
-
 	    nchoices++;
 	    strcat (Path, mapset);
 	    strcat (Path, " ");
@@ -207,6 +207,3 @@
 
     exit(EXIT_SUCCESS);
 }
-
-
-



More information about the grass-commit mailing list