#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
-#include <setjmp.h>
#include <ortho/maze.h>
#include <ortho/fPQ.h>
#include <ortho/ortho.h>
Agedge_t* e;
} epair_t;
-static jmp_buf jbuf;
-
#ifdef DEBUG
static void emitSearchGraph (FILE* fp, sgraph* sg);
static void emitGraph (FILE* fp, maze* mp, size_t n_edges, route* route_list, epair_t[]);
* 0 if a crossing is unavoidable or there is no crossing at all or
* the segments are parallel,
* 1 if S1 HAS TO BE to the left/above S2 to avoid a crossing
+ * -2 if S1 and S2 are incomparable
*
* Note: This definition means horizontal segments have track numbers
* increasing as y decreases, while vertical segments have track numbers
{
if(S1->isVert!=S2->isVert||S1->comm_coord!=S2->comm_coord) {
agerr (AGERR, "incomparable segments !! -- Aborting\n");
- longjmp(jbuf, 1);
+ return -2;
}
if(S1->isVert)
return segCmp (S1, S2, B_RIGHT, B_LEFT);
mp->hchans = extractHChans (mp);
mp->vchans = extractVChans (mp);
assignSegs (n_edges, route_list, mp);
- if (setjmp(jbuf))
- goto orthofinish;
if (assignTracks(mp) != 0)
goto orthofinish;
#ifdef DEBUG