1 /* GMP assertion failure handler.
3 THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST
4 CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
5 FUTURE GNU MP RELEASES.
7 Copyright 2000, 2001 Free Software Foundation, Inc.
9 This file is part of the GNU MP Library.
11 The GNU MP Library is free software; you can redistribute it and/or modify
12 it under the terms of the GNU Lesser General Public License as published by
13 the Free Software Foundation; either version 3 of the License, or (at your
14 option) any later version.
16 The GNU MP Library is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
19 License for more details.
21 You should have received a copy of the GNU Lesser General Public License
22 along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */
31 __gmp_assert_header (const char *filename
, int linenum
)
33 if (filename
!= NULL
&& filename
[0] != '\0')
35 fprintf (stderr
, "%s:", filename
);
37 fprintf (stderr
, "%d: ", linenum
);
42 __gmp_assert_fail (const char *filename
, int linenum
,
45 __gmp_assert_header (filename
, linenum
);
46 fprintf (stderr
, "GNU MP assertion failed: %s\n", expr
);