home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15382 < prev    next >
Encoding:
Internet Message Format  |  1992-09-11  |  2.2 KB

  1. 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
  2. From: REEKES@applelink.apple.com (Jim Reekes)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Re: Help needed translating from MPW to THINK C ...
  5. Message-ID: <REEKES-110992142336@90.10.20.67>
  6. Date: 11 Sep 92 21:22:33 GMT
  7. References: <Bu6tnD.I96@acsu.buffalo.edu>
  8. Sender: usenet@Apple.COM
  9. Followup-To: comp.sys.mac.programmer
  10. Distribution: comp
  11. Organization: Apple Computer, Inc.
  12. Lines: 44
  13.  
  14. In article <Bu6tnD.I96@acsu.buffalo.edu>, triantos@acsu.buffalo.edu (Nick B
  15. Triantos) wrote:
  16. > Hi,
  17. > I'm trying to compile the source to Windows 3 (Name correct?), the program that
  18. > lets me show everyone that my Mac can run Windows (Check it out before you
  19. > flame me).  Anyway, I'm trying to compile it in THINK, and, after some minor
  20. > changes, I'm getting errors caused by the line below.  It's used as follows:
  21. > extern void _DataInit();
  22. > /* This routine is part of the MPW runtime library. This external
  23. >    reference to it is done so that we can unload its segment, %A5Init. */
  24. > #pragma segment Main
  25. > void main(void)
  26. > {
  27. >     UnloadSeg((Ptr) _DataInit);        /* note that _DataInit must not
  28. > be in Main! */
  29. >     
  30. >     /* 1.01 - call to ForceEnvirons removed */
  31. >     
  32. >     /*    If you have stack requirements that differ from the default,
  33. >         then you could use SetApplLimit to increase StackSpace at 
  34. >         this point, before calling MaxApplZone. */
  35. >     MaxApplZone();                    /* expand the heap so 
  36. > code segments load at the top */
  37. > My question is, how can I make this part work in THINK?  I have tried just
  38. > commenting it out ("When in doubt, comment it out"), and, well, that was a
  39. > stupid idea.  Any others?
  40.  
  41. Think doesn't use the _DataInit method, so you don't need to call
  42. UnloadSeg on this.  Delete the extern for it, and the UnloadSet.
  43.  
  44. -----------------------------------------------------------------------
  45. Jim Reekes, Polterzeitgeist  |     Macintosh Toolbox Engineering
  46.                              |          Sound Manager Expert
  47. Apple Computer, Inc.         | RAll opinions expressed are mine, and do
  48. 20525 Mariani Ave. MS: 81-KS |   not necessarily represent those of my
  49. Cupertino, CA 95014          |       employer, Apple Computer Inc.S
  50.