31 for (i = 0; i < npolys; i++) {
32 assert(polys[i]->pn <= INT_MAX);
33 n += (int)polys[i]->pn;
39 for (i = 0; i < npolys; i++) {
41 for (
size_t j = 0; j < pp.
pn; j++) {
61 static size_t isz = 0;
63 const size_t npts = 4 + 3 * (line.
pn - 2);
72 ispline[j+1] = ispline[j] = line.
ps[i];
75 for (; i + 1 < line.
pn; i++) {
76 ispline[j+2] = ispline[j+1] = ispline[j] = line.
ps[i];
79 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)