os/macosx/macos.h
author peter1138
Tue, 31 Jan 2006 12:08:49 +0000
changeset 2940 ce57a148333e
parent 2847 5c667829bc67
child 3127 c734d50ad134
permissions -rw-r--r--
(svn r3496) - Validate filename titles before they get displayed. This avoids crashes with UTF-8 encoded or bad filenames by replacing undisplayable characters with a '?'
/* $Id$ */

#ifndef MACOS_H
#define MACOS_H

void ShowMacDialog ( const char *title, const char *message, const char *buttonLabel );
void ShowMacAssertDialog ( const char *function, const char *file, const int line, const char *expression );

// Since MacOS X users will never see an assert unless they started the game from a terminal
// we're using a custom assert(e) macro.
#undef assert

#ifdef NDEBUG
#define assert(e)       ((void)0)
#else

#define assert(e) \
		(__builtin_expect(!(e), 0) ? ShowMacAssertDialog ( __func__, __FILE__, __LINE__, #e ): (void)0 )
#endif

#endif /* MACOS_H */