diff --git a/calma/CalmaWrite.c b/calma/CalmaWrite.c index aa05ce29..3fe6ebc7 100644 --- a/calma/CalmaWrite.c +++ b/calma/CalmaWrite.c @@ -122,22 +122,6 @@ extern void calmaRemoveDegenerate(BoundaryTop *blist); STACKPUSH((ClientData) (tp), SegStack); \ } -#define LB_EXTERNAL 0 /* Polygon external edge */ -#define LB_INTERNAL 1 /* Polygon internal edge */ -#define LB_INIT 2 /* Data not yet valid */ - -typedef struct LB1 { - char lb_type; /* Boundary Type (external or internal) */ - Point lb_start; /* Start point */ - struct LB1 *lb_next; /* Next point record */ -} LinkedBoundary; - -typedef struct BT1 { - LinkedBoundary *bt_first; /* Polygon list */ - int bt_points; /* Number of points in this list */ - struct BT1 *bt_next; /* Next polygon record */ -} BoundaryTop; - /*--------------------------------------------------------------*/ /* Number assigned to each cell */ diff --git a/calma/CalmaWriteZ.c b/calma/CalmaWriteZ.c index c4feebfc..557541b4 100644 --- a/calma/CalmaWriteZ.c +++ b/calma/CalmaWriteZ.c @@ -129,22 +129,6 @@ extern void calmaOutR8Z(double d, gzFile f); STACKPUSH((ClientData) (tp), SegStack); \ } -#define LB_EXTERNAL 0 /* Polygon external edge */ -#define LB_INTERNAL 1 /* Polygon internal edge */ -#define LB_INIT 2 /* Data not yet valid */ - -typedef struct LB1 { - char lb_type; /* Boundary Type (external or internal) */ - Point lb_start; /* Start point */ - struct LB1 *lb_next; /* Next point record */ -} LinkedBoundary; - -typedef struct BT1 { - LinkedBoundary *bt_first; /* Polygon list */ - int bt_points; /* Number of points in this list */ - struct BT1 *bt_next; /* Next polygon record */ -} BoundaryTop; - /* -------------------------------------------------------------------- */ /* diff --git a/calma/calma.h b/calma/calma.h index b331f141..d5f6363e 100644 --- a/calma/calma.h +++ b/calma/calma.h @@ -68,7 +68,6 @@ extern bool CalmaGenerateArray(FILE *f, TileType type, int llx, int lly, int pit extern void CalmaReadError(char *format, ...); /* C99 compat */ -extern int calmaAddSegment(LinkedBoundary **lbptr, int poly_edge, int p1x, int p1y, int p2x, int p2y); extern void calmaDelContacts(void); extern void calmaElementBoundary(void); extern void calmaElementBox(void); @@ -92,9 +91,6 @@ extern bool calmaSkipBytes(int nbytes); extern bool calmaSkipExact(int type); extern bool calmaSkipTo(int what); extern void calmaUnexpected(int wanted, int got); -extern void calmaMergeSegments(LinkedBoundary *edge, BoundaryTop **blist, int num_points); -extern void calmaRemoveDegenerate(BoundaryTop *blist); -extern void calmaRemoveColinear(BoundaryTop *blist); #ifdef HAVE_ZLIB extern bool CalmaWriteZ(CellDef *rootDef, gzFile f); diff --git a/calma/calmaInt.h b/calma/calmaInt.h index dfc739e3..cf3b90e0 100644 --- a/calma/calmaInt.h +++ b/calma/calmaInt.h @@ -241,6 +241,28 @@ extern bool calmaParseUnits(void); extern int compport(const void *one, const void *two); + +#define LB_EXTERNAL 0 /* Polygon external edge */ +#define LB_INTERNAL 1 /* Polygon internal edge */ +#define LB_INIT 2 /* Data not yet valid */ + +typedef struct LB1 { + char lb_type; /* Boundary Type (external or internal) */ + Point lb_start; /* Start point */ + struct LB1 *lb_next; /* Next point record */ +} LinkedBoundary; + +typedef struct BT1 { + LinkedBoundary *bt_first; /* Polygon list */ + int bt_points; /* Number of points in this list */ + struct BT1 *bt_next; /* Next polygon record */ +} BoundaryTop; + +extern int calmaAddSegment(LinkedBoundary **lbptr, bool poly_edge, int p1x, int p1y, int p2x, int p2y); +extern void calmaMergeSegments(LinkedBoundary *edge, BoundaryTop **blist, int num_points); +extern void calmaRemoveDegenerate(BoundaryTop *blist); +extern void calmaRemoveColinear(BoundaryTop *blist); + /* ------------------- Imports from CIF reading ----------------------- */ extern CellDef *cifReadCellDef;