23 #include <grass/segment.h>
26 static int read_int(
int,
int *);
62 if (lseek(fd, 0L, SEEK_SET) < 0) {
68 if (!read_int(fd, &SEG->nrows)
69 || !read_int(fd, &SEG->ncols)
70 || !read_int(fd, &SEG->srows)
71 || !read_int(fd, &SEG->scols)
72 || !read_int(fd, &SEG->len))
79 static int read_int(
int fd,
int *
n)
83 if ((bytes_read = read(fd, n,
sizeof(
int))) == -1)
86 bytes_read = (bytes_read ==
sizeof(
int));
int segment_setup(SEGMENT *SEG)
Setup segment.
int segment_init(SEGMENT *SEG, int fd, int nseg)
Initialize segment structure.
G_warning("category support for [%s] in mapset [%s] %s", name, mapset, type)