49 memcpy(buf, SEG->cache + ((
size_t)row * SEG->ncols) * SEG->len,
50 SEG->len * SEG->ncols);
55 ncols = SEG->ncols - SEG->spill;
57 size = scols * SEG->len;
59 for (col = 0; col < ncols; col += scols) {
60 SEG->address(SEG, row, col, &n, &index);
61 SEG->seek(SEG, n, index);
63 if (read(SEG->fd, buf, size) != size) {
64 G_warning(
"Segment_get_row: %s", strerror(errno));
73 buf = ((
char *)buf) + size;
75 if ((size = SEG->spill * SEG->len)) {
76 SEG->address(SEG, row, col, &n, &index);
77 SEG->seek(SEG, n, index);
79 if (read(SEG->fd, buf, size) != size) {
80 G_warning(
"Segment_get_row: %s", strerror(errno));