Mail Archives: djgpp/1996/03/17/09:53:36
On Fri, 15 Mar 1996, Charles Brasted wrote:
> As far as I can tell, I had let some stray spaces enter between the "set
> djgpp" and the rest, which apparently was the source of the problem. For
> example I typed
> set djgpp = c:\djgpp\djgpp.env
>
> instead of
> set djgpp=c:\djgpp\djgpp.env
Actually, the second blank (after the `=' sign) is harmless; it's the one
*before* `=' which causes trouble, because it defines a variable called
"DJGPP " (with the blank in the name) and thus the DJGPP startup code
doesn't find a variable "DJGPP".
Thank you for your suggestion, I'll include such a warning in the next
version of the FAQ.
> void pok(int x, int y, char c)
> {
> goto_xy(x,y);
> putchar(c);
> }
It is usually bad idea to mix buffered I/O (like `putchar' or `fprintf')
with direct screen writes and BIOS interrupts. If you *do* need to call
buffered I/O, always call `fflush(stdout)' immediately after to deliver
the characters to the screen. But the best (and the correct) way is just
to call any of the conio functions that write directly to the screen, like
`putch' or `ScreenPutChar'. I didn't try this, but I'd bet that in your
case, the characters aren't flushed until the program exits.
And of course, this is also in the FAQ (section 9.4), although it doesn't
mention `putchar' explicitly...
- Raw text -