[GRASS-SVN] r51598 - grass/branches/develbranch_6/lib/gis
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 5 04:56:35 EDT 2012
Author: neteler
Date: 2012-05-05 01:56:35 -0700 (Sat, 05 May 2012)
New Revision: 51598
Modified:
grass/branches/develbranch_6/lib/gis/gislib.dox
Log:
fix example
Modified: grass/branches/develbranch_6/lib/gis/gislib.dox
===================================================================
--- grass/branches/develbranch_6/lib/gis/gislib.dox 2012-05-05 08:56:21 UTC (rev 51597)
+++ grass/branches/develbranch_6/lib/gis/gislib.dox 2012-05-05 08:56:35 UTC (rev 51598)
@@ -429,20 +429,24 @@
interfaces with the command-line version of <I>d.rast</I>:
\verbatim
+#include <stdlib.h>
#include <grass/gis.h>
-int main(char *argc, char **argv)
+
+int main(int argc, char *argv[])
{
- char name[GNAME_MAX], *mapset, *fqn;
- char command[1024];
+ char name[GNAME_MAX], *mapset, *fqn;
+ char command[1024];
- G_gisinit(argv[0]);
- mapset = G_ask_cell_old("", name, "");
+ G_gisinit(argv[0]);
+ mapset = G_ask_cell_old("", name);
- if (mapset == NULL) exit(EXIT_SUCCESS);
+ if (mapset == NULL)
+ exit(EXIT_SUCCESS);
- fqn = G_fully_qualified_name(name, mapset);
- sprintf(command, "d.rast map='%s'", fqn);
- system(command);
+ fqn = G_fully_qualified_name(name, mapset);
+ sprintf(command, "d.rast map='%s'", fqn);
+ system(command);
+ exit(EXIT_SUCCESS);
}
\endverbatim
More information about the grass-commit
mailing list