From: Erwin Janssen Date: Sun, 18 Dec 2016 14:31:15 +0000 (+0100) Subject: Remove cdt/dttreeset.c, not present in newest CDT X-Git-Tag: 2.42.0~213^2~4^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=deddf916994706aa89eb242a19fb1cb5debd2a74;p=graphviz Remove cdt/dttreeset.c, not present in newest CDT The code file dttreeset.c is not present in the most recent version of CDT, it also isn't used by Graphviz, so it can be removed. --- diff --git a/lib/cdt/Makefile.am b/lib/cdt/Makefile.am index e99b3e1cf..4945f8d34 100644 --- a/lib/cdt/Makefile.am +++ b/lib/cdt/Makefile.am @@ -19,7 +19,7 @@ pkgconfig_DATA = libcdt.pc libcdt_C_la_SOURCES = dtclose.c dtdisc.c dtextract.c dtflatten.c \ dthash.c dtlist.c dtmethod.c dtopen.c dtrenew.c dtrestore.c dtsize.c \ - dtstat.c dtstrhash.c dttree.c dttreeset.c dtview.c dtwalk.c + dtstat.c dtstrhash.c dttree.c dtview.c dtwalk.c libcdt_la_LDFLAGS = -version-info $(CDT_VERSION) -no-undefined libcdt_la_SOURCES = $(libcdt_C_la_SOURCES) diff --git a/lib/cdt/cdt.vcxproj b/lib/cdt/cdt.vcxproj index d44b5cd83..28f727d02 100644 --- a/lib/cdt/cdt.vcxproj +++ b/lib/cdt/cdt.vcxproj @@ -113,7 +113,6 @@ - diff --git a/lib/cdt/cdt.vcxproj.filters b/lib/cdt/cdt.vcxproj.filters index b0b51aa8d..ccfc8f122 100644 --- a/lib/cdt/cdt.vcxproj.filters +++ b/lib/cdt/cdt.vcxproj.filters @@ -70,9 +70,6 @@ Source Files - - Source Files - Source Files diff --git a/lib/cdt/dttreeset.c b/lib/cdt/dttreeset.c deleted file mode 100644 index 4a73b9801..000000000 --- a/lib/cdt/dttreeset.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "dthdr.h" - -/* Set attributes of a tree. -** -** Written by Kiem-Phong Vo (09/17/2001) -*/ - -static Dtlink_t* treebalance(Dtlink_t* list, int size) -{ - int n; - Dtlink_t *l, *mid; - - if(size <= 2) - return list; - - for(l = list, n = size/2 - 1; n > 0; n -= 1) - l = l->right; - - mid = l->right; l->right = NIL(Dtlink_t*); - mid->left = treebalance(list, (n = size/2) ); - mid->right = treebalance(mid->right, size - (n + 1)); - return mid; -} - -int dttreeset(Dt_t* dt, int minp, int balance) -{ - int size; - - if(dt->meth->type != DT_OSET) - return -1; - - size = dtsize(dt); - - if(minp < 0) - { for(minp = 0; minp < DT_MINP; ++minp) - if((1 << minp) >= size) - break; - if(minp <= DT_MINP-4) /* use log(size) + 4 */ - minp += 4; - } - - if((dt->data->minp = minp + (minp%2)) > DT_MINP) - dt->data->minp = DT_MINP; - - if(balance) - dt->data->here = treebalance(dtflatten(dt), size); - - return 0; -}