[PATCH] bswap.3: bswap_*() are implemented using functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



See <bits/byteswap.h> in glibc.
These macros call functions of the form __bswap_N(),
which use uintN_t.

Eventhough it's true that they are macros,
it's transparent to the user.

The user will see their results casted to unsigned types
after the conversion do to the underlying functions,
so it's better to document these as the underlying functions,
specifying the types.

Signed-off-by: Alejandro Colomar <alx.manpages@xxxxxxxxx>
---
 man3/bswap.3 | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/man3/bswap.3 b/man3/bswap.3
index 937ef0416..369daa411 100644
--- a/man3/bswap.3
+++ b/man3/bswap.3
@@ -29,19 +29,19 @@ bswap_16, bswap_32, bswap_64 \- reverse order of bytes
 .nf
 .B #include <byteswap.h>
 .PP
-.BI bswap_16( x );
-.BI bswap_32( x );
-.BI bswap_64( x );
+.BI "uint16_t bswap_16(uint16_t " x );
+.BI "uint32_t bswap_32(uint32_t " x );
+.BI "uint64_t bswap_64(uint64_t " x );
 .fi
 .SH DESCRIPTION
-These macros return a value in which the order of the bytes
+These functions return a value in which the order of the bytes
 in their 2-, 4-, or 8-byte arguments is reversed.
 .SH RETURN VALUE
-These macros return the value of their argument with the bytes reversed.
+These functions return the value of their argument with the bytes reversed.
 .SH ERRORS
-These macros always succeed.
+These functions always succeed.
 .SH CONFORMING TO
-These macros are GNU extensions.
+These functions are GNU extensions.
 .SH EXAMPLES
 The program below swaps the bytes of the 8-byte integer supplied as
 its command-line argument.
-- 
2.31.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux