summaryrefslogtreecommitdiff
path: root/gui/input.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-23 14:46:04 -0300
commitf5fa04cbf3ac9011f4f144cd68543f8d9536e3fd (patch)
treeac9160ef7ef5963e296144fb75845db56ba62e7c /gui/input.c
parent061dd9094a903be73e3aa7a65aafb8bcb70010b7 (diff)
downloadeeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.gz
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.tar.bz2
eeshow-f5fa04cbf3ac9011f4f144cd68543f8d9536e3fd.zip
misc/diag.h (BUG): more useful diagnostics; replace all "abort" with it
Diffstat (limited to 'gui/input.c')
-rw-r--r--gui/input.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gui/input.c b/gui/input.c
index b8d388f..f005527 100644
--- a/gui/input.c
+++ b/gui/input.c
@@ -65,7 +65,7 @@ static const char *state(void)
case input_dragging:
return "DRAGGING";
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
}
@@ -133,7 +133,7 @@ static void hover_update(int x, int y)
break;
case input_dragging:
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
if (sp->ops->hover_end)
@@ -164,7 +164,7 @@ void input_update(void)
case input_dragging:
break;
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
}
@@ -210,7 +210,7 @@ static gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event,
clicked_y = event->y;
break;
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
return TRUE;
}
@@ -244,7 +244,7 @@ static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event,
clicked_y = event->y;
break;
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
return TRUE;
@@ -294,7 +294,7 @@ static gboolean button_release_event(GtkWidget *widget, GdkEventButton *event,
}
break;
default:
- abort();
+ BUG("invalid state %d", sp->state);
}
return TRUE;