BinIO bugfix..
Anoq of the Sun
anoq@HardcoreProcessing.com
Mon, 26 Mar 2001 19:24:26 +0200
This is a multi-part message in MIME format.
--------------BA4BF6DCC0921C9E53E25419
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello!
I just found a bug in BinIO... here's a new
file. It was the FS.O.creat in openOut
which has been replaced with FS.O.createf
with the binary flag set. Makes a big
difference on Win32 :)
Cheers
--
http://www.HardcoreProcessing.com
--------------BA4BF6DCC0921C9E53E25419
Content-Type: application/x-unknown-content-type-sml_auto_file;
name="bin-io.sml"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename="bin-io.sml"
KCogQ29weXJpZ2h0IChDKSAxOTk3LTE5OTkgTkVDIFJlc2VhcmNoIEluc3RpdHV0ZS4KICogUGxl
YXNlIHNlZSB0aGUgZmlsZSBMSUNFTlNFIGZvciBsaWNlbnNlIGluZm9ybWF0aW9uLgogKikKc3Ry
dWN0dXJlIEJpbklPOiBCSU5fSU8gPQogICBzdHJ1Y3QKICAgICAgc3RydWN0dXJlIEZTID0gUG9z
aXguRmlsZVN5cwogICAgICBzdHJ1Y3R1cmUgUElPID0gUG9zaXguSU8KCSAKICAgICAgc3RydWN0
dXJlIEFycmF5ID0gV29yZDhBcnJheQogICAgICBzdHJ1Y3R1cmUgVmVjdG9yID0gV29yZDhWZWN0
b3IKCSAKICAgICAgdHlwZSB2ZWN0b3IgPSBWZWN0b3IudmVjdG9yCiAgICAgIHR5cGUgZWxlbSA9
IFZlY3Rvci5lbGVtCgogICAgICB2YWwgYnVmU2l6ZSA9IDQwOTYKCiAgICAgICgqLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKikKICAgICAgKCogICAg
ICAgICAgICAgICAgICAgICBvdXRzdHJlYW0gICAgICAgICAgICAgICAgICAgICAqKQogICAgICAo
Ki0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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