cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/26/18:22:04

Date: Sun, 26 Jan 1997 18:04:54 -0500
Message-Id: <199701262304.SAA25786@delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: platko AT ix DOT netcom DOT com
CC: djgpp AT delorie DOT com
In-reply-to: <01b9cc8f$e8249320$b487d6ce@platko.ix.netcom.com>
Subject: Re: -ansi option, __tb don't work?

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019