Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!endor!singer From: singer@endor.harvard.edu (Richard Siegel) Newsgroups: comp.sys.mac Subject: Re: LSC 2.11 stdio bug Message-ID: <2987@husc6.UUCP> Date: Tue, 13-Oct-87 09:44:35 EDT Article-I.D.: husc6.2987 Posted: Tue Oct 13 09:44:35 1987 Date-Received: Wed, 14-Oct-87 06:47:58 EDT References: <17539@yale-celray.yale.UUCP> Sender: news@husc6.UUCP Reply-To: singer@endor.UUCP (Richard Siegel) Organization: THINK Technologies, Inc., Bedford, MA Lines: 22 Your demo program didn't make it, but the bug is in fwrite, and occurs when you're trying to write to a binary file. The offending line is in the source file called "stdfwrite.c", one of the stdio source files. The offending line is: *(who->filebuf + who->fpos++) = ((!who->binary) && (*ptr == '\n'))?'\r':*ptr; I'm not a C guru, and this line is nearly incomprehensible, but I'd guess that this is where it happens. Since you have the sources, the fix won't be too difficult to make, and I've noted the problem, and it will be fixed in a future release of the libraries. --Rich **The opinions stated herein are my own opinions and do not necessarily represent the policies or opinions of my employer (THINK Technologies, Inc). * Richard M. Siegel | {decvax, ucbvax, sun}!harvard!endor!singer * * Customer Support | singer@endor.harvard.edu * * THINK Technologies, Inc. (No snappy quote) *