51 memcpy(buf, SEG->cache + ((
size_t)row * SEG->ncols) * SEG->len,
52 SEG->len * SEG->ncols);
57 ncols = SEG->ncols - SEG->spill;
59 size = scols * SEG->len;
61 for (col = 0; col < ncols; col += scols) {
62 SEG->address(SEG, row, col, &n, &index);
63 if (SEG->seek(SEG, n, index) == -1) {
65 G_warning(_(
"File read/write operation failed: %s (%d)"),
70 if (read(SEG->fd, buf, size) != size) {
71 G_warning(
"Segment_get_row: %s", strerror(errno));
80 buf = ((
char *)buf) + size;
82 if ((size = SEG->spill * SEG->len)) {
83 SEG->address(SEG, row, col, &n, &index);
84 if (SEG->seek(SEG, n, index) == -1) {
86 G_warning(_(
"File read/write operation failed: %s (%d)"),
91 if (read(SEG->fd, buf, size) != size) {
92 G_warning(
"Segment_get_row: %s", strerror(errno));