realbasic-betas.mbox
[Top] [All Lists]

Re: stdout.write broken?

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: Re: stdout.write broken?
From: Andrew Bush <andrew dot bush at xtra dot co dot nz>
Date: Tue, 27 Jul 2004 09:30:38 +1200
Delivered-to: realbasic-betas at lists dot realsoftware dot com
References: <CB2FA5DD-DEC0-11D8-AC77-000393411DC8 at xtra dot co dot nz> <00c801c4731b$7b7bf910$2be15340 at Circe>
Hi Aaron,

thanks for your response.

looking at the data stdout.write appears to be either skipping data or
just plain corrupting the data...has anyone else seen this?  any
suggestions?

I've yet to see it in any of my projects, and I don't think that
StdOut.Write is broken (it just does a simple C printf under the hood, kinda
tough to break that), so I'm guessing it's something with your code.

I'm just wondering why you don't do this:

StdOut.Write( inStream.ReadAll )

instead of grabbing 100 bytes at a time and sending them. Does that make a
difference with the data that gets sent?

unfortunately no, I shifted down to the write(100) thing trying to fix the problem....hoping maybe it was a buffer issue.

its actually hard to see how it could be my code (although actually Id be rapt if it was, this is something Id really like to get working)

Its a very small project and the guts of it is just what you see...a loop that reads and writes the binary data out stdout.

its been a while since I looked at printf....how would it handle 'special' chars? is it possible its breaking the string up on nulls, or interpreting some of the binary data to be various escape characters?

<g> just out of interest, have you tried pushing some image data through stdout.write before? has it worked?


Yours cheerfully,


        Andrew Bush



_______________________________________________
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>