diff options
author | ryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-01-03 21:47:20 +0000 |
---|---|---|
committer | ryde <ryde@280ebfd0-de03-0410-8827-d642c229c3f4> | 2003-01-03 21:47:20 +0000 |
commit | 1456b4151b4272f8675bf9ccb81dc4291ac2508c (patch) | |
tree | 952c839fe0f8af5316bcc0d1211bce587b3ee57a /set_str.c | |
parent | c6c2a823419bd981da7dd69d47c074a60ac010c9 (diff) | |
download | mpfr-1456b4151b4272f8675bf9ccb81dc4291ac2508c.tar.gz |
Use separate function calls to strncasecmp and strncmp, rather than
?: on function pointers, since the latter demands declarations not
present on SunOS. Both forms are optimized the same by gcc.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2128 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set_str.c')
-rw-r--r-- | set_str.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1,6 +1,6 @@ /* mpfr_set_str -- set a floating-point number from a string -Copyright 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of the MPFR Library. @@ -69,7 +69,8 @@ mpfr_set_str (mpfr_ptr x, __gmp_const char *str, int base, mp_rnd_t rnd_mode) /* be careful that 'nan' is a valid number in base >= 24, since n=23, a=10, n=23 */ - if (((base < 24) ? strncasecmp : strncmp) (str, "NaN", 3) == 0) + if (((base < 24) ? strncasecmp (str, "NaN", 3) : strncmp (str, "NaN", 3)) + == 0) { MPFR_SET_NAN(x); /* MPFR_RET_NAN not used as the return value isn't a ternary value */ |