From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/mach-swap.html | 124 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 man/man3/mach-swap.html (limited to 'man/man3/mach-swap.html') diff --git a/man/man3/mach-swap.html b/man/man3/mach-swap.html new file mode 100644 index 00000000..5eefd9d6 --- /dev/null +++ b/man/man3/mach-swap.html @@ -0,0 +1,124 @@ + +mach-swap(3) - Plan 9 from User Space + + + + +
+
+
MACH-SWAP(3)MACH-SWAP(3) +
+
+

NAME
+ +
+ + beswap2, beswap4, beswap8, beieeeftoa32, beieeeftoa64, beieeeftoa80, + beload2, beload4, beload8, leswap2, leswap4, leswap8, leieeeftoa32, + leieeeftoa64, leieeeftoa80, leload2, leload4, leload8, ieeeftoa32, + ieeeftoa64 – machine-independent access to byte-ordered data
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h>
+ #include <mach.h> +
+
+ u16int beswap2(u16int u)
+
u32int    beswap4(u32int u)
+ u64int    beswap8(u64int u) +
+ + int     beieeeftoa32(char *a, uint n, void *f)
+
int      beieeeftoa64(char *a, uint n, void *f)
+ int      beieeeftoa80(char *a, uint n, void *f) +
+ + u16int beload2(uchar *p)
+
u32int    beload4(uchar *p)
+ u64int    beload8(uchar *p) +
+ + u16int leswap2(u16int u)
+
u32int    leswap4(u32int u)
+ u64int    leswap8(u64int u) +
+ + int     leieeeftoa32(char *a, uint n, void *f)
+
int      leieeeftoa64(char *a, uint n, void *f)
+ int      leieeeftoa80(char *a, uint n, void *f) +
+ + u16int leload2(uchar *p)
+
u32int    leload4(uchar *p)
+ u64int    leload8(uchar *p) +
+ + int     ieeeftoa32(char *a, uint n, u32int u)
+
int      ieeeftoa64(char *a, uint n, u32int hi, u32int lo)
+ +
+

DESCRIPTION
+ +
+ + These functions provide machine-independent access to data in + a particular byte order. +
+ + Beswap2, beswap4, and beswap8 return the 2-byte, 4-byte, and 8-byte + big-endian representation of the bytes in val, respectively. +
+ + Beload2, beload4, and beload8 return the 2-byte, 4-byte, and 8-byte + big-endian interpretation of the bytes at p, respectively. +
+ + Beieeeftoa32, beieeeftoa64, and beieeeftoa80 format the big-endian + 4-byte, 8-byte, or 10-byte IEEE floating-point value at f into + the n-byte string buffer a. +
+ + Leswap2, leswap4, etc. are the little-endian equivalents of the + routines just described. +
+ + Ieeeftoa32 and ieeeftoa64 format a local machine byte-order floating-point + value into the n-byte string buffer a. Ieeeftoa32 expects a 32-bit + floating-point value stored in the bits of u. Ieeeftoa64 expects + a 64-bit floating-point value whose high 32-bits are in hi and + low 32-bits are in lo. + +
+

SOURCE
+ +
+ + /usr/local/plan9/src/libmach
+
+
+

SEE ALSO
+ +
+ + mach(3)
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3