32 for (i = 0; i < npolys; i++) {
33 assert(polys[i]->pn <= INT_MAX);
34 n += (int)polys[i]->pn;
40 for (i = 0; i < npolys; i++) {
42 for (
size_t j = 0; j < pp.
pn; j++) {
62 static size_t isz = 0;
64 const size_t npts = 4 + 3 * (line.
pn - 2);
73 ispline[j+1] = ispline[j] = line.
ps[i];
76 for (; i + 1 < line.
pn; i++) {
77 ispline[j+2] = ispline[j+1] = ispline[j] = line.
ps[i];
80 ispline[j+1] = ispline[j] = line.
ps[i];
Memory allocation wrappers that exit on failure.
static void * gv_recalloc(void *ptr, size_t old_nmemb, size_t new_nmemb, size_t size)
static void * gv_calloc(size_t nmemb, size_t size)
void make_polyline(Ppolyline_t line, Ppolyline_t *sline)
void freePath(Ppolyline_t *p)
int Ppolybarriers(Ppoly_t **polys, int npolys, Pedge_t **barriers, int *n_barriers)