Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!amdcad!ames!ll-xn!mit-eddie!uw-beaver!cornell!rochester!PT.CS.CMU.EDU!cadre!pitt!cisunx!deest1 From: deest1@cisunx.UUCP (Duane E. Ellis) Newsgroups: comp.lang.c Subject: Re: MSC 5.0 Bug??? Message-ID: <7047@cisunx.UUCP> Date: 18 Feb 88 21:40:50 GMT References: <11677@brl-adm.ARPA> <983@maccs.UUCP> Reply-To: deest1@unix.cis.pittsburgh.edu.UUCP (Duane E. Ellis) Organization: Univ. of Pittsburgh, Comp & Info Sys Lines: 16 The problem you have with MSC, is MSC's BINARY I/O verses ASCII I/O when you fopen() the file, make sure you are specing BINARY, other wise, MSC is probably doing a newline map on you. Example: main() { FILE *fp, *fopen(); fp=fopen("myfile","w"); fwrite("\n",sizeof(char),1,fp); /* WRITE ONE CHAR ONLY!!! */ flcose(fp); } In some cases, MSC will map the \n to \r\n, to match PC-DOS. I Bet that's the problem you are seeing..