[PATCH v2 3/3] cli: conform to same conditional build style as elsewhere in notmuch-show
Jani Nikula
jani at nikula.org
Sat Mar 30 06:53:17 PDT 2013
Conform to the same style for #ifdef GMIME_ATLEAST_26 conditional
builds as elsewhere.
There are no functional changes.
---
notmuch-show.c | 46 ++++++++++++++++++++++++++--------------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/notmuch-show.c b/notmuch-show.c
index c2ec122..62178f7 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,
--
1.7.10.4
More information about the notmuch
mailing list