34 #include <grass/gis.h>
35 #include <grass/glocale.h>
38 #define FORMAT_FILE "f_format"
39 #define QUANT_FILE "f_quant"
40 #define NULL_FILE "null"
42 static int close_old(
int);
43 static int close_new(
int,
int);
44 static char CELL_DIR[100];
88 return close_new(fd, 1);
119 return close_old(fd);
121 return close_new(fd, 0);
124 static int close_old(
int fd)
143 if (fcb->
cellhd.compressed)
162 static int close_new(
int fd,
int ok)
166 struct Categories cats;
168 char path[GPATH_MAX];
169 CELL cell_min, cell_max;
170 int row, i, open_mode;
188 for (row = fcb->
cur_row; row < fcb->cellhd.rows; row++)
212 for (row = fcb->
min_null_row; row < fcb->null_cur_row; row++)
215 row, fcb->
cellhd.cols, fd);
221 for (row = fcb->
null_cur_row; row < fcb->cellhd.rows; row++)
228 G_warning(_(
"closecell: can't move %s\nto null file %s"),
250 G_warning(_(
"Error writing floating point format file for map %s"),
261 strcpy(CELL_DIR,
"fcell");
271 strcpy(CELL_DIR,
"cell");
300 G_warning(_(
"closecell: can't move %s\nto cell file %s"),
355 G_warning(_(
"unable to write quant file!"));
401 struct Key_Value *format_kv;
402 char path[GPATH_MAX];
406 G_warning(_(
"unable to write f_format file for CELL maps"));