18 #include "local_proto.h"
46 int scols,
int len,
int nseg)
51 nseg_total = ((nrows + srows - 1) / srows) * ((ncols + scols - 1) / scols);
53 if (nseg >= nseg_total) {
74 if (access(fname, F_OK) == 0) {
82 if (-1 == (SEG->
fd = creat(SEG->
fname, 0666))) {
95 G_warning(
_(
"Illegal segment configuration parameter(s)"));
102 if (-1 == (SEG->
fd = open(SEG->
fname, 2))) {
104 G_warning(
_(
"Unable to re-open segment file"));
void G_warning(const char *,...) __attribute__((format(printf
void void G_verbose_message(const char *,...) __attribute__((format(printf
char * G_store(const char *)
Copy string to allocated memory.
int Segment_format_nofill(int, off_t, off_t, int, int, int)
Format a segment file.
int Segment_init(SEGMENT *, int, int)
Initialize segment structure.
int Segment_open(SEGMENT *SEG, char *fname, off_t nrows, off_t ncols, int srows, int scols, int len, int nseg)
Initialize segment structure and open segment file.
struct SEGMENT::scb * scb