Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
MoreIsBetter Bits/MoreSetup.r
/* |
File: MoreSetup.r |
Contains: Sets up conditions etc for MoreIsBetter. |
Written by: Quinn |
Copyright: Copyright © 1998 by Apple Computer, Inc., All Rights Reserved. |
You may incorporate this Apple sample source code into your program(s) without |
restriction. This Apple sample source code has been provided "AS IS" and the |
responsibility for its operation is yours. You are not permitted to redistribute |
this Apple sample source code as "Apple sample source code" after having made |
changes. If you're going to re-distribute the source, we require that you make |
it clear in the source that the code was descended from Apple sample source |
code, but that you've made changes. |
Change History (most recent first): |
<2> 11/4/00 Quinn Tweaks to TARGET_API_MAC_CARBON handling for non-Carbon builds. |
<1> 20/3/00 Quinn First checked in. |
*/ |
// |
// We never want to use old names or locations. |
// Since these settings must be consistent all the way through |
// a compilation unit, and since we don't want to silently |
// change them out from under a developer who uses a prefix |
// file (C/C++ panel of Target Settings), we simply complain |
// if they are already set in a way we don't like. |
// |
#ifndef OLDROUTINELOCATIONS |
# define OLDROUTINELOCATIONS 0 |
#elif OLDROUTINELOCATIONS |
# error OLDROUTINELOCATIONS must be FALSE when compiling MoreIsBetter. |
#endif |
#ifndef OLDROUTINENAMES |
# define OLDROUTINENAMES 0 |
#elif OLDROUTINENAMES |
# error OLDROUTINENAMES must be FALSE when compiling MoreIsBetter. |
#endif |
// "ConditionalMacros.r" seems to have troubles if you define |
// TARGET_API_MAC_CARBON to true without defining the alternative |
// (TARGET_API_MAC_OS8) to false. Here we fix that up. |
#ifdef TARGET_API_MAC_CARBON |
#if TARGET_API_MAC_CARBON |
#define TARGET_API_MAC_OS8 0 |
#endif |
#endif |
// |
// Bring in "ConditionalMacros.r" in order to set up |
// UNIVERSAL_INTERFACES_VERSION. |
// |
#include <ConditionalMacros.r> |
// Now that we've included a Mac OS interface file, |
// we know that the Universal Interfaces environment |
// is set up. MoreIsBetter requires Universal Interfaces |
// 3.2 or higher. Check for it. |
#if !defined(UNIVERSAL_INTERFACES_VERSION) || UNIVERSAL_INTERFACES_VERSION < 0x0320 |
#error MoreIsBetter requires Universal Interfaces 3.2 or higher. |
#endif |
// |
// We usually want assertions and other debugging code |
// turned on, but you can turn it all off if you like |
// by setting MORE_DEBUG to 0. |
// |
#ifndef MORE_DEBUG |
# define MORE_DEBUG 1 |
#endif |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-07-22