summaryrefslogtreecommitdiffstats
path: root/man3/endian.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/endian.3')
-rw-r--r--man3/endian.38
1 files changed, 4 insertions, 4 deletions
diff --git a/man3/endian.3 b/man3/endian.3
index 28f8fbee9..4d85cecd7 100644
--- a/man3/endian.3
+++ b/man3/endian.3
@@ -137,7 +137,7 @@ htobe32(x.u32) = 0x11223344
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
-
+\&
int
main(void)
{
@@ -145,16 +145,16 @@ main(void)
uint32_t u32;
uint8_t arr[4];
} x;
-
+\&
x.arr[0] = 0x11; /* Lowest\-address byte */
x.arr[1] = 0x22;
x.arr[2] = 0x33;
x.arr[3] = 0x44; /* Highest\-address byte */
-
+\&
printf("x.u32 = %#x\en", x.u32);
printf("htole32(x.u32) = %#x\en", htole32(x.u32));
printf("htobe32(x.u32) = %#x\en", htobe32(x.u32));
-
+\&
exit(EXIT_SUCCESS);
}
.EE