offset for file opened in append mode

From: Kish Shen <ks15_at_icparc.ic.ac.uk>
Date: Mon 19 Feb 2001 12:58:51 PM GMT
Message-Id: <E14Uptz-0004I9-00@holborn.icparc.ic.ac.uk>
The offset for a file opened in append mode seems to count from the end of
the original file, rather than the start of the file:

Version 5.1.0, Wed Nov 22 12:31 2000
[eclipse 1]: open(file, write, a), write(a, hello), close(a).

[eclipse 2]: 
[2]+  Stopped                 eclipse
holborn: more file
hello
holborn: fg
eclipse
open(file, append, a), get_stream_info(a, offset, Z), at(a, Y).

Z = 0
Y = 0
yes.

The offset should not be 0 here if counting from the start of file...

[eclipse 3]: write(a, there), at(a, Z).

Z = 5
yes.
[eclipse 4]: close(a).

holborn: more file
hellothere

The output is correctly appended to the end of the file. Should the offset
be counted from the start of the file, rather than the original end?
Received on Mon Feb 19 12:58:52 2001

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:04 PM GMT GMT