From: Fred Drake Date: Mon, 8 Dec 1997 21:25:41 +0000 (+0000) Subject: Separated the definitions of ntohs(), ntohl(), htons(), htonl(). Separate X-Git-Tag: v1.5b2~61 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c5aec0596757483665e2bd7f5a544e8cbc9789f8;p=thirdparty%2FPython%2Fcpython.git Separated the definitions of ntohs(), ntohl(), htons(), htonl(). Separate descriptions really make things look a bit better, and should improve the ability to re-purpose the content. --- diff --git a/Doc/lib/libsocket.tex b/Doc/lib/libsocket.tex index bbcc7f108a2a..8f6df692e7c4 100644 --- a/Doc/lib/libsocket.tex +++ b/Doc/lib/libsocket.tex @@ -153,14 +153,27 @@ daemon). \end{funcdesc} \begin{funcdesc}{ntohl}{x} -\funcline{ntohs}{x} -\funcline{htonl}{x} -\funcline{htons}{x} -These functions convert 32-bit (`l' suffix) and 16-bit (`s' suffix) -integers between network and host byte order. On machines where the -host byte order is the same as the network byte order, they are no-ops -(assuming the values fit in the indicated size); otherwise, they -perform 2-byte or 4-byte swap operations. +Convert 32-bit integers from network to host byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 4-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{ntohs}{x} +Convert 16-bit integers from network to host byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 2-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{htonl}{x} +Convert 32-bit integers from host to network byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 4-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{htons}{x} +Convert 16-bit integers from host to network byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 2-byte swap operation. \end{funcdesc} \begin{datadesc}{SocketType} diff --git a/Doc/libsocket.tex b/Doc/libsocket.tex index bbcc7f108a2a..8f6df692e7c4 100644 --- a/Doc/libsocket.tex +++ b/Doc/libsocket.tex @@ -153,14 +153,27 @@ daemon). \end{funcdesc} \begin{funcdesc}{ntohl}{x} -\funcline{ntohs}{x} -\funcline{htonl}{x} -\funcline{htons}{x} -These functions convert 32-bit (`l' suffix) and 16-bit (`s' suffix) -integers between network and host byte order. On machines where the -host byte order is the same as the network byte order, they are no-ops -(assuming the values fit in the indicated size); otherwise, they -perform 2-byte or 4-byte swap operations. +Convert 32-bit integers from network to host byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 4-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{ntohs}{x} +Convert 16-bit integers from network to host byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 2-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{htonl}{x} +Convert 32-bit integers from host to network byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 4-byte swap operation. +\end{funcdesc} + +\begin{funcdesc}{htons}{x} +Convert 16-bit integers from host to network byte order. On machines +where the host byte order is the same as network byte order, this is a +no-op; otherwise, it performs a 2-byte swap operation. \end{funcdesc} \begin{datadesc}{SocketType}