OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [newlib-1.17.0/] [newlib/] [libc/] [machine/] [powerpc/] [atoufix16.c] - Blame information for rev 862

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 148 jeremybenn
/*
2
FUNCTION
3
   <<atoufix16>>, <<atoufix32>>, <<atoufix64>>---string to unsigned fixed-point
4
 
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
17
 
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]>);
23
 
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]>);
27
 
28
TRAD_SYNOPSIS
29
        #include <stdlib.h>
30
        __uint16_t atoufix16(<[s]>)
31
        const char *<[s]>;
32
 
33
        __uint32_t atoufix32(<[s]>)
34
        const char *<[s]>;
35
 
36
        __uint64_t atoufix64(<[s]>)
37
        const char *<[s]>;
38
 
39
        __uint16_t _atoufix16_r(<reent>, <[s]>)
40
        struct _reent *<[reent]>;
41
        const char *<[s]>;
42
 
43
        __uint32_t _atoufix32_r(<reent>, <[s]>)
44
        struct _reent *<[reent]>;
45
        const char *<[s]>;
46
 
47
        __uint64_t _atoufix64_r(<reent>, <[s]>)
48
        struct _reent *<[reent]>;
49
        const char *<[s]>;
50
 
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).>>
61
 
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.
65
 
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.
70
 
71
PORTABILITY
72
        <<atoufix16>>, <<atoufix32>>, and <<atoufix64>> are non-standard.
73
 
74
        No supporting OS subroutines are directly required.  The
75
        OS subroutines required by <<strtod>> are used.
76
*/
77
 
78
/*
79
 * Jeff Johnston - 02/13/2002
80
 */
81
 
82
#ifdef __SPE__
83
 
84
#include <stdlib.h>
85
#include <_ansi.h>
86
 
87
__uint16_t
88
_DEFUN (_atoufix16_r, (reent, s),
89
        struct _reent *reent _AND
90
        _CONST char *s)
91
{
92
  return _strtoufix16_r (reent, s, NULL);
93
}
94
 
95
#ifndef _REENT_ONLY
96
__uint16_t
97
_DEFUN (atoufix16, (s),
98
        _CONST char *s)
99
{
100
  return strtoufix16 (s, NULL);
101
}
102
 
103
#endif /* !_REENT_ONLY */
104
 
105
#endif /* __SPE__ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.