version 1.1.1.1, 2000/09/09 14:12:15 |
version 1.1.1.2, 2003/08/25 16:06:00 |
|
|
/* GMP assertion failure handler. */ |
/* GMP assertion failure handler. |
|
|
/* |
THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST |
Copyright (C) 2000 Free Software Foundation, Inc. |
CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN |
|
FUTURE GNU MP RELEASES. |
|
|
|
Copyright 2000, 2001 Free Software Foundation, Inc. |
|
|
This file is part of the GNU MP Library. |
This file is part of the GNU MP Library. |
|
|
The GNU MP Library is free software; you can redistribute it and/or modify |
The GNU MP Library is free software; you can redistribute it and/or modify |
Line 18 License for more details. |
|
Line 21 License for more details. |
|
You should have received a copy of the GNU Lesser General Public License |
You should have received a copy of the GNU Lesser General Public License |
along with the GNU MP Library; see the file COPYING.LIB. If not, write to |
along with the GNU MP Library; see the file COPYING.LIB. If not, write to |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
MA 02111-1307, USA. |
MA 02111-1307, USA. */ |
*/ |
|
|
|
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include "gmp.h" |
#include "gmp.h" |
#include "gmp-impl.h" |
#include "gmp-impl.h" |
|
|
|
|
int |
void |
#if __STDC__ |
__gmp_assert_header (const char *filename, int linenum) |
__gmp_assert_fail (const char *filename, int linenum, |
|
const char *expr) |
|
#else |
|
__gmp_assert_fail (filename, linenum, expr) |
|
char *filename; |
|
int linenum; |
|
char *expr; |
|
#endif |
|
{ |
{ |
if (filename != NULL && filename[0] != '\0') |
if (filename != NULL && filename[0] != '\0') |
{ |
{ |
|
|
if (linenum != -1) |
if (linenum != -1) |
fprintf (stderr, "%d: ", linenum); |
fprintf (stderr, "%d: ", linenum); |
} |
} |
|
} |
|
|
|
void |
|
__gmp_assert_fail (const char *filename, int linenum, |
|
const char *expr) |
|
{ |
|
__gmp_assert_header (filename, linenum); |
fprintf (stderr, "GNU MP assertion failed: %s\n", expr); |
fprintf (stderr, "GNU MP assertion failed: %s\n", expr); |
abort(); |
abort(); |
|
|
/*NOTREACHED*/ |
|
return 0; |
|
} |
} |