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);
read_content := read_content_from....([EMAIL PROTECTED], MAX_BUFFER); end; I'm using ubuntu Linux amd64 using FPC 2.2.0
Vincent _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal