[GRASS-SVN] r65122 - grass/branches/releasebranch_7_0/raster/r.thin

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Apr 22 23:21:30 PDT 2015


Author: neteler
Date: 2015-04-22 23:21:30 -0700 (Wed, 22 Apr 2015)
New Revision: 65122

Modified:
   grass/branches/releasebranch_7_0/raster/r.thin/io.c
   grass/branches/releasebranch_7_0/raster/r.thin/main.c
   grass/branches/releasebranch_7_0/raster/r.thin/thin_lines.c
Log:
r.thin: change documentation to match module behaviour introduced in r44866 (trunk r65083); msg standardization

Modified: grass/branches/releasebranch_7_0/raster/r.thin/io.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.thin/io.c	2015-04-23 06:20:37 UTC (rev 65121)
+++ grass/branches/releasebranch_7_0/raster/r.thin/io.c	2015-04-23 06:21:30 UTC (rev 65122)
@@ -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 <%s>"), work_file_name);
 	}
     }
     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 <%s>"), work_file_name);
 	}
     }
 
@@ -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 <%s>"), work_file_name);
 	}
     }
     n_rows += (PAD << 1);

Modified: grass/branches/releasebranch_7_0/raster/r.thin/main.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.thin/main.c	2015-04-23 06:20:37 UTC (rev 65121)
+++ grass/branches/releasebranch_7_0/raster/r.thin/main.c	2015-04-23 06:21:30 UTC (rev 65122)
@@ -40,7 +40,6 @@
 #include "local_proto.h"
 #include <grass/glocale.h>
 
-char *error_prefix;
 
 int main(int argc, char *argv[])
 {
@@ -56,7 +55,7 @@
     G_add_keyword(_("raster"));
     G_add_keyword(_("geometry"));
     module->description =
-	_("Thins non-zero cells that denote linear "
+	_("Thins non-null cells that denote linear "
 	  "features in a raster map layer.");
 
     opt1 = G_define_standard_option(G_OPT_R_INPUT);

Modified: grass/branches/releasebranch_7_0/raster/r.thin/thin_lines.c
===================================================================
--- grass/branches/releasebranch_7_0/raster/r.thin/thin_lines.c	2015-04-23 06:20:37 UTC (rev 65121)
+++ grass/branches/releasebranch_7_0/raster/r.thin/thin_lines.c	2015-04-23 06:21:30 UTC (rev 65122)
@@ -65,8 +65,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