Xref: news2.mv.net comp.os.msdos.djgpp:3104 From: stwand07 AT uctvms DOT uct DOT ac DOT za Newsgroups: comp.os.msdos.djgpp Subject: Re: Odd printf behaviour Date: 25 Apr 96 12:06:44 +0200 Organization: University of Cape Town Lines: 27 Message-ID: <1996Apr25.120644@uctvms.uct.ac.za> References: <199604240657 DOT IAA02595 AT gilberto DOT physik DOT rwth-aachen DOT de> NNTP-Posting-Host: uctvms.uct.ac.za To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article <199604240657 DOT IAA02595 AT gilberto DOT physik DOT rwth-aachen DOT de>, "Christoph P. Kukulies" writes: >> >> On 23 Apr 1996, Gregory Fedor wrote: >> >> > I wrote some simple code that utilizes the gotoxy() and printf() >> > statements to place text on the screen, ala: >> >> if i remember the bad old days of turbo c well enough, printf() which is >> a stream io command and gotoxy() which is a console io command don't mix, >> so the things you see are probably just a fluke. also, djgpp buffers >> stdio with a 4k buffer (i think) which adds more complexity. i believe >> what you should do is use curses (there's one for djgpp) and avoid the >> nonportability of the turbo c conio.h functions. >> AFAIK, printf() doesn't output text at the position set by gotoxy(), but sends it to stdout. You must use the cprintf()/cputs() routines in conio.h to get text output at the cursor position. CONIO.H has been ported for Djgpp, so you can use gotoxy(), cprintf(), etc. without worries, and not worry about the buffering on stdout. Curses is another possibility, but I've not had experience using it. Adios Mark Wodrich.