diff --git a/NN/stack.c b/NN/stack.c index f761e7629dae5cf0ab64e3be68c13e67939a1b2f..f5f2ba2b000a2f717f24823bc55bf7f4f8f501d6 100644 --- a/NN/stack.c +++ b/NN/stack.c @@ -3,8 +3,9 @@ static struct node { int key; struct node *next; }; static struct node *head, *z, *t; - stackinit() {stackinit_();} - stackinit_() + +/* stackinit_() {stackinit();} */ + stackinit() { head = (struct node *) malloc(sizeof *head); z = (struct node *) malloc(sizeof *z); @@ -12,8 +13,9 @@ z->next = z; z->key = 0; } - push (p) int *p; {push_(p);} - push_(p) + +/* push_(p) int *p; {push(p);} */ + push(p) int *p; { int v; @@ -22,23 +24,26 @@ t->key = v; t->next = head->next; head->next =t; } - pop (x) int *x; {pop_(x);} - pop_(x) + +/* pop_(x) int *x; {pop(x);} */ + pop(x) int *x; { t = head->next; head->next = t->next; *x = t->key; free(t); } - stackempty (i) int *i; {stackempty_(i);} - stackempty_(i) + +/* stackempty_(i) int *i; {stackempty(i);} */ + stackempty(i) int *i; { *i = 0; if(head->next == z) *i = 1; } - stackflush () {stackflush_();} - stackflush_() + +/* stackflush_() {stackflush();} */ + stackflush() { free(head); free(z); diff --git a/NN/stackpair.c b/NN/stackpair.c index a9d835243bc3e889b03d014b3b4cc8fa779993f6..600c89d3cd445e27f523b87324ca4b113364bd01 100644 --- a/NN/stackpair.c +++ b/NN/stackpair.c @@ -5,7 +5,7 @@ static struct node *heada, *za, *ta; static struct node *headb, *zb, *tb; - stackpairinit_() {stackpairinit();} +/* stackpairinit_() {stackpairinit();} */ stackpairinit () { heada = (struct node *) malloc(sizeof *heada); @@ -21,7 +21,7 @@ zb->key = 0; } - stackpairflush_() {stackpairflush();} +/* stackpairflush_() {stackpairflush();} */ stackpairflush () { free(heada); @@ -30,7 +30,7 @@ free(zb); } - pushpair_(pa, pb) int *pa; int *pb; {pushpair(pa, pb);} +/* pushpair_(pa, pb) int *pa; int *pb; {pushpair(pa, pb);} */ pushpair (pa, pb) int *pa; int *pb; @@ -48,7 +48,7 @@ headb->next =tb; } - poppair_(xa,xb) int *xa; int *xb; {poppair(xa,xb);} +/* poppair_(xa,xb) int *xa; int *xb; {poppair(xa,xb);} */ poppair (xa,xb) int *xa; int *xb; @@ -61,7 +61,7 @@ free(tb); } - stackpairempty_(i) int *i; {stackpairempty(i);} +/* stackpairempty_(i) int *i; {stackpairempty(i);} */ stackpairempty (i) int *i; { diff --git a/NN/volume.c b/NN/volume.c index 22dd55aa13f2c097f5925ea9e039ed86bcb2db30..1a0d09e8f6365541cbe2c69c29ee1b246b456dd2 100644 --- a/NN/volume.c +++ b/NN/volume.c @@ -1046,20 +1046,20 @@ return(v); ----------------------------------------------------------------*/ /* Not used...won't compile...function name and variable name identical */ -/* -dvda_ (a,b,m,n,mmax,nmax,idim,dvda,code) -int *n, *m, *mmax, *nmax, *idim, *code; -float *a, *b; -float *dvda; + +dvda_ (a,b,m,n,mmax,nmax,idim,result,code) + int *n, *m, *mmax, *nmax, *idim, *code; + float *a, *b; + float *result; { - dvda(a,b,m,n,mmax,nmax,idim,dvda,code); + dvda(a,b,m,n,mmax,nmax,idim,result,code); } -dvda (a,b,m,n,mmax,nmax,idim,dvda,code) +dvda (a,b,m,n,mmax,nmax,idim,result,code) int *n, *m, *mmax, *nmax, *idim, *code; float *a, *b; -float *dvda; +float *result; { @@ -1070,11 +1070,11 @@ float *temp; jval = 1; tdim = *idim - 1; -*dvda=cdvda(a,b,m,n,mmax,nmax,&tdim,temp,&jval,code); +*result=cdvda(a,b,m,n,mmax,nmax,&tdim,temp,&jval,code); free(temp); } -*/ + /*--------------------------------------------------------------