[GRASS-SVN] r65101 - grass/trunk/raster/r.thin

svn_grass at osgeo.org svn_grass at osgeo.org
Mon Apr 20 03:11:39 PDT 2015


Author: marisn
Date: 2015-04-20 03:11:39 -0700 (Mon, 20 Apr 2015)
New Revision: 65101

Modified:
   grass/trunk/raster/r.thin/io.c
   grass/trunk/raster/r.thin/main.c
   grass/trunk/raster/r.thin/thin_lines.c
Log:
r.thin: Remove unused error_prefix

Modified: grass/trunk/raster/r.thin/io.c
===================================================================
--- grass/trunk/raster/r.thin/io.c	2015-04-19 15:22:29 UTC (rev 65100)
+++ grass/trunk/raster/r.thin/io.c	2015-04-20 10:11:39 UTC (rev 65101)
@@ -41,8 +41,6 @@
 #define PAD 2
 #define MAX_ROW 7
 
-		       /*extern int errno; *//* included #include <errno.h> instead 1/2000 */
-extern char *error_prefix;
 static int n_rows, n_cols;
 static int work_file;
 static char *work_file_name;
@@ -118,8 +116,8 @@
     close(creat(work_file_name, 0666));
     if ((work_file = open(work_file_name, 2)) < 0) {
 	unlink(work_file_name);
-	G_fatal_error(_("%s: Unable to create temporary file <%s> -- errno = %d"),
-		      error_prefix, work_file_name, errno);
+	G_fatal_error(_("Unable to create temporary file <%s> -- errno = %d"),
+		      work_file_name, errno);
     }
     buf_len = n_cols * sizeof(CELL);
     buf = (CELL *) G_malloc(buf_len);
@@ -127,16 +125,14 @@
     for (i = 0; i < PAD; i++) {
 	if (write(work_file, buf, buf_len) != buf_len) {
 	    unlink(work_file_name);
-	    G_fatal_error(_("%s: Error writing temporary file"),
-			  error_prefix);
+	    G_fatal_error(_("Error writing temporary file"));
 	}
     }
     for (row = 0; row < n_rows; row++) {
 	Rast_get_c_row(cell_file, buf + PAD, row);
 	if (write(work_file, buf, buf_len) != buf_len) {
 	    unlink(work_file_name);
-	    G_fatal_error(_("%s: Error writing temporary file"),
-			  error_prefix);
+	    G_fatal_error(_("Error writing temporary file"));
 	}
     }
 
@@ -145,8 +141,7 @@
     for (i = 0; i < PAD; i++) {
 	if (write(work_file, buf, buf_len) != buf_len) {
 	    unlink(work_file_name);
-	    G_fatal_error(_("%s: Error writing temporary file"),
-			  error_prefix);
+	    G_fatal_error(_("Error writing temporary file"));
 	}
     }
     n_rows += (PAD << 1);

Modified: grass/trunk/raster/r.thin/main.c
===================================================================
--- grass/trunk/raster/r.thin/main.c	2015-04-19 15:22:29 UTC (rev 65100)
+++ grass/trunk/raster/r.thin/main.c	2015-04-20 10:11:39 UTC (rev 65101)
@@ -40,7 +40,6 @@
 #include "local_proto.h"
 #include <grass/glocale.h>
 
-char *error_prefix;
 
 int main(int argc, char *argv[])
 {

Modified: grass/trunk/raster/r.thin/thin_lines.c
===================================================================
--- grass/trunk/raster/r.thin/thin_lines.c	2015-04-19 15:22:29 UTC (rev 65100)
+++ grass/trunk/raster/r.thin/thin_lines.c	2015-04-20 10:11:39 UTC (rev 65101)
@@ -26,7 +26,6 @@
 #define false 0
 #define DELETED_PIX   9999
 
-extern char *error_prefix;
 static char *work_file_name;
 static int n_rows, n_cols, pad_size;
 static int box_right, box_left, box_top, box_bottom;
@@ -65,8 +64,7 @@
     }				/* row-loop */
     if (box_right < box_left || box_bottom < box_top) {
 	unlink(work_file_name);
-	G_fatal_error(_("%s: Unable to find bounding box for lines"),
-		      error_prefix);
+	G_fatal_error(_("Unable to find bounding box for lines"));
     }
     G_message(_("Bounding box:  l = %d, r = %d, t = %d, b = %d"),
 	      box_left, box_right, box_top, box_bottom);



More information about the grass-commit mailing list