Mail Archives: djgpp/1998/11/03/17:05:37
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 -