#define debug 0
#endif
-static void trap(void)
+static void _trap(int line)
{
- if (debug)
+ if (debug) {
+ printf("Trapped from line %d, use debugger to get backtrace\n",
+ line);
+ fflush(stdout);
exit(1);
+ }
}
+#define trap() _trap(__LINE__)
+
static int quadtree_compare_coord(const struct vector *a,
const struct vector *b)
{