[PATCH v6 3/6] cli: drop unused code from notmuch count
authorJani Nikula <jani@nikula.org>
Sun, 13 Nov 2011 21:15:32 +0000 (23:15 +0200)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:40:09 +0000 (09:40 -0800)
3b/457694870059c45d6fd6a0fbe33912174f8934 [new file with mode: 0644]

diff --git a/3b/457694870059c45d6fd6a0fbe33912174f8934 b/3b/457694870059c45d6fd6a0fbe33912174f8934
new file mode 100644 (file)
index 0000000..3e44921
--- /dev/null
@@ -0,0 +1,115 @@
+Return-Path: <jani@nikula.org>\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 472E9429E2F\r
+       for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 13:15:52 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 G-lVMKl5DruQ for <notmuch@notmuchmail.org>;\r
+       Sun, 13 Nov 2011 13:15:51 -0800 (PST)\r
+Received: from mail-bw0-f53.google.com (mail-bw0-f53.google.com\r
+       [209.85.214.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 59B49429E2E\r
+       for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 13:15:51 -0800 (PST)\r
+Received: by mail-bw0-f53.google.com with SMTP id q10so6289712bka.26\r
+       for <notmuch@notmuchmail.org>; Sun, 13 Nov 2011 13:15:51 -0800 (PST)\r
+Received: by 10.204.154.77 with SMTP id n13mr16523112bkw.83.1321218950776;\r
+       Sun, 13 Nov 2011 13:15:50 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe5cdc00-23.dhcp.inet.fi.\r
+       [80.220.92.23])\r
+       by mx.google.com with ESMTPS id j9sm27632418bkd.2.2011.11.13.13.15.48\r
+       (version=SSLv3 cipher=OTHER); Sun, 13 Nov 2011 13:15:49 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v6 3/6] cli: drop unused code from notmuch count\r
+Date: Sun, 13 Nov 2011 23:15:32 +0200\r
+Message-Id:\r
+ <0ddf42fdf9f47c4775828f07d984078fa8c8c45e.1321217854.git.jani@nikula.org>\r
+X-Mailer: git-send-email 1.7.5.4\r
+In-Reply-To: <cover.1321217854.git.jani@nikula.org>\r
+References: <cover.1321217854.git.jani@nikula.org>\r
+In-Reply-To: <cover.1321217854.git.jani@nikula.org>\r
+References: <cover.1321217854.git.jani@nikula.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: Sun, 13 Nov 2011 21:15:52 -0000\r
+\r
+Remove unused code within #if 0 blocks from notmuch count.\r
+\r
+Signed-off-by: Jani Nikula <jani@nikula.org>\r
+---\r
+ notmuch-count.c |   32 --------------------------------\r
+ 1 files changed, 0 insertions(+), 32 deletions(-)\r
+\r
+diff --git a/notmuch-count.c b/notmuch-count.c\r
+index 0d700a9..a35be40 100644\r
+--- a/notmuch-count.c\r
++++ b/notmuch-count.c\r
+@@ -29,11 +29,6 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
+     notmuch_query_t *query;\r
+     char *query_str;\r
+     int i;\r
+-#if 0\r
+-    char *opt, *end;\r
+-    int i, first = 0, max_threads = -1;\r
+-    notmuch_sort_t sort = NOTMUCH_SORT_NEWEST_FIRST;\r
+-#endif\r
\r
+     argc--; argv++; /* skip subcommand argument */\r
\r
+@@ -42,33 +37,6 @@ notmuch_count_command (void *ctx, int argc, char *argv[])\r
+           i++;\r
+           break;\r
+       }\r
+-#if 0\r
+-      if (STRNCMP_LITERAL (argv[i], "--first=") == 0) {\r
+-          opt = argv[i] + sizeof ("--first=") - 1;\r
+-          first = strtoul (opt, &end, 10);\r
+-          if (*opt == '\0' || *end != '\0') {\r
+-              fprintf (stderr, "Invalid value for --first: %s\n", opt);\r
+-              return 1;\r
+-          }\r
+-      } else if (STRNCMP_LITERAL (argv[i], "--max-threads=") == 0) {\r
+-          opt = argv[i] + sizeof ("--max-threads=") - 1;\r
+-          max_threads = strtoul (opt, &end, 10);\r
+-          if (*opt == '\0' || *end != '\0') {\r
+-              fprintf (stderr, "Invalid value for --max-threads: %s\n", opt);\r
+-              return 1;\r
+-          }\r
+-      } else if (STRNCMP_LITERAL (argv[i], "--sort=") == 0) {\r
+-          opt = argv[i] + sizeof ("--sort=") - 1;\r
+-          if (strcmp (opt, "oldest-first") == 0) {\r
+-              sort = NOTMUCH_SORT_OLDEST_FIRST;\r
+-          } else if (strcmp (opt, "newest-first") == 0) {\r
+-              sort = NOTMUCH_SORT_NEWEST_FIRST;\r
+-          } else {\r
+-              fprintf (stderr, "Invalid value for --sort: %s\n", opt);\r
+-              return 1;\r
+-          }\r
+-      } else\r
+-#endif\r
+       {\r
+           fprintf (stderr, "Unrecognized option: %s\n", argv[i]);\r
+           return 1;\r
+-- \r
+1.7.5.4\r
+\r