|
@@ -362,6 +362,15 @@ static int close_new(int fd, int ok)
|
|
|
fcb->data = NULL;
|
|
|
}
|
|
|
|
|
|
+ if (fcb->null_row_ptr) { /* compressed nulls */
|
|
|
+ fcb->null_row_ptr[fcb->cellhd.rows] = lseek(fcb->null_fd, 0L, SEEK_CUR);
|
|
|
+ Rast__write_null_row_ptrs(fd, fcb->null_fd);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (fcb->null_fd >= 0)
|
|
|
+ close(fcb->null_fd);
|
|
|
+ fcb->null_fd = -1;
|
|
|
+
|
|
|
/* create path : full null file name */
|
|
|
G__make_mapset_element_misc("cell_misc", fcb->name);
|
|
|
G_file_name_misc(path, "cell_misc", NULL_FILE, fcb->name, G_mapset());
|
|
@@ -395,11 +404,6 @@ static int close_new(int fd, int ok)
|
|
|
Rast__write_row_ptrs(fd);
|
|
|
}
|
|
|
|
|
|
- if (fcb->null_row_ptr) { /* compressed nulls */
|
|
|
- fcb->null_row_ptr[fcb->cellhd.rows] = lseek(fcb->null_fd, 0L, SEEK_CUR);
|
|
|
- Rast__write_null_row_ptrs(fd, fcb->null_fd);
|
|
|
- }
|
|
|
-
|
|
|
if (fcb->map_type != CELL_TYPE) { /* floating point map */
|
|
|
int cell_fd;
|
|
|
|