19 #include "local_proto.h"
49 memcpy(buf, SEG->
cache + ((
size_t)row * SEG->
ncols) * SEG->
len,
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));
void G_warning(const char *,...) __attribute__((format(printf
int Segment_get_row(const SEGMENT *SEG, void *buf, off_t row)
int(* address)(const struct SEGMENT *, off_t, off_t, int *, int *)
int(* seek)(const struct SEGMENT *S, int, int)