From ee501259d6266addff197d09ce1f15b966d8e814 Mon Sep 17 00:00:00 2001 From: solar Date: Fri, 21 Nov 2003 18:04:57 +0000 Subject: [PATCH] Added first implementation file. --- functions/assert.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 functions/assert.c diff --git a/functions/assert.c b/functions/assert.c new file mode 100644 index 0000000..3721347 --- /dev/null +++ b/functions/assert.c @@ -0,0 +1,17 @@ +// ---------------------------------------------------------------------------- +// $Id$ +// ---------------------------------------------------------------------------- +// Public Domain C Library - http://pdclib.sourceforge.net +// This code is Public Domain. Use, modify, and redistribute at will. +// ---------------------------------------------------------------------------- + +#include +#include + +__assert( char const * const expression, char const * const file, + char const * const function, int const line ) +{ + fprintf(stderr, "Assertion failed: %s, function %s, file %s, line %d.\n", + expression, function, file, line ); + abort(); +} -- 2.40.0