1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2025-01-03 20:00:14 +02:00

poly2d/f2d_tri.c (f2d_free_all): free list of faces

This commit is contained in:
Werner Almesberger 2013-10-13 22:09:49 -03:00
parent d0b5696a07
commit ca271dd313
2 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,8 @@
*/
#include <stdlib.h>
#include "poly2d.h"
#include "p2d_hsort.h"
@ -40,3 +42,15 @@ struct f2d *f2d_tri(const struct p2d *p)
p2d_hier_free(t, 0);
return res;
}
void f2d_free_all(struct f2d *f)
{
struct f2d *next;
while (f) {
next = f->next;
free(f);
f = next;
}
}

View File

@ -171,6 +171,7 @@ void f2d_tri_holes_append(const struct p2d *p, const struct p2d *holes,
struct f2d ***last);
struct f2d *f2d_tri_holes(const struct p2d *p, const struct p2d *holes);
struct f2d *f2d_tri(const struct p2d *p);
void f2d_free_all(struct f2d *f);
struct p2d *p2d_read_gnuplot(FILE *file);
int p2d_write_gnuplot(FILE *file, const struct p2d *p);