You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/sci-chemistry/molmol/files/molmol-2k_p2-fink.patch

357 lines
12 KiB

src/calc/CalcRmsd.c | 8 ++++----
src/cmdfig/FigUtil.c | 46 +++++++++++++++++++++++-----------------------
src/cmdio/ExWriteSec.c | 6 +++---
src/data/DataDist.c | 2 +-
src/data/DataHand.c | 8 ++++----
src/expr/ExprScan.c | 2 +-
src/iodev/IODev.c | 2 --
src/motif/MotifDial.c | 2 +-
src/motif/MotifMainW.c | 4 ++--
src/os/GFile.c | 2 +-
src/prim/PrimDraw.c | 2 +-
src/prim/RibbonCalc.c | 12 ++++++------
src/pudev/PuMainW.c | 2 +-
src/tty/TTY.c | 2 +-
tools/src/IsoSurface.c | 22 +++++++++++-----------
15 files changed, 60 insertions(+), 62 deletions(-)
diff --git a/src/calc/CalcRmsd.c b/src/calc/CalcRmsd.c
index 0e4629e..ed99e76 100644
--- a/src/calc/CalcRmsd.c
+++ b/src/calc/CalcRmsd.c
@@ -1025,10 +1025,10 @@ CalcRmsd(BOOL fitPairs, char *range, char *glob1, char *glob2,
}
for (propI = 0; propI < 2; propI++) {
- if (groupNo == 0 || propI == 0 && ! calc1)
+ if (groupNo == 0 || (propI == 0 && ! calc1))
continue;
- if (groupNo == 0 || propI == 1 && ! calc2)
+ if (groupNo == 0 || (propI == 1 && ! calc2))
continue;
Report("\nAverage RMSD, dev., min. and max of ");
@@ -1052,8 +1052,8 @@ CalcRmsd(BOOL fitPairs, char *range, char *glob1, char *glob2,
Report(" ");
for (groupI2 = 0; groupI2 < groupNo; groupI2++) {
- if (groupI1 < groupI2 &&
- groupInfoP[groupI1].membNo != groupInfoP[groupI2].membNo ||
+ if (((groupI1 < groupI2) &&
+ (groupInfoP[groupI1].membNo != groupInfoP[groupI2].membNo)) ||
groupInfoP[groupI1].membNo == 0 ||
groupInfoP[groupI2].membNo == 0) {
groupInfoP[groupI2].stat.avg = 0.0f;
diff --git a/src/cmdfig/FigUtil.c b/src/cmdfig/FigUtil.c
index 20d403a..b8dc3a6 100644
--- a/src/cmdfig/FigUtil.c
+++ b/src/cmdfig/FigUtil.c
@@ -44,29 +44,29 @@ typedef struct {
} TabEntry;
static TabEntry GreekTab[] = {
- "ALPHA", 'a',
- "BETA", 'b',
- "CHI", 'c',
- "DELTA", 'd',
- "EPSILON", 'e',
- "PHI" , 'f',
- "GAMMA", 'g',
- "ETA", 'h',
- "IOTA", 'i',
- "KAPPA", 'k',
- "LAMBDA", 'l',
- "MU", 'm',
- "NU", 'n',
- "PI", 'p',
- "THETA", 'q',
- "RHO", 'r',
- "SIGMA", 's',
- "TAU", 't',
- "UPSILON", 'u',
- "OMEGA", 'w',
- "XI", 'x',
- "PSI", 'y',
- "ZETA", 'z'
+ {"ALPHA", 'a'},
+ {"BETA", 'b'},
+ {"CHI", 'c'},
+ {"DELTA", 'd'},
+ {"EPSILON", 'e'},
+ {"PHI" , 'f'},
+ {"GAMMA", 'g'},
+ {"ETA", 'h'},
+ {"IOTA", 'i'},
+ {"KAPPA", 'k'},
+ {"LAMBDA", 'l'},
+ {"MU", 'm'},
+ {"NU", 'n'},
+ {"PI", 'p'},
+ {"THETA", 'q'},
+ {"RHO", 'r'},
+ {"SIGMA", 's'},
+ {"TAU", 't'},
+ {"UPSILON", 'u'},
+ {"OMEGA", 'w'},
+ {"XI", 'x'},
+ {"PSI", 'y'},
+ {"ZETA", 'z'}
};
int
diff --git a/src/cmdio/ExWriteSec.c b/src/cmdio/ExWriteSec.c
index 7f705d4..8da8336 100644
--- a/src/cmdio/ExWriteSec.c
+++ b/src/cmdio/ExWriteSec.c
@@ -250,9 +250,9 @@ writeSecondary(DhResP *resPA, int resNo)
if (neighLStart != NO_RES) {
if (num != neighLEnd + 1 ||
- neighNum != neighREnd + 1 && neighNum != neighREnd - 1 ||
- neighREnd > neighRStart && neighNum != neighREnd + 1 ||
- neighREnd < neighRStart && neighNum != neighREnd - 1) {
+ (neighNum != neighREnd + 1 && neighNum != neighREnd - 1) ||
+ (neighREnd > neighRStart && neighNum != neighREnd + 1) ||
+ (neighREnd < neighRStart && neighNum != neighREnd - 1)) {
writeNeigh(neighLStart, neighLEnd, neighRStart, neighREnd);
neighLStart = NO_RES;
} else {
diff --git a/src/data/DataDist.c b/src/data/DataDist.c
index 18eef33..c683f9e 100644
--- a/src/data/DataDist.c
+++ b/src/data/DataDist.c
@@ -117,7 +117,7 @@ fillIntra(TabEntryIntra *entryP, DhAtomP atom1P, DhAtomP atom2P)
entryP->atom2I = DhAtomGetNumber(atom2P);
if (entryP->res1I > entryP->res2I ||
- entryP->res1I == entryP->res2I && entryP->atom1I > entryP->atom2I) {
+ (entryP->res1I == entryP->res2I && entryP->atom1I > entryP->atom2I)) {
t = entryP->res1I;
entryP->res1I = entryP->res2I;
entryP->res2I = t;
diff --git a/src/data/DataHand.c b/src/data/DataHand.c
index b20e29c..368aad3 100644
--- a/src/data/DataHand.c
+++ b/src/data/DataHand.c
@@ -2043,8 +2043,8 @@ applyBondList(PropRefP refP, LINLIST bondL, int groupNum,
groupNum1 = getGroupNum(bondAddP->res1P->molP);
groupNum2 = getGroupNum(bondAddP->res2P->molP);
if (atom1P->state == AS_VALID && atom2P->state == AS_VALID &&
- (groupNum1 == groupNum && groupNum2 == groupNum ||
- groupNum < 0 && groupNum1 != groupNum2))
+ ((groupNum1 == groupNum && groupNum2 == groupNum) ||
+ (groupNum < 0 && groupNum1 != groupNum2)))
applyF(bondP, atom1P, atom2P, clientData);
}
bondAddP = nextBondAddP;
@@ -2367,8 +2367,8 @@ callDistApply(PropRefP refP, DhDistP distP, int groupNum,
groupNum1 = getGroupNum(distP->res1P->molP);
groupNum2 = getGroupNum(distP->res2P->molP);
if (atom1P->state == AS_VALID && atom2P->state == AS_VALID &&
- (groupNum1 == groupNum && groupNum2 == groupNum ||
- groupNum < 0 && groupNum1 != groupNum2))
+ ((groupNum1 == groupNum && groupNum2 == groupNum) ||
+ (groupNum < 0 && groupNum1 != groupNum2)))
applyF(distP, atom1P, atom2P, clientData);
}
}
diff --git a/src/expr/ExprScan.c b/src/expr/ExprScan.c
index dcef69e..6266b4d 100644
--- a/src/expr/ExprScan.c
+++ b/src/expr/ExprScan.c
@@ -221,7 +221,7 @@ ExprScanGetSym(void)
for (;;) {
if (isdigit(ch)) {
DStrAppChar(StrVal, ch);
- } else if (ch == '.' && ExprStr[1] != '.' ||
+ } else if ((ch == '.' && ExprStr[1] != '.') ||
ch == 'e' || ch == 'E') {
DStrAppChar(StrVal, ch);
isFloat = TRUE;
diff --git a/src/iodev/IODev.c b/src/iodev/IODev.c
index 9c04ce8..aa4f9a7 100644
--- a/src/iodev/IODev.c
+++ b/src/iodev/IODev.c
@@ -44,7 +44,6 @@ extern void IOMotifGLDSetDev(void);
#endif
#ifdef IO_DEV_MOTIF_OGL
extern void IOMotifOGLSetDev(void);
-extern void IOMotifOGLDSetDev(void);
#endif
#ifdef IO_DEV_MOTIF_XGL
extern void IOMotifXGLSetDev(void);
@@ -76,7 +75,6 @@ static DevListEntry DevList[] = {
#endif
#ifdef IO_DEV_MOTIF_OGL
{"Motif/OpenGL", IOMotifOGLSetDev},
- {"Motif/OpenGLD", IOMotifOGLDSetDev},
#endif
#ifdef IO_DEV_MOTIF_XGL
{"Motif/XGL", IOMotifXGLSetDev},
diff --git a/src/motif/MotifDial.c b/src/motif/MotifDial.c
index 2514549..6e3bfd7 100644
--- a/src/motif/MotifDial.c
+++ b/src/motif/MotifDial.c
@@ -1323,7 +1323,7 @@ PuMotifAddGizmoCB(PuGizmo gizmo, PuGizmoCBType type,
switch (type) {
case PU_CT_ACTIVATE:
- if (gType == GIZMO_TEXT_FIELD || GIZMO_TEXT)
+ if (gType == (GIZMO_TEXT_FIELD | GIZMO_TEXT))
XtAddCallback(gizmo, XmNactivateCallback, textActivateCB, infoP);
else if (gType == GIZMO_BUTTON)
XtAddCallback(gizmo, XmNactivateCallback, gizmoGenCB, infoP);
diff --git a/src/motif/MotifMainW.c b/src/motif/MotifMainW.c
index abbb444..77ce8fd 100644
--- a/src/motif/MotifMainW.c
+++ b/src/motif/MotifMainW.c
@@ -80,8 +80,8 @@ checkPressOrExpose(Display *dpy, XEvent *eventP, XPointer arg)
{
Window *winP = (Window *) arg;
- return eventP->type == ButtonPress && eventP->xbutton.window == *winP ||
- eventP->type == Expose && eventP->xexpose.window == *winP;
+ return (eventP->type == ButtonPress && eventP->xbutton.window == *winP) ||
+ (eventP->type == Expose && eventP->xexpose.window == *winP);
}
static void
diff --git a/src/os/GFile.c b/src/os/GFile.c
index d0d63b6..08d48c7 100644
--- a/src/os/GFile.c
+++ b/src/os/GFile.c
@@ -385,7 +385,7 @@ GFileEOF(GFile gf)
{
if (gf->format == GF_FORMAT_MEMORY)
return gf->currP == NULL ||
- gf->currP->nextP == NULL && gf->currPos == gf->currP->len;
+ (gf->currP->nextP == NULL && gf->currPos == gf->currP->len);
else
return feof(gf->fp);
}
diff --git a/src/prim/PrimDraw.c b/src/prim/PrimDraw.c
index 32bd593..ba89c57 100644
--- a/src/prim/PrimDraw.c
+++ b/src/prim/PrimDraw.c
@@ -461,7 +461,7 @@ drawRibbon(PrimObjP primP)
}
if (partP->paint == RP_ATOM ||
- partP->paint == RP_ATOM_SMOOTH && partP->polyNo > 0)
+ (partP->paint == RP_ATOM_SMOOTH && partP->polyNo > 0))
SgSetColor(attrP->colR, attrP->colG, attrP->colB);
if (partP->paint == RP_ATOM_SMOOTH)
diff --git a/src/prim/RibbonCalc.c b/src/prim/RibbonCalc.c
index 09874cf..0849d03 100644
--- a/src/prim/RibbonCalc.c
+++ b/src/prim/RibbonCalc.c
@@ -907,7 +907,7 @@ calcStrips(PrimObjP primP, PrimObjP prevP)
getSplinePoints(partP, ribbonP, ePar, partP->endPar, ePNo + 1,
parA + sPNo + mPNo - 1, xA + sPNo + mPNo - 1, dzA + sPNo + mPNo - 1);
- if (partP->style == RS_ROUND && partP->midRad == 0.0f ||
+ if ((partP->style == RS_ROUND && partP->midRad == 0.0f) ||
BreakInterrupted()) {
/* draw only one line */
partP->traceNo = 1;
@@ -1128,15 +1128,15 @@ calcStrips(PrimObjP primP, PrimObjP prevP)
Vec3Copy(partP->traceA[traceI].nvA[pointI], nv);
}
- if (pointI == 0 && partP->startStyle == RE_SHARP ||
- pointI == pointNo - ePNo && partP->endStyle == RE_ARROW)
+ if ((pointI == 0 && partP->startStyle == RE_SHARP) ||
+ (pointI == pointNo - ePNo && partP->endStyle == RE_ARROW))
Vec3Copy(partP->polyA[polyI].xA[traceNo - 1 - traceI], x);
else if (pointI == pointNo - 1 && partP->endStyle == RE_SHARP)
Vec3Copy(partP->polyA[polyI].xA[traceI], x);
}
- if (pointI == 0 && partP->startStyle == RE_SHARP ||
- pointI == pointNo - ePNo && partP->endStyle == RE_ARROW) {
+ if ((pointI == 0 && partP->startStyle == RE_SHARP) ||
+ (pointI == pointNo - ePNo && partP->endStyle == RE_ARROW)) {
Vec3Copy(x, dy);
Vec3Cross(x, dx);
Vec3Copy(partP->polyA[polyI].nv, x);
@@ -1327,7 +1327,7 @@ RibbonCalc(PrimObjP primP)
if (! partP->pointValid || prec != partP->prec ||
startRad != partP->startRad ||
- partP->style == RS_ROUND && midRad != partP->midRad ||
+ (partP->style == RS_ROUND && midRad != partP->midRad) ||
endRad != partP->endRad || radChanged) {
for (i = 0; i < partP->traceNo; i++) {
free(partP->traceA[i].xA);
diff --git a/src/pudev/PuMainW.c b/src/pudev/PuMainW.c
index 73d183b..d287345 100644
--- a/src/pudev/PuMainW.c
+++ b/src/pudev/PuMainW.c
@@ -57,7 +57,7 @@ PuSetTextField(PuTextFieldChoice fieldChoice, char *text)
if (text[0] != LOCK_CHAR)
return;
text++;
- if (text[0] == '\0' || text[0] == ' ' && text[1] == '\0') {
+ if (text[0] == '\0' || (text[0] == ' ' && text[1] == '\0')) {
StatusLocked = FALSE;
text = " ";
}
diff --git a/src/tty/TTY.c b/src/tty/TTY.c
index 0090f75..22adfef 100644
--- a/src/tty/TTY.c
+++ b/src/tty/TTY.c
@@ -164,7 +164,7 @@ PuTTYSwitchFullscreen(BOOL onOff)
void
PuTTYSetTextField(PuTextFieldChoice fieldChoice, char *text)
{
- if (text[0] == '\0' || text[0] == ' ' && text[1] == '\0')
+ if (text[0] == '\0' || (text[0] == ' ' && text[1] == '\0'))
return;
switch (fieldChoice) {
diff --git a/tools/src/IsoSurface.c b/tools/src/IsoSurface.c
index 5e11a98..09f89d0 100644
--- a/tools/src/IsoSurface.c
+++ b/tools/src/IsoSurface.c
@@ -104,19 +104,19 @@ typedef struct {
} Strip;
static CubeDesc CubeEven = {
- 0, 3, 5, 6, {{D_0, 1}, {D_0, 2}, {D_0, 3}, {D_0, 4}},
- 3, 0, 5, 1, {{D_0, 0}, {D_MZ, 4}, {D_MY, 1}, {D_PX, 2}},
- 0, 3, 6, 2, {{D_0, 0}, {D_MZ, 3}, {D_PY, 2}, {D_MX, 1}},
- 3, 5, 6, 7, {{D_0, 0}, {D_PX, 3}, {D_PZ, 1}, {D_PY, 4}},
- 5, 0, 6, 4, {{D_0, 0}, {D_MY, 3}, {D_MX, 4}, {D_PZ, 2}}
+ {{0, 3, 5, 6, {{D_0, 1}, {D_0, 2}, {D_0, 3}, {D_0, 4}}},
+ {3, 0, 5, 1, {{D_0, 0}, {D_MZ, 4}, {D_MY, 1}, {D_PX, 2}}},
+ {0, 3, 6, 2, {{D_0, 0}, {D_MZ, 3}, {D_PY, 2}, {D_MX, 1}}},
+ {3, 5, 6, 7, {{D_0, 0}, {D_PX, 3}, {D_PZ, 1}, {D_PY, 4}}},
+ {5, 0, 6, 4, {{D_0, 0}, {D_MY, 3}, {D_MX, 4}, {D_PZ, 2}}}}
};
static CubeDesc CubeOdd = {
- 1, 2, 7, 4, {{D_0, 1}, {D_0, 2}, {D_0, 3}, {D_0, 4}},
- 2, 1, 7, 3, {{D_0, 0}, {D_MZ, 3}, {D_PX, 2}, {D_PY, 1}},
- 1, 2, 4, 0, {{D_0, 0}, {D_MZ, 4}, {D_MX, 1}, {D_MY, 2}},
- 2, 7, 4, 6, {{D_0, 0}, {D_PY, 4}, {D_PZ, 2}, {D_MX, 3}},
- 7, 1, 4, 5, {{D_0, 0}, {D_PX, 4}, {D_MY, 3}, {D_PZ, 1}}
+ {{1, 2, 7, 4, {{D_0, 1}, {D_0, 2}, {D_0, 3}, {D_0, 4}}},
+ {2, 1, 7, 3, {{D_0, 0}, {D_MZ, 3}, {D_PX, 2}, {D_PY, 1}}},
+ {1, 2, 4, 0, {{D_0, 0}, {D_MZ, 4}, {D_MX, 1}, {D_MY, 2}}},
+ {2, 7, 4, 6, {{D_0, 0}, {D_PY, 4}, {D_PZ, 2}, {D_MX, 3}}},
+ {7, 1, 4, 5, {{D_0, 0}, {D_PX, 4}, {D_MY, 3}, {D_PZ, 1}}}}
};
static BOOL Initialized = FALSE;
@@ -158,7 +158,7 @@ fillFaces(TetDesc *tetP)
static BOOL
equalPair(int i00, int i01, int i10, int i11)
{
- return i00 == i10 && i01 == i11 || i00 == i11 && i01 == i10;
+ return (i00 == i10 && i01 == i11) || (i00 == i11 && i01 == i10);
}
static int