[graywolf] 04/09: "restrict" is a reserved keyword in the new C standard. Rename variables with this name.

Ruben Undheim rubund-guest at moszumanska.debian.org
Mon Oct 5 07:05:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

rubund-guest pushed a commit to branch master
in repository graywolf.

commit 4f95a84e4aebce883685f897c8b1df311dcfebac
Author: Ruben Undheim <ruben.undheim at gmail.com>
Date:   Thu Oct 1 10:31:23 2015 +0400

    "restrict" is a reserved keyword in the new C standard. Rename variables with this name.
---
 src/twmc/custom.h     |  4 ++--
 src/twmc/findside.c   | 20 ++++++++++----------
 src/twmc/initialize.c | 26 +++++++++++++-------------
 src/twmc/placepin.c   | 16 ++++++++--------
 4 files changed, 33 insertions(+), 33 deletions(-)

diff --git a/src/twmc/custom.h b/src/twmc/custom.h
index 54ba3d6..90e5826 100644
--- a/src/twmc/custom.h
+++ b/src/twmc/custom.h
@@ -125,7 +125,7 @@ typedef struct movebox {
 
 typedef struct eq_pinbox {   /*  for hard equiv pins and addequiv pins */
     char *pinname          ; /*         equivalent pin name            */
-    INT *restrict          ;  /* softpin is restricted to these sides  */
+    INT *restrict1          ;  /* softpin is restricted to these sides  */
     INT *txpos             ; /* array of cell instance xpos. cell rel. */
     INT *typos             ; /* array of cell instance ypos. cell rel. */
     INT layer              ; /* layer of the equivalent pin            */
@@ -135,7 +135,7 @@ typedef struct eq_pinbox {   /*  for hard equiv pins and addequiv pins */
 typedef struct sbox { 
     struct pinbox **children;  /* array of the pin's children           */
     struct pinbox *parent;     /* pointer back to softpin pinbox        */
-    INT    *restrict        ;  /* softpin is restricted to these sides  */
+    INT    *restrict1        ;  /* softpin is restricted to these sides  */
     INT    hierarchy        ;  /* type of pin root leaf, subroot etc    */
     INT    side             ;  /* current side of the softpin           */
     BOOL   permute          ;  /* true if rank ordered                  */
diff --git a/src/twmc/findside.c b/src/twmc/findside.c
index bd2812b..705263e 100644
--- a/src/twmc/findside.c
+++ b/src/twmc/findside.c
@@ -143,7 +143,7 @@ PSIDEBOX *pSideArray ;
     INT i ;                        /* counter */
     INT j ;                        /* counter */
     INT howmany ;                  /* number of softpins for cell */
-    INT restrict ;                 /* counter */
+    INT restrict1 ;                 /* counter */
     INT match ;                    /* count number of matching restricts*/
     INT numsides ;                 /* number of side restrictions */
     INT numrestricts ;             /* current # restricts for child */
@@ -172,7 +172,7 @@ PSIDEBOX *pSideArray ;
 	}
 
 	/* now remove restrictions if present */
-	numrestricts = spin->restrict[HOWMANY] ;
+	numrestricts = spin->restrict1[HOWMANY] ;
 
 	/* initialize set to the empty set */
 	Yset_empty( side_set ) ;
@@ -184,8 +184,8 @@ PSIDEBOX *pSideArray ;
 	    }
 	} else {
 	    /* just validate the given list of sides */
-	    for( restrict = 1; restrict <= numrestricts; restrict++ ){
-		Yset_add( side_set, spin->restrict[restrict] ) ;
+	    for( restrict1 = 1; restrict1 <= numrestricts; restrict1++ ){
+		Yset_add( side_set, spin->restrict1[restrict1] ) ;
 	    }
 	}
 	/* at this point we have checked the leaf, check parents for */
@@ -194,7 +194,7 @@ PSIDEBOX *pSideArray ;
 	abortPin = FALSE ;
 	while( parent && pin->type != SOFTEQUIVTYPE ){
 	    spin = parent->softinfo ;
-	    parent_restricts = spin->restrict[HOWMANY] ;
+	    parent_restricts = spin->restrict1[HOWMANY] ;
 
 	    /* check the various cases of number of restrictions */
 	    if( numrestricts != 0 && parent_restricts == 0 ){
@@ -207,11 +207,11 @@ PSIDEBOX *pSideArray ;
 		/* need to make sure that parent is more restrictive */
 		/* than child */
 		match = 0 ; /* initially no matching restrictions */
-		for( restrict = 1;restrict<=parent_restricts;restrict++ ){
-		    if( Yset_member( side_set, spin->restrict[restrict] ) ){
+		for( restrict1 = 1;restrict1<=parent_restricts;restrict1++ ){
+		    if( Yset_member( side_set, spin->restrict1[restrict1] ) ){
 			match++ ;
 		    } else {
-		        Yset_add( side_set, spin->restrict[restrict] ) ;
+		        Yset_add( side_set, spin->restrict1[restrict1] ) ;
 		    }
 		}
 		if( match != numrestricts ){
@@ -223,8 +223,8 @@ PSIDEBOX *pSideArray ;
 		}
 	    } else if( numrestricts == 0 && parent_restricts != 0 ){
 		Yset_comp( side_set ) ;
-		for( restrict = 1;restrict<=parent_restricts;restrict++ ){
-		    Yset_add( side_set, spin->restrict[restrict] ) ;
+		for( restrict1 = 1;restrict1<=parent_restricts;restrict1++ ){
+		    Yset_add( side_set, spin->restrict1[restrict1] ) ;
 		}
 	    } /* else if numrestricts == 0 && parent_restricts == 0 ) */
 	    /* don't have to do anything for this case */
diff --git a/src/twmc/initialize.c b/src/twmc/initialize.c
index 60d152c..23b5f42 100644
--- a/src/twmc/initialize.c
+++ b/src/twmc/initialize.c
@@ -1050,7 +1050,7 @@ INT pinType ;
 	spinptrS->hierarchy = NONE ;
 	spinptrS->parent = NULL ;
 	/* build the restrict field and initialize HOWMANY [0] to 0 */
-	spinptrS->restrict = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
+	spinptrS->restrict1 = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
 	spinptrS->permute = FALSE ;
 	spinptrS->fixed = FALSE ;
 	spinptrS->ordered = FALSE ;
@@ -1208,9 +1208,9 @@ INT pinType ;
     eqptr->layer = layer ;
     if( pinType == ADDEQUIVTYPE ){
 	/* build the restrict field and initialize HOWMANY [0] to 0 */
-	eqptr->restrict = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
+	eqptr->restrict1 = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
     } else {
-	eqptr->restrict = NULL ;
+	eqptr->restrict1 = NULL ;
     }
 
 } /* end addEquivPin */
@@ -1245,25 +1245,25 @@ if( side < 0 || side > cornerCountS ) {
 switch( cur_restrict_objS ){ 
     case PINGROUPTYPE:
 	spin = pingroupS->softinfo ;
-	howmany = ++(spin->restrict[HOWMANY]) ;
-	spin->restrict = (INT *) Ysafe_realloc( spin->restrict,
+	howmany = ++(spin->restrict1[HOWMANY]) ;
+	spin->restrict1 = (INT *) Ysafe_realloc( spin->restrict1,
 	    (howmany+1)*sizeof(INT) ) ;
-	spin->restrict[howmany] = side ;
+	spin->restrict1[howmany] = side ;
 	break ;
     case SOFTPINTYPE:
     case SOFTEQUIVTYPE:
 	spin = pinS->softinfo ;
-	howmany = ++(spin->restrict[HOWMANY]) ;
-	spin->restrict = (INT *) Ysafe_realloc( spin->restrict,
+	howmany = ++(spin->restrict1[HOWMANY]) ;
+	spin->restrict1 = (INT *) Ysafe_realloc( spin->restrict1,
 	    (howmany+1)*sizeof(INT) ) ;
-	spin->restrict[howmany] = side ;
+	spin->restrict1[howmany] = side ;
 	break ;
     case ADDEQUIVTYPE:
 	eqptr = softpinS->eqptr ;
-	howmany = ++(eqptr->restrict[HOWMANY]) ;
-	eqptr->restrict = (INT *) Ysafe_realloc( eqptr->restrict,
+	howmany = ++(eqptr->restrict1[HOWMANY]) ;
+	eqptr->restrict1 = (INT *) Ysafe_realloc( eqptr->restrict1,
 	    (howmany+1)*sizeof(INT) ) ;
-	eqptr->restrict[howmany] = side ;
+	eqptr->restrict1[howmany] = side ;
 	break ;
 } /* end switch on current object */
 
@@ -1409,7 +1409,7 @@ spin->hierarchy = ROOT ;
 spin->lowerbound = 0.0 ;
 spin->upperbound = 1.0 ;
 spin->children = (PINBOXPTR *) Ysafe_malloc( sizeof(PINBOXPTR) ) ;
-spin->restrict = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
+spin->restrict1 = (INT *) Ysafe_calloc( 1, sizeof(INT) ) ;
 spin->parent = NULL ;
 
 } /* end start_pin_group */
diff --git a/src/twmc/placepin.c b/src/twmc/placepin.c
index 977d180..1328126 100644
--- a/src/twmc/placepin.c
+++ b/src/twmc/placepin.c
@@ -257,13 +257,13 @@ BOOL newVertFlag ;
 	    /* the case of a pingroup root */
 	    bestcost = INT_MAX ;
 	    /* calculate number of restricted sides */
-	    num_restrict = spin->restrict[HOWMANY] ;
+	    num_restrict = spin->restrict1[HOWMANY] ;
 	    for( side = 1; side <= ptrS->numsides; side++ ) {
 		if( num_restrict != 0 ){
 		    invalid = TRUE ;
 		    /* make sure this side is a valid side */
 		    for( j = 1; j <= num_restrict; j++ ){
-			if( spin->restrict[j] == side ){
+			if( spin->restrict1[j] == side ){
 			    invalid = FALSE ;
 			    break ;
 			}
@@ -289,13 +289,13 @@ BOOL newVertFlag ;
 	    /* the case of a pin that is not in a pingroup */
 	    bestcost = INT_MAX ;
 	    /* calculate number of restricted sides */
-	    num_restrict = spin->restrict[HOWMANY] ;
+	    num_restrict = spin->restrict1[HOWMANY] ;
 	    for( side = 1; side <= ptrS->numsides; side++ ) {
 		if( num_restrict != 0 ){
 		    invalid = TRUE ;
 		    /* make sure this side is a valid side */
 		    for( j = 1; j <= num_restrict; j++ ){
-			if( spin->restrict[j] == side ){
+			if( spin->restrict1[j] == side ){
 			    invalid = FALSE ;
 			    break ;
 			}
@@ -370,12 +370,12 @@ BOOL spacing_restricted ;
 
     if( spin->hierarchy == LEAF || spin->hierarchy == SUBROOT ){
 	/* check to make sure we have a valid side */
-	num_restrict = spin->restrict[HOWMANY] ;
+	num_restrict = spin->restrict1[HOWMANY] ;
 	if( num_restrict != 0 ){
 	    invalid = TRUE ;
 	    /* make sure this side is a valid side */
 	    for( i = 1; i <= num_restrict; i++ ){
-		if( spin->restrict[i] == side ){
+		if( spin->restrict1[i] == side ){
 		    invalid = FALSE ;
 		    break ;
 		}
@@ -1184,7 +1184,7 @@ static place_soft_equivs()
 	}
 	pos = parent->txpos_new ;
 	/* find the closest side that is valid */
-	num_restrict = spin->restrict[HOWMANY] ;
+	num_restrict = spin->restrict1[HOWMANY] ;
 	for( j = 1; j <= ptrS->numsides; j++ ){
 	    sptr = sideArrayS[j] ;
 	    if( j == sparent->side || sptr->direction == orthog1 || 
@@ -1196,7 +1196,7 @@ static place_soft_equivs()
 		/* make sure this side is a valid side */
 		invalid = TRUE ;
 		for( k = 1; k <= num_restrict; k++ ){
-		    if( spin->restrict[k] == j ){
+		    if( spin->restrict1[k] == j ){
 			invalid = FALSE ;
 			break ;
 		    }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/graywolf.git



More information about the debian-science-commits mailing list