diff --git a/utils/magic.h b/utils/magic.h index b4aa6f46..9a2a2428 100644 --- a/utils/magic.h +++ b/utils/magic.h @@ -29,6 +29,8 @@ #include #endif +#include "utils/magic_assert.h" + /* ------------------- Universal pointer typecast --------------------- */ /* Set default value for backwards compatibility with non-autoconf make */ @@ -123,13 +125,6 @@ extern char *SysLibPath; /* Path for finding system * files like color maps, styles, etc. */ -/* --------------------- Debugging and assertions --------------------- */ - -/* To enable assertions, undefine NDEBUG in file defs.mak */ - -#include -#define ASSERT(p, where) assert(p) /* "where" is ignored */ - /* ------------------------ Malloc/free ------------------------------- */ /* diff --git a/utils/magic_assert.h b/utils/magic_assert.h new file mode 100644 index 00000000..7e3de5ef --- /dev/null +++ b/utils/magic_assert.h @@ -0,0 +1,33 @@ +/* + * magic_assert.h -- + * + * Debugging and assertions definitions for all MAGIC modules + * + * ********************************************************************* + * * Copyright (C) 2017, 2024 Regents of the University of California. * + * * Permission to use, copy, modify, and distribute this * + * * software and its documentation for any purpose and without * + * * fee is hereby granted, provided that the above copyright * + * * notice appear in all copies. The University of California * + * * makes no representations about the suitability of this * + * * software for any purpose. It is provided "as is" without * + * * express or implied warranty. Export of this software outside * + * * of the United States of America may require an export license. * + * ********************************************************************* + * + * rcsid="$Header" + */ + +#ifndef _MAGIC_ASSERT_H +#define _MAGIC_ASSERT_H + + +/* --------------------- Debugging and assertions --------------------- */ + +/* To enable assertions, undefine NDEBUG in file defs.mak */ + +#include +#define ASSERT(p, where) assert(p) /* "where" is ignored */ + + +#endif /* _MAGIC_ASSERT_H */