summaryrefslogtreecommitdiff
path: root/libiberty/strtol.c
diff options
context:
space:
mode:
authorDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
committerDJ Delorie <dj@redhat.com>2001-09-26 18:45:50 +0000
commit39423523167c47f72822dbb9eb3ab4a0dfeafe68 (patch)
treeb437d1ed0d3cb7e6a0a67e5dd30ef19abbedb95e /libiberty/strtol.c
parent4e6667ac4f987fecbcf576513c70485a4718712e (diff)
downloadbinutils-gdb-39423523167c47f72822dbb9eb3ab4a0dfeafe68.tar.gz
merge from gcc
Diffstat (limited to 'libiberty/strtol.c')
-rw-r--r--libiberty/strtol.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libiberty/strtol.c b/libiberty/strtol.c
index 7095c7254be..028d6101dfd 100644
--- a/libiberty/strtol.c
+++ b/libiberty/strtol.c
@@ -28,6 +28,23 @@
* SUCH DAMAGE.
*/
+/*
+
+@deftypefn Supplemental {long int} strtol (const char *@var{string}, char **@var{endptr}, int @var{base})
+
+The @code{strtol} function converts the string in @var{string} to a
+long integer value according to the given @var{base}, which must be
+between 2 and 36 inclusive, or be the special value 0. If @var{base}
+is 0, @code{strtol} will look for the prefixes @code{0} and @code{0x}
+to indicate bases 8 and 16, respectively, else default to base 10.
+When the base is 16 (either explicitly or implicitly), a prefix of
+@code{0x} is allowed. The handling of endptr is as that of
+@code{strtod} above.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif