aboutsummaryrefslogtreecommitdiff
path: root/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h
diff options
context:
space:
mode:
Diffstat (limited to 'Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h')
-rw-r--r--Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h
new file mode 100644
index 0000000..bdf39fc
--- /dev/null
+++ b/Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h
@@ -0,0 +1,67 @@
+/*********************************************************************
+
+ ADOBE SYSTEMS INCORPORATED
+ Copyright (C) 2003-2006 Adobe Systems Incorporated
+ All rights reserved.
+
+ NOTICE: Adobe permits you to use, modify, and distribute this file
+ in accordance with the terms of the Adobe license agreement
+ accompanying it. If you have received this file from a source other
+ than Adobe, then your use, modification, or distribution of it
+ requires the prior written permission of Adobe.
+
+*********************************************************************/
+
+#ifndef _H_CASSERT_ADOBE_API
+#define _H_CASSERT_ADOBE_API
+
+#if !DEBUG
+/* ANSI assert.h requires preprocessor definition of NDEBUG in order to disable.
+ We can use the DEBUG setting */
+#define ACROASSERT(ignore) ((void*)0)
+
+#else
+
+#include "Environ.h"
+
+#if WIN_PLATFORM || WIN_ENV
+/* Win version of assert brings up dialog with file/line and allows user to go to debugger. We'll use it */
+#include <assert.h>
+/**
+ A platform-independent version of the ANSI <code>assert</code> function.
+*/
+#define ACROASSERT assert
+
+#elif MAC_PLATFORM || MAC_ENV
+/* Mac version of assert just quits. We prefer to give a message and break at the problem */
+#if defined(__MWERKS__)
+#else
+#include <CoreServices/CoreServices.h>
+#endif
+#define ACROASSERT(b) ((b)?0: (DebugStr("\pACROASSERT Failed"), **(int**)0)) /* stop here, there is a problem */
+
+#elif UNIX_PLATFORM || UNIX_ENV
+ /* Unix version of assert. Use default implementation */
+
+ /* There is a compiler issue we've seen on x86 Linux gcc 3.2 when using the native assert */
+ #if ((__GNUC__ == 3) && (__GNUC_MINOR__ == 2) && (__i386__) && (defined(PLUGIN)))
+ #include <stdio.h>
+ #define ACROASSERT(expr) ((void) ((expr) ? 0 : (fprintf (stderr, "%s failed at %s:%d\n", #expr, __FILE__, __LINE__), (*(int *)0 = 1) )))
+
+ #else /* not Linux/gcc 3.2/Plugins */
+
+ /* normal Unix version -- just use assert() */
+ #include <assert.h>
+ #define ACROASSERT assert
+ #endif /* not Linux/gcc 3.2/Plugins */
+#else
+/* should define one of the platforms above. setting ACROASSERT to ANSI assert */
+#pragma message("PLATFORM not defined")
+#include <assert.h>
+#define ACROASSERT assert
+#endif /* PLATFORM */
+#endif /*!DEBUG */
+
+
+#endif /*_H_CASSERT_ADOBE_API*/
+