From 43d65dc03325bcce8561423b9607f7e114355f7d Mon Sep 17 00:00:00 2001 From: ferbas Date: Wed, 13 Jan 2010 09:41:29 +0000 Subject: initial import git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@545 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- .../sources/import/API/acroassert.h | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h (limited to 'Adobe_SigHandler/Adobe.PDF-AS-SigHandler/sources/import/API/acroassert.h') 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 +/** + A platform-independent version of the ANSI assert 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 +#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 + #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 + #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 +#define ACROASSERT assert +#endif /* PLATFORM */ +#endif /*!DEBUG */ + + +#endif /*_H_CASSERT_ADOBE_API*/ + -- cgit v1.2.3