🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #20408

Re: LSC 2.11 stdio bug

#20408
From: Henri J. Socha (7-x6628)
Date: Tue, 13 Oct 1987 20:08
26 lines
1836 bytes
In article <17539@yale-celray.yale.UUCP> robertj@yale.UUCP writes:
>I recently got bitten badly by a bug in LSC 2.11's stdio
>routines (at least I think that's where the bug is).  I was
>trying to use the unix emulation routines that simulate
>redirection of output.  The problem I discovered is that
>when I try to send a character code 13 (octal 15) to a file,
>when I next read the file, the character code has changed to 10
>(12 octal).
 
I got it too for the longest time but know the fix!
In my case it was a demo programme that generate test patterns 
wrote them to a file and read the result and kept getting
the same error,   got a 10 (on re-read) expected 13.

In the fopen (or whatever, I don't have LSC or my code here).
there are options available defining the TYPE of file being opened.
One of the type flags (letters?) specifies a BINARY file.
I forget the LSC term but its bin called: O_BINARY, O_RAW, or something
like that.  Anyway, if you specify that flag, the test inside stdio.???
is not made.  So, in your open, specify the flag and the problems go away.



-- 
UUCP:...!amdahl!drivax!socha                                      WAT Iron'75
"Everything should be made as simple as possible but not simpler."  A. Einstein
Technical Details
Message-ID: <2580@drivax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!beta!hc!ames!amdahl!drivax!socha
References: <17539@yale-celray.yale.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!beta!hc!ames!amdahl!drivax!socha
From: socha@drivax.UUCP (Henri J. Socha (7-x6628))
Newsgroups: comp.sys.mac
Subject: Re: LSC 2.11 stdio bug
Message-ID: <2580@drivax.UUCP>
Date: Tue, 13-Oct-87 16:08:02 EDT
Article-I.D.: drivax.2580
Posted: Tue Oct 13 16:08:02 1987
Date-Received: Sat, 17-Oct-87 19:33:35 EDT
References: <17539@yale-celray.yale.UUCP>
Reply-To: socha@drivax.UUCP (Henri J. Socha (7-x6628))
Organization: Digital Research, Monterey, CA
Lines: 26