51 memcpy(SEG->cache + ((
size_t)row * SEG->ncols) * SEG->len, buf,
52 SEG->len * SEG->ncols);
57 ncols = SEG->ncols - SEG->spill;
59 size = scols * SEG->len;
63 for (col = 0; col < ncols; col += scols) {
64 SEG->address(SEG, row, col, &n, &index);
65 SEG->seek(SEG, n, index);
67 if ((result = write(SEG->fd, buf, size)) != size) {
68 G_warning(
"Segment_put_row write error %s", strerror(errno));
80 buf = ((
const char *)buf) + size;
83 if ((size = SEG->spill * SEG->len)) {
84 SEG->address(SEG, row, col, &n, &index);
85 SEG->seek(SEG, n, index);
87 if (write(SEG->fd, buf, size) != size) {
88 G_warning(
"Segment_put_row final write error: %s", strerror(errno));