[PATCH] notmuch.c: run uncrustify
david at tethera.net
david at tethera.net
Wed Dec 26 07:40:34 PST 2012
From: David Bremner <bremner at debian.org>
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...] <search-terms> [...]",
"Construct a reply template for a set of messages." },
{ "tag", notmuch_tag_command,
- "+<tag>|-<tag> [...] [--] <search-terms> [...]" ,
+ "+<tag>|-<tag> [...] [--] <search-terms> [...]",
"Add/remove tags for all messages matching the search terms." },
{ "dump", notmuch_dump_command,
"[<filename>] [--] [<search-terms>]",
@@ -107,8 +107,8 @@ usage (FILE *out)
fprintf (out, "\n");
fprintf (out,
- "Use \"notmuch help <command>\" for more details on each command\n"
- "and \"notmuch help search-terms\" for the common search-terms syntax.\n\n");
+ "Use \"notmuch help <command>\" 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
More information about the notmuch
mailing list