home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!uakari.primate.wisc.edu!ames!data.nas.nasa.gov!taligent!apple!apple!NewsWatcher!user
- From: REEKES@applelink.apple.com (Jim Reekes)
- Newsgroups: comp.sys.mac.programmer
- Subject: Re: Help needed translating from MPW to THINK C ...
- Message-ID: <REEKES-110992142336@90.10.20.67>
- Date: 11 Sep 92 21:22:33 GMT
- References: <Bu6tnD.I96@acsu.buffalo.edu>
- Sender: usenet@Apple.COM
- Followup-To: comp.sys.mac.programmer
- Distribution: comp
- Organization: Apple Computer, Inc.
- Lines: 44
-
- In article <Bu6tnD.I96@acsu.buffalo.edu>, triantos@acsu.buffalo.edu (Nick B
- Triantos) wrote:
- >
- > Hi,
- >
- > I'm trying to compile the source to Windows 3 (Name correct?), the program that
- > lets me show everyone that my Mac can run Windows (Check it out before you
- > flame me). Anyway, I'm trying to compile it in THINK, and, after some minor
- > changes, I'm getting errors caused by the line below. It's used as follows:
- >
- > extern void _DataInit();
- >
- > /* This routine is part of the MPW runtime library. This external
- > reference to it is done so that we can unload its segment, %A5Init. */
- >
- >
- > #pragma segment Main
- > void main(void)
- > {
- > UnloadSeg((Ptr) _DataInit); /* note that _DataInit must not
- >
- > be in Main! */
- >
- > /* 1.01 - call to ForceEnvirons removed */
- >
- > /* If you have stack requirements that differ from the default,
- > then you could use SetApplLimit to increase StackSpace at
- > this point, before calling MaxApplZone. */
- > MaxApplZone(); /* expand the heap so
- > code segments load at the top */
- >
- > My question is, how can I make this part work in THINK? I have tried just
- > commenting it out ("When in doubt, comment it out"), and, well, that was a
- > stupid idea. Any others?
-
- Think doesn't use the _DataInit method, so you don't need to call
- UnloadSeg on this. Delete the extern for it, and the UnloadSet.
-
- -----------------------------------------------------------------------
- Jim Reekes, Polterzeitgeist | Macintosh Toolbox Engineering
- | Sound Manager Expert
- Apple Computer, Inc. | RAll opinions expressed are mine, and do
- 20525 Mariani Ave. MS: 81-KS | not necessarily represent those of my
- Cupertino, CA 95014 | employer, Apple Computer Inc.S
-