home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / Libraries / VideoToolbox 95.04.18 / VideoToolboxSources / VideoToolbox.c < prev    next >
Encoding:
Text File  |  1995-01-16  |  2.8 KB  |  59 lines  |  [TEXT/KAHL]

  1. /*
  2. VideoToolbox.c
  3.  
  4. Use this file, or "VideoToolbox:VideoToolboxSources:VideoToolbox.pch", to ask
  5. your compiler to precompile the VideoToolbox.h header. (If your aim is to
  6. produce an external code resource for MATLAB then use VideoToolboxMATLAB.c
  7. instead of this file.) 
  8.  
  9. VideoToolbox.pch works only with CodeWarrior, but is more automated than
  10. VideoToolbox.c. It will automatically generate the correct file name for the the
  11. precompiled header and store it in the right place. If you include it in
  12. your project, CodeWarrior will automatically determine when the precompiled
  13. header is stale and will rebuild it automatically. Unfortunately, in CodeWarrior
  14. 5, the compiler is a bit too gung ho and occasionally re-precompiles
  15. unnecessarily, which is a waste of time.
  16.  
  17. All the pre-compiled headers should be stored in
  18. "VideoToolbox:VideoToolboxSources:Precompiled headers". Here's my naming
  19. convention for pre-compiled headers:
  20. "VideoToolbox.pre" = THINK C, 68k, 2-byte int, "universal" floating point (works w or w/o 8881 fpu).
  21. "VideoToolbox.68k.4i.f.pre" = CodeWarrior, 68k, 4-byte int, 12-byte double for 8881.
  22. "VideoToolbox.68k.4i.pre" = CodeWarrior, 68k, 4-byte int, 10-byte double for no fpu.
  23. "VideoToolbox.ppc.pre" = CodeWarrior, PowerPC, necessarily 4-byte int and 8-byte double.
  24.  
  25. INSTRUCTIONS:
  26. While you have this file open, select Precompile from CodeWarrior's Project menu
  27. or THINK C’s Source menu. Save the result as "VideoToolbox.68k.4i.881.pre" (or
  28. whatever is appropriate, see above) in the "VideoToolbox:VideoToolboxSources:
  29. Precompiled headers" folder. You can then speed up the compilation of any
  30. project roughly tenfold by typing "VideoToolbox.68k.4i.f.pre" (or whichever
  31. prefix file is appropriate) into the CodeWarrior Prefix file field of the Language
  32. preferences. Or, in THINK C, type the line
  33.     #include "VideoToolbox.pre"
  34. into the Edit:Options:THINK C:Prefix window. 
  35.  
  36. Note that Precompilation ignores the project prefix.
  37.  
  38. Unfortunately none of the compilers check whether a precompiled header is out of
  39. date. If you update any of the Apple, Standard C, or VideoToolbox.h headers,
  40. then you should recreate the precompiled header. Also, the precompiled header
  41. will reflect the compiler and language settings in effect at the time of
  42. precompilation (e.g. size of int and double), so if you have different projects
  43. with different settings then you may need various versions of the precompiled
  44. header.
  45.  
  46. You can add this file to your project. It won't generate any code or affect your
  47. project in any way. It merely keeps this file handy.
  48.  
  49. HISTORY:
  50. 2/27/93    dgp    Wrote it.
  51. 4/22/93    dgp    Updated comments.
  52. 9/8/93    dgp    Updated comments.
  53. 9/12/93    dgp    Updated comments.
  54. 9/15/93    dgp    Updated comments.
  55. 10/20/94 dgp Update comments.
  56. */
  57. //#include "MacHeaders"    // Occasionally included just for debugging purposes
  58. #include "VideoToolbox.h"
  59.