fixes for host gcc 4.6.1
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / machine / powerpc / atoufix16.c
blob53db137640a1bd45f98b36bf37ed1823177105b3
1 /*
2 FUNCTION
3 <<atoufix16>>, <<atoufix32>>, <<atoufix64>>---string to unsigned fixed-point
5 INDEX
6 atoufix16
7 INDEX
8 atoufix32
9 INDEX
10 atoufix64
11 INDEX
12 _atoufix16_r
13 INDEX
14 _atoufix32_r
15 INDEX
16 _atoufix64_r
18 ANSI_SYNOPSIS
19 #include <stdlib.h>
20 __uint16_t atoufix16(const char *<[s]>);
21 __uint32_t atoufix32(const char *<[s]>);
22 __uint64_t atoufix32(const char *<[s]>);
24 __uint16_t _atoufix16_r(struct __reent *, const char *<[s]>);
25 __uint32_t _atoufix32_r(struct __reent *, const char *<[s]>);
26 __uint64_t _atoufix32_r(struct __reent *, const char *<[s]>);
28 TRAD_SYNOPSIS
29 #include <stdlib.h>
30 __uint16_t atoufix16(<[s]>)
31 const char *<[s]>;
33 __uint32_t atoufix32(<[s]>)
34 const char *<[s]>;
36 __uint64_t atoufix64(<[s]>)
37 const char *<[s]>;
39 __uint16_t _atoufix16_r(<reent>, <[s]>)
40 struct _reent *<[reent]>;
41 const char *<[s]>;
43 __uint32_t _atoufix32_r(<reent>, <[s]>)
44 struct _reent *<[reent]>;
45 const char *<[s]>;
47 __uint64_t _atoufix64_r(<reent>, <[s]>)
48 struct _reent *<[reent]>;
49 const char *<[s]>;
51 DESCRIPTION
52 <<atoufix16>> converts the initial portion of a string to a
53 16-bit fraction unsigned fixed point value.
54 <<atoufix32>> converts the initial portion of a string to a
55 32-bit fraction unsigned fixed point value.
56 <<atoufix64>> converts the initial portion of a string to a
57 64-bit fraction unsigned fixed point value.
58 <<atoufix16(s)>> is implemented as <<strtoufix16(s, NULL).>>
59 <<atoufix32(s)>> is implemented as <<strtoufix32(s, NULL).>>
60 <<atoufix64(s)>> is implemented as <<strtoufix64(s, NULL).>>
62 The alternate functions <<_atoufix16_r>>, <<_atoufix32_r>>,
63 and <<_atoufix64_r>> are reentrant versions.
64 The extra argument <[reent]> is a pointer to a reentrancy structure.
66 RETURNS
67 The functions return the converted value, if any. If no conversion was
68 made, <<0>> is returned. If saturation occurs, <<ERANGE>> is stored
69 in errno.
71 PORTABILITY
72 <<atoufix16>>, <<atoufix32>>, and <<atoufix64>> are non-standard.
74 No supporting OS subroutines are directly required. The
75 OS subroutines required by <<strtod>> are used.
79 * Jeff Johnston - 02/13/2002
82 #ifdef __SPE__
84 #include <stdlib.h>
85 #include <_ansi.h>
87 __uint16_t
88 _DEFUN (_atoufix16_r, (reent, s),
89 struct _reent *reent _AND
90 _CONST char *s)
92 return _strtoufix16_r (reent, s, NULL);
95 #ifndef _REENT_ONLY
96 __uint16_t
97 _DEFUN (atoufix16, (s),
98 _CONST char *s)
100 return strtoufix16 (s, NULL);
103 #endif /* !_REENT_ONLY */
105 #endif /* __SPE__ */