Article View: comp.sys.atari.st
Article #28389Problem with Initializing structures in MWC?
From: lansd
Date: Fri, 25 Sep 1987 03:44
Date: Fri, 25 Sep 1987 03:44
32 lines
1402 bytes
1402 bytes
I am in the process of converting a new public domain file selector
written in Megamax C to MWC. The only major problem that I have encountered
is with structure initialization. The two structures being initialized are
the TED_INFO and OBJECT Resource structures (the program has the resource
file coded into the C file).
A fragment of the code follows...
char *rs_strings[] = {
"",
"CANCEL"
.
.
"FFF"};
TEDINFO rs_tedinfo[] = {
0L, rs_strings[10], rs_strings[13],3,0,0,0x1180,0,0,0,13,
.
.
.
}
OBJECT rs_objects[] = {
7,-1,-1,G_BUTTON, SELECTABLE, NORMAL, rs_strings[4]......
.
.
}
MWC displays the message "Initializer too complex" for the lines
in rs_tedinfo and rs_objects that reference the 'rs_strings' pointer array.
By replacing these referneces with long constants the code is accepted ok.
How do I get around this problem?
Technical Details
Message-ID:
<1987Sep24.234442.27533@gpu.utcs.toronto.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!lansdShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!utgpu!lansd From: lansd@utgpu.UUCP Newsgroups: comp.sys.atari.st Subject: Problem with Initializing structures in MWC? Message-ID: <1987Sep24.234442.27533@gpu.utcs.toronto.edu> Date: Thu, 24-Sep-87 23:44:42 EDT Article-I.D.: gpu.1987Sep24.234442.27533 Posted: Thu Sep 24 23:44:42 1987 Date-Received: Sat, 26-Sep-87 12:47:53 EDT Distribution: na Organization: University of Toronto Computing Services Lines: 32 Checksum: 06715