89 |
|
|
90 |
/* Swap bytes *A and *B. */ |
/* Swap bytes *A and *B. */ |
91 |
static inline void |
static inline void |
92 |
bswap (unsigned char *a, unsigned char *b) |
bswap (char *a, char *b) |
93 |
{ |
{ |
94 |
unsigned char t = *a; |
char t = *a; |
95 |
*a = *b; |
*a = *b; |
96 |
*b = t; |
*b = t; |
97 |
} |
} |
100 |
static inline void |
static inline void |
101 |
bswap_int32 (int32 *x_) |
bswap_int32 (int32 *x_) |
102 |
{ |
{ |
103 |
unsigned char *x = (unsigned char *) x_; |
char *x = (char *) x_; |
104 |
bswap (x + 0, x + 3); |
bswap (x + 0, x + 3); |
105 |
bswap (x + 1, x + 2); |
bswap (x + 1, x + 2); |
106 |
} |
} |
109 |
static inline void |
static inline void |
110 |
bswap_flt64 (flt64 *x_) |
bswap_flt64 (flt64 *x_) |
111 |
{ |
{ |
112 |
unsigned char *x = (unsigned char *) x_; |
char *x = (char *) x_; |
113 |
bswap (x + 0, x + 7); |
bswap (x + 0, x + 7); |
114 |
bswap (x + 1, x + 6); |
bswap (x + 1, x + 6); |
115 |
bswap (x + 2, x + 5); |
bswap (x + 2, x + 5); |
945 |
if (vv->type == NUMERIC) |
if (vv->type == NUMERIC) |
946 |
mv_add_num (&vv->miss, mv[j]); |
mv_add_num (&vv->miss, mv[j]); |
947 |
else |
else |
948 |
mv_add_str (&vv->miss, (unsigned char *) &mv[j]); |
mv_add_str (&vv->miss, (char *) &mv[j]); |
949 |
} |
} |
950 |
else |
else |
951 |
{ |
{ |
1036 |
{ |
{ |
1037 |
struct label |
struct label |
1038 |
{ |
{ |
1039 |
unsigned char raw_value[8]; /* Value as uninterpreted bytes. */ |
char raw_value[8]; /* Value as uninterpreted bytes. */ |
1040 |
union value value; /* Value. */ |
union value value; /* Value. */ |
1041 |
char *label; /* Null-terminated label string. */ |
char *label; /* Null-terminated label string. */ |
1042 |
}; |
}; |
1166 |
|
|
1167 |
if (var[0]->type == ALPHA) |
if (var[0]->type == ALPHA) |
1168 |
{ |
{ |
1169 |
const int copy_len = min (sizeof (label->raw_value), |
const int copy_len = min (sizeof label->raw_value, |
1170 |
sizeof (label->label)); |
sizeof label->label); |
1171 |
memcpy (label->value.s, label->raw_value, copy_len); |
memcpy (label->value.s, label->raw_value, copy_len); |
1172 |
} else { |
} else { |
1173 |
flt64 f; |
flt64 f; |