home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / sys / mac / programm / 15268 < prev    next >
Encoding:
Text File  |  1992-09-09  |  1.7 KB  |  38 lines

  1. Path: sparky!uunet!sun-barr!ames!data.nas.nasa.gov!taligent!apple!mkelly
  2. From: mkelly@Apple.COM (Michael Kelly)
  3. Newsgroups: comp.sys.mac.programmer
  4. Subject: Think C MacHeaders weirdness
  5. Message-ID: <72240@apple.Apple.COM>
  6. Date: 10 Sep 92 08:23:08 GMT
  7. Organization: Apple Computer Inc., Cupertino, CA
  8. Lines: 27
  9.  
  10.  
  11. OK, this is strange.  I had a simple program that first initialized the
  12. toolbox with InitFonts, etc., in the correct order, and then went on to
  13. make some File Manager calls.  The initialization routine was in a separate
  14. file from both main and the rest of the program.  I wasn't including
  15. MacHeaders in the Prefix.  I ran the program with the debugger, and it
  16. crashed violently in the toolbox initialization routine.  I tried a few
  17. things, none of which made any difference.  I finally #included MacHeaders
  18. at the top of the file, and then it worked.  Weird.
  19.  
  20. The next call was in a different file.  It was to FSMakeFSSpec, which failed,
  21. saying the volume didn't exist.  There was nothing wrong with the call.  I
  22. #included MacHeaders, on a whim, in that file, and magically the function
  23. worked as it should.
  24.  
  25. The next call was to OpenWD, in yet another file.  It stopped in the
  26. debugger with a bus error inside MacTraps2.  "Well, this is silly," I
  27. thought, and I put MacHeaders in the Prefix.  Now the program works as
  28. it should (well, except for some other unrelated things....)
  29.  
  30. So, any ideas?  Has anyone run into this sort of weirdness before?
  31.  
  32. Mike.
  33. -- 
  34. _____________________________________________________________________________
  35. Michael A. Kelly                                         Apple Computer, Inc.
  36. mkelly@apple.com                 Advanced Technology Group, Graphics Software
  37. _____________________________________________________________________________
  38.