Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!yale!robertj From: robertj@yale-zoo-suned..arpa (Rob Jellinghaus) Newsgroups: comp.sys.mac Subject: LSC 2.11 stdio bug Message-ID: <17539@yale-celray.yale.UUCP> Date: Mon, 12-Oct-87 20:00:14 EDT Article-I.D.: yale-cel.17539 Posted: Mon Oct 12 20:00:14 1987 Date-Received: Wed, 14-Oct-87 01:37:52 EDT Sender: root@yale.UUCP Reply-To: robertj@yale.UUCP Organization: Yale University Computer Science Dept, New Haven CT Lines: 47 Summary: character 13 gets converted to character 10. 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). This screwed me up, badly, until I found it. (My program worked when I ported it to our unix system.) Here are two short demo programs to illustrate the bug: /* #1: I ran this, entering