1 Return-Path: <tomi.ollila@iki.fi>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id C6C91431FB6
\r
6 for <notmuch@notmuchmail.org>; Sat, 29 Dec 2012 14:02:00 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id vTcK6-hQTAXP for <notmuch@notmuchmail.org>;
\r
16 Sat, 29 Dec 2012 14:01:57 -0800 (PST)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 1D448431FAF
\r
19 for <notmuch@notmuchmail.org>; Sat, 29 Dec 2012 14:01:57 -0800 (PST)
\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])
\r
21 by guru.guru-group.fi (Postfix) with ESMTP id 3F9571000CA;
\r
22 Sun, 30 Dec 2012 00:01:50 +0200 (EET)
\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
24 To: david@tethera.net, notmuch@notmuchmail.org
\r
25 Subject: Re: [PATCH] notmuch.c: run uncrustify
\r
26 In-Reply-To: <1356536434-15179-1-git-send-email-david@tethera.net>
\r
27 References: <1356536434-15179-1-git-send-email-david@tethera.net>
\r
28 User-Agent: Notmuch/0.14+216~gd58661f (http://notmuchmail.org) Emacs/24.2.1
\r
29 (x86_64-unknown-linux-gnu)
\r
30 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
31 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
32 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
33 Date: Sun, 30 Dec 2012 00:01:50 +0200
\r
34 Message-ID: <m2ehi8sek1.fsf@guru.guru-group.fi>
\r
36 Content-Type: text/plain
\r
37 Cc: David Bremner <bremner@debian.org>
\r
38 X-BeenThere: notmuch@notmuchmail.org
\r
39 X-Mailman-Version: 2.1.13
\r
41 List-Id: "Use and development of the notmuch mail system."
\r
42 <notmuch.notmuchmail.org>
\r
43 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
45 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
46 List-Post: <mailto:notmuch@notmuchmail.org>
\r
47 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
48 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
49 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
50 X-List-Received-Date: Sat, 29 Dec 2012 22:02:01 -0000
\r
52 On Wed, Dec 26 2012, david@tethera.net wrote:
\r
54 > From: David Bremner <bremner@debian.org>
\r
56 > In anticipation of doing some updates to this code, it simplifies life
\r
57 > if the code is "uncrustify clean" to start with
\r
60 About an year ago I did some work to preserve format
\r
61 type (*funcptr) (args)
\r
62 ... i.e. preserve space between (*funcptr) (args) -- among some
\r
63 other things uncrustify cannot do.
\r
64 We could take a closer look to the whole uncrustify business
\r
70 > notmuch.c | 23 +++++++++++------------
\r
71 > 1 file changed, 11 insertions(+), 12 deletions(-)
\r
73 > diff --git a/notmuch.c b/notmuch.c
\r
74 > index 9516dfb..ee2892e 100644
\r
79 > #include "notmuch-client.h"
\r
81 > -typedef int (*command_function_t) (void *ctx, int argc, char *argv[]);
\r
82 > +typedef int (*command_function_t)(void *ctx, int argc, char *argv[]);
\r
84 > typedef struct command {
\r
86 > @@ -39,8 +39,8 @@ typedef struct alias {
\r
89 > alias_t aliases[] = {
\r
90 > - { "part", { "show", "--format=raw"}},
\r
91 > - { "search-tags", {"search", "--output=tags", "*"}}
\r
92 > + { "part", { "show", "--format=raw" } },
\r
93 > + { "search-tags", { "search", "--output=tags", "*" } }
\r
97 > @@ -66,7 +66,7 @@ static command_t commands[] = {
\r
98 > "[options...] <search-terms> [...]",
\r
99 > "Construct a reply template for a set of messages." },
\r
100 > { "tag", notmuch_tag_command,
\r
101 > - "+<tag>|-<tag> [...] [--] <search-terms> [...]" ,
\r
102 > + "+<tag>|-<tag> [...] [--] <search-terms> [...]",
\r
103 > "Add/remove tags for all messages matching the search terms." },
\r
104 > { "dump", notmuch_dump_command,
\r
105 > "[<filename>] [--] [<search-terms>]",
\r
106 > @@ -107,8 +107,8 @@ usage (FILE *out)
\r
108 > fprintf (out, "\n");
\r
110 > - "Use \"notmuch help <command>\" for more details on each command\n"
\r
111 > - "and \"notmuch help search-terms\" for the common search-terms syntax.\n\n");
\r
112 > + "Use \"notmuch help <command>\" for more details on each command\n"
\r
113 > + "and \"notmuch help search-terms\" for the common search-terms syntax.\n\n");
\r
117 > @@ -281,15 +281,14 @@ main (int argc, char *argv[])
\r
118 > return notmuch_help_command (NULL, argc - 1, &argv[1]);
\r
120 > if (strcmp (argv[1], "--version") == 0) {
\r
121 > - printf ("notmuch " STRINGIFY(NOTMUCH_VERSION) "\n");
\r
122 > + printf ("notmuch " STRINGIFY (NOTMUCH_VERSION) "\n");
\r
126 > for (i = 0; i < ARRAY_SIZE (aliases); i++) {
\r
127 > alias = &aliases[i];
\r
129 > - if (strcmp (argv[1], alias->name) == 0)
\r
131 > + if (strcmp (argv[1], alias->name) == 0) {
\r
132 > int substitutions;
\r
134 > argv_local = talloc_size (local, sizeof (char *) *
\r
135 > @@ -304,14 +303,14 @@ main (int argc, char *argv[])
\r
136 > for (j = 0; j < MAX_ALIAS_SUBSTITUTIONS; j++) {
\r
137 > if (alias->substitutions[j] == NULL)
\r
139 > - argv_local[j+1] = alias->substitutions[j];
\r
140 > + argv_local[j + 1] = alias->substitutions[j];
\r
142 > substitutions = j;
\r
144 > /* And copy all original arguments (skipping the argument
\r
145 > * that matched the alias of course. */
\r
146 > for (j = 2; j < (unsigned) argc; j++) {
\r
147 > - argv_local[substitutions+j-1] = argv[j];
\r
148 > + argv_local[substitutions + j - 1] = argv[j];
\r
151 > argc += substitutions - 1;
\r
152 > @@ -323,7 +322,7 @@ main (int argc, char *argv[])
\r
153 > command = &commands[i];
\r
155 > if (strcmp (argv[1], command->name) == 0)
\r
156 > - return (command->function) (local, argc - 1, &argv[1]);
\r
157 > + return (command->function)(local, argc - 1, &argv[1]);
\r
160 > fprintf (stderr, "Error: Unknown command '%s' (see \"notmuch help\")\n",
\r
164 > _______________________________________________
\r
165 > notmuch mailing list
\r
166 > notmuch@notmuchmail.org
\r
167 > http://notmuchmail.org/mailman/listinfo/notmuch
\r