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

a64l.3p (4157B)


  1. '\" et
  2. .TH A64L "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. a64l,
  12. l64a
  13. \(em convert between a 32-bit integer and a radix-64 ASCII string
  14. .SH SYNOPSIS
  15. .LP
  16. .nf
  17. #include <stdlib.h>
  18. .P
  19. long a64l(const char *\fIs\fP);
  20. char *l64a(long \fIvalue\fP);
  21. .fi
  22. .SH DESCRIPTION
  23. These functions maintain numbers stored in radix-64 ASCII
  24. characters. This is a notation by which 32-bit integers can be
  25. represented by up to six characters; each character represents a digit
  26. in radix-64 notation. If the type
  27. .BR long
  28. contains more than 32 bits, only the low-order 32 bits shall be used for
  29. these operations.
  30. .P
  31. The characters used to represent digits are
  32. .BR '.'
  33. (dot) for 0,
  34. .BR '/'
  35. for 1,
  36. .BR '0'
  37. through
  38. .BR '9'
  39. for [2,11],
  40. .BR 'A'
  41. through
  42. .BR 'Z'
  43. for [12,37], and
  44. .BR 'a'
  45. through
  46. .BR 'z'
  47. for [38,63].
  48. .P
  49. The
  50. \fIa64l\fR()
  51. function shall take a pointer to a radix-64 representation, in which
  52. the first digit is the least significant, and return the corresponding
  53. .BR long
  54. value. If the string pointed to by
  55. .IR s
  56. contains more than six characters,
  57. \fIa64l\fR()
  58. shall use the first six. If the first six characters of the string
  59. contain a null terminator,
  60. \fIa64l\fR()
  61. shall use only characters preceding the null terminator. The
  62. \fIa64l\fR()
  63. function shall scan the character string from left to right with the
  64. least significant digit on the left, decoding each character as a 6-bit
  65. radix-64 number. If the type
  66. .BR long
  67. contains more than 32 bits, the resulting value is sign-extended. The
  68. behavior of
  69. \fIa64l\fR()
  70. is unspecified if
  71. .IR s
  72. is a null pointer or the string pointed to by
  73. .IR s
  74. was not generated by a previous call to
  75. \fIl64a\fR().
  76. .P
  77. The
  78. \fIl64a\fR()
  79. function shall take a
  80. .BR long
  81. argument and return a pointer to the corresponding radix-64
  82. representation. The behavior of
  83. \fIl64a\fR()
  84. is unspecified if
  85. .IR value
  86. is negative.
  87. .P
  88. The value returned by
  89. \fIl64a\fR()
  90. may be a pointer into a static buffer. Subsequent calls to
  91. \fIl64a\fR()
  92. may overwrite the buffer.
  93. .P
  94. The
  95. \fIl64a\fR()
  96. function need not be thread-safe.
  97. .SH "RETURN VALUE"
  98. Upon successful completion,
  99. \fIa64l\fR()
  100. shall return the
  101. .BR long
  102. value resulting from conversion of the input string. If a string
  103. pointed to by
  104. .IR s
  105. is an empty string,
  106. \fIa64l\fR()
  107. shall return 0L.
  108. .P
  109. The
  110. \fIl64a\fR()
  111. function shall return a pointer to the radix-64 representation. If
  112. .IR value
  113. is 0L,
  114. \fIl64a\fR()
  115. shall return a pointer to an empty string.
  116. .SH ERRORS
  117. No errors are defined.
  118. .LP
  119. .IR "The following sections are informative."
  120. .SH EXAMPLES
  121. None.
  122. .SH "APPLICATION USAGE"
  123. If the type
  124. .BR long
  125. contains more than 32 bits, the result of
  126. \fIa64l\fP(\fIl64a\fP(\fIx\fP)) is
  127. .IR x
  128. in the low-order 32 bits.
  129. .SH RATIONALE
  130. This is not the same encoding as used by either encoding variant
  131. of the
  132. .IR uuencode
  133. utility.
  134. .SH "FUTURE DIRECTIONS"
  135. None.
  136. .SH "SEE ALSO"
  137. .IR "\fIstrtoul\fR\^(\|)"
  138. .P
  139. The Base Definitions volume of POSIX.1\(hy2017,
  140. .IR "\fB<stdlib.h>\fP"
  141. .P
  142. The Shell and Utilities volume of POSIX.1\(hy2017,
  143. .IR "\fIuuencode\fR\^"
  144. .\"
  145. .SH COPYRIGHT
  146. Portions of this text are reprinted and reproduced in electronic form
  147. from IEEE Std 1003.1-2017, Standard for Information Technology
  148. -- Portable Operating System Interface (POSIX), The Open Group Base
  149. Specifications Issue 7, 2018 Edition,
  150. Copyright (C) 2018 by the Institute of
  151. Electrical and Electronics Engineers, Inc and The Open Group.
  152. In the event of any discrepancy between this version and the original IEEE and
  153. The Open Group Standard, the original IEEE and The Open Group Standard
  154. is the referee document. The original Standard can be obtained online at
  155. http://www.opengroup.org/unix/online.html .
  156. .PP
  157. Any typographical or formatting errors that appear
  158. in this page are most likely
  159. to have been introduced during the conversion of the source files to
  160. man page format. To report such errors, see
  161. https://www.kernel.org/doc/man-pages/reporting_bugs.html .