3 .ds ;G \\*(;G\\f\\$1\\$3\\f\\$2
4 .if !
\a\\$4
\a\a .Af \\$2 \\$1 "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
7 .ie
\a\\$3
\a\a .ft \\$1
11 .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9"
16 .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
19 .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
22 .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7"
24 .de EX \" start example
41 swap \- integral representation conversion routines
43 .L "#include <swap.h>"
45 .L "int swapop(const void* internal, const void* external, int width);
46 .L "int_max swapget(int op, const void* from, int width);"
47 .L "void* swapput(int op, void* to, int width, int_max value);"
48 .L "void* swapmem(int op, const void* from, void* to, size_t n);"
50 These routines convert integral constants between internal and
51 external representations.
52 They are used to handle binary data generated by foreign programs.
53 New binary data representations should use the compact canonical form
62 returns the swap operation required to convert the
70 The swap operation is a bit mask:
73 No swapping necessary.
97 The largest native integral type is defined by the macro
107 byte integer in the buffer
127 bytes from the buffer