diff options
Diffstat (limited to 'source/blender/blenlib/intern/scanfill.c')
-rw-r--r-- | source/blender/blenlib/intern/scanfill.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/source/blender/blenlib/intern/scanfill.c b/source/blender/blenlib/intern/scanfill.c index 7896ebdd263..1978e7ed7d6 100644 --- a/source/blender/blenlib/intern/scanfill.c +++ b/source/blender/blenlib/intern/scanfill.c @@ -36,10 +36,10 @@ #include "BLI_math.h" /* callbacks for errors and interrupts and some goo */ -static void (*BLI_localErrorCallBack)(char*) = NULL; +static void (*BLI_localErrorCallBack)(const char*) = NULL; static int (*BLI_localInterruptCallBack)(void) = NULL; -void BLI_setErrorCallBack(void (*f)(char*)) +void BLI_setErrorCallBack(void (*f)(const char *)) { BLI_localErrorCallBack = f; } @@ -50,7 +50,7 @@ void BLI_setInterruptCallBack(int (*f)(void)) } /* just flush the error to /dev/null if the error handler is missing */ -void callLocalErrorCallBack(char* msg) +void callLocalErrorCallBack(const char* msg) { if (BLI_localErrorCallBack) { BLI_localErrorCallBack(msg); @@ -360,7 +360,7 @@ static ScFillVert *addedgetoscanlist(EditEdge *eed, int len) sc= (ScFillVert *)bsearch(&scsearch,scdata,len, sizeof(ScFillVert), vergscdata); - if(sc==0) printf("Error in search edge: %p\n",eed); + if(sc==0) printf("Error in search edge: %p\n", (void *)eed); else if(addedgetoscanvert(sc,eed)==0) return sc; return 0; @@ -465,8 +465,8 @@ static void splitlist(ListBase *tempve, ListBase *temped, short nr) EditVert *eve,*nextve; EditEdge *eed,*nexted; - addlisttolist(tempve,&fillvertbase); - addlisttolist(temped,&filledgebase); + BLI_movelisttolist(tempve,&fillvertbase); + BLI_movelisttolist(temped,&filledgebase); eve= tempve->first; while(eve) { @@ -499,9 +499,9 @@ static void scanfill(PolyFill *pf, int mat_nr) short nr, test, twoconnected=0; nr= pf->nr; - verts= pf->verts; /* PRINTS + verts= pf->verts; eve= fillvertbase.first; while(eve) { printf("vert: %x co: %f %f\n",eve,eve->co[cox],eve->co[coy]); @@ -558,7 +558,6 @@ static void scanfill(PolyFill *pf, int mat_nr) qsort(scdata, verts, sizeof(ScFillVert), vergscdata); - sc= scdata; eed= filledgebase.first; while(eed) { nexted= eed->next; @@ -747,7 +746,7 @@ static void scanfill(PolyFill *pf, int mat_nr) -int BLI_edgefill(int mode, int mat_nr) +int BLI_edgefill(int mat_nr) { /* - fill works with its own lists, so create that first (no faces!) @@ -1005,8 +1004,8 @@ int BLI_edgefill(int mode, int mat_nr) MEM_freeN(polycache); } - pf= pflist; /* printf("after merge\n"); + pf= pflist; for(a=1;a<=poly;a++) { printf("poly:%d edges:%d verts:%d flag: %d\n",a,pf->edges,pf->verts,pf->f); pf++; @@ -1029,8 +1028,8 @@ int BLI_edgefill(int mode, int mat_nr) } pf++; } - addlisttolist(&fillvertbase,&tempve); - addlisttolist(&filledgebase,&temped); + BLI_movelisttolist(&fillvertbase,&tempve); + BLI_movelisttolist(&filledgebase,&temped); /* FREE */ |