Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
strtol.h
Go to the documentation of this file.
1
29#include <rw/_defs.h>
30
31
33
34
35_RWSTD_EXPORT extern const unsigned char
36__rw_digit_map[];
37
38
39// same as strtoul() except that the source sequence must start
40// with a sign (either '+' or '-')
41unsigned long
42__rw_strtoul (const char*, int*, int) _THROWS (());
43
44long
45__rw_strtol (const char*, int*, int) _THROWS (());
46
47
48#ifdef _RWSTD_LONG_LONG
49
50 // using LLONG_SIZE instead of ULLONG_MAX in the preprocessor
51 // conditional below to work around a gcc 3.2 bug (PR #28595)
52# if (_RWSTD_LLONG_SIZE <= _RWSTD_LONG_SIZE)
53
54inline unsigned _RWSTD_LONG_LONG
55__rw_strtoull (const char *nptr, int *errptr, int base) _THROWS (())
56{
57 _RWSTD_ASSERT (sizeof (_RWSTD_LONG_LONG) == sizeof (long));
58
59 return __rw_strtoul (nptr, errptr, base);
60}
61
62
64__rw_strtoll (const char *nptr, int *errptr, int base) _THROWS (())
65{
66 _RWSTD_ASSERT (sizeof (_RWSTD_LONG_LONG) == sizeof (long));
67
68 return __rw_strtol (nptr, errptr, base);
69}
70
71# else // if (_RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE)
72
73unsigned _RWSTD_LONG_LONG
74__rw_strtoull (const char*, int*, int) _THROWS (());
75
77__rw_strtoll (const char*, int*, int) _THROWS (());
78
79# endif // _RWSTD_LLONG_SIZE <= _RWSTD_LONG_SIZE
80#endif // _RWSTD_LONG_LONG
81
82
83#ifdef __SUNPRO_CC
84
85 // tell the Sun C++ optimizer that the functions do not access
86 // for reading or writing any part of the program state (either
87 // visible at in the caller at the point of the call, or not)
88# pragma no_side_effect (__rw_strtoul)
89# pragma no_side_effect (__rw_strtol)
90
91# ifdef _RWSTD_LONG_LONG
92# pragma no_side_effect (__rw_strtoull)
93# pragma no_side_effect (__rw_strtoll)
94# endif // _RWSTD_LONG_LONG
95
96#endif // Sun C++
97
98
99} // namespace __rw
#define _THROWS()
#define _RWSTD_LONG_LONG
#define _RWSTD_EXPORT
Definition _defs.h:485
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567
#define _RWSTD_ASSERT(ignore)
Definition _defs.h:1108