if (!(pdesc.ifp = fopen(iname, mode)))
{
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(pdesc.dfp);
else
#endif
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
if (!fread((char *) &pdesc64.header, sizeof(pdesc64.header), 1, ifp))
{
fprintf(stderr, "%s: error reading header\n", prefix);
-
+
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
{
/* nope, not "64-bit" after all */
fprintf(stderr, "%s: error reading header\n", prefix);
-
+
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
if (pdesc.header.pih_numwords < 1)
{
fprintf(stderr, "%s: invalid word count\n", prefix);
-
+
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
pdesc.header.pih_magic = 0;
fclose(ifp);
#ifdef HAVE_ZLIB_H
- if(pdesc.flags & PFOR_USEZLIB)
+ if (pdesc.flags & PFOR_USEZLIB)
gzclose(dfp);
else
#endif
fclose(dfp);
- if(wfp)
+ if (wfp)
{
fclose(wfp);
}
{
pdesc.hwms[i] = pdesc64.hwms[i];
}
- }
+ }
else if (fread(pdesc.hwms, 1, sizeof(pdesc.hwms), wfp) != sizeof(pdesc.hwms))
{
pdesc.flags &= ~PFOR_USEHWMS;
fclose(pwp->ifp);
#ifdef HAVE_ZLIB_H
- if(pwp->flags & PFOR_USEZLIB)
+ if (pwp->flags & PFOR_USEZLIB)
gzclose(pwp->dfp);
else
#endif
fclose(pwp->dfp);
- if(pwp->wfp)
+ if (pwp->wfp)
{
fclose(pwp->wfp);
}
if (pwp->flags & PFOR_USEZLIB)
{
r = gzseek(pwp->dfp, datum, 0);
- if(r >= 0)
+ if (r >= 0)
r = 0;
}
else
#endif
r = fseek(pwp->dfp, datum, 0);
-
+
if (r)
{
perror("(data fseek failed)");
if (pwp->flags & PFOR_USEZLIB)
{
r = gzread(pwp->dfp, buffer, sizeof(buffer));
- if(r < 0)
+ if (r < 0)
r = 0;
}
else
#endif
r = fread(buffer, 1, sizeof(buffer), pwp->dfp);
-
-
-
+
if (!r)
{
perror("(data fread failed)");
if (middle == hwm)
{
-#if DEBUG
+#if DEBUG
fprintf(stderr, "at terminal subdivision, stopping search\n");
#endif
break;
if (cmp < 0)
{
hwm = middle;
- }
+ }
else if (cmp > 0)
{
lwm = middle;
- }
+ }
}
return (PW_WORDS(pwp));