2000-08-23 Werner Almesberger <Werner.Almesberger@epfl.ch>

* libc/stdlib/mprec.c (ulp, b2d, d2b): changed a few expressions
        like  x << y-z  to the equivalent  x << (y-z).
        (d2b): changed if statements with assignment to perform the
        assignment prior to the if check.
        * libc/reent/reent.c: included stdlib.h for "_free_r" prototype.
        * libc/unix/getpass.c (getpass): moved "echo" assignment out of if.
        * libc/unix/ttyname.c: included string.h for "strcpy" prototype.
        * libc/unix/getcwd.c (ISDOT): added parentheses to clarify && and ||
        precedence.
        * libc/include/sys/unistd.h: added "vfork" prototype (for popen.c).
        Added "_execve" prototype (for execl.c, execle.c, execv.c, and
        execve.c).
        * libc/posix/popen.c (popen): added parentheses to clarify && and ||
        precedence.
        * libm/math/e_cosh.c (__ieee754_cosh): changed parentheses to
        clarify && and || precendence (and to remove pascalism).
        * libm/math/e_sinh.c (__ieee754_sinh): Ditto.
        * libm/math/s_infconst.c: added another pair of braces to all
        initializers for __infinity (need three: for __infinity[1] array,
        for union __dmath, and for i[2]).
This commit is contained in:
Jeff Johnston
2000-08-24 22:32:38 +00:00
parent de43b06d7b
commit 2d5862dee6
8 changed files with 45 additions and 10 deletions

View File

@ -663,7 +663,7 @@ _DEFUN (ulp, (_x), double _x)
word0 (a) = 0;
L -= Exp_shift;
#ifndef _DOUBLE_IS_32BITS
word1 (a) = L >= 31 ? 1 : 1 << 31 - L;
word1 (a) = L >= 31 ? 1 : 1 << (31 - L);
#endif
}
}
@ -710,7 +710,7 @@ _DEFUN (b2d, (a, e),
d0 = Exp_1 | y << k | z >> (32 - k);
y = xa > xa0 ? *--xa : 0;
#ifndef _DOUBLE_IS_32BITS
d1 = z << k | y >> 32 - k;
d1 = z << k | y >> (32 - k);
#endif
}
else
@ -794,11 +794,13 @@ _DEFUN (d2b,
#endif
#ifdef Pack_32
#ifndef _DOUBLE_IS_32BITS
if (y = d1)
if (d1)
{
if (k = lo0bits (&y))
y = d1;
k = lo0bits (&y);
if (k)
{
x[0] = y | z << 32 - k;
x[0] = y | z << (32 - k);
z >>= k;
}
else
@ -820,9 +822,11 @@ _DEFUN (d2b,
#endif
}
#else
if (y = d1)
if (d1)
{
if (k = lo0bits (&y))
y = d1;
k = lo0bits (&y);
if (k)
if (k >= 16)
{
x[0] = y | z << 32 - k & 0xffff;