Re: [AD] implementing seek

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


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




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/