Mail Archives: djgpp/1998/05/01/01:47:16
James W Sager Iii wrote:
>
> And I have had the same problem myself. gotoxy doesn't
> work for DOS either. I had to draw out letters, numbers,
> and symbols by hand then use allegro and some tactical blitting.
I think I should mention that gotoxy() does work properly; it's just
that in many cases, people make the silly mistake of writing code like
the following:
printf( "Hello" );
gotoxy( 10, 10 );
printf( "World" );
And then they wonder why "Hello" and "World" get printed together. The
solution is really simple; stdout is line-buffered in DJGPP. It's
generally a bad idea to mix conio and stdio functions; what the
programmer in the example should have done is use cprintf(). See
chapter 9.4 of the FAQ for details.
To the original poster: there is no generally accepted method of cursor
movement in a Unixy environment simply because there is no standard
hardware interface. There are literally thousands of different kinds of
systems that run Unix, and writing a simple standard interface that
would work equally on all of them would be totally impossible.
Therefore you have libraries like Curses and Xterm that are intended to
be cross-platform, but end up bulky and slow as a result.
hth!
--
---------------------------------------------------------------------
| John M. Aldrich | "Animals can be driven crazy by pla- |
| aka Fighteer I | cing too many in too small a pen. |
| mailto:fighteer AT cs DOT com | Homo sapiens is the only animal that |
| http://www.cs.com/fighteer | voluntarily does this to himself." |
---------------------------------------------------------------------
- Raw text -