$NetBSD: patch-ab,v 1.2 2015/03/21 19:27:56 joerg Exp $ --- xwin.c.orig 2008-08-30 11:59:22.000000000 +0000 +++ xwin.c @@ -20,10 +20,6 @@ #include #include #endif -#if defined(DARWIN) || defined(FREEBSD) -#else -#include -#endif #endif #include @@ -3360,7 +3356,7 @@ static int *ispoptm; static int *icopth; static int *icoptl; static int *icoptm; -static int linkat = 0; +static int my_linkat = 0; static QBOXSTRU IANZboxes[MAXAT]; static QBOXSTRU IZboxes[MAXAT][4]; @@ -17466,7 +17462,7 @@ int i; if (ioniom == 1) { int ism, isl; - linkat = 0; + my_linkat = 0; /* Counting the number of Link atoms between H and lower levels*/ @@ -17479,10 +17475,10 @@ int i; if (ionij != 0) continue; nconn = xyz.iconn[j*(MXCON+1)]; for (k=1;k<=nconn;k++) { - if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 > 0) linkat++; + if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 > 0) my_linkat++; } } - linkat += 20000; + my_linkat += 20000; *itotc = *icopth; *imult = *ispopth; if (CheckChargeMult()) { @@ -17503,7 +17499,7 @@ int i; } else if (ioniom == 2) { - linkat = 0; + my_linkat = 0; /* Counting the number of Link atoms between H and lower levels*/ @@ -17513,10 +17509,10 @@ int i; if(ionij != 0) continue; nconn = xyz.iconn[j*(MXCON+1)]; for (k=1;k<=nconn;k++) { - if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 > 0) linkat++; + if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 > 0) my_linkat++; } } - linkat += 20000; + my_linkat += 20000; *itotc = *icopth; *imult = *ispopth; if (CheckChargeMult()) { @@ -17528,7 +17524,7 @@ int i; break; */ } - linkat = 0; + my_linkat = 0; /* Counting the number of Link atoms between H+M and lower levels*/ @@ -17538,10 +17534,10 @@ int i; if (ionij == 2) continue; nconn = xyz.iconn[j*(MXCON+1)]; for (k=1;k<=nconn;k++) { - if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 == 2) linkat++; + if (xyz.ityp[xyz.iconn[j*(MXCON+1)+k]-1]/10000 == 2) my_linkat++; } } - linkat += 20000; + my_linkat += 20000; *itotc = *icoptm; *imult = *ispoptm; if (CheckChargeMult()) { @@ -17556,7 +17552,7 @@ int i; icopt = *icoptl+3; ispopt = *ispoptl-1; } - linkat = 0; + my_linkat = 0; *itotc = icopt - 3; *imult = ispopt + 1; *ito = itopt[jmode] + 1; @@ -17808,10 +17804,10 @@ int CheckChargeMult() ionil = 0; if (ioniom) { - ionil = 3 - (linkat / 10000); - linkat -= (linkat / 10000) * 10000; + ionil = 3 - (my_linkat / 10000); + my_linkat -= (my_linkat / 10000) * 10000; } else { - linkat = 0; + my_linkat = 0; } if (*zmptr.ihaszm) { @@ -17834,10 +17830,10 @@ int CheckChargeMult() } } /* - fprintf(stderr,"ionil %d ne %d itotc %d linkat %d mult %d\n", - ionil,ne,*itotc,linkat,*imult); + fprintf(stderr,"ionil %d ne %d itotc %d my_linkat %d mult %d\n", + ionil,ne,*itotc,my_linkat,*imult); */ - ne = ne - *itotc + linkat; + ne = ne - *itotc + my_linkat; if (ne % 2 == *imult % 2) return(1); return(0); }