if ((f = fopen (HistFile, "r")) == NULL)
return;
- while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
+ while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
{
read = 0;
if (sscanf (linebuf, "%d:%n", &hclass, &read) < 1 || read == 0 ||
}
}
- fclose (f);
+ safe_fclose (&f);
FREE (&linebuf);
}
return;
line = 0;
- while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
+ while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
{
if (sscanf (linebuf, "%d", &hclass) < 1 || hclass < 0)
{
{
rewind (f);
line = 0;
- while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line)) != NULL)
+ while ((linebuf = mutt_read_line (linebuf, &buflen, f, &line, 0)) != NULL)
{
if (sscanf (linebuf, "%d", &hclass) < 1 || hclass < 0)
{
}
cleanup:
- fclose (f);
+ safe_fclose (&f);
FREE (&linebuf);
if (tmp != NULL)
{
{
rewind (tmp);
mutt_copy_stream (tmp, f);
- fclose (f);
+ safe_fclose (&f);
}
- fclose (tmp);
+ safe_fclose (&tmp);
unlink (tmpfname);
}
}
}
fputs ("|\n", f);
- fclose (f);
+ safe_fclose (&f);
FREE (&tmp);
if (--n < 0)