/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
float time;
int step;
int ret;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
}
/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
int step;
float time;
int ret;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
return -1;
}
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
int ret;
int step;
float time;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
}
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
{
- *bOK = 1;
+ *bOK = true;
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return step;
float time;
/* read one int just to make sure we dont read this frame but the next */
xdr_int(xdrs, &step);
- while (1)
+ while (true)
{
ret = xtc_at_header_start(fp, xdrs, natoms, &step, &time);
if (ret == 1)
float tinit;
gmx_off_t off;
- *bOK = 0;
+ *bOK = false;
if ((off = gmx_ftell(fp)) < 0)
{
return -1;
res -= tinit;
if (0 != gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return res;
return -1;
}
- while (1)
+ while (true)
{
fr = xtc_get_next_frame_number(fp, xdrs, natoms);
if (fr < 0)
}
*/
- while (1)
+ while (true)
{
dt = xdr_xtc_estimate_dt(fp, xdrs, natoms, &bOK);
if (!bOK)
{
float time;
gmx_off_t off;
- *bOK = 1;
+ *bOK = true;
off = gmx_ftell(fp);
if (off < 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END) != 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, off, SEEK_SET) != 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
return time;
{
int frame;
gmx_off_t off;
- *bOK = 1;
+ *bOK = true;
if ((off = gmx_ftell(fp)) < 0)
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, -3*XDR_INT_SIZE, SEEK_END))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}
if (gmx_fseek(fp, off, SEEK_SET))
{
- *bOK = 0;
+ *bOK = false;
return -1;
}