mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-07 00:31:11 +00:00
Imported libSDF into VOID tree
This commit is contained in:
parent
c6dd08bd7d
commit
2d09cb68df
55 changed files with 12667 additions and 0 deletions
23
external/libsdf/include/libsdf/Assert.h
vendored
Normal file
23
external/libsdf/include/libsdf/Assert.h
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/* A drop-in replacement for assert.h, but it calls "error" which */
|
||||
/* deposits a message in the msgbuf, the terminal, your home answering */
|
||||
/* machine, and in skywriting at Malibu beach. */
|
||||
#undef assert
|
||||
# ifndef NDEBUG
|
||||
/* Error may be #defined */
|
||||
#include "error.h"
|
||||
|
||||
#ifndef NO_STRINGIFICATION
|
||||
# define assert(ex) ((void)((ex)?0 :\
|
||||
((SWError)("Assertion (%s) failed: file \"%s\", line %d\n",\
|
||||
#ex, __FILE__, __LINE__),0)))
|
||||
#else
|
||||
/* Not only do we not have Stringification, but we assume that we have */
|
||||
/* the brain-damaged macro substitution into "..." */
|
||||
/* Note that this breaks if the substituted string has " " in it!, e.g.
|
||||
assert(SDFhasname("x", sdfp));
|
||||
*/
|
||||
# define assert(ex) ((void)((ex)?0 : ((SWError)("Assertion (%s) failed: file \"%s\", line %d\n", "ex", __FILE__, __LINE__), 0)))
|
||||
#endif /* NO_STRINGIFICATION */
|
||||
# else
|
||||
# define assert(ex) ((void)0)
|
||||
# endif
|
Loading…
Add table
Add a link
Reference in a new issue