#include #include #include void recurse_list(int flag, int *cells, int sz, int start) { int cnt,i,j,ii,jj; i=cells[start]; j=cells[start+1]; cells[start+2]=flag; for (cnt=0;cnt=0)continue; cells[found++]=i; cells[found++]=j; cells[found++]=0; if(found >= cellsz) { cellsz+=3*ns; cells=(int *)G_realloc (cells,cellsz*sizeof(int)); } } } if(found==0)return 0; /* Loop through the list, assigning polygon numbers to unassigned entries and carrying the same assignment over to adjacent cells. Repeat recursively */ flag=0; for(i=0;i