3 <<atoi>>, <<atol>>---string to integer
16 int atoi(const char *<[s]>);
17 long atol(const char *<[s]>);
18 int _atoi_r(struct _reent *<[ptr]>, const char *<[s]>);
19 long _atol_r(struct _reent *<[ptr]>, const char *<[s]>);
22 <<atoi>> converts the initial portion of a string to an <<int>>.
23 <<atol>> converts the initial portion of a string to a <<long>>.
25 <<atoi(s)>> is implemented as <<(int)strtol(s, NULL, 10).>>
26 <<atol(s)>> is implemented as <<strtol(s, NULL, 10).>>
28 <<_atoi_r>> and <<_atol_r>> are reentrant versions of <<atoi>> and
29 <<atol>> respectively, passing the reentrancy struct pointer.
32 The functions return the converted value, if any. If no conversion was
33 made, <<0>> is returned.
36 <<atoi>>, <<atol>> are ANSI.
38 No supporting OS subroutines are required.
42 * Andy Wilson, 2-Oct-89.
52 return (int) strtol (s
, NULL
, 10);
54 #endif /* !_REENT_ONLY */
57 _atoi_r (struct _reent
*ptr
,
60 return (int) _strtol_r (ptr
, s
, NULL
, 10);