[GRASS-SVN] r34331 - grass-addons/raster/r.sun_horizon/r.sun2

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Nov 16 07:41:24 EST 2008


Author: neteler
Date: 2008-11-16 07:41:23 -0500 (Sun, 16 Nov 2008)
New Revision: 34331

Modified:
   grass-addons/raster/r.sun_horizon/r.sun2/main.c
   grass-addons/raster/r.sun_horizon/r.sun2/rsunlib.c
Log:
cosmetics

Modified: grass-addons/raster/r.sun_horizon/r.sun2/main.c
===================================================================
--- grass-addons/raster/r.sun_horizon/r.sun2/main.c	2008-11-16 12:05:02 UTC (rev 34330)
+++ grass-addons/raster/r.sun_horizon/r.sun2/main.c	2008-11-16 12:41:23 UTC (rev 34331)
@@ -1206,18 +1206,12 @@
 
 
     if (G_set_window(&cellhd) < 0)
-	exit(3);
+	G_fatal_error("Cannot set region to output region!");
 
-    if (m != G_window_rows()) {
-	fprintf(stderr, "OOPS: rows changed from %d to %d\n", m,
-		G_window_rows());
-	exit(1);
-    }
-    if (n != G_window_cols()) {
-	fprintf(stderr, "OOPS: cols changed from %d to %d\n", n,
-		G_window_cols());
-	exit(1);
-    }
+    if (m != G_window_rows())
+	G_fatal_error("OOPS: rows changed from %d to %d", m, G_window_rows());
+    if (n != G_window_cols())
+	G_fatal_error("OOPS: cols changed from %d to %d", n, G_window_cols());
 
     for (iarc = 0; iarc < m; iarc++) {
 	i = m - iarc - 1;

Modified: grass-addons/raster/r.sun_horizon/r.sun2/rsunlib.c
===================================================================
--- grass-addons/raster/r.sun_horizon/r.sun2/rsunlib.c	2008-11-16 12:05:02 UTC (rev 34330)
+++ grass-addons/raster/r.sun_horizon/r.sun2/rsunlib.c	2008-11-16 12:41:23 UTC (rev 34331)
@@ -144,12 +144,12 @@
     	    }
         else {
             if (pom < 0) {
-                /*        printf("\n Sun is ABOVE the surface during the whole day\n"); */
+                /*        G_debug(3,"\n Sun is ABOVE the surface during the whole day"); */
                 sungeom->sunrise_time = 0;
                 sungeom->sunset_time = 24;
                 }
             else {
-            /*                printf("\n The sun is BELOW the surface during the whole day\n"); */
+            /*                G_debug(3,"\n The sun is BELOW the surface during the whole day"); */
                 if (fabs(pom) - 1 <= EPS) {
                     sungeom->sunrise_time = 12;
                     sungeom->sunset_time = 12;
@@ -194,7 +194,7 @@
 			{
 			if (sunVarGeom->sinSolarAltitude > 0) 
 				{
-        		/*                        printf("\tSun is ABOVE area during the whole day\n"); */
+        		/*                        G_debug(3,"\tSun is ABOVE area during the whole day"); */
         			sungeom->sunrise_time = 0;
         			sungeom->sunset_time = 24;
         			}
@@ -207,7 +207,7 @@
             		}
         	else 
 			{
-            /*                      printf("\tThe Sun is ON HORIZON during the whole day\n"); */
+            /*                      G_debug(3,"\tThe Sun is ON HORIZON during the whole day"); */
             		sungeom->sunrise_time = 0;
             		sungeom->sunset_time = 24;
             		}



More information about the grass-commit mailing list