Make all tests in libdialog compilable.

Fix coredump in menu3.c.

Approved by:	kib (mentor)
This commit is contained in:
Andrey V. Elsukov 2010-06-15 10:01:49 +00:00
parent 8284562954
commit 516ce862b0
4 changed files with 7 additions and 7 deletions

View File

@ -47,13 +47,13 @@ static int spending;
static int
check(dialogMenuItem *self)
{
return ((int)self->data == spending);
return ((int)(intptr_t)self->data == spending);
}
static int
spend(dialogMenuItem *self)
{
spending = (int)self->data;
spending = (int)(intptr_t)self->data;
return DITEM_SUCCESS | DITEM_REDRAW;
}

View File

@ -44,7 +44,7 @@ maybe(dialogMenuItem *self)
static char *insurance[] = {
"1,000,000", "Mondo insurance policy", "Off",
"5,000,000", "Mega insurance policy", "Off",
"10,000,000", "Friend! Most Favored customer!"
"10,000,000", "Friend! Most Favored customer!", "On"
};
static void

View File

@ -31,13 +31,13 @@ static int spending;
static int
check(dialogMenuItem *self)
{
return ((int)self->data == spending);
return ((int)(intptr_t)self->data == spending);
}
static int
spend(dialogMenuItem *self)
{
spending = (int)self->data;
spending = (int)(intptr_t)self->data;
return DITEM_SUCCESS | DITEM_REDRAW;
}

View File

@ -31,13 +31,13 @@ static int spending;
static int
check(dialogMenuItem *self)
{
return ((int)self->data == spending);
return ((int)(intptr_t)self->data == spending);
}
static int
spend(dialogMenuItem *self)
{
spending = (int)self->data;
spending = (int)(intptr_t)self->data;
return DITEM_SUCCESS | DITEM_REDRAW;
}