Graphviz  2.41.20171026.1811
Macros | Functions
util.c File Reference
#include <assert.h>
#include <stdlib.h>
#include "pathutil.h"
Include dependency graph for util.c:

Go to the source code of this file.

Macros

#define ALLOC(size, ptr, type)   (ptr? (type*)realloc(ptr,(size)*sizeof(type)):(type*)malloc((size)*sizeof(type)))
 

Functions

Ppoly_t copypoly (Ppoly_t argpoly)
 
void freePath (Ppolyline_t *p)
 
void freepoly (Ppoly_t argpoly)
 
int Ppolybarriers (Ppoly_t **polys, int npolys, Pedge_t **barriers, int *n_barriers)
 
void make_polyline (Ppolyline_t line, Ppolyline_t *sline)
 

Macro Definition Documentation

#define ALLOC (   size,
  ptr,
  type 
)    (ptr? (type*)realloc(ptr,(size)*sizeof(type)):(type*)malloc((size)*sizeof(type)))

Definition at line 23 of file util.c.

Referenced by make_polyline().

Function Documentation

Ppoly_t copypoly ( Ppoly_t  argpoly)

Definition at line 25 of file util.c.

References Ppoly_t::pn, and Ppoly_t::ps.

void freePath ( Ppolyline_t p)

Definition at line 37 of file util.c.

References Ppoly_t::ps.

Referenced by wedgedEllipse().

void freepoly ( Ppoly_t  argpoly)

Definition at line 43 of file util.c.

References Ppoly_t::ps.

void make_polyline ( Ppolyline_t  line,
Ppolyline_t sline 
)

Definition at line 82 of file util.c.

References ALLOC, Ppoly_t::pn, and Ppoly_t::ps.

Referenced by makeStraightEdges(), and simpleSplineRoute().

int Ppolybarriers ( Ppoly_t **  polys,
int  npolys,
Pedge_t **  barriers,
int n_barriers 
)

Definition at line 48 of file util.c.

References Pedge_t::a, assert, Pedge_t::b, Ppoly_t::pn, and Ppoly_t::ps.