]> git.notmuchmail.org Git - notmuch/blobdiff - show-message.c
configure: Fix installation of library to work with alternate --prefix
[notmuch] / show-message.c
index 2d3189e33474b02e2e177827f4ab17b3459d24b3..05ced9c421c5ec780563312765ea43fa2a5f87df 100644 (file)
@@ -26,20 +26,11 @@ static void
 show_message_part (GMimeObject *part, int *part_count,
                   void (*show_part) (GMimeObject *part, int *part_count))
 {
-    *part_count = *part_count + 1;
-
     if (GMIME_IS_MULTIPART (part)) {
        GMimeMultipart *multipart = GMIME_MULTIPART (part);
        int i;
 
        for (i = 0; i < g_mime_multipart_get_count (multipart); i++) {
-           if (GMIME_IS_MULTIPART_SIGNED (multipart)) {
-               /* Don't index the signature. */
-               if (i == 1)
-                   continue;
-               if (i > 1)
-                   fprintf (stderr, "Warning: Unexpected extra parts of mutlipart/signed. Continuing.\n");
-           }
            show_message_part (g_mime_multipart_get_part (multipart, i),
                               part_count, show_part);
        }
@@ -63,6 +54,8 @@ show_message_part (GMimeObject *part, int *part_count,
        return;
     }
 
+    *part_count = *part_count + 1;
+
     (*show_part) (part, part_count);
 }
 
@@ -74,15 +67,9 @@ show_message_body (const char *filename,
     GMimeParser *parser = NULL;
     GMimeMessage *mime_message = NULL;
     notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
-    static int initialized = 0;
     FILE *file = NULL;
     int part_count = 0;
 
-    if (! initialized) {
-       g_mime_init (0);
-       initialized = 1;
-    }
-
     file = fopen (filename, "r");
     if (! file) {
        fprintf (stderr, "Error opening %s: %s\n", filename, strerror (errno));