/*---------------------------------------------------------------------------* Project: NintendoWare File: os_Utility.h Copyright (C)2009-2010 Nintendo Co., Ltd./HAL Laboratory, Inc. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Revision: 13725 $ *---------------------------------------------------------------------------*/ #ifndef NW_OS_UTILITY_H_ #define NW_OS_UTILITY_H_ #include #include #include #ifdef NW_RELEASE #define nwosPrintf(...) ((void)0) #define nwosVPrintf(...) ((void)0) #define nwosPanic(...) ::nw::os::Halt() #define nwosWarning(...) ((void)0) #else #define nwosPrintf ::nw::os::internal::Printf #define nwosVPrintf ::nw::os::internal::VPrintf #define nwosPanic(...) ::nw::os::internal::Panic( NN_FILE_NAME, __LINE__, __VA_ARGS__ ) #define nwosWarning(...) ::nw::os::internal::Warning( NN_FILE_NAME, __LINE__, __VA_ARGS__ ) #endif namespace nw { namespace os { namespace internal { void Printf(const char *fmt, ...); void VPrintf(const char *fmt, std::va_list vlist); void Warning( const char* fileName, int line, const char* fmt, ...); void Panic( const char* fileName, int line, const char* fmt, ...); } // namespace internal int SNPrintf(char* dst, size_t len, const char* fmt, ...); int VSNPrintf(char* dst, size_t len, const char* fmt, std::va_list vlist); void Halt(); } // namespace os } // namespace nw /* NW_OS_UTILITY_H_ */ #endif