Re: vm blocks, structs, and pointers

Edward Di Geronimo Jr. (edwdig@bergen.org)
Wed, 1 Jan 1997 14:49:25 -0500

>That is a compiler warning worth heeding, and could possibly be the problem
>that may be crashing you. ie...if you declared a variable named "mapBlock"
>and used the variable "mapblock", it's a totally different variable...because
>C is case sensitive.

I have the cases correct. The suspicious pointer warnings only show up when
I try stuff like this:

&struct1->struct2.string
&struct1->struct2.string[0]
struct1.struct2.string

>If SWAT doesn't like your program...that is a clear indication that something
>is wrong..however where that is...is questionable. Does your
>MSG_GEN_PROCESS_OPEN_APPLICATION message do anything strange in the startup
>of the program that you haven't shown us?

In OPEN_APPLICATION all I have is timelock code, and it's disabled in the EC
version. Swat is crashing before it reaches any of my code. Swat stopped
liking my program long before I started to use VM files. As soon as I can
I'll run it again and do a "where" command and post it.

>If it's saving the information to your file..you're doing something
>right..however, if you're crashing, and glue is complaining, and your
>compiler is complaining, and you can't get SWAT to run it ....then

Glue's only complaints are resource sizes. I have a 10k resource I didn't
split yet and dgroup is about 1.4k. The compiler only complained about some
of my attempts at getting the pointers right. It doesn't complain about
anything else, and I know how to get rid of the complaints, but it still
doesn't work.

>something's wrong outside of the code snippet that you're showing us, as John
>has confirmed what I thought..that basically the technique is right for what
>you're doing...at least within our understanding. I think you're going to
>find that your problem is somewhere else in your code, and that code...you
>haven't posted.

Well, the only other code I haven't shown is duplicating an object resource
and dynamically creating an object, which I got working perfectly about 3
months ago. If I comment out the code accessing the strings it works. I
think my problem is that the correct syntax for a pointer to these strings
isn't:

somestruct *struct1;

struct1->struct2.string

------------------------------------------------------------------------
| I've always been afraid to die, but I think I'm more afraid to live. |
| -Billy Corgan, Smashing Pumpkins, The Aeroplane Flys High |
------------------------------------------------------------------------
| Edward Di Geronimo Jr. edwdig@bergen.org |
------------------------------------------------------------------------