aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Jani Nikula <jani@nikula.org>2013-03-30 15:53:17 +0200
committerGravatar David Bremner <bremner@unb.ca>2013-04-01 15:39:41 -0400
commit1c450ec5fab8ca985b4ee07460f233f032577fbc (patch)
tree1f32cf203222954eb554e58ce5b93026a5c41994
parentd487ef9e58bcd193118f19f771d5ef3984616be5 (diff)
cli: conform to same conditional build style as elsewhere in notmuch-show
Conform to the same style for #ifdef GMIME_ATLEAST_26 conditional builds as elsewhere. There are no functional changes.
-rw-r--r--notmuch-show.c46
1 files changed, 26 insertions, 20 deletions
diff --git a/notmuch-show.c b/notmuch-show.c
index c2ec122c..62178f72 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -335,6 +335,8 @@ show_text_part_content (GMimeObject *part, GMimeStream *stream_out,
}
#ifdef GMIME_ATLEAST_26
+
+/* Get signature status string (GMime 2.6) */
static const char*
signature_status_to_string (GMimeSignatureStatus x)
{
@@ -348,25 +350,8 @@ signature_status_to_string (GMimeSignatureStatus x)
}
return "unknown";
}
-#else
-static const char*
-signer_status_to_string (GMimeSignerStatus x)
-{
- switch (x) {
- case GMIME_SIGNER_STATUS_NONE:
- return "none";
- case GMIME_SIGNER_STATUS_GOOD:
- return "good";
- case GMIME_SIGNER_STATUS_BAD:
- return "bad";
- case GMIME_SIGNER_STATUS_ERROR:
- return "error";
- }
- return "unknown";
-}
-#endif
-#ifdef GMIME_ATLEAST_26
+/* Signature status sprinter (GMime 2.6) */
static void
format_part_sigstatus_sprinter (sprinter_t *sp, mime_node_t *node)
{
@@ -441,7 +426,27 @@ format_part_sigstatus_sprinter (sprinter_t *sp, mime_node_t *node)
sp->end (sp);
}
-#else
+
+#else /* GMIME_ATLEAST_26 */
+
+/* Get signature status string (GMime 2.4) */
+static const char*
+signer_status_to_string (GMimeSignerStatus x)
+{
+ switch (x) {
+ case GMIME_SIGNER_STATUS_NONE:
+ return "none";
+ case GMIME_SIGNER_STATUS_GOOD:
+ return "good";
+ case GMIME_SIGNER_STATUS_BAD:
+ return "bad";
+ case GMIME_SIGNER_STATUS_ERROR:
+ return "error";
+ }
+ return "unknown";
+}
+
+/* Signature status sprinter (GMime 2.4) */
static void
format_part_sigstatus_sprinter (sprinter_t *sp, mime_node_t *node)
{
@@ -504,7 +509,8 @@ format_part_sigstatus_sprinter (sprinter_t *sp, mime_node_t *node)
sp->end (sp);
}
-#endif
+
+#endif /* GMIME_ATLEAST_26 */
static notmuch_status_t
format_part_text (const void *ctx, sprinter_t *sp, mime_node_t *node,