+static void mh_remove_queue_headers (const gchar *file)
+{
+ FILE *fp, *fp2;
+ char *tmp;
+ fp = fopen(file, "rb");
+ tmp = get_tmp_file();
+
+ fp2 = fopen(tmp, "wb");
+ if (fp && fp2) {
+ char buf[BUFFSIZE];
+ int len;
+ while (fgets(buf, sizeof(buf), fp) != NULL)
+ if (buf[0] == '\r' || buf[0] == '\n')
+ break;
+
+ while ((len=fread(buf, sizeof(char), sizeof(buf), fp)) > 0) {
+ fwrite(buf, len, 1, fp2);
+ }
+ fclose(fp);
+ fclose(fp2);
+ move_file(tmp, file, TRUE);
+ } else {
+ if (fp)
+ fclose(fp);
+ else
+ g_warning (_("Couldn't fopen(\"%s\",\"rb\")\n"), file);
+ if (fp2)
+ fclose(fp2);
+ else
+ g_warning (_("Couldn't fopen(\"%s\",\"wb\")\n"), tmp);
+ }
+ g_free(tmp);
+}
+