4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-18 04:19:21 +08:00
Jeff Johnston 936b520f8e 2002-08-17 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: Add powerpc*-*-eabispe* configuration.
        * libc/machine/powerpc/atosfix16.c: New fixed-point conversion file.
        * libc/machine/powerpc/atosfix32.c: Ditto.
        * libc/machine/powerpc/atosfix64.c: Ditto.
        * libc/machine/powerpc/atoufix16.c: Ditto.
        * libc/machine/powerpc/atoufix32.c: Ditto.
        * libc/machine/powerpc/atoufix64.c: Ditto.
        * libc/machine/powerpc/fix64.h: Ditto.
        * libc/machine/powerpc/simdldtoa.c: Ditto.
        * libc/machine/powerpc/strtosfix16.c: Ditto.
        * libc/machine/powerpc/strtosfix32.c: Ditto.
        * libc/machine/powerpc/strtosfix64.c: Ditto.
        * libc/machine/powerpc/strtoufix16.c: Ditto.
        * libc/machine/powerpc/strtoufix32.c: Ditto.
        * libc/machine/powerpc/strtoufix64.c: Ditto.
        * libc/machine/powerpc/ufix64toa.c: Ditto.
        * libc/machine/powerpc/configure.in: Add check for
        powerpc*-eabispe and add fixed-point conversion functions.
        * libc/machine/powerpc/configure: Regenerated.
        * libc/machine/powerpc/vfprintf.c[__SPE__]: Add support for
        %r and %R format specifiers which handle fixed-point data.
        * libc/machine/powerpc/vfscanf.c[__SPE__]: Ditto.
        * libc/machine/powerpc/machine/stdlib.h[__SPE__]: Add fixed-point
        function prototypes.
2002-08-17 05:57:20 +00:00

103 lines
2.4 KiB
C

/*
FUNCTION
<<atoufix16>>, <<atoufix32>>, <<atoufix64>>---string to unsigned fixed-point
INDEX
atoufix16
INDEX
atoufix32
INDEX
atoufix64
INDEX
_atoufix16_r
INDEX
_atoufix32_r
INDEX
_atoufix64_r
ANSI_SYNOPSIS
#include <stdlib.h>
__uint16_t atoufix16(const char *<[s]>);
__uint32_t atoufix32(const char *<[s]>);
__uint64_t atoufix32(const char *<[s]>);
__uint16_t _atoufix16_r(struct __reent *, const char *<[s]>);
__uint32_t _atoufix32_r(struct __reent *, const char *<[s]>);
__uint64_t _atoufix32_r(struct __reent *, const char *<[s]>);
TRAD_SYNOPSIS
#include <stdlib.h>
__uint16_t atoufix16(<[s]>)
const char *<[s]>;
__uint32_t atoufix32(<[s]>)
const char *<[s]>;
__uint64_t atoufix64(<[s]>)
const char *<[s]>;
__uint16_t _atoufix16_r(<reent>, <[s]>)
struct _reent *<[reent]>;
const char *<[s]>;
__uint32_t _atoufix32_r(<reent>, <[s]>)
struct _reent *<[reent]>;
const char *<[s]>;
__uint64_t _atoufix64_r(<reent>, <[s]>)
struct _reent *<[reent]>;
const char *<[s]>;
DESCRIPTION
<<atoufix16>> converts the initial portion of a string to a
16-bit fraction unsigned fixed point value.
<<atoufix32>> converts the initial portion of a string to a
32-bit fraction unsigned fixed point value.
<<atoufix64>> converts the initial portion of a string to a
64-bit fraction unsigned fixed point value.
<<atoufix16(s)>> is implemented as <<strtoufix16(s, NULL).>>
<<atoufix32(s)>> is implemented as <<strtoufix32(s, NULL).>>
<<atoufix64(s)>> is implemented as <<strtoufix64(s, NULL).>>
The alternate functions <<_atoufix16_r>>, <<_atoufix32_r>>,
and <<_atoufix64_r>> are reentrant versions.
The extra argument <[reent]> is a pointer to a reentrancy structure.
RETURNS
The functions return the converted value, if any. If no conversion was
made, <<0>> is returned. If saturation occurs, <<ERANGE>> is stored
in errno.
PORTABILITY
<<atoufix16>>, <<atoufix32>>, and <<atoufix64>> are non-standard.
No supporting OS subroutines are directly required. The
OS subroutines required by <<strtod>> are used.
*/
/*
* Jeff Johnston - 02/13/2002
*/
#include <stdlib.h>
#include <_ansi.h>
__uint16_t
_DEFUN (_atoufix16_r, (reent, s),
struct _reent *reent _AND
_CONST char *s)
{
return _strtoufix16_r (reent, s, NULL);
}
#ifndef _REENT_ONLY
__uint16_t
_DEFUN (atoufix16, (s),
_CONST char *s)
{
return strtoufix16 (s, NULL);
}
#endif /* !_REENT_ONLY */