#include <sys/time.h>
{
memset(mem, 0, type->value_size);
}
{
}
{
struct timezone *tzsrc = (struct timezone *)src;
struct timezone *tzdst = dst;
*tzdst = *tzsrc;
}
static int
{
struct timezone tza = *(struct timezone*)a;
struct timezone tzb = *(struct timezone*)b;
if (tza.tz_minuteswest < tzb.tz_minuteswest)
return -1;
else if (tza.tz_minuteswest > tzb.tz_minuteswest)
return 1;
return 0;
}
{
*(struct timezone*)mem = *(struct timezone*)ptr;
}
{
const struct timezone tz = va_arg(args, struct timezone);
return _tz_pset(type, mem, &tz);
}
{
memcpy(ptr, mem, type->value_size);
}
{
struct timezone v = *(struct timezone*)type_mem;
{
unsigned char other_mem = v.tz_minuteswest;
}
{
unsigned short other_mem = v.tz_minuteswest;
}
{
unsigned int other_mem = v.tz_minuteswest;
}
{
unsigned long other_mem = v.tz_minuteswest;
}
{
uint64_t other_mem = v.tz_minuteswest;
}
{
char other_mem = v.tz_minuteswest;
}
{
short other_mem = v.tz_minuteswest;
}
{
int other_mem = v.tz_minuteswest;
}
{
long other_mem = v.tz_minuteswest;
}
{
int64_t other_mem = v.tz_minuteswest;
}
{
const char *other_mem;
char buf[64];
snprintf(buf, sizeof(buf), "%d", v.tz_minuteswest);
other_mem = buf;
}
}
sizeof(struct timezone),
"struct timezone",
_tz_setup,
_tz_flush,
_tz_copy,
_tz_compare,
_tz_convert_to,
NULL,
_tz_vset,
_tz_pset,
_tz_pget
};
{
struct timeval tv;
struct timezone tz;
char *s;
gettimeofday(&tv, &tz);
printf("time: %s\n", s);
free(s);
printf("timezone: %s\n", s);
free(s);
}
EINA_API int eina_shutdown(void)
Shuts down the Eina library.
Definition: eina_main.c:379
EINA_API int eina_init(void)
Initializes the Eina library.
Definition: eina_main.c:291
#define EINA_TRUE
boolean value TRUE (numerical value 1)
Definition: eina_types.h:539
#define EINA_FALSE
boolean value FALSE (numerical value 0)
Definition: eina_types.h:533
unsigned char Eina_Bool
Type to mimic a boolean.
Definition: eina_types.h:527
#define EINA_UNUSED
Used to indicate that a function parameter is purposely unused.
Definition: eina_types.h:339
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_CHAR
manages char type.
Definition: eina_value.c:5600
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_TIMEVAL
manages 'struct timeval' type
Definition: eina_value.c:5612
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_INT64
manages integer of 64 bits type.
Definition: eina_value.c:5604
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_INT
manages int type.
Definition: eina_value.c:5602
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_UINT
manages unsigned int type.
Definition: eina_value.c:5596
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_TIMESTAMP
manages unsigned long type used for timestamps.
Definition: eina_value.c:5598
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_USHORT
manages unsigned short type.
Definition: eina_value.c:5595
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_UCHAR
manages unsigned char type.
Definition: eina_value.c:5593
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_SHORT
manages short type.
Definition: eina_value.c:5601
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_STRING
manages string type.
Definition: eina_value.c:5608
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_DOUBLE
manages double type.
Definition: eina_value.c:5606
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_STRINGSHARE
manages stringshared string type.
Definition: eina_value.c:5607
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_FLOAT
manages float type.
Definition: eina_value.c:5605
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_ULONG
manages unsigned long type.
Definition: eina_value.c:5597
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_UINT64
manages unsigned integer of 64 bits type.
Definition: eina_value.c:5599
EINA_API const Eina_Value_Type * EINA_VALUE_TYPE_LONG
manages long type.
Definition: eina_value.c:5603
#define EINA_VALUE_TYPE_VERSION
Current API version, used to validate type.
Definition: eina_value.h:3669
static Eina_Bool eina_value_type_pset(const Eina_Value_Type *type, void *mem, const void *ptr)
Sets memory using type descriptor and pointer.
EINA_API void eina_value_free(Eina_Value *value)
Frees value and its data.
Definition: eina_value.c:5645
EINA_API char * eina_value_to_string(const Eina_Value *value)
Converts value to string.
Definition: eina_value.c:5719
static Eina_Bool eina_value_set(Eina_Value *value,...)
Sets the generic value.
static Eina_Bool eina_value_setup(Eina_Value *value, const Eina_Value_Type *type)
Initializes generic value storage.
API to access values.
Definition: eina_value.h:3678
defines the contents of a value
Definition: eina_value.h:662