#define PTS_NODE struct pts_node #define SEG_NODE struct seg_node #define BND_NODE struct bnd_node #define GEO_NODE struct geo_node #define FOR_ALL_BOUNDARIES(g) for((g)=geo_list; (g) != NULL; (g) = (g)->next) #define FOR_ALL_POINTS(g) for((g) = pts_list; (g) != NULL; (g) = (g)->next) #define FOR_ALL_SEGMENTS(geo, s) for((s) = (geo)->bnd_list; (s) != NULL; (s) = (s)->next) PTS_NODE { PTS_NODE *next; PTS_NODE *prev; int n; int x; int y; int id; float physicalX; float physicalY; }; SEG_NODE { SEG_NODE *next; SEG_NODE *prev; int n; PTS_NODE *pts1; PTS_NODE *pts2; int id; }; BND_NODE { BND_NODE *next; BND_NODE *prev; SEG_NODE *seg; }; GEO_NODE { GEO_NODE *next; GEO_NODE *prev; BND_NODE *bnd_list; int type; }; PTS_NODE *pts_list ; PTS_NODE *pts; SEG_NODE *seg_list ; SEG_NODE *seg; BND_NODE *bnd_list ; BND_NODE *bnd; GEO_NODE *geo_list ; GEO_NODE *geo; PTS_NODE *add_pnt(float x, float y); PTS_NODE *get_pts_pointer(int id); void mv_pnt(float x, float y, float xnew, float ynew); void add_seg(PTS_NODE *pts1, PTS_NODE *pts2, GEO_NODE *bnd); void add_seg2(int seg_id, GEO_NODE *bnd); GEO_NODE *new_bnd(); void rm_bnd(GEO_NODE *this); int number_of_boundaries(); int number_of_points(); int number_of_segments(GEO_NODE *g);