Initialize the gmime for upstream
[platform/upstream/gmime.git] / ChangeLog
1 2015-01-23  Sunghyun Kwon     <sh0701.kwon@samsung.com>
2
3     * gmime/gmime-gpg-context.c (gpg_ctx_set_mode): Added the condition
4     (GPG_CTX_MODE_SIGN_ENCRYPT) 
5
6 2013-02-19  Jeffrey Stedfast  <fejj@gnome.org>
7
8         * README: Bumped version
9
10         * configure.ac: Bumped version to 2.6.15
11
12 2013-02-19  Jeffrey Stedfast  <fejj@gnome.org>
13
14         * gmime/gmime-filter-html.c (html_convert): Fixed to convert the
15         last line of input even if it doesn't end with a \n.
16
17 2013-02-18  Jeffrey Stedfast  <fejj@gnome.org>
18
19         * README: Bumped version
20
21         * configure.ac: Bumped version to 2.6.14
22
23 2013-02-18  Jeffrey Stedfast  <fejj@gnome.org>
24
25         * util/url-scanner.c (url_addrspec_start): Fixed the logic to
26         actually scan for the beginning of the mailbox.
27
28 2012-12-09  Jeffrey Stedfast  <fejj@gnome.org>
29
30         * README: Bumped version
31
32         * configure.ac: Bumped version to 2.6.13
33
34 2012-11-26  Jeffrey Stedfast  <fejj@gnome.org>
35
36         * gmime/gmime-header.c (g_mime_header_iter_first): Make sure the
37         list isn't empty.
38         (g_mime_header_iter_last): Same.
39
40 2012-11-23  Jeffrey Stedfast  <fejj@gnome.org>
41
42         * gmime/gmime-header.c (g_mime_header_list_prepend): Prepend the
43         header to the list, don't *append* it. Oops.
44         (g_mime_header_list_clear): Don't forget to reset the linked list
45         so that it doesn't contained free'd nodes.
46
47 2012-11-02  Jeffrey Stedfast  <fejj@gnome.org>
48
49         * README: Bumped version
50
51         * configure.ac: Bumped version to 2.6.12
52
53 2012-10-27  Jeffrey Stedfast  <fejj@gnome.org>
54
55         * gmime/gmime-stream-filter.c (stream_read): Initialize presize to
56         READ_PAD instead of READ_SIZE to prevent potential buffer
57         underruns.
58
59 2012-10-20  Jeffrey Stedfast  <fejj@gnome.org>
60
61         * gmime/gmime-filter-gzip.c (gunzip_filter): Apparently
62         Z_BUF_ERROR isn't actually an error unless there is input
63         available. Thanks to Pavlo <devgs@ukr.net> for this patch.
64
65 2012-10-19  Jeffrey Stedfast  <fejj@gnome.org>
66
67         * gmime/gmime-parser.c (parser_push_boundary): Don't use strcmp to
68         check if the boundary is an mbox boundary, use a direct pointer
69         comparison so that we can handle Content-Type boundary parameters
70         with a value of "From "
71
72 2012-10-19  Jeffrey Stedfast  <jeff@xamarin.com>
73
74         * gmime/gmime-parser.c (parser_step_headers): Don't assume that
75         the first non-header line we find indicates the start of the
76         content unless we've already gotten some basic headers.
77
78         Fix for bug #686223.
79
80 2012-10-18  Jeffrey Stedfast  <jeff@xamarin.com>
81
82         * README: Bumped version
83
84         * configure.ac: Bumped version to 2.6.11
85
86 2012-09-12  Jeffrey Stedfast  <jeff@xamarin.com>
87
88         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Unref the
89         certificate after adding it to the list (adding it to the list
90         refs it).
91
92         * gmime/gmime-multipart-encrypted.c
93         (g_mime_multipart_encrypted_decrypt): If the 'result' out param is
94         null, unref the GMimeDecryptResult to avoid leaking.
95
96 2012-08-13  Jeffrey Stedfast  <jeff@xamarin.com>
97
98         * gmime/gmime-utils.c (tokenize_rfc2047_phrase): Don't forget to
99         initialize 'ascii' to TRUE.
100
101 2012-08-05  Jeffrey Stedfast  <jeff@xamarin.com>
102
103         * gmime/gmime-stream-pipe.c (stream_flush): Pipes and sockets
104         cannot be fsync()'d, so don't even try!
105
106 2012-08-05  Jeffrey Stedfast  <jeff@xamarin.com>
107
108         * gmime/gmime-utils.c (rfc2047_token_new_encoded_word): Make sure
109         to properly handle broken encoded-word tokens in the form:
110         =?charset?q?=.
111
112         Fixes the g_malloc abort() in bug #679388
113
114 2012-08-05  Jeffrey Stedfast  <jeff@xamarin.com>
115
116         * gmime/gmime-multipart-signed.c (check_protocol_supported): Oops,
117         need to compare against xsupported in the second string compare.
118
119         Fixes bug #674032
120
121 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
122
123         * README: Bumped version
124
125         * configure.ac: Bumped version to 2.6.10
126
127 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
128
129         * gmime/Makefile.am: Always build gmime-gpg-context.[c,h] and
130         gmime-pkcs7-context.[c,h]
131
132         * gmime/gmime-gpg-context.c: Armor internals with #ifdef
133         ENABLE_CRYPTOGRAPHY so that if crypto is disabled, only the
134         skeletal API is built.
135
136         * gmime/gmime.h: Include gmime-pkcs7-context.h
137
138         Fixes bug #676692.
139
140 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
141
142         * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Use
143         is_blank() instead of is_lwsp() so that we only treat space and
144         tab as word delimiters (we want to rfc2047 encode \r's and
145         \n's). Check for ctrl characters when deciding what the type and
146         encoding of the word is.
147
148 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
149
150         * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): When
151         breaking up really long atom tokens, change the word type to
152         RFC2047 so that we encode them, thus preventing forced header
153         folding which cannot be unmunged.
154         (header_fold): Fixed for cases where the first word in a header is
155         68 chars. (Note: this fix is largely unnecessary due to the above fix)
156
157 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
158
159         * gmime/gmime-message.c: When setting a header, make sure to
160         always clear the header list cache of the toplevel mime_part as
161         well.
162
163 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
164
165         * gmime/gmime-param.c (rfc2184_param_new): Only decode the charset
166         and lang if the parameter is actually encoded. Thanks to Peter
167         Bloomfield for this patch.
168
169 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
170
171         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Keep track of
172         DECRYPTION_OKAY status.
173         (gpg_decrypt): Only return NULL if decryption failed (e.g. we
174         didn't get a DECRYPTION_OKAY status).
175
176         Fixes bug #677088.
177
178 2012-06-13  Jeffrey Stedfast  <fejj@gnome.org>
179
180         * docs/reference/building.sgml: Updated docs.
181
182         Fixes bug #676341
183
184 2012-04-22  Jeffrey Stedfast  <fejj@gnome.org>
185
186         * README: Bumped version
187
188         * configure.ac: Bumped version to 2.6.9
189
190 2012-04-22  Jeffrey Stedfast  <fejj@gnome.org>
191
192         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
193         Match protocols like application/x-pkcs7-signature, too.
194
195         Fixes bug #674032.
196
197 2012-04-19  Jeffrey Stedfast  <fejj@gnome.org>
198
199         * README: Bumped version
200
201         * configure.ac: Bumped version to 2.6.8
202
203 2012-04-12  Jeffrey Stedfast  <fejj@gnome.org>
204
205         * gmime/gmime-parser.c (parser_scan_headers): Make sure to
206         initialize 'start' before using it to calculate headers_end in the
207         case where parser_fill() failed.
208
209         Fixes bug #673493.
210
211 2012-03-10  Daniel Gillmor  <dkg@fifthhorseman.net>
212
213         * mono/gmime-sharp.dll.config.in: Fixed missing .so number.
214
215         Fixes bug #671785.
216
217 2012-03-09  Jeffrey Stedfast  <fejj@gnome.org>
218
219         * README: Bumped version
220
221         * configure.ac: Bumped version to 2.6.7
222
223 2012-03-09  Daniel Gillmor  <dkg@fifthhorseman.net>
224
225         * gmime/gmime-certificate.h: Remove the trailing comma from the
226         last enum item to silence gcc -pedantic warnings.
227
228         * gmime/gmime-message.h: Same.
229
230 2012-03-09  Jeffrey Stedfast  <fejj@gnome.org>
231
232         * gmime/gmime-parser.c (parser_step_headers): Be lenient with
233         "From " lines found in message headers. Fixes bug #671680.
234
235 2012-02-20  Jeffrey Stedfast  <fejj@gnome.org>
236
237         * README: Bumped version
238
239         * configure.ac: Bumped version to 2.6.6
240
241 2012-02-20  Jeffrey Stedfast  <fejj@gnome.org>
242
243         * gmime/gmime-message.c (multipart_guess_body): Fixed
244         multipart/signed logic.
245
246 2012-02-20  Jeffrey Stedfast  <fejj@gnome.org>
247
248         * gmime/gmime-common.c (g_mime_strdup_trim): Optimized.
249
250         * gmime/gmime-parser.c (header_parse): Use g_mime_strdup_trim()
251         instead of reimplementing the same logic here.
252
253 2012-02-20  Jeffrey Stedfast  <fejj@gnome.org>
254
255         * gmime/gmime-parser.c: Instead of filtering Content-* headers
256         inside GMimeObject subclasses, filter them in the parser. This way
257         header fetching works as expected in subparts which might have
258         non-standard headers (X-* and whatnot).
259
260 2012-02-19  Jeffrey Stedfast  <fejj@gnome.org>
261
262         * gmime/gmime-encodings.c (g_mime_content_encoding_from_string):
263         Match non-standard encodings: 7-bit, 8-bit, and x-uue (the
264         standard names for these are 7bit, 8bit, and x-uuencode).
265
266 2012-02-19  Jeffrey Stedfast  <fejj@gnome.org>
267
268         * gmime/gmime-common.c (g_mime_strdup_trim): New function that
269         optimizes g_strstrip combined with g_strdup in both speed and
270         memory usage (g_strstrip won't shrink the size of the dup'd
271         memory).
272
273 2012-02-18  Jeffrey Stedfast  <fejj@gnome.org>
274
275         * configure.ac: Add a --enable-smime flag which defaults to "no".
276
277 2012-02-18  Jeffrey Stedfast  <fejj@gnome.org>
278
279         * README: Bumped version
280
281         * configure.ac: Bumped version to 2.6.5
282
283 2012-02-18  Jeffrey Stedfast  <fejj@gnome.org>
284
285         * gmime/gmime-parser.c (parser_scan_message_part): Make sure that
286         a boundary doesn't appear before we start scanning for the
287         headers.
288
289 2012-02-18  Jeffrey Stedfast  <fejj@gnome.org>
290
291         * src/uuencode.c:
292         * src/uudecode.c: Moved to examples/
293
294 2012-02-17  Jeffrey Stedfast  <fejj@gnome.org>
295
296         * gmime/gmime-gpg-context.c (gpg_verify): In cases where gpg does
297         not exit with code 0, only set the GError when we've gotten no
298         signer information from gpg (otherwise we return the list of
299         signers, which will presumably include why the verification failed
300         in the status of each signer). Fixes bug #668085.
301
302 2012-02-17  Jeffrey Stedfast  <fejj@gnome.org>
303
304         * gmime/gmime-part-iter.c: Fixed to behave the same as IMAP and
305         also to actually work.
306
307 2012-02-16  Jeffrey Stedfast  <jeff@xamarin.com>
308
309         * mono/Multipart.custom: Fixed the binding for Multipart.Count.
310
311 2012-02-04  Jeffrey Stedfast  <fejj@gnome.org>
312
313         * configure.ac: Added --with-gacdir to fix bug #667072
314
315 2012-01-11  Jeffrey Stedfast  <fejj@gnome.org>
316
317         * mono/Makefile.am: Fixed up to more closely match the gtk-sharp
318         build.
319
320         * mono/gmime-sharp.pc.in: Fixed to more closely match gtk-sharp.
321
322 2012-01-11  Jeffrey Stedfast  <fejj@gnome.org>
323
324         * gmime/gmime-pkcs7-context.c: Fixed some switch statements to
325         include a 'default' code path, fixing some compiler
326         warnings. Fixes bug #667684.
327
328 2012-01-09  Ionut Biru  <ibiru@archlinux.org>
329
330         * gmime/gmime-pkcs7-context.c: Fix compilation when S/MIME is not
331         enabled.
332
333 2012-01-08  Jeffrey Stedfast  <fejj@gnome.org>
334
335         * README: Bumped version
336
337         * configure.ac: Bumped version to 2.6.4
338
339 2012-01-08  Jeffrey Stedfast  <fejj@gnome.org>
340
341         Fix for bug #667070
342
343         * configure.ac: Fixed Docbook checks for the html and pdf converters.
344
345         * docs/tutorial/Makefile.am: Use the DB2HTML and DB2PDF variables.
346
347 2012-01-05  Jeffrey Stedfast  <jeff@xamarin.com>
348
349         Fixes for bug #667137.
350
351         * tests/Makefile.am: If any tests fail, exit with an error to
352         abort make.
353
354         * tests/testsuite.c (testsuite_exit): Simply return
355         total_errors.
356
357 2012-01-05  Jeffrey Stedfast  <fejj@gnome.org>
358
359         Fixes for bug #667072.
360
361         * mono/Makefile.am: Install to $(libdir) instead of $(prefix)/libdir.
362
363         * mono/gmime-sharp.pc.in: Set libdir to @libdir@
364
365 2012-01-05  Jeffrey Stedfast  <fejj@gnome.org>
366
367         * src/Makefile.am: Rename uuencode/uudecode to
368         gmime-uuencode/decode to prevent naming collisions with the GNU
369         Sharutils tools. Fixes bug #667073.
370
371 2012-01-05  Jeffrey Stedfast  <fejj@gnome.org>
372
373         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Fixed returns
374         without a return value. Also fixed up some error-handling.
375
376 2012-01-05  Jeffrey Stedfast  <fejj@gnome.org>
377
378         * gmime/gmime-utils.c (rfc2047_decode_tokens): Fixed a memory leak.
379
380 2011-12-23  Jeffrey Stedfast  <fejj@gnome.org>
381
382         * README: Bumped version
383
384         * configure.ac: Bumped version to 2.6.3
385
386 2011-12-18  Jeffrey Stedfast  <fejj@gnome.org>
387
388         * gmime/gmime-utils.c (quoted_decode): Made more robust and also
389         modified to keep state (e.g. for use when triplets span across
390         multiple encoded-word tokens).
391         (tokenize_rfc2047_phrase): Tokenizes a rfc822 phrase header for
392         later processing.
393         (tokenize_rfc2047_text): Tokenizes a rfc822 unstructured text
394         header for later processing.
395         (rfc2047_decode_tokens): Merge and decode rfc2047 tokens,
396         converting the decoded text into UTF-8.
397         (g_mime_utils_header_decode_phrase): Rewritten to use the above
398         functions.
399         (g_mime_utils_header_decode_text): Same.
400
401 2011-12-18  Jeffrey Stedfast  <fejj@gnome.org>
402
403         * gmime/gmime-utils.c (charset_convert): Don't count the
404         terminating nul character in the returned string length.
405
406 2011-12-17  Jeffrey Stedfast  <fejj@gnome.org>
407
408         * README: Bumped version
409
410         * configure.ac: Bumped version to 2.6.2
411
412 2011-12-15  Jeffrey Stedfast  <fejj@gnome.org>
413
414         * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Same.
415
416         * gmime/gmime-filter-charset.c (flter_complete): Same as
417         charset_convert().
418
419         * gmime/gmime-utils.c (charset_convert): Make sure the output
420         buffer is large enough when flushing the conversion descriptor.
421
422 2011-12-15  Jeffrey Stedfast  <fejj@gnome.org>
423
424         * gmime/gmime.c (g_mime_init): Don't initialize the crypto types
425         unless crypto was enabled in the build.
426
427 2011-11-06  Jeffrey Stedfast  <fejj@gnome.org>
428
429         * README: Bumped version
430
431         * configure.ac: Bumped version to 2.6.1
432
433 2011-11-05  Jeffrey Stedfast  <fejj@gnome.org>
434
435         * gmime/gmime-multipart-encrypted.c
436         (g_mime_multipart_encrypted_decrypt): Need to decode the content
437         of the application/octet-stream part containing the encrypted
438         payload as it may have a non-7bit Content-Transfer-Encoding.
439
440 2011-11-05  Jeffrey Stedfast  <fejj@gnome.org>
441
442         * gmime/gmime.c (g_mime_init): Register all GObject-based types
443         to prevent race conditions in multi-threaded apps.
444
445 2011-08-27  Jeffrey Stedfast  <fejj@gnome.org>
446
447         * README: Bumped version
448
449         * configure.ac: Bumped version to 2.6.0
450
451 2011-08-14  Jeffrey Stedfast  <fejj@gnome.org>
452
453         * mono/*.custom: Simplified the GetEnumerator() implementations.
454
455         * mono/HeaderEnumerator.cs: New IEnumerator class returned by
456         HeaderList.GetEnumerator(). Wraps HeaderIter, providing a more
457         C#-like experience.
458
459 2011-08-14  Jeffrey Stedfast  <fejj@gnome.org>
460
461         * mono/GMime.metadata: Rename AppendHeader() to Append(),
462         PrependHeader() to Prepend(), RemoveHeader() to Remove(), etc.
463
464         * mono/HeaderList.custom: Instead of having
465         GetHeader()/SetHeader(), manually bind this as an indexer.
466
467         * gmime/gmime-header.c (g_mime_header_list_clear): New function
468         to clear all headers.
469         (g_mime_header_list_contains): New function added mostly for
470         completeness in the C# binding.
471
472 2011-08-14  Jeffrey Stedfast  <fejj@gnome.org>
473
474         * README: Bumped version
475
476         * configure.ac: Bumped version to 2.5.10
477
478 2011-08-14  Jeffrey Stedfast  <fejj@gnome.org>
479
480         * mono/GMime.metadata (PartBase): Rename to Entity to be more
481         consistent with MIME terminology and removed more convenience
482         methods that really only make sense in the C API.
483         (g_mime_object_new_type): Removed, there's no easy way to map this
484         to managed.
485         (g_mime_object_new): Removed, there's no easy way to map this
486         to managed.
487
488 2011-08-14  Jeffrey Stedfast  <fejj@gnome.org>
489
490         * gmime/gmime-part-iter.c: Updated to be more consistent with IMAP
491         part specifiers.
492
493 2011-08-13  Jeffrey Stedfast  <fejj@gnome.org>
494
495         * gmime/gmime-part-iter.c: New class for iterating over a tree of
496         GMimeObjects. Fixes bug #652012.
497
498 2011-08-13  Jeffrey Stedfast  <fejj@gnome.org>
499
500         * gmime/gmime-multipart.c (g_mime_multipart_replace): New
501         convenience function to replace a mime part at a specified
502         position.
503
504 2011-08-08  Jeffrey Stedfast  <fejj@gnome.org>
505
506         * README: Bumped version
507
508         * configure.ac: Bumped version to 2.5.9
509
510 2011-07-17  Jeffrey Stedfast  <fejj@gnome.org>
511
512         * gmime/gmime-utils.c (charset_convert): Don't skip validation of
513         UTF-8 text.
514
515 2011-07-17  Jeffrey Stedfast  <fejj@gnome.org>
516
517         * gmime/gmime-utils.c (charset_convert): Handle ERANGE the same as
518         EILSEQ.
519
520         * gmime/gmime-filter-charset.c (filter_filter): Handle ERANGE the
521         same as EILSEQ.
522
523         * gmime/gmime-charset.c (g_mime_charset_map_init): Improved logic
524         for Win32 (and even Linux) systems. Don't rely on setlocale().
525
526 2011-06-15  Jeffrey Stedfast  <fejj@gnome.org>
527
528         * gmime/gmime-parser.c: Added new state, MESSAGE_HEADERS, which
529         behaves the same as HEADERS but is only ever set when we are
530         parsing the toplevel GMimeMessage object.
531         (parser_step_headers): Be slightly more strict in handling
532         malformed headers in the MESSAGE_HEADERS state so that trying to
533         parse non-message streams fails (e.g. if someone tries to parse a
534         jpeg stream).
535
536 2011-06-15  Jeffrey Stedfast  <fejj@gnome.org>
537
538         * gmime/gmime-gpg-context.c: Define nfds_t on OSX.
539
540 2011-06-10  Jeffrey Stedfast  <fejj@gnome.org>
541
542         * README: Bumped version
543
544         * configure.ac: Bumped version to 2.5.8
545
546 2011-06-09  Jeffrey Stedfast  <fejj@gnome.org>
547
548         Fix for bug #652056
549
550         * gmime/gmime-param.c (decode_value): If STRICT_PARSER isn't
551         defined, don't require the value to start with a valid character.
552
553 2011-06-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
554
555         Fix for bug #651826
556
557         * gmime/gmime-gpg-context.c
558         (g_mime_gpg_context_[g,s]_set_use_agent): New functions to allow
559         the invoker to declare that they expect there to be a functioning
560         gpg-agent, and want gpg to talk to it for any needed credentials.
561
562 2011-06-08  Jeffrey Stedfast  <fejj@gnome.org>
563
564         * gmime/gmime-gpg-context.c: If building on Apple, force the use
565         of our own implementation of poll() because Apple's poll() is
566         broken on some versions of MacOS.
567
568 2011-03-18  Jeffrey Stedfast  <fejj@novell.com>
569
570         * README: Bumped version
571
572         * configure.ac: Bumped version to 2.5.7
573
574 2011-03-17  Jeffrey Stedfast  <fejj@novell.com>
575
576         * gmime/gmime-multipart-encrypted.c: Updated for crypto API
577         changes.
578
579         * gmime/gmime-multipart-signed.c: Updated for crypto API changes.
580
581         * gmime/gmime-crypto-context.c (g_mime_crypto_context_verify): Now
582         returns a GMimeSignatureList, the 'details' string was worthless
583         for GpgMe backend.
584         (GMimeDecryptResult): This is now a GObject.
585
586         * gmime/gmime-pkcs7-context.c: Updated for crypto API changes.
587
588         * gmime/gmime-gpg-context.c: Updated for crypto API changes.
589
590         * gmime/gmime-certificate.[c,h]: New source files implementing
591         Certificate and CertificateList classes.
592
593         * gmime/gmime-signature.[c,h]: New source files implementing
594         Signature and SignatureList classes.
595
596 2011-03-16  Jeffrey Stedfast  <fejj@novell.com>
597
598         * mono/StreamWrapper.cs (Write): Implemented.
599
600         * mono/CryptoRecipientCollection.cs:
601         * mono/SignerCollection.cs: New collections for Signers and
602         CryptoRecipients.
603
604         * mono/SignatureValidity.custom:
605         * mono/DecryptionResult.custom: Don't return IEnumerators for
606         signers/recipients, return the appropriate Collections instead.
607
608 2011-03-15  Jeffrey Stedfast  <fejj@novell.com>
609
610         * mono/SignatureValidity.custom: 
611         * mono/DecryptionResult.custom:
612         * mono/CryptoRecipient.custom: 
613         * mono/Signer.custom: New custom sources implementing enumerators
614         for Signers and Recipients.
615
616 2011-03-14  Jeffrey Stedfast  <fejj@novell.com>
617
618         * configure.ac: Check for glib-sharp-2.0 instead of gtk-sharp-2.0
619         since we really only depend on glib-sharp. Also check for gapi-2.0
620         via pkgconfig.
621
622 2011-03-07  Jeffrey Stedfast  <fejj@novell.com>
623
624         * README: Bumped version
625
626         * configure.ac: Bumped version to 2.5.6
627
628         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Treat
629         EXPSIG, EXPKEYSIG, and REVKEYSIG the same as GOODSIG/BADSIG status
630         messages in that all of them denote a new signer info.
631
632 2011-03-04  Jeffrey Stedfast  <fejj@novell.com>
633
634         * README: Bumped version
635
636         * configure.ac: Bumped version to 2.5.5
637
638 2011-03-04  Jeffrey Stedfast  <fejj@novell.com>
639
640         Implements features requested in bug #641841 and #641320.
641
642         * gmime/gmime-crypto-context.h (GMimeCryptoHash): Reordered to be
643         identical to gnupg's listing.
644         (GMimeCryptoPubKeyAlgo): Same.
645
646         * gmime/gmime-crypto-context.c (g_mime_decryption_result_[g,s]et_cipher):
647         New functions to get/set the cipher algorithm used.
648         (g_mime_decryption_result_[g,s]et_mdc): New functions to get/set
649         the mdc digest algorithm used.
650
651         * gmime/gmime-gpg-context.c (gpg_hash_algo): Removed, no longer
652         needed.
653         (gpg_pubkey_algo): Same.
654         (gpg_ctx_parse_status) :Parse the DECRYPTION_INFO status to get
655         the cipher and mdc algorithms used.
656         (gpg_decrypt): Set the cipher and mdc values on the
657         GMimeDecryptionResult.
658
659         * gmime/gmime-pkcs7-context.c (pkcs7_pubkey_algo): Removed, no
660         longer needed.
661         (pkcs7_hash_algo): Same.
662
663 2011-03-04  Jeffrey Stedfast  <fejj@novell.com>
664
665         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Make sure
666         to extract the pubkey_algo, hash_algo, sig_class, sig_expires, and
667         return-code values for ERRSIG.
668
669 2011-03-04  Jeffrey Stedfast  <fejj@novell.com>
670
671         Implemented bug #641319.
672
673         * gmime/gmime-crypto-context.c (g_mime_crypto_recipient_*): New
674         set of functions for manipulating a GMimeCryptoRecipient.
675         (g_mime_decryption_result_*): New set of functions to manipulate a
676         GMimeDecryptionResult
677         (g_mime_crypto_context_decrypt): Now returns a
678         GMimeDecryptionResult.
679
680         * gmime/gmime-multipart-encrypted.c
681         (g_mime_multipart_encrypted_decrypt): Updated for API changes.
682
683         * gmime/gmime-pkcs7-context.c (pkcs7_decrypt): Updated for API
684         changes.
685
686         * gmime/gmime-gpg-context.c (gpg_decrypt): Updated for API
687         changes.
688
689 2011-03-04  Jeffrey Stedfast  <fejj@novell.com>
690
691         API cleanup as well as preparing for the possibility of a
692         multi-protocol CryptoContext.
693
694         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
695         Updated to use new APIs for getting the encryption protocol.
696         (g_mime_multipart_encrypted_decrypt): Same.
697
698         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
699         Updated to use new APIs for getting the signature protocol.
700         (g_mime_multipart_signed_verify): Same.
701
702         * gmime/gmime-crypto-context.c (g_mime_crypto_context_get_*_protocol):
703         New methods for getting the crypto protocol strings used by
704         multipart/encrypted and multipart/signed parts.
705
706         * gmime/gmime-pkcs7-context.c (pkcs7_get_*_protocol): Implemented.
707
708         * gmime/gmime-gpg-context.c (gpg_get_*_protocol): Implemented.
709
710 2011-03-03  Jeffrey Stedfast  <fejj@novell.com>
711
712         * gmime/gmime-pkcs7-context.c (pkcs7_stream_seek): Added.
713
714         * gmime/gmime.c (g_mime_init): Initialize gpgme.
715
716 2011-02-08  Jeffrey Stedfast  <fejj@novell.com>
717
718         Implements feature request in bug #635663.
719
720         * gmime/gmime-crypto-context.c (g_mime_signer_[g,s]et_sig_version):
721         New functions to access new signature version member.
722         (g_mime_signer_[g,s]et_sig_class): New functions to access new
723         signature class member.
724
725         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Extract
726         the signature class and version tokens.
727
728 2011-02-08  Jeffrey Stedfast  <fejj@novell.com>
729
730         * PORTING: Updated docs.
731
732         * mono/GMime.metadata: Fixed up for the new decrypt API.
733
734         * gmime/gmime-message.c (multipart_guess_body): Updated. We can no
735         longer descend into the decrypted part because it is no longer
736         cached.
737
738         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
739         Now takes a GMimeSignatureValidity argument and no longer caches
740         the decrypted mime part/validity.
741         (g_mime_multipart_encrypted_get_signature_validity): Removed.
742         (g_mime_multipart_encrypted_encrypt): Don't cache the input part
743         as the decrypted part.
744
745 2011-01-22  Jeffrey Stedfast  <fejj@novell.com>
746
747         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Parse the
748         ERRSIG's return code, fixes bug #638605.
749
750         * gmime/gmime-crypto-context.h: Added UNSUPP_ALGO error value.
751
752 2011-01-22  Jeffrey Stedfast  <fejj@novell.com>
753
754         * gmime/gmime-stream-mem.c (stream_write): Correctly calculate the
755         end boundary of the stream when bound_end is -1.
756
757 2010-12-05  Jeffrey Stedfast  <fejj@novell.com>
758
759         * README: Bumped version
760
761         * configure.ac: Bumped version to 2.5.4
762
763 2010-11-29  Jeffrey Stedfast  <fejj@novell.com>
764
765         * gmime/internet-address.c (decode_address): Handle edge cases
766         where inptr reaches the end of the input string prematurely due to
767         a malformed address.
768
769 2010-11-29  Jeffrey Stedfast  <fejj@novell.com>
770
771         Fixes bug #635409.
772
773         * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Reworked the
774         logic to calculate the signer status. Also dropped
775         GMimeSignatureStatus logic.
776
777         * gmime/gmime-gpg-context.c (gpg_verify): Removed the (broken)
778         logic of calculating a GMimeSignatureStatus.
779         (gpg_decrypt): Same.
780         (gpg_ctx_parse_signer_info): Updated for the g_mime_signer_new()
781         API change.
782
783         * gmime/gmime-crypto-context.c (g_mime_signature_validity_new): No
784         longer initializes a GMimeSignatureStatus member.
785         (g_mime_signature_validity_get_status): Removed.
786         (g_mime_signature_validity_set_status): Removed.
787         (g_mime_signer_new): Now takes a GMimeSignerStatus so that I could
788         get rid of the default NONE status.
789
790         * gmime/gmime-crypto-context.h (GMimeSignatureStatus): Removed.
791
792 2010-11-24  Jeffrey Stedfast  <fejj@novell.com>
793
794         Fixes bug #635661.
795
796         * gmime/gmime-crypto-context.c (g_mime_signer_new): Initialize
797         pubkey_algo and hash_algo.
798         (g_mime_signer_[g,s]et_pubkey_algo): Implemented.
799         (g_mime_signer_[g,s]et_hash_algo): Renamed from [g,s]et_hash().
800
801         * gmime/gmime-crypto-context.h (GMimeCryptoPubKeyAlgo): Defined
802         enum.
803
804         * gmime/gmime-pkcs7-context.c (pkcs7_get_validity): Record the
805         hash and pubkey algorithms used in the GMimeSigner.
806
807         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Record
808         the pubkey algorithm used by the signer.
809
810 2010-11-22  Jeffrey Stedfast  <fejj@novell.com>
811
812         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
813         Now takes a hash algorithm argument which it passes along to
814         g_mime_crypto_context_encrypt().
815
816         * gmime/gmime-gpg-context.c (gpg_ctx_get_argv): When signing and
817         encrypting, pass the digest algorithm to gpg on the command-line.
818         (gpg_encrypt): Set the hash id on the GpgCtx.
819
820         * gmime/gmime-crypto-context.c (g_mime_crypto_context_encrypt):
821         Now takes a hash algorithm argument.
822
823 2010-11-22  Jeffrey Stedfast  <fejj@novell.com>
824
825         Fixes bug #635492.
826
827         * gmime/gmime-gpg-context.c (gpg_hash_from_id): New function
828         mapping the numeric hash id's that gpg uses to GMimeCryptoHash
829         ids.
830         (gpg_ctx_parse_signer_info): Extract the hash algorithm used by
831         the signer.
832         (gpg_ctx_parse_status): Updated to use gpg_hash_from_id().
833
834         * gmime/gmime-crypto-context.c (g_mime_signer_set_hash): New
835         function to set the hash algorithm used by the signer.
836         (g_mime_signer_get_hash): New function to get the hash algorithm
837         used by the signer.
838
839 2010-11-22  Jeffrey Stedfast  <fejj@novell.com>
840
841         Fixes bug #635491.
842
843         * gmime/gmime-crypto-context.[c,h]: Renamed from
844         gmime-cipher-context.[c,h].
845
846 2010-11-21  Jeffrey Stedfast  <fejj@novell.com>
847
848         Fixes bug #635407.
849
850         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
851         Updated error messages to be more consistent.
852
853         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
854         Make sure to set an error in all cases returning NULL.
855
856 2010-11-21  Jeffrey Stedfast  <fejj@novell.com>
857
858         Fixes bug #635405.
859
860         * gmime/gmime-cipher-context.c (g_mime_signer_get_*): These
861         functions all now take a const GMimeSigner *.
862
863 2010-11-19  Jeffrey Stedfast  <fejj@novell.com>
864
865         Fixes bug #635152
866
867         * gmime/gmime-gpg-context.c (GpgCtx): No longer has a sigfile
868         member. Instead contains a sigstream and passwd_fd is now renamed
869         to secret_fd and used for both sending gpg the user's passwd as
870         well as for sending gpg the digital signature when verifying.
871         (gpg_ctx_new): Updated for the new struct members.
872         (gpg_ctx_set_sigstream): Replaces gpg_ctx_set_sigfile().
873         (gpg_ctx_free): Updated for the new struct members.
874         (gpg_ctx_get_argv): Modify our --verify command-line so that we
875         can pas gpg the digital signature without first writing it to
876         disk. Also modified to return char** instead of a GPtrArray to
877         simplify things.
878         (gpg_ctx_op_start): Modified to also create more pipes in VERIFY
879         mode.
880         (gpg_ctx_op_step): Modified to stream the digital signature to
881         gpg.
882         (gpg_verify): Don't write the digital signature to disk - instead,
883         we now stream it directly to gpg.
884
885 2010-10-30  Jeffrey Stedfast  <fejj@novell.com>
886
887         * gmime/gmime-message.c (g_mime_message_get_body): New function to
888         try and guess which part (or multipart/alternative) represents the
889         message body.
890
891 2010-09-25  Jeffrey Stedfast  <fejj@novell.com>
892
893         * gmime/charset-map.c: According to rfc1557, it is suggested that
894         euc-kr be used for headers since many Korean mailers cannot handle
895         base64 or quoted-printable encoded iso-2022-kr. Based on this and
896         bug #629235, I'm just going to drop iso-2022-kr.
897
898 2010-09-17  Jeffrey Stedfast  <fejj@novell.com>
899
900         Based on a patch by Marek Łętowski
901
902         * gmime/gmime-utils.c (g_mime_utils_header_decode_text): In the
903         workaround case, if we don't find an end marker, reset our inptr
904         to the beginning of the most recent word *plus 2* (to skip over
905         the leading "=?"), not the beginning of the input text. Also need
906         to reset our ascii state.
907         (g_mime_utils_header_decode_phrase): In the workaround case, if we
908         don't find an end marker, reset our inptr to the beginning of the
909         most recent word *plus 2*, to skip over the leading "=?".
910
911 2010-09-16  Jeffrey Stedfast  <fejj@novell.com>
912
913         * gmime/gmime-encodings.c (g_mime_encoding_quoted_encode_close):
914         If the last input character is not a \n, append an "=\n" sequence.
915
916 2010-09-13  Jeffrey Stedfast  <fejj@novell.com>
917
918         * gmime/gmime-charset.c: Mark known_iconv_charsets[] as
919         static. Also mark string members of various private structs as
920         const.
921
922 2010-09-06  Jeffrey Stedfast  <fejj@novell.com>
923
924         * configure.ac: Bump glib version requirement for
925         g_set_error_literal().
926
927 2010-09-02  Jeffrey Stedfast  <fejj@novell.com>
928
929         * gmime/internet-address.c (group_to_string): Don't crash if the
930         group name is unset. Thanks to Damian Pietras for this patch.
931
932 2010-09-01  Jeffrey Stedfast  <fejj@novell.com>
933
934         * gmime/gmime-utils.c (g_mime_utils_header_decode_phrase):
935         Implement the same rfc2047-workaround hack as the one found in
936         g_mime_utils_header_decode_text().
937
938         * gmime/gmime-encodings.c (g_mime_encoding_base64_decode_step):
939         Need to keep state to keep track of the number of ='s we've backed
940         out over in case it crosses buffer boundaries.
941
942 2010-08-30  Jeffrey Stedfast  <fejj@novell.com>
943
944         * gmime/gmime-param.c (decode_token): Make less strict in order to
945         handle unquoted boundary values containing '=' (and other illegal
946         characters).
947
948 2010-08-26  Jeffrey Stedfast  <fejj@novell.com>
949
950         * gmime/internet-address.c (_internet_address_set_name): Don't
951         decode/unquote the name. The docs for all the functions that call
952         this assume the name string is in its decoded form already.
953         (_internet_address_decode_name): New internal function that
954         decodes a string and sets it as the name on the InternetAddress.
955         (decode_address): Rewritten to be even more liberal in what it
956         accepts.
957
958 2010-06-20  Jeffrey Stedfast  <fejj@novell.com>
959
960         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
961         Don't unref the encrypted content mime part object when the
962         content-type doesn't match application/octet-stream,
963         g_mime_multipart_get_part() does not ref parts it returns. We also
964         need to set an error when this happens.
965
966 2010-05-18  Jeffrey Stedfast  <fejj@novell.com>
967
968         * README: Bumped version
969
970         * configure.ac: Bumped version to 2.5.3
971
972         * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Since
973         force-wrapped lines use "=\n" instead of just "\n", lines will be
974         74 bytes, not 73.
975
976 2010-05-15  Jeffrey Stedfast  <fejj@novell.com>
977
978         * README: Bumped version
979
980         * configure.ac: Bumped version to 2.5.2
981
982 2010-05-14  Jeffrey Stedfast  <fejj@novell.com>
983
984         * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Fixed to take
985         into acount the possibility of having to force-wrap lines at 72+
986         characters.
987
988 2010-05-06  Jeffrey Stedfast  <fejj@novell.com>
989
990         * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_get_stream):
991         Fixed documentation.
992
993 2010-04-13  Jeffrey Stedfast  <fejj@novell.com>
994
995         * configure.ac: Added a --disable-cryptography flag to alloow
996         building without GnuPG or S/MIME support. Thanks to
997         pier11@operamail.com for this patch. Fixes bug #615343.
998
999         * tests/test-streams.c: Use glib's G_GINT64_FORMAT and
1000         G_GSIZE_FORMAT macros for our various *printf needs to be more
1001         portable. Thanks to pier11@operamail.com for this patch.
1002
1003         * gmime/gmime-gpg-context.c: Use g_set_error_literal() when no
1004         printf-style arguments are needed. Fixes bug #615594. Thanks to
1005         Tobias Mueller and Christian Persch.
1006
1007         * Applied patch by pier11@operamail.com to fix the build for
1008         MingW. Fixes bug #615068.
1009
1010 2010-03-26  Jeffrey Stedfast  <fejj@novell.com>
1011
1012         Fixes for bug #613653
1013
1014         * gmime/gmime.c (g_mime_init): Initialize GMimeObject's type
1015         registry.
1016         (g_mime_shutdown): Shut it down here.
1017
1018         * gmime/gmime-object.c (g_mime_object_type_registry_init): Renamed
1019         a bit and fixed to not use g_atexit(). Also made internal-public.
1020         (g_mime_object_type_registry_shutdown): Renamed and made
1021         internal-public. Also set type_hash to NULL after destroying it so
1022         that a re-init will work.
1023         (g_mime_object_register_type): Don't init the type system anymore.
1024         (g_mime_object_new): Same.
1025         (g_mime_object_new_type): Same here.
1026
1027 2010-03-26  Jeffrey Stedfast  <fejj@novell.com>
1028
1029         Fixes for bug #598855
1030
1031         * gmime/gmime-message.c (process_header): Return TRUE if we match
1032         MIME-Version.
1033         (message_prepend_header): Don't drop MIME-Version headers.
1034         (message_append_header): Same.
1035         (message_set_header): Here too.
1036         (message_get_header): Only return the hard-coded "1.0" value for
1037         MIME-Version if it is not set on the header object.
1038         (message_remove_header): Allow the MIME-Version header to be
1039         removed.
1040         (message_get_headers): Only write our own MIME-Version header if
1041         one isn't already set in the message headers.
1042         (message_write_to_stream): Same here.
1043
1044 2010-02-12  Jeffrey Stedfast  <fejj@novell.com>
1045
1046         Fixes bug #609700.
1047
1048         * configure.ac: Define ENABLE_SMIME if we find GpgMe.
1049
1050         * gmime/gmime-pkcs7-context.c: #ifdef out the GpgMe logic if we
1051         are building without S/MIME support enabled.
1052
1053 2010-02-07  Jeffrey Stedfast  <fejj@novell.com>
1054
1055         * README: Bumped version
1056
1057         * configure.in: Bumped version to 2.5.1
1058
1059 2010-01-31  Jeffrey Stedfast  <fejj@novell.com>
1060
1061         * src/uudecode.c (uudecode): Just use fopen() to open fout instead
1062         of using open() and then fdopen(). Fixes the code to work properly
1063         on Windows.
1064
1065         * gmime/gmime-encodings.h (GMIME_UUENCODE_LEN): Fixed to prevent
1066         possible buffer overflows.
1067
1068 2010-01-30  Jeffrey Stedfast  <fejj@novell.com>
1069
1070         * configure.ac: Disabled strict-aliasing to work around subtle
1071         bugs generated by gcc 4.4 when optimizations are enabled.
1072
1073 2010-01-30  Jeffrey Stedfast  <fejj@novell.com>
1074
1075         * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Cleaned up the
1076         code a bit.
1077
1078 2010-01-17  Jeffrey Stedfast  <fejj@novell.com>
1079
1080         * gmime/gmime-filter-crlf.c (filter_filter): Fixed bug #606875 by
1081         not trying to skip multiple characters per pass thru the loop when
1082         encountering the first '.' of a possible '..' sequence.
1083
1084 2010-01-12  Jeffrey Stedfast  <fejj@novell.com>
1085
1086         * gmime/gmime-utils.c (g_mime_utils_decode_8bit): Make sure to
1087         always increment inptr as we force-convert it to ascii. Thanks to
1088         Damian Pietras for finding this bug.
1089
1090 2009-12-15  Jeffrey Stedfast  <fejj@novell.com>
1091
1092         * Released 2.5.0 - it's time to get this out there for people to
1093         play with.
1094
1095 2009-11-30  Jeffrey Stedfast  <fejj@novell.com>
1096
1097         * configure.ac: Don't include EXTRA_LIBS in GMIME_LIBS, instead
1098         add it to GMIME_LIBS_PRIVATE so that things properly expand in the
1099         .pc file.
1100
1101         * gmime.pc.in: Moved -lz -lnsl, etc into Libs.private. Fixes bug
1102         #603273.
1103
1104 2009-11-05  Jeffrey Stedfast  <fejj@novell.com>
1105
1106         * gmime/gmime-multipart.c (ptr_array_insert): Fixed to handle an
1107         index larger than the current array length as well as fixing the
1108         true insert case to shift items when index is les than the current
1109         array length (as opposed to when it is equal-to). Thanks to
1110         harven@gingers.rulez.pl for finding this bug.
1111
1112 2009-10-10  Jeffrey Stedfast  <fejj@novell.com>
1113
1114         * gmime/gmime-utils.c: Fixed the military timezone offsets.
1115
1116         * gmime/gmime-encodings.c (g_mime_encoding_uudecode_step): Fixed a
1117         uudecoding bug when uulen % 3 is 2. Thanks to Peter Hartley. Fixes
1118         bug #597794.
1119
1120 2009-10-01  Jeffrey Stedfast  <fejj@novell.com>
1121
1122         * gmime/gmime-part.c (mime_part_encode): Shortcut if the currently
1123         set encoding is within the acceptable constraints.
1124
1125         * docs/reference/gmime-sections.txt: Updated.
1126
1127         * mono/gmime-api.raw: Updated.
1128
1129 2009-10-01  Jeffrey Stedfast  <fejj@novell.com>
1130
1131         * gmime/gmime-filter-best.h: Moved GMimeEncodingConstraint to
1132         gmime-encodings.h
1133
1134         * gmime/gmime-object.c (g_mime_object_encode): New method to
1135         calculate and set the best Content-Transfer-Encoding on a mime
1136         part and its children.
1137
1138         * gmime/gmime-part.c (mime_part_encode): Use a GMimeFilterBest to
1139         make magic happen.
1140
1141         * gmime/gmime-message.c (message_encode): Encode our toplevel mime
1142         part object.
1143
1144         * gmime/gmime-multipart.c (multipart_encode): Recurse over our
1145         children and encode them.
1146
1147         * gmime/gmime-multipart-signed.c (multipart_signed_encode):
1148         Prevent our base class implementation from iterating over our
1149         children.
1150
1151 2009-09-30  Jeffrey Stedfast  <fejj@novell.com>
1152
1153         * build/vs2008/*: Made the Project/Solution tree much nicer.
1154
1155         * gmime/gmime-stream-gio.c: various warning fixes.
1156         (set_errno): Fixes to build on Windows.
1157         (gio_seekable_bound_end): This needs to return gint64, not
1158         ssize_t.
1159
1160         * tests/test-streams.c: Use GDir instead of POSIX's dirent API and
1161         also conditionally disable mmap tests.
1162
1163         * tests/test-mbox.c: Use GDir instead of POSIX's dirent API to aid
1164         in portability to Windows.
1165
1166 2009-09-03  Jeffrey Stedfast  <fejj@novell.com>
1167
1168         * mono/gmime-sharp.dll.config.in: Simply target
1169         libgmime-@GMIME_API_VERSION@.so since we are now properly
1170         versioning libgmime-2.6.so
1171
1172 2009-08-12  Jeffrey Stedfast  <fejj@novell.com>
1173
1174         * gmime/gmime-utils.c (charset_convert): If iconv() fails, treat
1175         conditions where outleft == 0 the same as if we had gotten an
1176         E2BIG error (e.g. we need to grow the output buffer) so that we
1177         don't overrun it while appending a '?' placeholder character.
1178
1179 2009-07-04  Jeffrey Stedfast  <fejj@novell.com>
1180
1181         * configure.ac: Check for GpgME needed for S/MIME support.
1182
1183         * gmime/Makefile.am: Include gmime-pkcs7-context.[c,h] in the
1184         build.
1185
1186         * gmime/gmime-pkcs7-context.[c,h]: New source files implementing
1187         the pkcs7 cipher context using GpgMe.
1188
1189 2009-07-04  Jeffrey Stedfast  <fejj@novell.com>
1190
1191         * gmime/gmime-gpg-context.c (gpg_ctx_parse_signer_info): Updated
1192         for API changes to the GMimeSigner stuff.
1193
1194         * gmime/gmime-cipher-context.c (g_mime_signer_new): Initialize the
1195         newly added fields.
1196         (g_mime_signer_free): Free the newly added fields.
1197         (g_mime_signer_set_issuer_serial): New field accessor.
1198         (g_mime_signer_get_issuer_serial): Same.
1199         (g_mime_signer_set_issuer_name): Another new accessor.
1200         (g_mime_signer_get_issuer_name): Same.
1201         (g_mime_signer_set_email): And another...
1202         (g_mime_signer_get_email): Same.
1203         (g_mime_signer_set_sig_created): Renamed from
1204         g_mime_signer_set_created().
1205         (g_mime_signer_get_sig_created): Renamed from
1206         g_mime_signer_get_created().
1207         (g_mime_signer_set_sig_expires): Renamed from
1208         g_mime_signer_set_expires().
1209         (g_mime_signer_get_sig_expires): Renamed from
1210         g_mime_signer_get_expires().
1211         (g_mime_signer_set_key_created): New field accesor.
1212         (g_mime_signer_get_key_created): Same.
1213         (g_mime_signer_set_key_expires): Same.
1214         (g_mime_signer_get_key_expires): Same.
1215
1216 2009-07-02  Stanislav Brabec  <sbrabec@suse.cz>
1217
1218         * configure.ac: Simplified configuring of gmime in a
1219         cross-compilation environment. Make it possible to work-around
1220         AC_TRY_RUN limitations by copying of target system iconv-detect.h
1221         and setting ac_cv_have_iconv_detect_h=yes.
1222
1223 2009-05-07  Jeffrey Stedfast  <fejj@novell.com>
1224
1225         * gmime/gmime-stream-fs.c (stream_read): Removed gross hack.
1226         (stream_write): Same.
1227         (g_mime_stream_fs_new): On Windows systems, set the translation
1228         mode to BINARY.
1229         (g_mime_stream_fs_new_with_bounds): Same.
1230
1231         * gmime/gmime-stream-file.c: Same as GMimeStreamFs
1232
1233 2009-05-02  Jeffrey Stedfast  <fejj@novell.com>
1234
1235         * gmime/gmime-stream-buffer.c (stream_seek_cache_read): Fixed a
1236         64bit cleanliness issue.
1237         (stream_seek_cache_read): Cap the max cache size to G_MAXSIZE.
1238
1239 2009-04-30  Jeffrey Stedfast  <fejj@novell.com>
1240
1241         * gmime/gmime-filter-best.h: Renamed GMimeBestEncoding to
1242         GMimeEncodingConstraint to make this enum more clear as to what
1243         it's intended purpose is.
1244
1245         * gmime/gmime-part.c: Updated.
1246
1247 2009-04-29  Sankar P  <sankar.curiosity@gmail.com>
1248
1249         * gmime.doap: Added new doap file to describe the project.
1250
1251 2009-04-29  Jeffrey Stedfast  <fejj@novell.com>
1252
1253         * gmime/gmime-events.[c,h]: Don't require a GObject owner.
1254
1255         * gmime/gmime-message.c (g_mime_message_set_mime_part): Add a
1256         mime_part_headers_changed listener.
1257         (g_mime_message_finalize): Remove the listener.
1258         (mime_part_headers_changed): Uncache the message header stream.
1259         (message_get_headers): Removed hack.
1260         (message_write_to_stream): Same.
1261
1262         * gmime/gmime-header.c (g_mime_header_list_set_stream): Emit a
1263         changed event.
1264         (g_mime_header_iter_set_value): Call set_stream() instead of
1265         setting the stream to NULL ourselves. Also causes a changed event
1266         to be emitted.
1267         (g_mime_header_list_prepend): Same.
1268         (g_mime_header_list_append): Here too.
1269         (g_mime_header_list_set): And here.
1270         (g_mime_header_list_remove): Same.
1271
1272 2009-04-28  Jeffrey Stedfast  <fejj@novell.com>
1273
1274         * gmime/gmime-part.c (g_mime_part_get_best_content_encoding): New
1275         helper function to calculate the most efficient
1276         Content-Transfer-Encoding for a given mime-part.
1277
1278 2009-04-28  Jeffrey Stedfast  <fejj@novell.com>
1279
1280         * build/vs2008/config-win32.h.in: No longer has GMIME_*_VERSION
1281         defines - these are all in gmime-version.h now.
1282
1283         * gmime/gmime-version.h.in: New template for generating
1284         gmime-version.h
1285
1286         * gmime/gmime.h: #include gmime-version.h
1287
1288         * configure.ac: Renamed from configure.in. Now generates a
1289         gmime/gmime-version.h header which contains a macro for checking
1290         the GMime version at compile-time. Requested feature from the
1291         Balsa guys.
1292
1293 2009-04-26  Jeffrey Stedfast  <fejj@novell.com>
1294
1295         * tests/test-streams.c: Updated to test GIO streams.
1296
1297         * gmime/gmime-stream-gio.c: New GMimeStream wrapper around GIO
1298         streams.
1299
1300 2009-04-26  Jeffrey Stedfast  <fejj@novell.com>
1301
1302         * gmime/gmime-session*.[c,h]: Removed.
1303
1304         * gmime/gmime-stream-pipe.[c,h]: New stream for pipes (where
1305         seeking isn't allowed). Needed by GMimeGpgContext.
1306
1307         * gmime/gmime-gpg-context.c: Updated to use the new request_passwd
1308         callback function instead of the GMimeSession.
1309         (g_mime_gpg_context_set_auto_key_retrieve): New function for
1310         disabling the auto-key-retrieve functionality of gpg.
1311         (g_mime_gpg_context_get_auto_key_retrieve): New function to get
1312         the state of auto-key-retrieve enabledness.
1313
1314         * gmime/gmime-cipher-context.[c,h]: No longer references a
1315         GMimeSession. Instead, we now have a GMimePasswordRequestFunc used
1316         for prompting the user.
1317
1318 2009-04-26  Jeffrey Stedfast  <fejj@novell.com>
1319
1320         * gmime/gmime-multipart-encrypted.c: Removed stub virtual method
1321         overloads that did nothing but call the base class'
1322         implementation.
1323
1324         * gmime/gmime-multipart-signed.c: Same.
1325
1326         * gmime/gmime-message-part.c (message_part_prepend_header):
1327         Protect against setting Content-MD5 header since this is not
1328         allowed.
1329         (message_part_append_header): Same.
1330         (message_part_get_header): Don't bother checking that the
1331         requested header begins with "Content-", just pass it along to our
1332         base class implementation to worry about.
1333         (message_part_remove_header): Same.
1334
1335         * gmime/gmime-message-partial.c (message_partial_get_header):
1336         Same.
1337         (message_partial_remove_header): Here too.
1338
1339         * gmime/gmime-part.c (mime_part_remove_header): Same.
1340
1341 2009-04-25  Jeffrey Stedfast  <fejj@novell.com>
1342
1343         * gmime/gmime-message-partial.c (g_mime_message_partial_split_message):
1344         Fixed to use gint64 variables for stream length/offsets.
1345
1346 2009-04-25  Jeffrey Stedfast  <fejj@novell.com>
1347
1348         * gmime/gmime-object.c (g_mime_object_set_disposition): Unref the
1349         disposition after setting it on the GMimeObject, don't ref it
1350         again. Oops.
1351
1352         * gmime/gmime-message.c (to_list_changed, cc_list_changed):
1353         (bcc_list_changed): Fixed callback signatures. Oops.
1354
1355         * gmime/gmime-events.c: Fixed list traversal. What was I thinking
1356         before?
1357
1358 2009-04-25  Jeffrey Stedfast  <fejj@novell.com>
1359
1360         * gmime/gmime-parse-utils.h: Marked APIs as internal linkage only.
1361
1362         * gmime/gmime-common.h: Same.
1363
1364         * gmime/gmime-content-type.c: Use the new GMimeEvent API instead
1365         of libgobject's g_signal API which is more than we need.
1366
1367         * gmime/gmime-disposition.c: Same.
1368
1369         * gmime/gmime-object.c: Updated to use the GMimeEvent API for
1370         content-type and content-disposition.
1371
1372         * gmime/internet-address.c: Use the new GMimeEvent API instead of
1373         our own.
1374
1375         * gmime/gmime-events.[c,h]: New source files implementing a simple
1376         and performant event system needed internally within GMime. Based
1377         on the event system that used to be in internet-address.c
1378
1379 2009-04-24  Jeffrey Stedfast  <fejj@novell.com>
1380
1381         * gmime/gmime-parser.c (struct _GMimeParserPrivate): Added
1382         message_headers_begin/end and changed the meaning of
1383         headers_begin/end to be for the current MIME part rather than for
1384         the current message itself.
1385         (g_mime_parser_init): Init the boolean state variables before
1386         calling parser_init() so that parser_init() can use them.
1387         (parser_init): Only create a rawbuf if our stream isn't seekable
1388         or isn't persistent. Initialize our new message_headers_begin/end.
1389         (g_mime_parser_set_persist_stream): If our persist mode has
1390         changed, malloc or free our rawbuf.
1391         (raw_header_append): Don't append any data if rawbuf is NULL (this
1392         means we're keeping track of offsets instead).
1393         (parser_step_headers): Always update headers_begin/end since we
1394         now always want to keep track of all header begin/end offsets.
1395         (parser_step): Update our message_headers_begin/end state.
1396         (parser_scan_message_part): Set the mime-part's raw header stream
1397         on the message too.
1398         (parser_construct_message): Same.
1399         (parser_construct_leaf_part): Substream the input stream to get
1400         our raw header stream to set on the mime-part's header-list.
1401         (parser_construct_multipart): Same.
1402
1403         * gmime/gmime-header.c (struct _GMimeHeaderList): Instead of
1404         having a string buffer holding the raw header block content,
1405         instead keep a stream. This not only makes it easy for us to keep
1406         track of what the header offsets on disk are should the developer
1407         want to know, but it also means we don't necessarily have to use
1408         duplicate the header block to memory.
1409         (g_mime_header_list_set_stream): New function that replaces the
1410         old g_mime_header_list_set_raw() and looks much cleaner.
1411         (g_mime_header_list_get_stream): New function to access said
1412         stream.
1413
1414         * gmime/gmime-message.c: Fixed uses of
1415         g_mime_header_list_set/has_raw().
1416         (g_mime_message_set_mime_part): Set the message's raw header
1417         stream to NULL.
1418
1419         * gmime/gmime-multipart.c: Same.
1420
1421         * tests/test-parser.c (test_parser): Updated.
1422
1423 2009-04-24  Jeffrey Stedfast  <fejj@novell.com>
1424
1425         * build/vs2008/config-win32.h.in: New template to replace
1426         config.h.win32 so that the version info gets autogenerated when I
1427         make a new release. Makes it easier for me to keep it in sync.
1428
1429         * build/vs2008/gmime.vcproj: No longer defines the gmime version
1430         variables on the command-line (as these are now part of config.h).
1431
1432 2009-04-23  Jeffrey Stedfast  <fejj@novell.com>
1433
1434         * branched: now begins 2.5.x development
1435
1436         * configure.in: Updated.
1437
1438         * zentimer.h: Updated to hopefully build on Windows.
1439
1440         * gmime/Makefile.am: Rename lib name to gmime-2.6.
1441
1442         * gmime.pc.in: Renamed from gmime-2.4.pc.in.
1443
1444         * mono/gmime-sharp.pc.in: Renamed from gmime-sharp-2.4.pc.in.
1445
1446         * gmime/gmime-stream*.[c,h] (stream_length): Fixed to return a gint64
1447
1448 2009-04-09  Jeffrey Stedfast  <fejj@novell.com>
1449
1450         * README: Bumped version
1451
1452         * configure.in: Bumped version to 2.4.6
1453
1454 2009-04-05  Jeffrey Stedfast  <fejj@novell.com>
1455
1456         * gmime/gmime-encodings.c (g_mime_encoding_uudecode_step): Fixed a
1457         bug wrt updating uulen when the data isn't an exact multiple of 3.
1458
1459         * src/uuencode.c (uuencode): Don't bother dup()ing the stdout fd, just
1460         use set_owner(FALSE) so that it doesn't close when we destroy the stream
1461         instead.
1462
1463         * gmime/gmime-stream-file.c (stream_read, stream_write): Don't depend on
1464         simple arithmetic to update our stream->position on Windows since it
1465         may do line-ending translation behind our backs. Call ftell() to get
1466         our real position after reading or writing.
1467
1468         * gmime/gmime-stream-fs.c (stream_read, stream_write): Same idea.
1469
1470         * gmime/gmime-utils.c (mktime_utc): Fixed the Windows code-path.
1471         (charset_convert): In the Windows case, fake the E2BIG error condition
1472         if outleft <= inleft on any error as errno doesn't seem to get
1473         properly set in this case.
1474
1475         * tests/test-headers.c: Removed unused headers to fix the build on
1476         Windows.
1477
1478 2009-04-04  Jeffrey Stedfast  <fejj@novell.com>
1479
1480         * gmime/gmime-stream-fs.c: Ported to Windows by #including io.h
1481
1482         * examples/basic-example.c: Reverted to the old GMimeStreamFs logic
1483         and #included io.h for G_OS_WIN32 systems.
1484
1485         * examples/imap-example.c: Ported to Windows by #including io.h and
1486         using g_ascii_strcasecmp().
1487
1488 2009-04-03  Jeffrey Stedfast  <fejj@novell.com>
1489
1490         * build/vs2008: New directory for Visual Studio 2008 Solution & Project
1491         files.
1492
1493         * gmime.vcproj: Moved to build/vs2008
1494
1495         * config.h.win32: Same.
1496
1497         * gmime.sln: Same.
1498
1499         * examples/basic-example.c: Fixed to build under Visual Studio by
1500         using GMimeStreamFile instead of GMimeStreamFs and by #ifdef'ing
1501         out the GnuPG code.
1502
1503         * tests/testsuit.[c,h]: Fixed to compile under Visual Studio which
1504         basically means we can't use _try() as a function. Renamed to g_try().
1505         Also renamed throw() to g_throw() for consistency.
1506
1507 2009-04-02  Jeffrey Stedfast  <fejj@novell.com>
1508
1509         * tests/testsuite.c: Modified to compile without the need for
1510         pthread.h
1511
1512         * gmime.vcproj: Added logic to the PreBuild step to copy
1513         config.h.win32 to config.h
1514
1515         * config.h.win32: Added.
1516
1517 2009-04-01  Jeffrey Stedfast  <fejj@novell.com>
1518
1519         * gmime/gmime-utils.c: #include <process.h> for getpid() and ws2tcpip.h
1520         for getaddrinfo() on Windows platforms.
1521         (mktime_utc): Use _get_timezone() when building on Windows.
1522         (g_mime_utils_header_format_date): Windows has gmtime_s() instead
1523         of gmtime_r(), so use that on Windows.
1524
1525         * gmime/gmime-parser.c: If glib is >= 2.14, use GRegex instead of
1526         glibc regex.
1527
1528 2009-04-01  Jeffrey Stedfast  <fejj@novell.com>
1529
1530         * gmime/gmime-utils.c: Need to #include <unistd.h> for getpid().
1531
1532         * gmime/gmime-stream-fs.c: Need to #include <unistd.h> here.
1533
1534         * gmime/gmime-multipart-signed.c: Got rid of an unused variable.
1535
1536         * gmime/gmime-message.c: Removed unused variables.
1537
1538         * gmime/gmime-content-type.c: Don't need to #include
1539         "gmime-table-private.h" here as we don't actually use it.
1540
1541         * util/gtrie.c: Disable g_warning()'s when compiled w/o
1542         --enable-warnings and also fixed some compile warnings.
1543
1544 2009-03-31  Jeffrey Stedfast  <fejj@novell.com>
1545
1546         * gmime.sln: New Microsoft Visual Studio 2008 Solution file for GMime.
1547
1548         * gmime.vcproj: New Microsoft Visual C++ Project file for GMime.
1549
1550 2009-03-31  Jeffrey Stedfast  <fejj@novell.com>
1551
1552         * gmime/gmime-utils.c: Removed unneeded #include <unistd.h>
1553
1554         * configure.in: Check for unistd.h
1555
1556         * gmime/gmime-multipart.c (read_random_pool): Implement using
1557         rand() in the case that unistd.h is not available.
1558
1559         * gmime/gmime-parser.c (parser_scan_content): Fixed 'crlf'
1560         argument to be a guint to make it easier to avoid compile warnings
1561         about comparison between signed/unsigned ints in the callers.
1562
1563         * gmime/internet-address.c (internet_address_group_add_member):
1564         Fixed g_return macros to return a value.
1565         (internet_address_mailbox_get_addr): Same.
1566
1567 2009-03-30  Jeffrey Stedfast  <fejj@novell.com>
1568
1569         * configure.in: Check for regex.h
1570
1571         * gmime/gmime-parser.c: #ifdef out the regex functionality if the
1572         system does not have regex.h
1573
1574         * gmime/gmime-stream-fs.h: Don't #include <unistd.h> here.
1575
1576         * gmime/gmime-stream.h: Removed #include <unistd.h> as it isn't
1577         needed there.
1578
1579         * gmime/gmime-part.c: Removed unused includes.
1580
1581         * gmime/gmime-utils.c: Only #include <sys/utsname.h> if we have
1582         utsname.domainname. Helps build process on Windows.
1583
1584 2009-03-29  Jeffrey Stedfast  <fejj@novell.com>
1585
1586         * README: Bumped version
1587
1588         * configure.in: Bumped version to 2.4.5
1589
1590 2009-03-27  Jeffrey Stedfast  <fejj@novell.com>
1591
1592         * gmime/gmime-stream-buffer.c: Fixed to be more diligent in setting
1593         errno on error.
1594
1595         * gmime/gmime-stream-mmap.c: Fixed to be more diligent in setting
1596         errno on error.
1597
1598         * gmime/gmime-stream-mem.c: Fixed to be more diligent in setting
1599         errno on error.
1600         (stream_seek): If the user seeks beyond the end of the buffer and
1601         bound_end is unbound, then grow the buffer (e.g. a sparse file).
1602
1603         * gmime/gmime-stream-file.c: Fixed to be more diligent in setting
1604         errno on error.
1605
1606         * gmime/gmime-stream-fs.c: Fixed to be more diligent in setting
1607         errno on error.
1608
1609 2009-03-20  Jeffrey Stedfast  <fejj@novell.com>
1610
1611         * configure.in: Default --enable-largefile to yes. Looks like I
1612         forgot to do this before rolling the version to 2.4.0 like I
1613         intended.
1614
1615         * tools/Makefile.am: Fixed to include the porting script in
1616         EXTRA_DIST (instead of extra_DIST) so that the tarball includes
1617         it, doh!
1618
1619 2009-03-18  Jeffrey Stedfast  <fejj@novell.com>
1620
1621         * README: Bumped version
1622
1623         * configure.in: Bumped version to 2.4.4
1624
1625 2009-03-18  Jeffrey Stedfast  <fejj@novell.com>
1626
1627         * configure.in: Check for select() and poll() as well as poll.h
1628
1629         * gmime/gmime-gpg-context.c (poll): Implement our own poll()
1630         function using select() for portability to MacOS 10.2, which
1631         apparently doesn't have poll().
1632
1633 2009-02-22  Jeffrey Stedfast  <fejj@novell.com>
1634
1635         * gmime/gmime-utils.c: Use GSlice for rfc822 word tokens and date
1636         tokens.
1637
1638         * gmime/gmime-parser.c: Updated to use GSlice.
1639
1640 2009-02-22  Jeffrey Stedfast  <fejj@novell.com>
1641
1642         * gmime/gmime-header.c (g_mime_header_iter_new): Use
1643         g_slice_new().
1644         (g_mime_header_iter_free): Use g_slice_free().
1645         (g_mime_header_list_new): Use g_slice_new().
1646         (g_mime_header_list_destroy): Use g_slice_free().
1647
1648         * gmime/gmime-gpg-context.c (gpg_ctx_new): Use g_slice_new().
1649         (gpg_ctx_free): Use g_slice_free().
1650
1651         * gmime/gmime-cipher-context.c (g_mime_signer_new): Use
1652         g_slice_new() instead of g_new().
1653         (g_mime_signature_validity_new): Same.
1654         (g_mime_signature_validity_free): Use g_slice_free().
1655         (g_mime_signer_free): Same.
1656
1657 2009-02-07  Jeffrey Stedfast  <fejj@novell.com>
1658
1659         * gmime/internet-address.c: Removed some unused macros.
1660
1661 2009-01-12  Jeffrey Stedfast  <fejj@novell.com>
1662
1663         * mono/Makefile.am: Fixed to parallel make install, thanks to
1664         Diego Pettenò. Fixes bug #567549.
1665
1666 2009-01-09  Jeffrey Stedfast  <fejj@novell.com>
1667
1668         * examples/imap-example.c (write_part): Don't unref the stream we
1669         get from g_mime_data_wrapper_get_stream().
1670         (reconstruct_part_content): Fixed error-checking.
1671
1672 2008-11-01  Jeffrey Stedfast  <fejj@novell.com>
1673
1674         * gmime/gmime-parser.c (nearest_pow): Implement using asm on i386
1675         - this code path isn't normally built, but it's fun to
1676         micro-optimize anyway ;-)
1677
1678         * gmime/gmime-gpg-context.c (status_backup): Use next_alloc_size()
1679         macro - same as gmime-parser.c
1680
1681 2008-10-22  Jeffrey Stedfast  <fejj@novell.com>
1682
1683         * README: Bumped version
1684
1685         * configure.in: Bumped version to 2.4.3
1686
1687 2008-10-22  Jeffrey Stedfast  <fejj@novell.com>
1688
1689         Fixes by Damian Pietras.
1690
1691         * gmime/gmime-parser.c (check_boundary): Check that len > 0 before
1692         checking for \r.
1693         (header_parse): Fixed to handle headers with nothing but lwsp.
1694
1695 2008-10-07  Jeffrey Stedfast  <fejj@novell.com>
1696
1697         * util/gtrie.c (g_trie_search): Instead of returning the first
1698         match, find instead the best match starting at the same starting
1699         offset (e.g. if we have two patterns "abc" and "abcdef" and the
1700         input buffer is "abcdefghi", we want to match "abcdef" rather than
1701         just "abc").
1702         (g_trie_quick_search): Renamed from the old g_trie_search().
1703
1704 2008-10-06  Jeffrey Stedfast  <fejj@novell.com>
1705
1706         * README: Bumped version
1707
1708         * configure.in: Bumped version to 2.4.2
1709
1710 2008-10-02  Jeffrey Stedfast  <fejj@novell.com>
1711
1712         * gtk-doc.make: More parallel-install fixes so that devhelp
1713         actually works. Patch to gtk-doc.make submitted upstream.
1714
1715 2008-10-02  Jeffrey Stedfast  <fejj@novell.com>
1716
1717         Fixes for bug #554830
1718
1719         * mono/Makefile.am: Don't hard-code the API version.
1720
1721         * mono/gmime-sharp-2.4.pc.in: Fixed incorrect path to include the
1722         API_VERSION.
1723
1724         * gmime-2.4.pc.in: Similar fixes.
1725
1726         * configure.in: Define GMIME_API_VERSION
1727
1728 2008-10-02  Jeffrey Stedfast  <fejj@novell.com>
1729
1730         * README: Bumped version
1731
1732         * configure.in: Bumped version to 2.4.1
1733
1734 2008-10-02  Jeffrey Stedfast  <fejj@novell.com>
1735
1736         * gtk-doc.make: Allow for a versioned install of the
1737         gtk-docs. Completes the fix for bug #554121.
1738
1739         * docs/reference/Makefile.am: Define a DOC_MODULE_VERSION
1740
1741         * mono/Makefile.am: Fix PACKAGE_SHARP to be versioned. Partial fix
1742         for bug #554121.
1743
1744         * gmime/gmime-parser.c: Made the headerbuf allocator a little less
1745         liberal in the amount it allocates.
1746
1747 2008-09-25  Jeffrey Stedfast  <fejj@novell.com>
1748
1749         * gmime/gmime-stream.c (stream_length): Implemented a default
1750         solution using g_mime_stream_seek().
1751
1752 2008-09-25  Jeffrey Stedfast  <fejj@novell.com>
1753
1754         * README: Bumped version
1755
1756         * configure.in: Bumped version to 2.4.0
1757
1758 2008-09-18  Jeffrey Stedfast  <fejj@novell.com>
1759
1760         * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Check if
1761         rfc2047-workarounds has been enabled at runtime.
1762
1763         * gmime/gmime.h (GMIME_ENABLE_RFC2047_WORKAROUNDS): New
1764         g_mime_init() flag so that a programmer can enable rfc2047
1765         workarounds at runtime.
1766
1767         * gmime/gmime.c (g_mime_init): Save the init flags.
1768
1769         * gmime/internet-address.c (internet_address_group_set_members):
1770         Add an event listener to the new members, not the unref'd old
1771         member list. Thanks to Peter Bloomfield for spotting this.
1772
1773 2008-09-18  Jeffrey Stedfast  <fejj@novell.com>
1774
1775         * gmime/gmime.c (g_mime_init): Register all of our GObject types
1776         with the glib type system so that there's less risk of a
1777         race-condition in multi-threaded applications (not sure if this is
1778         a justifiable concern or not, but it doesn't hurt).
1779
1780 2008-09-15  Jeffrey Stedfast  <fejj@novell.com>
1781
1782         * gmime/gmime-message.c: Use the new InternetAddressList event
1783         system.
1784
1785         * gmime/internet-address.c: Implemented a custom event system
1786         which gains us another 20% performance improvement.
1787
1788 2008-09-14  Jeffrey Stedfast  <fejj@novell.com>
1789
1790         * gmime/gmime-object.c (g_mime_object_get_type): Register this
1791         class as being abstract.
1792
1793         * gmime/gmime-filter.c (g_mime_filter_get_type): Register this
1794         class as being abstract.
1795
1796         * gmime/gmime-stream.c (g_mime_stream_get_type): Register this
1797         class as being abstract.
1798
1799         * gmime/internet-address.c (decode_mailbox): Pass name->len to
1800         g_utf8_validate() rather than -1 since we have the length. Might
1801         save us some cycles.
1802         (internet_address_get_type): Register this class as being
1803         abstract.
1804
1805         * gmime/gmime-parser.c (parser_init): Initialize the headerbuf and
1806         rawbuf buffers to something more reasonable.
1807
1808 2008-09-14  Jeffrey Stedfast  <fejj@novell.com>
1809
1810         * README: Bumped version
1811
1812         * configure.in: Bumped version to 2.3.10
1813
1814 2008-09-13  Jeffrey Stedfast  <fejj@novell.com>
1815
1816         Epic optimization hack-a-thon which resulted in another ~5%
1817         performance improvement.
1818
1819         * gmime/gmime-message.c (g_mime_message_init): Instead of using a
1820         hash table for our recipients table, simply use an array since we
1821         can easily look them up using the GMimeRecipientType as an array
1822         index. Eliminates unnecessary memory and, most importantly,
1823         performance overhead.
1824         (message_add_recipients_from_string): Optimized quite a bit by
1825         using the new internet_address_list_append/prepend functions.
1826
1827         * gmime/gmime-utils.c (decode_addrspec): Updated for
1828         g_mime_decode_domain() changes.
1829
1830         * gmime/gmime-parse-utils.c (g_mime_decode_domain): Changed the
1831         API a bit to prevent the need for string duplication/g_free
1832         overhead in our callers.
1833
1834         * gmime/gmime-parser.c (parser_fill): Keep track of the stream
1835         offset ourselves.
1836
1837         * gmime/internet-address.c (internet_address_list_append): Renamed
1838         from internet_address_list_concat() and optimized slightly.
1839         (internet_address_list_prepend): New function that prepends the
1840         contents of a list to another list.
1841         (_internet_address_set_name): New internal function which avoids
1842         emitting a "changed" event in an attempt to enhance the
1843         performance of internet_address_list_parse().
1844         (_internet_address_list_add): Same idea as
1845         _internet_address_set_name(), but also takes ownership of the
1846         InternetAddress' ref to avoid unnecessary ref/unref overhead.
1847         (internet_address_mailbox_new): Instead of calling
1848         internet_address_mailbox_set_addr(), set it manually to avoid a
1849         g_signal_emit().
1850         (internet_address_group_new): Call _internet_address_set_name() to
1851         avoid signal emission.
1852         (internet_address_group_add_member): Now returns the index of the
1853         newly added member.
1854         (decode_mailbox): Avoid string duplication of the addrspec token,
1855         use the new g_mime_decode_domain() API to avoid unnecessary
1856         strdup/g_free overhead, and use _internet_address_set_name().
1857         (decode_address): Don't need to unref members anymore as the lists
1858         we add them to take ownership of the refs.
1859
1860 2008-09-12  Jeffrey Stedfast  <fejj@novell.com>
1861
1862         I/O Optimization which improved performance by ~5%
1863
1864         * gmime/gmime-parser.c (parser_fill): Now takes an 'atleast'
1865         argument which we use to decide whether we should bother calling
1866         read() or not. If we have more than 'atleast' bytes left in our
1867         buffer, we don't read.
1868         (parser_scan_content): Take advantage of the 'atleast' argument to
1869         parser_fill().
1870         (parser_step_headers): Same.
1871         (parser_step_from): Here too.
1872         (parser_skip_line): And here.
1873
1874 2008-09-08  Jeffrey Stedfast  <fejj@novell.com>
1875
1876         * gmime/gmime-message.c (message_add_recipients_from_string):
1877         Prepend, append, or set the addresses in the recipients list
1878         depending on the new 'action' argument.
1879         (process_header): Pass along our 'action' to
1880         message_add_recipients_from_string().
1881         (message_prepend_header): Pass PREPEND as the action argument to
1882         process_header().
1883         (message_append_header): Pass APPEND as the action argument to
1884         process_header().
1885         (message_set_header): Pass SET as the action argument to
1886         process_header().
1887
1888         * gmime/gmime-header.c (g_mime_header_list_set): If there is more
1889         than a single header with the specified name, remove them.
1890
1891 2008-09-07  Jeffrey Stedfast  <fejj@novell.com>
1892
1893         * util/memchunk.[c,h]: Removed. No longer used.
1894
1895 2008-09-07  Jeffrey Stedfast  <fejj@novell.com>
1896
1897         * README: Bumped version
1898
1899         * configure.in: Bumped version to 2.3.9
1900
1901 2008-09-07  Jeffrey Stedfast  <fejj@novell.com>
1902
1903         New feature needed by the Bongo project (seems DBMail could also
1904         use this feature as they currently have a hack-around).
1905
1906         * tests/test-mbox.c: Output header offsets as well so that they
1907         can be checked.
1908
1909         * gmime/gmime-parser.c (g_mime_parser_get_headers_begin): New
1910         function to get the beginning offset of the message headers.
1911         (g_mime_parser_get_headers_end): Same, but for the end offset.
1912         (parser_step_headers): Only set priv->headers_begin and
1913         priv->headers_end if they are set to -1, we don't want to
1914         overwrite this value if parsing a subpart.
1915         (parser_step): Reset priv->headers_begin and priv->headers_end
1916         when appropriate.
1917
1918 2008-09-07  Jeffrey Stedfast  <fejj@novell.com>
1919
1920         * gmime/gmime-charset.c (g_mime_charset_map_init): Create the
1921         iconv_charsets hashtable using g_hash_table_new_full() so that we
1922         don't have to call g_hash_table_foreach() before destroying it in
1923         g_mime_charset_map_shutdown().
1924
1925         * gmime/gmime-gpg-context.c: Use g_hash_table_new_full() so that
1926         we don't have to g_hash_table_foreach() to remove all user-id
1927         hints before destroying the user-id hint hashtable.
1928
1929         * util/cache.c: Updated to use GSlice instead of a custom MemChunk
1930         allocator.
1931
1932         * util/gtrie.c: Updated to use GSlice instead of my custom
1933         MemChunk. The main purpose for using the MemChunk allocator had
1934         been ease of cleanup, but it made it more difficult to use GTrie
1935         elsewhere.
1936
1937         * examples/basic-example.c: Updated for the foreach() changes.
1938
1939         * gmime/gmime-multipart.c (g_mime_multipart_foreach): Changed to
1940         be recursive. The callback function signature has changed a bit to
1941         be more useful as well by providing the parent MIME object.
1942
1943         * gmime/gmime-message.c (g_mime_message_foreach): Same.
1944
1945 2008-09-06  Jeffrey Stedfast  <fejj@novell.com>
1946
1947         * gmime/gmime-multipart.c (g_mime_multipart_get_subpart_from_content_id):
1948         Multiparts can have Content-Id's too.
1949
1950 2008-09-06  Jeffrey Stedfast  <fejj@novell.com>
1951
1952         * gmime/gmime-part.c (g_mime_part_set_content_object): Made
1953         virtual, seems like it could be useful.
1954
1955         * gmime/gmime-object.c (set_content_type): Do not serialize the
1956         GMimeContentType object to the headers. This is done elsewhere
1957         now.
1958         (g_mime_object_set_content_type): After calling the virtual
1959         set_content_type(), serialize the GMimeContentType object to the
1960         headers.
1961
1962         * gmime/gmime-multipart-encrypted.c: Get rid of the protocol
1963         member variable, it's not needed.
1964
1965         * gmime/gmime-multipart-signed.c: Get rid of the protocol and
1966         micalg member strings, these aren't needed - just request them
1967         from the content_type.
1968
1969         * gmime/gmime-multipart.c: Get rid of boundary member variable, we
1970         can just request it from the ContentType object. No sense
1971         duplicating strings.
1972
1973         * gmime/gmime-message.c (message_get_headers): Don't write out a
1974         MIME-Version header if a Content-Type header doesn't exist.
1975
1976         * gmime/gmime-parser.c (parser_content_type): Instead of returning
1977         a GMimeContentType object, we now return a simpler ContentType
1978         struct so that we don't waste time processing more of the header
1979         than we need to, all we need is the type/subtype to figure out
1980         which MIME object type to instantiate.
1981         (parser_scan_message_part): After finishing parsing the object,
1982         destroy the content_type ourselves.
1983         (parser_construct_leaf_part): Updated. Don't set a
1984         GMimeContentType on the GMimeObject unless the Content-Type header
1985         doesn't exist (if it does exist, then appending the Content-Type
1986         header will cause one to be created and set on the GMimeObject).
1987         (parser_construct_multipart): Updated.
1988
1989         * gmime/gmime-content-type.c (g_mime_content_type_new_from_string):
1990         Use the new g_mime_parse_content_type() utility function and set
1991         the parsed string values on the new GMimeContentType object
1992         directly to avoid unnecessary strdup()ing.
1993
1994         * gmime/gmime-parse-utils.c (g_mime_parse_content_type): New
1995         function to parse the simple type/subtype Content-Type form.
1996
1997 2008-08-31  Jeffrey Stedfast  <fejj@novell.com>
1998
1999         * README: Bumped version
2000
2001         * configure.in: Bumped version to 2.3.8
2002
2003 2008-08-31  Jeffrey Stedfast  <fejj@novell.com>
2004
2005         * mono/Multipart.custom: GMime.Multipart now implements the IList
2006         interface.
2007
2008         * gmime/gmime-message.c (g_mime_message_add_recipients_from_string):
2009         Removed. This function was a kludge - use
2010         g_mime_message_get_recipients() and then add recipients you have
2011         manually instead.
2012
2013         * gmime/gmime-multipart.c (g_mime_multipart_clear): New method.
2014         (g_mime_multipart_contains): Same.
2015         (g_mime_multipart_index_of): Same.
2016
2017 2008-08-31  Jeffrey Stedfast  <fejj@novell.com>
2018
2019         * gmime/gmime-parser.c (parser_scan_multipart_subparts): Updated
2020         for GMimeMultipart API changes.
2021
2022         * gmime/gmime-multipart-signed.c (sign_prepare): Updated for
2023         GMimeMultipart API changes.
2024         (g_mime_multipart_signed_sign): Same.
2025
2026         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2027         Updated for GMimeMultipart API changes.
2028
2029         * gmime/gmime-multipart.c (g_mime_multipart_add): Renamed from
2030         g_mime_multipart_add_part(). The "_part" seemed superfluous.
2031         (g_mime_multipart_remove): Same.
2032         (g_mime_multipart_remove_at): Same.
2033         (g_mime_multipart_insert): Renamed from
2034         g_mime_multipart_add_part_at().
2035         (g_mime_multipart_get_count): Renamed to be more obvious.
2036
2037 2008-08-31  Jeffrey Stedfast  <fejj@novell.com>
2038
2039         * gmime/gmime-message-partial.c (g_mime_message_partial_new): Need
2040         to unref the content_type after setting it on the object.
2041
2042         * gmime/gmime-message-part.c (g_mime_message_part_new): Need to
2043         unref the content_type after setting it on the object.
2044
2045         * gmime/gmime-multipart.c (g_mime_multipart_new): Need to unref
2046         the content_type after setting it on the object.
2047         (g_mime_multipart_new_with_subtype): Same.
2048
2049         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2050         Need to unref the content_type after setting it on the
2051         object. Also need to set mps->protocol /before/ we use it.
2052
2053         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_new):
2054         Need to unref the content_type after setting it on the object.
2055         (g_mime_multipart_encrypted_encrypt): Same.
2056
2057         * gmime/gmime-part.c (g_mime_part_new): Need to unref the
2058         content_type after setting it on the object.
2059         (g_mime_part_new_with_type): Same.
2060         (g_mime_part_set_content_header): Removed.
2061         (g_mime_part_get_content_header): Removed.
2062         (g_mime_part_set_filename): Don't need to pre-set a
2063         ContentDisposition on the object if it is NULL,
2064         g_mime_object_set_content_disposition_parameter() will do that for
2065         us.
2066
2067         * gmime/gmime-parser.c (parser_construct_leaf_part): Instead of
2068         going around the GMimeObject's back to set the content_type, call
2069         g_mime_object_set_content_type().
2070         (parser_construct_multipart): Same.
2071
2072         * gmime/gmime-object.c: Updated for GMimeContentType and
2073         ContentDisposition GObjectification.
2074         (g_mime_object_new): New function.
2075
2076         * gmime/gmime-disposition.c: Subclass GObject.
2077
2078         * gmime/gmime-content-type.c: Subclass GObject.
2079
2080         * gmime/internet-address.c: Got rid of unneeded vfuncs for the
2081         changed event (which we don't want to be made public).
2082
2083 2008-08-25  Jeffrey Stedfast  <fejj@novell.com>
2084
2085         Making GMime's object-returning APIs consistent with Gtk+ which do
2086         not ref returned objects.
2087
2088         * tests/test-headers.c (test_header_sync): No longer need to unref
2089         the InternetAddressList object returned from
2090         g_mime_message_get_recipients().
2091
2092         * tests/test-mbox.c (print_mime_struct): Since
2093         g_mime_multipart_get_part() no longer returns a ref'd object, no
2094         need to unref it once we're done with it.
2095
2096         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_decrypt):
2097         Don't ref the returned decrypted part.
2098
2099         * gmime/gmime-message-part.c (g_mime_message_part_get_message):
2100         Don't ref the returned message part.
2101
2102         * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_get_stream):
2103         Don't ref the returned stream.
2104
2105         * gmime/gmime-part.c (g_mime_part_get_content_object): Don't ref
2106         the returned content object anymore.
2107
2108         * gmime/gmime-multipart.c (multipart_get_part): No longer ref the
2109         returned part.
2110         (g_mime_multipart_get_subpart_from_content_id): Same.
2111
2112         * gmime/gmime-message.c (g_mime_message_get_recipients): Don't ref
2113         the list anymore.
2114         (g_mime_message_get_mime_part): Don't ref the returned mime part
2115         anymore.
2116
2117         * gmime/gmime-object.c (g_mime_object_get_content_type): Don't
2118         return const anymore. We want app devs to be able to manipulate
2119         the GMimeContentType directly.
2120         (g_mime_object_get_content_disposition): Same idea here.
2121
2122         * gmime/internet-address.c (internet_address_group_get_members):
2123         Don't ref the members list anymore.
2124         (internet_address_list_get_address): Same.
2125
2126 2008-08-24  Jeffrey Stedfast  <fejj@novell.com>
2127
2128         * tests/test-headers.c (test_header_sync): Check that changes to
2129         the GMimeContentType, GMimeDisposition, and InternetAddressList
2130         objects cause a re-sync of the GMimeObject/GMimeMessage headers.
2131
2132         * gmime/internet-address.c (internet_address_list_add): Connect to
2133         the added address's changed signal. Exposed by my new test-suite
2134         code.
2135         (internet_address_list_insert): Assert index >= 0, not < 0.
2136         (internet_address_list_remove_at): Same.
2137         (internet_address_list_get_address): Same.
2138         (internet_address_list_set_address): Same.
2139         (internet_address_list_to_string): Return NULL if the list is
2140         empty. This makes it easier to keep the new behavior of keeping
2141         around InternetAddressList objects in GMimeMessage the same as the
2142         old behavior when all of the addresses have been removed.
2143
2144         * gmime/gmime-disposition.c (g_mime_content_disposition_set_params):
2145         New function.
2146
2147         * gmime/gmime-content-type.c (g_mime_content_type_set_media_type):
2148         New function.
2149         (g_mime_content_type_set_media_subtype): Another new function.
2150         (g_mime_content_type_set_params): New function.
2151
2152 2008-08-19  Jeffrey Stedfast  <fejj@novell.com>
2153
2154         * gmime/gmime-message.c: Updated to listen to changed events from
2155         recipient lists and to update the headers when the lists change.
2156
2157         * gmime/internet-address.c: InternetAddress is now GObject with a
2158         "changed" signal. Split out InternetAddressMailbox and
2159         InternetAddressGroup subclasses of
2160         InternetAddress. InternetAddressList is now also a GObject with a
2161         "changed" signal. These changes were made so that manipulating an
2162         InternetAddress[List] of recipients will auto-magically update
2163         GMimeMessage's corresponding recipient header.
2164
2165 2008-08-18  Jeffrey Stedfast  <fejj@novell.com>
2166
2167         * gmime/gmime-message.c (g_mime_message_get_recipients): Now
2168         returns a ref'd version of the InternetAddressList. You must now
2169         unref the list when you are done with it.
2170
2171         * tools/gmime-port-2-2-to-2-4.sh: Updated.
2172
2173         * gmime/internet-address.c (internet_address_new_mailbox): Renamed
2174         from internet_address_new_name() to make it less ambiguous (and to
2175         use the terminology used in the RFC's).
2176         (internet_address_get_type): Now takes a const InternetAddress
2177         argument.
2178         (internet_address_get_name): Same.
2179         (internet_address_get_addr): Same.
2180         (internet_address_get_members): Same, but now returns a ref'd
2181         InternetAddressList rather than a const InternetAddressList.
2182         (internet_address_list_ref): InternetAddressLists are now
2183         reffable.
2184         (internet_address_list_unref): Same.
2185         (internet_address_list_get_address): Now returns a ref'd copy of
2186         the InternetAddress at the index specified.
2187
2188 2008-08-16  Jeffrey Stedfast  <fejj@novell.com>
2189
2190         * README: Bumped version
2191
2192         * configure.in: Bumped version to 2.3.7
2193
2194 2008-08-16  Jeffrey Stedfast  <fejj@novell.com>
2195
2196         Fixes to actually pass the test suite. D'oh!
2197
2198         * gmime/gmime-message.c (process_header): Protect against passing
2199         a NULL list to internet_address_list_to_string().
2200         (g_mime_message_add_recipient): Create a new InternetAddressList
2201         if it doesn't already exist in the hash table.
2202         (message_add_recipients_from_string): Protect against passing a
2203         NULL list to internet_address_list_concat().
2204
2205         * gmime/internet-address.c (_internet_address_list_to_string):
2206         Fixed the logic to avoid adding a ',' after the last email
2207         address.
2208
2209 2008-08-16  Jeffrey Stedfast  <fejj@novell.com>
2210
2211         * README: Bumped version
2212
2213         * configure.in: Bumped version to 2.3.6
2214
2215 2008-08-16  Jeffrey Stedfast  <fejj@novell.com>
2216
2217         * mono/InternetAddressList.cs: Rewritten to be more awesome. Now
2218         implements IList.
2219
2220         * tools/gmime-port-2-2-to-2-4.sh: Updated.
2221
2222         * gmime/gmime-message.c: Updated for InternetAddressList API
2223         changes.
2224
2225         * gmime/internet-address.c: Completely reworked the
2226         InternetAddressList API.
2227         (internet_address_list_parse_string): Renamed from
2228         internet_address_parse_string().
2229
2230 2008-08-15  Jeffrey Stedfast  <fejj@novell.com>
2231
2232         * gmime/internet-address.c (decode_mailbox): Implemented a
2233         work-around for broken email addresses that have more than a
2234         single '.' between word tokens making up the local-part of an
2235         addr-spec. See Evolution bug #547969 for details.
2236
2237 2008-08-07  Jeffrey Stedfast  <fejj@novell.com>
2238
2239         * gmime/gmime-message-part.c (g_mime_message_part_get_message):
2240         Only ref the message if it is non-NULL. Thanks to Peter Bloomfield
2241         for this fix.
2242
2243 2008-07-19  Jeffrey Stedfast  <fejj@novell.com>
2244
2245         * gmime/gmime-header.c (g_mime_header_iter_get_offset): Disable
2246         for now, currently it never gets set.
2247
2248 2008-07-11  Jeffrey Stedfast  <fejj@novell.com>
2249
2250         * src/uudecode.c (uudecode): Don't base64 decode the
2251         end-tag ("====\n"). Fixes bug #542222.
2252
2253 2008-07-08  Jeffrey Stedfast  <fejj@novell.com>
2254
2255         * COPYING: Fixed to reference LGPL v2.1
2256
2257         * docs/reference/gmime-sections.txt: Updated.
2258
2259         * gmime/gmime-header.c (g_mime_header_list_foreach): Added back
2260         since it's fairly simple and makes it easier for apps to be ported
2261         over to GMime 2.4
2262
2263         * gmime/gmime-message.h: Removed unused prototypes.
2264
2265         * gmime/gmime-common.h: Same.
2266
2267 2008-07-05  Jeffrey Stedfast  <fejj@novell.com>
2268
2269         * README: Bumped version
2270
2271         * configure.in: Doltified and bumped version to 2.3.5
2272
2273 2008-07-04  Jeffrey Stedfast  <fejj@novell.com>
2274
2275         * mono/Message.custom: Updated.
2276
2277         * gmime/gmime-message.[c,h]: Make GMIME_RECIPIENT_TYPE_* string
2278         macros into an enum. Translate the enum into strings as
2279         appropriate internally.
2280
2281 2008-07-04  Jeffrey Stedfast  <fejj@novell.com>
2282
2283         Fixes bug #541578
2284
2285         * gmime/gmime-message.c (g_mime_message_add_recipient): Change
2286         'type' argument to const char *.
2287         (g_mime_message_add_recipients_from_string): Same.
2288
2289 2008-06-20  Jeffrey Stedfast  <fejj@novell.com>
2290
2291         * gmime/gmime-multipart.c (g_mime_multipart_remove_part): Fixed
2292         g_return macros to return bool instead of void.
2293
2294         * gmime/gmime-cipher-context.c (g_mime_signer_get_errors): Fixed
2295         the function name to match the prototype name.
2296
2297         * gmime/gmime-header.c (g_mime_header_list_remove): Fixed the
2298         g_return macros here too. Also need to make sure to return TRUE at
2299         the end of the function.
2300
2301         * gmime/gmime-part.c (write_content): Don't unred filtered_stream
2302         if we haven't used it.
2303
2304         * gmime/gmime-object.c (g_mime_object_remove_header): Fixed
2305         g_return macros, this function returns bool, not void.
2306
2307         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Get rid of
2308         unused variable.
2309
2310 2008-06-18  Jeffrey Stedfast  <fejj@novell.com>
2311
2312         * README: Bumped version
2313
2314         * configure.in: Bumped version to 2.3.4
2315
2316 2008-06-15  Jeffrey Stedfast  <fejj@novell.com>
2317
2318         * gmime/gmime-gpg-context.c (status_backup): Use the bitwise
2319         nearest_pow() implementation.
2320
2321 2008-06-14  Jeffrey Stedfast  <fejj@novell.com>
2322
2323         * gmime/gmime-parser.c: When mallocing header/raw buffers, malloc
2324         a power-of-2 rather than a power-of-2 + 1. Also optimized the
2325         logic to calculate the amount of memory to realloc.
2326
2327 2008-06-12  Jeffrey Stedfast  <fejj@novell.com>
2328
2329         * gmime/gmime-encodings.h (GMIME_QP_ENCODE_LEN): Add an extra byte
2330         for \n in the case of quoted_encode_close(). Thanks to Peter
2331         Bloomfield for discovering this.
2332
2333 2008-06-08  Jeffrey Stedfast  <fejj@novell.com>
2334
2335         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): added
2336         constants for MD2, TIGER and HAVAL.
2337
2338 2008-06-08  Jeffrey Stedfast  <fejj@novell.com>
2339
2340         * README: Bumped version
2341
2342         * configure.in: Bumped version to 2.3.3
2343
2344         * docs/reference/changes-2.4.sgml: Updated.
2345
2346         * PORTING: Updated.
2347
2348 2008-06-07  Jeffrey Stedfast  <fejj@novell.com>
2349
2350         * gmime/*.h: Finished documenting all of the structs. Now at 100%
2351         symbols documented! Woot!
2352
2353         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2354         Use the GMimeCipherHash returned from g_mime_cipher_context_sign()
2355         to create the micalg parameter value - this way if the requested
2356         hash was DEFAULT, we set the micalg to the proper value.
2357
2358         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Parse which
2359         hash algorithm was actually used by gpg.
2360         (gpg_hash_str): Updated to return strings for the new SHA
2361         algorithms added this past week.
2362         (gpg_sign): Return the hash algorithm actually used.
2363
2364         * gmime/gmime-cipher-context.c (g_mime_cipher_context_sign): This
2365         method now returns -1 on fail or the GMimeCipherHash on success.
2366
2367 2008-06-07  Jeffrey Stedfast  <fejj@novell.com>
2368
2369         * gmime/gmime-parse-utils.c (g_mime_decode_word): No longer
2370         returns a strdup'd string, this helps increase the performance of
2371         the address parser and reduces memory fragmentation.
2372
2373         * gmime/gmime-utils.c (g_mime_references_decode): Updated for
2374         decode_word() changes.
2375         (decode_addrspec): Same.
2376
2377         * gmime/internet-address.c (decode_mailbox): Make sure we don't
2378         stray beyond the end of the input string. Also updated for changes
2379         to decode_word() (which now returns a const string rather than a
2380         strdup'd string).
2381
2382         * gmime/gmime-header.c (g_mime_header_iter_is_valid): Fixed an FMR
2383         when the header the cursor is pointing to has been removed by
2384         validating the hdrlist version first.
2385
2386 2008-06-06  Jeffrey Stedfast  <fejj@novell.com>
2387
2388         * README: Bumped version
2389
2390         * configure.in: Bumped version to 2.3.2
2391
2392         * gmime/*.[c,h]: Updated a bunch of gtk-doc documentation.
2393
2394 2008-06-05  Jeffrey Stedfast  <fejj@novell.com>
2395
2396         * gmime/gmime-message.c (g_mime_message_get_date_as_string):
2397         Renamed from g_mime_message_get_date_string().
2398         (g_mime_message_set_date_as_string): New function to provide
2399         another means of setting a date (might help with some bindings
2400         where time_t and tz_offsets are more difficult to work with).
2401
2402         * mono/GMime.metadata: Fixed MessagePartial.ReconstructMessage
2403         binding, thanks to Mike Kestner for helping me figure out the
2404         proper metadata kung-fu to achieve this.
2405
2406         * gmime/gmime-object.c: Get rid of the 'init' class method,
2407         GObject already has an initializer (must be a leftover from before
2408         the port to GObject).
2409         (g_mime_object_new_type): Don't call GMimeObject->init(),
2410         g_object_new() has already initialized the object.
2411
2412         * gmime/gmime-multipart.c (g_mime_multipart_remove_part): Now
2413         returns TRUE or FALSE.
2414
2415 2008-06-04  Jeffrey Stedfast  <fejj@novell.com>
2416
2417         * tests/test-pgp.c (main): Test encrypt+sign and decrypt+verify as
2418         well.
2419
2420 2008-06-03  Jeffrey Stedfast  <fejj@novell.com>
2421
2422         * tests/test-pgpmime.c: Updated to test for
2423         multipart/encrypted+sign
2424
2425         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2426         Changed to take 'sign' and 'userid' arguments so that it is
2427         possible to both sign and encrypt the content.
2428         (g_mime_multipart_encrypted_decrypt): Updated to save the
2429         GMimeSignatureValidity from our call ot
2430         g_mime_cipher_context_decrypt() so that callers can choose to get
2431         the signer validity (in the case where the encrypted part was also
2432         signed).
2433         (g_mime_multipart_encrypted_get_signature_validity): New function.
2434
2435         * gmime/gmime-gpg-context.c (gpg_decrypt): Updated to return a
2436         GMimeSignatureValidity.
2437         (gpg_ctx_parse_signer_info): Split out from gpg_ctx_parse_status()
2438         to parse signer info.
2439         (gpg_ctx_parse_status): Updated VERIFY mode to call
2440         gpg_ctx_parse_signer_info() and made DECRYPT also call it so that
2441         we properly collect signer info when the encrypted stream was also
2442         signed.
2443         (gpg_encrypt): Respect the 'sign' argument.
2444
2445         * gmime/gmime-cipher-context.c (g_mime_cipher_context_decrypt):
2446         Now returns a GMimeSignatureValidity in case the encrypted stream
2447         was also signed.
2448
2449 2008-06-02  Jeffrey Stedfast  <fejj@novell.com>
2450
2451         * gmime/gmime-message-partial.c (message_partial_message_new): Use
2452         an iter on the stack.
2453
2454         * gmime/gmime-header.[c,h]: Changed iters again. Iters are now
2455         able to be allocated on the stack by making the struct public,
2456         however this means that they are more sensitive to changes in the
2457         HeaderList (e.g. all iters other than the one used to remove a
2458         header become invalid regardless of whether or not the header they
2459         refer to still exists).
2460
2461 2008-06-01  Jeffrey Stedfast  <fejj@novell.com>
2462
2463         * gmime/gmime-header.c (g_mime_header_iter_new): New function to
2464         allocate an iter on the heap.
2465         (g_mime_header_iter_copy_to): New copy function so that you can
2466         copy to a pre-allocated destination iter.
2467         (g_mime_header_list_get_iter): Changed the API a bit. Instead of
2468         returning a newly allocated iter, instead return bool and take an
2469         iter arg to initialize.
2470
2471 2008-06-01  Jeffrey Stedfast  <fejj@novell.com>
2472
2473         * tools/gmime-port-2-2-to-2-4.sh: New helper tool to port existing
2474         GMime 2.0 and 2.2 based applications over to GMime 2.4.
2475
2476         * gmime/gmime-part.c: Updated for GMimeFilterCRLF changes.
2477
2478         * gmime/gmime-multipart-signed.c: Updated for GMimeFilterCRLF
2479         changes.
2480
2481         * gmime/gmime-multipart-encrypted.c: Updated for GMimeFilterCRLF
2482         changes.
2483
2484         * gmime/gmime-filter-crlf.c (g_mime_filter_crlf_new): No longer
2485         takes 2 enum arguments, rather it now takes 2 bool arguments which
2486         makes the API simpler to understand.
2487
2488         * gmime/gmime-filter-best.c (g_mime_filter_best_new): Changed the
2489         unsigned int flags argument to be an enum so developers could more
2490         easily figure out what the argument was.
2491
2492         * gmime/gmime-param.c (g_mime_param_next): New helper function for
2493         bindings.
2494         (g_mime_param_get_name): Same.
2495         (g_mime_param_get_value): Same.
2496
2497 2008-05-31  Jeffrey Stedfast  <fejj@novell.com>
2498
2499         * tests/test-html.c (main): Updated.
2500
2501         * tests/test-best.c (main): Updated.
2502
2503         * src/uuencode.c (uuencode): Updated.
2504
2505         * gmime/gmime-part.c: Updated for filter stream change.
2506
2507         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
2508         Updated for filter stream change.
2509
2510         * gmime/gmime-multipart-encrypted.c: Updated for filter stream
2511         change.
2512
2513         * gmime/gmime-gpg-context.c (gpg_ctx_new): Updated for filter
2514         stream change.
2515
2516         * gmime/gmime-filter-yenc.c (g_mime_filter_yenc_new): Now takes a
2517         bool encode argument rather than a GMimeFilterYencDirection - no
2518         sense making this more complicated than it needs to be.
2519
2520         * gmime/gmime-stream-filter.c (g_mime_stream_filter_new): Renamed
2521         from g_mime_stream_filter_new_with_stream(). This is the only
2522         constructor, so should be named _new().
2523
2524 2008-05-31  Jeffrey Stedfast  <fejj@novell.com>
2525
2526         * README: Bumped version
2527
2528         * configure.in: Bumped version to 2.3.1
2529
2530         * gmime/gmime-header.c (g_mime_header_list_invalidate_iters): Only
2531         unlink the iter if the headers are being destroyed.
2532
2533         * gmime/gmime-gpg-context.c: Updated.
2534
2535         * gmime/gmime-cipher-context.c: Added GMimeCipherHash enums for
2536         SHA-224, SHA-256, SHA-384 and SHA-512.
2537         (g_mime_signer_next): New function to ease binding.
2538         (g_mime_signer_set_status): Same.
2539         (g_mime_signer_get_status): Same.
2540         (g_mime_signer_set_error): Same.
2541         (g_mime_signer_get_error): Same.
2542         (g_mime_signer_set_trust): Same.
2543         (g_mime_signer_get_trust): Same.
2544         (g_mime_signer_set_fingerprint): Same.
2545         (g_mime_signer_get_fingerprint): Same.
2546         (g_mime_signer_set_key_id): Same.
2547         (g_mime_signer_get_key_id): Same.
2548         (g_mime_signer_set_name): Same.
2549         (g_mime_signer_get_name): Same.
2550         (g_mime_signer_set_sig_created): Same.
2551         (g_mime_signer_get_sig_created): Same.
2552         (g_mime_signer_set_sig_expire): Same.
2553         (g_mime_signer_get_sig_expire): Same.
2554
2555 2008-05-31  Jeffrey Stedfast  <fejj@novell.com>
2556
2557         * gmime/gmime-object.c (g_mime_object_get_header_list): New
2558         function to get at the GMimeObject headers.
2559
2560         * gmime/gmime-message-partial.c (message_partial_message_new): Use
2561         iters to copy the headers.
2562
2563         * gmime/gmime-header.c (g_mime_header_list_foreach): Removed, this
2564         API sucked.
2565
2566 2008-05-31  Jeffrey Stedfast  <fejj@novell.com>
2567
2568         * tests/test-headers.c: New set of unit tests for GMimeHeaderIter.
2569
2570         * gmime/gmime-header.c (g_mime_header_iter_equal): New method to
2571         check if two iters are equal.
2572         (g_mime_header_iter_first): New method to update @iter to point to
2573         the first header.
2574         (g_mime_header_iter_last): New method to update @iter to point to
2575         the last header.
2576         (g_mime_header_iter_next): Fixed.
2577         (g_mime_header_iter_prev): Fixed.
2578         (g_mime_header_iter_remove): Invalidate all other iters currently
2579         pointing to the same header as @iter.
2580
2581 2008-05-30  Jeffrey Stedfast  <fejj@novell.com>
2582
2583         * gmime/gmime-parser.c: Updated for GMimeHeaderList and
2584         GMimeObject changes.
2585
2586         * gmime/gmime-message-partial.c: Updated for GMimeHeaderList and
2587         GMimeObject changes.
2588
2589         * gmime/gmime-multipart-encrypted.c: Updated for GMimeHeaderList
2590         and GMimeObject changes.
2591
2592         * gmime/gmime-multipart-signed.c: Updated for GMimeHeaderList and
2593         GMimeObject changes.
2594
2595         * gmime/gmime-multipart.c: Updated for GMimeHeaderList and
2596         GMimeObject changes.
2597
2598         * gmime/gmime-part.c: Updated for GMimeHeaderList and GMimeObject
2599         changes.
2600
2601         * gmime/gmime-message.c: Updated for GMimeHeaderList and
2602         GMimeObject changes.
2603
2604         * gmime/gmime-object.c (g_mime_object_append_header): Renamed from
2605         g_mime_object_add_header().
2606         (g_mime_object_prepend_header): New method.
2607         (remove_header): Cleanup content-header variables if they get
2608         removed. Don't allow removal of the Content-Type header.
2609
2610         * gmime/gmime-header.[c,h]: Renamed GMimeHeader to GMimeHeaderList
2611         and all of it's methods appropriately. Added a new GMimeHeaderIter
2612         class for iterating over a header list.
2613         (g_mime_header_list_remove): Return gboolean specifying whether or
2614         not a header was removed.
2615         (g_mime_header_list_get_iter): New function to get a header
2616         iterator.
2617
2618 2008-05-30  Jeffrey Stedfast  <fejj@novell.com>
2619
2620         * util/cache.c: Updated for list.[c,h] changes.
2621
2622         * util/list.c (list_append): Renamed from list_append_node().
2623         (list_prepend): Renamed from list_prepend_node().
2624         (list_unlink): Renamed from list_node_unlink().
2625
2626 2008-05-30  Jeffrey Stedfast  <fejj@novell.com>
2627
2628         * gmime/gmime-message.c (g_mime_message_get_headers): Removed as
2629         GMimeObject has an equivalent method.
2630         (handle_multipart_alternative): Removed.
2631         (handle_multipart_mixed): Removed.
2632         (g_mime_message_get_header): Removed, this has equivalent
2633         functionality on GMimeObject.
2634         (g_mime_message_set_header): Same.
2635         (g_mime_message_add_header): Same.
2636
2637 2008-05-28  Jeffrey Stedfast  <fejj@novell.com>
2638
2639         * README: Bumped version
2640
2641         * configure.in: Bumped version to 2.3.0
2642
2643 2008-05-28  Jeffrey Stedfast  <fejj@novell.com>
2644
2645         These changes are to make it so that changing the GMimeContentType
2646         and/or GMimeContentDisposition fields directly will still update
2647         the headers.
2648
2649         * gmime/gmime-disposition.c (g_mime_content_disposition_set_disposition):
2650         Notify our parent object that we've changed.
2651         (g_mime_content_disposition_set_parameter): Same.
2652
2653         * gmime/gmime-content-type.c (g_mime_content_type_set_parameter):
2654         Notify our parent object that we've changed.
2655
2656         * gmime/gmime-object.c (_g_mime_object_content_type_changed):
2657         Renamed from sync_content_type() and also made callable from
2658         gmime-content-type.c
2659         (_g_mime_object_content_disposition_changed): Renamed from
2660         sync_content_disposition() and also made callable from
2661         gmime-disposition.c
2662         (g_mime_object_set_content_type): Set the parent object on the
2663         GMimeContentType and call _g_mime_object_content_type_changed().
2664         (g_mime_object_set_content_disposition): Set the parent object on
2665         the GMimeContentDisposition and call
2666         _g_mime_object_content_disposition_changed().
2667
2668 2008-05-28  Jeffrey Stedfast  <fejj@novell.com>
2669
2670         * gmime/gmime-encodings.c: New source file containing all the
2671         basic MIME encoding functions.
2672
2673         * src/uuencode.c: Updated.
2674
2675         * src/uudecode.c: Updated.
2676
2677         * gmime/gmime-parser.c: Updated for GMimeContentEncoding change.
2678
2679         * gmime/gmime-multipart-signed.c: Updated for GMimeContentEncoding
2680         change.
2681
2682         * gmime/gmime-multipart-encrypted.c: Updated for
2683         GMimeContentEncoding change.
2684
2685         * gmime/gmime-message-partial.c: Updated for GMimeContentEncoding
2686         change.
2687
2688         * gmime/gmime-filter-best.c (g_mime_filter_best_encoding): Updated
2689         to use the new GMimeContentEncoding enum.
2690
2691         * gmime/gmime-data-wrapper.c: Updated to use GMimeContentEncoding
2692         enum.
2693         (write_to_stream): Drastically simplified using the new
2694         GMimeFilterBasic API.
2695
2696         * gmime/gmime-filter-basic.c: Updated to use the new GMimeEncoding
2697         API.
2698         (g_mime_filter_basic_new): Renamed and changed the arguments. We
2699         now just re-use the GMimeContentEncoding enum and a bool to
2700         declare encode vs decode.
2701
2702         * gmime/gmime-utils.c (g_mime_references_free): New function to
2703         simplify bindings.
2704         (g_mime_utils_best_encoding): Updated to use the new
2705         GMimeContentEncoding enum.
2706         (g_mime_utils_base64_encode_close): Moved to gmime-encodings.c
2707         and renamed to g_mime_encoding_base64_encode_close().
2708         (g_mime_utils_base64_encode_step): Same.
2709         (g_mime_utils_base64_decode_step): Same.
2710         (g_mime_utils_uuencode_close): Same.
2711         (g_mime_utils_uuencode_step): Same.
2712         (g_mime_utils_uudecode_step): Same.
2713         (g_mime_utils_quoted_encode_close): Same.
2714         (g_mime_utils_quoted_encode_step): Same.
2715         (g_mime_utils_quoted_decode_step): Same.
2716
2717         * gmime/gmime-utils.h (GMimePartEncodingType): Removed. This enum
2718         has been replaced.
2719
2720         * gmime/gmime-part.c (g_mime_part_set_content_type): Removed,
2721         GMimeObject already has this functionality.
2722         (g_mime_part_get_content_type): Same.
2723         (g_mime_part_set_content_encoding): Renamed from
2724         g_mime_part_set_encoding() and updated to use the new
2725         GMimeContentEncoding enum.
2726         (g_mime_part_get_content_encoding): Renamed from
2727         g_mime_part_get_encoding() and updated to use the new
2728         GMimeContentEncoding enum.
2729         (g_mime_part_encoding_to_string): Removed, equivalent
2730         functionality has been added to gmime-encodings.c named
2731         g_mime_content_encoding_to_string().
2732         (g_mime_part_encoding_from_string): Removed, equivalent
2733         functionality has been added to gmime-encodings.c named
2734         g_mime_content_encoding_from_string().
2735         (write_content): Updated for new GMimeFilterBasic API which helps
2736         simplify this.
2737
2738 2008-05-27  Jeffrey Stedfast  <fejj@novell.com>
2739
2740         * gmime/gmime-utils.c (g_mime_references_get_message_id): New
2741         accessor function to ease bindings.
2742         (g_mime_references_get_next): Renamed from
2743         g_mime_references_next() for consistency.
2744         (g_mime_utils_8bit_header_decode): Removed.
2745         (g_mime_utils_8bit_header_encode): Removed.
2746         (g_mime_utils_8bit_header_encode_phrase): Removed.
2747
2748         * gmime/gmime-disposition.c (g_mime_content_disposition_get_params):
2749         New accessor function to ease bindings.
2750
2751         * gmime/gmime-content-type.c (g_mime_content_type_get_media_type):
2752         New accessor function to ease bindings.
2753         (g_mime_content_type_get_media_subtype): Same.
2754         (g_mime_content_type_get_params): Same.
2755
2756 2008-05-27  Jeffrey Stedfast  <fejj@novell.com>
2757
2758         * examples/basic-example.c: Fixed to use GMimeSignatureValidity.
2759
2760         * gmime/gmime-cipher-context.c (g_mime_cipher_*): Removed, since
2761         we're not going to maintain compatability with 2.2, no sense
2762         keeping these wrappers around.
2763         (g_mime_cipher_validity_*): Removed. No one should still be using
2764         these...
2765
2766 2008-05-26  Jeffrey Stedfast  <fejj@novell.com>
2767
2768         * gmime/gmime-message.c (g_mime_message_get_body): Removed.
2769
2770         * gmime/gmime-disposition.c: Changed GMimeDisposition to
2771         GMimeContentDisposition and updated method names to match.
2772         (g_mime_content_disposition_new_from_string): Same as the old
2773         g_mime_disposition_new().
2774         (g_mime_content_disposition_new): New ctor that doesn't take any
2775         args.
2776         (g_mime_content_disposition_set_parameter): Renamed from
2777         g_mime_disposition_add_parameter().
2778         (g_mime_content_disposition_get_disposition): Renamed from
2779         g_mime_disposition_get().
2780         (g_mime_content_disposition_set_disposition): Renamed from
2781         g_mime_disposition_set().
2782
2783         * gmime/gmime-object.c: Moved Content-Disposition handling here.
2784         (g_mime_object_get_content_disposition): New method which is the
2785         equivalent of g_mime_part_get_content_disposition_object().
2786         (g_mime_object_set_content_disposition): New method which is the
2787         equivalent of g_mime_part_set_content_disposition_object().
2788         (g_mime_object_get_disposition): New method which is the
2789         equivalent of g_mime_part_get_content_disposition().
2790         (g_mime_object_set_disposition): New method which is the
2791         equivalent of g_mime_part_set_content_disposition().
2792         (g_mime_object_get_content_disposition_parameter): New method
2793         which is the equivalent of
2794         g_mime_part_get_content_disposition_parameter().
2795         (g_mime_object_set_content_disposition_parameter): New method
2796         which is the equivalent of
2797         g_mime_part_add_content_disposition_parameter().
2798
2799         * gmime/gmime-part.c (g_mime_part_get_content_disposition_object):
2800         Moved functionality to GMimeObject.
2801         (g_mime_part_set_content_disposition_object): Same.
2802         (g_mime_part_set_content_disposition): Same.
2803         (g_mime_part_get_content_disposition): Same.
2804         (g_mime_part_add_content_disposition_parameter): Same.
2805         (g_mime_part_get_content_disposition_parameter): Same.
2806         (g_mime_part_set_content): Removed long-deprecated function.
2807         (g_mime_part_set_content_byte_array): Same.
2808         (g_mime_part_set_pre_encoded_content): Same.
2809         (g_mime_part_get_content): Same.
2810         (g_mime_part_set_content_type):
2811         Removed... equivalent functionality already on GMimeObject.
2812         (g_mime_part_get_content_type): Same.
2813
2814 2008-05-25  Jeffrey Stedfast  <fejj@novell.com>
2815
2816         * gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
2817         Don't use g_mime_part_set_content() as it is a deprecated
2818         function.
2819
2820         * gmime/gmime-part.c (g_mime_part_get_content_disposition_object):
2821         Added an accessor to make bindings easier.
2822
2823 2008-05-24  Jeffrey Stedfast  <fejj@novell.com>
2824
2825         * gmime/gmime-stream.c (stream_eos): Fixed a typo.
2826
2827 2008-05-24  Jeffrey Stedfast  <fejj@novell.com>
2828
2829         * tests/test-pgp.c: Updated.
2830
2831         * gmime/gmime-multipart-encrypted.c: Updated.
2832
2833         * gmime/gmime-multipart-signed.c: Updated.
2834
2835         * gmime/gmime-cipher-context.c (g_mime_cipher_context_*): Renamed
2836         from g_mime_cipher_*() which did not match the class
2837         name. Deprecated the old names.
2838
2839 2008-05-24  Jeffrey Stedfast  <fejj@novell.com>
2840
2841         * gmime/gmime-message.c (g_mime_message_write_to_stream):
2842         Removed. Removing all deprecated functions which have equivalent
2843         functionality in a parent class.
2844         (g_mime_message_to_string): Same.
2845
2846         * gmime/gmime-object.c (g_mime_object_ref): Same.
2847         (g_mime_object_unref): Same.
2848
2849         * gmime/gmime-part.c (g_mime_part_write_to_stream): Same.
2850         (g_mime_part_to_string): Same.
2851
2852         * gmime/gmime-stream.c (g_mime_stream_ref): Same.
2853         (g_mime_stream_unref): Same.
2854
2855 2008-05-23  Jeffrey Stedfast  <fejj@novell.com>
2856
2857         * gmime/gmime-stream-fs.c: Cast offset arguments to lseek() to
2858         off_t.
2859
2860         * gmime/gmime-stream-file.c: Cast offset arguments to fseek() to
2861         long.
2862
2863         * gmime/gmime-stream-mmap.c (g_mime_stream_mmap_new_with_bounds):
2864         Don't assign to st.st_size.
2865
2866         * gmime/*.[c,h]: Use gint64 instead of off_t for public APIs.
2867
2868         * mono/gmime-api.raw: s/off_t/gint64/g
2869
2870 2008-05-23  Jeffrey Stedfast  <fejj@novell.com>
2871
2872         * mono/Makefile.am: Don't delay-sign, newer versions of Mono do
2873         not allow this anymore.
2874
2875         * mono/gmime-sharp.snk: New sign-key for signing gmime-sharp
2876         assembly.
2877
2878         * mono/AssemblyInfo.cs.in: Updated.
2879
2880 2008-05-23  Jeffrey Stedfast  <fejj@novell.com>
2881
2882         * branched: now begins 2.3.x development
2883
2884         * gmime-2.4.pc.in: Renamed from gmime-2.0.pc.in.
2885
2886         * gmime-config.in: Removed.
2887
2888         * gmimeConf.sh.in: Removed.
2889
2890         * configure.in: Updated.
2891
2892         * */Makefile.am: Rename lib name to gmime-2.4.
2893
2894 2008-05-23  Jeffrey Stedfast  <fejj@novell.com>
2895
2896         * mono/StreamWrapper.cs: Allow seeking to position 0 for
2897         GMimeStreamFilter. Thanks to Debajyoti Bera for this patch.
2898
2899 2008-05-23  Jeffrey Stedfast  <fejj@novell.com>
2900
2901         * README: Bumped version
2902
2903         * configure.in: Bumped version to 2.2.21
2904
2905         * gmime/gmime-parser.c: Check parser_step() against
2906         GMIME_PARSER_STATE_ERROR rather than -1 in case the value ever
2907         changes.
2908         (struct _GMimeParserPrivate): Changed state to be 16bit int
2909         instead of a 26bit int which apparently cannot be set to -1 on
2910         Solaris. Fixes bug #534301.
2911         (parser_step_headers): Fixed a corner-case where a read boundary
2912         fell between the \n and \t of a folded header.
2913
2914 2008-05-16  Jeffrey Stedfast  <fejj@novell.com>
2915
2916         * README: Bumped version
2917
2918         * configure.in: Bumped version to 2.2.20
2919
2920 2008-05-15  Jeffrey Stedfast  <fejj@novell.com>
2921
2922         * gmime/gmime-stream-buffer.c (stream_read): Break if
2923         g_mime_stream_read() returns 0 as well (meaning EOF, no more data
2924         to read) and don't keep looping. Fixes bug #533331.
2925
2926 2008-05-03  Jeffrey Stedfast  <fejj@novell.com>
2927
2928         * README: Bumped version
2929
2930         * configure.in: Bumped version to 2.2.19
2931
2932 2008-05-02  Jeffrey Stedfast  <fejj@novell.com>
2933
2934         * gmime/gmime-parser.c (parser_step_headers): Fix for CRLF encoded
2935         input.
2936
2937 2008-04-05  Jeffrey Stedfast  <fejj@novell.com>
2938
2939         * gmime/gmime-parser.c (header_parse): Fixed a memory leak in the
2940         case of an invalid header.
2941
2942 2008-02-16  Jeffrey Stedfast  <fejj@novell.com>
2943
2944         * README: Bumped version
2945
2946         * configure.in: Bumped version to 2.2.18
2947
2948 2008-03-13  Jeffrey Stedfast  <fejj@novell.com>
2949
2950         * gmime/gmime-parser.c (parser_construct_message): Changed
2951         content_length to an unsigned long rather than unsigned int, fixes
2952         bug #521872. Thanks to Pawel Salek for this fix.
2953
2954 2008-03-10  Jeffrey Stedfast  <fejj@novell.com>
2955
2956         * gmime/gmime-parser.c (parser_scan_mime_part_content): Don't let
2957         size go negative.
2958
2959 2008-02-10  Jeffrey Stedfast  <fejj@novell.com>
2960
2961         * README: Bumped version
2962
2963         * configure.in: Bumped version to 2.2.17
2964
2965 2008-02-09  Jeffrey Stedfast  <fejj@novell.com>
2966
2967         * gmime/gmime-filter-basic.c (filter_filter): Use the new macros
2968         defined below.
2969
2970         * gmime/gmime-utils.c (rfc2047_encode_word): Use the new macros.
2971
2972         * gmime/gmime-utils.h: Added more accurate encoding-length macros
2973         for base64, quoted-printable, and uuencode which are try to
2974         minimize over-calculating the amount of output data that we
2975         need. Also namespaced them.
2976
2977 2008-02-08  Jeffrey Stedfast  <fejj@novell.com>
2978
2979         * src/uudecode.c (uudecode): Use g_strchomp() on the filename
2980         parsed from the 'begin' line.
2981
2982 2008-02-07  Jeffrey Stedfast  <fejj@novell.com>
2983
2984         * util/url-scanner.c (url_web_end): Handle IP address literals
2985         within []'s. Fixes bug #515088.
2986
2987 2008-02-06  Jeffrey Stedfast  <fejj@novell.com>
2988
2989         * gmime/gmime-utils.c (g_mime_utils_uuencode_step): Optimized.
2990
2991 2008-02-03  Jeffrey Stedfast  <fejj@novell.com>
2992
2993         * gmime/gmime-stream-cat.c (stream_read): Removed an extra seek.
2994
2995 2008-02-02  Jeffrey Stedfast  <fejj@novell.com>
2996
2997         * README: Bumped version
2998
2999         * configure.in: Bumped version to 2.2.16
3000
3001 2008-02-02  Jeffrey Stedfast  <fejj@novell.com>
3002
3003         Fix for https://bugzilla.novell.com/show_bug.cgi?id=333292 and
3004         some other bugs I discovered while fixing it.
3005
3006         * gmime/gmime-parser.c (header_parse): Made an actual function
3007         rather than a macro. Don't turn invalid headers into
3008         X-Invalid-Headers, just ignore them. Instead of using
3009         g_strstrip(), do our own lwsp trimming so we can do it before
3010         malloc'ing - this helps reduce memory usage and memmove()
3011         processing in g_strstrip().
3012         (parser_step_headers): Validate the header field names as we go so
3013         that we can stop when we come to an invalid header in some
3014         cases. May now return with 3 states rather than only 1:
3015         HEADERS_END (as before), CONTENT (suggesting we've reached body
3016         content w/o a blank line to separate it from the headers), and
3017         COMPLETE (which suggests that we've reached the next message's
3018         From-line).
3019         (parser_skip_line): Rearranged a bit: don't fill unless/until we
3020         need to.
3021         (parser_step): For HEADERS_END state, skip a line and increment
3022         state to CONTENT. No-op for CONTENT and COMPLETE states.
3023         (parser_scan_message_part): parser_step() can return more than
3024         just HEADERS_END on 'success' when starting with HEADERS state, so
3025         check for error rather than HEADERS_END.
3026         (parser_construct_leaf_part): No need to parser_step() thru header
3027         parsing, they should already be parsed by the time we get
3028         here. Also, don't call parser_skip_line() directly to skip the
3029         blank line between headers and content, use parser_step() to do
3030         that for us.
3031         (parser_construct_multipart): Same as parser_construct_leaf_part()
3032         (found_immediate_boundary): Now takes an 'end' argument so callers
3033         can request a check against an end-boundary vs a part boundary.
3034         (parser_scan_multipart_subparts): Check for errors with
3035         parser_skip_line(). Set HEADERS state and use parser_step() to
3036         parse headers rather than calling parser_step_headers()
3037         directly. If, after parsing the headers, we are at the next
3038         message (aka COMPLETE state) and we have no header list, then
3039         break out of our loop and pretend we've found an
3040         end-boundary. After parsing the content of each MIME part, check
3041         that the boundary we found is our own and not a parent's (if it
3042         belongs to a parent, break out).
3043         (parser_construct_part): Loop parser_step() until we're at any
3044         state past the header block (>= HEADERS_END).
3045         (parser_construct_message): Same idea. Also, do error checking for
3046         decoded content_length value.
3047
3048 2008-02-02  Jeffrey Stedfast  <fejj@novell.com>
3049
3050         * gmime/gmime-iconv-utils.c (iconv_utils_init): Don't break if the
3051         user's locale is unset (e.g. US-ASCII).
3052
3053 2008-01-31  Jeffrey Stedfast  <fejj@novell.com>
3054
3055         * gmime/gmime-parser.c: Removed the need for 'unstep' state
3056         information.
3057
3058 2008-01-27  Jeffrey Stedfast  <fejj@novell.com>
3059
3060         * gmime/gmime-stream-buffer.c (stream_write): Don't modify the
3061         passed-in arguments so that it makes debugging easier if there's
3062         ever a bug.
3063
3064 2008-01-27  Jeffrey Stedfast  <fejj@novell.com>
3065
3066         * gmime/gmime-stream-buffer.c (stream_read): Optimized the
3067         BLOCK_READ code-path.
3068         (stream_write): Optimized the BLOCK_WRITE code-path.
3069         (stream_seek): Optimized the BLOCK_READ code-path.
3070         (g_mime_stream_buffer_gets): Updated for the changes made to the
3071         way bufptr is used in the BLOCK_READ case.
3072
3073 2008-01-14  Jeffrey Stedfast  <fejj@novell.com>
3074
3075         * gmime/gmime-charset.c (g_mime_set_user_charsets): Deep copy the
3076         string array. Fixes bug #509434.
3077
3078 2008-01-03  Jeffrey Stedfast  <fejj@novell.com>
3079
3080         * README: Bumped version
3081
3082         * configure.in: Bumped version to 2.2.15
3083
3084 2008-01-02  Jeffrey Stedfast  <fejj@novell.com>
3085
3086         * gmime/gmime-message.c (message_write_to_stream): Reworked the
3087         logic to be easier to understand what is going on.
3088
3089         * gmime/gmime-multipart.c (multipart_write_to_stream): In the case
3090         where multipart->boundary is NULL /and/ we have a raw
3091         header (suggesting a parsed message), do not set a boundary as it
3092         will break the output because it will clobber the saved raw header
3093         and GMimeMessage's write_to_stream() method will have skipped
3094         writing its own headers if its toplevel part (us) have a raw
3095         header set. In this case, also skip writing the end boundary.
3096
3097 2008-01-01  Jeffrey Stedfast  <fejj@novell.com>
3098
3099         * README: Bumped version
3100
3101         * configure.in: Bumped version to 2.2.14
3102
3103         * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Fixed a
3104         Free Memory Read access (FMR) by not freeing 'name' before using
3105         it's value. Also reworked to take advantage of uname(2) or
3106         getdomainname() to get the domain name if available to avoid
3107         having to do a DNS lookup.
3108
3109 2007-01-01  Jeffrey Stedfast  <fejj@novell.com>
3110
3111         * README: Bumped version
3112
3113         * configure.in: Bumped version to 2.2.13
3114
3115 2008-01-01  Jeffrey Stedfast  <fejj@novell.com>
3116
3117         Fixes bug #506701
3118
3119         * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't
3120         reset the word-type variable as it needs to be preserved when
3121         breaking long words.
3122         (rfc2047_encode): Switch on word->encoding - if 0, rfc2047 encode
3123         as us-ascii.
3124
3125 2007-12-27  Jeffrey Stedfast  <fejj@novell.com>
3126
3127         * gmime/gmime-utils.c (decode_8bit): Now takes a default_charset
3128         argument which we use in place of the locale charet if
3129         non-NULL. We also now always include this charset in our list of
3130         charsets to check for a best-match (obviously this charset is
3131         unlikely to be an exact fit if this function is getting called, so
3132         we place it at the end of the list).
3133         (rfc2047_decode_word): If given a valid charset in the
3134         encoded-word token, always use that for charset conversion to UTF-8
3135         even if it doesn't convert fully. We don't want to fall back to
3136         the user's supplied charset list because it may contain iso-8859-1
3137         which will likely always be a 'best-match' charset.
3138
3139 2007-12-26  Jeffrey Stedfast  <fejj@novell.com>
3140
3141         * gmime/gmime-utils.c (g_mime_utils_decode_8bit): Made public.
3142
3143         * gmime/internet-address.c (decode_mailbox): Instead of doing our
3144         own thing to convert raw 8bit/multibyte text sequences into UTF-8,
3145         use the same function we use in gmime-utils.c's header decoder.
3146
3147 2007-12-25  Jeffrey Stedfast  <fejj@novell.com>
3148
3149         * gmime/charset-map.c: New source file to generate the charset
3150         map (moved out of gmime-charset.c)
3151
3152         * gmime/gmime-charset.c (main): Removed.
3153
3154 2007-12-25  Jeffrey Stedfast  <fejj@novell.com>
3155
3156         * gmime/gmime-charset.c (main): Cleaned up the logic and made it
3157         so that we can alias a block to a previous block if the blocks are
3158         identical rather than just aliasing when all values in the block
3159         are identical. Happens to make no difference in the output, but
3160         the logic is now there if that ever changes.
3161
3162 2007-12-24  Jeffrey Stedfast  <fejj@novell.com>
3163
3164         * gmime/gmime-charset-map-private.h: Regenerated.
3165
3166         * gmime/gmime-charset.c (known_iconv_charsets): Map all of the
3167         gb2312 aliases to GBK as GBK is a superset of gb2312 (apparently
3168         some clients are tagging GBK as gb2312 which is missing some
3169         glyphs contained within GBK).
3170         (main): Added iso-8859-6 to the table for Arabic support.
3171
3172 2007-12-16  Jeffrey Stedfast  <fejj@novell.com>
3173
3174         * gmime/gmime-utils.c (decode_8bit): When reallocing our output
3175         buffer, we need to update outleft as well.
3176
3177 2007-12-15  Jeffrey Stedfast  <fejj@novell.com>
3178
3179         * README: Bumped version
3180
3181         * configure.in: Bumped version to 2.2.12
3182
3183 2007-12-08  Jeffrey Stedfast  <fejj@novell.com>
3184
3185         * gmime/gmime-utils.c (rfc2047_encode_merge_rfc822_words):
3186         Completely rewritten with new logic which will hopefully group
3187         words more logically.
3188
3189 2007-12-08  Jeffrey Stedfast  <fejj@novell.com>
3190
3191         Fixes bug #498720
3192
3193         * gmime/internet-address.c (internet_address_list_writer): Renamed
3194         from the temporary internet_address_list_fold() name.
3195         (_internet_address_to_string): New internal function that writes
3196         an InternetAddress to a GString, doing proper folding and rfc2047
3197         encoding if requested.
3198         (internet_address_to_string): Use the new internal function.
3199
3200         * tests/test-mime.c: Added another addrspec test and fixed up some
3201         exception strings to be a little more helpful.
3202
3203 2007-12-05  Jeffrey Stedfast  <fejj@novell.com>
3204
3205         * configure.in: Fixed a bug where explicitly disabling largefile
3206         support would add -D_FILE_OFFSET_BITS=no to the compiler
3207         CFLAGS. Also added a blaring WARNING when -enable-largefile is
3208         passed.
3209
3210 2007-11-23  Jeffrey Stedfast  <fejj@novell.com>
3211
3212         Attempt at solving bug #498720 for address fields, altho it should
3213         probably be made to handle folding single addresses in the case
3214         where they are too long to fit within a single line.
3215
3216         * gmime/internet-address.c (internet_address_list_fold): New
3217         function.
3218
3219         * gmime/gmime-message.c (write_structured): Renamed from
3220         write_addrspec().
3221         (write_addrspec): New header writer that writes
3222         InternetAddressLists in a nicely folded manner.
3223
3224 2007-11-12  Jeffrey Stedfast  <fejj@novell.com>
3225
3226         * gmime/internet-address.c (internet_address_destroy): No need to
3227         check if ia != NULL, we know this is true already.
3228
3229 2007-11-12  Jeffrey Stedfast  <fejj@novell.com>
3230
3231         * README: Bumped version
3232
3233         * configure.in: Bumped version to 2.2.11
3234
3235         * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Fix for
3236         bug #485005.
3237
3238 2007-11-06  Jeffrey Stedfast  <fejj@novell.com>
3239
3240         * gmime/gmime-utils.c (rfc2047_decode_word): If the charset string
3241         is empty, default to decode_8bit() and don't try to iconv_open()
3242         it.
3243
3244 2007-11-06  Jeffrey Stedfast  <fejj@novell.com>
3245
3246         * gmime/gmime-utils.c (is_rfc2047_token): Don't assume the charset
3247         component of the token is >= 1 char, start checking for a '?' at
3248         string index 2.
3249
3250 2007-11-01  Jeffrey Stedfast  <fejj@novell.com>
3251
3252         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Clear any
3253         error we may have (bad passwd?) each pass so that we don't try to
3254         set an error when one is already set.
3255
3256 2007-10-27  Jeffrey Stedfast  <fejj@novell.com>
3257
3258         * gmime/gmime-message.c (g_mime_message_set_mime_part): Reset the
3259         raw headers of the current top-level MIME part so that if it is
3260         being used elsewhere, it won't carry along all the message headers
3261         from this message.
3262
3263 2007-10-24  Jeffrey Stedfast  <fejj@novell.com>
3264
3265         * gmime/gmime-part.c (g_mime_part_encoding_from_string): Handle
3266         the value "uuencode" the same as we were handling "x-uuencode".
3267
3268 2007-10-14  Jeffrey Stedfast  <fejj@gnome.org>
3269
3270         Changed the license to LGPLv2
3271
3272 2007-10-13  Jeffrey Stedfast  <fejj@gnome.org>
3273
3274         * tests/test-pgp.c (test_export): Skip past the PGP headers so as
3275         to avoid comparing the "Version: " headers which might fail if a
3276         newer gnupg is used than what created the pgp key originally.
3277
3278 2007-10-13  Jeffrey Stedfast  <fejj@gnome.org>
3279
3280         * gmime/gmime-filter-html.c: Updated for url-scanner.c symbol
3281         changes.
3282
3283         * util/url-scanner.[c,h]: Renamed symbols to get rid of the G
3284         prefix and marked all symbols for internal linkage.
3285
3286         * util/md5-utils.h: Declare symbols as internal.
3287
3288         * util/memchunk.h: Here too.
3289
3290         * util/cache.h: And here.
3291
3292         * util/list.h: Same.
3293
3294 2007-09-25  Joe Shaw  <joe@joeshaw.org>
3295
3296         * configure.in: Set an AM_CONDITIONAL for whether we are
3297         building with large file support.
3298
3299         * mono/GMime.metadata.in: Move GMime.metadata to this and
3300         change any references of off_t to @off_t_type@, which is
3301         substituted with the correct type.  This is needed because
3302         off_t is converted to an IntPtr by the gtk-sharp binding
3303         generator, which is good for 64-bit systems and 32-bit
3304         systems without large file support but breaks on 32-bit
3305         systems with large file support.
3306
3307         * mono/Makefile.am: Generate GMime.metadata from
3308         GMime.metadata.in by using sed to replace @off_t_type@
3309         with gint64 on 32-bit systems with large file support
3310         and long otherwise.
3311
3312 2007-09-03  Jeffrey Stedfast  <fejj@gnome.org>
3313
3314         * gmime/gmime-utils.c: Disabled a debug printf.
3315
3316 2007-08-15  Joe Shaw  <joe@ximian.com>
3317
3318         * mono/DataWrapper.custom: We want to dispose of the GMime
3319         stream immediately, since we don't use its managed wrapper
3320         except to immediately pass it into the GMime.StreamFilter
3321         constructor.
3322
3323 2007-07-21  Jeffrey Stedfast  <fejj@gnome.org>
3324
3325         * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Save errno
3326         before resetting the iconv descriptor so that we don't lose the
3327         error.
3328
3329 2007-07-19  Jeffrey Stedfast  <fejj@gnome.org>
3330
3331         * README: Bumped version
3332
3333         * configure.in: Bumped version to 2.2.10
3334
3335         * tests/test-mime.c: Added rfc2047_text entries for testing the
3336         new workaround support.
3337
3338         * gmime/gmime-utils.c (g_mime_utils_header_decode_text):
3339         Implemented a conditional workaround for broken rfc2047 encodings.
3340
3341 2007-07-03  Jeffrey Stedfast  <fejj@gnome.org>
3342
3343         * gmime/gmime-common.c: Removed str[n]casecmp
3344
3345 2007-05-21  Jeffrey Stedfast  <fejj@gnome.org>
3346
3347         * README: Bumped version
3348
3349         * configure.in: Bumped version to 2.2.9
3350
3351         * gmime/gmime-stream-cat.c (stream_substream): Fixed a memory leak
3352         by always returning a GMimeStreamCat, even if the source list
3353         contains only a single stream (probably better that it work this
3354         way anyway for consistency), thanks again to Charles Kerr for
3355         finding and presenting a fix for this. Fixes bug #440054.
3356
3357         * gmime/gmime-stream-file.c (stream_seek): Oops, fseek() should
3358         have been using SEEK_SET, not SEEK_END. Thanks to Charles Kerr for
3359         the report and the fix. Fixes bug #439841.
3360
3361 2007-04-25  Jeffrey Stedfast  <fejj@gnome.org>
3362
3363         * README: Bumped version
3364
3365         * configure.in: Bumped version to 2.2.8
3366
3367         * tests/test-pgp.c: Test exporting of keys.
3368
3369         * gmime/gmime-utils.c (rfc2047_decode_word): Fixed compile
3370         warnings.
3371
3372         * gmime/gmime-stream-file.c (stream_reset): Removed an unused
3373         variable.
3374
3375         * gmime/gmime-charset.c (g_mime_charset_can_encode): 
3376         s/if (mask->level = 1)/if (mask->level == 1)/
3377
3378 2007-04-23  Jeffrey Stedfast  <fejj@gnome.org>
3379
3380         * README: Bumped version
3381
3382         * configure.in: Bumped version to 2.2.7
3383
3384 2007-04-14  Jeffrey Stedfast  <fejj@gnome.org>
3385
3386         * gmime/*.c (g_mime_*_get_type): Set n_preallocs to 0.
3387
3388 2007-04-12  Jeffrey Stedfast  <fejj@gnome.org>
3389
3390         * gmime/*.c: no need for a second NULL argument to g_object_new()
3391
3392         * util/cache.c (cache_new): Change max_size and node_size to be of
3393         type size_t.
3394
3395         * gmime/gmime-multipart-encrypted.c
3396         (g_mime_multipart_encrypted_new): g_object_new() doesn't need a
3397         second NULL argument.
3398
3399         * gmime/gmime-utils.c (decode_8bit): Close the iconv descriptor
3400         and since we are using is_ascii() now, we don't need to use
3401         unsigned char *'s.
3402
3403 2007-04-12  Jeffrey Stedfast  <fejj@gnome.org>
3404
3405         * gmime/gmime-utils.c (decode_8bit): Use is_ascii().
3406         (g_mime_utils_header_decode_text): Same.
3407         (g_mime_utils_header_decode_phrase): Here too.
3408
3409         * gmime/gen-table.c: Added a is_ascii() macro for use instead of
3410         the ctype isascii() so that I don't have to worry about casting.
3411
3412 2007-04-11  Jeffrey Stedfast  <fejj@gnome.org>
3413
3414         Revision 1119 (previous commit) made the following 2 functions
3415         even less attractive than they already were, so I decided to
3416         rewrite them especially since it wasn't hard to find a far cleaner
3417         approach.
3418
3419         * gmime/gmime-utils.c (g_mime_utils_header_decode_text): Rewritten
3420         to be cleaner, faster, and more elegant.
3421         (g_mime_utils_header_decode_phrase): Same.
3422
3423 2007-04-11  Jeffrey Stedfast  <fejj@gnome.org>
3424
3425         Fixes for bug #423760 and bug #342196
3426
3427         * gmime/gmime-charset.c (g_mime_charset_can_encode): New
3428         convenience function to check whether a length of UTF-8 text can
3429         be converted into the specified charset.
3430         (g_mime_set_user_charsets): New function allowing an application
3431         to provide GMime with a list of user-preferred charsets to use for
3432         encoding and decoding headers.
3433         (g_mime_user_charsets): New function to get the list of
3434         user-preferred charsets.
3435
3436         * gmime/gmime-utils.c (decode_8bit): New function to convert
3437         arbitrary 8bit text into UTF-8 using the charset list provided by
3438         g_mime_user_charsets().
3439         (rfc2047_decode_word): Don't assume that just because the declared
3440         charset is UTF-8 that it actually is in UTF-8.
3441         (rfc2047_decode_word): If we can't open a converter for the
3442         declared charset to UTF-8 or if we can't convert from the declared
3443         charset into UTF-8, fall back to using decode_8bit().
3444         (g_mime_utils_header_decode_text): Convert 8bit word tokens into
3445         UTF-8 using decode_8bit().
3446         (g_mime_utils_header_decode_phrase): Same.
3447         (rfc2047_encode_word): Be a little more efficient about removing
3448         '\n' chars...
3449         (rfc2047_encode): When encoding a level-2 word cluster, attempt to
3450         fit the cluster within a charset provided by
3451         g_mime_user_charsets() rather than using GMime's best-fit charset
3452         table (unless, of course, it doesn't fit within any of the
3453         user-specified charsets).
3454
3455 2007-03-28  Jeffrey Stedfast  <fejj@gnome.org>
3456
3457         * gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): No need to
3458         cast out to a char *, it already is.
3459
3460         * gmime/gmime-stream-mem.c (g_mime_stream_mem_set_byte_array):
3461         Only free the previous memory buffer if we were the owner.
3462
3463 2007-03-28  Jeffrey Stedfast  <fejj@gnome.org>
3464
3465         * README: Bumped version
3466
3467         * configure.in: Bumped version to 2.2.6 - critical release for the
3468         gmime-stream-fs and gmime-stream-file fixes below.
3469
3470         * gmime/gmime-stream-filter.c (stream_reset): Try resetting source
3471         stream first, this way if that fails we don't reset our state
3472         either.
3473
3474         * gmime/gmime-stream-fs.c (stream_reset): Same as below.
3475
3476         * gmime/gmime-stream-file.c (stream_reset): Make sure to always
3477         return 0 or -1, not the value from fseek()ing back to the
3478         beginning of the stream (which might not be position 0).
3479
3480 2007-03-27  Jeffrey Stedfast  <fejj@gnome.org>
3481
3482         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): If we aren't
3483         in a UTF-8 locale, convert status messages into UTF-8 when using
3484         the status line in the GError.
3485
3486 2007-03-26  Jeffrey Stedfast  <fejj@gnome.org>
3487
3488         * gmime/gmime-utils.c (g_mime_utils_8bit_header_decode)
3489         (g_mime_utils_8bit_header_encode)
3490         (g_mime_utils_8bit_header_encode_phrase): Changed all of these
3491         functions to take `const unsigned char *' like they used to. Fixes
3492         bug #423147.
3493
3494         * gmime/gmime-gpg-context.c (gpg_ctx_new): Initialize flushed and
3495         nodata state variables. Thanks to valgrind for finding these...
3496
3497         * gmime/gmime-content-type.c
3498         (g_mime_content_type_new_from_string): Shouldn't need to
3499         g_strstrip() the type, is_ttoken() won't match against lwsp
3500         chars. Also, instead of simply scanning past lwsp between some
3501         tokens, use decode_lwsp() between *all* tokens so that we handle
3502         comments as well (not that there should be any...).
3503
3504         * gmime-2.0.pc.in: Got rid of the redundant @LIBS@ which contained
3505         the same value as @GMIME_LIBS@.
3506
3507         * configure.in: Added configure checks for large file support.
3508
3509 2007-03-26  Jeffrey Stedfast  <fejj@gnome.org>
3510
3511         * gmime-param.c: #include "gmime-parse-utils.h" and got rid of
3512         this file's own decode_lwsp() implementation.
3513
3514         * internet-address.c: #include "gmime-parse-utils.h" which is
3515         where a bunch of the parser functions have been moved from here.
3516
3517         * gmime-utils.c: #include "gmime-parse-utils.h" for decode_lwsp()
3518         and decode_domain()
3519         (decode_addrspec): Moved here from internet-address.c which had
3520         been exporting the symbol previously (so that decode_domain didn't
3521         have to be copy/pasted). Now this function can be made static -
3522         yay! No more exporting un-namespaced symbols!
3523
3524         * gmime/gmime-message.c: #include "gmime-parse-utils.h" for
3525         decode_lwsp()
3526
3527         * gmime/gmime-parse-utils.[c,h]: New source files containing some
3528         parse utility functions that had been copy/pasted between several
3529         source files previously.
3530
3531 2007-03-25  Jeffrey Stedfast  <fejj@gnome.org>
3532
3533         * README: Bumped version
3534
3535         * configure.in: Bumped version to 2.2.5
3536
3537 2007-03-25  Jeffrey Stedfast  <fejj@gnome.org>
3538
3539         * tests/Makefile.am (local-check): Simplified.
3540
3541         * tests/test-streams.c: Generate our own test data if we aren't
3542         given any.
3543
3544         * tests/test-cat.c: Updated for the new Makefile.am rule.
3545
3546         * gmime/gmime-stream-mmap.c (stream_length): Fixed to return the
3547         correct length when bound_end == -1 but bound_start != 0.
3548         Discovered this thanks to my new testsuite.
3549
3550         * gmime/internet-address.c (decode_mailbox): If we can't find a
3551         local-part and inptr is ',', set *in = inptr; rather than *in =
3552         inptr + 1; Discovered this bug thanks to my new testsuite.
3553
3554         * tests/test-mime.c: Rewritten to use testsuite library.
3555
3556 2007-03-24  Jeffrey Stedfast  <fejj@gnome.org>
3557
3558         * tests/Makefile.am (check-local): Rewritten to actually run the
3559         automated tests.
3560
3561         * tests/test-mbox.c: Rewritten to use testsuite library.
3562
3563         * tests/test-pgp.c: Rewritten to use testsuite library.
3564
3565         * tests/test-pgpmime.c: Rewritten to use testsuite library.
3566
3567         * tests/test-cat.c: Rewritten to use testsuite library.
3568
3569         * tests/test-streams.c: Rewritten to use testsuite library.
3570
3571         * tests/test-iconv.c: Rewritten to use testsuite library.
3572
3573         * tests/testsuite.[c,h]: New automated test-suite helper library.
3574
3575 2007-03-20  Jeffrey Stedfast  <fejj@gnome.org>
3576
3577         * configure.in: Check for the existance of _timezone and nfds_t.
3578
3579         * gmime/gmime-utils.c (mktime_utc): Use _timezone if
3580         HAVE__TIMEZONE is set.
3581
3582         * gmime/gmime.c (g_mime_init): If HAVE_TIMEZONE or HAVE__TIMEZONE
3583         is set, call tzset() to initialise the timezone variable.
3584
3585 2007-03-12  Jeffrey Stedfast  <fejj@gnome.org>
3586
3587         * gmime/gmime-param.c (decode_param): Instead of only checking
3588         that the param value begins with "=?", check if that sequence
3589         exists anywhere in the value. Fixes bug #407522.
3590
3591         * src/uudecode.c (uudecode): Use a strcmp instead of comparing
3592         against a string literal (which was technically correct in this
3593         case, but the prettyification would be nice if "-" was specified
3594         in argv too). Fixes bug #408613.
3595
3596 2007-03-10  Jeffrey Stedfast  <fejj@gnome.org>
3597
3598         * gmime/gmime-message.c (g_mime_message_get_all_recipients): New
3599         convenience function to get To, Cc, and Bcc recipients all in a
3600         single list.
3601
3602 2007-02-19  Jeffrey Stedfast  <fejj@gnome.org>
3603
3604         * gmime/gmime-message.h: Moved g_mime_message_get_body() into the
3605         deprecated block.
3606
3607 2007-02-11  Jeffrey Stedfast  <fejj@gnome.org>
3608
3609         * gmime/gmime-utils.c: Removed the need for the ctype isblank()
3610         function.
3611
3612         * gmime/gmime-param.c (decode_int): Need to use (unsigned char *)
3613         when passing indexes to ctype functions.
3614
3615 2007-02-10  Jeffrey Stedfast  <fejj@gnome.org>
3616
3617         * gmime/gmime-charset.c: Changed the names of the charset format
3618         macros to coincide with the new names output by iconv-charset.c.
3619         (g_mime_charset_iconv_name): Use the new macro names.
3620
3621         * iconv-detect.c: Use %u instead of %d, also changed the names of
3622         the format #defines that we print out.
3623
3624         * gmime/gmime-utils.c (g_mime_utils_quote_string): Optimise a
3625         smidgen.
3626         (g_mime_utils_unquote_string): Fixed, this wasn't working right...
3627
3628 2007-02-09  Jeffrey Stedfast  <fejj@gnome.org>
3629
3630         * gmime/gmime-stream-filter.c (stream_write): Instead of comparing
3631         the return value of the source stream write() to our input length
3632         to write, compare to -1. We can't assume the the value the source
3633         stream will return will be what we expected, all we can do is
3634         check for error.
3635
3636         * gmime/gmime-part.c: Same as below.
3637
3638         * gmime/gmime-filter-basic.c: Fixes to signedness compile warnings
3639         and updated to reflect gmime-utils.h changes.
3640
3641         * gmime/gmime-multipart.c (multipart_set_boundary): Updated to
3642         reflect gmime-utils.h changes.
3643
3644         * gmime/gmime-stream.c (g_mime_stream_writev): If any of the
3645         writes fail, return -1.
3646
3647         * gmime/gmime-utils.c: header_encode_*() and header_decode_*() now
3648         take const char * rather than const unsigned char *
3649         arguments. This has been done in an effort to fix compile warnings
3650         about signed vs unsigned char * pointers. The 'save' argument to
3651         all of the stream encoders/decoders have been changed to a
3652         guint32, again for signed vs unsigned warning fixes.
3653
3654 2007-02-08  Jeffrey Stedfast  <fejj@gnome.org>
3655
3656         * README: Bumped version
3657
3658         * configure.in: Bumped version to 2.2.4
3659
3660 2007-02-06  Jeffrey Stedfast  <fejj@gnome.org>
3661
3662         Fix for bug #394433
3663
3664         * configure.in: Detect if the system has GNU's getopt
3665         implementation available for us to use.
3666
3667         * Makefile.am: Don't build our own copy of the GNU getopt library
3668         if the system has it available.
3669
3670         * src/uuencode.c: If the system has getopt.h, use it instead of
3671         our own getopt.h.
3672
3673         * src/uudecode.c: If the system has getopt.h, use it instead of
3674         our own getopt.h.
3675
3676 2007-02-06  Jeffrey Stedfast  <fejj@gnome.org>
3677
3678         More fixes on account of my test suite...
3679
3680         * tests/test-cat.c (test_cat_substream): end = start + random
3681         amount... duh. Fixes a bug where sometimes the end bound was < the
3682         start bound.
3683
3684         * gmime/gmime-stream-cat.c (stream_substream): Calculate the
3685         length of each of the source streams correctly. D'oh.
3686         (stream_substream): Fixed the calculation for s->start.
3687         (stream_substream): Fixed the s->end calculation for when end
3688         within the source stream's bounds.
3689         (stream_substream): Keep track of how long our substream is going
3690         to be for use with setting absolute bound_end on a multi-stream
3691         substream.
3692
3693 2007-02-05  Jeffrey Stedfast  <fejj@gnome.org>
3694
3695         Fixes on account of the awesome test suite I wrote earlier... still
3696         need to fix ::substream() tho (or maybe it's just the test that's
3697         broke?).
3698
3699         * gmime/gmime-stream-cat.c: Added an id member to struct
3700         _cat_node, for use with debugging...
3701         (stream_read): Seek in the source stream, don't call
3702         Cat::stream_seek() to do it.
3703         (stream_seek): Swapped the logic of the "within bounds" check, had
3704         it backwards. When seeking past a stream, set the node->position
3705         to the length of the stream (technically, it's like we read() thru
3706         all that data, right?). Instead of resetting all streams starting
3707         at n->next, reset them all starting at current->next... since 'n'
3708         technically might be before 'current'.
3709         (g_mime_stream_cat_add_source): Assign each node an id for easier
3710         debugging...
3711
3712 2007-02-05  Jeffrey Stedfast  <fejj@gnome.org>
3713
3714         * tests/test-cat.c: The beginnings of a test suite for
3715         GMimeStreamCat.
3716
3717         * gmime/gmime-stream-cat.c (stream_read): Go to the next stream if
3718         nread <= 0, not just nread == 0.
3719
3720 2007-02-04  Jeffrey Stedfast  <fejj@gnome.org>
3721
3722         * gmime/gmime-stream-mem.c (stream_reset): No longer need to
3723         update stream->position.
3724
3725         * gmime/gmime-stream-mmap.c (stream_reset): Same g_return_if_fail
3726         change. Also don't update stream->position.
3727         (stream_seek): Added similar sanity checking/eos resetting as
3728         StreamFs code.
3729
3730         * gmime/gmime-stream-file.c (stream_read): Style changes.
3731         (stream_write): Style changes.
3732         (stream_close): Fixed compiler warning.
3733         (stream_reset): Changed g_return_if_fail to a true if-then.
3734         (stream_seek): Changed to mimic the StreamFs changes.
3735         (g_mime_stream_file_new): Similar to fs_new() change.
3736
3737         * gmime/gmime-stream-fs.c (stream_close): Loop the close()
3738         ourselves.
3739         (stream_reset): Changed g_return_if_fail to a true if-then. Also
3740         be better about resetting eos.
3741         (stream_seek): Rewritten to be more correct/robust (at least I
3742         hope). Also properly reset eos when appropriate.
3743         (g_mime_stream_fs_new): If lseek() fails, pretend start offset is
3744         0.
3745
3746         * gmime/gmime-stream.c (stream_reset): No longer needs to update
3747         stream->position.
3748         (g_mime_stream_reset): Update stream->position if everything reset
3749         smoothly. This is just a convenience change to subclass
3750         implementations.
3751
3752         * gmime/gmime-stream-cat.c (stream_read): Rewritten. Hopefully
3753         correct now? Ugh. We can hope...
3754         (stream_write): Fixed to work better.
3755         (stream_close): Rewritten.
3756         (stream_reset): Rewritten to reset the streams, don't seek.
3757         (stream_seek): Rewritten... still not correct, but should be ok
3758         assuming our bound_start is 0.
3759         (stream_length): Rewritten to not depend on a pre-calculated
3760         length value... this Does Not Work (tm) if the source streams are
3761         unbound and we've written to them.
3762         (stream_substream): Rewritten... because ::seek() is so complex
3763         for this type of stream, I've tried to eliminate a lot of the
3764         headaches by making substreams only slurp up the streams within
3765         the bounds of the start/end requested. If the entire contents
3766         within the requested bounds are contained within a single source
3767         stream, we return a substream of said source stream instead.
3768         (g_mime_stream_cat_add_source): Don't precalculate the length here
3769         anymore.
3770
3771         * gmime/gmime-stream-buffer.c (stream_read): Fixed to never allow
3772         buflen to be negative if the read() of our source stream fails.
3773         (stream_close): Handle the case where we've already been closed.
3774         (stream_eos): Simplified.
3775         (stream_reset): Stylistic changes.
3776         (stream_seek): Don't allow seeks under our bound_start.
3777
3778 2007-02-03  Jeffrey Stedfast  <fejj@gnome.org>
3779
3780         * gmime/gmime-stream-cat.c (stream_flush): Flush all streams up to
3781         and including the current stream, not just the current stream.
3782         (stream_write): break if we don't write any data to
3783         current->stream or get an error so we can try the next stream.
3784
3785         * gmime/gmime-stream-file.c (stream_close): Same as below.
3786
3787         * gmime/gmime-stream-fs.c (stream_close): Allow closing multiple
3788         times... makes this consistant with the other streams.
3789         (stream_write): If a system write fails with EFBIG or ENOSPC, set
3790         eos to TRUE.
3791
3792 2007-01-20  Jeffrey Stedfast  <fejj@gnome.org>
3793
3794         * tests/test-streams.c (test_stream_gets): printf formatter fixes.
3795
3796         * examples/imap-example.c: #include <glib/gstdio.h>, fixes bug
3797         #394434.
3798
3799 2007-01-20  Jeffrey Stedfast  <fejj@gnome.org>
3800
3801         Fixes bug #394419
3802
3803         * gmime/gmime-filter-charset.c (filter_filter): Do iconv const
3804         casting.
3805         (filter_complete): Same.
3806
3807 2006-11-02  Jeffrey Stedfast  <fejj@novell.com>
3808
3809         * gmime/gmime-utils.c (g_mime_utils_header_format_date): Changed
3810         the names of the parameters to date and tz_offset to prevent
3811         warnings from -Wshadow.
3812
3813         * gmime/gmime-filter-html.c (writeln): Fixed another possible
3814         buffer overflow condition pointed out by hpj.
3815
3816         * gmime/gmime-filter-crlf.c (filter_filter): Fixed a possible
3817         buffer overflow condition pointed out by hpj.
3818
3819         * gmime/gmime-gpg-context.c (gpg_ctx_op_step): Modified to use
3820         poll() rather than select()
3821
3822 2006-09-18  Joe Shaw  <joeshaw@novell.com>
3823
3824         * mono/Makefile.am: Use SOURCES_XML instead of XML_SOURCES to
3825         specify the sources.xml file.  XML_SOURCES breaks with newer
3826         automakes.
3827
3828 2006-08-29  Pawel Salek  <pawsa@theochem.kth.se>
3829
3830         * gmime/gmime-message-partial.c: set buf just before use - since
3831         the mem stream buffer may get reallocated in the meantime leading
3832         to segfaults.
3833
3834 2006-08-29  Jeffrey Stedfast  <fejj@novell.com>
3835
3836         * gmime/gmime-param.c (decode_quoted_string): Unescape escape
3837         sequences. Fixes bug #352771.
3838
3839         * gmime/gmime-message.c (g_mime_message_set_subject): Updated the
3840         docs.
3841         (g_mime_message_get_subject): Same.
3842
3843 2006-08-21  Peter Bloomfield  <peterbloomfield@bellsouth.net>
3844
3845         * gmime/gmime-utils.c (g_mime_utils_unquote_string): handle an
3846         arbitrary sequence of quoted and unquoted sections.
3847
3848 2006-08-02  Jeffrey Stedfast  <fejj@novell.com>
3849
3850         * README: Bumped version
3851
3852         * configure.in: Bumped version to 2.2.3
3853
3854         * gmime/gmime-message.c (process_header): Decode the values for
3855         Subject, From, Reply-To so that g_mime_message_get_subject/etc all
3856         return decoded strings like they were meant to.
3857
3858 2006-06-23  Jeffrey Stedfast  <fejj@novell.com>
3859
3860         * gmime/gmime-gpg-context.c (swrite): Use g_build_filename() and
3861         g_get_tmp_dir() rather than hard-coding the tmpfile to be in /tmp.
3862
3863 2006-06-23  Jeffrey Stedfast  <fejj@novell.com>
3864
3865         * gmime/gmime-part.c: Use g_ascii_* versions of str[n]casecmp.
3866
3867         * gmime/gmime-parser.c: Use g_ascii_* versions of str[n]casecmp.
3868
3869         * gmime/gmime-param.c: Use g_ascii_* versions of str[n]casecmp.
3870
3871         * gmime/gmime-multipart-signed.c: Use g_ascii_* versions of
3872         str[n]casecmp.
3873
3874         * gmime/gmime-multipart-encrypted.c: Use g_ascii_* versions of
3875         str[n]casecmp.
3876
3877         * gmime/gmime-multipart.c: Use g_ascii_* versions of
3878         str[n]casecmp.
3879
3880         * gmime/gmime-message-partial.c: Use g_ascii_* versions of
3881         str[n]casecmp.
3882
3883         * gmime/gmime-message-part.c: Use g_ascii_* versions of
3884         str[n]casecmp.
3885
3886         * gmime/gmime-message.c: Use g_ascii_* versions of str[n]casecmp.
3887
3888         * gmime/gmime-iconv.c (g_mime_iconv_open): Use g_ascii_* versions
3889         of str[n]casecmp.
3890
3891         * gmime/gmime-header.c (g_mime_header_new): Use
3892         g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3893         reuse code.
3894
3895         * gmime/gmime-gpg-context.c: Use g_ascii_* versions of
3896         str[n]casecmp.
3897
3898         * gmime/gmime-filter-enriched.c: Use g_ascii_* versions of
3899         str[n]casecmp.
3900
3901         * gmime/gmime-disposition.c (g_mime_disposition_add_parameter):
3902         Use g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3903         reuse code.
3904         (g_mime_disposition_new): Same.
3905         (param_equal): Removed.
3906         (param_hash): Removed.
3907
3908         * gmime/gmime-content-type.c: Use g_ascii_* versions of
3909         str[n]casecmp.
3910         (g_mime_content_type_new_from_string): Use
3911         g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
3912         reuse code.
3913         (g_mime_content_type_set_parameter): Same.
3914         (param_equal): Removed.
3915         (param_hash): Removed.
3916
3917         * gmime/gmime-charset.c: Use g_ascii_* versions of str[n]casecmp.
3918
3919 2006-06-23  Jeffrey Stedfast  <fejj@novell.com>
3920
3921         * gmime/gmime-stream-cat.c (stream_seek): Fixed to only seek if
3922         necessary and also to use ::reset() if seeking back to the
3923         beginning of the stream so that it works for non-seekable streams
3924         too. Fixes bug #345503 - again thanks to Charles for reporting
3925         this bug.
3926
3927         * gmime/gmime-object.c (subtype_bucket_foreach): Fixed to also
3928         free the bucket memory. Fixes bug #345768, thanks to Charles Kerr
3929         for pointing this out.
3930
3931 2006-06-22  Jeffrey Stedfast  <fejj@novell.com>
3932
3933         * gmime/gmime-gpg-context.c: Removed #define _POSIX_SOURCE to fix
3934         bug #172179.
3935
3936 2006-06-15  Jeffrey Stedfast  <fejj@novell.com>
3937
3938         * README: Bumped version
3939
3940         * configure.in: Bumped version to 2.2.2
3941
3942 2006-06-01  Jeffrey Stedfast  <fejj@novell.com>
3943
3944         * gmime/gmime-utils.c (parse_broken_date): Fixed to handle
3945         MM-DD-YY properly and also to fallback to DD-MM-YY if the first
3946         pair of digits isn't within range for a proper month.
3947
3948 2006-05-30  Jeffrey Stedfast  <fejj@novell.com>
3949
3950         * gmime.h.in: Removed.
3951
3952         * gmime.h: Now static, no longer auto-generated.
3953
3954         * gmime/gmime.c: Set the gmime_[major,minor,micro]_version
3955         variables.
3956         (g_mime_check_version): New function to check the required
3957         version.
3958
3959         * gmime/gmime-stream-fs.c: Implement our own no-op version of
3960         fsync() for systems that don't have fsync().
3961
3962 2006-05-24  Jeffrey Stedfast  <fejj@novell.com>
3963
3964         * examples/imap-example.c (main): Use g_mkdir() to make this
3965         example portable to Win32.
3966
3967 2006-05-01  Jeffrey Stedfast  <fejj@novell.com>
3968
3969         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Handle prompts
3970         from GnuPG asking for the user's PIN for their SmartCard.
3971
3972 2006-04-21  Jeffrey Stedfast  <fejj@novell.com>
3973
3974         * gmime/gmime-stream.h: #include <stdio.h> for SEEK_SET/CUR/END
3975         enum values.
3976
3977 2006-03-16  Jeffrey Stedfast  <fejj@novell.com>
3978
3979         * README: Bumped version
3980
3981         * configure.in: Bumped version to 2.2.1
3982
3983         * gmime/gmime-parser.c (parser_step): No-op if we are in an ERROR
3984         state.
3985         (parser_construct_message): Don't bail if we don't start in state
3986         INIT, this is valid.
3987         (parser_step_from): We need to bail even if parser_fill() returns
3988         > 0 if the line is incomplete (e.g. a forced refill was needed but
3989         no additional data could be read).
3990
3991 2006-03-16  Jeffrey Stedfast  <fejj@novell.com>
3992
3993         * README: Bumped version
3994
3995         * configure.in: Bumped version to 2.2.0, it's about time I made a
3996         stable release.
3997
3998 2006-03-15  Jeffrey Stedfast  <fejj@novell.com>
3999
4000         * gmime/gmime-parser.c (parser_step_from): If we fail to find a
4001         From line, set an error state. Also fixed the End-Of-Data check to
4002         prevent an infinite loop if the stream ends with \n\n.
4003         (parser_construct_message): Make sure our state starts off at
4004         INIT. Also check for the ERROR state in our parser_step() loop and
4005         return NULL if we encounter an error.
4006
4007 2006-03-03  Jeffrey Stedfast  <fejj@novell.com>
4008
4009         * util/url-scanner.c (g_url_web_end): Allow urls such as
4010         "http://www.novell.com./path" (note the '.' before the path
4011         component).
4012         (g_url_addrspec_start): If the '@' is the first character in the
4013         match, then it isn't a valid email address.
4014
4015 2006-01-12  Jeffrey Stedfast  <fejj@novell.com>
4016
4017         * configure.in: Bumped version to 2.1.19
4018
4019 2006-01-19  Joe Shaw  <joeshaw@novell.com>
4020
4021         * mono/DataWrapper.custom: We need to manually create a decoding
4022         filtering stream and wrap that in a StreamWrapper rather than the
4023         DataWrapper's GMimeStream directly, which contains undecoded data.
4024
4025         * mono/GMime.metadata: Rename some enum members, add DataWrapper's
4026         GMimeStream property and MimePart's ContentObject properties as
4027         items which return an owned ref.
4028
4029 2006-01-12  Jeffrey Stedfast  <fejj@novell.com>
4030
4031         ** made a release of 2.1.18 **
4032
4033         * gmime/gmime-stream-mem.c (g_mime_stream_mem_get_byte_array): Use
4034         g_return_val_if_fail() rather than g_return_if_fail() since we
4035         need to return NULL on error.
4036
4037 2006-01-09  Joe Shaw  <joeshaw@novell.com>
4038
4039         * mono/Message.custom: Add a References property.  Based on a
4040         patch from D Bera <dbera.web@gmail.com>
4041
4042 2006-01-05  Joe Shaw  <joeshaw@novell.com>
4043
4044         * configure.in: Require gtk-sharp 2.4.0.  Set the mono API version
4045         to <major>.<minor>.0.<interface>, which initially is set to
4046         2.1.0.0, so that version numbers are handled better with gmime
4047         upgrades (and hopefully RPM deps on most distros).  Bump version
4048         to 2.1.18.
4049
4050         * README: Updated version
4051
4052         * gmime/gmime-stream-mem.[ch]: Add a
4053         g_mime_stream_mem_get_byte_array() method for the mono bindings.
4054
4055         * mono/DataWrapper.custom:
4056         * mono/Header.custom:
4057         * mono/Object.custom: Remove WriteToStream() and replace with a
4058         new Stream property which returns a wrapped gmime memory stream.
4059
4060         * mono/GMime.metadata: A bunch of metadata fixes, mainly for
4061         64-bit compatibility.  gtk-sharp incorrectly maps off_t to size_t,
4062         which is an int; it's actually a long, so map it manually
4063         ourselves.
4064
4065         * mono/ObjectStream.cs: Remove this; it's been replaced by
4066         StreamWrapper, which is much more memory efficient.
4067
4068         * mono/Stream.custom: Seek() returns a long.  Remove the
4069         CopyToStream() and WriteToStream() methods, since streams can now
4070         just be wrapped with a StreamWrapper.  Implement the Read()
4071         method, and return a long.
4072
4073         * mono/StreamWrapper.cs: Added.  Wraps a GMime.Stream in a
4074         System.IO.Stream.
4075
4076         * mono/gmime-api.raw: Regenerated.
4077
4078 2005-11-14  Jeffrey Stedfast  <fejj@novell.com>
4079
4080         * gmime/gmime-utils.c (g_mime_references_next): Added for the C#
4081         bindings.
4082
4083 2005-10-12  Jeffrey Stedfast  <fejj@novell.com>
4084
4085         * README: Updated version
4086
4087         * configure.in: Bumped version to 2.1.17
4088
4089         * gmime/gmime-message.c (message_get_header): For added
4090         convenience, if the requested header is a Content-* header and a
4091         top-level MIME part exists, query for the requested header on the
4092         top-level MIME part and return the value.
4093
4094         * gmime/gmime-parser.c (parser_step_headers): If we weren't able
4095         to find the end of the header, save it to our tmp buff before
4096         refilling our input buffer and set midline to TRUE. No need to
4097         check inptr < inend later because we know it to be true.
4098         (parser_step_headers): Append the raw header leftovers in the
4099         parser_fill() failure case.
4100
4101 2005-09-27  Jeffrey Stedfast  <fejj@novell.com>
4102
4103         * gmime/gmime-message-partial.c
4104         (g_mime_message_partial_split_message): Reworked the splitting
4105         logic to try and split on whole-lines.
4106
4107         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
4108         Return NULL if the number of parts is incorrect.
4109
4110 2005-09-20  Jeffrey Stedfast  <fejj@novell.com>
4111
4112         * gmime/gmime-message-partial.c (header_copy): Only set the value
4113         if the value is non-NULL. Thanks to Peter Bloomfield for this fix.
4114
4115 2005-08-18  Jeffrey Stedfast  <fejj@novell.com>
4116
4117         * README: Updated version
4118
4119         * configure.in: Bumped version to 2.1.16
4120
4121 2005-08-18  Joe Shaw  <joeshaw@novell.com>
4122
4123         * mono/Makefile.am: Install gmime-api.xml into gapi-2.0
4124
4125 2005-08-17  Joe Shaw  <joeshaw@novell.com>
4126
4127         * configure.in: Require gtk-sharp 2 for the mono bindings.
4128
4129         * mono/GMime.metadata: Rename a few items that the gtk-sharp 2
4130         parser added.
4131
4132         * mono/gmime-api.raw: Regengerate this using the gtk-sharp 2
4133         parser.
4134
4135 2005-08-16  Joe Shaw  <joeshaw@novell.com>
4136
4137         * mono/Makefile.am: libexecdir isn't right; we should be using
4138         $prefix/lib instead.
4139
4140 2005-07-12  Jeffrey Stedfast  <fejj@novell.com>
4141
4142         * mono/Makefile.am: libexecdir fixes by Stanislav
4143
4144         * gmime/internet-address.c: Fixes to various functions that used
4145         incorrect g_return*_if_fail variants. Thanks to sbrabec@suse.cz
4146
4147 2005-06-23  Jeffrey Stedfast  <fejj@novell.com>
4148
4149         * gmime/gmime-utils.c (g_mime_utils_header_decode_date): Handle
4150         the case where the number of tokens returned from datetok is 0
4151         which can happen if broken software sends an empty Date: header.
4152
4153 2005-06-13  Jeffrey Stedfast  <fejj@novell.com>
4154
4155         * README: Updated
4156
4157         * configure.in: Bumped version to 2.1.15
4158
4159         * gmime/gmime-parser.c (parser_step_headers): Don't check
4160         inptr[-1] unless inptr > start
4161
4162 2005-06-10  Joe Shaw  <joeshaw@novell.com>
4163
4164         * mono/Stream.custom (CopyToStream): Check to see if
4165         byte_array.data is IntPtr.Zero and don't try to copy if it is.
4166
4167 2005-06-10  Joe Shaw  <joeshaw@novell.com>
4168
4169         * mono/DataWrapper.custom: Added.  Adds a WriteToStream() overload
4170         which takes a System.IO.Stream.
4171
4172         * mono/Header.custom: Ditto.
4173
4174         * mono/Makefile.am: Add DataWrapper.custom and Header.custom to
4175         customs.
4176
4177         * mono/Object.custom: Remove the GetData() method... it was rather
4178         flawed.  WriteToStream() is the right way to go about it now.  Add
4179         a WriteToStream() overload like DataWrapper and Header.
4180
4181         * mono/Stream.custom: Add an internal CopyToStream() method which
4182         instantiates a GMime.StreamMem, calls WriteToStream() on it, and
4183         then copies the data from the GByteArray into a System.IO.Stream.
4184         Also add a WriteToStream() overload like the others.
4185
4186 2005-05-25  Joe Shaw  <joeshaw@novell.com>
4187
4188         * mono/GMime.metdata: Add a few extra rules since the
4189         parser/generator changed how certain types are represented.
4190
4191         * mono/InternetAddress.custom: Remove this file, move the code to...
4192
4193         * mono/InternetAddressList.cs: ... this file, making it a
4194         first-order object.  Since it implements IDisposable and people
4195         might want to explicitly dispose it.
4196
4197         * mono/Message.custom (GetRecipients): Return an
4198         InternetAddressList rather than an ICollection, so people can
4199         dispose when finished.  Also have it always return a valid
4200         InternetAddressList, so you don't have to do a null check before a
4201         foreach.
4202
4203         * mono/Makefile.am: Remove InternetAddress.custom from customs and
4204         add InternetAddressList.cs to sources.
4205
4206 2005-05-25  Joe Shaw  <joeshaw@novell.com>
4207
4208         * gmime/internet-address.c: Add accessor functions
4209         internet_address_get_type(), internet_address_get_name(),
4210         internet_address_get_addr() and internet_address_get_members() for
4211         binding into the Mono bindings.
4212
4213         * mono/GMime.metadata: Work around an automatic rename of the
4214         gtk-sharp generator of a method named "GetType" to a property
4215         named "GType," since this method doesn't return a GType.  Rename
4216         it to "GetAddressType" which is mapped to an "AddressType"
4217         property.
4218
4219         * mono/gmime-api.raw: Regenerated.
4220
4221 2005-05-20  Jeffrey Stedfast  <fejj@novell.com>
4222
4223         * gmime/gmime-utils.c (header_fold): Eat up extraneous whitespace
4224         after forcing a fold.
4225
4226 2005-03-30  Tim Mooney <Tim.Mooney@ndsu.edu>
4227
4228         * tests/test-stream.c: include <glib.h>, so we can use G_GNUC_FUNCTION
4229         and therefore compile with non-gcc compilers.
4230
4231 2005-04-14  Jeffrey Stedfast  <fejj@novell.com>
4232
4233         * configure.in: Applied patch from
4234         mooney@dogbert.cc.ndsu.nodak.edu to not assume that mcs was GNU
4235         Mono and to instead verify that it was. Fixes bug #172175.
4236
4237 2005-03-29  Jeffrey Stedfast  <fejj@novell.com>
4238
4239         * README: Updated.
4240
4241         * configure.in: Bumped version to 2.1.14
4242
4243         * gmime/gmime-parser.c (parser_step_headers): If we didn't find
4244         EOL for a header, set state based on 'inptr' rather than
4245         'start'. Fixes a bug parsing headers that cross read boundaries
4246         (and where headers are longer than the internal read-ahead buffer
4247         size).
4248
4249 2005-03-23  Joe Shaw  <joeshaw@novell.com>
4250
4251         * configure.in: Require gtk-sharp >= 1.0.6 for important
4252         memory leak fixes
4253
4254 2005-03-15  Joe Shaw  <joeshaw@novell.com>
4255
4256         * mono/Makefile.am: Build ObjectStream.cs
4257
4258         * mono/ObjectStream.cs: Added.  Implements a .net Stream for
4259         getting the conents from a GMime.Object. 
4260
4261 2005-03-12  Joe Shaw  <joeshaw@novell.com>
4262
4263         * mono/GMime.metadata: Tag the return values of
4264         MessagePart.Message, Message.MimePart, Multipart.GetPart() and
4265         Multipart.GetSubpartFromContentId() as "owned", meaning that
4266         gtk-sharp should not ref them but take ownership of the single
4267         reference that's returned from the underlying C functions.
4268
4269         * mono/Message.custom: Don't instantiate InternetAddress
4270         objects, just deal with the C APIs directly.  This saves us a
4271         lot of allocations and fixes a bug in gtk-sharp where opaque
4272         objects would leak references.
4273
4274 2005-03-07  Jeffrey Stedfast  <fejj@novell.com>
4275
4276         * gmime/gmime-header.c (g_mime_header_prepend): New function to
4277         prepend a header to the list.
4278
4279 2005-03-07  Jeffrey Stedfast  <fejj@novell.com>
4280
4281         * README: Updated.
4282
4283         * configure.in: Bumped version to 2.1.13
4284
4285         * gmime/gmime-charset.c (g_mime_charset_step): Don't bother with
4286         MAX() for cases where we'll just end up setting level to 2.
4287
4288 2005-03-07  Joe Shaw  <joeshaw@novell.com>
4289
4290         * mono/GMime.metadata: Add the "owned" flag to the return
4291         value parameter for ConstructMessage on the GMimeParser,
4292         because this method returns a new object with a refcount
4293         of 1.  The binding needs to take ownership of the object.
4294
4295 2005-02-14  Jeffrey Stedfast  <fejj@novell.com>
4296
4297         * README: Updated
4298
4299         * configure.in: Bumped version to 2.1.12
4300
4301 2005-01-31  Jeffrey Stedfast  <fejj@novell.com>
4302
4303         * gmime/gmime-utils.c (header_fold): Don't break apart rfc2047
4304         encoded tokens.
4305
4306 2005-01-18  Jeffrey Stedfast  <fejj@novell.com>
4307
4308         * README: Updated
4309
4310         * configure.in: Bumped version to 2.1.11
4311
4312 2005-01-26  Joe Shaw  <joeshaw@novell.com>
4313
4314         * mono/GMime.metdata: The gtk-sharp generator doesn't handle
4315         "const unsigned char *" well, so override those methods in
4316         metadata.
4317
4318 2005-01-20  Jeffrey Stedfast  <fejj@novell.com>
4319
4320         * gmime/gmime-param.c (param_list_format): If folding mode is
4321         enabled, terminate the header with a \n.
4322
4323 2005-01-19  Jeffrey Stedfast  <fejj@novell.com>
4324
4325         * gmime/gmime-part.c (g_mime_part_init): Register a writer for
4326         Content-Disposition.
4327
4328         * gmime/gmime-object.c (g_mime_object_init): Register a new writer
4329         func for Content-Type headers so that we don't accidently fold in
4330         the middle of a parameter value.
4331
4332 2005-01-13  Joe Shaw  <joeshaw@novell.com>
4333
4334         * autogen.sh: Allow automake 1.9
4335
4336 2005-01-11  Jeffrey Stedfast  <fejj@novell.com>
4337
4338         * README: Updated
4339
4340         * configure.in: Bumped version to 2.1.10
4341
4342 2004-12-10  Jeffrey Stedfast  <fejj@ximian.com>
4343
4344         * gmime/internet-address.c (internet_address_to_string): rfc2047
4345         encode the group name too.
4346
4347 2004-12-08  Jeffrey Stedfast  <fejj@ximian.com>
4348
4349         * gmime/gmime-content-type.c (g_mime_content_type_is_type): Fixed
4350         to do as advertised - allow wildcard matching for type.
4351
4352 2004-12-06  Joe Shaw  <joeshaw@novell.com>
4353
4354         * mono/Makefile.am: Add InternetAddress.custom
4355
4356         * mono/InternetAddress.custom: Added.  Implements a new class
4357         which will handle the destroying of InternetAddressLists.
4358         Implement ParseString, which basically implements a managed
4359         version of internet_address_parse_string.
4360
4361         * mono/Message.custom: Use the InternetAddressList for
4362         GetRecipients ().
4363
4364 2004-12-01  Joe Shaw  <joeshaw@novell.com>
4365
4366         * configure.in: Error out if the user explicitly enables the mono
4367         bindings and we can't find mcs.
4368
4369         * gmime.spec.in: Add support for the mono bindings, placing them
4370         in a separate gmime-sharp package.  Patch from Ryan Skadberg
4371         <skadz@stigmata.org>
4372
4373 2004-11-29  Joe Shaw  <joeshaw@novell.com>
4374
4375         * mono/AssemblyInfo.cs.in: Add @srcdir@ to AssemblyKeyFile so we
4376         build when builddir != srcdir.
4377
4378         * mono/Makefile.am: Add gmime-sharp.pub to EXTRA_DIST.
4379
4380 2004-11-27  Jeffrey Stedfast  <fejj@ximian.com>
4381
4382         * gmime/gmime-gpg-context.c: #define _POSIX_SOURCE so it compiles
4383         on IRIX.
4384
4385         * gmime/gmime-multipart-signed.c (multipart_signed_remove_header):
4386         Same.
4387
4388         * gmime/gmime-multipart-encrypted.c
4389         (multipart_encrypted_remove_header): Don't return.
4390
4391 2004-11-19  Joe Shaw  <joeshaw@novell.com>
4392
4393         * mono/GMime.metadata: Don't autogenerate get GetDate method
4394
4395         * mono/Message.custom: Implement it by hand and return a DateTime.
4396
4397 2004-11-17  Joe Shaw  <joeshaw@novell.com>
4398
4399         * mono/GMime.metadata: More metadata goodness.
4400
4401         * mono/Makefile.am: Added Object.custom and Stream.custom.
4402
4403         * mono/Object.custom: Add a GetData() method which returns a byte
4404         array of the object's data.
4405
4406         * mono/Stream.custom: Add a wrapper around Seek() so that you
4407         don't need to specify whence.
4408
4409 2004-11-16  Joe Shaw  <joeshaw@novell.com>
4410
4411         * configure.in: Generate mono/gmime-sharp.pc.
4412
4413         * mono/GMime.metadata: Convert all ssize_t and off_t values to
4414         ints in C#, since they're not automatically handled by the
4415         generator right now.
4416
4417         * mono/Makefile.am: Install the gmime-sharp stuff as gmime-sharp
4418         and not gmime.
4419
4420         * mono/gmime-sharp.pc.in: Added.  pkgconfig file for the mono
4421         bindings.
4422
4423 2004-11-16  Joe Shaw  <joeshaw@novell.com>
4424
4425         * Makefile.am: iconv-detect.h should be in DISTCLEANFILES, not
4426         CLEANFILES, or else the build fails following a "make clean"
4427         unless you re-autogen.
4428
4429         * gmime/internet-address.[ch]: Added functions
4430         internet_address_list_next() and
4431         internet_address_list_get_address() since we can't poke at the
4432         structures by hand in mono.
4433
4434         * mono/GMime.metadata: Remove a bunch of commented out stuff, hide
4435         the entire InternetAddressList structure.  We'd prefer to do it
4436         with .net datatypes.
4437
4438         * mono/Message.custom: Added.  Adds a GetRecipients() method which
4439         returns an ICollection of InternetAddresses, and a
4440         GetRecipientsAsString() method which returns a stringified list
4441         for pretty printing.
4442
4443         * mono/gmime-api.raw: Regenerate this for the new
4444         InternetAddress.GetAddress() and Next() methods.
4445
4446 2004-11-15  Joe Shaw  <joeshaw@novell.com>
4447
4448         * Added a mono binding
4449
4450         * configure.in: Add optional checks for mono and gtk-sharp.
4451
4452         * Makefile.am: Build the mono subdir if enabled.
4453
4454         * gmime/Makefile.am: Add $(GLIB_LIBS) to the libgmime LIBADD line.
4455
4456         * gmime/*.h: Replace GMIME_CHECK macros with the G_TYPE_CHECK
4457         ones, because the gtk-sharp binding generator looks for them.
4458
4459         * gmime/gmime-type-utils.h: Removed.
4460
4461         * mono/AssemblyInfo.cs.in: Added.
4462
4463         * mono/sources.xml: Added. The sources file, which tells the
4464         generator how to generate the API data.
4465
4466         * mono/GMime.metadata: Added. Metadata file used to tweak the
4467         generated API.
4468
4469         * mono/Global.custom: Added.  The g_mime_init() function isn't
4470         being wrapped automatically for some reason, so add the code here.
4471
4472         * mono/gmime-api.raw: Added.  The raw generated API, so that the
4473         parser doesn't have to be run by most people.
4474
4475         * mono/gmime-sharp.pub: Added. Public key used to sign the
4476         assembly.
4477
4478 2004-10-22  Jeffrey Stedfast  <fejj@ximian.com>
4479
4480         * configure.in: Removed the --enable-ipv6 option. getaddrinfo is
4481         now the only way hostname resolution is done. Added checks to see
4482         if getaddrinfo requires -lsocket for Solaris boxen.
4483
4484         * gmime/gmime-host-utils.[c,h]: Removed
4485
4486         * gmime/gmime.h.in: Removed gmime-host-utils.h
4487
4488         * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use
4489         getaddrinfo to resolve hostnames, don't bother with the
4490         gethostbyname() variants. Makes this code simpler and allows us to
4491         get rid of gmime-host-utils.[c,h].
4492
4493 2004-10-01  Jeffrey Stedfast  <fejj@ximian.com>
4494
4495         * README: Updated
4496
4497         * configure.in: Bumped version to 2.1.9
4498
4499 2004-09-29  Jeffrey Stedfast  <fejj@ximian.com>
4500
4501         * gmime/gmime-parser.c (parser_step_headers): Save the entire raw
4502         part header as well.
4503         (parser_init): Init the rawbuf (will be used for holding the raw
4504         part header).
4505         (parser_close): Free the rawbuf.
4506         (parser_construct_leaf_part): Set the raw header on the mime part.
4507         (parser_construct_multipart): Set the raw header on the multipart.
4508         (parser_construct_message): Don't use g_mime_message_set_mime_part
4509         or we'll end up clearing the raw header that we worked so hard to
4510         preserve.
4511         (parser_scan_message_part): Same.
4512         (parser_scan_multipart_face): Change comparison to >= so that we
4513         actually get rid of the last crlf sequence like we meant to.
4514         (parser_fill): Get rid of the atleast check (it isn't really
4515         needed and can cause breakage).
4516
4517         * gmime/gmime-message.c (message_get_headers): Modified to only
4518         write part headers if the toplevel mime part contains the raw
4519         header.
4520         (message_write_to_stream): Same.
4521         (g_mime_message_set_mime_part): Clear the raw message headers
4522         since it obviously won't contain the raw message headers.
4523         (message_add_header): If any message headers change, clear the raw
4524         header from the toplebel mime part.
4525         (message_set_header): Same.
4526
4527         * gmime/gmime-header.c (g_mime_header_set_raw): New function to
4528         set the raw part header (to be used in place of our own folding if
4529         available).
4530         (g_mime_header_has_raw): New function to check if the raw header
4531         is available.
4532
4533 2004-09-28  Peter Bloomfield  <PeterBloomfield@bellsouth.net>
4534
4535         * gmime/gmime-multipart-signed.c (sign_prepare): Must treat
4536         multipart/signed and multipart/encrypetd parts as opaque
4537         (e.g. don't even attempt to change their encodings).
4538
4539 2004-09-13  Jeffrey Stedfast  <fejj@novell.com>
4540
4541         * gmime/gmime-message.c (write_addrspec): New folding callback to
4542         use on addrspec headers.
4543         (g_mime_message_init): Register write_addrspec for all address
4544         headers.
4545
4546         * gmime/gmime-utils.c (header_fold): Fixed the logic a bit for
4547         structured headers such that we don't break long tokens.
4548
4549 2004-08-22  Jeffrey Stedfast  <fejj@ximian.com>
4550
4551         * README: Updated.
4552
4553         * configure.in: Bumped the version to 2.1.8
4554
4555         * gmime/gmime.h.in: #include <gmime/gmime-session-simple.h> for
4556         ia64 build fix on Debian (required because of the way gtk-doc's
4557         scan program works).
4558
4559         * gmime/gmime-filter-enriched.c (enriched_to_html): Don't replace
4560         <nofill> with <pre>. Also, replace lone '\n's with a space as
4561         suggested by rfc1896.
4562
4563 2004-08-08  Jeffrey Stedfast  <fejj@ximian.com>
4564
4565         * gmime/gmime-multipart-encrypted.c
4566         (g_mime_multipart_encrypted_encrypt): Don't set encrypted.asc as
4567         the filename anymore.
4568
4569         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
4570         Added a hack for Balsa so it can support S/MIME. Also don't set
4571         the filename to signature.asc. Balsa maintainers don't want this
4572         *shrug*.
4573         (g_mime_multipart_signed_verify): Same. These changes really
4574         require a design change to CipherContext but that'll have to wait.
4575
4576 2004-08-04  Jeffrey Stedfast  <fejj@ximian.com>
4577
4578         * configure.in: Changed the iconv-detect logic to not error-out on
4579         fail. The code can properly handle the case where iconv-detect.h
4580         doesn't exist, so let it do that instead.
4581
4582 2004-07-30  Jeffrey Stedfast  <fejj@novell.com>
4583
4584         * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't use
4585         g_unichar_isspace() here, we only want to break 'words' on ascii
4586         lwsp.
4587
4588 2004-07-16  Jeffrey Stedfast  <fejj@ximian.com>
4589
4590         * gmime/gmime.c (g_mime_init): Make intialisation ref-counted.
4591         (g_mime_shutdown): Updated.
4592
4593 2004-07-06  Jeffrey Stedfast  <fejj@ximian.com>
4594
4595         * gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Break
4596         apart long words so that they we don't generate encoded-word
4597         tokens that are >75 chars. Fixes bug #145497.
4598
4599 2004-07-04  Jeffrey Stedfast  <fejj@novell.com>
4600
4601         * README: Updated.
4602
4603         * configure.in: Bumped the version to 2.1.7
4604
4605         * gmime/gmime-parser.c (parser_construct_leaf_part): Removed code
4606         to check that the content_type argument is NULL - it can never be
4607         NULL.
4608         (parser_scan_multipart_face): Fixed a possible buffer-overrun.
4609
4610         * gmime/gmime-object.c (process_header): Modified to call
4611         g_mime_object_set_content_type() if we got called with a
4612         Content-Type header. This way all the ::set_content_type()
4613         subclass methods get a chance to update the object's state.
4614         (process_header): Return TRUE if we've "processed" the value or
4615         FALSE otherwise.
4616         (add_header): Only add the header if process_header() didn't do
4617         anything with the header.
4618         (set_header): Same.
4619
4620         * gmime/gmime-message.c (g_mime_message_set_sender): Parse the
4621         sender string so we can properly encode it before setting it as
4622         the From header.
4623
4624 2004-06-28  Jeffrey Stedfast  <fejj@ximian.com>
4625
4626         * gmime/gmime-parser.c (parser_scan_content): Updated to handle
4627         crlf sequences.
4628         (parser_scan_mime_part_content): Same.
4629         (crlf2lf): New function to convert CRLF to LF.
4630         (parser_scan_multipart_face): Convert the pre/postface into lf
4631         format.
4632
4633 2004-06-27  Jeffrey Stedfast  <fejj@novell.com>
4634
4635         * util/url-scanner.c (g_url_web_end): Some fixes that I had to do
4636         recently for Camel as well.
4637
4638 2004-06-22  Jeffrey Stedfast  <fejj@novell.com>
4639
4640         * gmime/gmime-parser.c (parser_construct_leaf_part): Only destroy
4641         the existing content_type on the object if it is non-NULL.
4642         (parser_construct_multipart): Same.
4643
4644 2004-06-15  Jeffrey Stedfast  <fejj@ximian.com>
4645
4646         * configure.in: Added --enable-profile option and removed
4647         --enable-gprof. --enable-profile enables gprof and gcov.
4648
4649         * gmime/gmime-parser.c: #include <stdlib.h> for strtoul()
4650         (parser_construct_leaf_part): Got rid of an unused variable.
4651
4652         * gmime/gmime-param.c (rfc2184_param_new): Got rid of an unused
4653         variable.
4654         (rfc2184_decode): Got rid of an unused variable.
4655
4656         * util/gtrie.c (trie_utf8_getc): Get rid of the unused labels.
4657
4658 2004-06-09  Jeffrey Stedfast  <fejj@ximian.com>
4659
4660         * gmime/gmime-stream-filter.c (stream_write): Set flushed to
4661         FALSE.
4662         (stream_read): Set flushed to FALSE if we end up filtering more
4663         data.
4664
4665         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Record the
4666         nodata state.
4667         (gpg_verify): Check the nodata state.
4668
4669 2004-06-06  Jeffrey Stedfast  <fejj@ximian.com>
4670
4671         * README: Updated.
4672
4673         * configure.in: Bumped version to 2.1.6
4674
4675         * gmime/gmime-parser.c (parser_construct_multipart): Instead of
4676         using g_mime_object_set_content_type(), destroy the current
4677         content_type object and set our own on it directly. This prevents
4678         the raw Content-Type header value from being overridden by the
4679         re-written version from our parsed object.
4680         (parser_construct_leaf_part): Same.
4681
4682         * gmime/gmime-part.c (mime_part_write_to_stream): Don't sync the
4683         GMimeDisposition object to the header here anymore. We want to try
4684         and keep the original raw header if this is a parsed message.
4685
4686 2004-06-03  Jeffrey Stedfast  <fejj@ximian.com>
4687
4688         * gmime/gmime-part.c (sync_content_disposition): Moved. Also
4689         protect against a NULL disposition.
4690         (mime_part_write_to_stream): Sync the Content-Disposition header
4691         before writing to the stream.
4692
4693         * gmime/gmime-utils.c (header_fold): Fixed a folding bug where we
4694         could get a blank line (well, wasn't really blank - but we would
4695         get a "\n\t\n" sequence which isn't really useful nor desirable).
4696
4697         * gmime/gen-table.c: Added a new bit and corresponding macro.
4698
4699         * gmime/gmime-table-private.h: Updated.
4700
4701         * gmime/gmime-param.c (encode_param): If conversion into the best
4702         charset fails, fall back to using UTF-8. Also use the new
4703         convenience macro, is_attrchar(), to decide which characters in
4704         the param value to encode.
4705         (param_list_format): Use is_attrchar() for calculating how many
4706         characters we expect to either have to quote or encode.
4707         (decode_param_list): Rewritten.
4708
4709 2004-05-31  Jeffrey Stedfast  <fejj@ximian.com>
4710
4711         * gmime/gmime-data-wrapper.c (g_mime_data_wrapper_set_stream):
4712         Updated gtk-doc comments to note that you'll probably also want to
4713         call g_mime_data_wrapper_set_encoding().
4714
4715 2004-05-26  Jeffrey Stedfast  <fejj@ximian.com>
4716
4717         * gmime/gmime-message.c (write_subject): New function. Use
4718         unstructured folding rather than the default.
4719         (g_mime_message_init): Register the subject header writer.
4720
4721         * gmime/gmime-utils.c (g_mime_utils_structured_header_fold): New
4722         function (same as g_mime_utils_header_fold() but more
4723         appropriately named).
4724         (g_mime_utils_unstructured_header_fold): Fold unstructured headers
4725         like Subject.
4726         (header_fold): Moved all of the g_mime_utils_header_fold() logic
4727         into here with a small adjustment to differentiate structured vs
4728         unstructured header folding.
4729
4730 2004-05-25  Jeffrey Stedfast  <fejj@ximian.com>
4731
4732         * gmime/gmime-param.c (param_list_format): Modified to try and
4733         squeeze more characters per line and still keep it under 76 chars
4734         per line.
4735
4736 2004-05-24  Jeffrey Stedfast  <fejj@ximian.com>
4737
4738         * gmime/gmime-filter-gzip.c (g_mime_filter_gzip_finalize): Call
4739         inflateEnd/deflateEnd to fix a memory leak.
4740
4741         * gmime/gmime-parser.c (parser_offset): If priv->offset == -1,
4742         don't bother doing any pointer arithmetic as it will result in a
4743         value that will break certain code (eg. the boundary matching
4744         code).
4745
4746 2004-05-20  Jeffrey Stedfast  <fejj@ximian.com>
4747
4748         * gmime/gmime-gpg-context.c (gpg_ctx_new): Remember if our
4749         environment is in UTF-8 or not.
4750         (gpg_ctx_parse_status): Only convert the user name from the locale
4751         charset to UTF-8 if the env isn't UTF-8.
4752         (gpg_ctx_parse_status): Convert the password to the locale charset
4753         if the locale isn't UTF-8.
4754
4755 2004-05-15  Jeffrey Stedfast  <fejj@ximian.com>
4756
4757         * README: Updated.
4758
4759         * configure.in: Bumped version to 2.1.5
4760
4761         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
4762         Updated.
4763
4764         * gmime/gmime-cipher-context.h: Added a new GMimeSignatureValidity
4765         which replaces the now deprecated GMimeCipherValidity. Typedef
4766         GMimeCipherValidity to GMimeSignatureValidity and wrap deprecated
4767         functions with #ifndef GMIME_DISABLE_DEPRECATED.
4768
4769         * gmime/gmime-cipher-context.c (g_mime_signature_validity_new):
4770         New function.
4771         (g_mime_signature_validity_free): New.
4772         (g_mime_signature_validity_get_status): New.
4773         (g_mime_signature_validity_set_status): New.
4774         (g_mime_signature_validity_get_details): New.
4775         (g_mime_signature_validity_set_details): New.
4776         (g_mime_signature_validity_get_signers): New.
4777         (g_mime_signature_validity_add_signer): New.
4778         (g_mime_cipher_validity_new): Deprecated.
4779         (g_mime_cipher_validity_init): Deprecated.
4780         (g_mime_cipher_validity_get_valid): Deprecated.
4781         (g_mime_cipher_validity_set_valid): Deprecated.
4782         (g_mime_cipher_validity_get_description): Deprecated.
4783         (g_mime_cipher_validity_set_description): Deprecated.
4784         (g_mime_cipher_validity_clear): Deprecated.
4785         (g_mime_cipher_validity_free): Deprecated.
4786         (g_mime_signer_new): New function
4787         (g_mime_signer_free): New function.
4788
4789         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save more
4790         state.
4791         (gpg_verify): Updated to fill out the new GMimeSignatureValidity
4792         structure with more details.
4793
4794 2004-05-15  Jeffrey Stedfast  <fejj@ximian.com>
4795
4796         * gmime/gmime-host-utils.h: Wrap inclusion of netdb.h with G_OS_WIN32
4797
4798         * util/memchunk.c (memchunk_alloc): Fixed another cast warning on
4799         win32.
4800
4801         * gmime/gmime-message.c (g_mime_message_get_mime_part): New
4802         function.
4803         (g_mime_message_get_body): Fixed a bug where is_html could get set
4804         to TRUE even if the part wasn't html.
4805
4806 2004-05-13  Jeffrey Stedfast  <fejj@ximian.com>
4807
4808         * util/memchunk.c (memchunk_alloc): Add parens to fix casting
4809         warning on win32.
4810
4811         * gmime/gmime-message.c (write_received): Rewritten.
4812
4813 2004-05-10  Jeffrey Stedfast  <fejj@ximian.com>
4814
4815         * gmime/gmime-filter-gzip.c: New filter for compressing/inflating
4816         gzip streams.
4817
4818 2004-05-09  Jeffrey Stedfast  <fejj@ximian.com>
4819
4820         * gmime/gmime-message.c (write_received): Be careful to never
4821         append bytes beyond the end of the header value (eg the nul byte).
4822
4823         * gmime/gmime-utils.c (g_mime_utils_header_fold): Don't allow
4824         folded headers to end with \n\n.
4825
4826 2004-04-28  Jeffrey Stedfast  <fejj@ximian.com>
4827
4828         * gmime/gmime-multipart-encrypted.c
4829         (g_mime_multipart_encrypted_decrypt): Reset the stream before
4830         trying to parse it.
4831
4832 2004-04-25  Jeffrey Stedfast  <fejj@ximian.com>
4833
4834         * gmime/gmime-utils.c (g_mime_utils_header_fold): Rather than
4835         always using a tab character when folding, use the lwsp character
4836         that we are wrapping at instead.
4837
4838 2004-04-24  Jeffrey Stedfast  <fejj@ximian.com>
4839
4840         * gmime/gmime-parser.c (g_mime_parser_init): Initialise
4841         respect_content_length.
4842
4843 2004-04-24  Jeffrey Stedfast  <fejj@ximian.com>
4844
4845         * README: Updated
4846
4847         * configure.in: Bumped version to 2.1.4
4848
4849         * gmime/gmime-part.c (g_mime_part_get_content): Disable debug
4850         warning.
4851
4852         * gmime/gmime-iconv.c: Same.
4853
4854         * gmime/gmime-iconv-utils.c: Disable warnings.
4855
4856         * gmime/gmime-utils.c (decode_msgid): Try to always return a
4857         string buffer containing whatever we can get from the msg-id, even
4858         if it isn't a valid msg-id token.
4859
4860 2004-04-19  Jeffrey Stedfast  <fejj@ximian.com>
4861
4862         * gmime/gmime-content-type.c
4863         (g_mime_content_type_new_from_string): Chew up lwsp between the
4864         end of the subtype and the ';' token, if there is any.
4865
4866 2004-04-13  Jeffrey Stedfast  <fejj@ximian.com>
4867
4868         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save both the
4869         TRUST_UNDEFINED trust state as well as the whether or not we get a
4870         NO_PUBKEY status message.
4871
4872 2004-04-11  Jeffrey Stedfast  <fejj@ximian.com>
4873
4874         * gmime/gmime-stream-filter.c (stream_read): Check that we haven't
4875         already flushed the stream if the source stream is at EOS - fixes
4876         an infinite loop case if the user doesn't use a loop to check
4877         eos() each loop.
4878
4879 2004-04-02  Jeffrey Stedfast  <fejj@ximian.com>
4880
4881         * gmime/gmime-stream-cat.c (stream_write): This should be writing
4882         data, not reading it from the underlying streams. Oops.
4883
4884 2004-03-30  Jeffrey Stedfast  <fejj@ximian.com>
4885
4886         * gmime/gmime-charset.c (charset_best_mask): Don't use the charset
4887         if it is lang specific and the lang doesn't match the
4888         locale. Fixes bug #138218.
4889
4890         * gmime/gmime-utils.c (mktime_utc): New function to mktime() into
4891         UTC.
4892         (parse_rfc822_date): Use mktime_utc() instead of doing it
4893         ourselves.
4894         (parse_broken_date): Same.
4895
4896 2004-03-21  Jeffrey Stedfast  <fejj@ximian.com>
4897
4898         * gmime/gmime-stream-buffer.c (stream_write): Fixed a bug when
4899         writing across block boundaries.
4900
4901 2004-03-09  Jeffrey Stedfast  <fejj@ximian.com>
4902
4903         * gmime/gmime-cipher-context.c (g_mime_cipher_verify): Allow the
4904         sigstream to be NULL (it is optional afterall).
4905
4906         Thanks to Peter Bloomfield for reminding me about
4907         g_ascii_strdown() and g_ascii_strup() and for providing the
4908         original patch.
4909
4910         * gmime/gmime-charset.c (locale_parse_lang): Don't use
4911         g_ascii_strdown() and g_ascii_strup() as these functions strdup
4912         the result rather than working on the input string.
4913         (g_mime_charset_map_init): Instead of strdup()ing the charset name
4914         and then using g_ascii_strdown(), just use g_ascii_strdown() since
4915         it malloc's. Also, even if we have nl_langinfo(), we want to parse
4916         LC_ALL to get the locale lang.
4917
4918 2004-03-06  Jeffrey Stedfast  <fejj@ximian.com>
4919
4920         * README: Updated
4921
4922         * configure.in: Bumped version to 2.1.3
4923
4924 2004-02-28  Jeffrey Stedfast  <fejj@ximian.com>
4925
4926         * gmime/gmime-stream-buffer.c (stream_write): Shrink buflen down
4927         by the number of bytes flushed or we'll loop forever writing the
4928         same block over and over.
4929
4930         * gmime/gmime-strea.[c,h]: Make stream_write() take a const char
4931         *buf argument instead of char *buf.
4932
4933         * gmime/gmime-stream-*.c (stream_write): constify the buf
4934         argument.
4935
4936         * gmime/gmime-stream-null.c (stream_write): Count newlines as
4937         well.
4938
4939 2004-02-26  Jeffrey Stedfast  <fejj@ximian.com>
4940
4941         * util/*.[c,h]: Moved here from gmime/
4942
4943         * gmime/*.h: Fixed #includes
4944
4945         * gmime/cache.[c,h]: Moved to util/
4946
4947         * gmime/gtrie.[c,h]: Moved to util/
4948
4949         * gmime/list.[c,h]: Moved to util/
4950
4951         * gmime/md5-utils.[c,h]: Moved to util/
4952
4953         * gmime/memchunk.[c,h]: Moved to util/
4954
4955         * gmime/url-scanner.[c,h]: Moved to util/
4956
4957         * gmime/gmime-parser.c: Don't use gobject macro casts.
4958
4959         * gmime/gmime-filter-md5.c: Move the MD5Context into a private
4960         structure so that we don't need to install md5-utils.h
4961
4962 2004-02-18  Jeffrey Stedfast  <fejj@ximian.com>
4963
4964         * gmime/gmime-utils.c (rfc2047_encode): Return a duplicate of the
4965         input string if there are no 'words'.
4966
4967         * gmime/internet-address.c (internet_address_to_string): Make sure
4968         ia->name is not an empty string.
4969
4970 2004-02-13  Jeffrey Stedfast  <fejj@ximian.com>
4971
4972         * gmime/gmime-parser.c (parser_construct_multipart): Pop our end
4973         boundary before scanning postface text data. Prevents a hang if a
4974         multipart brokenly has 2 end boundaries.
4975
4976 2004-02-08  Jeffrey Stedfast  <fejj@ximian.com>
4977
4978         * gmime/*.c: Use g_object_ref/unref instead of the
4979         g_mime_object_ref/unref and g_mime_stream_ref/unref.
4980
4981 2004-02-08  Jeffrey Stedfast  <fejj@ximian.com>
4982
4983         * gmime/gmime-utils.c (rfc2047_encode): Changed to take a safemask
4984         arg instead of a gboolean phrase arg since we never used 'phrase'
4985         directly.
4986         (g_mime_utils_header_encode_phrase): Pass IS_PSAFE as second
4987         argument.
4988         (g_mime_utils_header_encode_text): Pass IS_ESAFE as second
4989         argument.
4990
4991 2004-02-07  Jeffrey Stedfast  <fejj@ximian.com>
4992
4993         * README: Updated.
4994
4995         * configure.in: Bumped version to 2.1.2
4996
4997         * examples/README: New README explaining the purpose of each of
4998         the example sources.
4999
5000 2004-02-06  Jeffrey Stedfast  <fejj@ximian.com>
5001
5002         * gmime/gmime-parser.c (parser_construct_message): If we've been
5003         told to respect the Content-Length header, then parse the length
5004         value and calculate the offset of the beginning of the next
5005         message.
5006         (g_mime_parser_get_respect_content_length): New function to get
5007         whether we've been told to respect the Content-Length header.
5008         (g_mime_parser_set_respect_content_length): New function to set
5009         this option.
5010         (parser_offset): Now takes a private struct pointer rather than
5011         the parser object since it didn't really need it. Also makes it
5012         usable from check_boundary().
5013         (g_mime_parser_tell): Updated.
5014         (check_boundary): Only scan for end-boundaries if we've reached
5015         the projected end-of-content offset as calculated using the
5016         Content-Length header.
5017
5018 2004-02-06  Jeffrey Stedfast  <fejj@ximian.com>
5019
5020         * configure.in: Generate examples/Makefile
5021
5022         * gmime/gmime-utils.c (g_mime_utils_generate_message_id):
5023         Simplified and updated for g_gethostbyname_r() API changes.
5024
5025         * gmime/gmime-error.h: Changed the #define of GMIME_ERROR_QUARK to
5026         just be the GQuark variable. Also added GMIME_ERROR_IS_SYSTEM() to
5027         decide if an error is a system error (aka errno) or a GMime error.
5028
5029         * gmime/gmime.c: Make gmime_error_quark an actual variable and
5030         initialise it here.
5031
5032 2004-02-05  Jeffrey Stedfast  <fejj@ximian.com>
5033
5034         * gmime/gmime-host-utils.c (g_gethostbyname_r): Replace the herr
5035         argument with a GError to make the interface a bit nicer to use.
5036         (g_gethostbyaddr_r): Same.
5037
5038         * gmime/url-scanner.c: Added single/double quotes to url_braces[]
5039         in case the user is quoting the url.
5040         (g_url_web_end): Add "-;:" to list of punctuation to strip off the
5041         end of urls. Also fixed to handle user@domain's
5042         (g_url_addrspec_start): Strip open brace characters from the
5043         beginning of the addr.
5044         (g_url_web_start): Make sure "www" wasn't part of something not a
5045         url (like "Ewww.Gross") by check that pos[-1] is either an open
5046         brace or whitespace.
5047         (g_url_addrspec_end): Don't allow toplevel domain addr-specs
5048         (if we encounter something that looks like it is a toplevel domain
5049         addr, it is more likely to be bogus than correct).
5050
5051 2004-02-04  Jeffrey Stedfast  <fejj@ximian.com>
5052
5053         * gmime/gmime-stream-buffer.c (g_mime_stream_buffer_gets): Strip
5054         off \r too if the stream is in the canonical form.
5055
5056         * gmime/gmime.c (g_mime_shutdown): Oops, call
5057         g_mime_charset_map_shutdown(), not g_mime_charset_shutdown().
5058
5059 2004-01-26  Jeffrey Stedfast  <fejj@ximian.com>
5060
5061         * gmime/gmime.c (g_mime_shutdown): New public function to shutdown
5062         GMime. Fixes a segfault in applications that dynamically
5063         load/unload GMime during execution.
5064
5065         * gmime/gmime-iconv.c (g_mime_iconv_init): Don't register an
5066         atexit handler.
5067         (g_mime_iconv_shutdown): Make public.
5068
5069         * gmime/gmime-charset.c (g_mime_charset_map_init): Don't set a
5070         g_atexit handler for the shutdown routine.
5071         (g_mime_charset_map_shutdown): Make public.
5072
5073 2004-01-25  Jeffrey Stedfast  <fejj@ximian.com>
5074
5075         * gmime/gmime-param.c: Disable debugging and conditionally disable
5076         warnings.
5077
5078         * gmime/gmime-multipart.c: Disable debugging.
5079
5080         * gmime/gmime-stream.c: Disable debugging.
5081
5082         * gmime/internet-address.c: Same.
5083
5084         * gmime/gmime-parser.c: Conditionally disable warnings.
5085
5086 2004-01-19  Jeffrey Stedfast  <fejj@ximian.com>
5087
5088         * gmime/gmime-host-utils.c (g_gethostbyaddr_r): Fixed some compile
5089         problems in the IPv6 implementation.
5090
5091 2003-12-16  Jeffrey Stedfast  <fejj@ximian.com>
5092
5093         * gmime/gmime-stream-mmap.c (g_mime_stream_mmap_new): Don't add
5094         getpagesize() to the file length.
5095         (g_mime_stream_mmap_new_with_bounds): Same.
5096
5097 2003-12-11  Jeffrey Stedfast  <fejj@ximian.com>
5098
5099         * gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Don't immediately
5100         prompt for a passwd after receiving the NEED_PASSPHRASE status
5101         message. Instead, parse the userid that gpg needs a passwd for and
5102         store it on our context. Wait for a GET_HIDDEN status message
5103         before prompting, this way if the user has their gpg configured to
5104         use gpg-agent, the user won't get 2 passwd prompts.
5105
5106 2003-12-06  Jeffrey Stedfast  <fejj@ximian.com>
5107
5108         * gmime/gmime-parser.c (parser_step_headers): If scanning for eoln
5109         results in finding inend, request a refill and try again (changed
5110         from inptr + 1 >= inend).
5111
5112 2003-12-05  Jeffrey Stedfast  <fejj@ximian.com>
5113
5114         * gmime/internet-address.c (decode_domain): Make sure domain->len
5115         > 0 before checking domain->str[domain->len - 1].
5116
5117         * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Properly set the
5118         O_NONBLOCK flag on each of the pipes (ie. we need to get the
5119         current flags first and then add the O_NONBLOCK flag rather than
5120         just setting the O_NONBLOCK flag by itself).
5121
5122 2003-12-04  Jeffrey Stedfast  <fejj@ximian.com>
5123
5124         * README: Updated.
5125
5126         * configure.in: Bumped version to 2.1.1
5127
5128 2003-12-02  Jeffrey Stedfast  <fejj@ximian.com>
5129
5130         * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Modified the code
5131         that closes the child's fds to use fcntl and also to start at fd =
5132         3 so as to get rid of the need to check for stdin/out/err.
5133
5134         * gmime/gmime-filter-from.c (filter_filter): Fixed to malloc the
5135         correct buffer length.
5136
5137 2003-10-28  Pawel Salek  <pawsa@theochem.kth.se>
5138
5139         * gmime.h.in: Use macros rather than the global variables to
5140         prevent compiler warnings.
5141
5142         * gmime-error.h: Removed the trailing comma after the last enum
5143         value to fix ANSI compile warnings.
5144
5145         * gmime-filter-basic.h: Same.
5146
5147         * gmime-filter-best.h: Here too.
5148
5149         * gmime-filter-crlf.h: And here.
5150
5151         * gmime-filter-from.h: Same.
5152
5153         * gmime-filter-yenc.h: Again here.
5154
5155         * gmime-multipart-encrypted.h: And here.
5156
5157         * gmime-multipart-signed.h: Here too.
5158
5159         * gmime-stream-buffer.h: Same.
5160
5161         * gmime-stream.h: And finally here.
5162
5163 2003-10-08  Jeffrey Stedfast  <fejj@ximian.com>
5164
5165         * configure.in: Added a check for altzone.
5166
5167         * gmime/gmime-utils.c (parse_broken_date, parse_rfc822_date):
5168         Account for altzone if the system libc defines it.
5169
5170 2003-09-26  Jeffrey Stedfast  <fejj@ximian.com>
5171
5172         * gmime/gmime-host-utils.c (g_gethostbyaddr_r): IPv6
5173         implementation rewritten to use getnameinfo() which is the proper
5174         function to use in this case.
5175
5176         * gmime/internet-address.c (internet_address_list_length): Changed
5177         to take a const argument.
5178         (internet_address_to_string): Now takes a const InternetAddress.
5179         (internet_address_list_to_string): Now takes a const
5180         InternetAddressList.
5181
5182 2003-09-12  Jeffrey Stedfast  <fejj@ximian.com>
5183
5184         * gmime/gmime-stream.c (g_mime_stream_read): If len == 0, return 0.
5185         (g_mime_stream_write): Same.
5186
5187         * gmime/gmime-parser.c (parser_push_boundary): Fix the
5188         boundarylenfinal calculation. Thanks to Bart Visscher for catching
5189         this mistake.
5190
5191 2003-08-30  Jeffrey Stedfast  <fejj@ximian.com>
5192
5193         * gmime/md5-utils.c (md5_get_digest_from_file): Open in binary
5194         mode, fixes a bug when built on Win32 systems.
5195
5196 2003-08-09  Jeffrey Stedfast  <fejj@ximian.com>
5197
5198         * README: Bumped to version 2.1.0
5199
5200         * configure.in: Bumped to version 2.1.0
5201
5202         * gmime/gmime-charset.c (g_mime_charset_name): Added back this
5203         symbol in order to avoid breaking ABI.
5204         (g_mime_charset_locale_name): Same.
5205
5206         * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Slight
5207         fix for growing the buffer used by g_gethostbyname_r().
5208
5209 2003-08-09  Jeffrey Stedfast  <fejj@ximian.com>
5210
5211         * gmime/gmime.h.in: Added new headers.
5212
5213         * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use the
5214         re-entrant g_gethostbyname_r() function rather than
5215         gethostbyname() so that we are threadsafe.
5216
5217         * gmime/gmime-host-utils.[c,h]: New source files containing
5218         gethostbyname_r() and gethostbyaddr_r() implementations.
5219
5220         * gmime/gmime-filter-windows.[c,h]: New source files implementing
5221         a windows charset detection filter.
5222
5223         * gmime/gmime-charset.c (g_mime_charset_iso_to_windows): New
5224         function to return the windows-cp125# equivalent charset for
5225         iso-8859-# charsets.
5226
5227         * gmime/gmime-parser.c (parser_push_boundary): Soptimise a bit :-)
5228         (parser_push_boundary): 
5229
5230 2003-08-06  Jeffrey Stedfast  <fejj@ximian.com>
5231
5232         * gmime/gmime-multipart.c (g_mime_multipart_foreach): Simplified.
5233
5234         * gmime/gmime-stream-cat.c (stream_read): Same here.
5235         (stream_write): And finally here.
5236
5237         * gmime/gmime-stream-file.c (stream_read): Same.
5238         (stream_write): And again...
5239
5240         * gmime/gmime-stream-fs.c (stream_read): Here too.
5241         (stream_write): And here.
5242
5243         * gmime/gmime-stream-mmap.c (stream_read): Same as the mem stream.
5244         (stream_write): Same.
5245
5246         * gmime/gmime-stream-mem.c (stream_read): Need to fix the MIN
5247         expresion so that both args are signed, otherwise 'len' will be
5248         the min if the 'bytes-left' calculation is negative.
5249         (stream_write): Same.
5250
5251 2003-07-29  Jeffrey Stedfast  <fejj@ximian.com>
5252
5253         * gmime/gmime-message.c (g_mime_message_get_recipients): Return
5254         const.
5255
5256         * gmime/gmime-message-part.c (g_mime_message_part_get_message):
5257         Ref the content message before returning it.
5258
5259 2003-07-25  Jeffrey Stedfast  <fejj@ximian.com>
5260
5261         * gmime/gmime-multipart.c (g_mime_multipart_foreach): Don't
5262         descend recursively... make the user descend into sub-multiparts
5263         him/herself. This makes more sense since the callback will be
5264         called on the multipart too...
5265         (g_mime_multipart_get_subpart_from_content_id): Make checking if
5266         the subpart is a multipart more efficient by using
5267         GMIME_IS_MULTIPART macro.
5268
5269 2003-07-15  Jeffrey Stedfast  <fejj@ximian.com>
5270
5271         * gmime/gmime-charset.c (g_mime_charset_canon_name): Updated to
5272         return canonical charset names for windows-cp125x charsets.
5273
5274 2003-06-19  Jeffrey Stedfast  <fejj@ximian.com>
5275
5276         * README: Added a section for links to language bindings starting
5277         with the Perl MIME::Fast modules.
5278
5279         * docs/reference/question_index.sgml: Updated docs about the Perl
5280         bindings.
5281
5282         * docs/tutorial/gmime-tut.sgml: Updated slightly.
5283
5284 2003-06-14  Jeffrey Stedfast  <fejj@ximian.com>
5285
5286         * gmime/gmime-parser.c (g_mime_parser_get_persist_stream): New
5287         function to get whether or not the parser will attempt to keep the
5288         content on disk when it constructs messages.
5289         (g_mime_parser_set_persist_stream): New function to set whether or
5290         not the above should be done.
5291         (parser_scan_mime_part_content): Only load content if persist and
5292         seekable are both TRUE.
5293
5294         * gmime/gmime-stream-fs.c (g_mime_stream_fs_get_owner): Same idea.
5295         (g_mime_stream_fs_set_owner): And here.
5296
5297         * gmime/gmime-stream-file.c (g_mime_stream_file_get_owner): New
5298         function, just like StreamMem.
5299         (g_mime_stream_file_set_owner): Same.
5300
5301         * gmime/gmime-stream-mem.c (g_mime_stream_mem_set_owner): New
5302         function to set whether or not the memory stream should free the
5303         backend memory buffer when finalized.
5304         (g_mime_stream_mem_get_owner): New function to get the above
5305         attribute.
5306
5307 2003-06-12  Jeffrey Stedfast  <fejj@ximian.com>
5308
5309         * gmime/gtrie.c (g_trie_free): Free the fail_states array.
5310
5311 2003-05-26  Jeffrey Stedfast  <fejj@ximian.com>
5312
5313         * gmime/gmime-common.c (g_mime_strcase_hash): Oops, fixed a bug.
5314
5315         * gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
5316         Do not strip trailing whitespace when verifying, this should allow
5317         us to verify both rfc2015 and rfc3156 signed messages (as well as
5318         this being the correct way of doing it anyway).
5319
5320 2003-05-26  Jeffrey Stedfast  <fejj@ximian.com>
5321
5322         * gmime/gmime-common.[c,h]: New source files implementing some
5323         common routines scattered throughout the gmime sources (currently
5324         a strcase_hash and strcase_equal implementation).
5325
5326         * gmime/gmime-object.c (type_registry_init): Use the new
5327         g_mime_strcase_[hash,equal] functions from gmime-common.h.
5328         (g_mime_object_register_type): Here too.
5329
5330         * gmime/gmime-filter-enriched.c
5331         (g_mime_filter_enriched_class_init): Use the new
5332         g_mime_strcase_[hash,equal] functions from gmime-common.h.
5333
5334 2003-05-22  Jeffrey Stedfast  <fejj@ximian.com>
5335
5336         * gmime/gmime-parser.c (parser_construct_multipart): Fixed to
5337         properly handle multiparts which do not end with their own
5338         end-boundary. See bug #113527 for details.
5339
5340 2003-05-22  Jeffrey Stedfast  <fejj@ximian.com>
5341
5342         * configure.in: Check for sys/param.h
5343
5344         * gmime/gmime-stream-mmap.h: Removed sys/mman.h and unistd.h from
5345         the #includes. These are needed in the ehader and will break the
5346         build on win32.
5347
5348         * gmime/gmime-utils.c: Only #include sys/param.h if the system has
5349         it. Also added unistd.h and sys/types.h as they should have been
5350         there for pid_t.
5351
5352 2003-05-21  Jeffrey Stedfast  <fejj@ximian.com>
5353
5354         * gmime/gmime-message.c (handle_multipart_mixed): Don't look at
5355         the subtype of the first_type unless we have already defined
5356         first_type. Fixes a crash.
5357
5358         * gmime/gmime-multipart.c
5359         (g_mime_multipart_get_subpart_from_content_id): Don't return a
5360         const GMimeObject, ref it to be consistant with the rest of the
5361         API.
5362
5363         * gmime/gmime-message-partial.c
5364         (g_mime_message_partial_split_message): Fixed an optimisation gone
5365         bad. Thanks to Piotr Klaban for reporting this.
5366
5367 2003-05-19  Jeffrey Stedfast  <fejj@ximian.com>
5368
5369         * tests/test-mbox.c: Fixed a memory leak.
5370
5371         * gmime/gmime-multipart-encrypted.c: Same as below.
5372
5373         * gmime/gmime-multipart-signed.c: Fixed the prototype for
5374         write_to_stream().
5375
5376 2003-05-17  Jeffrey Stedfast  <fejj@ximian.com>
5377
5378         * docs/reference/streams.sgml: Updated for correctness.
5379
5380         * docs/reference/data-wrappers.sgml: Pretty much re-written to
5381         better explain GMimeDataWrapper.
5382
5383         * gmime/gmime-session-simple.[c,h]: New simple instantiable class
5384         implementing the GMimeSession interfaces.
5385
5386 2003-04-30  Jeffrey Stedfast  <fejj@ximian.com>
5387
5388         * tests/test-mime.c: Fixed some compile warnings.
5389
5390         * src/uudecode.c: Fixed some compile warnings.
5391
5392         * src/uuencode.c: Fixed some compile warnings.
5393
5394         * gmime/gmime-parser.c (parser_scan_content): Initialise 'start'.
5395
5396         * gmime/gmime-multipart-signed.c: #include <string.h>
5397
5398         * gmime/gmime-message-part.c: #include <string.h>
5399
5400         * gmime/gmime-filter-enriched.c: #include <stdlib.h> for strtoul.
5401
5402         * gmime/gmime-charset.c (strdown): New function to lowercasify a
5403         string inline (rather than being lame and strdup'ing the bloody
5404         string like g_ascii_strdown does).
5405
5406         * gmime/gmime-iconv.c: Turn off cache debugging.
5407
5408 2003-04-21  Jeffrey Stedfast  <fejj@ximian.com>
5409
5410         * gmime/gmime-gpg-context.c (gpg_ctx_new): Initialise seen_eof1 to
5411         TRUE.
5412         (gpg_ctx_set_ostream): Set seen_eof1 to FALSE here, this way we
5413         only ever check for EOF for gpg's stdout if we care about the data
5414         received from it.
5415         (gpg_ctx_parse_status): Remove the hack that set seen_eof1 to TRUE
5416         when we received a TRUST status from gpg when verifying a
5417         signature. Same for when importing signatures.
5418         (gpg_ctx_op_step): Only FD_SET() fd's that we have not finished
5419         reading from.
5420         (gpg_ctx_op_exited): #if 0'd for now since we aren't using it
5421         anymore. Keeping it around for historical reasons and in case we
5422         find we really do need it back.
5423
5424 2003-04-15  Jeffrey Stedfast  <fejj@ximian.com>
5425
5426         * configure.in: Check for netdb.h, gethostname and gethostbyname.
5427
5428         * gmime/gmime-utils.c (g_mime_utils_generate_message_id): Guard
5429         against systems without netdb.h, gethostname() and/or
5430         gethostbyname(). Seems MingW does not have these things.
5431
5432         * gmime/gmime-gpg-context.c (gpg_ctx_get_diagnostics): Flush the
5433         diagnostics stream and append a nul-byte. This allows us to return
5434         a const char * which will allow us to avoid strdup/free later.
5435         (gpg_ctx_free): Unref the diagnostics stream.
5436         (gpg_ctx_new): Get the locale charset and setup a charset filter
5437         for the diagnostics stream (use a stream instead of a GByteArray
5438         like we did before so we can do charset conversion more easily).
5439         (gpg_ctx_op_step): Use g_mime_stream_write() to append data to the
5440         diagnostics buffer instead of g_byte_array_append() - this way we
5441         get some charset filtering action. When reporting errors, use
5442         gpg_ctx_get_diagnostics(). Also make the errors reported to the
5443         user a little nicer.
5444         (gpg_sign): Diagnostics is now const, so don't free the result.
5445         (gpg_verify): Same. But also don't exit the main loop when gpg
5446         exits - there could still be data in the pipes left to read.
5447         (gpg_encrypt): Same as gpg_sign().
5448         (gpg_decrypt): Same here.
5449         (gpg_import_keys): Here too.
5450         (gpg_export_keys): And here.
5451         (gpg_ctx_parse_status): Convert the userid hint to UTF-8.
5452
5453 2003-03-31  Jeffrey Stedfast  <fejj@ximian.com>
5454
5455         * gmime/*.c: s/g_str[n]casecmp/str[n]casecmp/g
5456
5457         * configure.in: Change the check for mmap so that we know we not
5458         only have mmap defined, but also that it "works". Also added
5459         checks for strcasecmp and strncasecmp and define them to the glib
5460         versions if appropriate (g_ascii_str[n]casecmp since
5461         g_str[n]casecmp is apparently deprecated *sigh*). Doing this
5462         because I don't want to type g_ascii_str[n]casecmp. Call me a lazy
5463         bastard, but this is rediculous.
5464
5465         * gmime/gmime-filter-enriched.[c,h]: New source files that can be
5466         used to convert text/enriched and text/rtf to text/html.
5467
5468 2003-03-31  Jeffrey Stedfast  <fejj@ximian.com>
5469
5470         * PORTING: Began writing a porting guide for developers porting
5471         their applications from GMime 2.0 to GMime 2.2.
5472
5473         * gmime/gmime-utils.c (g_mime_utils_8bit_header_encode_phrase):
5474         Re-added for binary compatability. At least for now?
5475         (g_mime_utils_8bit_header_encode): Same.
5476         (g_mime_utils_8bit_header_decode): Here too.
5477
5478 2003-03-30  Jeffrey Stedfast  <fejj@ximian.com>
5479
5480         * gmime/internet-address.c (internet_address_new_name): Use
5481         header_decode_phrase().
5482         (internet_address_new_group): Same.
5483         (internet_address_set_name): Again here.
5484         (encoded_name): Always use encode_phrase() here if rfc2047_encode
5485         is TRUE, even if the raw name contains no 8bit characters. It
5486         *should* do the Right Thing (tm) now.
5487
5488         * gmime/gmime-param.c (decode_param): Use
5489         g_mime_utils_header_decode_text().
5490
5491         * gmime/gmime-message.c (g_mime_message_set_subject): Use
5492         g_mime_utils_header_encode_text().
5493
5494         * gmime/gmime-utils.c (g_mime_utils_header_encode_phrase):
5495         Renamed. Also rewritten to do the Right Thing (ie. Group 'word's
5496         by type and so forth).
5497         (g_mime_utils_header_encode_text): Renamed from
5498         8bit_header_encode() to make it clear that this function is meant
5499         to encode 'text' fields (see rfc822 for the definition of 'text'
5500         and for which headers have text values). Does the same basic
5501         thing, but now shares a lot of code with encode_phrase().
5502         (rfc2047_encode_get_rfc822_words): Renamed from
5503         rfc2047_encode_phrase_get_words() - also now handles WORD_QSTRING
5504         and takes an arg to determine whether or not to allow for QSTRING
5505         words.
5506         (g_mime_utils_text_is_8bit): Don't go past '\0' if we encounter
5507         one before inend. Should allow our caller to cheat and pass in -1
5508         instead of strlen()ing the string if the string is nul-terminated.
5509         (g_mime_utils_header_decode_text): Renamed from
5510         8bit_header_decode(). Also made a lot less strict.
5511         (g_mime_utils_header_decode_phrase): Basically the same as
5512         decode_text() but with the same strictness of previous versions.
5513
5514 2003-03-30  Jeffrey Stedfast  <fejj@ximian.com>
5515
5516         * gmime/gmime-message.c (g_mime_message_set_subject): Encode the
5517         subject before setting it in the raw header list.
5518
5519         * gmime/gmime-header.c (g_mime_header_add): Don't try to encode
5520         the header here. This is not our responsibility.
5521         (g_mime_header_set): Same.
5522
5523 2003-03-27  Jeffrey Stedfast  <fejj@ximian.com>
5524
5525         * gmime/gmime-utils.c (rfc2047_encode_word): Add 1 to enclen so as
5526         to protect against buffer overruns.
5527         (rfc2047_encode_phrase_get_words): if c > 127 && c < 256, then set
5528         encoding to MAX (encoding, 1), not 2.
5529
5530 2003-03-11  Charles Kerr <charles@rebelbase.com>
5531
5532         * gmime/md5-utils.c (md5_get_digest_from_file): fix
5533         dangling file pointer.
5534
5535 2003-03-09  Jeffrey Stedfast  <fejj@ximian.com>
5536
5537         * gmime/url-scanner.c (g_url_addrspec_end): Make sure inptr != pos
5538         + 1, if it does, then return FALSE.
5539         
5540 2003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
5541
5542         * configure.in: Check that the compiler supports the inline
5543         optimisation keyword (or variant) and #define it to 'inline'.
5544
5545         * gmime/gtrie.c (trie_utf8_getc): Same.
5546
5547         * gmime/gmime-filter-html.c (html_utf8_getc): Use the inline macro.
5548
5549 2003-03-03  Jeffrey Stedfast  <fejj@ximian.com>
5550
5551         * gmime/gmime-filter-charset.c (filter_filter): Use outbuf -
5552         filter->outbuf to calculate how much data we've written - simpler
5553         and less likely to be wrong.
5554         (filter_complete): Same.
5555
5556         * gmime/gmime-iconv.c: Modified to use the new cache
5557         implementation in cache.c
5558
5559         * gmime/cache.[c,h]: New source files implementing an LRU cache.
5560
5561         * gmime/list.[c,h]: New source files containing a really nice/fast
5562         linked-list implementation.
5563
5564 2003-03-02  Jeffrey Stedfast  <fejj@ximian.com>
5565
5566         * gmime/gmime-iconv.c (iconv_cache_bucket_new): If the current
5567         list of cache buckets is non-NULL, set list->prev to the new
5568         bucket being prepended.
5569         (g_mime_iconv_open): Only expire unused if the cache size is
5570         greater than the max allowable size.
5571
5572 2003-02-27  Jeffrey Stedfast  <fejj@ximian.com>
5573
5574         * gmime/gmime-stream-filter.c (stream_read): Set priv->flushed to
5575         TRUE if we call g_mime_filter_complete() on our filters.
5576         (stream_eos): It's not actually the end of the stream until we've
5577         flushed the filters. This fixes some possible truncation when
5578         reading from a filtered stream.
5579
5580 2003-02-25  Jeffrey Stedfast  <fejj@ximian.com>
5581
5582         * README: Bumped version to 2.1.0
5583
5584         * configure.in: Bumped version to 2.1.0
5585
5586         * gmime/gmime-utils.c (rfc2047_decode_word): Use
5587         g_mime_locale_charset().
5588
5589         * gmime/gmime-param.c (rfc2184_decode): Use
5590         g_mime_locale_charset().
5591
5592         * gmime/gmime-iconv-utils.c (iconv_utils_init): Same as
5593         below. Also use g_mime_locale_charset() rather than
5594         g_mime_charset_locale_name().
5595
5596         * gmime/gmime-iconv.c (g_mime_iconv_open): Use
5597         g_mime_charset_iconv_name() instead of the older deprecated
5598         g_mime_charset_name() function.
5599
5600         * gmime/gmime-charset.c (g_mime_charset_map_init): Initialize the
5601         locale_lang.
5602         (g_mime_charset_iconv_name): Renamed from g_mime_charset_name()
5603         (g_mime_charset_canon_name): New function which does almost the
5604         same thing as g_mime_charset_iconv_name() except that it will
5605         always return the canonical forms of the iso-8859 charsets.
5606         (g_mime_locale_charset): Renamed from g_mime_charset_locale_name()
5607         (g_mime_locale_language): New function to return the user's locale
5608         language.
5609         (g_mime_charset_language): New function to map charsets to their
5610         language code (meant for CJKR).
5611
5612 2003-02-13  Jeffrey Stedfast  <fejj@ximian.com>
5613
5614         * README: Bumped version to 2.0.2
5615
5616         * configure.in: Bumped version to 2.0.2
5617
5618         * gmime/gmime-parser.c (parser_scan_content): Stop looping if/when
5619         we find EOS in all cases. Also handle the case where an
5620         [end-]boundary ends an an EOS rather than a new-line.
5621
5622 2003-02-14  Jeffrey Stedfast  <fejj@ximian.com>
5623
5624         * gmime/url-scanner.c (g_url_file_end): If the file:// url is
5625         preceded with some sort of brace, when scanning for the end of the
5626         url - take this into consideration.
5627         (g_url_web_end): Same.
5628
5629 2003-02-13  Jeffrey Stedfast  <fejj@ximian.com>
5630
5631         * gmime/gmime-gpg-context.c: #include <sys/time.h>
5632
5633 2003-02-12  Jeffrey Stedfast  <fejj@ximian.com>
5634
5635         * gmime/url-scanner.c: Fixed the table to treat >=127 as a CTRL
5636         character.
5637
5638         * gmime/gtrie.c (trie_utf8_getc): When we encounter an invalid
5639         UTF-8 sequence, update in to point to in+1 and return 0xffff.
5640         (g_trie_add): Handle invalid UTF-8 sequences (ie, c == 0xffff).
5641         (g_trie_search): Same.
5642
5643         * gmime/gmime-filter-html.c (html_utf8_getc): Shortcut if inptr ==
5644         inend by returning 0 and treating it as if we found the
5645         terminating nul-char.
5646
5647 2003-02-08  Jeffrey Stedfast  <fejj@ximian.com>
5648
5649         * configure.in: Bumped the version to 2.0.1
5650
5651         * docs/*: A completely new set of documentation.
5652
5653 2003-02-07  Jeffrey Stedfast  <fejj@ximian.com>
5654
5655         * gmime/gmime-multipart.c (multipart_remove_part): When the part
5656         being removed is not the first part in the list, make sure to set
5657         node->prev->next = node->next -- oops :-)
5658         (multipart_remove_part_at): Same.
5659
5660 2003-01-25  Jeffrey Stedfast  <fejj@ximian.com>
5661
5662         * configure.in: Bumped the version to 2.0.0
5663
5664         * gmime/gmime-filter-html.c (writeln): Read the stream as UTF-8
5665         rather than 8bit so that we can properly write out unicode
5666         entities.
5667
5668 2002-12-17  Jeffrey Stedfast  <fejj@ximian.com>
5669
5670         Build fixes for G_DISABLE_DEPRECATED
5671
5672         * gmime/gmime-param.c (encode_param): Replace calls to
5673         g_string_sprintfa() with g_string_append_printf() since the former
5674         is marked as being deprecated.
5675         (param_list_format): Same.
5676
5677         * gmime/gmime-utils.c (rfc2047_encode_word): Here too.
5678
5679 2002-12-16  Jeffrey Stedfast  <fejj@ximian.com>
5680
5681         * configure.in: Bumped the version to 1.90.8
5682
5683         * doc/gmime-doc.sgml: Added a section for GMimeFilterMd5.
5684
5685         * doc/gmime-sections.txt: Added a section on GMimeFilterMd5.
5686
5687         * tests/test-parser.c (print_mime_struct): Validate Content-Md5
5688         headers.
5689
5690         * gmime/gmime-part.c (g_mime_part_set_content_md5): Rewritten to
5691         use the md5 filter and also to do things the right way by
5692         converting textual parts to their canonical CRLF form.
5693         (g_mime_part_verify_content_md5): Same.
5694
5695         * gmime/gmime-filter-md5.[c,h]: New filter to compute the md5
5696         digest of a stream passed through it.
5697
5698 2002-12-11  Jeffrey Stedfast  <fejj@ximian.com>
5699
5700         * gmime/gmime-message.c (g_mime_message_get_body): Reworked the
5701         logic a bit to properly handle multipart/alternative.
5702
5703 2002-12-10  Jeffrey Stedfast  <fejj@ximian.com>
5704
5705         * configure.in: Bumped the version to 1.90.7
5706
5707 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
5708
5709         * gmime/url-scanner.c: Use our own masking table since we need it
5710         atoms to be slightly different. There's a few more chars we want
5711         to restrict. Also has the benefit of being easier to split out if
5712         someone else wants to use it.
5713         (g_url_addrspec_end): Fixed to not be fooled in the case where the
5714         address is followed immediately by a period.
5715         (g_url_web_end): Made more robust.
5716         (g_url_scanner_scan): Oops. We need to set the match->pattern
5717         string pointer to the correct pattern before executing the
5718         start/end methods (as some of them rely on this info).
5719
5720 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
5721
5722         * gmime/url-scanner.c: Don't need a hash table anymore.
5723         (g_url_scanner_add): When adding a pattern to the trie, use the
5724         array index as the pattern_id argument.
5725         (g_url_scanner_scan): Use the matched_id set by g_trie_search() to
5726         lookup the urlpattern_t instead of using a hash table.
5727
5728         * gmime/gtrie.c (g_trie_add): Now takes a pattern_id argument so
5729         that we can avoid the use of GQuarks and thus save on unecessary
5730         memory usage.
5731         (g_trie_search): Instead of giving our caller back the pattern
5732         string pointer, give him back the pattern id.
5733
5734 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
5735
5736         * gmime/gtrie.c (g_trie_matches): Removed.
5737         (g_trie_search): Fixed the FIXME.
5738
5739 2002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
5740
5741         * gmime/gmime-filter-html.c: Modified to use url-scanner.c instead
5742         of using glibc's regex routines. This has improved performance by
5743         ~16.5x not to mention that it is also more accurate than the regex
5744         patterns had been (the url scanner can be setup to be much
5745         stricter in the matching).
5746
5747         * gmime/url-scanner.c: New source file implementing a simple
5748         expression scanner meant (currently designed for url matching)
5749         which uses gtrie.
5750
5751         * gmime/gtrie.c: New source file implementing Aho-Corasick's Trie
5752         graph algorithm.
5753
5754 2002-12-08  Jeffrey Stedfast  <fejj@ximian.com>
5755
5756         Fix for bug #91536
5757
5758         * gmime/gmime-object.c (g_mime_object_register_type): Use a struct
5759         to hold the object_type for the subtype hash. 64 archs use 32bit
5760         ints and so using GINT_TO_POINTER() and GPOINTER_TO_INT() doesn't
5761         work.
5762         (g_mime_object_new_type): Get the object_type from the subtype
5763         bucket.
5764
5765 2002-12-06  Jeffrey Stedfast  <fejj@ximian.com>
5766
5767         * gmime/gmime-stream.c (g_mime_stream_writev): Pointer arithmetic
5768         fixes.
5769
5770         * gmime/memchunk.c (memchunk_alloc): Pointer arithmetic fixes.
5771
5772 2002-12-03  Jeffrey Stedfast  <fejj@ximian.com>
5773
5774         * gmime/gmime-utils.c (datetok): Modified to properly handle when
5775         the first char of a token is a special char (such as a '-') that
5776         is also used as a token delimiter.
5777
5778 2002-12-02  Jeffrey Stedfast  <fejj@ximian.com>
5779
5780         * gmime/gmime-filter-html.c (g_mime_filter_html_init): match
5781         REG_ICASE so we don't cut off at the first capital letter, duh.
5782
5783 2002-12-01  Jeffrey Stedfast  <fejj@ximian.com>
5784
5785         * gmime/gmime-utils.c: #define _GNU_SOURCE for isblank on GNU
5786         systems.
5787
5788         * gmime/gmime-gpg-context.c (gpg_ctx_op_wait): Fixed the errno
5789         saving.
5790
5791 2002-11-21  Jeffrey Stedfast  <fejj@ximian.com>
5792
5793         * gmime/gmime-message.c (write_received): After skipping the
5794         special received token and it's value, skip any following comments
5795         as well.
5796         (skip_addrspec): Skip past the '.' and '@' chars before decoding
5797         the next word or domain respectively.
5798
5799 2002-11-20  Jeffrey Stedfast  <fejj@ximian.com>
5800
5801         * gmime/gmime-message.c (write_received): New function to nicely
5802         format Received headers.
5803         (write_msgid): New writer function that doesn't fold the msg-id no
5804         matter now long it is.
5805         (g_mime_message_init): Override the writer functions for Received
5806         and Message-Id headers. Should we also override the writer
5807         function for Path headers to not wrap?
5808
5809         * gmime/internet-address.c (decode_addrspec): Get rid of an extra
5810         call to decode_lwsp that wasn't needed.
5811
5812         * gmime/gmime-header.c (g_mime_header_register_writer): Renamed.
5813
5814 2002-11-18  Jeffrey Stedfast  <fejj@ximian.com>
5815
5816         * configure.in: Make sure to include -liconv on systems that need it.
5817
5818 2002-11-17  Jeffrey Stedfast  <fejj@ximian.com>
5819
5820         * configure.in: Check for gethostbyname in -lnsl and also bump the
5821         version to 1.90.6.
5822
5823         * src/getopt*.[c,h]: Added for portability to non-GNU systems.
5824
5825         * gmime/gmime-parser.c (g_mime_parser_init): Initialize scan_from
5826         and have_regex here instead of in parser_init() since we don't
5827         want these flags to be reset when a new stream gets set.
5828         (g_mime_parser_new_with_stream): New convenience function.
5829
5830 2002-11-16  Jeffrey Stedfast  <fejj@ximian.com>
5831
5832         * gmime/gmime-utils.c (decode_msgid): Eat the '<' before
5833         continuing to parse the addr-spec.
5834
5835 2002-11-14  Jeffrey Stedfast  <fejj@ximian.com>
5836
5837         * gmime/gmime-content-type.c
5838         (g_mime_content_type_new_from_string): #include
5839         "gmime-table-private.h" and use is_ttoken() to correctly parse
5840         type/subtype. Fixes bug #98463.
5841
5842 2002-11-13  Jeffrey Stedfast  <fejj@ximian.com>
5843
5844         * gmime/gmime-gpg-context.c (gpg_ctx_op_start): Don't bother
5845         stat()ing gpg->path, if the file doesn't exist, the exec() call
5846         will return immediately anyway.
5847
5848 2002-11-13  Jeffrey Stedfast  <fejj@ximian.com>
5849
5850         * configure.in: Bumped the version to 1.90.5.
5851
5852         * gmime/Makefile.am: Remove gmime-exception-list.def from the
5853         EXTRAS.
5854
5855 2002-11-12  Jeffrey Stedfast  <fejj@ximian.com>
5856
5857         * doc/*: Updated.
5858
5859         * gmime/gmime-error.h: Added.
5860
5861         * gmime/gmime-multipart-encrypted.[c,h]: Use GError instead of
5862         GMimeException.
5863
5864         * gmime/gmime-multipart-signed.[c,h]: Same.
5865
5866         * gmime/gmime-session.[c,h]: Here too.
5867
5868         * gmime/gmime-gpg-context.[c,h]: Don't use GMimeException anymore,
5869         instead use GError.
5870
5871         * gmime/gmime-cipher-context.[c,h]: Same here.
5872
5873         * gmime/gmime.h.in: Remove gmime-exception.h and add gmime-error.h
5874
5875 2002-11-09  Jeffrey Stedfast  <fejj@ximian.com>
5876
5877         * configure.in: Generate src/Makefile.
5878
5879         * Makefile.am: Add src to the SUBDIRS.
5880
5881         * src/Makefile.am: Build uuencode and uudecode.
5882
5883         * src/uuencode.c: New source file emulating GNU shareutils'
5884         uuencode.
5885
5886         * src/uudecode.c: New source file emulating GNU shareutils'
5887         uudecode.
5888
5889 2002-11-07  Jeffrey Stedfast  <fejj@ximian.com>
5890
5891         * configure.in: Bumped the version to 1.90.4
5892
5893         * PORTING: New document meant to help developers port their
5894         applications from gmime-1.0 to gmime-2.0.
5895
5896         * iconv-detect.c: Removed unused variables and #include <stdlib.h>
5897
5898         * gmime/gmime-multipart.c
5899         (g_mime_multipart_get_subpart_from_content_id): Init part to NULL.
5900
5901         * gmime/gmime-stream-cat.c (stream_write): Init n to -1 each time
5902         through the outer loop.
5903
5904         * gmime/gmime-filter-strip.c: #include <string.h> for memcpy.
5905
5906         * gmime/gmime-filter-html.c (html_convert): Make sure to
5907         initialise depth to 0 each loop so we don't use it uninitialised.
5908
5909 2002-11-07  Jeffrey Stedfast  <fejj@ximian.com>
5910
5911         * gmime*.[c,h]: Moved to gmime/ subdirectory. Also updated to
5912         #include <gmime/some-header.h> instead of #include "some-header.h"
5913
5914         * test-*.c: Moved to tests/ subdirectory.
5915
5916 2002-11-06  Jeffrey Stedfast  <fejj@ximian.com>
5917
5918         * Makefile.am: Install headers to $(includedir)/gmime-2.0/gmime
5919
5920 2002-11-04  Jeffrey Stedfast  <fejj@ximian.com>
5921
5922         * gmime-filter-basic.c (g_mime_filter_basic_new_type): Set the
5923         new->type to type.
5924
5925 2002-11-01  Jeffrey Stedfast  <fejj@ximian.com>
5926
5927         * gmime.h.in: Wrap in #ifdef __cplusplus
5928
5929         * gmime-filter-html.c (html_convert): If flush is TRUE, flush any
5930         remaining input rather than backing it up.
5931
5932 2002-10-31  Jeffrey Stedfast  <fejj@ximian.com>
5933
5934         * gmime-gpg-context.c: Renamed stdin to stdin_fd, stdout to
5935         stdout_fd, and stderr to stderr_fd to be more portable.
5936
5937 2002-10-30  Jeffrey Stedfast  <fejj@ximian.com>
5938
5939         * gmime-filter-html.c (html_convert): Rewrote to use regex for
5940         url/addr extraction. Outputs more correct html now too.
5941
5942 2002-10-18  Jeffrey Stedfast  <fejj@ximian.com>
5943
5944         * gmime-stream-filter.c (stream_read): Change presize from an int
5945         to a size_t to fix a 64bit cleanliness bug.
5946         (stream_write): Same.
5947
5948 2002-10-14  Jeffrey Stedfast  <fejj@ximian.com>
5949
5950         * gmime-gpg-context.c (gpg_ctx_get_argv): Setup the import/export
5951         command-line.
5952         (gpg_ctx_op_step): Handle import/export errors.
5953         (gpg_import_keys): Implemented.
5954         (gpg_export_keys): Implemented.
5955         (gpg_ctx_op_step): Don't do anything with gpg's stdin unless we
5956         have something to write to it (exporting keys doesn't require
5957         writing to gpg's stdin).
5958
5959 2002-10-13  Jeffrey Stedfast  <fejj@ximian.com>
5960
5961         * doc/*: Updated.
5962
5963         * gmime-utils.c (g_mime_utils_generate_message_id): New function
5964         to generate a valid unique message-id string.
5965
5966 2002-10-08  Jeffrey Stedfast  <fejj@ximian.com>
5967
5968         Fixes to make g_mime_message_partial_split_message() use the
5969         correct token as the id parameter.
5970
5971         * gmime-object.c (g_mime_object_set_content_id): Same as with
5972         GMimeMessage::message_id.
5973         (process_header): Same as process_header for gmime-message.c but
5974         for content_id.
5975
5976         * gmime-message.c (process_header): Set only the addr-spec portion
5977         of the msgid.
5978         (g_mime_message_set_message_id): Treat the message_id passed in as
5979         the addr-spec msgid (ie, as if it didn't contain <>'s).
5980
5981 2002-10-02  Jeffrey Stedfast  <fejj@ximian.com>
5982
5983         * gmime-gpg-context.c (gpg_import_keys): Renamed.
5984         (gpg_export_keys): Renamed.
5985
5986         * gmime-cipher-context.c (g_mime_cipher_export_keys): Renamed to
5987         be friendlier toward c++.
5988         (g_mime_cipher_import_keys): Renamed to be similarly named with
5989         the above function.
5990
5991 2002-09-30  Jeffrey Stedfast  <fejj@ximian.com>
5992
5993         * configure.in: Bumped version.
5994
5995         * Makefile.am: Don't install gmime.m4
5996
5997         * gmime.m4: Removed.
5998
5999 2002-09-30  Jeffrey Stedfast  <fejj@ximian.com>
6000
6001         * gmime-filter-charset.c (filter_filter): Rewritten, don't set
6002         errno to 0 before calling iconv (we can't assume that on success
6003         errno will not be set?). Also, don't grow the buffer here, save
6004         any un-converted text in the backup buffer to be converted next
6005         time through.
6006         (filter_complete): Pick up the slack of filter_filter by
6007         converting anything left over.
6008
6009 2002-09-29  Jeffrey Stedfast  <fejj@ximian.com>
6010
6011         * gmime-filter[c,h]: Ported to GObject.
6012
6013         * gmime-filter-basic.[c,h]:
6014         * gmime-filter-best.[c,h]:
6015         * gmime-filter-charset.[c,h]:
6016         * gmime-filter-crlf.[c,h]:
6017         * gmime-filter-from.[c,h]:
6018         * gmime-filter-html.[c,h]:
6019         * gmime-filter-strip.[c,h]:
6020         * gmime-filter-yenc.[c,h]: Ported to the new GMimeFilter.
6021
6022         * gmime-data-wrapper.c (write_to_stream): Unref the filter after
6023         adding it to the filtered stream.
6024
6025         * gmime-multipart-encrypted.c
6026         (g_mime_multipart_encrypted_encrypt): Unref the filters once we've
6027         added them to the filtered_stream.
6028         (g_mime_multipart_encrypted_decrypt): And here.
6029
6030         * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
6031         the filters once we've added them to the filtered_stream.
6032         (g_mime_multipart_signed_verify): Same here.
6033
6034         * gmime-part.c (write_content): Unref the filter.
6035         (g_mime_part_set_pre_encoded_content): Here too.
6036
6037         * gmime-stream-filter.c (g_mime_stream_filter_add): Ref the filter
6038         here.
6039         (g_mime_stream_filter_remove): Unref the filter.
6040         (g_mime_stream_filter_finalize): Unref the filters here.
6041
6042 2002-09-23  Jeffrey Stedfast  <fejj@ximian.com>
6043
6044         * gmime-filter-charset.c: Try our best to handle EILSEQ (illegal
6045         multibyte sequences) by eating the illegal bytes and
6046         continuing. This seems to be what users expect (it's what Mozilla
6047         seems to do).
6048
6049 2002-09-15  Jeffrey Stedfast  <fejj@ximian.com>
6050
6051         * gmime-charset.c (g_mime_charset_name): Don't g_assert after
6052         using strtoul on the iso charset name, seems that some news
6053         clients use 'isolatin' as if it were a real charset (it's not) and
6054         we don't want to abort() on this.
6055
6056 2002-09-14  Jeffrey Stedfast  <fejj@ximian.com>
6057
6058         * doc/*: Updated.
6059
6060         * gmime-utils.c (g_mime_utils_decode_message_id): New function to
6061         decode a message-id as defined by rfc822.
6062         (g_mime_references_decode): New function to decode a references or
6063         in-reply-to header.
6064         (g_mime_references_append): New function to append a raw
6065         message-id to a GMimeReferences list.
6066         (g_mime_references_clear): New function to clear a GMimeReferences
6067         list.
6068
6069         * internet-address.c (decode_addrspec): New function to parse an
6070         addr-spec needed by the msg-id decoder.
6071         (decode_lwsp): Make public.
6072         (decode_word): Same.
6073
6074 2002-09-08  Jeffrey Stedfast  <fejj@ximian.com>
6075
6076         * gmime-utils.c (parse_broken_date): Wrap printfs in d() to
6077         prevent them from printing anything unless debugging is turned on.
6078
6079 2002-09-03  Jeffrey Stedfast  <fejj@ximian.com>
6080
6081         * gmime-utils.c (get_tzone): Fixed to not get false positives when
6082         the token is shorter than the actual timezone string (but matches
6083         the first little bit of it).
6084
6085 2002-09-03  Tomasz K³oczko  <kloczek@pld.org.pl>
6086
6087         * Makefile.am: fixes for automake >= 1.5 (removed duplicated
6088         variables) and few minor cleanups and better method for install gmime
6089         aclocal macros.
6090
6091         * doc/Makefile.am: fixes for "make install DESTDIR=</install/prefix>".
6092
6093 2002-09-01  Jeffrey Stedfast  <fejj@ximian.com>
6094
6095         * internet-address.c (decode_mailbox): When erroring out due to no
6096         local part in the add-spec, set *in to inptr + 1 so we don't get
6097         into an infinite loop.
6098
6099         * gmime-message-part.c (message_part_remove_header): Same as
6100         below.
6101
6102         * gmime-multipart.c (multipart_remove_header): Same as
6103         gmime-part.c
6104
6105         * gmime-part.c (mime_part_remove_header): Don't return anything
6106         here since our function is supposed to return void.
6107
6108 2002-08-31  Jeffrey Stedfast  <fejj@ximian.com>
6109
6110         * gmime-parser.c (parser_scan_mime_part_content): Pass `content'
6111         into parser_scan_content(), fixes bug #92183.
6112
6113 2002-08-30  Jeffrey Stedfast  <fejj@ximian.com>
6114
6115         * configure.in: Bumped version to 1.90.1
6116
6117         * doc/Makefile.am: Don't gtkdoc-fixxref if the user disabled
6118         gtk-doc from the build.
6119
6120 2002-08-25  Jeffrey Stedfast  <fejj@ximian.com>
6121
6122         * test-best.c: New test suite for the gmime-filter-best filter.
6123
6124         * gmime.h.in: Added gmime-filter-best.h
6125
6126         * gmime-filter-best.c (g_mime_filter_best_charset): Never return
6127         NULL, instead return us-ascii.
6128         (filter_filter): Fixed to not get into an infinite loop.
6129
6130 2002-08-23  Jeffrey Stedfast  <fejj@ximian.com>
6131
6132         * doc/*: Updated.
6133
6134         * gmime-message-part.c (message_part_write_to_stream): Changed the
6135         prototype to return ssize_t and not int.
6136
6137 2002-08-21  Jeffrey Stedfast  <fejj@ximian.com>
6138
6139         * gmime-filter-best.c: New filter for calculating the best charset
6140         and encoding for a stream.
6141
6142         * gmime-iconv-utils.c (g_mime_iconv_locale_to_utf8): Make
6143         threadsafe.
6144         (g_mime_iconv_locale_to_utf8_length): Same.
6145         (g_mime_iconv_utf8_to_locale): Here too.
6146         (g_mime_iconv_utf8_to_locale_length): And here.
6147
6148         * gmime.c (g_mime_init): Updated to call
6149         g_mime_charset_map_init().
6150
6151         * gmime-charset.c (g_mime_charset_locale_name): Initialize the
6152         charset map if it hasn't already been initialized.
6153         (g_mime_charset_map_init): Renamed from g_mime_charset_init().
6154         (g_mime_charset_init): Renamed from charset_init() and also made
6155         it globally accessable.
6156         (g_mime_charset_step): New external function (was an internal
6157         function before).
6158         (g_mime_charset_best_name): Now an external function also.
6159
6160 2002-08-19  Jeffrey Stedfast  <fejj@ximian.com>
6161
6162         * gmime-gpg-context.c (gpg_decrypt): Report better errors for when
6163         gpg fails to be executed.
6164         (gpg_encrypt): Same.
6165         (gpg_verify): Here too.
6166         (gpg_sign): And here.
6167         (gpg_ctx_op_start): Try stat()ing the gpg binary to make sure it
6168         exists and when handling an exception, save errno so we can re-set
6169         it after cleanup.
6170
6171 2002-08-11  Jeffrey Stedfast  <fejj@ximian.com>
6172
6173         * gmime-iconv.c: Instead of checking for #ifdef _REENTRANT, just
6174         check #ifdef G_THREADS_ENABLED and use a GStaticMutex rather than
6175         a pthread_mutex_t.
6176
6177         * gmime-charset.c (g_mime_charset_init): Use nl_langinfo() if it
6178         is available.
6179         (g_mime_charset_name): Call g_mime_charset_init() if
6180         iconv_charsets is NULL (meaning the programmer did not properly
6181         initialize gmime). Also do mutex locking around the use of the
6182         iconv_charset hash table.
6183
6184 2002-08-10  Jeffrey Stedfast  <fejj@ximian.com>
6185
6186         * test-pgpmime.c (test_multipart_signed): Unref the content object
6187         after setting it on the MIME part.
6188
6189         * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
6190         the content object after setting it on the MIME part.
6191         (g_mime_multipart_signed_verify): Unref the content object after
6192         we're done with it.
6193
6194         * gmime-multipart-encrypted.c
6195         (g_mime_multipart_encrypted_encrypt): Unref the content object
6196         after setting it on the MIME part.
6197         (g_mime_multipart_encrypted_decrypt): Unref the content object
6198         after we're done with it.
6199
6200         * gmime-message-partial.c
6201         (g_mime_message_partial_reconstruct_message): Unref the content
6202         object when we're done with it.
6203         (g_mime_message_partial_split_message): Unref the content object
6204         after setting it on the MIME part.
6205
6206         * gmime-parser.c (parser_scan_mime_part_content): Unref the
6207         content object after setting it on the MIME part.
6208
6209         * gmime-part.c (g_mime_part_set_content_object): Ref the new
6210         content object and unref the old.
6211         (g_mime_part_get_content_object): Ref the content object before
6212         returning it to our caller.
6213         (g_mime_part_finalize): Unref the content object.
6214
6215         * gmime-data-wrapper.c: Rewritten to subclass GObject.
6216         (g_mime_data_wrapper_destroy): Removed.
6217         (g_mime_data_wrapper_write_to_stream): Virtualize.
6218
6219 2002-08-08  Jeffrey Stedfast  <fejj@ximian.com>
6220
6221         * gmime-iconv.c: Implemented an all new iconv cache. Also has the
6222         beginnings of thread-safety but I'd really need to fix the
6223         Makefiles to conditionally link with -lpthread before it'd be of
6224         any value as well as needing to make gmime-charset.c's functions
6225         thread-safe.
6226
6227 2002-08-07  Jeffrey Stedfast  <fejj@ximian.com>
6228
6229         * gmime-message.c (message_remove_header): If the header to be
6230         removed is one of the special headers, then g_free() the cached
6231         value on the message object and set it to NULL. Fixes bug #90138.
6232
6233 2002-08-05  Jeffrey Stedfast  <fejj@ximian.com>
6234
6235         * doc/*: Updated.
6236
6237         * gmime-multipart-signed.c (g_mime_multipart_signed_sign):
6238         Documented.
6239         (g_mime_multipart_signed_verify): Documented.
6240
6241         * gmime-filter-from.c (g_mime_filter_from_new): Updated the
6242         documentation to explain the new mode argument.
6243
6244         * gmime-multipart-encrypted.c
6245         (g_mime_multipart_encrypted_encrypt): Documented.
6246         (g_mime_multipart_encrypted_decrypt): Documented.
6247
6248         * gmime-gpg-context.c (g_mime_gpg_context_get_always_trust):
6249         Implemented.
6250
6251 2002-08-04  Jeffrey Stedfast  <fejj@ximian.com>
6252
6253         * doc/*: Updated.
6254
6255 2002-08-03  Jeffrey Stedfast  <fejj@ximian.com>
6256
6257         * gmime-message.c (g_mime_message_set_message_id): Revert Charles'
6258         previous fix and just g_return_if_fail() if the message_id is NULL
6259         instead.
6260         (g_mime_message_set_subject): Same for NULL subjects.
6261         (g_mime_message_set_reply_to): Here too.
6262         (g_mime_message_set_sender): Again here.
6263         (g_mime_message_add_header): Check that the value != NULL.
6264         (g_mime_message_set_header): Same here.
6265
6266         * internet-address.c (decode_mailbox): Changed a for-loop into a
6267         while-loop to make the code a tad easier to read. Also fixed a
6268         type-o that meant to wrap a debug printf in d(). While we're at
6269         it, g_strstrip the resulting comment before using it as the name
6270         part of the address.
6271
6272 2002-08-02  Jeffrey Stedfast  <fejj@ximian.com>
6273
6274         * gmime-message-part.c: Fix some comments that say "message/*"
6275         (which is meant as a wildcard mime-type match) and change them to
6276         just "message" to prevent compiler warnings about a /* being
6277         inside a comment.
6278
6279         * gmime-charset.c: Get rid of a #include "unicode.h". This is no
6280         longer needed since we use glib2's unicode stuff.
6281
6282 2002-08-02  Charles Kerr <charles@rebelbase.com>
6283
6284         * gmime-message.c (gmime_message_foreach_part): if the message
6285         isn't a multipart message, just invoke the callback directly,
6286         passing in the single part.
6287
6288         * gmime-message.c (gmime_message_set_message_id): work around
6289         a g_strstrip() warning if message_id is NULL.
6290
6291         * gmime-part.c (g_mime_part_get_content_object): remove "const"
6292         from the retval; otherwise it's impossible to add a new filter.
6293
6294 2002-07-31  Jeffrey Stedfast  <fejj@ximian.com>
6295
6296         * gmime-filter-html.c (is_addr_char): Don't use "isprint(c)" to
6297         mean "c >= 32 && c < 128" since it doesn't in most locales.
6298         (is_url_char): Same.
6299         (is_trailing_garbage): Same.
6300         (is_domain_name_char): New macro for dns-valid characters
6301         (email_address_extract): Use is_domain_name_char rather than
6302         is_addr_char for the part after the @.
6303
6304 2002-07-30  Jeffrey Stedfast  <fejj@ximian.com>
6305
6306         * gmime-parser.c (parser_step_headers): Finish the fix from
6307         yesterday, the last statement of the while-loop needs to
6308         re-calculate `len' for parser_fill().
6309
6310 2002-07-30  Charles Kerr <charles@rebelbase.com>
6311
6312         * gmime-message.c (message_remove_header): Fix April 3 2002 bug
6313         that kept message-remove-header from removing headers.
6314
6315 2002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
6316
6317         * gmime-message.c (message_get_headers): Write the toplevel MIME
6318         Part's headers to the string as well, this fixes bug #88632 in
6319         bugzilla.gnome.org.
6320
6321 2002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
6322
6323         The following changes are meant to address bug #88100 on
6324         bugzilla.gnome.org - I'm as of yet unsure whether or not GMime
6325         should override the Message-Id write function or if Pan should do
6326         it. I'm sort of leaning towards Pan doing it simply because the
6327         current behavior is RFC compliant and the bug is really a "we need
6328         a workaround for a buggy NNTP server". However... It might just be
6329         simpler to have GMime do it.
6330
6331         * gmime-header.c (g_mime_header_new): Init a new hash table that
6332         stores info on how to write a particular header.
6333         (g_mime_header_destroy): Free the hash table.
6334         (g_mime_header_set_write_func): Set the writer function for a
6335         header.
6336         (g_mime_header_write_to_stream): Use the specified header write
6337         function for each ehader. If one wasn't specified, use the
6338         default.
6339
6340 2002-07-29  Charles Kerr  <charles@rebelbase.com>
6341
6342         * remove strlib.[ch]
6343         * use g_strcasecmp instead of strcasecmp
6344         * use g_strncasecmp instead of strncasecmp
6345         * use g_stpcpy instead of stpcpy
6346         * added "#include <string.h>" where needed
6347
6348 2002-07-29  Charles Kerr  <charles@rebelbase.com>
6349
6350         * gmime-filter-strip: fix trivial compiler warning.
6351         * gmime-message-part.c: same.
6352         * gmime-multipart-signed.c: same.
6353         * gmime-object.c: same.
6354         * gmime-param.c: same.
6355         * gmime-session.c: same.
6356         * test-iconv.c: same.
6357         * test-mbox.c: same.
6358         * test-parser.c: same.
6359         * test-partial.c: same.
6360
6361 2002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
6362
6363         * gmime-parser.c (parser_step_headers): When refilling, make sure
6364         that the refilled buffer is larger than the buffer was before
6365         refilling, otherwise break out of the loop and parse whatever is
6366         left. Fixes bug #89260 on bugzilla.gnome.org
6367
6368 2002-07-27  Jeffrey Stedfast  <fejj@ximian.com>
6369
6370         * gmime-stream-cat.c (stream_read): Initialize `n' at the
6371         beginning of the while-loop so that it can't be used
6372         uninitialized.
6373
6374         * gmime-parser.c (header_parse): Check to make sure that the
6375         header was valid (ie, `colon' == ':'). If not, then set
6376         header->value to "".
6377
6378 2002-05-26  Charles Kerr <charles@rebelbase.com>
6379
6380         * alloca.c: removed.
6381         * gmime-charset.c: use g_alloca instead of alloca.
6382         * gmime-filter-from.c: same.
6383         * gmime-filter-strip.c: same.
6384         * gmime-iconv.c: same.
6385         * gmime-param.c: same.
6386         * gmime-part.c: same.
6387         * gmime-utils.c: same.
6388         * memchunk.c: same.
6389
6390 2002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
6391
6392         * gmime-filter-crlf.c (filter_filter): Fix to not add an extra \r
6393         for pre-canonicalised streams.
6394
6395 2002-07-19  Jeffrey Stedfast  <fejj@ximian.com>
6396
6397         * gmime-iconv-utils.c (g_mime_iconv_strndup): Fix a logic mistake
6398         in the calculation of the number of bytes converted.
6399
6400 2002-07-18  Jeffrey Stedfast  <fejj@ximian.com>
6401
6402         * gmime-part.c (set_disposition): Fix to parse the disposition
6403         parameter values rather than assuming it is only the "attachment"
6404         or "inline" part of the value.
6405
6406 2002-07-14  Jeffrey Stedfast  <fejj@ximian.com>
6407
6408         * configure.in: check for gmtime_r
6409
6410         * gmime-utils.c (g_mime_utils_header_format_date): Use gmtime_r() if
6411         we have this function available to us.
6412
6413         * gmime-parser.c (parser_step_from): Save the From-line offset.
6414         (g_mime_parser_get_from_offset): Newly implemented function used
6415         for retrieving the offset of the From-line (for use when parsing
6416         mbox files).
6417
6418 2002-07-11  Jeffrey Stedfast  <fejj@ximian.com>
6419
6420         * strlib.c (strlcpy): Changed to behave the same as the Solaris
6421         strlcpy function.
6422         (strlcat): Changed to behave the same as the Solaris strlcat
6423         function.
6424
6425 2002-07-04  Jeffrey Stedfast  <fejj@ximian.com>
6426
6427         * gmime-iconv-utils.c (g_mime_iconv_strndup): Fix for
6428         nul-terminating some multibyte charsets.
6429
6430 2002-06-28  Jeffrey Stedfast  <fejj@ximian.com>
6431
6432         * gmime-gpg-context.c (gpg_ctx_op_step): If we get an EOF from the
6433         status-fd, then set gpg->complete to TRUE.
6434         (gpg_ctx_get_argv): Use --charset=UTF-8 and --keyserver-options to
6435         disable auto-key-retrieve rather than the deprecated
6436         --no-auto-key-retrieve flag.
6437
6438 2002-06-27  Jeffrey Stedfast  <fejj@ximian.com>
6439
6440         * gmime-gpg-context.c (gpg_ctx_op_step): Loop on our reads while
6441         errno is EINTR or EAGAIN. Also make sure to completely read stdout
6442         and stderr by keeping better state.
6443         (gpg_ctx_parse_status): If we encounted a NODATA error from gpg
6444         and we have diagnostics output, use that as the exception string.
6445         (gpg_ctx_op_exited): New function to determine if the gpg process
6446         has exited.
6447         (gpg_ctx_op_wait): Reuse any exit status information from
6448         gpg_ctx_op_exited().
6449         (gpg_verify): Check that the gpg process has not exited each loop.
6450
6451 2002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
6452
6453         * gmime-multipart-signed.c (g_mime_multipart_signed_sign): Once
6454         we've created the mime-part stream and armored the From lines and
6455         such, create a new MIME part based on this stream (since normally
6456         our QP encoder will not armor From lines) and use it as the
6457         content part for this multipart/signed part rather than the
6458         original MIME part.
6459         (multipart_signed_write_to_stream): This can now be simplified by
6460         calling our parent class's write_to_stream implementation since
6461         g_mime_multipart_signed_sign() takes care of all the From
6462         armoring.
6463
6464 2002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
6465
6466         * test-pgpmime.c: New test suite for the pgp/mime code.
6467
6468         * gmime-gpg-context.c (gpg_ctx_parse_status): Handle a NODATA
6469         status message from gpg.
6470
6471         * gmime-message.c (g_mime_message_new): Don't set NULL header
6472         values via the g_mime_object_set_header interface.
6473
6474         * gmime-object.c (g_mime_object_add_header): Don't allow value == NULL.
6475         (g_mime_object_set_header): Same.
6476
6477         * gmime.h.in: Updated to #include the new headers related to
6478         encryption and digital signatures.
6479
6480         * gmime.c (g_mime_init): register the multipart/encrypted and
6481         multipart/signed cclass types.
6482
6483         * gmime-multipart-signed.c: Fixed to compile cleanly.
6484         (multipart_signed_write_to_stream): We need to handle writing out
6485         the subparts ourselves because we need to armor From-lines.
6486
6487         * gmime-multipart-encrypted.c: Fixed to compile cleanly.
6488
6489 2002-06-25  Jeffrey Stedfast  <fejj@ximian.com>
6490
6491         * gmime-param.c (g_string_append_len_quoted): Append length as
6492         advertised rather than appending the whole string. Oops.
6493
6494         * gmime-multipart-encrypted.c
6495         (g_mime_multipart_encrypted_decrypt): Ugh, the
6496         g_return_val_if_fail()'s should be returning NULL.
6497
6498         * test-pgp.c: New test suite to make sure that the gpg code works.
6499
6500         * gmime-gpg-context.c: Keep more state as it seems we needed
6501         it. Also keep information such as trust level and whether the
6502         signature was found to be valid and such (in case we ever decide
6503         to use it).
6504
6505 2002-06-24  Jeffrey Stedfast  <fejj@ximian.com>
6506
6507         * gmime-multipart-signed.c (g_mime_multipart_signed_get_type):
6508         Register as a subclass of a GMimeMultipart.
6509
6510         * gmime-multipart-encrypted.c
6511         (g_mime_multipart_encrypted_get_type): Same.
6512
6513         * gmime-gpg-context.[c,h]: A new class implementing the
6514         GMimeCipherContext interfaces for GnuPG.
6515
6516         * gmime-session.[c,h]: New abstract session class for use by the
6517         cipher context classes for requesting passphrases/etc.
6518
6519         * gmime-cipher-context.c (g_mime_cipher_context_finalize): Unref
6520         the gmime-session.
6521
6522 2002-06-22  Jeffrey Stedfast  <fejj@ximian.com>
6523
6524         * gmime-part.c: Oops, a prototype had the wrong return type.
6525
6526 2002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
6527
6528         * gmime-multipart.c: Oops, some prototypes had the wrong return
6529         type.
6530
6531 2002-06-15  Jeffrey Stedfast  <fejj@ximian.com>
6532
6533         * gmime-parser.c (parser_scan_mime_part_content): Use
6534         g_mime_stream_mem_new_with_byte_array() so that the mem stream
6535         owns the byte array so we don't leak.
6536
6537 2002-06-12  Jeffrey Stedfast  <fejj@ximian.com>
6538
6539         * gen-table.c: Updated.
6540
6541         * gmime-utils.c (quoted_decode): Oops. ESPECIALs are allowed
6542         inside of the encoded-text section of the encoded-word.
6543
6544         * gmime-message.c (process_header): Add some NULL-protection.
6545
6546         * gmime-iconv.c (g_mime_iconv_open): If the from charset is
6547         "x-unknown", replace it with the user's locale charset.
6548
6549 2002-06-11  Jeffrey Stedfast  <fejj@ximian.com>
6550
6551         * gmime-parser.c (parser_scan_mime_part_content): If the parser
6552         stream is not seekable, then scan the content into a memory
6553         stream.
6554
6555 2002-06-09  Jeffrey Stedfast  <fejj@ximian.com>
6556
6557         * gmime-2.0.pc.in: New file for use in pkg-config.
6558
6559         * gmime-filter-strip.[c,h]: New source files implementing a stream
6560         filter for stripping trailing whitespace from lines (needed for
6561         PGP/MIME).
6562
6563         * gmime-exception.[c,h]: New source files implementing generic
6564         error reporting functionality.
6565
6566         * gmime-cipher-context.[c,h]: New abstract class for performing
6567         common functionality (such as encryption, decryption, signing,
6568         verifying, importing keys, and exporting keys) needed by any MIME
6569         cipher suite (PGP/MIME and S/MIME specifically).
6570
6571         * gmime-multipart-signed.[c,h]: New source files implementing the
6572         multipart/signed specification.
6573
6574         * gmime-multipart-encrypted.[c,h]: New source files implementing
6575         the multipart/encrypted specification.
6576
6577 2002-06-06  Jeffrey Stedfast  <fejj@ximian.com>
6578
6579         * test-mbox.c (test_parser): Test the new set_header_regex
6580         function.
6581
6582         * gmime-parser.c (g_mime_parser_set_header_regex): New convenience
6583         function to allow an application to be notified when a header
6584         matching a particular pattern is parsed by the
6585         parser. Particularly useful for finding the Status: header when
6586         parsing mbox files.
6587
6588 2002-06-04  Jeffrey Stedfast  <fejj@ximian.com>
6589
6590         * gmime-iconv-utils.c (g_mime_iconv_strndup): Pull up past fixes
6591         from the gmime-1 branch.
6592
6593 2002-06-02  Jeffrey Stedfast  <fejj@ximian.com>
6594
6595         * gmime.c (g_mime_init): Register the message-part class.
6596
6597         * gmime-message-part.c: New class for handling message/* subparts.
6598
6599         * gmime-parser.c (parser_scan_message_part): Handle mime parts of
6600         type message.
6601         (parser_construct_leaf_part): Find out if the leaf part is
6602         actually a message part.
6603
6604         * gmime-filter-from.c (g_mime_filter_from_new): Now takes a mode
6605         argument to specify how "From "'s should be protected.
6606         (filter_filter): If we are to armor the "From " then transform it
6607         into "=46rom " otherwise transform it into the normal ">From ".
6608
6609 2002-05-31  Jeffrey Stedfast  <fejj@ximian.com>
6610
6611         * gmime/gmime-stream-cat.c (stream_read): Rewritten to work
6612         correctly. This was broken worse than I could imagine :-)
6613         (stream_write): Fix similarly.
6614
6615 2002-05-30  Jeffrey Stedfast  <fejj@ximian.com>
6616
6617         * gmime-stream-cat.c (stream_reset): Same.
6618
6619         * gmime-stream-file.c (stream_reset): Same.
6620
6621         * gmime-stream-fs.c (stream_reset): If the stream position is
6622         already reset, just return 0.
6623
6624 2002-05-23  Jeffrey Stedfast  <fejj@ximian.com>
6625
6626         * doc/*: Updated documentation.
6627
6628 2002-05-22  Jeffrey Stedfast  <fejj@ximian.com>
6629
6630         * gmime-multipart.c (multipart_write_to_stream): Avoid adding an
6631         extranious newline character when a preface doesn't exist.
6632
6633 2002-05-20  Jeffrey Stedfast  <fejj@ximian.com>
6634
6635         * gmime-part.c (g_mime_part_set_content_md5): Fix some compiler
6636         warnings as well as doing some more error handling.
6637         (g_mime_part_verify_content_md5): Same.
6638
6639         * md5-utils.c: Removed some compiler warnings.
6640
6641 2002-05-20  Jeffrey Stedfast  <fejj@ximian.com>
6642
6643         * gmime-stream-cat.c (stream_seek): Return the absolute offset
6644         into the cat stream rather than the relative offset of one of the
6645         substreams on success. Fixed a few other things too.
6646         (stream_read): Fix the logic here so that we never try reading
6647         from a stream that is current at EOS.
6648
6649 2002-05-16  Jeffrey Stedfast  <fejj@ximian.com>
6650
6651         * gmime-parser.c (parser_scan_mime_part_content): Only compensate
6652         for the '\n' if we found a boundary.
6653
6654 2002-05-16  Charles Kerr <charles@rebelbase.com>
6655
6656         * gmime-filter-yenc.c: fixed regression that caused end line of
6657         yenc encoding to not be detected.  This was causing crc errors in Pan.
6658
6659 2002-05-14  Jeffrey Stedfast  <fejj@ximian.com>
6660
6661         * gmime-stream-filter.c (stream_destroy): Removed.
6662
6663 2002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
6664
6665         * gmime-stream-cat.c (stream_read): Don't allow our caller to read
6666         past the end of the stream.
6667         (stream_write): Same.
6668         (stream_seek): Don't forget to add the current source stream's
6669         bound_start when seeking on the current source stream.
6670
6671         * gmime-message-partial.c (g_mime_message_partial_init): Zero our
6672         extra fields.
6673         (g_mime_message_partial_finalize): Cleanup strdup'd memory.
6674         (message_partial_set_content_type): Implemented.
6675         (g_mime_message_partial_class_init): Override set_content_type().
6676         (g_mime_message_partial_get_id): Simplify.
6677         (g_mime_message_partial_get_number): Simplify.
6678         (g_mime_message_partial_get_total): Simplify.
6679
6680         * gmime-multipart.c (multipart_set_content_type): Implement.
6681         (g_mime_multipart_class_init): Override set_content_type().
6682
6683         * gmime-object.c: Make set_content_type() virtual.
6684
6685 2002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
6686
6687         * gmime-message-partial.c (partial_compare): Fixed to work
6688         properly.
6689
6690 2002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
6691
6692         * test-partial.c: New test suite for gmime-message-partial.c.
6693
6694         * gmime-stream-cat.c: Several fixes.
6695         (g_mime_stream_cat_class_init): Overload the seek method.
6696
6697         * gmime-stream-mmap.c (g_mime_stream_mmap_class_init): Overload
6698         the seek method.
6699
6700         * gmime-stream-buffer.c (g_mime_stream_buffer_class_init):
6701         Overload the seek method.
6702
6703         * gmime-stream-null.c (g_mime_stream_null_class_init): Overload
6704         the seek method.
6705
6706         * gmime-stream-filter.c (g_mime_stream_filter_class_init):
6707         Overload the seek method.
6708
6709         * gmime-stream.c (g_mime_stream_class_init): Overload the seek
6710         method.
6711
6712         * gmime-stream-mem.c (g_mime_stream_mem_class_init): Overload the
6713         seek method.
6714
6715         * gmime-stream-file.c (g_mime_stream_file_class_init): Overload
6716         the seek method.
6717         (stream_length): The length of the stream is bound_end -
6718         bound_start.
6719
6720         * gmime-stream-fs.c (g_mime_stream_fs_class_init): Overload the
6721         seek method.
6722         (stream_length): The length of the stream is bound_end -
6723         bound_start.
6724
6725 2002-05-10  Jeffrey Stedfast  <fejj@ximian.com>
6726
6727         * gmime-stream-cat.c (stream_reset): Use stream_seek().
6728         (stream_read): Seek to position before starting our read, this is
6729         to protect against one of our source streams being read while we
6730         weren't looking and/or a substream related to our cat stream.
6731         (stream_write): Same.
6732
6733 2002-05-09  Jeffrey Stedfast  <fejj@ximian.com>
6734
6735         * gmime-message-partial.c: New class to handle MIME parts with a
6736         content-type of message/partial.
6737
6738         * gmime.c (g_mime_init): Register the message/partial class.
6739
6740         * gmime-object.c (g_mime_object_new_type): If we fail to find an
6741         appropriate mime object class, try falling back to the */*
6742         handler. Only if that fails do we return NULL.
6743
6744 2002-05-08  Jeffrey Stedfast  <fejj@ximian.com>
6745
6746         * Makefile.am: Added gmime-stream-cat.c to the build.
6747
6748         * gmime-stream-cat.c: New stream that acts similar to the Unix
6749         `cat` command by concatenating multiple streams.
6750
6751 2002-05-07  Jeffrey Stedfast  <fejj@ximian.com>
6752
6753         * gmime-stream-fs.c (stream_write): Do more error handling and
6754         also try to write out everything.
6755
6756 2002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
6757
6758         * gmime-charset.c (main): Generate the multibyte charsets without
6759         the need for using external .dat files. Also attempt to condense
6760         the charset-map table a bit.
6761
6762         * gen-multibyte.c: Removed.
6763
6764 2002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
6765
6766         * gmime-charset.c (main): Instead of converting the multibyte
6767         charset tables to UTF-8 and then using the unicode functions to
6768         convert UTF-8 to UCS4, just convert directly to UCS4. Also fixed a
6769         type-o in the Big5.dat filename (it should be Big5.dat not
6770         Big5.data).
6771
6772 2002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
6773
6774         * gmime-parser.c (parser_fill): Try to align the end of our
6775         left-over buffer with realbuf + SCAN_HEAD so that we avoid: 1)
6776         completely filling the prespace or 2) reading more than SCAN_BUF
6777         bytes per read() call.
6778
6779 2002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
6780
6781         * gmime-utils.c (g_mime_utils_base64_decode_step): Only backtrack
6782         if we have output data.
6783
6784 2002-04-23  Jeffrey Stedfast  <fejj@ximian.com>
6785
6786         * gmime-utils.c (rfc2047_encode_phrase): Fixed a small memory
6787         leak. Thanks to the Pan guys for finding this.
6788
6789 2002-04-21  Jeffrey Stedfast  <fejj@ximian.com>
6790
6791         * gmime-parser.c (parser_step_from): Fixes to make it work.
6792         (g_mime_parser_eos): New function to tell if a parser is at the
6793         end of it's stream.
6794
6795 2002-04-20  Jeffrey Stedfast  <fejj@ximian.com>
6796
6797         * docs/*: Updated.
6798
6799         * configure.in: Add $srcdir to the include path so it catches
6800         iconv-detect.h.
6801
6802 2002-04-18  Jeffrey Stedfast  <fejj@ximian.com>
6803
6804         * gmime-parser.c (parser_step_headers): Take advantage of the same
6805         optimization as parser_scan_content.
6806
6807 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
6808
6809         * gmime-parser.c (parser_scan_content): Optimized by a good 15% by
6810         simply changing my inner while-loop. See comment for explanation.
6811
6812         * gmime-part.c (g_mime_part_encoding_from_string): Added support
6813         for the binary encoding.
6814         (g_mime_part_encoding_to_string): Same.
6815
6816         * gmime-utils.h: Added GMIME_PART_ENCODING_BINARY.
6817
6818 2002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
6819
6820         * gmime-parser.c (parser_scan_multipart_subparts): Don't leak
6821         objects!
6822
6823 2002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
6824
6825         * gmime-message.c (process_header): process the headers we care
6826         about.
6827         (message_add_header): Call process_header.
6828         (message_set_header): Same.
6829
6830         * gmime-part.c (process_header): process the headers we care
6831         about.
6832         (mime_part_add_header): Call process_header.
6833         (mime_part_set_header): Same.
6834
6835         * gmime-object (process_header): process the headers we care
6836         about.
6837         (add_header): Call process_header.
6838         (set_header): Same.
6839
6840 2002-04-15  Jeffrey Stedfast  <fejj@ximian.com>
6841
6842         * gmime-parser.c (g_mime_parser_set_scan_from): New accessor
6843         method to set whether or not to scan from-lines.
6844         (g_mime_parser_get_scan_from): New accessor method to get the
6845         from-line mode.
6846
6847 2002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
6848
6849         * gmime-utils.c (datetok): Treat ',' as a token delimeter. Also
6850         updated the datetok lookup table.
6851
6852         * configure.in: Check for off_t, size_t, and ssize_t.
6853
6854 2002-04-15  Jeffrey Stedfast  <fejj@ximian.com>
6855
6856         * gmime-parser.[c,h]: Brand spankin' new parser. Seems to work for
6857         at least simple messages, needs a lot more love though.
6858
6859         * gmime-stream*.c: Don't use a base_class init or finalize.
6860
6861         * gmime-object.c: Same.
6862
6863         * gmime-part.c: Same here.
6864
6865         * gmime.c (g_mime_init): Call g_type_init.
6866
6867         * gmime-utils.c (g_mime_utils_header_fold): Slight bugfix to get
6868         rid of extra whitespace at the end of a line.
6869
6870         * gmime-multipart.c (g_mime_multipart_set_preface): New accesor
6871         function to set the multipart preface.
6872         (g_mime_multipart_get_preface): New accesor function to get the
6873         multipart preface.
6874         (g_mime_multipart_set_postface): New accesor function to set the
6875         multipart postface.
6876         (g_mime_multipart_get_postface): New accesor function to get the
6877         multipart postface.
6878         (write_to_stream): Don't force a preface if we don't have one.
6879
6880 2002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
6881
6882         * gmime-object.c: Don't tie the type-registry lifetime to the
6883         GMimeObject lifetime.
6884
6885         * gmime.c (g_mime_init): Register our generic and multipart/* MIME
6886         object classes here.
6887
6888         * gmime-part.c (g_mime_part_class_init): Don't register ourselves
6889         here anymore.
6890
6891         * gmime-multipart.c (g_mime_multipart_class_init): Don't register
6892         ourselves here anymore.
6893
6894 2002-04-07  Jeffrey Stedfast  <fejj@ximian.com>
6895
6896         * gmime-utils.c (g_mime_utils_uuencode_close): Fixed a bug that
6897         crept in during my simplification.
6898
6899 2002-04-07  Jeffrey Stedfast  <fejj@ximian.com>
6900
6901         * gmime-part.c (g_mime_part_set_content_id): Wrap the object
6902         set_content_id.
6903         (g_mime_part_get_content_id): Same.
6904
6905         * gmime-multipart.c
6906         (g_mime_multipart_get_subpart_from_content_id): Compare the
6907         object->content_id's.
6908
6909         * gmime-object.c (g_mime_object_set_content_id): New function
6910         since the Content-Id should really be stored on the object class.
6911         (g_mime_object_get_content_id): Same.
6912         (set_header): If we are setting the Content-Id header, also set
6913         our internal content_id member.
6914         (add_header): Same.
6915
6916         * gmime-content-type.c (g_mime_content_type_set_parameter):
6917         Renamed from g_mime_content_type_add_parameter.
6918
6919         * gmime-multipart.c (g_mime_multipart_new_with_subtype): New
6920         convenience function.
6921
6922         * Makefile.am temporarily removed gmime-parser.c from the
6923         build. It needs to be completely rewritten from scratch pretty
6924         much.
6925
6926 2002-04-06  Jeffrey Stedfast  <fejj@ximian.com>
6927
6928         * gmime-part.c (g_mime_part_add_subpart): Removed.
6929         (g_mime_part_set_boundary): Removed.
6930         (g_mime_part_get_boundary): Removed.
6931
6932         * gmime-object.c (g_mime_object_get_content_type_parameter): New
6933         function.
6934         (g_mime_object_set_content_type_parameter): New function.
6935
6936         * gmime-multipart.c (g_mime_multipart_new): New function, forgot
6937         to implement it before ;-)
6938         (multipart_set_boundary): Set the boundary parameter on the
6939         content-type.
6940
6941 2002-04-06  Jeffrey Stedfast  <fejj@ximian.com>
6942
6943         * gmime-part.c (g_mime_part_foreach): Removed.
6944         (g_mime_part_get_subpart_from_content_id): Same.
6945
6946         * gmime-multipart.c (g_mime_multipart_foreach): Moved here from
6947         gmime-part.c:g_mime_part_foreach since this is really only meant
6948         to work on multiparts.
6949         (g_mime_multipart_get_subpart_from_content_id): Same idea here too.
6950
6951         * gmime-object.c (g_mime_object_set_content_type): Move
6952         g_mime_part_set_content_type up to the GMimeObject abstraction.
6953         (g_mime_object_get_content_type): Same.
6954
6955 2002-04-03  Jeffrey Stedfast  <fejj@ximian.com>
6956
6957         * gmime-message.c: Initial port to GObject.
6958
6959 2002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
6960
6961         * gmime-message.c (g_mime_message_add_recipients_from_string):
6962         Destroy the temporary addrlist.
6963
6964 2002-03-29  Jeffrey Stedfast  <fejj@ximian.com>
6965
6966         * configure.in: Detect the iconv-friendly formats for iso charsets
6967         at configure time and dump them into iconv-detect.h for use in
6968         gmime-charset.c.
6969
6970         * gmime-charset.c: Updated to use iconv-detect.h if it exists.
6971
6972 2002-03-25  Jeffrey Stedfast  <fejj@ximian.com>
6973
6974         * gmime-multipart.c: Compile fixes.
6975
6976         * gmime-header.c (g_mime_header_write_to_stream): Now returns the
6977         number of bytes written or -1 on fail.
6978
6979         * gmime-object.c: Compile fixes.
6980
6981         * gmime-stream-null.c (g_mime_stream_null_finalize): And finally
6982         here.
6983
6984         * gmime-stream-mmap.c (g_mime_stream_mmap_finalize): Here too.
6985
6986         * gmime-stream-mem.c (g_mime_stream_mem_finalize): And again...
6987
6988         * gmime-stream-fs.c (g_mime_stream_fs_finalize): Again here.
6989
6990         * gmime-stream-filter.c (g_mime_stream_filter_finalize): Here too.
6991
6992         * gmime-stream-file.c (g_mime_stream_file_finalize): Same.
6993
6994         * gmime-stream-buffer.c (g_mime_stream_buffer_finalize): Call
6995         GObject's finalize function.
6996
6997 2002-03-24  Jeffrey Stedfast  <fejj@ximian.com>
6998
6999         * memchunk.c: Make this compile.
7000
7001         * internet-address.c (decode_mailbox): No longer check
7002         gmime_interfaces_utf8 as that was a hack in gmime-1's branch.
7003
7004         * gmime-charset.c (charset_step): Sync with the gmime-1 branch. We
7005         now have multibyte charset detection.
7006
7007         * gmime-utils.c: Sync with gmime-1's changed.
7008         (rfc2047_decode_word): Always convert decoded text to UTF-8.
7009         (rfc2047_encode_phrase_get_words): We can always assume our input
7010         is in UTF-8 now.
7011         (rfc2047_encode_phrase): Sam here.
7012         (g_string_append_len): Removed since glib2 now has this function.
7013
7014         * gmime-param.c (decode_param): Make sure the decoded text is
7015         valid UTF-8.
7016         (encode_param): Convert to the best charset before encoding.
7017         (g_string_append_len): Removed since glib2 now has this function.
7018
7019         * gmime.c (g_mime_init): Initializes gmime. We no longer care
7020         about GMIME_INIT_FLAGS_UTF8 as we now always use UTF-8 interfaces.
7021
7022 2002-03-17  Jeffrey Stedfast  <fejj@ximian.com>
7023
7024         * gmime-stream-null.c (g_mime_stream_null_get_type): Use
7025         GMIME_TYPE_STREAM as our base class.
7026         (g_mime_stream_null_class_init): Our parent class is a
7027         GMIME_STREAM_CLASS, not a G_OBJECT_CLASS.
7028         (g_mime_stream_null_finalize): Call our parent's finalize, which
7029         is GMIME_STREAM_CLASS's finalize, not G_OBJECT_CLASS's finalize.
7030
7031         * gmime-stream-mmap.c: Same.
7032
7033         * gmime-stream-filter.c: Here too.
7034
7035         * gmime-stream-file.c: And here.
7036
7037         * gmime-stream-fs.c: Again here.
7038
7039         * gmime-stream-mem.c: And again...
7040
7041         * gmime-stream-buffer.c: And finally here.
7042
7043         * gmime-multipart.[c,h]: New class that inherits from GMimeObject
7044         that represents a MIME multipart.
7045
7046 2002-03-17  Jeffrey Stedfast  <fejj@ximian.com>
7047
7048         * gmime-object.c: Ported to glib2 by subclassing GObject and also
7049         added a GMimeHeader data member and methods to access those
7050         headers as well as adding abstract methods for getting the headers
7051         as one big string buffer and writing the object headers/content to
7052         a stream.
7053
7054         * gmime-stream-*.c (*_class_init): Don't set a destroy handler -
7055         we can't, we don't have a virtual function pointer for it!
7056
7057         * gmime-stream.c (g_mime_stream_substream): Use GET_CLASS since we
7058         are passing in an object.
7059         (g_mime_stream_length): Same.
7060         (g_mime_stream_tell): Here too.
7061         (g_mime_stream_seek): And here.
7062         (g_mime_stream_reset): And again here.
7063         (g_mime_stream_eos): Again.
7064         (g_mime_stream_close): Here too.
7065         (g_mime_stream_flush): Same.
7066         (g_mime_stream_write): Same here.
7067         (g_mime_stream_read): And finally here.
7068         (g_mime_stream_class_init): Setup default implementations of all
7069         the stream methods. Also no longer set a destroy handler.
7070
7071         * gmime-stream-buffer.[c,h]: Updated to subclass the new
7072         GMimeStream based on GObject.
7073
7074 2002-03-16  Jeffrey Stedfast  <fejj@ximian.com>
7075
7076         * gmime-stream-filter.[c,h]: Updated to subclass the new
7077         GMimeStream based on GObject.
7078
7079         * gmime-stream-fs.[c,h]: Updated to subclass the new GMimeStream
7080         based on GObject.
7081
7082         * gmime-stream-file.[c,h]: Updated to subclass the new GMimeStream
7083         based on GObject.
7084
7085         * gmime-stream-mmap.[c,h]: Updated to subclass the new GMimeStream
7086         based on GObject.
7087
7088         * gmime-stream-null.[c,h]: Updated to subclass the new GMimeStream
7089         based on GObject.
7090
7091         * gmime-stream-mem.[c,h]: Updated to be based on the new
7092         implementation of GMimeStream.
7093
7094         * gmime-type-utils.h: New file to contain some more-friendly
7095         type-cast macros around the glib2 ones.
7096
7097         * gmime-stream.[c,h]: Now subclasses GObject. Not sure if I got
7098         everything right, but I think it's mostly there?
7099
7100 2002-03-15  Charles Kerr <charles@rebelbase.com>
7101
7102         * gmime-filter-charset.c: fixed minor compiler warnings.
7103         * gmime-iconv-utils.c: same.
7104         * test-html.c: same.
7105         * test-iconv.c: same.
7106         * test-mime.c: same.
7107         * test-streams.c: same.
7108
7109 2002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
7110
7111         * gmime-utils.c (g_mime_utils_uudecode_step): Fixed a logic
7112         mistake. All is good now in the land of UU :-)
7113
7114 2002-03-15  Charles Kerr <charles@rebelbase.com>
7115
7116         Syncing up with small changes from Pan...
7117
7118         * gmime-content-type.c: remove unused #include <alloca.h>
7119         * gmime-message.c: same.
7120         * gmime-part.c: same.
7121         * internet-address.c: same.
7122
7123         * gmime-filter-basic.c: add #include <string.h> (strncmp)
7124         * gmime-filter-yenc.c: add #include <string.h> (strncmp)
7125         * gmime-iconv-utils.c: add #include <string.h> (strlen)
7126         * gmime-iconv.c: add #include <string.h> (strlen)
7127         * gmime-iconv.c: add #include <stdio.h> (sprintf)
7128         
7129 2002-03-14  Jeffrey Stedfast  <fejj@ximian.com>
7130
7131         * gmime-filter-yenc.c (filter_reset): Added a switch-statement
7132         based on direction. Yes, for now the INIT state for encode/decode
7133         are both the same but this may change? Probably not but oh well
7134         :-)
7135         (g_mime_ydecode_step): Sync up with Charles' yenc fixes.
7136
7137 2002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
7138
7139         * gmime-filter-yenc.c: Compile fixes.
7140
7141 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
7142
7143         * gmime-filter-yenc.c (g_mime_filter_yenc_get_pcrc): Finalize the
7144         crc before returning.
7145         (g_mime_filter_yenc_get_crc): Same.
7146
7147 2002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
7148
7149         * gmime-filter-yenc.c: New filter to encode/decode yEnc streams.
7150
7151 2002-03-03  Jeffrey Stedfast  <fejj@ximian.com>
7152
7153         Thanks to Carlos Morgado <chbm@chbm.nu>
7154
7155         * gmime.spec.in: Fix.
7156
7157 2002-03-03  Jeffrey Stedfast  <fejj@ximian.com>
7158
7159         * gmime-part.c (g_mime_part_write_to_stream): Get rid of some
7160         extra line feeds.
7161
7162 2002-02-21  Jeffrey Stedfast  <fejj@ximian.com>
7163
7164         * doc/*: Updated.
7165
7166         * configure.in: Updated version to 0.8.0
7167
7168 2002-01-25  Jeffrey Stedfast  <fejj@ximian.com>
7169
7170         * gmime-charset.c (g_mime_charset_name): Updated for AIX, HPUX,
7171         IRIX, and Sun systems.
7172
7173 2002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
7174
7175         * gmime-iconv.c (iconv_cache_bucket_add_node): Fixed an oops.
7176         (iconv_cache_bucket_get_first_unused): Fixed another oops.
7177
7178 2002-01-20  Jeffrey Stedfast  <fejj@ximian.com>
7179
7180         * gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
7181         Handle the x-uuencode encoding type.
7182
7183         * gmime-utils.c (g_mime_utils_uuencode_close): No longer needs a
7184         uulen argument since it is now compacted into the state argument.
7185         (g_mime_utils_uuencode_step): Same here.
7186
7187         * gmime-filter-basic.c (filter_filter): Ignore data until we have
7188         found the "begin" line. Also, we no longer need uulen.
7189         (filter_complete): Same.
7190
7191         * gmime-part.c (g_mime_part_encoding_to_string): Handle
7192         x-uuencode.
7193         (g_mime_part_encoding_from_string): Same.
7194         (g_mime_part_set_pre_encoded_content): Here too.
7195         (write_content): And again here.
7196
7197 2002-01-19  Jeffrey Stedfast  <fejj@ximian.com>
7198
7199         * gmime-iconv.c (iconv_node_new): Return the node - how did I miss
7200         this!?
7201
7202 2002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
7203
7204         * configure.in: Fixed more silliness.
7205
7206         * acconfig.h: Added #undef's for some iconv stuff.
7207
7208         * gmime-filter-charset.c (g_mime_filter_charset_new): Put the
7209         charset arguments in the right order.
7210
7211         * gmime-iconv.c (g_mime_iconv_open): Swap the to/from arguments so
7212         that they are in the same order as iconv_open.
7213
7214         * gmime-iconv-utils.c (iconv_utils_init): Put the to/from
7215         arguments in the right order.
7216
7217 2002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
7218
7219         * gmime-iconv-utils.c (g_mime_iconv_strndup): If we get an EILSEQ,
7220         just return NULL rather than g_strndup'ing the original
7221         string. We'd rather get back NULL and know it failed than get back
7222         a string thinking everything went okay.
7223
7224         * configure.in: Fixed some silliness, thanks to Charles Schmidt.
7225
7226 2002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
7227
7228         * gmime-iconv-utils.c (g_mime_iconv_strndup): New utility function
7229         to iconv n bytes of a string and return a buffer containing the
7230         converted string.
7231         (g_mime_iconv_strdup): Same but for the whole string.
7232         (g_mime_iconv_locale_to_utf8): Converts a string in the locale
7233         charset to utf8.
7234         (g_mime_iconv_locale_to_utf8_length): Same but for a sublength of
7235         the string.
7236         (g_mime_iconv_utf8_to_locale): Converts a string from utf8 to the
7237         locale charset.
7238         (g_mime_iconv_utf8_to_locale_length): Same but for a sublength of
7239         the string.
7240
7241 2002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
7242
7243         * test-iconv.c: test suite to make sure that the gmime-iconv cache
7244         works.
7245
7246         * gmime-iconv.c (g_mime_iconv_init): Initialize the iconv_node
7247         memchunk.
7248         (g_mime_iconv_shutdown): Destroy the iconv_node memchunk.
7249         (iconv_node_destroy): Use memchunk_free instead of g_free.
7250         (iconv_node_new): Use memchunk_alloc.
7251         (iconv_node_set_used): Add/Remove the node to the iconv_open_hash.
7252
7253 2002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
7254
7255         * configure.in: Bumped the version to 0.7.7
7256
7257         * doc/*: Updated to document the new gmime-iconv interfaces.
7258
7259         * gmime-filter-charset.c (g_mime_filter_charset_new): Use
7260         g_mime_iconv_open instead of iconv_open. Also no longer need to
7261         use g_mime_charset_name() since gmime-iconv does this for us.
7262         (filter_destroy): Use g_mime_iconv_close() instead of
7263         iconv_close().
7264
7265         * gmime-iconv.c (g_mime_iconv_open): New wrapper around
7266         iconv_open() so that we can cache the results. This'll be a major
7267         speedup for systems like Solaris where iconv_open() must dlopen a
7268         module for each of the charsets. Also uses g_mime_charset_name()
7269         to get the iconv-friendly charset name for you.
7270         (g_mime_iconv_close): New wrapper around iconv_close().
7271
7272 2002-01-13  Jeffrey Stedfast  <fejj@ximian.com>
7273
7274         * configure.in: Bumped version to 0.7.6
7275
7276         * doc/*: Updated to document the new charset code.
7277
7278         * gmime.h.in: Added #includes for gmime-charset.h and
7279         gmime-filter-charset.h.
7280
7281         * gmime-filter-charset.c: New filter for converting text between
7282         charsets using iconv.
7283
7284         * gmime-charset.c (g_mime_charset_name): New function to derive
7285         the iconv-friendly name for a given charset.
7286
7287 2002-01-09  Charles Kerr <charles@rebelbase.com>
7288
7289         * internet-address.c (internet_address_list_prepend): replaced
7290         "g_return_if_fail" with "g_return_val_if_fail".
7291         * internet-address.c (internet_address_list_append): same.
7292
7293         * internet-address.c (internet_address_set_group): removed
7294         unused variables to shut up compiler.
7295         * gmime-param.c (rfc2184_decode): same.
7296
7297 2002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
7298
7299         * config.h.in: Added a #include <alloca.h> if HAVE_ALLOCA_H is
7300         defined - this limits the number of places I have to conditionally
7301         add #include <alloca.h> in the source files.
7302
7303 2002-01-05  Jeffrey Stedfast  <fejj@ximian.com>
7304
7305         * gmime-utils.c (parse_broken_date): Implemented.
7306
7307 2002-01-04  Jeffrey Stedfast  <fejj@ximian.com>
7308
7309         * memchunk.c (memchunk_clean): Oops, when tree_search() returns 0
7310         we want to prune it, not the other way around :-)
7311
7312 2002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
7313
7314         * memchunk.c (memchunk_clean): Fixed a logic mistake that
7315         prevented pruning of the head node.
7316
7317 2002-01-01  Charles Kerr <charles@rebelbase.com>
7318
7319         * gmime-message (g_mime_message_get_body): added g_return_val_if_fail
7320         checks in the entry point.
7321
7322 2001-12-31  Jeffrey Stedfast  <fejj@ximian.com>
7323
7324         * internet-address.c (decode_address): Optimized group parsing.
7325
7326         * doc/*: Updated.
7327
7328 2001-12-31  Jeffrey Stedfast  <fejj@ximian.com>
7329
7330         * strlib.c (strncasecmp): Convert the chars to lowercase before
7331         diffing.
7332
7333 2001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
7334
7335         * configure.in: Bumped version number to 0.7.5 since the
7336         internet-address API and bits of the gmime-message API have
7337         changed.
7338
7339         * internet-address.c (internet_address_new): Initialize the
7340         refcount to 1.
7341         (internet_address_destroy): This is now an internal function.
7342         (internet_address_ref): New function to ref an InternetAddress
7343         object.
7344         (internet_address_unref): New function to unref an InternetAddress
7345         object.
7346         (internet_address_set_group): Updated to use the new
7347         internet_address_list functions.
7348         (internet_address_add_member): Same.
7349         (internet_address_list_prepend): New function to manipulate a list
7350         of InternetAddress objects.
7351         (internet_address_list_append): Same.
7352         (internet_address_list_concat): Another new function.
7353         (internet_address_list_length): Again...
7354         (internet_address_list_destroy): Destroy a list of addresses.
7355         (internet_address_list_to_string): New utility function to write a
7356         list of addresses to a string.
7357         (internet_address_parse_string): Optimized slightly by not using
7358         GLists' generic append function and also updated to use
7359         InternetAddressList.
7360
7361         * gmime-message.c (recipients_destroy): Updated to call
7362         internet_address_list_destroy.
7363         (sync_recipient_header): Updated to let the InternetAddress code
7364         do the work for us.
7365         (g_mime_message_add_recipient): Updated to use the new
7366         InternetAddress API.
7367         (g_mime_message_add_recipients_from_string): Same.
7368         (g_mime_message_get_recipients): Return an InternetaddressList
7369         instead of GList.
7370
7371 2001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
7372
7373         * strlib.c (strncasecmp): Do null-checking.
7374
7375         * TODO: Remove features that have already been
7376         implemented/fixed/whatever.
7377
7378 2001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
7379
7380         * memchunk.c (memchunk_clean): Prune 'cleaned' nodes from our
7381         free-node list. Thanks to Charles Kerr for discovering this bug.
7382
7383         * strlib.c (strncasecmp): Moved the return calculation to within
7384         the loop so as to only take a difference if the strings are not
7385         identical. This also fixes a bug that would falsely return
7386         non-zero for strings that were identical for the first n bytes.
7387
7388 2001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
7389
7390         * gmime-stream.c (g_mime_stream_construct): 'type' is now an
7391         unsigned int rather than a signed int.
7392
7393         * memchunk.c (memchunk_clean): Oops. Don't forget to free the tree
7394         after we're finished with it...
7395
7396 2001-12-18  Jeffrey Stedfast  <fejj@ximian.com>
7397
7398         Various compiler warning fixes to several source files (mostly
7399         "unused variable" type stuff).
7400
7401 2001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
7402
7403         * gmime-utils.c (datetok): reimplement to not use GLists
7404         (appending is slow) and also to not g_strndup the token, instead
7405         just remember it's offset and length so we can examine it later.
7406         (decode_int): New function to decode an int.
7407         (get_wday): Now takes an inlen argument.
7408         (get_mday): Same. Also calls decode_int.
7409         (get_month): Here too.
7410         (get_year): Again here... also calls decode_int.
7411         (get_tzone): Modified to use struct _date_token.
7412         (get_time): Completely rewritten.
7413
7414 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
7415
7416         * memchunk.[c,h]: A memchunk library similar to g_mem_chunk's but
7417         faster.
7418
7419 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
7420
7421         * configure.in: Added a --enable-warnings to turn on compiler
7422         warnings.
7423
7424         * gmime-utils.c: Various compiler warning cleanup.
7425
7426         * gmime-object.c (g_mime_object_construct): Change the type
7427         argument to be of type unsigned rather than int.
7428
7429         * gmime-filter-html.c (url_extract): g_strndup takes an unsigned
7430         length argument.
7431
7432         * gmime-filter-from.c (filter_filter): memcpy takes an unsigned
7433         length argument.
7434
7435         * gmime-disposition.c (g_mime_disposition_new): g_strndup takes an
7436         unsigned length argument.
7437
7438         * gmime-content-type.c (g_mime_content_type_new_from_string):
7439         g_strndup takes an unsigned length argument.
7440
7441         * gmime-charset.c (g_mime_charset_init): g_strndup takes an
7442         unsigned length argument.
7443
7444 2001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
7445
7446         * gmime-part.c (g_mime_part_destroy): Now an internal-only method.
7447
7448         * gmime-message.c (g_mime_message_destroy): Now an internal-only
7449         method.
7450
7451 2001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
7452
7453         * gmime-filter-basic.c (filter_filter):
7454         (filter_complete): The outbuf for QP decoding can be up to len + 2
7455         bytes and UU decoding outbuf can be up to len + 3 bytes.
7456
7457 2001-12-01  Jeffrey Stedfast  <fejj@ximian.com>
7458
7459         * gmime-parser.c (parse_content_headers): Set is_multipart to
7460         FALSE.
7461         (g_mime_parser_construct_part_internal): Get the inlen properly
7462         and do content-offsetting a little better by skipping past the
7463         end-of-header marker.
7464
7465         * gmime-stream-buffer.c (g_mime_stream_buffer_gets): Use the
7466         'register' keyword for some variables.
7467
7468         * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): Safeguard
7469         against NULL streams.
7470         (g_mime_data_wrapper_write_to_stream): Reset the stream before
7471         writing too.
7472
7473         * gmime-stream-mem.c (stream_seek): Fix to work like the others.
7474         (stream_read): On error, always return -1 (and not just any value
7475         less than 0)
7476         (stream_write): Same.
7477
7478 2001-11-30  Jeffrey Stedfast  <fejj@ximian.com>
7479
7480         * gmime-part.c (write_content): Implemented a slight optimization
7481         which bypasses the need to do any encoding in certain
7482         circumstances.
7483
7484 2001-11-28  Jeffrey Stedfast  <fejj@ximian.com>
7485
7486         * pan-mime-parser.c (parser_read_until_boundary): Make sure
7487         boundary is non-NULL before calling strlen on it.
7488
7489 2001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
7490
7491         * gmime-parser.c (g_mime_parser_construct_part_internal): Fixed a
7492         bug - don't set bounds on the original stream, set the bounds on
7493         our temporary memory stream. Also got rid of find_header_end().
7494
7495         * gmime-filter-from.c (filter_filter): initialize fromcount to 0.
7496
7497 2001-11-25  Jeffrey Stedfast  <fejj@ximian.com>
7498
7499         * strlib.c (strlcpy): BSD defines the prototype as returning
7500         size_t, the strlen of the resultant string.
7501         (strlcat): Same.
7502
7503         * gmime-stream-buffer.c (stream_flush): Oops, memmove the buffer
7504         too and a smidgen of code cleanup.
7505         (stream_reset): Fix reset for block write mode.
7506
7507         * configure.in: Bumped the version to 0.7.4 and added checks for
7508         system mmap functions.
7509
7510         * gmime-stream-mmap.[c,h]: New stream that uses an mmaped buffer.
7511
7512 2001-11-24  Jeffrey Stedfast  <fejj@ximian.com>
7513
7514         * doc/gmime-docs.sgml: Added documentation of the use of filters.
7515
7516 2001-11-23  Jeffrey Stedfast  <fejj@ximian.com>
7517
7518         * gmime-stream-buffer.c (stream_seek): Implemented.
7519
7520         * gmime-parser.c (parse_content_headers): Fixed another memory
7521         leak here.
7522
7523         * gmime-param.c (decode_param_list): Fixed a small memory leak.
7524
7525 2001-11-22  Jeffrey stedfast  <fejj@ximian.com>
7526
7527         * gmime-filter-from.[c,h]: New filter to escape from-lines.
7528
7529         * pan-mime-parser.c (parser_read_until_boundary): Slight
7530         optimization.
7531
7532 2001-11-21  Jeffrey Stedfast  <fejj@ximian.com>
7533
7534         * gmime-utils.c (is_8bit_word_encoded): Make into a macro, we
7535         don't need to do a strlen because the atom is a GString which
7536         means we have it's length already. This also saves us some
7537         overhead of calling a function.
7538         (g_mime_utils_8bit_header_decode): Update to pass the len argument
7539         to is_8bit_word_encoded.
7540
7541 2001-11-18  Jeffrey Stedfast  <fejj@ximian.com>
7542
7543         * configure.in: Bumped version to 0.7.3
7544
7545         * gmime-param.c: GMimeParam is now a linked list of parameters
7546         rather than a single name/value pair.
7547         (g_mime_param_new_from_string): Now returns a parameter list based
7548         on the input string rather than only returning a single parameter
7549         name/value pair. Also updated to handle rfc2184 encoded
7550         parameters.
7551         (g_mime_param_destroy): Destroy the linked list of params.
7552         (g_mime_param_append): Append a new parameter.
7553         (g_mime_param_append_param): Append a new parameter object.
7554         (g_mime_param_write_to_string): New function (which replaces
7555         g_mime_param_to_string) which correctly encodes (either by quoting
7556         the value or rfc2184 encoding it) the list of parameters and
7557         optionally folds them suitable for header wrapping.
7558
7559         * gmime-disposition.[c,h]: New source files to handle
7560         parsing/generating Content-Disposition headers.
7561
7562         * gmime-part.c (g_mime_part_destroy): Updated to use
7563         g_mime_disposition_destroy.
7564         (g_mime_part_set_content_disposition_object): New function for
7565         setting the disposition object on a mime part.
7566         (g_mime_part_set_content_disposition): Updated to use
7567         g_mime_disposition_set.
7568         (g_mime_part_get_content_disposition): Updated to use
7569         g_mime_disposition_get.
7570         (g_mime_part_add_content_disposition_parameter): Updated to use
7571         g_mime_disposition_add_parameter.
7572         (g_mime_part_get_content_disposition_parameter): Updated to use
7573         g_mime_disposition_get_parameter.
7574         (g_mime_part_set_filename): Updated to use
7575         g_mime_disposition_add_parameter.
7576         (g_mime_part_get_filename): Updated to use
7577         g_mime_disposition_get_parameter.
7578
7579         * gmime-content-type.c (g_mime_content_type_new_from_string): Use
7580         the gmime-param code to parse any Content-Type parameters.
7581         (g_mime_content_type_destroy): Updated to use
7582         g_mime_param_destroy.
7583         (g_mime_content_type_add_parameter): Updated to use g_mime_param
7584         functions.
7585
7586         * gmime-utils.c (g_mime_utils_header_fold): Fixed a small header
7587         folding bug.
7588
7589         * gmime-parser.c (parse_content_headers): Updated to use the
7590         GMimeDisposition parser.
7591
7592         * pan-mime-parser.c (parse_content_headers): Updated to use the
7593         GMimeDisposition parser.
7594
7595 2001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
7596
7597         * configure.in: Bumped version to 0.7.2 due to the change-over to
7598         refcounted mime objects.
7599
7600         * gmime-object[c,h]: New source files that implement an abstract
7601         Object class.
7602
7603         * gmime-message.c: Updated to subclass GMimeObject
7604
7605         * gmime-part.c: Updated to subclass GMimeObject
7606         (g_mime_part_set_content_header): Set an arbitrary mime content
7607         header.
7608         (g_mime_part_get_content_header): Get an arbitrary mime content
7609         header.
7610         (g_mime_part_add_child): Finally deprecated, please use
7611         g_mime_part_add_subpart instead if you aren't already.
7612
7613         * gmime-parser.c: Updated to unref mime parts where appropriate as
7614         well as set unknown content headers on mime parts.
7615
7616         * pan-mime-parser.c: Same as gmime-parser.c
7617
7618 2001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
7619
7620         * gmime-stream-null.c (g_mime_stream_null_new): A new stream,
7621         similar to /dev/null basically.
7622
7623 2001-11-10  Jeffrey Stedfast  <fejj@ximian.com>
7624
7625         * configure.in: Added checks for strlib functions and bumped the
7626         version to 0.7.1 (there won't be an official 0.7.1 release but I
7627         figure I should be bumping version numbers whenever I add
7628         functionality).
7629
7630         * strlib.[c,h]: New string library that provides anything that the
7631         system libc doesn't (includig strnstr and stpcpy).
7632
7633         * gmime-filter-html.[c,h]: New filter that converts plain text
7634         into HTML suitable for display in things like GtkHTML (makes urls
7635         into hyperlinks and preserves whitespace and such).
7636
7637         * gmime-parser.c (g_strstrbound): Removed.
7638         (find_header_part_end): Use strnstr.
7639         (g_mime_parser_construct_part_internal): Use strnstr.
7640
7641 2001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
7642
7643         * configure.in: Updated the version to 0.7.0
7644
7645         * doc/*: Updated.
7646
7647 2001-10-25  Jeffrey Stedfast  <fejj@ximian.com>
7648
7649         * gmime-message.c (g_mime_message_new): Now takes an
7650         "init_headers" argument, it doesn't really matter what value you
7651         put here - it's more a "I want my message headers to be in a nice
7652         friendly order rather than the order they are set in".
7653
7654         * gmime-parser.c (g_mime_parser_construct_message): Use
7655         !preserve_headers as the init_headers argument to
7656         g_mime_message_new ().
7657
7658         * pan-mime-parser.c (g_mime_parser_construct_message): Same.
7659
7660 2001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
7661
7662         * pan-mime-parser.c (construct_message_headers): Use
7663         g_mime_header_add instead of g_mime_header_set so we can get
7664         multiple of the same header (such as "Received:").
7665
7666         * gmime-parser.c (construct_headers): Use g_mime_header_add
7667         instead of g_mime_header_set so we can get multiple of the same
7668         header (such as "Received:") and also move it into the switch
7669         statement into the default case.
7670
7671         * gmime-message.c (g_mime_message_set_header): New function to add
7672         a header to a message.
7673
7674         * gmime-header.c (g_mime_header_add): New function to add a
7675         header.
7676
7677         * gmime-stream.c (g_mime_stream_writev): New function to write a
7678         vector to a stream.
7679
7680 2001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
7681
7682         * pan-mime-parser.c: Updated to use g_mime_stream_buffer_readln.
7683
7684         * gmime-stream-buffer.c (g_mime_stream_buffer_readln): New
7685         convenience function to read a single line from a stream.
7686
7687 2001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
7688
7689         * gmime-part.c (g_mime_part_write_to_stream): No longer takes a
7690         'toplevel' argument.
7691         (g_mime_part_to_string): No longer takes a 'toplevel' argument.
7692
7693         * gmime-message.c (g_mime_message_write_to_stream): Write the
7694         MIME-Version header here instead of needing to pass a 'toplevel'
7695         argument to g_mime_part_write_to_stream().
7696
7697         * gmime-charset.c (g_mime_charset_init): Fix for Debian and
7698         Solaris.
7699
7700 2001-10-09  Charles Kerr <charles@rebelbase.com>
7701
7702         * gmime-filter.c (g_mime_filter_construct): make sure outptr is
7703         zeroed out before we read it in g_mime_filter_set_size().
7704
7705 2001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
7706
7707         * gmime-filter-basic.c (filter_filter): Implemented uuencoding.
7708         (filter_complete): Implemented uuencoding.
7709
7710         * gmime-utils.c (g_mime_utils_uuencode_close): New function to
7711         flush the uuencoder.
7712         (g_mime_utils_uuencode_step): New function to uuencode a block of
7713         data.
7714
7715 2001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
7716
7717         Fixes for c++ compilation
7718
7719         * gmime-stream*.c: s/template/stream_template
7720
7721         * gmime-filter*.c: s/template/filter_template
7722
7723 2001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
7724
7725         * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): If we
7726         just change the order of operations, we can get away without a
7727         second stream pointer.
7728
7729         * gmime-stream.c (g_mime_stream_substream): Revert.
7730
7731         * gmime-stream-buffer.c (stream_substream): Instead of calling
7732         g_mime_stream_substream(), call the source stream's substream
7733         method directly. I think this is the better fix for the bug
7734         Charles just fixed.
7735
7736 2001-10-04  Charles Kerr <charles@rebelbase.com>
7737
7738         * gmime-stream.c (g_mime_stream_substream): fix refcount stealth
7739         bug.  Calling this on a buffered stream wound up reffing two
7740         streams instead of one because of a nested call to
7741         g_mime_stream_substream().  This took a lot of scaffolding to
7742         find. :)
7743
7744         * gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): fix
7745         refcount paranoia bug.  ref the new *before* unreffing the old
7746         just in case new==old.
7747         
7748         * gmime-filter-basic.[ch]: fix some compiler warnings that I
7749         introduced yesterday.  (Strange how the same version of gcc finds
7750         different warnings on different platforms.)
7751
7752 2001-10-03  Charles Kerr <charles@rebelbase.com>
7753
7754         * gmime-part.c (g_mime_part_get_content): bugfix for when getting
7755         the content from a stream-mem.  We were just returning the
7756         stream-mem's gbytearray buffer, but we need to check against the
7757         stream's bounds.
7758
7759         * gmime-filter-basic.[ch]: added support for decoding a uuencoded
7760         stream; added a placeholder for uuencoding a stream.
7761
7762         * md5-utils.c: commented out d(x) macro.
7763
7764 2001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
7765
7766         * gmime-stream-buffer.h: buflen should be an ssize_t not a
7767         size_t. Thanks to Charles for catching this.
7768
7769 2001-10-01  Charles Kerr <charles@rebelbase.com>
7770
7771         * gmime-filter.c: include <string.h> to pick up memcpy prototype.
7772         * gmime-stream-mem.c: same.
7773         * gmime-stream-buffer.c: same.
7774         * gmime-stream-filter.c: same.
7775
7776         * gmime-stream-mem.c (stream_flush): added a retval of 0.
7777
7778         * gmime-filter-crlf.h (g_mime_filter_crlf_new_type): renamed
7779         prototype as g_mime_filter_crlf_new to sync with .c
7780
7781         * gmime-part.h: added g_mime_part_set_content_object() prototype.
7782
7783         * gmime-content-type.h: Replaced <> with "" in #include
7784         <gmime-param.h>
7785
7786         * pan-mime-parser.c: added #include gmime-stream-buffer.h to pick
7787         up prototype for g_mime_stream_buffer_gets.
7788         (g_strstrbound): removed unused func.
7789
7790         * gmime-utils.c: on calls to ctype functions, explicitly upcast
7791         the char arguments as ints to shut up gcc warnings on Solaris.
7792         * gmime-param.c: same.
7793
7794 2001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
7795
7796         * pan-mime-parser.c: New parser (with exactly the same API as
7797         gmime-parser.c) that is meant to parse MIME objects without
7798         needing them to be memory mapped. Quite a bit slower on average,
7799         but is vastly sped up by using a GMimeStreamBuffer in BLOCK_READ
7800         mode.
7801
7802         * gmime-stream-buffer.c (stream_write): Incremement the stream
7803         position by the number of bytes we wrote.
7804         (stream_tell): Return stream->position.
7805         (stream_substream): Just return a substream of our source stream.
7806         (g_mime_stream_buffer_gets): Increment the stream position by the
7807         number of bytes read if and only if we are operating on a buffered
7808         stream.
7809
7810 2001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
7811
7812         * gmime-stream-file.c (stream_tell): Return stream->position here
7813         too.
7814
7815         * gmime-part.c (g_mime_part_set_pre_encoded_content): Don't decode
7816         into a stream and then set the data wrapper encoding to the
7817         incoming encoding type, instead use filters to decode into the
7818         stream and set the data wrapper encoding to the default.
7819
7820         * gmime-stream.c (g_mime_stream_set_bounds): Don't set the
7821         position equal to end if end == -1.
7822
7823         * gmime-parser.c (g_mime_parser_construct_message): Use the stream
7824         functions to find the beginning and end of the stream rather than
7825         breaking abstractions. Also reset the mem stream after writing to
7826         it.
7827         (g_mime_parser_construct_part): Reset the mem stream here too.
7828         (g_mime_parser_construct_part_internal): Use the stream interfaces
7829         to get the position instead of breaking abstractions.
7830
7831         * gmime-stream-fs.c (stream_tell): Return stream->position.
7832
7833         * gmime-stream-mem.c (stream_seek): Return the new syteam
7834         position.
7835         (stream_tell): Return stream->position.
7836
7837 2001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
7838
7839         * doc/gmime-docs.sgml: Documented streams.
7840
7841         * gmime-stream-fs.c (stream_write): Seek to the position we think
7842         we're at before attempting to write, and increment the stream
7843         position after the write.
7844
7845         * gmime-stream-file.c (stream_write): Seek to the position we
7846         think we're at... this is just in case we are or have substreams
7847         that might have read or written in the meantime. Also remember to
7848         increment the stream position after the write.
7849         (stream_eos): Only return feof() if our end boundary is unlimited.
7850
7851         * gmime-stream-mem.c (stream_write): Start writing data at
7852         stream->position rather than always appending it to the end of the
7853         mem stream. Also don't go writing past the end boundary if it's
7854         set.
7855         (stream_length): Use a relative bound_end.
7856         (stream_seek): Same.
7857         (stream_eos): Here too.
7858         (stream_write): And here.
7859         (stream_read): And here.
7860         (stream_substream): Correctly set the bounds.
7861         (g_mime_stream_mem_new): Here too.
7862         (g_mime_stream_mem_new_with_byte_array): And here.
7863         (g_mime_stream_mem_new_with_buffer): Same.
7864         (g_mime_stream_mem_set_byte_array): And finally here.
7865
7866 2001-09-22  Jeffrey Stedfast  <fejj@ximian.com>
7867
7868         * test-streams.c: New test suite for streams.
7869
7870         * gmime-stream-buffer.c (stream_read): Fixed some logic bugs
7871         (including forgetting a break statement at the end of a case).
7872         (g_mime_stream_buffer_gets): Fixed some logic bugs.
7873
7874         * gmime-stream-mem.c (stream_read): Fixed logic error.
7875
7876 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
7877
7878         * gmime-stream-buffer.c (g_mime_stream_buffer_gets): Implemented.
7879         (stream_reset): Implemented.
7880         (stream_eos): Implemented.
7881         (stream_write): Reimplemented.
7882         (stream_read): Reimplemented.
7883
7884 2001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
7885
7886         * gmime-stream-buffer.[c,h]: New stream that buffers reads or
7887         writes to/from another stream. Will also implement a gets() method
7888         for Charles.
7889
7890 2001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
7891
7892         * gmime-stream-mem.c (stream_eos): Check for position >= instead
7893         of == bound_end
7894
7895         * gmime-stream.c (g_mime_stream_eos): Do some simple bounds
7896         checking.
7897
7898         * doc/*: Updated.
7899
7900         * gmime-part.c (g_mime_part_get_content_object): Added.
7901
7902 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
7903
7904         * gmime-stream-fs.c (stream_seek): Improve.
7905
7906         * gmime-stream-file.c (stream_reset): Oops, reset the position
7907         pointer on a successful reset.
7908         (stream_seek): Fixed.
7909
7910 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
7911
7912         * gmime-stream-fs.c (stream_reset): Reset the position offset. Doh!
7913
7914         * gmime-stream.c (g_mime_stream_write_to_stream): Don't increment
7915         total if no bytes were read/written.
7916
7917         * gmime-stream-filter.c (stream_substream): Copy over the filters.
7918
7919         * gmime-part.c (g_mime_part_verify_content_md5): Updated.
7920         (g_mime_part_set_content_md5): Updated.
7921         (g_mime_part_get_content): Updated.
7922         (write_content): Updated.
7923
7924         * gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
7925         Implemented.
7926
7927         * gmime-filter-basic.[c,h]: A basic filter that does Base64 and QP
7928         encoding/decoding.
7929
7930         * gmime-filter-crlf.[c,h]: A simple filter that does crlf(/dot)
7931         encoding/decoding.
7932
7933 2001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
7934
7935         * gmime-data-wrapper.c (g_mime_data_wrapper_new_with_stream): Ref
7936         the stream.
7937         (g_mime_data_wrapper_set_stream): Same.
7938         (g_mime_data_wrapper_get_stream): Return the internal stream.
7939         (g_mime_data_wrapper_get_encoding): Return the internal stream's
7940         encoding.
7941         (g_mime_data_wrapper_write_to_stream): Not-yet-implemented.
7942
7943         * gmime-filter.[c,h]: Abstract class for filters.
7944
7945         * gmime-stream-filter.[c,h]: Abstract stream for filtering.
7946
7947         * gmime-part.c (g_mime_part_set_content): Updated for data-wrapper
7948         changes.
7949         (g_mime_part_set_content_byte_array): Same.
7950         (g_mime_part_set_pre_encoded_content): And here.
7951         (g_mime_part_get_content): And here too.
7952
7953         * gmime-parser.c (g_mime_parser_construct_part_internal): Fix
7954         offset calculations.
7955         (g_mime_parser_construct_part_internal): Updated for data-wrapper
7956         changes.
7957
7958 2001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
7959
7960         * test-parser.c (test_parser): Updated.
7961
7962         * test-mime.c (test_parser): Updated.
7963
7964         * gmime-utils.h: Move the GMimePartEncodingType enum here.
7965
7966         * gmime-stream-fs.[c,h]: Implemented.
7967
7968         * gmime-stream.c (g_mime_stream_construct): New function to
7969         initialize the stream data members.
7970         (g_mime_stream_substream): New function to get a substream of
7971         another stream.
7972         (g_mime_stream_unref): If the stream is actually a substream,
7973         unref it's "super" stream if we are destroying the substream.
7974
7975         * gmime-stream-mem.c (stream_substream): Implemented.
7976         (g_mime_stream_mem_new): Updated to use g_mime_stream_construct().
7977         (g_mime_stream_mem_new_with_byte_array): Same.
7978         (g_mime_stream_mem_new_with_buffer): And here too.
7979
7980         * gmime-stream-file.c (stream_substream): Implemented.
7981         (g_mime_stream_file_new): Updated to use
7982         g_mime_stream_construct().
7983         (g_mime_stream_file_new_with_bounds): Same.
7984
7985         * gmime-part.c (g_mime_part_set_content_md5): Updated to use
7986         streams.
7987         (g_mime_part_verify_content_md5): Same.
7988         (g_mime_part_set_content): Updated to use streams and data
7989         wrappers.
7990         (g_mime_part_set_content_byte_array): Same.
7991         (g_mime_part_set_pre_encoded_content): And here.
7992         (g_mime_part_set_content_object): New function that allows one to
7993         set the content object of a MIME part.
7994         (g_mime_part_get_content): Updated to use streams.
7995         (write_content): Same.
7996         (g_mime_part_write_to_stream): Replacement for
7997         g_mime_part_write_to_string().
7998         (g_mime_part_to_string): Updated to use
7999         g_mime_part_write_to_stream().
8000         (g_mime_part_destroy): Updated to destroy the content object
8001         rather than destroying a GByteArray (since we longer use a
8002         GByteArray for the content data).
8003
8004         * gmime-parser.c (g_mime_parser_construct_message): Now takes a
8005         stream argument instead of a string.
8006         (g_mime_parser_construct_message_from_file): Deprecated.
8007         (g_mime_parser_construct_part): Also takes a stream now.
8008
8009         * gmime-message.c (g_mime_message_write_to_stream): Replacement
8010         for g_mime_message_write_to_string().
8011         (g_mime_message_to_string): Updated.
8012
8013         * gmime-header.c (g_mime_header_write_to_stream): Replacement for
8014         g_mime_header_write_to_string().
8015         (g_mime_header_to_string): Updated.
8016
8017 2001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
8018
8019         * gmime-stream.[c,h]: Abstract stream class.
8020
8021         * gmime-stream-mem.[c,h]: Memory stream.
8022
8023         * gmime-stream-file.[c,h]: File stream.
8024
8025         * gmime-data-wrapper.[c,h]: Data wrapper class. Will be used as
8026         the content object in MIME parts.
8027
8028 2001-08-23  Jeffrey Stedfast  <fejj@ximian.com>
8029
8030         * gmime-utils.c (encode_8bit_word): Oops. Add the closing ? char.
8031         (g_mime_utils_8bit_header_encode): Oops. Make sure we encode *all*
8032         lwsp chars.
8033         (g_mime_utils_8bit_header_decode): Slightly better fix for the
8034         other day.
8035
8036 2001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
8037
8038         * doc/*: Updated.
8039
8040 2001-08-18  Jeffrey Stedfast  <fejj@ximian.com>
8041
8042         * Makefile.am: Added gmime-charset.[c,h] to the build.
8043
8044         * gmime-charset.[c,h]: New source files for managing charset
8045         related issues.
8046         (g_mime_charset_init): New function to retrieve the user's locale
8047         information for later use with gmime_charset_locale_name.
8048         (g_mime_charset_locale_name): New function to return user's
8049         locale.
8050
8051         * gmime-utils.c (g_mime_utils_8bit_header_decode): linear
8052         whitespace isn't the only thing that can delimit atoms.
8053         (get_codeset): Removed in favor of the new gmime-charset
8054         functions.
8055         (g_mime_utils_8bit_header_encode): Use g_mime_charset_locale_name.
8056         (encode_8bit_word): And here too.
8057
8058 2001-08-15  Jeffrey Stedfast  <fejj@ximian.com>
8059
8060         * internet-address.c (decode_mailbox): When returning due to a
8061         missing local part, make sure to set *in to inptr.
8062
8063 2001-08-13  Charles Kerr <charles@rebelbase.com>
8064
8065         * gmime-utils.c (encode_8bit_word): query nl_langinfo for the
8066         codeset instead of just assuming iso-8859-1.  Thanks to Volodymyr
8067         M . Lisivka <lvm@mystery.lviv.net> for suggesting this patch.
8068
8069         * gmime-utils.c (g_mime_utils_8bit_header_encode): same.
8070
8071         * gmime-parser.c (find_header_part_end): new utility function to
8072         find the dividing line between body & header.
8073         (g_mime_parser_construct_part): sync.
8074         (g_mime_parser_construct_message): sync.
8075
8076         * gmime-parser.c (get_header_block): remove unused func.
8077         (rfc822_headers): remove unused static array.
8078
8079 2001-07-02  Jeffrey Stedfast  <fejj@ximian.com>
8080
8081         * zentimer.h: Added. Provides some timing macros for performace
8082         testing.
8083
8084         * zenprofiler.h: Added. Extends zentimer.h as a simple profiler
8085         that gives nice printouts.
8086
8087         * test-parser.c: Use zentimer.h
8088
8089 2001-06-23  Jeffrey Stedfast  <fejj@ximian.com>
8090
8091         * gmime-header.c (g_mime_header_remove): New function.
8092         (g_mime_header_set): Setting header to NULL no longer removes the
8093         header. Use g_mime_header_remove instead.
8094
8095         * gmime-message.c (g_mime_message_write_to_string): No longer have
8096         to sync the headers.
8097         (g_mime_message_get_headers): Same.
8098         (g_mime_message_set_sender): sync the From header.
8099         (g_mime_message_set_reply_to): Sync the Reply-To header.
8100         (g_mime_message_add_recipient): Sync the recipient header.
8101         (g_mime_message_add_recipients_from_string): Same.
8102         (g_mime_message_set_subject): Sync the Subject header.
8103         (g_mime_message_set_date): Sync the date header.
8104         (g_mime_message_set_message_id): Sync the Message-Id header.
8105
8106 2001-06-03  Jeffrey Stedfast  <fejj@ximian.com>
8107
8108         * gmime-utils.c (quoted_encode): Minor cleanup.
8109
8110 2001-06-02  Jeffrey Stedfast  <fejj@ximian.com>
8111
8112         * gmime-message.c (sync_headers): Oops. Don't place "Cc:" in the
8113         header value string :-)
8114
8115 2001-03-31  Charles Kerr <charles@rebelbase.com>
8116
8117         * gmime-utils.c (g_mime_utils_8bit_header_decode): big speedups.
8118
8119         * gmime-utils.c (g_mime_utils_8bit_header_encode): small speedups.
8120
8121 2001-05-29  Jeffrey Stedfast  <fejj@ximian.com>
8122
8123         * internet-address.c (decode_mailbox): Oops, test to make sure we
8124         won't be running past the end of the buffer when considering a
8125         retry. Thanks to Charles Kerr for this fix.
8126
8127 2001-03-29  Charles Kerr <charles@rebelbase.com>
8128
8129         * gmime-part.c (g_mime_part_append_pre_encoded_content): fix small
8130         bug that crept into the last commit.
8131
8132 2001-05-29  Jeffrey Stedfast  <fejj@ximian.com>
8133
8134         Fixes on behalf of Charles Kerr of Pan fame:
8135         
8136         * gmime-parser.c (g_mime_parser_construct_part_from_file):
8137         Use g_mime_part_append_pre_encoded_content().
8138
8139         * gmime-part.c (g_mime_part_append_pre_encoded_content): New
8140         function so that the FILE parser doesn't need to manage it's own
8141         content array.
8142
8143         * gmime-header.[c,h]: const'ify.
8144         (g_mime_header_foreach): New function to call a chosen function
8145         for each header in the header object.
8146
8147 2001-05-26  Jeffrey Stedfast  <fejj@ximian.com>
8148
8149         * configure.in: Updated version to 0.6.0.
8150
8151         * README: Updated version to 0.6.0.
8152
8153         * doc/*: Updated again.
8154
8155         * gmime-header.c (g_mime_header_to_string): New function - mostly
8156         for the sake of keeping with the API of the rest of GMime.
8157         (g_mime_header_set): Make sure to always encode the header value
8158         before we set it.
8159
8160         * gmime-part.c (g_mime_part_write_to_string): New function to
8161         write the mime part to a GString.
8162         (g_mime_part_to_string): Use g_mime_part_write_to_string.
8163
8164         * gmime-message.c (g_mime_message_get_headers): Use the new
8165         g_mime_header_to_string function.
8166         (g_mime_message_write_to_string): New function to write the
8167         message to a GString.
8168         (g_mime_message_to_string): Use write_to_string.
8169
8170 2001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
8171
8172         * doc/*: Updated.
8173
8174         * Makefile.am: Add gmime-header.[c,h] to the build.
8175
8176         * gmime-parser.c: Numerous changes to use gmime-header.
8177
8178         * gmime-message.c: Numerous changes to use gmime-header.
8179         (g_mime_message_add_arbitrary_header): Removed.
8180         (g_mime_message_set_header): The replacement for
8181         add_arbitrary_header.
8182         (g_mime_message_get_header): New function to get a header.
8183
8184         * gmime-header.[c,h]: New source fies to handle the complicated
8185         nature of setting/getting header pairs.
8186
8187 2001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
8188
8189         * doc/*: Updated.
8190
8191         * doc/Makefile.am: Use $(INSTALL) and $(INSTALL_DATA) rather than
8192         `install -m 644`
8193
8194         * alloca.c: New file for systems that do not have alloca().
8195
8196         * Makefile.am: build alloca.c
8197
8198         * gmime-utils.c: Don't #include <alloca.h> - this is now handled
8199         by config.h.
8200
8201         * config.h.in: Added alloca define checks.
8202
8203         * acconfig.h: Remove some extra defines that we don't care about.
8204
8205 2001-05-20  Jeffrey Stedfast  <fejj@ximian.com>
8206
8207         * gmime-parser.c (parse_content_headers): Simplified and also
8208         unfolded content-headers.
8209
8210         * gmime-part.c (g_mime_part_get_filename): If there isn't a
8211         disposition, make sure that we don't ignore the possibility of a
8212         "name" param in the Content-Type header.
8213
8214 2001-05-12  Jeffrey Stedfast  <fejj@ximian.com>
8215
8216         * gmime-utils.c (need_quotes): Include '.' as a char to quote.
8217
8218         * gen-table.c (main): Fixed a type-o.
8219
8220         * internet-address.c (decode_mailbox): Be a little more forgiving
8221         about unexpected chars while parsing the name part of the email
8222         address. Skip the bad char and then retry. If we fail again,
8223         *then* we abort.
8224
8225         * gmime-utils.c: #include <alloca.h>
8226
8227         * gmime-parser.c (g_mime_parser_construct_part): Oops, inend
8228         points to the end of the string, not the last char of the string
8229         (ie, '\0' not the char before it).
8230
8231 2001-05-08  Jeffrey Stedfast  <fejj@ximian.com>
8232
8233         * gmime-table-private.h: Oops, take out the check for isblank().
8234
8235         * internet-address.c (decode_quoted_string): Get rid of unused
8236         variable.
8237         (decode_address): Same.
8238
8239 2001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
8240
8241         * internet-address.c (decode_domain): Try to only get
8242         "fully-qualified" domain names, or ones that "look" like they are
8243         at least ;-)
8244         (decode_mailbox): If decode_domain() returns NULL, don't append
8245         the '@' char. Also make sure that the name is non-empty.
8246
8247 2001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
8248
8249         * gmime-utils.c (g_mime_utils_quote_string): Made smarter.
8250
8251 2001-03-31  Jeffrey Stedfast  <fejj@ximian.com>
8252
8253         * Makefile.am: Added rules to build gen-table.c and added
8254         gmime-table-private.h to the build.
8255
8256         * gen-table.c: New file to generate gmime-table-private.h if need
8257         be.
8258
8259         * gmime-table-private.h: New file that contains
8260         gmime_special_table.
8261
8262         * gmime-utils.c: Remove the gmime_special_table from here and
8263         instead #include gmime-table-private.h.
8264
8265         * internet-address.c: #include gmime-table-private.h
8266
8267 2001-03-30  Jeffrey Stedfast  <fejj@ximian.com>
8268
8269         * gmime-message.c (create_header): Simplified a tad.
8270         (g_mime_message_add_recipient): Updated for the new
8271         InternetAddress API.
8272         (g_mime_message_add_recipients_from_string): Simplified greatly
8273         using the new InternetAddress API.
8274
8275         * internet-address.[c,h]: Completely rewritten to be a lot more
8276         rfc0822 compliant.
8277
8278 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
8279
8280         * README, configure.in: Updated version to 0.5.0
8281
8282 2001-03-29  Charles Kerr <charles@rebelbase.com>
8283
8284         * gmime-parser.c (g_mime_parser_construct_message_from_file): new
8285         function to read a message from a FILE* instead of a character
8286         array.  This can be used to reduce the memory requirements of very
8287         large messages.
8288
8289         * gmime-parser.c (get_next_line): new internal function.
8290         * gmime-parser.c (g_mime_parser_construct_part_from_file): same.
8291         * gmime-parser.c (parse_content_headers): same.
8292         * gmime-parser.c (find_header_end): same.
8293         * gmime-parser.c (get_header_block): same.
8294         * gmime-parser.c (get_header_block_from_file): same.
8295
8296 2001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
8297
8298         * gmime-utils.c (get_time): Fix a compile warning.
8299
8300 2001-03-20  Charles Kerr <charles@rebelbase.com>
8301
8302         * gmime-utils.c (get_year): constify the argument list.
8303         * gmime-utils.c (get_time): same.
8304
8305         * gmime-utils.c (get_days_in_month): if #0'ed out unused code.
8306         * gmime-utils.c (parse_broken_date): same.
8307
8308 2001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
8309
8310         * internet-address.c (internet_address_new_from_string): Try to be
8311         a little better about extracting the name, not 100% accurate but
8312         better I guess.
8313
8314 2001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
8315
8316         * gmime-part.c (g_mime_part_get_content_disposition_parameter):
8317         It's okay to have a NULL disposition or a NULL param hash.
8318         (g_mime_part_get_filename): Same.
8319         (g_mime_part_get_content): It's okay not to have content.
8320
8321 2001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
8322
8323         * gmime-utils.c (quoted_decode): Fix a possible buffer overrun.
8324
8325 2001-02-27  Jeffrey Stedfast  <fejj@ximian.com>
8326
8327         * gmime-utils.c (parse_rfc822_date): Allow for time token to not
8328         have a seconds field.
8329
8330 2001-02-11  Jeffrey Stedfast  <fejj@ximian.com>
8331
8332         * gmime-part.c (g_mime_part_to_string): Oops. Don't init
8333         content_md5 with the content location string ;-)
8334
8335         * gmime-parser.c (g_mime_parser_construct_part): Init content to
8336         NULL to get rid of a warning (this doesn't really matter as 'len'
8337         was init'd to 0)
8338
8339         * gmime-part.c: #include unistd.h
8340
8341 2001-01-27  Jeffrey Stedfast  <fejj@helixcode.com>
8342
8343         * gmime-part.c (g_mime_part_set_content_byte_array): So
8344         set_content_array() was no good. After inspecting glib it was
8345         discovered that there are hidden data members of a GByteArray that
8346         hold info like if the data is NUL terminated, how much data is
8347         allocated, etc.
8348
8349 2001-01-26  Charles Kerr <charles@superpimp.org>
8350
8351         * gmime-part.c (g_mime_part_set_content_array): new function.
8352
8353 2001-01-25  Charles Kerr <charles@superpimp.org>
8354
8355         * gmime-part.c (g_mime_part_destroy): fix memory leak - the
8356         disposition wasn't being g_free()d.
8357
8358 2001-01-24  Charles Kerr <charles@superpimp.org>
8359
8360         * gmime-part.c (g_mime_part_get_filename): Now takes a const
8361         GMimePart.
8362
8363 2001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
8364
8365         * internet-address.c (encoded_name): Updated.
8366
8367         * gmime-part.c (g_mime_part_set_pre_encoded_content): Updated to
8368         reflect changes to gmime-utils.
8369
8370         * gmime-utils.c (g_mime_utils_text_is_8bit): Take a len argument.
8371         (g_mime_utils_best_encoding): Same.
8372         (encode_8bit_word): Updated.
8373
8374 2001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
8375
8376         * gmime-parser.c (g_mime_parser_construct_part): Check for NULL
8377         returns from g_strstrbound.
8378
8379 2001-01-11  Charles Kerr <charles@superpimp.org>
8380
8381         * gmime-utils.c (get_year): small patch to handle 2-digit year
8382         representation a little better -- "71" now translates to 1971,
8383         but "01" now translates to 2001.  Thanks to Ihar Viarheichyk for
8384         suggesting this change.
8385
8386 2001-01-07  Jeffrey Stedfast  <fejj@helixcode.com>
8387
8388         * gmime-part.c (g_mime_part_set_content_md5): Don't allow the
8389         setting of Content-MD5 headers for multipart/* and message/rfc822
8390         types.
8391
8392         * rfc/rfc1864.txt: Added (Content-MD5 RFC).
8393
8394 2001-01-05  Jeffrey Stedfast  <fejj@helixcode.com>
8395
8396         * gmime-part.c (g_mime_part_set_content_md5): Oops, didn't quite
8397         do this right. It should be correct now.
8398         (g_mime_part_verify_content_md5): New function to verify the
8399         Content-MD5.
8400
8401 2001-01-04  Jeffrey Stedfast  <fejj@helixcode.com>
8402
8403         * gmime-parser.c (g_mime_parser_construct_part): Added support for
8404         parsing Content-Location and Content-Md5 headers. Trim excess
8405         trailing \n's. Also fix a bug where the end boundary would get
8406         included as part of the last MIME Part's contents.
8407         (g_strstrbound): Bounded strstr.
8408
8409         * configure.in:
8410         * README: Updated version to 0.4.0
8411
8412         * Makefile.am: Added md5-utils to the build.
8413
8414         * md5-utils.[c,h]: Added.
8415
8416         * gmime-part.c (g_mime_part_to_string): Slightly new
8417         implementation. Also added in support for Content-Location and
8418         Content-Md5 headers.
8419         (g_mime_part_destroy): Return if the mime part is
8420         NULL. Also free the new content_location and content_md5 headers.
8421         (g_mime_part_set_content_md5): Implemented.
8422         (g_mime_part_get_content_md5): Implemented.
8423         (g_mime_part_set_content_location): Implemented.
8424         (g_mime_part_get_content_location): Implemented.
8425         (get_content_type): Append a '\n'.
8426
8427 2001-01-01  Jeffrey Stedfast  <fejj@helixcode.com>
8428
8429         * doc/gmime-sections.txt: Updated.
8430
8431         * doc/sgml/*: Updated.
8432
8433         * doc/html/*: Updated.
8434
8435 2000-12-24  Jeffrey Stedfast  <fejj@helixcode.com>
8436
8437         * gmime-parser.c (g_mime_parser_construct_part): Don't set the
8438         boundary if we are able to get the boundary from the content-type
8439         because we'll just set the same data over again which is a
8440         waste. Also tack a \n onto the ends of the boundary markers so
8441         that "blah_" and "blah_D" don't trick the parser. Fix it so that
8442         an empty part won't set any contents (since setting a 0-length
8443         content stream causes a segfault).
8444         (construct_headers): Take an inlen argument so that we can parse
8445         headers without needing to strdup before passing into this
8446         function.
8447         (g_mime_parser_construct_message): Don't strdup the headers since
8448         we can just pass in the length to the construct_headers() function
8449         now.
8450
8451 2000-12-18  Jeffrey Stedfast  <fejj@helixcode.com>
8452
8453         * gmime-parser.c (g_mime_parser_construct_part): Moved from being
8454         an internal-only function.
8455
8456 2000-12-28  Charles Kerr <charles@superpimp.org>
8457
8458         * gmime-utils.c (g_mime_utils_text_is_8bit): gracefully handle
8459         a NULL pointer being passed in.  Thanks to Christophe Lambin for
8460         reporting this problem.
8461
8462 2000-12-14  Charles Kerr <charles@superpimp.org>
8463
8464         * gmime-messge.c (g_mime_message_get_message_id):  change
8465         g_return_if_fail() to g_return_val_if_fail() to ensure that
8466         a value is always returned.
8467
8468         * gmime-part.h (g_mime_part_get_content_description): make
8469         the GMimePart argument const.
8470         * gmime-part.h (g_mime_part_get_content): same.
8471
8472         * test-mime.c (test_addresses): fix bad printf statement.
8473
8474         * test-parser.c (test_parser): fixed the printf type of a time_t
8475         from an int to unsigned long to avoid compiler warnings.
8476
8477 2000-12-13  Jeffrey Stedfast  <fejj@helixcode.com>
8478
8479         * doc/sgml/*:
8480         * doc/html/*:
8481         * doc/gmime-sections.txt: Updated.
8482
8483         * README: Updated version line to 0.3.0
8484
8485 2000-12-12  Jeffrey Stedfast  <fejj@helixcode.com>
8486
8487         * gmime-part.c (g_mime_part_to_string): Wrap some content-*
8488         headers that might sometimes be long.
8489
8490         * gmime-message.c (create_header): Updated to reflect function
8491         name changes/moves.
8492
8493         * gmime-utils.c (g_mime_utils_header_printf): Moved here from
8494         gmime-message.c and slightly renamed ;-)
8495         (g_mime_utils_header_fold): Moved from being private to being
8496         public.
8497
8498 2000-12-12  Jeffrey Stedfast  <fejj@helixcode.com>
8499
8500         * gmime-part.c: Hmmm, why weren't multiparts using the internal
8501         get_content_type function rather than ...content_type_to_string?
8502         Possible FIXME: Should content_type_to_string do what
8503         get_content_type does? or should it remain untouched and just
8504         return "type/subtype"?
8505
8506         * gmime-part.h: No more boundary data member.
8507
8508         * gmime-part.c (g_mime_part_get_boundary): Updated, as we no
8509         longer store the boundary on the MIME Part and instead only on the
8510         content-type (where it belongs).
8511         (g_mime_part_set_boundary): And here too.
8512         (g_mime_part_destroy): No longer need to destroy the boundary.
8513
8514 2000-12-11  Jeffrey Stedfast  <fejj@helixcode.com>
8515
8516         * gmime-part.c (g_mime_part_get_subpart_from_content_id): Erm,
8517         smack me. This needs to be recursive (this is what happens when I
8518         code really late at night).
8519
8520 2000-12-11  Jeffrey Stedfast  <fejj@helixcode.com>
8521
8522         * configure.in (GMIME_MINOR_VERSION): Updated to 0.3.0
8523
8524         * gmime-parser.c (get_mime_part): Updated to reflect the
8525         add_subpart API change.
8526
8527         * test-mime.c (test_multipart): And here too.
8528
8529         * gmime-part.h (g_mime_part_add_child): Macro added for backward
8530         source compatability.
8531
8532         * gmime-part.c (g_mime_part_get_subpart_from_content_id): Renamed
8533         from g_mime_part_get_child_from_content_id as I think I'm gonna
8534         start calling them subparts in the API as it's a bit clearer than
8535         calling them children. Also fixed up some of the logic (what if
8536         the parent mime part had a content-id? The way the code was before
8537         it'd never search the subparts). Oh, it also returns const now.
8538         (g_mime_part_add_subpart): Renamed from g_mime_part_add_child and
8539         also now does some error checking to make sure the parent part is
8540         a multipart.
8541
8542 2000-12-10  Charles Kerr <charles@superpimp.org>
8543
8544         * gmime-part.c (g_mime_part_get_child_by_content_id): new
8545         utility function.
8546
8547 2000-12-09  Jeffrey Stedfast  <fejj@helixcode.com>
8548
8549         * gmime-part.c (g_mime_part_set_boundary): Generate a random
8550         boundary if passed boundary is NULL.
8551
8552 2000-12-07  Jeffrey Stedfast  <fejj@helixcode.com>
8553
8554         * gmime-message.c (multipart_get_body): Traverses a MIME Part and
8555         'always' extracts the body assuming it exists. Extracts the
8556         preffered text type if it exists, otherwise returns the type less
8557         preferred.
8558         (g_mime_message_get_body): Use multipart_get_body if the toplevel
8559         part is a multipart.
8560
8561 2000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
8562
8563         * README: Updated with more RFCs, etc.
8564
8565         * rfc/* Added a bunch more rfcs of interest.
8566
8567 2000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
8568
8569         * test-mime.c: Added test code for the address parser.
8570
8571         * gmime-utils.c (g_mime_utils_quoted_encode_step): Updated. No
8572         longer need to special-case whitespace chars as they have been put
8573         into the gmime_special_table (a while ago).
8574
8575 2000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
8576
8577         * Makefile.am: Install gmime.m4
8578
8579         * gmime.m4: Added.
8580
8581 2000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
8582
8583         * gmime-part.c (g_mime_part_foreach): New convenience function for
8584         manipulating each subpart of a mime part.
8585
8586         * gmime-message.c (g_mime_message_foreach_part): New convenience
8587         function for manipulating all mime parts of a message.
8588
8589 2000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
8590
8591         * doc/sgml/*:
8592         * doc/html/*: Updated.
8593
8594         * doc/gmime-sections.txt: Add g_mime_message_[g,s]et_message_id.
8595
8596         * gmime-parser.c (construct_headers): Parse out Message-Id
8597         headers.
8598
8599         * gmime-message.c (g_mime_message_destroy): Free the message id.
8600         (g_mime_message_set_message_id): New function to set the message
8601         id on a message.
8602         (g_mime_message_set_message_id): New accessor function for
8603         message-ids.
8604         (create_header): Write out the Message-Id if and only if it
8605         exists.
8606
8607 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
8608
8609         * README: Updated.
8610
8611         * doc/gmime-sections.txt: Added new functions.
8612
8613         * doc/html/*: Updated.
8614
8615 2000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
8616
8617         * configure.in: Bumped the version to 0.2.0 because the API has
8618         changed a bit.
8619
8620         * test-parser.c:
8621         * test-mime.c: Updated.
8622
8623         * gmime-utils.c (BASE64_ENCODE_LEN):
8624         (QP_ENCODE_LEN): Macros for determining how much space we need to
8625         encode a chunk of data to that encoding (estimate is liberal).
8626         (encode_8bit_word): Use the macros to determine the length we
8627         need.
8628
8629         * gmime-message.c (g_mime_message_get_body): Updated to reflect
8630         changes to gmime-part.
8631
8632         * gmime-parser.c (get_mime_part): Updated.
8633
8634         * gmime-part.c (g_mime_part_set_content): Now takes a len argument
8635         and has been updated to reflect the move to GByteArray.
8636         (g_mime_part_destroy): Updated.
8637         (g_mime_part_set_pre_encoded_content): New convenience function to
8638         decode pre-encoded content and set it on the mime part.
8639         (g_mime_part_get_content): Renamed from
8640         g_mime_part_decode_contents.
8641
8642         * gmime-part.h: GMimePart->content is now a GByteArray that will
8643         hold the raw content (in it's unencoded form).
8644
8645 2000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
8646
8647         * gmime-content-type.c (g_mime_content_type_new_from_string):
8648         Ignore extranious semicolons between parameters. Handle the event
8649         where the content-type doesn't specify a subtype (this is broken
8650         but some mailers will send "Content-Type: text" for example).
8651         (g_mime_content_type_new): If there isn't a type or subtype, print
8652         a warning and try to do some smart defaulting action.
8653
8654         * gmime-message.c (handle_multipart_alternative): Only remember
8655         the last subpart if it was a text part.
8656
8657 2000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
8658
8659         * doc/html/*:
8660         * doc/sgml/*: Updated.
8661
8662         * test-mime.c: Updated.
8663
8664         * gmime-utils.c (g_mime_utils_quote_string): Do the detection on
8665         whether or not to wrap the string in quotes here rather than
8666         requiring a boolean argument specifying whether the string should
8667         be quoted. RFC2045 provides us with a list of characters that are
8668         not safe.
8669
8670         * gmime-param.c (g_mime_param_to_string): Updated to reflect
8671         changes to g_mime_utils_quote_string. This function is the main
8672         reason for the change - parameter values should really only be
8673         quoted if they have to be else they should remain unquoted.
8674
8675         * internet-address.c (encoded_name): Updated to reflect changes to
8676         g_mime_utils_quote_string.
8677
8678 2000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
8679
8680         * TODO: Updated.
8681
8682         * gmime-utils.c: Updated gmime_special_table.
8683         (g_mime_utils_8bit_header_encode): Since rfc2047 states that all
8684         whitespace between encoded atoms must be ignored, the encoder
8685         should therefor make an effort to encode whitespace when it falls
8686         between two atoms that will be encoded. Use the IS_ESAFE mask.
8687         (quoted_encode): Now takes a safemask argument to specify which
8688         chars are safe to leave unencoded and also a arg to save whether
8689         or not the word was encoded.
8690         (g_mime_utils_8bit_header_encode_phrase): Updated to use the
8691         IS_PSAFE mask.
8692
8693 2000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
8694
8695         * gmime-parser.c (header_unfold): New function to unfold a header
8696         (to be used internally).
8697         (construct_headers): Unfold headers as we parse them.
8698
8699         * configure.in: Changed version to 0.1.1.
8700
8701         * gmime-part.c (get_content_disposition): Append a ";" before
8702         appending any parameters even when there is no disposition
8703         text. Also only enter into the param loop if there exist params.
8704
8705 2000-11-16  Jeffrey Stedfast  <fejj@helixcode.com>
8706
8707         * doc/sgml/*: Added.
8708         
8709         * doc/gmime-sections.txt: Added g_mime_part_decode_contents and
8710         g_mime_header_printf.
8711
8712         * gmime-message.c (header_fold): New function to fold headers.
8713         (g_mime_header_printf): New convenience function to print a
8714         formatted header (which will get correctly folded).
8715         (create_header): Correctly fold each header.
8716
8717 2000-11-16  Charles Kerr <charles@superpimp.org>
8718
8719         * gmime-utils.c (datetok): don't crash if the date string passed
8720         in is NULL.
8721
8722 2000-11-15  Jeffrey Stedfast  <fejj@helixcode.com>
8723
8724         * gmime-part.c (g_mime_part_decode_contents): New convenience
8725         function to decode the contents of a mime part (based on code by
8726         Wayne Schuller).
8727
8728 2000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
8729
8730         * doc/html/index.sgml: Added - apparently we need this :-)
8731
8732         * doc/Makefile.am: Updated to pass distcheck
8733
8734 2000-11-10  Jeffrey Stedfast  <fejj@helixcode.com>
8735
8736         * doc/gmime-docs.sgml: Added a new paragraph explaining the
8737         difference between functions that return const and the ones that
8738         don't.
8739         
8740         * doc/html/*.html: Updated.
8741
8742         * gmime-message.c: 
8743         * gmime-part.c: 
8744         * gmime-parser.c: 
8745         * internet-address.c: 
8746         * gmime-param.c: Updated Gtk-Doc comments.
8747
8748         * gmime-content-type.c: Wrote Gtk-Doc comments.
8749
8750 2000-11-10  Jeffrey Stedfast  <fejj@helixcode.com>
8751         
8752         * Makefile.am (SUBDIRS): Added doc
8753
8754         * configure.in: Generate doc/Makefile
8755
8756         * doc/Makefile.am: Ignore more headers when performaing
8757         gtkdoc-scan.
8758
8759         * doc/gmime-docs.sgml:
8760         * doc/gmime-sections.txt: Added.
8761
8762         * doc/html/*.html: Generated library reference.
8763
8764 2000-11-09  Jeffrey Stedfast  <fejj@helixcode.com>
8765
8766         * TODO: Updated.
8767
8768         * test-mime.c: Added test of the new quote/unquote functions.
8769         
8770         * gmime-message.c (g_mime_message_add_recipients_from_string):
8771         Check for escaped quotes.
8772         
8773         * gmime-part.c (get_content_type): Correctly quote params.
8774         (get_content_disposition): Same.
8775
8776         * gmime-param.c (g_mime_param_new_from_string): Check for escaped
8777         quotes. Also use unquote_string() to unquote the value.
8778         (g_mime_param_to_string): Correctly quote the value.
8779
8780         * gmime-parser.c (get_mime_part): Check for escaped quotes and
8781         correctly unquote strings where appropriate.
8782
8783         * gmime-utils.c (g_mime_utils_quote_string): New convenience
8784         function to escape and quote a string.
8785         (g_mime_utils_unquote_string): New convenience function to
8786         un-escape and un-quote a string.
8787
8788         * internet-address.c (encoded_name): Use quote_string().
8789         (internet_address_new): Use unquote_string() to unquote and
8790         unescape the name component (it will be re-escaped and re-quoted
8791         when it's written to a string later).
8792
8793 2000-11-09  Jeffrey Stedfast  <fejj@helixcode.com>
8794
8795         * TODO: Updated.
8796
8797 2000-11-08  Jeffrey Stedfast  <fejj@helixcode.com>
8798
8799         * gmime-parser.c (construct_headers): Oops. Set the subject with
8800         the decoded string rather than the encoded one.
8801         (get_mime_part): On the chance that we come accross a broken
8802         multipart, default the mime type to text/plain and continue on.
8803
8804 2000-11-08  Jeffrey Stedfast  <fejj@helixcode.com>
8805
8806         * internet-address.c (internet_address_to_string): Moved code
8807         around to avoid unecessary warnings.
8808
8809         * gmime-utils.c: Added Gtk-Doc style comments to all the
8810         functions.
8811         (g_mime_utils_best_encoding): Return a GMimePartEncodingType
8812         instead of gint.
8813
8814 2000-11-01  Jeffrey Stedfast  <fejj@helixcode.com>
8815
8816         * Makefile.am (INCLUDES): Add -DG_LOG_DOMAIN=\"gmime\"
8817
8818 2000-10-31  Jeffrey Stedfast  <fejj@helixcode.com>
8819
8820         * test-parser.c (test_parser): Test g_mime_message_get_body() here
8821         as well.
8822
8823         * test-mime.c: Updated to reflect changes to get_body.
8824         
8825         * gmime-message.c (g_mime_message_get_body): Return an allocated
8826         buffer because we want to return the decoded message body rather
8827         than the (possibly) encoded form.
8828         (create_header): Write out the arbitrary headers first as they may
8829         contain headers like "Received:" which really ought to be at the
8830         top.
8831
8832         * gmime-part.c: Removed some old cruft.
8833
8834 2000-10-29  Jeffrey Stedfast  <fejj@helixcode.com>
8835
8836         * internet-address.c (encoded_name): Use
8837         g_mime_utils_8bit_header_encode_phrase() to encode the addrspec.
8838
8839         * gmime-utils.c (g_mime_utils_8bit_header_decode): Fix to make the
8840         decoder more rfc compliant. As stated by rfc2047, all white space
8841         between encoded words MUST be ignored.
8842         (g_mime_utils_8bit_header_encode_phrase): New rfc2047 encoding
8843         function for phrases (see rfc2047 section 5 part 3).
8844
8845 2000-10-28  Jeffrey Stedfast  <fejj@helixcode.com>
8846
8847         * gmime-utils.c (parse_rfc822_date): Fixed the off-by-one-hour
8848         bug.
8849
8850         * test-mime.c: Updated to reflect changes to
8851         g_mime_message_get_body().
8852
8853         * gmime-message.c (g_mime_message_get_headers): Added Gtk-Doc
8854         comment.
8855         (g_mime_message_get_body): Modified to return a const pointer to
8856         the message body rather than allocating it.
8857
8858 2000-10-28  Charles Kerr <charles@superpimp.org>
8859
8860         * gmime-message.c (g_mime_message_get_headers): New function
8861         similar to g_mime_message_get_body.  Useful if you want a raw
8862         display of headers separate from the body.
8863
8864         * gmime-message.[c,h] (g_mime_message_get_body): made const.
8865
8866 2000-10-28  Jeffrey Stedfast  <fejj@helixcode.com>
8867
8868         * tests/Makefile.am: New automake file (when we make a release,
8869         this directory should really be a part of the tarball as it
8870         contains data for the test programs).
8871
8872         * tests/.cvsignore: Added.
8873
8874         * Makefile.am (SUBDIRS): Add the 'tests' directory
8875
8876         * configure.in: Generate tests/Makefile
8877
8878 2000-10-27  Jeffrey Stedfast  <fejj@helixcode.com>
8879
8880         * test-mime.c: Added code to test g_mime_message_get_body()
8881
8882         * gmime-message.c (g_mime_message_get_body): New convenience
8883         function that attempts to get the message body in the requested
8884         text format (plain vs html).
8885
8886         * gmime-parser.c (construct_headers): If the end of a header field
8887         is the end of the header, break out of the loop.
8888
8889         * gmime-content-type.[c,h]: Added const to arguments where
8890         appropriate.
8891
8892         * gmime-utils.h: Fixed a spelling mistake in a comment ;-)
8893
8894 2000-10-26  Charles Kerr <charles@superpimp.org>
8895
8896         * gmime-utils.h: made const the input ptrs for encode/decode
8897         funcs.
8898
8899         * gmime-utils.c: Updated to reflect const changes.
8900
8901 2000-10-26  Jeffrey Stedfast  <fejj@helixcode.com>
8902
8903         * test-mime.c: Also updated.
8904
8905         * gmime-parser.c (construct_headers): Updated to reflect name
8906         changes.
8907
8908         * gmime-message.c: Updated to reflect name changes.
8909
8910         * gmime-message.h: Changed the name of the recipient type
8911         #defines.
8912
8913 2000-10-24  Jeffrey Stedfast <fejj@helixcode.com>
8914
8915         * Makefile.am (SUBDIRS): Added "."
8916
8917         * configure.in: Create libgmime.spec
8918
8919 2000-10-24  Charles Kerr <charles@superpimp.org>
8920
8921         * gmime-utils.c: added #include <stdlib.h> to pick up atoi.
8922
8923         * internet-address.c (internet_address_new): removed unused
8924         variable `decoded'
8925
8926 2000-10-24  Jeffrey Stedfast  <fejj@helixcode.com>
8927
8928         Thanks to Charles Kerr of Pan fame for the following fixes.
8929
8930         * gmime-utils.c (encode_8bit_word): Oops, encode 'word' and not 'ptr'.
8931
8932         * gmime-part.c (g_mime_part_destroy): Free the content-id.
8933
8934 2000-10-21  Jeffrey Stedfast  <fejj@helixcode.com>
8935
8936         * gmime.h.in: Wrap definitions in #ifndef __GMIME_H__
8937
8938 2000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
8939
8940         * TODO: Updated.
8941
8942         * test-*.c: Updated to reflect GMime API changes.
8943
8944         * gmime-part.c: #include "gmime-utils.h"
8945
8946         * gmime-parser.c (g_mime_parser_construct_message): Now takes a
8947         boolean argument 'save_extra_headers' which tells the parser
8948         whether it should add unknown headers to the arbitrary header
8949         array or ignore them.
8950         (construct_headers): Save the extra headers if desired.
8951
8952         * gmime-message.c (g_mime_message_add_arbitrary_header): Use the
8953         new GMimeHeader structure.
8954         (g_mime_message_new): Always initialize the arbitrary header array.
8955         (g_mime_message_destroy): The arbitrary header array will never
8956         be NULL (as it is now pre-initialized) so don't bother
8957         checking.
8958         (create_header): rfc2047 encode the arbitrary header values.
8959
8960 2000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
8961
8962         * rfc/rfc*.txt: MIME specification RFCs
8963
8964         * README: Updated.
8965
8966         * TODO: Added a list of tasks that need to be done eventually.
8967
8968         * gmime-parser.c (get_mime_part): rfc2047 decode the
8969         content-description before we set the value.
8970
8971         * gmime-part.c (g_mime_part_to_string): rfc2047 encode the
8972         content-description before we write it to the string.
8973
8974 2000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
8975
8976         * gmime-parser.c (construct_headers): rfc2047 decode some headers.
8977
8978         * internet-address.c (internet_address_to_string): Now takes an
8979         argument to rfc2047 encode or not, when not rfc2047 encoding.
8980         (internet_address_new_from_string): Rewrote
8981
8982         * gmime-message.c (create_header): rfc2047 encode addresses and
8983         subject headers.
8984
8985 2000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
8986
8987         * gmime-utils.c (g_mime_utils_quoted_encode_step): Fixed some
8988         non-compliance issues like encoding all spaces as =20 even when
8989         they shouldn't have been.
8990
8991 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
8992
8993         * acconfig.h:
8994         * config.h.in: #undef HAVE_ISBLANK
8995
8996         * configure.in: Check for the isblank() GNU extension function.
8997         
8998         * gmime-parser.c (get_mime_part): Parse for the Content-Id. Use
8999         isblank() instead of isspace() when looking to see if the content
9000         header was wrapped. We want it to match only if the next char is
9001         either a tab or a space.
9002         (isblank): Define an isblank() macro if HAVE_ISBLANK isn't
9003         defined.
9004
9005         * gmime-part.c (g_mime_part_set_content_id): New function to set
9006         the Content-ID.
9007         (g_mime_part_get_content_id): New function to get the Content-Id.
9008         (g_mime_part_to_string): Print content id's if available.
9009         (get_content_type): Eek! If there aren't any params, don't assign
9010         'string' an empty string! It's already been initialized with a
9011         type!
9012
9013 2000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
9014
9015         * gmime-utils.c (quoted_decode): New function to decode rfc2047's
9016         version of the quoted-printable encoding.
9017         (decode_8bit_word): Use quoted_decode()
9018         (quoted_encode): New function to encode to rfc2047's version of
9019         quoted-printable (removed from the internals of encode_8bit_word)
9020         (encode_8bit_word): Use quoted_encode()
9021
9022 2000-10-01  Jeffrey Stedfast  <fejj@helixcode.com>
9023
9024         * internet-address.c (internet_address_new_from_string): Fixed a
9025         logic error that cut off the last char of the name (or address).
9026
9027         * gmime-parser.c (construct_headers): Optimized.
9028
9029         * gmime-part.c (get_content_type): If there are no params, don't
9030         try to get any. Fixes a segfault.
9031
9032         * gmime-utils.[c,h]: New utilities functions for use with libgmime
9033         (time and encoding/decoding routines)
9034         
9035         * test-mime.c: test some of the routines in gmime-utils.c
9036
9037         * gmime.h.in: #include "gmime-utils.h"
9038         
9039         * configure.in: Added checks for time zone stuff
9040
9041         * acconfig.h:
9042         * config.h.in: Added some #undef's for timezone stuff
9043         
9044         * Makefile.am: Added gmime-utils.[c,h]
9045
9046 2000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
9047
9048         * HACKING: Updated
9049
9050         * gmime-param.c: Wrote Gtk-docs comments
9051
9052         * gmime-parser.c: Wrote Gtk-docs comments
9053
9054         * AUTHORS: Updated
9055
9056         * autogen.sh: Updated autogen.sh to look for gmime.h.in instead of
9057         gmime.h
9058
9059 2000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
9060         
9061         * gmime.h: Removed
9062
9063         * gmime.h.in: Replacement for gmime.h - modified to be dynamically
9064         created at build-time.
9065
9066         * configure.in: Updated to generate gmime.h and also to ignore
9067         doc/ until docs are written.
9068
9069         * Makefile.am: Modified to ignore doc/
9070
9071         * tests/*: MIME messages that break are likely to break MIME
9072         parsers.
9073
9074 2000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
9075
9076         * gmime-part.c (get_content_disposition): Put a space between
9077         disposition parameters.
9078         (get_content_type): New convenience function to dump the content
9079         type and it's params to a string (for use internally).
9080         (g_mime_part_to_string): Use get_content_type and add print for
9081         content-description's.
9082
9083         * gmime-parser.c (get_mime_part): strip leading/trailing
9084         whitespace from the disposition and convert param names to
9085         lowercase. Also fixed Content-Transfer-Encoding.
9086
9087 2000-09-23  Jeffrey Stedfast  <fejj@helixcode.com>
9088
9089         * gmime-part.c (g_mime_part_destroy): Erm, make sure to increment
9090         to the next item in the list.
9091
9092         * gmime-message.c (recipients_destroy): Optimized a bit
9093
9094         * gmime-content-type.c (g_mime_content_type_new_from_string):
9095         Change all parameter names to lowercase, this way we can look them
9096         up without having to know which case the original name used (eg
9097         boundary).
9098
9099         * test-mime.c: renamed from mime-test.c
9100
9101         * test-parser.c: a new test program that allows us to specify a
9102         file to get our test email from.
9103
9104 2000-09-22  Jeffrey Stedfast  <fejj@helixcode.com>
9105
9106         * configure.in: remember glib_cflags and glib_libs so we can dump
9107         them into gmime-config later.
9108
9109         * gmime-config.in: use glib_cflags and glib_libs.
9110
9111         * gmime.h: add variables for major/minor/micro release
9112
9113         * Makefile.am: switch to GMIME_ instead of LIBGMIME_ stuff