Lines Matching refs:to
4 * The contents of this file are subject to the terms of the
43 * The following macros are used to generate architecture-specific
50 #define DECODE_SHORT(from, to) *((short *)(to)) = *((short *)(from))
51 #define DECODE_LONG(from, to) *((long *)(to)) = *((long *)(from))
52 #define DECODE_FLOAT(from, to) *((float *)(to)) = *((float *)(from))
53 #define DECODE_DOUBLE(from, to) *((double *)(to)) = *((double *)(from))
57 #define DECODE_SHORT(from, to) \
58 ((char *)(to))[0] = ((char *)(from))[1]; \
59 ((char *)(to))[1] = ((char *)(from))[0];
60 #define DECODE_LONG(from, to) \
61 ((char *)(to))[0] = ((char *)(from))[3]; \
62 ((char *)(to))[1] = ((char *)(from))[2]; \
63 ((char *)(to))[2] = ((char *)(from))[1]; \
64 ((char *)(to))[3] = ((char *)(from))[0];
66 #define DECODE_FLOAT(from, to) DECODE_LONG((to), (from))
68 #define DECODE_DOUBLE(from, to) \
69 ((char *)(to))[0] = ((char *)(from))[7]; \
70 ((char *)(to))[1] = ((char *)(from))[6]; \
71 ((char *)(to))[2] = ((char *)(from))[5]; \
72 ((char *)(to))[3] = ((char *)(from))[4]; \
73 ((char *)(to))[4] = ((char *)(from))[3]; \
74 ((char *)(to))[5] = ((char *)(from))[2]; \
75 ((char *)(to))[6] = ((char *)(from))[1]; \
76 ((char *)(to))[7] = ((char *)(from))[0];
80 /* Most architectures are symmetrical with respect to conversions. */
82 #define ENCODE_SHORT(from, to) DECODE_SHORT((from), (to))
83 #define ENCODE_LONG(from, to) DECODE_LONG((from), (to))
84 #define ENCODE_FLOAT(from, to) DECODE_FLOAT((from), (to))
85 #define ENCODE_DOUBLE(from, to) DECODE_DOUBLE((from), (to))