🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #9426

Manxifying Lattice Code

#9426
From: Stuart H. Ferguson
Date: Wed, 03 Aug 1988 22:27
29 lines
1637 bytes
I'm trying to convert a program that compiles under Lattice C into a Manx C
program, and I've run into weird snags.  (This is "Conquest" from an early
Fish disk, BTW.)  It was originally a Unix program and appeared to require
little modification to make it work on the Amiga (except that it fails to
"free" some "malloc"ed structures -- tsk, tsk), but it will not run correctly
when compiled using Aztec C with +L option.  I've looked at it with SDB and
CANNOT for the life of me figure out what is causing the crash.  The program
allocates some memory and assigns this is to a structure, saying:

	pplanet = (tplanet *) malloc (sizeof(tplanet));

but when it tries to store to the structure, it (sometimes!) crashes with
Guru 3.  The statement in question is:

	pplanet->number = <expression>;

The pointer is word aligned (as it should be), and "number" is the first
field in the structure so it doesn't appear to be an alignment problem.
Any suggestions?

Oh, it also compiles and works fine on our VMS Vax; just had to change the
Read() of a RAW console window to a SYS$QIO...

Any discussion of the code-level differences of Manx and Lattice could also
be useful.  Thanx in advance.
-- 
		Stuart Ferguson		(shf@well.UUCP)
		Action by HAVOC		(shf@Solar.Stanford.EDU)
Technical Details
Message-ID: <6711@well.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!ucbvax!bloom-beacon!apple!well!shf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!ucbvax!bloom-beacon!apple!well!shf
From: shf@well.UUCP (Stuart H. Ferguson)
Newsgroups: comp.sys.amiga.tech
Subject: Manxifying Lattice Code
Message-ID: <6711@well.UUCP>
Date: 3 Aug 88 22:27:37 GMT
Reply-To: shf@well.UUCP (Stuart H. Ferguson)
Organization: The Blue Planet
Lines: 29