From: horst DOT kraemer AT snafu DOT de (Horst Kraemer) Newsgroups: comp.os.msdos.djgpp Subject: Re: How to print a control-key on a file? Date: Sun, 03 Oct 1999 16:07:39 GMT Organization: [Posted via] Interactive Networx Lines: 42 Message-ID: <37f765a9.79015445@news.snafu.de> References: <37F62262 DOT 7CDAE6C1 AT pd DOT jaring DOT my> <37f63eca DOT 3516888 AT news DOT snafu DOT de> <37F73D05 DOT A42A4D2F AT pd DOT jaring DOT my> NNTP-Posting-Host: n34-174.berlin.snafu.de X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Sun, 03 Oct 1999 19:24:53 +0800, dsk wrote: > Yeap I tried that one but it just blow me up. I run DJGPP on WinDOSBox. > I don't know what happened but fprintf, putc etc.. just won't work. > Is there a problem with this simple (overdefining) lines? > FILE *_outfile = fopen("test.zzz", "wb"); > fprintf( _outfile, "%1c", (char)10&0xFF); No. If _outfile is !=NULL after fopen there is no visible problem. In _my_ WinDOS-Box this program #include int main() { FILE *_outfile = fopen("test.zzz", "wb"); fprintf( _outfile, "%1c", (char)10&0xFF); fclose(_outfile); return 0; } produces a file test.zzz containing one byte with the value 10. What happens on your system ? What is blowing you up ? How did you verify that fprintf "doesn't work" ? Please give details. I think you may have been bitten by something else which is not in the code you posted. > Do you have hardcoding technique to stripe the 13 in front of control key Huh ? Which 13 in front of which control key ??? Regards Horst