📄 a64l.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>a64l</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_001_041"> </a>NAME</h4><blockquote><br>a64l, l64a - convert between a 32-bit integer and a radix-64 ASCII string</blockquote><h4><a name = "tag_000_001_042"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="stdlib.h.html">stdlib.h</a>>long a64l(const char *<i>s</i>);char *l64a(long <i>value</i>);</code></pre></blockquote><h4><a name = "tag_000_001_043"> </a>DESCRIPTION</h4><blockquote>These functions are used to maintain numbers stored in radix-64 ASCIIcharacters. This is a notation by which 32-bit integers can be represented byup to six characters; each character represents a digit in radix-64 notation.If the type <b>long</b> contains more than 32 bits, only the low-order 32 bitsare used for these operations.<p>The characters used to represent `digits' are '.' for 0, '/'for 1, '0' through '9' for 2-11, 'A'through 'Z' for 12-37, and 'a' through 'z' for 38-63.<p>The<i>a64l()</i>function takes a pointer to a radix-64 representation, in whichthe first digit is the least significant, and returns a corresponding<b>long</b> value. If the string pointed to by <i>s</i> contains more than sixcharacters,<i>a64l()</i>uses the first six. If the first six characters of the string contain a nullterminator,<i>a64l()</i>uses only characters preceding the null terminator. The<i>a64l()</i>function scans the character string from left to right with the leastsignificant digit on the left, decoding each character as a 6-bit radix-64number.If the type <b>long</b> contains more than 32 bits, the resulting value issign-extended. The behaviour of<i>a64l()</i>is unspecified if <i>s</i> is a null pointer or the string pointed to by<i>s</i> was not generated by a previous call to<i>l64a()</i>.<p>The<i>l64a()</i>function takes a <b>long</b>argument and returns a pointer to the corresponding radix-64 representation.The behaviour of<i>l64a()</i>is unspecified if <i>value</i> is negative.<p>The value returned by<i>l64a()</i>may be a pointer into a static buffer. Subsequent calls to<i>l64a()</i>may overwrite the buffer.<p>The<i>l64a()</i>interface need not be reentrant.An interface that is not required to be reentrant is not required to bethread-safe.</blockquote><h4><a name = "tag_000_001_044"> </a>RETURN VALUE</h4><blockquote><br>On successful completion,<i>a64l()</i>returns the <b>long</b> value resulting from conversion of the inputstring. If a string pointed to by <i>s</i> is an empty string,<i>a64l()</i>returns 0L.<p>The<i>l64a()</i>function returns a pointer to the radix-64 representation. If <i>value</i> is0L,<i>l64a()</i>returns a pointer to an empty string.</blockquote><h4><a name = "tag_000_001_045"> </a>ERRORS</h4><blockquote><br>No errors are defined.</blockquote><h4><a name = "tag_000_001_046"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_001_047"> </a>APPLICATION USAGE</h4><blockquote>If the type <b>long</b> contains more than 32 bits, the result of<i>a64l</i>(<i>l64a</i>(<i>x</i>)) is <i>x</i> in the low-order 32 bits.</blockquote><h4><a name = "tag_000_001_048"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_001_049"> </a>SEE ALSO</h4><blockquote><i><a href="strtoul.html">strtoul()</a></i>,<i><a href="stdlib.h.html"><stdlib.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -