diff options
author | Kevin Ryde <user42@zip.com.au> | 2001-06-17 01:05:42 +0200 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2001-06-17 01:05:42 +0200 |
commit | ac38b848585b8028e3a816be7bc38bb3b8fa0346 (patch) | |
tree | ed1313653dccefbc6261aeaee98f3e07d9148727 /assert.c | |
parent | cccb20cdbac6b65a52dd8fb29da3c866a67a5159 (diff) | |
download | gmp-ac38b848585b8028e3a816be7bc38bb3b8fa0346.tar.gz |
* assert.c (__gmp_assert_header): New function, split from
__gmp_assert_fail.
Diffstat (limited to 'assert.c')
-rw-r--r-- | assert.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -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(); } |