Re: [AD] implementing seek

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


On April 7, 2010, Matthew Leverton wrote:
> 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.

But you just told it to seek to the end, the slice obviously has data in it, 
so it should seek to the end.

> --
> Matthew Leverton
> 
> -------------------------------------------------------------------------
> ----- Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev


-- 
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx




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