www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/03/17:05:37

Message-Id: <m0zalR8-000S5XC@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: Agent Drek <drek AT monsterbymistake DOT com>, djgpp AT delorie DOT com
Date: Tue, 3 Nov 1998 15:49:25 +0000
MIME-Version: 1.0
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 <drek AT monsterbymistake DOT com> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019