Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / a2 / d1eda84b4c8b3af7f6c9cfa6b5b9b6830db790
1 Return-Path: <m.walters@qmul.ac.uk>\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 CDB60431FC0\r
6         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 09:01:00 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -1.098\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
12         tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
13         NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] 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 fNeaj-SMniNn for <notmuch@notmuchmail.org>;\r
17         Tue,  7 Aug 2012 09:00:59 -0700 (PDT)\r
18 Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
19         (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id A7DC1431FAF\r
22         for <notmuch@notmuchmail.org>; Tue,  7 Aug 2012 09:00:59 -0700 (PDT)\r
23 Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
24         by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
25         (envelope-from <m.walters@qmul.ac.uk>)\r
26         id 1SymDJ-0004H7-Og; Tue, 07 Aug 2012 17:00:58 +0100\r
27 Received: from 94-192-233-223.zone6.bethere.co.uk ([94.192.233.223]\r
28         helo=localhost)\r
29         by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69)\r
30         (envelope-from <m.walters@qmul.ac.uk>)\r
31         id 1SymDJ-0002Cf-AQ; Tue, 07 Aug 2012 17:00:57 +0100\r
32 From: Mark Walters <markwalters1009@gmail.com>\r
33 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org\r
34 Subject: Re: [PATCH] cli: Remove now-unused json.c\r
35 In-Reply-To: <1344344667-19114-1-git-send-email-amdragon@mit.edu>\r
36 References: <1344344667-19114-1-git-send-email-amdragon@mit.edu>\r
37 User-Agent: Notmuch/0.13.2+96~g634443c (http://notmuchmail.org) Emacs/23.4.1\r
38         (x86_64-pc-linux-gnu)\r
39 Date: Tue, 07 Aug 2012 17:00:49 +0100\r
40 Message-ID: <87hasebsjy.fsf@qmul.ac.uk>\r
41 MIME-Version: 1.0\r
42 Content-Type: text/plain; charset=utf-8\r
43 Content-Transfer-Encoding: quoted-printable\r
44 X-Sender-Host-Address: 94.192.233.223\r
45 X-QM-SPAM-Info: Sender has good ham record.  :)\r
46 X-QM-Body-MD5: 017434ca916f5c82319bd8c12f417e14 (of first 20000 bytes)\r
47 X-SpamAssassin-Score: -1.8\r
48 X-SpamAssassin-SpamBar: -\r
49 X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
50         determine if it is\r
51         spam. We require at least 5.0 points to mark a message as spam.\r
52         This message scored -1.8 points.\r
53         Summary of the scoring: \r
54         * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/,\r
55         *      medium trust\r
56         *      [138.37.6.40 listed in list.dnswl.org]\r
57         * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
58         provider *      (markwalters1009[at]gmail.com)\r
59         * -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay\r
60         *      domain\r
61         *  0.5 AWL AWL: From: address is in the auto white-list\r
62 X-QM-Scan-Virus: ClamAV says the message is clean\r
63 X-BeenThere: notmuch@notmuchmail.org\r
64 X-Mailman-Version: 2.1.13\r
65 Precedence: list\r
66 List-Id: "Use and development of the notmuch mail system."\r
67         <notmuch.notmuchmail.org>\r
68 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
69         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
70 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
71 List-Post: <mailto:notmuch@notmuchmail.org>\r
72 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
73 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
74         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
75 X-List-Received-Date: Tue, 07 Aug 2012 16:01:00 -0000\r
76 \r
77 \r
78 +1\r
79 \r
80 Mark\r
81 \r
82 On Tue, 07 Aug 2012, Austin Clements <amdragon@MIT.EDU> wrote:\r
83 > The string buffer quoting functions in json.c have been superseded by\r
84 > the new sprinter interface and are no longer used.  Remove them.\r
85 > ---\r
86 >  Makefile.local |    1 -\r
87 >  json.c         |  109 --------------------------------------------------=\r
88 ------\r
89 >  2 files changed, 110 deletions(-)\r
90 >  delete mode 100644 json.c\r
91 >\r
92 > diff --git a/Makefile.local b/Makefile.local\r
93 > index b3b960c..de984ab 100644\r
94 > --- a/Makefile.local\r
95 > +++ b/Makefile.local\r
96 > @@ -294,7 +294,6 @@ notmuch_client_srcs =3D           \\r
97 >       query-string.c          \\r
98 >       mime-node.c             \\r
99 >       crypto.c                \\r
100 > -     json.c\r
101 >=20=20\r
102 >  notmuch_client_modules =3D $(notmuch_client_srcs:.c=3D.o)\r
103 >=20=20\r
104 > diff --git a/json.c b/json.c\r
105 > deleted file mode 100644\r
106 > index 817fc83..0000000\r
107 > --- a/json.c\r
108 > +++ /dev/null\r
109 > @@ -1,109 +0,0 @@\r
110 > -/* notmuch - Not much of an email program, (just index and search)\r
111 > - *\r
112 > - * Copyright =C2=A9 2009 Dave Gamble\r
113 > - * Copyright =C2=A9 2009 Scott Robinson\r
114 > - *\r
115 > - * This program is free software: you can redistribute it and/or modify\r
116 > - * it under the terms of the GNU General Public License as published by\r
117 > - * the Free Software Foundation, either version 3 of the License, or\r
118 > - * (at your option) any later version.\r
119 > - *\r
120 > - * This program is distributed in the hope that it will be useful,\r
121 > - * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
122 > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
123 > - * GNU General Public License for more details.\r
124 > - *\r
125 > - * You should have received a copy of the GNU General Public License\r
126 > - * along with this program.  If not, see http://www.gnu.org/licenses/ .\r
127 > - *\r
128 > - * Authors: Dave Gamble\r
129 > - *          Scott Robinson <scott@quadhome.com>\r
130 > - *\r
131 > - */\r
132 > -\r
133 > -#include "notmuch-client.h"\r
134 > -\r
135 > -/* This function was derived from the print_string_ptr function of\r
136 > - * cJSON (http://cjson.sourceforge.net/) and is used by permission of\r
137 > - * the following license:\r
138 > - *\r
139 > - * Copyright (c) 2009 Dave Gamble\r
140 > - *\r
141 > - * Permission is hereby granted, free of charge, to any person obtaining=\r
142  a copy\r
143 > - * of this software and associated documentation files (the "Software"),=\r
144  to deal\r
145 > - * in the Software without restriction, including without limitation the=\r
146  rights\r
147 > - * to use, copy, modify, merge, publish, distribute, sublicense, and/or =\r
148 sell\r
149 > - * copies of the Software, and to permit persons to whom the Software is\r
150 > - * furnished to do so, subject to the following conditions:\r
151 > - *\r
152 > - * The above copyright notice and this permission notice shall be includ=\r
153 ed in\r
154 > - * all copies or substantial portions of the Software.\r
155 > - *\r
156 > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRE=\r
157 SS OR\r
158 > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILI=\r
159 TY,\r
160 > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHA=\r
161 LL THE\r
162 > - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
163 > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISI=\r
164 NG FROM,\r
165 > - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALING=\r
166 S IN\r
167 > - * THE SOFTWARE.\r
168 > - */\r
169 > -\r
170 > -char *\r
171 > -json_quote_chararray(const void *ctx, const char *str, const size_t len)\r
172 > -{\r
173 > -    const char *ptr;\r
174 > -    char *ptr2;\r
175 > -    char *out;\r
176 > -    size_t loop;\r
177 > -    size_t required;\r
178 > -\r
179 > -    for (loop =3D 0, required =3D 0, ptr =3D str;\r
180 > -      loop < len;\r
181 > -      loop++, required++, ptr++) {\r
182 > -     if ((unsigned char)(*ptr) < 32 || *ptr =3D=3D '\"' || *ptr =3D=3D '\\')\r
183 > -         required++;\r
184 > -    }\r
185 > -\r
186 > -    /*\r
187 > -     * + 3 for:\r
188 > -     * - leading quotation mark,\r
189 > -     * - trailing quotation mark,\r
190 > -     * - trailing NULL.\r
191 > -     */\r
192 > -    out =3D talloc_array (ctx, char, required + 3);\r
193 > -\r
194 > -    ptr =3D str;\r
195 > -    ptr2 =3D out;\r
196 > -\r
197 > -    *ptr2++ =3D '\"';\r
198 > -    for (loop =3D 0; loop < len; loop++) {\r
199 > -     if ((unsigned char)(*ptr) > 31 && *ptr !=3D '\"' && *ptr !=3D '\\') {\r
200 > -             *ptr2++ =3D *ptr++;\r
201 > -         } else {\r
202 > -             *ptr2++ =3D '\\';\r
203 > -             switch (*ptr++) {\r
204 > -                 case '\"':  *ptr2++ =3D '\"';       break;\r
205 > -                 case '\\':  *ptr2++ =3D '\\';       break;\r
206 > -                 case '\b':  *ptr2++ =3D 'b';        break;\r
207 > -                 case '\f':  *ptr2++ =3D 'f';        break;\r
208 > -                 case '\n':  *ptr2++ =3D 'n';        break;\r
209 > -                 case '\r':  *ptr2++ =3D 'r';        break;\r
210 > -                 case '\t':  *ptr2++ =3D 't';        break;\r
211 > -                 default:     ptr2--;        break;\r
212 > -             }\r
213 > -         }\r
214 > -    }\r
215 > -    *ptr2++ =3D '\"';\r
216 > -    *ptr2++ =3D '\0';\r
217 > -\r
218 > -    return out;\r
219 > -}\r
220 > -\r
221 > -char *\r
222 > -json_quote_str(const void *ctx, const char *str)\r
223 > -{\r
224 > -    if (str =3D=3D NULL)\r
225 > -     str =3D "";\r
226 > -\r
227 > -    return (json_quote_chararray (ctx, str, strlen (str)));\r
228 > -}\r
229 > --=20\r
230 > 1.7.10\r
231 >\r
232 > _______________________________________________\r
233 > notmuch mailing list\r
234 > notmuch@notmuchmail.org\r
235 > http://notmuchmail.org/mailman/listinfo/notmuch\r