]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/morefile/Optim.h
   2 **      Apple Macintosh Developer Technical Support 
   4 **      DirectoryCopy: #defines that let you make MoreFiles code more efficient. 
   6 **      by Jim Luther, Apple Developer Technical Support Emeritus 
   8 **      File:           Optimization.h 
  10 **      Copyright © 1992-1998 Apple Computer, Inc. 
  11 **      All rights reserved. 
  13 **      You may incorporate this sample code into your applications without 
  14 **      restriction, though the sample code has been provided "AS IS" and the 
  15 **      responsibility for its operation is 100% yours.  However, what you are 
  16 **      not permitted to do is to redistribute the source as "DSC Sample Code" 
  17 **      after having made changes. If you're going to re-distribute the source, 
  18 **      we require that you make it clear in the source that the code was 
  19 **      descended from Apple Sample Code, but that you've made changes. 
  21 **      The Optimization changes to MoreFiles source and header files, along with 
  22 **      this file and OptimizationEnd.h, let you optimize the code produced 
  23 **      by MoreFiles in several ways. 
  25 **      1 -- MoreFiles contains extra code so that many routines can run under 
  26 **      Mac OS systems back to System 6. If your program requires a specific 
  27 **      version of Mac OS and your program checks for that version before 
  28 **      calling MoreFiles routines, then you can remove a lot of compatibility 
  29 **      code by defining one of the following to 1: 
  31 **              __MACOSSEVENFIVEONEORLATER      // assume Mac OS 7.5.1 or later 
  32 **              __MACOSSEVENFIVEORLATER         // assume Mac OS 7.5 or later 
  33 **              __MACOSSEVENORLATER                     // assume Mac OS 7.0 or later 
  35 **      By default, all compatibility code is ON. 
  37 **      2 -- You may disable Pascal calling conventions in all MoreFiles routines 
  38 **      except for system callbacks that require Pascal calling conventions. 
  39 **      This will make C programs both smaller and faster. 
  40 **      Just define __WANTPASCALELIMINATION to be 1 to turn this optimization on 
  41 **      when building MoreFiles for use from C programs (you'll need to keep 
  42 **      Pascal calling conventions when linking MoreFiles routines with Pascal 
  45 **      3 -- If Metrowerks compiler is used, "#pragma internal on" may help produce 
  46 **      better code. However, this option can also cause problems if you're 
  47 **      trying to build MoreFiles as a shared library, so it is by default not used. 
  48 **      Just define __USEPRAGMAINTERNAL to be 1 to turn this optimization on. 
  50 **      Original changes supplied by Fabrizio Oddone 
  52 **      File:   Optimization.h 
  56 #ifndef __MACOSSEVENFIVEONEORLATER 
  57         #define __MACOSSEVENFIVEONEORLATER 0 
  60 #ifndef __MACOSSEVENFIVEORLATER 
  61         #define __MACOSSEVENFIVEORLATER __MACOSSEVENFIVEONEORLATER 
  64 #ifndef __MACOSSEVENORLATER 
  66                 #define __MACOSSEVENORLATER 1 
  68                 #define __MACOSSEVENORLATER __MACOSSEVENFIVEORLATER 
  73 #ifndef __WANTPASCALELIMINATION 
  74         #define __WANTPASCALELIMINATION 0 
  77 #if     __WANTPASCALELIMINATION 
  82 #ifndef __USEPRAGMAINTERNAL 
  83         #define __USEPRAGMAINTERNAL     0 
  86 #if     __USEPRAGMAINTERNAL 
  87         #if defined(__MWERKS__)