Mail Archives: djgpp/1995/02/04/14:10:26
I have installed djgpp with gcc version 2.6.0. I am trying to use
fwrite to write a static character array to a dos file. When I look
at the output file with debug, I find that all of my 0xa (LF) have
been replaced by 0x0d 0x0a (CR/LF).
I am used to a unix environment where fwrite writes just the bytes
I tell it to 8-) Am I missing something silly? Can someone explain
this to me?
My test case looks is:
#include <stdio.h>
FILE *ofile;
static char buff[] = {0x20,0x20,0x20,0xa,0x20,0xa,0xa};
main() {
ofile = fopen("splat.out","w");
fwrite(buff, sizeof(buff), 1, ofile);
}
- Brian -
- Raw text -