/* Read variable value to they destination based on the variable type  */
static int diva_trace_read_variable(diva_man_var_header_t *pVar, void *variable)
/* Read variable value to they destination based on the variable type  */
static int diva_trace_read_variable(diva_man_var_header_t *pVar, void *variable)
{
	switch (pVar->type) {
		case 0x03:
			return (diva_strace_read_asz  (pVar, (char*)variable));
		case 0x04:
			return (diva_strace_read_asc  (pVar, (char*)variable));
		case 0x05:
			return (diva_strace_read_ie  (pVar, (diva_trace_ie_t*)variable));
		case 0x81:
			return (diva_strace_read_int (pVar, (int*)variable));
		case 0x82:
			return (diva_strace_read_uint (pVar, (dword*)variable));
		case 0x83:
			return (diva_strace_read_uint (pVar, (dword*)variable));
		case 0x87:
			return (diva_strace_read_uint (pVar, (dword*)variable));
	}
	return (-1);
}