Ver código fonte

r.thin: Remove unused error_prefix

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65101 15284696-431f-4ddb-bdfa-cd5b030d7da7
Maris Nartiss 10 anos atrás
pai
commit
e29ed99410
3 arquivos alterados com 6 adições e 14 exclusões
  1. 5 10
      raster/r.thin/io.c
  2. 0 1
      raster/r.thin/main.c
  3. 1 3
      raster/r.thin/thin_lines.c

+ 5 - 10
raster/r.thin/io.c

@@ -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 @@ int open_file(char *name)
     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 @@ int open_file(char *name)
     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 @@ int open_file(char *name)
     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);

+ 0 - 1
raster/r.thin/main.c

@@ -40,7 +40,6 @@
 #include "local_proto.h"
 #include <grass/glocale.h>
 
-char *error_prefix;
 
 int main(int argc, char *argv[])
 {

+ 1 - 3
raster/r.thin/thin_lines.c

@@ -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 @@ int thin_lines(int iterations)
     }				/* 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);