/* dst.flags must be set beforehand */ void uservalue2value(value_t *dst, const uservalue_t *src) { if(dst->flags.u8b) set_u8b(dst, get_u8b(src)); if(dst->flags.s8b) set_s8b(dst, get_s8b(src)); if(dst->flags.u16b) set_u16b(dst, get_u16b(src)); if(dst->flags.s16b) set_s16b(dst, get_s16b(src)); if(dst->flags.u32b) set_u32b(dst, get_u32b(src)); if(dst->flags.s32b) set_s32b(dst, get_s32b(src)); if(dst->flags.u64b) set_u64b(dst, get_u64b(src)); if(dst->flags.s64b) set_s64b(dst, get_s64b(src)); /* I guess integer and float cannot be matched together */ if(dst->flags.f32b) set_f32b(dst, get_f32b(src)); if(dst->flags.f64b) set_f64b(dst, get_f64b(src)); }
/* * Hack -- get data from the current block */ static void get_s32b(s32b *ip) { get_u32b((u32b*)ip); }