/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2013 Hiroyuki Yamamoto & The Claws Mail Team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2016 Hiroyuki Yamamoto & The Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifdef HAVE_CONFIG_H
static gboolean parse_append_filename(GString *cmd, MsgInfo *msginfo)
{
gchar *filename;
- gchar *p, *q;
- gchar escape_ch[] = "\\ ";
cm_return_val_if_fail(msginfo, FALSE);
return FALSE;
}
- p = filename;
g_string_append(cmd, "\"");
#ifdef G_OS_UNIX
+ gchar *p = filename, *q;
+ gchar escape_ch[] = "\\ ";
while ((q = strpbrk(p, "$\"`\\~")) != NULL) {
escape_ch[1] = *q;
*q = '\0';
ret = procmime_get_part(part_filename, partinfo);
if (single_part)
- procmime_mimeinfo_free_all(partinfo);
+ procmime_mimeinfo_free_all(&partinfo);
g_free(filename);
if (ret < 0) {
- alertpanel_error(_("Can't get part of multipart message: %s"), strerror(-ret));
+ alertpanel_error(_("Can't get part of multipart message: %s"), g_strerror(-ret));
g_free(part_filename);
return FALSE;
}
r = close(chld_in);
child_info->chld_in = -1; /* No more input */
if (r != 0)
- debug_print("%s(%d)", strerror(errno), errno);
+ debug_print("piping to child process: %s (%d)\n", g_strerror(errno), errno);
}
return child_info;
modified_something = TRUE;
last_item = nmi->folder;
}
- procmsg_msginfo_free (nmi);
+ procmsg_msginfo_free (&nmi);
if (summaryview && summaryview->displayed &&
summaryview->folder_item == msginfo->folder &&
summary_get_msgnum(summaryview, summaryview->displayed) == msginfo->msgnum)
r = close(child_info->chld_in);
child_info->chld_in = -1;
if (r != 0)
- debug_print("%s(%d)", strerror(errno), errno);
+ debug_print("closing child input fd: %s (%d)\n", g_strerror(errno), errno);
child_info->chld_in = -1;
debug_print("Input to grand child sent.\n");
}