You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-misc/nut/files/nut-16.5-int.patch

101 lines
3.0 KiB

diff --git a/fltk/FoodRanking.cc b/fltk/FoodRanking.cc
index 8b78006..9b06e67 100644
--- a/fltk/FoodRanking.cc
+++ b/fltk/FoodRanking.cc
@@ -33,7 +33,7 @@ static FoodRanking *who_we_are;
static void the_cb(Fl_Widget *which, void *one)
{
-the_ranking = (int) one;
+the_ranking = *((int *) one);
food_group = -1;
minimize = -1;
who_we_are->initial_meal_add = 1;
diff --git a/fltk/MissMealWidget.cc b/fltk/MissMealWidget.cc
index fa6d879..be2b88a 100644
--- a/fltk/MissMealWidget.cc
+++ b/fltk/MissMealWidget.cc
@@ -31,7 +31,7 @@ static MealValueOutput *mvo;
static void missing_meal_cb(Fl_Widget *which, void *choice)
{
-int meal = (int) choice;
+int meal = *((int *) choice);
mvo->set_value(current_meal_date,meal);
}
diff --git a/fltk/PersonalOptions.cc b/fltk/PersonalOptions.cc
index 424044b..197b892 100644
--- a/fltk/PersonalOptions.cc
+++ b/fltk/PersonalOptions.cc
@@ -33,7 +33,7 @@ DVValueOutput *cvo, *ovo, *lvo, *mvo, *svo, *fvo, *nvo, *pvo;
static void lock_cb(Fl_Widget *w, void *data)
{
Fl_Light_Button *lb = (Fl_Light_Button *) w;
-int nut = (int) data;
+int nut = *((int *) data);
double value = lb->value();
options.locknuts[nut] = value;
if (nut == ENERC_KCAL) options.autocal = 0;
diff --git a/fltk/RecordMeals.cc b/fltk/RecordMeals.cc
index d44b9b6..31f368a 100644
--- a/fltk/RecordMeals.cc
+++ b/fltk/RecordMeals.cc
@@ -35,7 +35,7 @@ static bool user_has_spoken;
static void meals_per_day_cb(Fl_Widget *which, void *choice)
{
-int meals_per_day = (int) choice;
+int meals_per_day = *((int *) choice);
delete_meals(0);
write_meal_db();
options.mealsperday = meals_per_day;
diff --git a/fltk/ServingMenuButton.cc b/fltk/ServingMenuButton.cc
index 1ca0c5a..a1cca3e 100644
--- a/fltk/ServingMenuButton.cc
+++ b/fltk/ServingMenuButton.cc
@@ -37,7 +37,7 @@ static struct food *current_foodptr;
void menu_callback(Fl_Widget *which, void *n)
{
-int num = (int) n;
+int num = *((int *) n);
if (num > 0)
{
big_label = result[3*num-2];
diff --git a/fltk/TheStory.cc b/fltk/TheStory.cc
index 1db27f5..90c3c3f 100644
--- a/fltk/TheStory.cc
+++ b/fltk/TheStory.cc
@@ -30,7 +30,7 @@ static TheStory *who_we_are;
void food_group_selector(Fl_Widget *which, void *what)
{
-who_we_are->set_food_group((int) what);
+who_we_are->set_food_group(*((int *) what));
}
TheStory::TheStory (int x, int y, int w, int h, Fl_Color widgetcolor) : Fl_Wizard (x, y, w, h)
diff --git a/fltk/TheUsualMenuButton.cc b/fltk/TheUsualMenuButton.cc
index 84d77fc..0f59009 100644
--- a/fltk/TheUsualMenuButton.cc
+++ b/fltk/TheUsualMenuButton.cc
@@ -33,7 +33,7 @@ static struct meal *theusual_ptrs[101];
void add_to_meal_cb(Fl_Widget* whomever, void* whatever)
{
-int choice = (int) whatever;
+int choice = *((int *) whatever);
rm->add_theusual(theusual_ptrs[choice]);
}
@@ -44,7 +44,7 @@ rm->new_customary_meal_phase_one();
void delete_cb(Fl_Widget* whomever, void* whatever)
{
-int choice = (int) whatever;
+int choice = *((int *) whatever);
theusualobj[theusualobjcount-1]->delete_it(theusual_ptrs[choice]);
}