{"sequential", ACCESS_SEQUENTIAL},
{"direct", ACCESS_DIRECT},
{"append", ACCESS_APPEND},
+ {"stream", ACCESS_STREAM},
{NULL, 0}
};
if (sseek (u->s, file_length (u->s)) == FAILURE)
goto seek_error;
- u->current_record = 0;
+ if (flags->access != ACCESS_STREAM)
+ u->current_record = 0;
+
u->endfile = AT_ENDFILE; /* We are at the end. */
break;
if (flags->access == ACCESS_DIRECT)
u->maxrec = max_offset / u->recl;
+
+ if (flags->access == ACCESS_STREAM)
+ {
+ u->maxrec = max_offset;
+ u->recl = 1;
+ u->last_record = 1;
+ }
memmove (u->file, opp->file, opp->file_len);
u->file_len = opp->file_len;