[PATCH 2/3] notmuch-restore: tidy formatting
authordavid <david@tethera.net>
Thu, 15 Nov 2012 01:33:21 +0000 (21:33 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:34 +0000 (09:50 -0800)
8b/a7a870fbff020cd8812167d603d8ddf445794f [new file with mode: 0644]

diff --git a/8b/a7a870fbff020cd8812167d603d8ddf445794f b/8b/a7a870fbff020cd8812167d603d8ddf445794f
new file mode 100644 (file)
index 0000000..adb3a91
--- /dev/null
@@ -0,0 +1,134 @@
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id BFB54431FC0\r
+       for <notmuch@notmuchmail.org>; Wed, 14 Nov 2012 17:33:43 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id OV2uaaXOdSAC for <notmuch@notmuchmail.org>;\r
+       Wed, 14 Nov 2012 17:33:41 -0800 (PST)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id C1695431FD8\r
+       for <notmuch@notmuchmail.org>; Wed, 14 Nov 2012 17:33:41 -0800 (PST)\r
+Received: from fctnnbsc30w-156034089108.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([156.34.89.108] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa\r
+       (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1TYoKr-0007Yb-10; Wed, 14 Nov 2012 21:33:41 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1TYoKl-0000U9-G8; Wed, 14 Nov 2012 21:33:35 -0400\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/3] notmuch-restore: tidy formatting\r
+Date: Wed, 14 Nov 2012 21:33:21 -0400\r
+Message-Id: <1352943202-1431-3-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1352943202-1431-1-git-send-email-david@tethera.net>\r
+References: <1352943202-1431-1-git-send-email-david@tethera.net>\r
+X-Spam_bar: -\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 15 Nov 2012 01:33:44 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+This is again the work of uncrustify.\r
+\r
+I remember there is some controversy about "! foo" versus "!foo", but\r
+in context I think "! foo" looks OK. Also, for functions "! foo\r
+(blah)" seems better than "!foo (blah)".\r
+---\r
+ notmuch-restore.c |   15 +++++++--------\r
+ 1 file changed, 7 insertions(+), 8 deletions(-)\r
+\r
+diff --git a/notmuch-restore.c b/notmuch-restore.c\r
+index 7d8f44c..f03dcac 100644\r
+--- a/notmuch-restore.c\r
++++ b/notmuch-restore.c\r
+@@ -38,13 +38,13 @@ tag_message (notmuch_database_t *notmuch, const char *message_id,\r
+       fprintf (stderr, "Warning: Cannot apply tags to %smessage: %s\n",\r
+                message ? "" : "missing ", message_id);\r
+       if (status)\r
+-          fprintf (stderr, "%s\n", notmuch_status_to_string(status));\r
++          fprintf (stderr, "%s\n", notmuch_status_to_string (status));\r
+       return 1;\r
+     }\r
\r
+     /* In order to detect missing messages, this check/optimization is\r
+      * intentionally done *after* first finding the message. */\r
+-    if (!remove_all && (file_tags == NULL || *file_tags == '\0'))\r
++    if (! remove_all && (file_tags == NULL || *file_tags == '\0'))\r
+       goto DONE;\r
\r
+     db_tags_str = NULL;\r
+@@ -88,7 +88,7 @@ tag_message (notmuch_database_t *notmuch, const char *message_id,\r
+     if (synchronize_flags)\r
+       notmuch_message_tags_to_maildir_flags (message);\r
\r
+-DONE:\r
++  DONE:\r
+     if (message)\r
+       notmuch_message_destroy (message);\r
\r
+@@ -145,7 +145,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])\r
\r
+     if (opt_index < argc) {\r
+       fprintf (stderr,\r
+-       "Unused positional parameter: %s\n",\r
++               "Unused positional parameter: %s\n",\r
+                argv[opt_index]);\r
+       return 1;\r
+     }\r
+@@ -157,7 +157,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])\r
+     if ( xregcomp (&regex,\r
+                  "^([^ ]+) \\(([^)]*)\\)$",\r
+                  REG_EXTENDED) )\r
+-      INTERNAL_ERROR("compile time constant regex failed.");\r
++      INTERNAL_ERROR ("compile time constant regex failed.");\r
\r
+     while ((line_len = getline (&line, &line_size, input)) != -1) {\r
+       regmatch_t match[3];\r
+@@ -166,8 +166,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])\r
+       chomp_newline (line);\r
\r
+       rerr = xregexec (&regex, line, 3, match, 0);\r
+-      if (rerr == REG_NOMATCH)\r
+-      {\r
++      if (rerr == REG_NOMATCH) {\r
+           fprintf (stderr, "Warning: Ignoring invalid input line: %s\n",\r
+                    line);\r
+           continue;\r
+@@ -178,7 +177,7 @@ notmuch_restore_command (unused (void *ctx), int argc, char *argv[])\r
+       file_tags = xstrndup (line + match[2].rm_so,\r
+                             match[2].rm_eo - match[2].rm_so);\r
\r
+-      tag_message (notmuch, message_id, file_tags, !accumulate,\r
++      tag_message (notmuch, message_id, file_tags, ! accumulate,\r
+                    synchronize_flags);\r
\r
+       free (message_id);\r
+-- \r
+1.7.10.4\r
+\r