Message-Id: Comments: Authenticated sender is From: "Salvador Eduardo Tropea (SET)" Organization: INTI To: Agent Drek , djgpp AT delorie DOT com Date: Tue, 3 Nov 1998 15:49:25 +0000 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: Re: File sharing NT--UNIX EOL In-reply-to: <363F0CE3.1C5D0E87@monsterbymistake.com> X-mailer: Pegasus Mail for Windows (v2.54) Reply-To: djgpp AT delorie DOT com Agent Drek wrote: > We just ported some of our C code from Unix (IRIX6.XX) to NT 4.0 > using DJGPP on the NT Ugly idea. > ie: > sprintf(file,"%s/%s/%s%s",SPOOL_DIR,argv[2],argv[2],SPOOL_COMP_EXT); > > Our problem is when one of the NT boxes makes an entry in the data base > it puts > a bunch of ^M 's for EOL (end of line) > > For now this just looks bad > > I think I want ^J characters to be printed instead of ^M > > Is this something I can change in DJGPP? Are you opening the files in text or binary mode? It looks like a \r\n instead of \n problem. In UNIX files are simple but in DOS some idiot taked the desition of using 2 characters to end lines (13+10) and to make the C programs work the compilers added options to open/fopen to make it transparent. SET ------------------------------------ 0 -------------------------------- Visit my home page: http://set-soft.home.ml.org/ or http://www.geocities.com/SiliconValley/Vista/6552/ Salvador Eduardo Tropea (SET). (Electronics Engineer) Alternative e-mail: set-soft AT usa DOT net set AT computer DOT org ICQ: 2951574 Address: Curapaligue 2124, Caseros, 3 de Febrero Buenos Aires, (1678), ARGENTINA TE: +(541) 759 0013