Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id CA34F431FAF for ; Wed, 26 Dec 2012 07:40:51 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 64vn1GFD3xT7 for ; Wed, 26 Dec 2012 07:40:51 -0800 (PST) Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 4524B431FAE for ; Wed, 26 Dec 2012 07:40:51 -0800 (PST) Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net ([156.34.82.78] helo=zancas.localnet) by tesseract.cs.unb.ca with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1Tnt6A-0002cE-0b; Wed, 26 Dec 2012 11:40:50 -0400 Received: from bremner by zancas.localnet with local (Exim 4.80) (envelope-from ) id 1Tnt64-0003xP-FT; Wed, 26 Dec 2012 11:40:44 -0400 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH] notmuch.c: run uncrustify Date: Wed, 26 Dec 2012 11:40:34 -0400 Message-Id: <1356536434-15179-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.10.4 X-Spam_bar: - Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 26 Dec 2012 15:40:51 -0000 From: David Bremner In anticipation of doing some updates to this code, it simplifies life if the code is "uncrustify clean" to start with --- notmuch.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/notmuch.c b/notmuch.c index 9516dfb..ee2892e 100644 --- a/notmuch.c +++ b/notmuch.c @@ -22,7 +22,7 @@ #include "notmuch-client.h" -typedef int (*command_function_t) (void *ctx, int argc, char *argv[]); +typedef int (*command_function_t)(void *ctx, int argc, char *argv[]); typedef struct command { const char *name; @@ -39,8 +39,8 @@ typedef struct alias { } alias_t; alias_t aliases[] = { - { "part", { "show", "--format=raw"}}, - { "search-tags", {"search", "--output=tags", "*"}} + { "part", { "show", "--format=raw" } }, + { "search-tags", { "search", "--output=tags", "*" } } }; static int @@ -66,7 +66,7 @@ static command_t commands[] = { "[options...] [...]", "Construct a reply template for a set of messages." }, { "tag", notmuch_tag_command, - "+|- [...] [--] [...]" , + "+|- [...] [--] [...]", "Add/remove tags for all messages matching the search terms." }, { "dump", notmuch_dump_command, "[] [--] []", @@ -107,8 +107,8 @@ usage (FILE *out) fprintf (out, "\n"); fprintf (out, - "Use \"notmuch help \" for more details on each command\n" - "and \"notmuch help search-terms\" for the common search-terms syntax.\n\n"); + "Use \"notmuch help \" for more details on each command\n" + "and \"notmuch help search-terms\" for the common search-terms syntax.\n\n"); } void @@ -281,15 +281,14 @@ main (int argc, char *argv[]) return notmuch_help_command (NULL, argc - 1, &argv[1]); if (strcmp (argv[1], "--version") == 0) { - printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n"); + printf ("notmuch " STRINGIFY (NOTMUCH_VERSION) "\n"); return 0; } for (i = 0; i < ARRAY_SIZE (aliases); i++) { alias = &aliases[i]; - if (strcmp (argv[1], alias->name) == 0) - { + if (strcmp (argv[1], alias->name) == 0) { int substitutions; argv_local = talloc_size (local, sizeof (char *) * @@ -304,14 +303,14 @@ main (int argc, char *argv[]) for (j = 0; j < MAX_ALIAS_SUBSTITUTIONS; j++) { if (alias->substitutions[j] == NULL) break; - argv_local[j+1] = alias->substitutions[j]; + argv_local[j + 1] = alias->substitutions[j]; } substitutions = j; /* And copy all original arguments (skipping the argument * that matched the alias of course. */ for (j = 2; j < (unsigned) argc; j++) { - argv_local[substitutions+j-1] = argv[j]; + argv_local[substitutions + j - 1] = argv[j]; } argc += substitutions - 1; @@ -323,7 +322,7 @@ main (int argc, char *argv[]) command = &commands[i]; if (strcmp (argv[1], command->name) == 0) - return (command->function) (local, argc - 1, &argv[1]); + return (command->function)(local, argc - 1, &argv[1]); } fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n", -- 1.7.10.4