1 Return-Path: <jani@nikula.org>
\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 4695A431FBF
\r
6 for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:31 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id nSTK87CLosLH for <notmuch@notmuchmail.org>;
\r
17 Wed, 16 Oct 2013 12:00:25 -0700 (PDT)
\r
18 Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com
\r
19 [74.125.83.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 A9880431FBC for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:22 -0700
\r
23 Received: by mail-ee0-f53.google.com with SMTP id t10so586557eei.12
\r
24 for <notmuch@notmuchmail.org>; Wed, 16 Oct 2013 12:00:21 -0700 (PDT)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=0jhZf2PmKZqigaHc2c61VZ4OV+UCWbgw6/2uuPiZmdg=;
\r
30 b=Kz4scS91bpvglyq6HYMYGsbfYosnD8AgAfN+mHRgetN6mjQJuQPC0eJCTCIUp/hP6k
\r
31 txH2XHNWGPwD94cAlEg0Jg6vlNwEMJyQmG7zD+r+ienzyR7Ph/1Srse13g/96z2/LcOW
\r
32 aeEgXZJd0q0a/H2exH7xj3OJtC3g6Nt1n2UsvRV8jA4ZsolGn8W1+0U0QvifWtFaSLTr
\r
33 v9hnmhv0pn27XyNuVGpw2a7uX/dAZO06w9r6587DkAZHCj+ffjbUNmU3mJlEn3Ul1ghq
\r
34 z29Os7NbKH/mTtoR9lXL/gKGqarkMTUEujL2CVWtRwO9S/iMTV8P15TsyEk766vFgu/q
\r
37 ALoCoQnEOrEq8xkg+8znaDTS10VqrpicE5cT3XFVCXIhVFmihJdwIL8mTE/r6N24ktEA75xw+xpO
\r
38 X-Received: by 10.14.214.136 with SMTP id c8mr6788769eep.6.1381950021607;
\r
39 Wed, 16 Oct 2013 12:00:21 -0700 (PDT)
\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
41 [88.195.111.91]) by mx.google.com with ESMTPSA id
\r
42 x47sm183065494eea.16.1969.12.31.16.00.00
\r
43 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
44 Wed, 16 Oct 2013 12:00:20 -0700 (PDT)
\r
45 From: Jani Nikula <jani@nikula.org>
\r
46 To: notmuch@notmuchmail.org
\r
47 Subject: [PATCH 2/6] cli: sanitize tabs to spaces in notmuch search
\r
48 Date: Wed, 16 Oct 2013 22:00:09 +0300
\r
50 <af8381b86275c4be77cc8527a19d69efbd2e9423.1381948853.git.jani@nikula.org>
\r
51 X-Mailer: git-send-email 1.8.4.rc3
\r
52 In-Reply-To: <cover.1381948853.git.jani@nikula.org>
\r
53 References: <cover.1381948853.git.jani@nikula.org>
\r
54 In-Reply-To: <cover.1381948853.git.jani@nikula.org>
\r
55 References: <cover.1381948853.git.jani@nikula.org>
\r
56 X-BeenThere: notmuch@notmuchmail.org
\r
57 X-Mailman-Version: 2.1.13
\r
59 List-Id: "Use and development of the notmuch mail system."
\r
60 <notmuch.notmuchmail.org>
\r
61 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
62 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
63 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
64 List-Post: <mailto:notmuch@notmuchmail.org>
\r
65 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
66 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
67 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
68 X-List-Received-Date: Wed, 16 Oct 2013 19:00:31 -0000
\r
70 This is in preparation of switching to gmime header parsing, but
\r
71 arguably converting tabs to spaces rather than question marks is the
\r
72 right thing to do anyway.
\r
74 notmuch-search.c | 4 +++-
\r
75 1 file changed, 3 insertions(+), 1 deletion(-)
\r
77 diff --git a/notmuch-search.c b/notmuch-search.c
\r
78 index d9d39ec..eab314f 100644
\r
79 --- a/notmuch-search.c
\r
80 +++ b/notmuch-search.c
\r
81 @@ -40,7 +40,9 @@ sanitize_string (const void *ctx, const char *str)
\r
82 loop = out = talloc_strdup (ctx, str);
\r
84 for (; *loop; loop++) {
\r
85 - if ((unsigned char)(*loop) < 32)
\r
86 + if (*loop == '\t')
\r
88 + else if ((unsigned char)(*loop) < 32)
\r