Mail Archives: djgpp/1997/01/26/18:22:04
> I decide to rewrite my graphics library using 100% ANSI C only.
>
> The problem is that the DJGPP throws a bunch of error messages when I try
> to use
> __tb or __dpmi_regs, and __djgpp_conventional_base.
>
> How do I rewrite this so it will compile (and work) under the -ansi option?
There is nothing in the ANSI C specification that would allow you to
implement any type of graphics (except for Textronix displays, which
use printf()). The ANSI spec is pretty sparse; even POSIX is pretty
limiting in a DOS environment.
When you use -ansi, *all* non-ansi stuff is disabled, including
djgpp-specific functions and structures. I recommend you use -Wall
instead of -ansi as a basis for a "clean" source. The DJGPP libc uses
this and a few additional warnings, plus -Werror that makes them
errors.
If you want to check for ANSI conformance, you need more than just
compiler support. DJGPP includes a separate utility that scans the
objects looking for ANSI functions that rely on non-ansi-safe
functions. This prevents libc from polluting the ANSI namespace for
programs that expect an ANSI-clean environment. Same for POSIX.
- Raw text -