utils/magic_assert.h: separate assert.h and ASSERT
This is a low level thing that other lowlevel API (platform shims for strlen_s() and ctime_r() want to make use of, without any application global pollution). Copyright date(s) taken from git blame information for moved lines.
This commit is contained in:
parent
4d2def46f4
commit
4a1da7fe7c
|
|
@ -29,6 +29,8 @@
|
|||
#include <zlib.h>
|
||||
#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 <assert.h>
|
||||
#define ASSERT(p, where) assert(p) /* "where" is ignored */
|
||||
|
||||
/* ------------------------ Malloc/free ------------------------------- */
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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 <assert.h>
|
||||
#define ASSERT(p, where) assert(p) /* "where" is ignored */
|
||||
|
||||
|
||||
#endif /* _MAGIC_ASSERT_H */
|
||||
Loading…
Reference in New Issue