Path: 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 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 = ; 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)