Hi Sorry for the delay in responding

On 10/8/07, Vincent Snijders <[EMAIL PROTECTED]> wrote:
> ik schreef:
>
> > Hello List,
>
> <snip>
>
> >
> > Then I tried to do the following code, that continue to write the
> > buffer content until nothing more to write, but it reads wrong data:
> >
> > start_count  := 0;
> > output_count := readcount * sizeof(cshort);
> > read_content := read_content_from....([EMAIL PROTECTED], MAX_BUFFER);
> > while (read_content > 0) do
> >  begin
> >    while (write_count > 0) do
> >      begin
> >        write_count := fpwrite (fd, @Buffer[start_count], output_count);
> >        if (write_count > 0) then
> >           begin
> >             dec (output_count, write_count);
> >             inc (start_count, write_count);
> >           end ;
> >     end;
> // this seems missing:
>         start_count  := 0;
>         output_count := readcount * sizeof(cshort);

Well it was missing from my PoC :) but the problem still exists.
I'm attaching the full program (it goes to libsdnfile).

>
> >    read_content := read_content_from....([EMAIL PROTECTED], MAX_BUFFER);
> > end;
> >
> > I'm using ubuntu Linux amd64 using FPC 2.2.0
> >
>
> Vincent

Thank you,
Ido
-- 
http://ik.homelinux.org/

Attachment: sfplay.pp
Description: Binary data

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to