|
@@ -43,8 +43,8 @@ static int close_new(RASTER3D_Map * map)
|
|
|
Rast_command_history(&hist);
|
|
|
/*Use the G3d function to write the history file,
|
|
|
* otherwise the path is wrong */
|
|
|
- if (!Rast3d_write_history(map->fileName, &hist)) {
|
|
|
- G_warning(_("Unable to write history for 3D raster map <%s>"), map);
|
|
|
+ if (Rast3d_write_history(map->fileName, &hist) < 0) {
|
|
|
+ G_warning(_("Unable to write history for 3D raster map <%s>"), map->fileName);
|
|
|
}
|
|
|
|
|
|
Rast3d_range_write(map);
|
|
@@ -96,18 +96,18 @@ static int close_cell_new(RASTER3D_Map * map)
|
|
|
}
|
|
|
|
|
|
if (!Rast3d_write_ints(map->data_fd, map->useXdr, &(map->indexNbytesUsed), 1)) {
|
|
|
- G_warning(_("Unable to write header for 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to write header for 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
Rast3d_long_encode(&(map->indexOffset), (unsigned char *)<mp, 1);
|
|
|
if (write(map->data_fd, <mp, sizeof(long)) != sizeof(long)) {
|
|
|
- G_warning(_("Unable to write header for 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to write header for 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
if (!close_new(map) != 0) {
|
|
|
- G_warning(_("Unable to create 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to create 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -117,7 +117,7 @@ static int close_cell_new(RASTER3D_Map * map)
|
|
|
static int close_old(RASTER3D_Map * map)
|
|
|
{
|
|
|
if (close(map->data_fd) != 0) {
|
|
|
- G_warning(_("Unable to close 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to close 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -127,7 +127,7 @@ static int close_old(RASTER3D_Map * map)
|
|
|
static int close_cell_old(RASTER3D_Map * map)
|
|
|
{
|
|
|
if (!close_old(map) != 0) {
|
|
|
- G_warning(_("Unable to close 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to close 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -150,13 +150,13 @@ int Rast3d_close(RASTER3D_Map * map)
|
|
|
{
|
|
|
if (map->operation == RASTER3D_WRITE_DATA) {
|
|
|
if (!close_cell_new(map)) {
|
|
|
- G_warning(_("Unable to create 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to create 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
if (!close_cell_old(map) != 0) {
|
|
|
- G_warning(_("Unable to close 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to close 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
}
|
|
@@ -188,7 +188,7 @@ int Rast3d_close(RASTER3D_Map * map)
|
|
|
map->compression, map->useRle, map->useLzw,
|
|
|
map->precision, map->offset, map->useXdr,
|
|
|
map->hasIndex, map->unit)) {
|
|
|
- G_warning(_("Unable to write header for 3D raster map <%s>"), map);
|
|
|
+ G_warning(_("Unable to write header for 3D raster map <%s>"), map->fileName);
|
|
|
return 0;
|
|
|
}
|
|
|
|