]> pd.if.org Git - pdclib/blob - functions/assert.c
Added dummy test drivers to each *.c file, and target 'test' to Makefile.
[pdclib] / functions / assert.c
1 /* _PDCLIB_assert( char * )
2
3    This file is part of the Public Domain C Library (PDCLib).
4    Permission is granted to use, modify, and / or redistribute at will.
5 */
6
7 #include <stdio.h>
8 #include <stdlib.h>
9
10 #include <_PDCLIB_aux.h>
11
12 #if _PDCLIB_C_VERSION == 99
13 void _PDCLIB_assert( char const * const message1, char const * const function, char const * const message2 )
14 {
15     fputs( message1, stderr );
16     fputs( function, stderr );
17     fputs( message2, stderr );
18     abort();
19 }
20 #else
21 void _PDCLIB_assert( char const * const message )
22 {
23     fputs( message, stderr );
24     abort();
25 }
26 #endif
27
28
29 #ifdef TEST
30 int main()
31 {
32     return 0;
33 }
34 #endif