[comp.sys.amiga] Data Structures

11TSTARK@GALLUA.BITNET (Timothy Stark) (06/13/89)

Hello All,

     I am developing my new super disassembler for Amiga. I have a problems
with data structure. I am developing on our UNIX system because it
is more efficient to develop it. I tried to run it but I get core dumped.
It must be corrupted at pointers. I tried that variable:

               hunk[n]->unit->start = 0;

It crashed the system. The compiler thought that hunk is a int instead
of struct hunktable for array computation. It resulted in Bus error.
Any helps? Well, Should I use a index variable and a base variable for
set up pointer to struct in range? For, example:

               hunk = hunkbase + sizeof(struct hunktable)*index;
               hunk->start = 0;

               or

               hunk[index]->start = 0;

Which better for safe techique?

Please reply me asap. Thanks.

-- Tim Stark

Timothy Stark          Bitnet: 11tstark@gallua.bitnet People/Link: OCS130
Gallaudet University   Internet: 11tstark@gallux.gallaudet.edu GEnie: T.STARK1
P.O. Box 1453, 800 Florida Ave., N.E., Washington, DC 20002
"Gallaudet University is the only university for the deaf in the world."