+
+static char *
+_extend_header (char *combined, const char *value) {
+ char *decoded;
+
+ decoded = g_mime_utils_header_decode_text (value);
+ if (! decoded) {
+ if (combined) {
+ g_free (combined);
+ combined = NULL;
+ }
+ goto DONE;
+ }
+
+ if (combined) {
+ char *tmp = g_strdup_printf ("%s %s", combined, decoded);
+ g_free (decoded);
+ g_free (combined);
+ if (! tmp) {
+ combined = NULL;
+ goto DONE;
+ }
+
+ combined = tmp;
+ } else {
+ combined = decoded;
+ }
+ DONE:
+ return combined;
+}
+