[go: up one dir, main page]

File: add_circles.c

package info (click to toggle)
circlepack 5.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, lenny, sarge
  • size: 2,828 kB
  • ctags: 1,683
  • sloc: ansic: 43,152; makefile: 46
file content (23 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include "cp_types.h"
#include "cp_proto.h"

/* add vertices to bdry verts in string. Lose edge data. */

int add_circles(struct p_data *p,char *datastr)
{
  int count=0,hits;
  char *endptr;
  struct Vertlist *vertlist,*trace;

  if ( (vertlist=Node_link_parse(p,datastr,&endptr,&hits,
		 &Vlist,&Elist,&Flist,&region,pathlist,pathlength)) != NULL)
    {
      trace=vertlist;
      do {
	count += add_vert(p,trace->v);
	trace=trace->next;
      } while (trace!=NULL);
      vert_free(&vertlist);
    }
  return count;
} /* add_circles */