www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/06/17:49:43

Message-Id: <336FA4A7.1FA3@molly.mpimf-heidelberg.mpg.de>
Date: Tue, 06 May 1997 23:37:43 +0200
From: Stephan Weber <weber AT molly DOT mpimf-heidelberg DOT mpg DOT de>
Reply-To: weber AT molly DOT mpimf-heidelberg DOT mpg DOT de
Organization: MPI For Medical Research
Mime-Version: 1.0
To: djgpp AT delorie DOT com
Subject: putc and '0x0A'

Hi,

I am using DJGPP under Win95 (DOS-Box). 
I read from a binary file to the field

unsigned char EPROM1[65535].

When I do a      fputc(EPROM2[j],file4);
or a             fprintf(file4,"%c",EPROM2[j]);

and one of the characters in EPROM2 is a '0x0A'
fputc/fprintf sends a '0x0D 0x0A' to the stream.

I checked the field EPROM2[j] with a printf and
there is really just the '0x0A' with no '0x0D'
before it.

How can I suppress this behavier of fputc/fprintf?  

Are there any other hidden (DOS/ASCII) conversions?

Any suggestions?

kind regards, Stephan

- Raw text -


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