.\" 386BSD man pages
.\" Modified Sun Jul 25 10:53:39 1993 by Rik Faith (faith@cs.unc.edu)
.\" Added correction due to nsd@bbc.com (Nick Duffek) - aeb, 950610
-.TH STRTOL 3 2017-07-13 "GNU" "Linux Programmer's Manual"
+.TH STRTOL 3 2019-10-10 "GNU" "Linux Programmer's Manual"
.SH NAME
strtol, strtoll, strtoq \- convert a string to a long integer
.SH SYNOPSIS
(and returns 0).
In particular, if
.I *nptr
-is not \(aq\\0\(aq but
+is not \(aq\e0\(aq but
.I **endptr
-is \(aq\\0\(aq on return, the entire string is valid.
+is \(aq\e0\(aq on return, the entire string is valid.
.PP
The
.BR strtoll ()
long val;
if (argc < 2) {
- fprintf(stderr, "Usage: %s str [base]\\n", argv[0]);
+ fprintf(stderr, "Usage: %s str [base]\en", argv[0]);
exit(EXIT_FAILURE);
}
}
if (endptr == str) {
- fprintf(stderr, "No digits were found\\n");
+ fprintf(stderr, "No digits were found\en");
exit(EXIT_FAILURE);
}
/* If we got here, strtol() successfully parsed a number */
- printf("strtol() returned %ld\\n", val);
+ printf("strtol() returned %ld\en", val);
- if (*endptr != \(aq\\0\(aq) /* Not necessarily an error... */
- printf("Further characters after number: %s\\n", endptr);
+ if (*endptr != \(aq\e0\(aq) /* Not necessarily an error... */
+ printf("Further characters after number: %s\en", endptr);
exit(EXIT_SUCCESS);
}
.BR atoi (3),
.BR atol (3),
.BR strtod (3),
-.BR strtoul (3)
+.BR strtoimax (3),
+.BR strtoul (3),