logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

atol.3p (2609B)


  1. '\" et
  2. .TH ATOL "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. atol,
  12. atoll
  13. \(em convert a string to a long integer
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <stdlib.h>
  18. .P
  19. long atol(const char *\fInptr\fP);
  20. long long atoll(const char *\fInptr\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. The functionality described on this reference page is aligned with the
  24. ISO\ C standard. Any conflict between the requirements described here and the
  25. ISO\ C standard is unintentional. This volume of POSIX.1\(hy2017 defers to the ISO\ C standard.
  26. .P
  27. Except as noted below, the call
  28. .IR atol ( nptr )
  29. shall be equivalent to:
  30. .sp
  31. .RS 4
  32. .nf
  33. strtol(nptr, (char **)NULL, 10)
  34. .fi
  35. .P
  36. .RE
  37. .P
  38. Except as noted below, the call to
  39. .IR atoll ( nptr )
  40. shall be equivalent to:
  41. .sp
  42. .RS 4
  43. .nf
  44. strtoll(nptr, (char **)NULL, 10)
  45. .fi
  46. .P
  47. .RE
  48. .P
  49. The handling of errors may differ. If the value cannot be
  50. represented, the behavior is undefined.
  51. .SH "RETURN VALUE"
  52. These functions shall return the converted value if the value can be
  53. represented.
  54. .SH ERRORS
  55. No errors are defined.
  56. .LP
  57. .IR "The following sections are informative."
  58. .SH EXAMPLES
  59. None.
  60. .SH "APPLICATION USAGE"
  61. If the number is not known to be in range,
  62. \fIstrtol\fR()
  63. or
  64. \fIstrtoll\fR()
  65. should be used because
  66. \fIatol\fR()
  67. and
  68. \fIatoll\fR()
  69. are not required to perform any error checking.
  70. .SH RATIONALE
  71. None.
  72. .SH "FUTURE DIRECTIONS"
  73. None.
  74. .SH "SEE ALSO"
  75. .IR "\fIstrtol\fR\^(\|)"
  76. .P
  77. The Base Definitions volume of POSIX.1\(hy2017,
  78. .IR "\fB<stdlib.h>\fP"
  79. .\"
  80. .SH COPYRIGHT
  81. Portions of this text are reprinted and reproduced in electronic form
  82. from IEEE Std 1003.1-2017, Standard for Information Technology
  83. -- Portable Operating System Interface (POSIX), The Open Group Base
  84. Specifications Issue 7, 2018 Edition,
  85. Copyright (C) 2018 by the Institute of
  86. Electrical and Electronics Engineers, Inc and The Open Group.
  87. In the event of any discrepancy between this version and the original IEEE and
  88. The Open Group Standard, the original IEEE and The Open Group Standard
  89. is the referee document. The original Standard can be obtained online at
  90. http://www.opengroup.org/unix/online.html .
  91. .PP
  92. Any typographical or formatting errors that appear
  93. in this page are most likely
  94. to have been introduced during the conversion of the source files to
  95. man page format. To report such errors, see
  96. https://www.kernel.org/doc/man-pages/reporting_bugs.html .