summaryrefslogtreecommitdiff
path: root/assert.c
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-06-17 01:05:42 +0200
committerKevin Ryde <user42@zip.com.au>2001-06-17 01:05:42 +0200
commitac38b848585b8028e3a816be7bc38bb3b8fa0346 (patch)
treeed1313653dccefbc6261aeaee98f3e07d9148727 /assert.c
parentcccb20cdbac6b65a52dd8fb29da3c866a67a5159 (diff)
downloadgmp-ac38b848585b8028e3a816be7bc38bb3b8fa0346.tar.gz
* assert.c (__gmp_assert_header): New function, split from
__gmp_assert_fail.
Diffstat (limited to 'assert.c')
-rw-r--r--assert.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/assert.c b/assert.c
index 51ac389c7..7455565d3 100644
--- a/assert.c
+++ b/assert.c
@@ -2,9 +2,8 @@
THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST
CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN
- FUTURE GNU MP RELEASES. */
+ FUTURE GNU MP RELEASES.
-/*
Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU MP Library.
@@ -22,8 +21,7 @@ License for more details.
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
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA.
-*/
+MA 02111-1307, USA. */
#include <stdio.h>
#include "gmp.h"
@@ -31,8 +29,7 @@ MA 02111-1307, USA.
void
-__gmp_assert_fail (const char *filename, int linenum,
- const char *expr)
+__gmp_assert_header (const char *filename, int linenum)
{
if (filename != NULL && filename[0] != '\0')
{
@@ -40,7 +37,13 @@ __gmp_assert_fail (const char *filename, int linenum,
if (linenum != -1)
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);
abort();
}