From: Erwin Janssen Date: Thu, 8 Sep 2016 21:06:24 +0000 (+0200) Subject: Removed old-style function defintions from lib/cdt X-Git-Tag: untagged-4431b9bde391f1b69fe5^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a00e2a2e3d049f409a166e6272498365e3332e19;p=graphviz Removed old-style function defintions from lib/cdt The functions definitions in cdt are all surrounded by an `#if __STD_C`, if __STD_C is not defined than the old style function definition is used. These days STD C is the standard and the old style function defintions are obsolete. They have been removed from lib/cdt, but not from the subprojects. --- diff --git a/lib/cdt/dtclose.c b/lib/cdt/dtclose.c index fec6e3180..8eff06e5f 100644 --- a/lib/cdt/dtclose.c +++ b/lib/cdt/dtclose.c @@ -4,12 +4,7 @@ ** ** Written by Kiem-Phong Vo (05/25/96) */ -#if __STD_C int dtclose(reg Dt_t* dt) -#else -int dtclose(dt) -reg Dt_t* dt; -#endif { Dtdisc_t *disc; int ev = 0; diff --git a/lib/cdt/dtdisc.c b/lib/cdt/dtdisc.c index 2b022c047..5a07bbcdf 100644 --- a/lib/cdt/dtdisc.c +++ b/lib/cdt/dtdisc.c @@ -7,15 +7,7 @@ ** Written by Kiem-Phong Vo (5/26/96) */ -#if __STD_C static Void_t* dtmemory(Dt_t* dt,Void_t* addr,size_t size,Dtdisc_t* disc) -#else -static Void_t* dtmemory(dt, addr, size, disc) -Dt_t* dt; /* dictionary */ -Void_t* addr; /* address to be manipulate */ -size_t size; /* size to obtain */ -Dtdisc_t* disc; /* discipline */ -#endif { if(addr) { if(size == 0) @@ -27,14 +19,7 @@ Dtdisc_t* disc; /* discipline */ else return size > 0 ? malloc(size) : NIL(Void_t*); } -#if __STD_C Dtdisc_t* dtdisc(Dt_t* dt, Dtdisc_t* disc, int type) -#else -Dtdisc_t* dtdisc(dt,disc,type) -Dt_t* dt; -Dtdisc_t* disc; -int type; -#endif { reg Dtsearch_f searchf; reg Dtlink_t *r, *t; diff --git a/lib/cdt/dtextract.c b/lib/cdt/dtextract.c index 84d2a6802..b6465cdc0 100644 --- a/lib/cdt/dtextract.c +++ b/lib/cdt/dtextract.c @@ -5,12 +5,7 @@ ** Written by Kiem-Phong Vo (5/25/96). */ -#if __STD_C Dtlink_t* dtextract(reg Dt_t* dt) -#else -Dtlink_t* dtextract(dt) -reg Dt_t* dt; -#endif { reg Dtlink_t *list, **s, **ends; diff --git a/lib/cdt/dtflatten.c b/lib/cdt/dtflatten.c index fb016a34c..b484cb3ff 100644 --- a/lib/cdt/dtflatten.c +++ b/lib/cdt/dtflatten.c @@ -6,12 +6,7 @@ ** Written by Kiem-Phong Vo (5/25/96). */ -#if __STD_C Dtlink_t* dtflatten(Dt_t* dt) -#else -Dtlink_t* dtflatten(dt) -Dt_t* dt; -#endif { reg Dtlink_t *t, *r, *list, *last, **s, **ends; diff --git a/lib/cdt/dthash.c b/lib/cdt/dthash.c index 7c7c151f2..ac5359f48 100644 --- a/lib/cdt/dthash.c +++ b/lib/cdt/dthash.c @@ -9,12 +9,7 @@ */ /* resize the hash table */ -#if __STD_C static void dthtab(Dt_t* dt) -#else -static void dthtab(dt) -Dt_t* dt; -#endif { reg Dtlink_t *t, *r, *p, **s, **hs, **is, **olds; int n, k; @@ -75,14 +70,7 @@ Dt_t* dt; } } -#if __STD_C static Void_t* dthash(Dt_t* dt, reg Void_t* obj, int type) -#else -static Void_t* dthash(dt,obj,type) -Dt_t* dt; -reg Void_t* obj; -int type; -#endif { reg Dtlink_t *t, *r = NULL, *p; reg Void_t *k, *key; diff --git a/lib/cdt/dtlist.c b/lib/cdt/dtlist.c index c9658ef5b..1ed726b53 100644 --- a/lib/cdt/dtlist.c +++ b/lib/cdt/dtlist.c @@ -5,14 +5,7 @@ ** Written by Kiem-Phong Vo (05/25/96) */ -#if __STD_C static Void_t* dtlist(reg Dt_t* dt, reg Void_t* obj, reg int type) -#else -static Void_t* dtlist(dt, obj, type) -reg Dt_t* dt; -reg Void_t* obj; -reg int type; -#endif { reg int lk, sz, ky; reg Dtcompar_f cmpf; diff --git a/lib/cdt/dtmethod.c b/lib/cdt/dtmethod.c index e93d626b7..9e3d11ba5 100644 --- a/lib/cdt/dtmethod.c +++ b/lib/cdt/dtmethod.c @@ -5,13 +5,7 @@ ** Written by Kiem-Phong Vo (05/25/96) */ -#if __STD_C Dtmethod_t* dtmethod(Dt_t* dt, Dtmethod_t* meth) -#else -Dtmethod_t* dtmethod(dt, meth) -Dt_t* dt; -Dtmethod_t* meth; -#endif { reg Dtlink_t *list, *r; reg Dtdisc_t* disc = dt->disc; diff --git a/lib/cdt/dtopen.c b/lib/cdt/dtopen.c index 6f3421372..e750a4643 100644 --- a/lib/cdt/dtopen.c +++ b/lib/cdt/dtopen.c @@ -6,13 +6,7 @@ static char* Version = "\n@(#)$Id$\0\n"; ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C Dt_t* dtopen(Dtdisc_t* disc, Dtmethod_t* meth) -#else -Dt_t* dtopen(disc, meth) -Dtdisc_t* disc; -Dtmethod_t* meth; -#endif { Dt_t* dt = (Dt_t*)Version; /* shut-up unuse warning */ reg int e; diff --git a/lib/cdt/dtrenew.c b/lib/cdt/dtrenew.c index a143013d5..d51fff2c1 100644 --- a/lib/cdt/dtrenew.c +++ b/lib/cdt/dtrenew.c @@ -6,13 +6,7 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C Void_t* dtrenew(Dt_t* dt, reg Void_t* obj) -#else -Void_t* dtrenew(dt, obj) -Dt_t* dt; -reg Void_t* obj; -#endif { reg Void_t* key; reg Dtlink_t *e, *t, **s; diff --git a/lib/cdt/dtrestore.c b/lib/cdt/dtrestore.c index d57f07b61..1564f74c9 100644 --- a/lib/cdt/dtrestore.c +++ b/lib/cdt/dtrestore.c @@ -7,13 +7,7 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C int dtrestore(reg Dt_t* dt, reg Dtlink_t* list) -#else -int dtrestore(dt, list) -reg Dt_t* dt; -reg Dtlink_t* list; -#endif { reg Dtlink_t *t, **s, **ends; reg int type; diff --git a/lib/cdt/dtsize.c b/lib/cdt/dtsize.c index bd3a65550..18f04164d 100644 --- a/lib/cdt/dtsize.c +++ b/lib/cdt/dtsize.c @@ -5,21 +5,11 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C static int treecount(reg Dtlink_t* e) -#else -static int treecount(e) -reg Dtlink_t* e; -#endif { return e ? treecount(e->left) + treecount(e->right) + 1 : 0; } -#if __STD_C int dtsize(Dt_t* dt) -#else -int dtsize(dt) -Dt_t* dt; -#endif { reg Dtlink_t* t; reg int size; diff --git a/lib/cdt/dtstat.c b/lib/cdt/dtstat.c index ac2e95da2..dbe7ce573 100644 --- a/lib/cdt/dtstat.c +++ b/lib/cdt/dtstat.c @@ -5,15 +5,7 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C static void dttstat(Dtstat_t* ds, Dtlink_t* root, int depth, int* level) -#else -static void dttstat(ds,root,depth,level) -Dtstat_t* ds; -Dtlink_t* root; -int depth; -int* level; -#endif { if(root->left) dttstat(ds,root->left,depth+1,level); @@ -25,14 +17,7 @@ int* level; level[depth] += 1; } -#if __STD_C static void dthstat(reg Dtdata_t* data, Dtstat_t* ds, reg int* count) -#else -static void dthstat(data, ds, count) -reg Dtdata_t* data; -Dtstat_t* ds; -reg int* count; -#endif { reg Dtlink_t* t; reg int n, h; @@ -51,14 +36,7 @@ reg int* count; } } -#if __STD_C int dtstat(reg Dt_t* dt, Dtstat_t* ds, int all) -#else -int dtstat(dt, ds, all) -reg Dt_t* dt; -Dtstat_t* ds; -int all; -#endif { reg int i; static int *Count, Size; diff --git a/lib/cdt/dtstrhash.c b/lib/cdt/dtstrhash.c index 13b3f1af1..c50c20c89 100644 --- a/lib/cdt/dtstrhash.c +++ b/lib/cdt/dtstrhash.c @@ -13,14 +13,7 @@ ** Written by Kiem-Phong Vo (02/28/03) */ -#if __STD_C uint dtstrhash(reg uint h, Void_t* args, reg int n) -#else -uint dtstrhash(h,args,n) -reg uint h; -Void_t* args; -reg int n; -#endif { reg unsigned char* s = (unsigned char*)args; diff --git a/lib/cdt/dttree.c b/lib/cdt/dttree.c index 5e891cb75..87b2f0e38 100644 --- a/lib/cdt/dttree.c +++ b/lib/cdt/dttree.c @@ -8,14 +8,7 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C static Void_t* dttree(Dt_t* dt, Void_t* obj, int type) -#else -static Void_t* dttree(dt,obj,type) -Dt_t* dt; -Void_t* obj; -int type; -#endif { Dtlink_t *root, *t; int cmp, lk, sz, ky; diff --git a/lib/cdt/dttreeset.c b/lib/cdt/dttreeset.c index 13ad8afec..4a73b9801 100644 --- a/lib/cdt/dttreeset.c +++ b/lib/cdt/dttreeset.c @@ -5,13 +5,7 @@ ** Written by Kiem-Phong Vo (09/17/2001) */ -#if __STD_C static Dtlink_t* treebalance(Dtlink_t* list, int size) -#else -static Dtlink_t* treebalance(list, size) -Dtlink_t* list; -int size; -#endif { int n; Dtlink_t *l, *mid; @@ -28,14 +22,7 @@ int size; return mid; } -#if __STD_C int dttreeset(Dt_t* dt, int minp, int balance) -#else -int dttreeset(dt, minp, balance) -Dt_t* dt; -int minp; -int balance; -#endif { int size; diff --git a/lib/cdt/dtview.c b/lib/cdt/dtview.c index ea099887a..dc348fc53 100644 --- a/lib/cdt/dtview.c +++ b/lib/cdt/dtview.c @@ -6,14 +6,7 @@ */ -#if __STD_C static Void_t* dtvsearch(Dt_t* dt, reg Void_t* obj, reg int type) -#else -static Void_t* dtvsearch(dt,obj,type) -Dt_t* dt; -reg Void_t* obj; -reg int type; -#endif { Dt_t *d, *p; Void_t *o, *n, *ok, *nk; @@ -93,13 +86,7 @@ reg int type; } } -#if __STD_C Dt_t* dtview(reg Dt_t* dt, reg Dt_t* view) -#else -Dt_t* dtview(dt,view) -reg Dt_t* dt; -reg Dt_t* view; -#endif { reg Dt_t* d; diff --git a/lib/cdt/dtwalk.c b/lib/cdt/dtwalk.c index 345322d28..b8aca7270 100644 --- a/lib/cdt/dtwalk.c +++ b/lib/cdt/dtwalk.c @@ -6,14 +6,7 @@ ** Written by Kiem-Phong Vo (5/25/96) */ -#if __STD_C int dtwalk(reg Dt_t* dt, int (*userf)(Dt_t*, Void_t*, Void_t*), Void_t* data) -#else -int dtwalk(dt,userf,data) -reg Dt_t* dt; -int(* userf)(); -Void_t* data; -#endif { reg Void_t *obj, *next; reg Dt_t* walk;