fixed memory leak
[polylib.git] / source / arith / assert.h
blobcda6ad21a87efaedd030cf23e678860ce1319290
1 /*
2 This file is part of PolyLib.
4 PolyLib is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 PolyLib is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with PolyLib. If not, see <http://www.gnu.org/licenses/>.
18 /* Version "abort" de l'assert de /usr/include/assert.h
19 * Il est installe dans Linear de maniere a masquer /usr/include/assert.h
21 * Il faut faire un include de <stdio.h> pour l'utiliser.
24 # ifndef NDEBUG
25 # define _assert(ex) {if (!(ex)){(void)fprintf(stderr,"Assertion failed: file \"%s\", line %d\n", __FILE__, __LINE__);(void) abort();}}
26 # define assert(ex) _assert(ex)
27 # else
28 # define _assert(ex)
29 # define assert(ex)
30 # endif