[GRASS-SVN] r30032 - grass/trunk/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Feb 9 05:41:14 EST 2008
Author: neteler
Date: 2008-02-09 05:41:13 -0500 (Sat, 09 Feb 2008)
New Revision: 30032
Modified:
grass/trunk/lib/gis/mapset.c
Log:
use GMAPSET_MAX; direct use of G_fatal_error()
Modified: grass/trunk/lib/gis/mapset.c
===================================================================
--- grass/trunk/lib/gis/mapset.c 2008-02-09 08:56:43 UTC (rev 30031)
+++ grass/trunk/lib/gis/mapset.c 2008-02-09 10:41:13 UTC (rev 30032)
@@ -30,12 +30,10 @@
char *
G_mapset(void)
{
- static char mapset[30];
+ static char mapset[GMAPSET_MAX];
static int first = 1;
char *m;
- char msg[100];
-
m = G__mapset();
if( m == NULL )
G_fatal_error( _("MAPSET is not set") );
@@ -53,14 +51,13 @@
return mapset;
/*
case 0:
- sprintf(msg,"MAPSET %s - permission denied", mapset);
+ G_fatal_error ("MAPSET %s - permission denied", mapset);
break;
*/
default:
- sprintf(msg,_("MAPSET %s not found"), mapset);
+ G_fatal_error (_("MAPSET %s not found"), mapset);
break;
}
- G_fatal_error (msg);
exit(EXIT_FAILURE);
}
More information about the grass-commit
mailing list