Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsl!cbnewsk!ech From: ech@cbnewsk.att.com (ned.horvath) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C 4.0 bug Message-ID: <1991Jan31.172141.13662@cbnewsk.att.com> Date: 31 Jan 91 17:21:41 GMT References: Organization: AT&T Bell Laboratories Lines: 26 From article , by jeffb@cs.fau.edu (Jeffrey Boser): > While writing a uudecoder, i have stumbled on > what seems to be a bug in the ANSI libraries. > > during the decoder portion, i use > putc(o, stdout); > to output a calculated integer (lower byte only). > > but when o is equal to 10 (checked it while in debugger), > it outputs 13. (checked from a hex dump of output file). > the stdout is redirected with a ccommand. > > any ideas? > > > .....Jeff > reply to weissd@tuna.cs.fau.edu, as my mailer is down. This isn't a bug, it's a feces -- er, feature. putc thinks you coded putc ('\n', stdout); and did you the favor of turning the (unix-like) newline into a (mac-like) carriage return. I suppose you might try fwrite() (I haven't, so no promises). =Ned Horvath=