Re: [AD] implementing seek |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] implementing seek
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Wed, 7 Apr 2010 23:26:39 -0500
On Wed, Apr 7, 2010 at 11:00 PM, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On April 7, 2010, Matthew Leverton wrote:
>> Should that go to position 10, or stay at 0, since the slice hasn't
>> been written to?
>
> I would have to say 10, since the file already has 10 bytes in it.
>
That was my initial reasoning, but I'm pretty sure it should stay at 0.
Think of the slice as an independent file. If you pass it to a routine
expecting a "blank" file, it will assume SEEK_END would be the highest
position it wrote to.
--
Matthew Leverton