Message-ID: <3575DDC1.842B1DC3@gbrmpa.gov.au> Date: Thu, 04 Jun 1998 09:35:29 +1000 From: Leath Muller Organization: Great Barrier Reef Marine Park Authority MIME-Version: 1.0 To: "djgpp AT delorie DOT com" Subject: Weird problem... Content-Type: multipart/mixed; boundary="------------964AD0D400BE9723048EAE7C" Precedence: bulk This is a multi-part message in MIME format. --------------964AD0D400BE9723048EAE7C Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Attached is source code to load in from a file a set of integers specifying information for a circle (x, y, radius) and output to a file a set of integer points representing the appropriate pixels set on screen for the rendering of that circle. The points are clipped to a window (-200,-200) - (200,200) (brute forcefully) and all input and output coordinates are integers... The problem: It compiles and works _fine_ on gcc for DOS, Borland C 4.52, and Visual C 5.0 (service packs installed). I get exactly the output expected. It fails on gcc for Solaris, and gcc for a Dec! The output is just rectangles... Could somebody please compile this code on their setup and let me know the result... (you can simply look at the output and pick up whether the code is drawing rectangles or circles - or alternatively write to me and I will send you a viewer for Win32). Solaris: (gcc -v): gcc 2.8.1 DOS: (gcc -v): gcc 2.7.2.1 Which compiler is right???? Leathal. --------------964AD0D400BE9723048EAE7C Content-Type: application/x-unknown-content-type-c_auto_file; name="mid_crcl.c" Content-Transfer-Encoding: base64 Content-Disposition: inline; filename="mid_crcl.c" LyogVGFic3RvcHM6IDQgKi8KCiNpbmNsdWRlIDxzdGRpby5oPgojaW5jbHVkZSA8c3RkbGli Lmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KI2luY2x1ZGUgPG1hdGguaD4KCiNkZWZpbmUgVFJV RSAxCiNkZWZpbmUgRkFMU0UgMAoKI2RlZmluZSBNQVhfUEFUSF9TSVpFIDI1NgkvKiBNYXhp bXVtIGZpbGUgbmFtZSBsZW5ndGggKi8KI2RlZmluZSBNQVhfVVNFUl9JTlBVVF9TSVpFIDQJ LyogQWxsb3dzIGZvciB1bmktY29kZSBpbnB1dCAqLwoKLyoKICogVGhlIHN0cnVjdHVyZSBj aXJjbGV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