[GRASS-SVN] r29427 - grass/trunk/imagery/i.ortho.photo/photo.rectify
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Dec 12 16:57:21 EST 2007
Author: bdouglas
Date: 2007-12-12 16:57:21 -0500 (Wed, 12 Dec 2007)
New Revision: 29427
Modified:
grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c
Log:
Localized text
Modified: grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c
===================================================================
--- grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c 2007-12-12 21:52:30 UTC (rev 29426)
+++ grass/trunk/imagery/i.ortho.photo/photo.rectify/write.c 2007-12-12 21:57:21 UTC (rev 29427)
@@ -4,6 +4,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <grass/glocale.h>
#include "global.h"
@@ -13,11 +14,13 @@
off_t offset;
select_target_env();
+
if(!temp_fd)
{
temp_name = G_tempfile();
temp_fd = creat(temp_name,0660);
}
+
for (n=0; n < matrix_rows; n++)
{
offset = ((off_t) row++ * target_window.cols + col) * G_raster_size(map_type);
@@ -27,7 +30,7 @@
!= G_raster_size(map_type)*matrix_cols)
{
unlink(temp_name);
- G_fatal_error("error while writing to temp file: %s", strerror(errno));
+ G_fatal_error (_("error while writing to temp file: %s"), strerror(errno));
}
}
select_current_env();
@@ -49,22 +52,23 @@
fd = G_open_raster_new(name,map_type);
if(fd <=0)
- G_fatal_error("Can't open map %s", name);
+ G_fatal_error (_("Can't open map %s"), name);
for(row = 0; row < target_window.rows; row++)
{
if(read(temp_fd,rast,target_window.cols * G_raster_size(map_type))
!= target_window.cols * G_raster_size(map_type))
- G_fatal_error("error writing row %d", row);
+ G_fatal_error (_("error writing row %d"), row);
+
if(G_put_raster_row(fd,rast, map_type) < 0)
{
- G_fatal_error("error while writing to raster map. You might want to check available disk space and write permissions.");
+ G_fatal_error (_("Unable to write raster map. You might want to check available disk space and write permissions."));
unlink(temp_name);
}
}
close(temp_fd);
- temp_fd = 0;
+ temp_fd = NULL;
unlink(temp_name);
G_close_cell(fd);
More information about the grass-commit
mailing list