|
@@ -84,12 +84,16 @@ static int write_bnd(struct COOR *line_begin, struct COOR *line_end, /* start an
|
|
|
int n /* number of points to write */
|
|
|
)
|
|
|
{
|
|
|
- struct line_pnts *points = Vect_new_line_struct();
|
|
|
+ static struct line_pnts *points = NULL;
|
|
|
double x;
|
|
|
double y;
|
|
|
struct COOR *p, *last;
|
|
|
int i;
|
|
|
|
|
|
+ if (!points)
|
|
|
+ points = Vect_new_line_struct();
|
|
|
+ Vect_reset_line(points);
|
|
|
+
|
|
|
n++; /* %% 6.4.88 */
|
|
|
|
|
|
p = line_begin;
|
|
@@ -157,13 +161,17 @@ static int write_smooth_bnd(struct COOR *line_begin, struct COOR *line_end, /* s
|
|
|
int n /* number of points to write */
|
|
|
)
|
|
|
{
|
|
|
- struct line_pnts *points = Vect_new_line_struct();
|
|
|
+ static struct line_pnts *points = NULL;
|
|
|
double x, y;
|
|
|
double dx, dy;
|
|
|
int idx, idy;
|
|
|
struct COOR *p, *last;
|
|
|
int i, total;
|
|
|
|
|
|
+ if (!points)
|
|
|
+ points = Vect_new_line_struct();
|
|
|
+ Vect_reset_line(points);
|
|
|
+
|
|
|
n++; /* %% 6.4.88 */
|
|
|
|
|
|
p = line_begin;
|