[GRASS-SVN] r34481 - in grass/trunk: imagery/i.vpoints
raster/r.cost raster/r.out.tiff raster/r.surf.idw
raster/r.walk raster/r.water.outlet raster/wildfire/r.ros
raster/wildfire/r.spread raster/wildfire/r.spreadpath
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Nov 24 18:55:42 EST 2008
Author: glynn
Date: 2008-11-24 18:55:42 -0500 (Mon, 24 Nov 2008)
New Revision: 34481
Modified:
grass/trunk/imagery/i.vpoints/drawvect.c
grass/trunk/raster/r.cost/main.c
grass/trunk/raster/r.out.tiff/main.c
grass/trunk/raster/r.surf.idw/main.c
grass/trunk/raster/r.walk/main.c
grass/trunk/raster/r.water.outlet/main.c
grass/trunk/raster/wildfire/r.ros/main.c
grass/trunk/raster/wildfire/r.spread/main.c
grass/trunk/raster/wildfire/r.spreadpath/main.c
Log:
Don't bother checking the return code from G_get_window():
It never returns a failure code, and soon won't return anything
Modified: grass/trunk/imagery/i.vpoints/drawvect.c
===================================================================
--- grass/trunk/imagery/i.vpoints/drawvect.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/imagery/i.vpoints/drawvect.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -89,10 +89,7 @@
get_vector_color(); /* ask line_color to draw map */
if (!numfiles) { /* first map: SET VECTOR WINDOW BY WIND */
- if (G_get_window(&cellhd) < 0) {
- G_warning("Can't read current region parameters");
- return 0;
- }
+ G_get_window(&cellhd);
G_copy(&VIEW_MAP2->cell.head, &cellhd, sizeof(cellhd));
}
else /* not the first map */
Modified: grass/trunk/raster/r.cost/main.c
===================================================================
--- grass/trunk/raster/r.cost/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/r.cost/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -230,8 +230,7 @@
out_file = G_tempfile();
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error(_("Unable to read current window parameters"));
+ G_get_window(&window);
/* Find north-south, east_west and diagonal factors */
EW_fac = 1.0;
Modified: grass/trunk/raster/r.out.tiff/main.c
===================================================================
--- grass/trunk/raster/r.out.tiff/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/r.out.tiff/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -142,8 +142,7 @@
G_fatal_error(_("Unable to read header of raster map <%s>"),
inopt->answer);
- if ((G_get_window(&cellhd) < 0))
- G_fatal_error(_("Can't set window"));
+ G_get_window(&cellhd);
G_read_colors(inopt->answer, "", &colors);
if ((isfp = G_raster_map_is_fp(inopt->answer, "")))
Modified: grass/trunk/raster/r.surf.idw/main.c
===================================================================
--- grass/trunk/raster/r.surf.idw/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/r.surf.idw/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -132,8 +132,7 @@
output = parm.output->answer;
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error(_("Unable to read current region parameters"));
+ G_get_window(&window);
/* find number of rows and columns in window */
nrows = G_window_rows();
Modified: grass/trunk/raster/r.walk/main.c
===================================================================
--- grass/trunk/raster/r.walk/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/r.walk/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -335,8 +335,7 @@
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error(_("Unable to read current window parameters"));
+ G_get_window(&window);
/* Find north-south, east_west and diagonal factors */
Modified: grass/trunk/raster/r.water.outlet/main.c
===================================================================
--- grass/trunk/raster/r.water.outlet/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/r.water.outlet/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -56,7 +56,6 @@
char drain_name[GNAME_MAX], *drain_mapset, E_f, dr_f, ba_f, N_f, errr;
struct GModule *module;
struct Option *opt1, *opt2, *opt3, *opt4;
- char *buf;
G_gisinit(argv[0]);
@@ -97,10 +96,7 @@
if (G_parser(argc, argv))
exit(EXIT_FAILURE);
- if (G_get_window(&window) < 0) {
- G_asprintf(&buf, _("Unable to read current window parameters"));
- G_fatal_error(buf);
- }
+ G_get_window(&window);
strcpy(drain_name, opt1->answer);
strcpy(basin_name, opt2->answer);
Modified: grass/trunk/raster/wildfire/r.ros/main.c
===================================================================
--- grass/trunk/raster/wildfire/r.ros/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/wildfire/r.ros/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -437,8 +437,7 @@
}
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error("can't read current window parameters");
+ G_get_window(&window);
/* find number of rows and columns in window */
nrows = G_window_rows();
Modified: grass/trunk/raster/wildfire/r.spread/main.c
===================================================================
--- grass/trunk/raster/wildfire/r.spread/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/wildfire/r.spread/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -329,8 +329,7 @@
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error("can't read current window parameters");
+ G_get_window(&window);
/* find number of rows and columns in window */
Modified: grass/trunk/raster/wildfire/r.spreadpath/main.c
===================================================================
--- grass/trunk/raster/wildfire/r.spreadpath/main.c 2008-11-24 20:35:36 UTC (rev 34480)
+++ grass/trunk/raster/wildfire/r.spreadpath/main.c 2008-11-24 23:55:42 UTC (rev 34481)
@@ -135,8 +135,7 @@
out_file = G_tempfile();
/* Get database window parameters */
- if (G_get_window(&window) < 0)
- G_fatal_error("can't read current window parameters");
+ G_get_window(&window);
verbose = flag1->answer;
More information about the grass-commit
mailing list