12011-03-07  Jeffrey Stedfast  <fejj@novell.com>
2
3	* README: Bumped version
4
5	* configure.in: Bumped version to 2.2.27
6
7	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Treat EXPSIG,
8	EXPKEYSIG, and REVKEYSIG the same as GOODSIG/BADSIG status
9	messages in that all of them denote a new signer info.
10
11	* gmime/gmime-stream-mem.c (stream_write): Correctly calculate the
12	end boundary of the stream when bound_end is -1.
13
14	* gmime/gmime-utils.h (GMIME_QP_ENCODE_LEN): Fixed to take into
15	acount the possibility of having to force-wrap lines at 72+
16	characters.
17	(GMIME_UUENCODE_LEN): Fixed to prevent possible buffer overflows.
18
192010-03-26  Jeffrey Stedfast  <fejj@novell.com>
20
21	* README: Bumped version
22
23	* configure.in: Bumped version to 2.2.26
24
252010-03-26  Jeffrey Stedfast  <fejj@novell.com>
26
27	Fixes for bug #613653
28
29	* gmime/gmime.c (g_mime_init): Initialize GMimeObject's type
30	registry.
31	(g_mime_shutdown): Shut it down here.
32
33	* gmime/gmime-object.c (g_mime_object_type_registry_init): Renamed
34	a bit and fixed to not use g_atexit(). Also made internal-public.
35	(g_mime_object_type_registry_shutdown): Renamed and made
36	internal-public.
37	(g_mime_object_register_type): Don't init the type system anymore.
38	(g_mime_object_new_type): Same here.
39
402010-01-30  Jeffrey Stedfast  <fejj@novell.com>
41
42	* README: Bumped version
43
44	* configure.in: Bumped version to 2.2.25
45
46	* configure.in: Disabled strict-aliasing to work around subtle
47	bugs generated by gcc 4.4 when optimizations are enabled.
48
492009-08-12  Jeffrey Stedfast  <fejj@novell.com>
50
51	* README: Bumped version
52
53	* configure.in: Bumped version to 2.2.24
54
55	* gmime/gmime-utils.c (charset_convert): If iconv() fails, treat
56	conditions where outleft == 0 the same as if we had gotten an
57	E2BIG error (e.g. we need to grow the output buffer) so that we
58	don't overrun it while appending a '?' placeholder character.
59
602009-07-02  Stanislav Brabec  <sbrabec@suse.cz>
61
62	* configure.in: Simplified configuring of gmime in a
63	cross-compilation environment. Make it possible to work-around
64	AC_TRY_RUN limitations by copying of target system iconv-detect.h
65	and setting ac_cv_have_iconv_detect_h=yes.
66
672008-09-14  Jeffrey Stedfast  <fejj@novell.com>
68
69	* README: Bumped version
70
71	* configure.in: Bumped version to 2.2.23
72
732008-09-13  Jeffrey Stedfast  <fejj@novell.com>
74
75	* docs/reference/gmime-sections.txt: Updated.
76
77	* gmime/gmime-parser.c (nearest_pow): New faster method for
78	calculating nearest power of 2, rather than an expensive
79	while-loop.
80	(g_mime_parser_get_headers_begin): New function backported from
81	2.3.x
82	(g_mime_parser_get_headers_end): Same.
83
842008-08-07  Jeffrey Stedfast  <fejj@novell.com>
85
86	* gmime/gmime-message-part.c (g_mime_message_part_get_message):
87	Only ref the message if it is non-NULL. Thanks to Peter Bloomfield
88	for this fix.
89
902008-07-19  Jeffrey Stedfast  <fejj@novell.com>
91
92	* README: Bumped version
93
94	* configure.in: Bumped version to 2.2.22
95
962008-07-11  Jeffrey Stedfast  <fejj@novell.com>
97
98	* src/uudecode.c (uudecode): Don't base64 decode the
99	end-tag ("====\n"). Fixes bug #542222.
100
1012008-07-08  Jeffrey Stedfast  <fejj@novell.com>
102
103	* COPYING: Fixed to reference LGPL v2.1
104
105	* gmime/gmime-common.h: Removed unused prototypes.
106
1072008-07-04  Jeffrey Stedfast  <fejj@novell.com>
108
109	Fixes bug #541578
110
111	* gmime/gmime-message.c (g_mime_message_add_recipient): Change
112	'type' argument to const char *.
113	(g_mime_message_add_recipients_from_string): Same.
114
1152008-06-12  Jeffrey Stedfast  <fejj@novell.com>
116
117	* gmime/gmime-utils.h (GMIME_QP_ENCODE_LEN): Add an extra byte for
118	\n in the case of quoted_encode_close(). Thanks to Peter
119	Bloomfield for discovering this.
120
1212008-06-07  Jeffrey Stedfast  <fejj@novell.com>
122
123	* gmime/internet-address.c (decode_mailbox): Prevent reading past
124	the end of the input string.
125
1262008-05-27  Jeffrey Stedfast  <fejj@novell.com>
127
128	* examples/basic-example.c: Fixed to use GMimeSignatureValidity.
129
1302008-05-25  Jeffrey Stedfast  <fejj@novell.com>
131
132	* gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
133	Don't use deprecated functions.
134
1352008-05-24  Jeffrey Stedfast  <fejj@novell.com>
136
137	* gmime/gmime-stream.c (stream_eos): Fixed a typo.
138
1392008-05-23  Jeffrey Stedfast  <fejj@novell.com>
140
141	* mono/StreamWrapper.cs: Allow seeking to position 0 for
142	GMimeStreamFilter. Thanks to Debajyoti Bera for this patch.
143
1442008-05-23  Jeffrey Stedfast  <fejj@novell.com>
145
146	* README: Bumped version
147
148	* configure.in: Bumped version to 2.2.21
149
150	* gmime/gmime-parser.c: Check parser_step() against
151	GMIME_PARSER_STATE_ERROR rather than -1 in case the value ever
152	changes.
153	(struct _GMimeParserPrivate): Changed state to be 16bit int
154	instead of a 26bit int which apparently cannot be set to -1 on
155	Solaris. Fixes bug #534301.
156	(parser_step_headers): Fixed a corner-case where a read boundary
157	fell between the \n and \t of a folded header.
158
1592008-05-16  Jeffrey Stedfast  <fejj@novell.com>
160
161	* README: Bumped version
162
163	* configure.in: Bumped version to 2.2.20
164
1652008-05-15  Jeffrey Stedfast  <fejj@novell.com>
166
167	* gmime/gmime-stream-buffer.c (stream_read): Break if
168	g_mime_stream_read() returns 0 as well (meaning EOF, no more data
169	to read) and don't keep looping. Fixes bug #533331.
170
1712008-05-03  Jeffrey Stedfast  <fejj@novell.com>
172
173	* README: Bumped version
174
175	* configure.in: Bumped version to 2.2.19
176
1772008-05-02  Jeffrey Stedfast  <fejj@novell.com>
178
179	* gmime/gmime-parser.c (parser_step_headers): Fix for CRLF encoded
180	input.
181
1822008-04-05  Jeffrey Stedfast  <fejj@novell.com>
183
184	* gmime/gmime-parser.c (header_parse): Fixed a memory leak in the
185	case of an invalid header.
186
1872008-02-16  Jeffrey Stedfast  <fejj@novell.com>
188
189	* README: Bumped version
190
191	* configure.in: Bumped version to 2.2.18
192
1932008-03-13  Jeffrey Stedfast  <fejj@novell.com>
194
195	* gmime/gmime-parser.c (parser_construct_message): Changed
196	content_length to an unsigned long rather than unsigned int, fixes
197	bug #521872. Thanks to Pawel Salek for this fix.
198
1992008-03-10  Jeffrey Stedfast  <fejj@novell.com>
200
201	* gmime/gmime-parser.c (parser_scan_mime_part_content): Don't let
202	size go negative.
203
2042008-02-10  Jeffrey Stedfast  <fejj@novell.com>
205
206	* README: Bumped version
207
208	* configure.in: Bumped version to 2.2.17
209
2102008-02-09  Jeffrey Stedfast  <fejj@novell.com>
211
212	* gmime/gmime-filter-basic.c (filter_filter): Use the new macros
213	defined below.
214
215	* gmime/gmime-utils.c (rfc2047_encode_word): Use the new macros.
216
217	* gmime/gmime-utils.h: Added more accurate encoding-length macros
218	for base64, quoted-printable, and uuencode which are try to
219	minimize over-calculating the amount of output data that we
220	need. Also namespaced them.
221
2222008-02-08  Jeffrey Stedfast  <fejj@novell.com>
223
224	* src/uudecode.c (uudecode): Use g_strchomp() on the filename
225	parsed from the 'begin' line.
226
2272008-02-07  Jeffrey Stedfast  <fejj@novell.com>
228
229	* util/url-scanner.c (url_web_end): Handle IP address literals
230	within []'s. Fixes bug #515088.
231
2322008-02-06  Jeffrey Stedfast  <fejj@novell.com>
233
234	* gmime/gmime-utils.c (g_mime_utils_uuencode_step): Optimized.
235
2362008-02-03  Jeffrey Stedfast  <fejj@novell.com>
237
238	* gmime/gmime-stream-cat.c (stream_read): Removed an extra seek.
239
2402008-02-02  Jeffrey Stedfast  <fejj@novell.com>
241
242	* README: Bumped version
243
244	* configure.in: Bumped version to 2.2.16
245
2462008-02-02  Jeffrey Stedfast  <fejj@novell.com>
247
248	Fix for https://bugzilla.novell.com/show_bug.cgi?id=333292 and
249	some other bugs I discovered while fixing it.
250
251	* gmime/gmime-parser.c (header_parse): Made an actual function
252	rather than a macro. Don't turn invalid headers into
253	X-Invalid-Headers, just ignore them. Instead of using
254	g_strstrip(), do our own lwsp trimming so we can do it before
255	malloc'ing - this helps reduce memory usage and memmove()
256	processing in g_strstrip().
257	(parser_step_headers): Validate the header field names as we go so
258	that we can stop when we come to an invalid header in some
259	cases. May now return with 3 states rather than only 1:
260	HEADERS_END (as before), CONTENT (suggesting we've reached body
261	content w/o a blank line to separate it from the headers), and
262	COMPLETE (which suggests that we've reached the next message's
263	From-line).
264	(parser_skip_line): Rearranged a bit: don't fill unless/until we
265	need to.
266	(parser_step): For HEADERS_END state, skip a line and increment
267	state to CONTENT. No-op for CONTENT and COMPLETE states.
268	(parser_scan_message_part): parser_step() can return more than
269	just HEADERS_END on 'success' when starting with HEADERS state, so
270	check for error rather than HEADERS_END.
271	(parser_construct_leaf_part): No need to parser_step() thru header
272	parsing, they should already be parsed by the time we get
273	here. Also, don't call parser_skip_line() directly to skip the
274	blank line between headers and content, use parser_step() to do
275	that for us.
276	(parser_construct_multipart): Same as parser_construct_leaf_part()
277	(found_immediate_boundary): Now takes an 'end' argument so callers
278	can request a check against an end-boundary vs a part boundary.
279	(parser_scan_multipart_subparts): Check for errors with
280	parser_skip_line(). Set HEADERS state and use parser_step() to
281	parse headers rather than calling parser_step_headers()
282	directly. If, after parsing the headers, we are at the next
283	message (aka COMPLETE state) and we have no header list, then
284	break out of our loop and pretend we've found an
285	end-boundary. After parsing the content of each MIME part, check
286	that the boundary we found is our own and not a parent's (if it
287	belongs to a parent, break out).
288	(parser_construct_part): Loop parser_step() until we're at any
289	state past the header block (>= HEADERS_END).
290	(parser_construct_message): Same idea. Also, do error checking for
291	decoded content_length value.
292
2932008-02-02  Jeffrey Stedfast  <fejj@novell.com>
294
295	* gmime/gmime-iconv-utils.c (iconv_utils_init): Don't break if the
296	user's locale is unset (e.g. US-ASCII).
297
2982008-01-31  Jeffrey Stedfast  <fejj@novell.com>
299
300	* gmime/gmime-parser.c: Removed the need for 'unstep' state
301	information.
302
3032008-01-27  Jeffrey Stedfast  <fejj@novell.com>
304
305	* gmime/gmime-stream-buffer.c (stream_write): Don't modify the
306	passed-in arguments so that it makes debugging easier if there's
307	ever a bug.
308
3092008-01-27  Jeffrey Stedfast  <fejj@novell.com>
310
311	* gmime/gmime-stream-buffer.c (stream_read): Optimized the
312	BLOCK_READ code-path.
313	(stream_write): Optimized the BLOCK_WRITE code-path.
314	(stream_seek): Optimized the BLOCK_READ code-path.
315	(g_mime_stream_buffer_gets): Updated for the changes made to the
316	way bufptr is used in the BLOCK_READ case.
317
3182008-01-14  Jeffrey Stedfast  <fejj@novell.com>
319
320	* gmime/gmime-charset.c (g_mime_set_user_charsets): Deep copy the
321	string array. Fixes bug #509434.
322
3232008-01-03  Jeffrey Stedfast  <fejj@novell.com>
324
325	* README: Bumped version
326
327	* configure.in: Bumped version to 2.2.15
328
3292008-01-02  Jeffrey Stedfast  <fejj@novell.com>
330
331	* gmime/gmime-message.c (message_write_to_stream): Reworked the
332	logic to be easier to understand what is going on.
333
334	* gmime/gmime-multipart.c (multipart_write_to_stream): In the case
335	where multipart->boundary is NULL /and/ we have a raw
336	header (suggesting a parsed message), do not set a boundary as it
337	will break the output because it will clobber the saved raw header
338	and GMimeMessage's write_to_stream() method will have skipped
339	writing its own headers if its toplevel part (us) have a raw
340	header set. In this case, also skip writing the end boundary.
341
3422008-01-01  Jeffrey Stedfast  <fejj@novell.com>
343
344	* README: Bumped version
345
346	* configure.in: Bumped version to 2.2.14
347
348	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Fixed a
349	Free Memory Read access (FMR) by not freeing 'name' before using
350	it's value. Also reworked to take advantage of uname(2) or
351	getdomainname() to get the domain name if available to avoid
352	having to do a DNS lookup.
353
3542007-01-01  Jeffrey Stedfast  <fejj@novell.com>
355
356	* README: Bumped version
357
358	* configure.in: Bumped version to 2.2.13
359
3602008-01-01  Jeffrey Stedfast  <fejj@novell.com>
361
362	Fixes bug #506701
363
364	* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't
365	reset the word-type variable as it needs to be preserved when
366	breaking long words.
367	(rfc2047_encode): Switch on word->encoding - if 0, rfc2047 encode
368	as us-ascii.
369
3702007-12-27  Jeffrey Stedfast  <fejj@novell.com>
371
372	* gmime/gmime-utils.c (decode_8bit): Now takes a default_charset
373	argument which we use in place of the locale charet if
374	non-NULL. We also now always include this charset in our list of
375	charsets to check for a best-match (obviously this charset is
376	unlikely to be an exact fit if this function is getting called, so
377	we place it at the end of the list).
378	(rfc2047_decode_word): If given a valid charset in the
379	encoded-word token, always use that for charset conversion to UTF-8
380	even if it doesn't convert fully. We don't want to fall back to
381	the user's supplied charset list because it may contain iso-8859-1
382	which will likely always be a 'best-match' charset.
383
3842007-12-26  Jeffrey Stedfast  <fejj@novell.com>
385
386	* gmime/gmime-utils.c (g_mime_utils_decode_8bit): Made public.
387
388	* gmime/internet-address.c (decode_mailbox): Instead of doing our
389	own thing to convert raw 8bit/multibyte text sequences into UTF-8,
390	use the same function we use in gmime-utils.c's header decoder.
391
3922007-12-25  Jeffrey Stedfast  <fejj@novell.com>
393
394	* gmime/charset-map.c: New source file to generate the charset
395	map (moved out of gmime-charset.c)
396
397	* gmime/gmime-charset.c (main): Removed.
398
3992007-12-25  Jeffrey Stedfast  <fejj@novell.com>
400
401	* gmime/gmime-charset.c (main): Cleaned up the logic and made it
402	so that we can alias a block to a previous block if the blocks are
403	identical rather than just aliasing when all values in the block
404	are identical. Happens to make no difference in the output, but
405	the logic is now there if that ever changes.
406
4072007-12-24  Jeffrey Stedfast  <fejj@novell.com>
408
409	* gmime/gmime-charset-map-private.h: Regenerated.
410
411	* gmime/gmime-charset.c (known_iconv_charsets): Map all of the
412	gb2312 aliases to GBK as GBK is a superset of gb2312 (apparently
413	some clients are tagging GBK as gb2312 which is missing some
414	glyphs contained within GBK).
415	(main): Added iso-8859-6 to the table for Arabic support.
416
4172007-12-16  Jeffrey Stedfast  <fejj@novell.com>
418
419	* gmime/gmime-utils.c (decode_8bit): When reallocing our output
420	buffer, we need to update outleft as well.
421
4222007-12-15  Jeffrey Stedfast  <fejj@novell.com>
423
424	* README: Bumped version
425
426	* configure.in: Bumped version to 2.2.12
427
4282007-12-08  Jeffrey Stedfast  <fejj@novell.com>
429
430	* gmime/gmime-utils.c (rfc2047_encode_merge_rfc822_words):
431	Completely rewritten with new logic which will hopefully group
432	words more logically.
433
4342007-12-08  Jeffrey Stedfast  <fejj@novell.com>
435
436	Fixes bug #498720
437
438	* gmime/internet-address.c (internet_address_list_writer): Renamed
439	from the temporary internet_address_list_fold() name.
440	(_internet_address_to_string): New internal function that writes
441	an InternetAddress to a GString, doing proper folding and rfc2047
442	encoding if requested.
443	(internet_address_to_string): Use the new internal function.
444
445	* tests/test-mime.c: Added another addrspec test and fixed up some
446	exception strings to be a little more helpful.
447
4482007-12-05  Jeffrey Stedfast  <fejj@novell.com>
449
450	* configure.in: Fixed a bug where explicitly disabling largefile
451	support would add -D_FILE_OFFSET_BITS=no to the compiler
452	CFLAGS. Also added a blaring WARNING when -enable-largefile is
453	passed.
454
4552007-11-23  Jeffrey Stedfast  <fejj@novell.com>
456
457	Attempt at solving bug #498720 for address fields, altho it should
458	probably be made to handle folding single addresses in the case
459	where they are too long to fit within a single line.
460
461	* gmime/internet-address.c (internet_address_list_fold): New
462	function.
463
464	* gmime/gmime-message.c (write_structured): Renamed from
465	write_addrspec().
466	(write_addrspec): New header writer that writes
467	InternetAddressLists in a nicely folded manner.
468
4692007-11-12  Jeffrey Stedfast  <fejj@novell.com>
470
471	* gmime/internet-address.c (internet_address_destroy): No need to
472	check if ia != NULL, we know this is true already.
473
4742007-11-12  Jeffrey Stedfast  <fejj@novell.com>
475
476	* README: Bumped version
477
478	* configure.in: Bumped version to 2.2.11
479
480	* gmime/gmime-utils.c (g_mime_utils_header_decode_text): Fix for
481	bug #485005.
482
4832007-11-06  Jeffrey Stedfast  <fejj@novell.com>
484
485	* gmime/gmime-utils.c (rfc2047_decode_word): If the charset string
486	is empty, default to decode_8bit() and don't try to iconv_open()
487	it.
488
4892007-11-06  Jeffrey Stedfast  <fejj@novell.com>
490
491	* gmime/gmime-utils.c (is_rfc2047_token): Don't assume the charset
492	component of the token is >= 1 char, start checking for a '?' at
493	string index 2.
494
4952007-11-01  Jeffrey Stedfast  <fejj@novell.com>
496
497	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Clear any
498	error we may have (bad passwd?) each pass so that we don't try to
499	set an error when one is already set.
500
5012007-10-27  Jeffrey Stedfast  <fejj@novell.com>
502
503	* gmime/gmime-message.c (g_mime_message_set_mime_part): Reset the
504	raw headers of the current top-level MIME part so that if it is
505	being used elsewhere, it won't carry along all the message headers
506	from this message.
507
5082007-10-24  Jeffrey Stedfast  <fejj@novell.com>
509
510	* gmime/gmime-part.c (g_mime_part_encoding_from_string): Handle
511	the value "uuencode" the same as we were handling "x-uuencode".
512
5132007-10-14  Jeffrey Stedfast  <fejj@gnome.org>
514
515	Changed the license to LGPLv2
516
5172007-10-13  Jeffrey Stedfast  <fejj@gnome.org>
518
519	* tests/test-pgp.c (test_export): Skip past the PGP headers so as
520	to avoid comparing the "Version: " headers which might fail if a
521	newer gnupg is used than what created the pgp key originally.
522
5232007-10-13  Jeffrey Stedfast  <fejj@gnome.org>
524
525	* gmime/gmime-filter-html.c: Updated for url-scanner.c symbol
526	changes.
527
528	* util/url-scanner.[c,h]: Renamed symbols to get rid of the G
529	prefix and marked all symbols for internal linkage.
530
531	* util/md5-utils.h: Declare symbols as internal.
532
533	* util/memchunk.h: Here too.
534
535	* util/cache.h: And here.
536
537	* util/list.h: Same.
538
5392007-09-25  Joe Shaw  <joe@joeshaw.org>
540
541	* configure.in: Set an AM_CONDITIONAL for whether we are
542	building with large file support.
543
544	* mono/GMime.metadata.in: Move GMime.metadata to this and
545	change any references of off_t to @off_t_type@, which is
546	substituted with the correct type.  This is needed because
547	off_t is converted to an IntPtr by the gtk-sharp binding
548	generator, which is good for 64-bit systems and 32-bit
549	systems without large file support but breaks on 32-bit
550	systems with large file support.
551
552	* mono/Makefile.am: Generate GMime.metadata from
553	GMime.metadata.in by using sed to replace @off_t_type@
554	with gint64 on 32-bit systems with large file support
555	and long otherwise.
556
5572007-09-03  Jeffrey Stedfast  <fejj@gnome.org>
558
559	* gmime/gmime-utils.c: Disabled a debug printf.
560
5612007-08-15  Joe Shaw  <joe@ximian.com>
562
563	* mono/DataWrapper.custom: We want to dispose of the GMime
564	stream immediately, since we don't use its managed wrapper
565	except to immediately pass it into the GMime.StreamFilter
566	constructor.
567
5682007-07-21  Jeffrey Stedfast  <fejj@gnome.org>
569
570	* gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): Save errno
571	before resetting the iconv descriptor so that we don't lose the
572	error.
573
5742007-07-19  Jeffrey Stedfast  <fejj@gnome.org>
575
576	* README: Bumped version
577
578	* configure.in: Bumped version to 2.2.10
579
580	* tests/test-mime.c: Added rfc2047_text entries for testing the
581	new workaround support.
582
583	* gmime/gmime-utils.c (g_mime_utils_header_decode_text):
584	Implemented a conditional workaround for broken rfc2047 encodings.
585
5862007-07-03  Jeffrey Stedfast  <fejj@gnome.org>
587
588	* gmime/gmime-common.c: Removed str[n]casecmp
589
5902007-05-21  Jeffrey Stedfast  <fejj@gnome.org>
591
592	* README: Bumped version
593
594	* configure.in: Bumped version to 2.2.9
595
596	* gmime/gmime-stream-cat.c (stream_substream): Fixed a memory leak
597	by always returning a GMimeStreamCat, even if the source list
598	contains only a single stream (probably better that it work this
599	way anyway for consistency), thanks again to Charles Kerr for
600	finding and presenting a fix for this. Fixes bug #440054.
601
602	* gmime/gmime-stream-file.c (stream_seek): Oops, fseek() should
603	have been using SEEK_SET, not SEEK_END. Thanks to Charles Kerr for
604	the report and the fix. Fixes bug #439841.
605
6062007-04-25  Jeffrey Stedfast  <fejj@gnome.org>
607
608	* README: Bumped version
609
610	* configure.in: Bumped version to 2.2.8
611
612	* tests/test-pgp.c: Test exporting of keys.
613
614	* gmime/gmime-utils.c (rfc2047_decode_word): Fixed compile
615	warnings.
616
617	* gmime/gmime-stream-file.c (stream_reset): Removed an unused
618	variable.
619
620	* gmime/gmime-charset.c (g_mime_charset_can_encode):
621	s/if (mask->level = 1)/if (mask->level == 1)/
622
6232007-04-23  Jeffrey Stedfast  <fejj@gnome.org>
624
625	* README: Bumped version
626
627	* configure.in: Bumped version to 2.2.7
628
6292007-04-14  Jeffrey Stedfast  <fejj@gnome.org>
630
631	* gmime/*.c (g_mime_*_get_type): Set n_preallocs to 0.
632
6332007-04-12  Jeffrey Stedfast  <fejj@gnome.org>
634
635	* gmime/*.c: no need for a second NULL argument to g_object_new()
636
637	* util/cache.c (cache_new): Change max_size and node_size to be of
638	type size_t.
639
640	* gmime/gmime-multipart-encrypted.c
641	(g_mime_multipart_encrypted_new): g_object_new() doesn't need a
642	second NULL argument.
643
644	* gmime/gmime-utils.c (decode_8bit): Close the iconv descriptor
645	and since we are using is_ascii() now, we don't need to use
646	unsigned char *'s.
647
6482007-04-12  Jeffrey Stedfast  <fejj@gnome.org>
649
650	* gmime/gmime-utils.c (decode_8bit): Use is_ascii().
651	(g_mime_utils_header_decode_text): Same.
652	(g_mime_utils_header_decode_phrase): Here too.
653
654	* gmime/gen-table.c: Added a is_ascii() macro for use instead of
655	the ctype isascii() so that I don't have to worry about casting.
656
6572007-04-11  Jeffrey Stedfast  <fejj@gnome.org>
658
659	Revision 1119 (previous commit) made the following 2 functions
660	even less attractive than they already were, so I decided to
661	rewrite them especially since it wasn't hard to find a far cleaner
662	approach.
663
664	* gmime/gmime-utils.c (g_mime_utils_header_decode_text): Rewritten
665	to be cleaner, faster, and more elegant.
666	(g_mime_utils_header_decode_phrase): Same.
667
6682007-04-11  Jeffrey Stedfast  <fejj@gnome.org>
669
670	Fixes for bug #423760 and bug #342196
671
672	* gmime/gmime-charset.c (g_mime_charset_can_encode): New
673	convenience function to check whether a length of UTF-8 text can
674	be converted into the specified charset.
675	(g_mime_set_user_charsets): New function allowing an application
676	to provide GMime with a list of user-preferred charsets to use for
677	encoding and decoding headers.
678	(g_mime_user_charsets): New function to get the list of
679	user-preferred charsets.
680
681	* gmime/gmime-utils.c (decode_8bit): New function to convert
682	arbitrary 8bit text into UTF-8 using the charset list provided by
683	g_mime_user_charsets().
684	(rfc2047_decode_word): Don't assume that just because the declared
685	charset is UTF-8 that it actually is in UTF-8.
686	(rfc2047_decode_word): If we can't open a converter for the
687	declared charset to UTF-8 or if we can't convert from the declared
688	charset into UTF-8, fall back to using decode_8bit().
689	(g_mime_utils_header_decode_text): Convert 8bit word tokens into
690	UTF-8 using decode_8bit().
691	(g_mime_utils_header_decode_phrase): Same.
692	(rfc2047_encode_word): Be a little more efficient about removing
693	'\n' chars...
694	(rfc2047_encode): When encoding a level-2 word cluster, attempt to
695	fit the cluster within a charset provided by
696	g_mime_user_charsets() rather than using GMime's best-fit charset
697	table (unless, of course, it doesn't fit within any of the
698	user-specified charsets).
699
7002007-03-28  Jeffrey Stedfast  <fejj@gnome.org>
701
702	* gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): No need to
703	cast out to a char *, it already is.
704
705	* gmime/gmime-stream-mem.c (g_mime_stream_mem_set_byte_array):
706	Only free the previous memory buffer if we were the owner.
707
7082007-03-28  Jeffrey Stedfast  <fejj@gnome.org>
709
710	* README: Bumped version
711
712	* configure.in: Bumped version to 2.2.6 - critical release for the
713	gmime-stream-fs and gmime-stream-file fixes below.
714
715	* gmime/gmime-stream-filter.c (stream_reset): Try resetting source
716	stream first, this way if that fails we don't reset our state
717	either.
718
719	* gmime/gmime-stream-fs.c (stream_reset): Same as below.
720
721	* gmime/gmime-stream-file.c (stream_reset): Make sure to always
722	return 0 or -1, not the value from fseek()ing back to the
723	beginning of the stream (which might not be position 0).
724
7252007-03-27  Jeffrey Stedfast  <fejj@gnome.org>
726
727	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): If we aren't
728	in a UTF-8 locale, convert status messages into UTF-8 when using
729	the status line in the GError.
730
7312007-03-26  Jeffrey Stedfast  <fejj@gnome.org>
732
733	* gmime/gmime-utils.c (g_mime_utils_8bit_header_decode)
734	(g_mime_utils_8bit_header_encode)
735	(g_mime_utils_8bit_header_encode_phrase): Changed all of these
736	functions to take `const unsigned char *' like they used to. Fixes
737	bug #423147.
738
739	* gmime/gmime-gpg-context.c (gpg_ctx_new): Initialize flushed and
740	nodata state variables. Thanks to valgrind for finding these...
741
742	* gmime/gmime-content-type.c
743	(g_mime_content_type_new_from_string): Shouldn't need to
744	g_strstrip() the type, is_ttoken() won't match against lwsp
745	chars. Also, instead of simply scanning past lwsp between some
746	tokens, use decode_lwsp() between *all* tokens so that we handle
747	comments as well (not that there should be any...).
748
749	* gmime-2.0.pc.in: Got rid of the redundant @LIBS@ which contained
750	the same value as @GMIME_LIBS@.
751
752	* configure.in: Added configure checks for large file support.
753
7542007-03-26  Jeffrey Stedfast  <fejj@gnome.org>
755
756	* gmime-param.c: #include "gmime-parse-utils.h" and got rid of
757	this file's own decode_lwsp() implementation.
758
759	* internet-address.c: #include "gmime-parse-utils.h" which is
760	where a bunch of the parser functions have been moved from here.
761
762	* gmime-utils.c: #include "gmime-parse-utils.h" for decode_lwsp()
763	and decode_domain()
764	(decode_addrspec): Moved here from internet-address.c which had
765	been exporting the symbol previously (so that decode_domain didn't
766	have to be copy/pasted). Now this function can be made static -
767	yay! No more exporting un-namespaced symbols!
768
769	* gmime/gmime-message.c: #include "gmime-parse-utils.h" for
770	decode_lwsp()
771
772	* gmime/gmime-parse-utils.[c,h]: New source files containing some
773	parse utility functions that had been copy/pasted between several
774	source files previously.
775
7762007-03-25  Jeffrey Stedfast  <fejj@gnome.org>
777
778	* README: Bumped version
779
780	* configure.in: Bumped version to 2.2.5
781
7822007-03-25  Jeffrey Stedfast  <fejj@gnome.org>
783
784	* tests/Makefile.am (local-check): Simplified.
785
786	* tests/test-streams.c: Generate our own test data if we aren't
787	given any.
788
789	* tests/test-cat.c: Updated for the new Makefile.am rule.
790
791	* gmime/gmime-stream-mmap.c (stream_length): Fixed to return the
792	correct length when bound_end == -1 but bound_start != 0.
793	Discovered this thanks to my new testsuite.
794
795	* gmime/internet-address.c (decode_mailbox): If we can't find a
796	local-part and inptr is ',', set *in = inptr; rather than *in =
797	inptr + 1; Discovered this bug thanks to my new testsuite.
798
799	* tests/test-mime.c: Rewritten to use testsuite library.
800
8012007-03-24  Jeffrey Stedfast  <fejj@gnome.org>
802
803	* tests/Makefile.am (check-local): Rewritten to actually run the
804	automated tests.
805
806	* tests/test-mbox.c: Rewritten to use testsuite library.
807
808	* tests/test-pgp.c: Rewritten to use testsuite library.
809
810	* tests/test-pgpmime.c: Rewritten to use testsuite library.
811
812	* tests/test-cat.c: Rewritten to use testsuite library.
813
814	* tests/test-streams.c: Rewritten to use testsuite library.
815
816	* tests/test-iconv.c: Rewritten to use testsuite library.
817
818	* tests/testsuite.[c,h]: New automated test-suite helper library.
819
8202007-03-20  Jeffrey Stedfast  <fejj@gnome.org>
821
822	* configure.in: Check for the existance of _timezone and nfds_t.
823
824	* gmime/gmime-utils.c (mktime_utc): Use _timezone if
825	HAVE__TIMEZONE is set.
826
827	* gmime/gmime.c (g_mime_init): If HAVE_TIMEZONE or HAVE__TIMEZONE
828	is set, call tzset() to initialise the timezone variable.
829
8302007-03-12  Jeffrey Stedfast  <fejj@gnome.org>
831
832	* gmime/gmime-param.c (decode_param): Instead of only checking
833	that the param value begins with "=?", check if that sequence
834	exists anywhere in the value. Fixes bug #407522.
835
836	* src/uudecode.c (uudecode): Use a strcmp instead of comparing
837	against a string literal (which was technically correct in this
838	case, but the prettyification would be nice if "-" was specified
839	in argv too). Fixes bug #408613.
840
8412007-03-10  Jeffrey Stedfast  <fejj@gnome.org>
842
843	* gmime/gmime-message.c (g_mime_message_get_all_recipients): New
844	convenience function to get To, Cc, and Bcc recipients all in a
845	single list.
846
8472007-02-19  Jeffrey Stedfast  <fejj@gnome.org>
848
849	* gmime/gmime-message.h: Moved g_mime_message_get_body() into the
850	deprecated block.
851
8522007-02-11  Jeffrey Stedfast  <fejj@gnome.org>
853
854	* gmime/gmime-utils.c: Removed the need for the ctype isblank()
855	function.
856
857	* gmime/gmime-param.c (decode_int): Need to use (unsigned char *)
858	when passing indexes to ctype functions.
859
8602007-02-10  Jeffrey Stedfast  <fejj@gnome.org>
861
862	* gmime/gmime-charset.c: Changed the names of the charset format
863	macros to coincide with the new names output by iconv-charset.c.
864	(g_mime_charset_iconv_name): Use the new macro names.
865
866	* iconv-detect.c: Use %u instead of %d, also changed the names of
867	the format #defines that we print out.
868
869	* gmime/gmime-utils.c (g_mime_utils_quote_string): Optimise a
870	smidgen.
871	(g_mime_utils_unquote_string): Fixed, this wasn't working right...
872
8732007-02-09  Jeffrey Stedfast  <fejj@gnome.org>
874
875	* gmime/gmime-stream-filter.c (stream_write): Instead of comparing
876	the return value of the source stream write() to our input length
877	to write, compare to -1. We can't assume the the value the source
878	stream will return will be what we expected, all we can do is
879	check for error.
880
881	* gmime/gmime-part.c: Same as below.
882
883	* gmime/gmime-filter-basic.c: Fixes to signedness compile warnings
884	and updated to reflect gmime-utils.h changes.
885
886	* gmime/gmime-multipart.c (multipart_set_boundary): Updated to
887	reflect gmime-utils.h changes.
888
889	* gmime/gmime-stream.c (g_mime_stream_writev): If any of the
890	writes fail, return -1.
891
892	* gmime/gmime-utils.c: header_encode_*() and header_decode_*() now
893	take const char * rather than const unsigned char *
894	arguments. This has been done in an effort to fix compile warnings
895	about signed vs unsigned char * pointers. The 'save' argument to
896	all of the stream encoders/decoders have been changed to a
897	guint32, again for signed vs unsigned warning fixes.
898
8992007-02-08  Jeffrey Stedfast  <fejj@gnome.org>
900
901	* README: Bumped version
902
903	* configure.in: Bumped version to 2.2.4
904
9052007-02-06  Jeffrey Stedfast  <fejj@gnome.org>
906
907	Fix for bug #394433
908
909	* configure.in: Detect if the system has GNU's getopt
910	implementation available for us to use.
911
912	* Makefile.am: Don't build our own copy of the GNU getopt library
913	if the system has it available.
914
915	* src/uuencode.c: If the system has getopt.h, use it instead of
916	our own getopt.h.
917
918	* src/uudecode.c: If the system has getopt.h, use it instead of
919	our own getopt.h.
920
9212007-02-06  Jeffrey Stedfast  <fejj@gnome.org>
922
923	More fixes on account of my test suite...
924
925	* tests/test-cat.c (test_cat_substream): end = start + random
926	amount... duh. Fixes a bug where sometimes the end bound was < the
927	start bound.
928
929	* gmime/gmime-stream-cat.c (stream_substream): Calculate the
930	length of each of the source streams correctly. D'oh.
931	(stream_substream): Fixed the calculation for s->start.
932	(stream_substream): Fixed the s->end calculation for when end
933	within the source stream's bounds.
934	(stream_substream): Keep track of how long our substream is going
935	to be for use with setting absolute bound_end on a multi-stream
936	substream.
937
9382007-02-05  Jeffrey Stedfast  <fejj@gnome.org>
939
940	Fixes on account of the awesome test suite I wrote earlier... still
941	need to fix ::substream() tho (or maybe it's just the test that's
942	broke?).
943
944	* gmime/gmime-stream-cat.c: Added an id member to struct
945	_cat_node, for use with debugging...
946	(stream_read): Seek in the source stream, don't call
947	Cat::stream_seek() to do it.
948	(stream_seek): Swapped the logic of the "within bounds" check, had
949	it backwards. When seeking past a stream, set the node->position
950	to the length of the stream (technically, it's like we read() thru
951	all that data, right?). Instead of resetting all streams starting
952	at n->next, reset them all starting at current->next... since 'n'
953	technically might be before 'current'.
954	(g_mime_stream_cat_add_source): Assign each node an id for easier
955	debugging...
956
9572007-02-05  Jeffrey Stedfast  <fejj@gnome.org>
958
959	* tests/test-cat.c: The beginnings of a test suite for
960	GMimeStreamCat.
961
962	* gmime/gmime-stream-cat.c (stream_read): Go to the next stream if
963	nread <= 0, not just nread == 0.
964
9652007-02-04  Jeffrey Stedfast  <fejj@gnome.org>
966
967	* gmime/gmime-stream-mem.c (stream_reset): No longer need to
968	update stream->position.
969
970	* gmime/gmime-stream-mmap.c (stream_reset): Same g_return_if_fail
971	change. Also don't update stream->position.
972	(stream_seek): Added similar sanity checking/eos resetting as
973	StreamFs code.
974
975	* gmime/gmime-stream-file.c (stream_read): Style changes.
976	(stream_write): Style changes.
977	(stream_close): Fixed compiler warning.
978	(stream_reset): Changed g_return_if_fail to a true if-then.
979	(stream_seek): Changed to mimic the StreamFs changes.
980	(g_mime_stream_file_new): Similar to fs_new() change.
981
982	* gmime/gmime-stream-fs.c (stream_close): Loop the close()
983	ourselves.
984	(stream_reset): Changed g_return_if_fail to a true if-then. Also
985	be better about resetting eos.
986	(stream_seek): Rewritten to be more correct/robust (at least I
987	hope). Also properly reset eos when appropriate.
988	(g_mime_stream_fs_new): If lseek() fails, pretend start offset is
989	0.
990
991	* gmime/gmime-stream.c (stream_reset): No longer needs to update
992	stream->position.
993	(g_mime_stream_reset): Update stream->position if everything reset
994	smoothly. This is just a convenience change to subclass
995	implementations.
996
997	* gmime/gmime-stream-cat.c (stream_read): Rewritten. Hopefully
998	correct now? Ugh. We can hope...
999	(stream_write): Fixed to work better.
1000	(stream_close): Rewritten.
1001	(stream_reset): Rewritten to reset the streams, don't seek.
1002	(stream_seek): Rewritten... still not correct, but should be ok
1003	assuming our bound_start is 0.
1004	(stream_length): Rewritten to not depend on a pre-calculated
1005	length value... this Does Not Work (tm) if the source streams are
1006	unbound and we've written to them.
1007	(stream_substream): Rewritten... because ::seek() is so complex
1008	for this type of stream, I've tried to eliminate a lot of the
1009	headaches by making substreams only slurp up the streams within
1010	the bounds of the start/end requested. If the entire contents
1011	within the requested bounds are contained within a single source
1012	stream, we return a substream of said source stream instead.
1013	(g_mime_stream_cat_add_source): Don't precalculate the length here
1014	anymore.
1015
1016	* gmime/gmime-stream-buffer.c (stream_read): Fixed to never allow
1017	buflen to be negative if the read() of our source stream fails.
1018	(stream_close): Handle the case where we've already been closed.
1019	(stream_eos): Simplified.
1020	(stream_reset): Stylistic changes.
1021	(stream_seek): Don't allow seeks under our bound_start.
1022
10232007-02-03  Jeffrey Stedfast  <fejj@gnome.org>
1024
1025	* gmime/gmime-stream-cat.c (stream_flush): Flush all streams up to
1026	and including the current stream, not just the current stream.
1027	(stream_write): break if we don't write any data to
1028	current->stream or get an error so we can try the next stream.
1029
1030	* gmime/gmime-stream-file.c (stream_close): Same as below.
1031
1032	* gmime/gmime-stream-fs.c (stream_close): Allow closing multiple
1033	times... makes this consistant with the other streams.
1034	(stream_write): If a system write fails with EFBIG or ENOSPC, set
1035	eos to TRUE.
1036
10372007-01-20  Jeffrey Stedfast  <fejj@gnome.org>
1038
1039	* tests/test-streams.c (test_stream_gets): printf formatter fixes.
1040
1041	* examples/imap-example.c: #include <glib/gstdio.h>, fixes bug
1042	#394434.
1043
10442007-01-20  Jeffrey Stedfast  <fejj@gnome.org>
1045
1046	Fixes bug #394419
1047
1048	* gmime/gmime-filter-charset.c (filter_filter): Do iconv const
1049	casting.
1050	(filter_complete): Same.
1051
10522006-11-02  Jeffrey Stedfast  <fejj@novell.com>
1053
1054	* gmime/gmime-utils.c (g_mime_utils_header_format_date): Changed
1055	the names of the parameters to date and tz_offset to prevent
1056	warnings from -Wshadow.
1057
1058	* gmime/gmime-filter-html.c (writeln): Fixed another possible
1059	buffer overflow condition pointed out by hpj.
1060
1061	* gmime/gmime-filter-crlf.c (filter_filter): Fixed a possible
1062	buffer overflow condition pointed out by hpj.
1063
1064	* gmime/gmime-gpg-context.c (gpg_ctx_op_step): Modified to use
1065	poll() rather than select()
1066
10672006-09-18  Joe Shaw  <joeshaw@novell.com>
1068
1069	* mono/Makefile.am: Use SOURCES_XML instead of XML_SOURCES to
1070	specify the sources.xml file.  XML_SOURCES breaks with newer
1071	automakes.
1072
10732006-08-29  Pawel Salek  <pawsa@theochem.kth.se>
1074
1075	* gmime/gmime-message-partial.c: set buf just before use - since
1076	the mem stream buffer may get reallocated in the meantime leading
1077	to segfaults.
1078
10792006-08-29  Jeffrey Stedfast  <fejj@novell.com>
1080
1081	* gmime/gmime-param.c (decode_quoted_string): Unescape escape
1082	sequences. Fixes bug #352771.
1083
1084	* gmime/gmime-message.c (g_mime_message_set_subject): Updated the
1085	docs.
1086	(g_mime_message_get_subject): Same.
1087
10882006-08-21  Peter Bloomfield  <peterbloomfield@bellsouth.net>
1089
1090	* gmime/gmime-utils.c (g_mime_utils_unquote_string): handle an
1091	arbitrary sequence of quoted and unquoted sections.
1092
10932006-08-02  Jeffrey Stedfast  <fejj@novell.com>
1094
1095	* README: Bumped version
1096
1097	* configure.in: Bumped version to 2.2.3
1098
1099	* gmime/gmime-message.c (process_header): Decode the values for
1100	Subject, From, Reply-To so that g_mime_message_get_subject/etc all
1101	return decoded strings like they were meant to.
1102
11032006-06-23  Jeffrey Stedfast  <fejj@novell.com>
1104
1105	* gmime/gmime-gpg-context.c (swrite): Use g_build_filename() and
1106	g_get_tmp_dir() rather than hard-coding the tmpfile to be in /tmp.
1107
11082006-06-23  Jeffrey Stedfast  <fejj@novell.com>
1109
1110	* gmime/gmime-part.c: Use g_ascii_* versions of str[n]casecmp.
1111
1112	* gmime/gmime-parser.c: Use g_ascii_* versions of str[n]casecmp.
1113
1114	* gmime/gmime-param.c: Use g_ascii_* versions of str[n]casecmp.
1115
1116	* gmime/gmime-multipart-signed.c: Use g_ascii_* versions of
1117	str[n]casecmp.
1118
1119	* gmime/gmime-multipart-encrypted.c: Use g_ascii_* versions of
1120	str[n]casecmp.
1121
1122	* gmime/gmime-multipart.c: Use g_ascii_* versions of
1123	str[n]casecmp.
1124
1125	* gmime/gmime-message-partial.c: Use g_ascii_* versions of
1126	str[n]casecmp.
1127
1128	* gmime/gmime-message-part.c: Use g_ascii_* versions of
1129	str[n]casecmp.
1130
1131	* gmime/gmime-message.c: Use g_ascii_* versions of str[n]casecmp.
1132
1133	* gmime/gmime-iconv.c (g_mime_iconv_open): Use g_ascii_* versions
1134	of str[n]casecmp.
1135
1136	* gmime/gmime-header.c (g_mime_header_new): Use
1137	g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
1138	reuse code.
1139
1140	* gmime/gmime-gpg-context.c: Use g_ascii_* versions of
1141	str[n]casecmp.
1142
1143	* gmime/gmime-filter-enriched.c: Use g_ascii_* versions of
1144	str[n]casecmp.
1145
1146	* gmime/gmime-disposition.c (g_mime_disposition_add_parameter):
1147	Use g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
1148	reuse code.
1149	(g_mime_disposition_new): Same.
1150	(param_equal): Removed.
1151	(param_hash): Removed.
1152
1153	* gmime/gmime-content-type.c: Use g_ascii_* versions of
1154	str[n]casecmp.
1155	(g_mime_content_type_new_from_string): Use
1156	g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
1157	reuse code.
1158	(g_mime_content_type_set_parameter): Same.
1159	(param_equal): Removed.
1160	(param_hash): Removed.
1161
1162	* gmime/gmime-charset.c: Use g_ascii_* versions of str[n]casecmp.
1163
11642006-06-23  Jeffrey Stedfast  <fejj@novell.com>
1165
1166	* gmime/gmime-stream-cat.c (stream_seek): Fixed to only seek if
1167	necessary and also to use ::reset() if seeking back to the
1168	beginning of the stream so that it works for non-seekable streams
1169	too. Fixes bug #345503 - again thanks to Charles for reporting
1170	this bug.
1171
1172	* gmime/gmime-object.c (subtype_bucket_foreach): Fixed to also
1173	free the bucket memory. Fixes bug #345768, thanks to Charles Kerr
1174	for pointing this out.
1175
11762006-06-22  Jeffrey Stedfast  <fejj@novell.com>
1177
1178	* gmime/gmime-gpg-context.c: Removed #define _POSIX_SOURCE to fix
1179	bug #172179.
1180
11812006-06-15  Jeffrey Stedfast  <fejj@novell.com>
1182
1183	* README: Bumped version
1184
1185	* configure.in: Bumped version to 2.2.2
1186
11872006-06-01  Jeffrey Stedfast  <fejj@novell.com>
1188
1189	* gmime/gmime-utils.c (parse_broken_date): Fixed to handle
1190	MM-DD-YY properly and also to fallback to DD-MM-YY if the first
1191	pair of digits isn't within range for a proper month.
1192
11932006-05-30  Jeffrey Stedfast  <fejj@novell.com>
1194
1195	* gmime.h.in: Removed.
1196
1197	* gmime.h: Now static, no longer auto-generated.
1198
1199	* gmime/gmime.c: Set the gmime_[major,minor,micro]_version
1200	variables.
1201	(g_mime_check_version): New function to check the required
1202	version.
1203
1204	* gmime/gmime-stream-fs.c: Implement our own no-op version of
1205	fsync() for systems that don't have fsync().
1206
12072006-05-24  Jeffrey Stedfast  <fejj@novell.com>
1208
1209	* examples/imap-example.c (main): Use g_mkdir() to make this
1210	example portable to Win32.
1211
12122006-05-01  Jeffrey Stedfast  <fejj@novell.com>
1213
1214	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Handle prompts
1215	from GnuPG asking for the user's PIN for their SmartCard.
1216
12172006-04-21  Jeffrey Stedfast  <fejj@novell.com>
1218
1219	* gmime/gmime-stream.h: #include <stdio.h> for SEEK_SET/CUR/END
1220	enum values.
1221
12222006-03-16  Jeffrey Stedfast  <fejj@novell.com>
1223
1224	* README: Bumped version
1225
1226	* configure.in: Bumped version to 2.2.1
1227
1228	* gmime/gmime-parser.c (parser_step): No-op if we are in an ERROR
1229	state.
1230	(parser_construct_message): Don't bail if we don't start in state
1231	INIT, this is valid.
1232	(parser_step_from): We need to bail even if parser_fill() returns
1233	> 0 if the line is incomplete (e.g. a forced refill was needed but
1234	no additional data could be read).
1235
12362006-03-16  Jeffrey Stedfast  <fejj@novell.com>
1237
1238	* README: Bumped version
1239
1240	* configure.in: Bumped version to 2.2.0, it's about time I made a
1241	stable release.
1242
12432006-03-15  Jeffrey Stedfast  <fejj@novell.com>
1244
1245	* gmime/gmime-parser.c (parser_step_from): If we fail to find a
1246	From line, set an error state. Also fixed the End-Of-Data check to
1247	prevent an infinite loop if the stream ends with \n\n.
1248	(parser_construct_message): Make sure our state starts off at
1249	INIT. Also check for the ERROR state in our parser_step() loop and
1250	return NULL if we encounter an error.
1251
12522006-03-03  Jeffrey Stedfast  <fejj@novell.com>
1253
1254	* util/url-scanner.c (g_url_web_end): Allow urls such as
1255	"http://www.novell.com./path" (note the '.' before the path
1256	component).
1257	(g_url_addrspec_start): If the '@' is the first character in the
1258	match, then it isn't a valid email address.
1259
12602006-01-12  Jeffrey Stedfast  <fejj@novell.com>
1261
1262	* configure.in: Bumped version to 2.1.19
1263
12642006-01-19  Joe Shaw  <joeshaw@novell.com>
1265
1266	* mono/DataWrapper.custom: We need to manually create a decoding
1267	filtering stream and wrap that in a StreamWrapper rather than the
1268	DataWrapper's GMimeStream directly, which contains undecoded data.
1269
1270	* mono/GMime.metadata: Rename some enum members, add DataWrapper's
1271	GMimeStream property and MimePart's ContentObject properties as
1272	items which return an owned ref.
1273
12742006-01-12  Jeffrey Stedfast  <fejj@novell.com>
1275
1276	** made a release of 2.1.18 **
1277
1278	* gmime/gmime-stream-mem.c (g_mime_stream_mem_get_byte_array): Use
1279	g_return_val_if_fail() rather than g_return_if_fail() since we
1280	need to return NULL on error.
1281
12822006-01-09  Joe Shaw  <joeshaw@novell.com>
1283
1284	* mono/Message.custom: Add a References property.  Based on a
1285	patch from D Bera <dbera.web@gmail.com>
1286
12872006-01-05  Joe Shaw  <joeshaw@novell.com>
1288
1289	* configure.in: Require gtk-sharp 2.4.0.  Set the mono API version
1290	to <major>.<minor>.0.<interface>, which initially is set to
1291	2.1.0.0, so that version numbers are handled better with gmime
1292	upgrades (and hopefully RPM deps on most distros).  Bump version
1293	to 2.1.18.
1294
1295	* README: Updated version
1296
1297	* gmime/gmime-stream-mem.[ch]: Add a
1298	g_mime_stream_mem_get_byte_array() method for the mono bindings.
1299
1300	* mono/DataWrapper.custom:
1301	* mono/Header.custom:
1302	* mono/Object.custom: Remove WriteToStream() and replace with a
1303	new Stream property which returns a wrapped gmime memory stream.
1304
1305	* mono/GMime.metadata: A bunch of metadata fixes, mainly for
1306	64-bit compatibility.  gtk-sharp incorrectly maps off_t to size_t,
1307	which is an int; it's actually a long, so map it manually
1308	ourselves.
1309
1310	* mono/ObjectStream.cs: Remove this; it's been replaced by
1311	StreamWrapper, which is much more memory efficient.
1312
1313	* mono/Stream.custom: Seek() returns a long.  Remove the
1314	CopyToStream() and WriteToStream() methods, since streams can now
1315	just be wrapped with a StreamWrapper.  Implement the Read()
1316	method, and return a long.
1317
1318	* mono/StreamWrapper.cs: Added.  Wraps a GMime.Stream in a
1319	System.IO.Stream.
1320
1321	* mono/gmime-api.raw: Regenerated.
1322
13232005-11-14  Jeffrey Stedfast  <fejj@novell.com>
1324
1325	* gmime/gmime-utils.c (g_mime_references_next): Added for the C#
1326	bindings.
1327
13282005-10-12  Jeffrey Stedfast  <fejj@novell.com>
1329
1330	* README: Updated version
1331
1332	* configure.in: Bumped version to 2.1.17
1333
1334	* gmime/gmime-message.c (message_get_header): For added
1335	convenience, if the requested header is a Content-* header and a
1336	top-level MIME part exists, query for the requested header on the
1337	top-level MIME part and return the value.
1338
1339	* gmime/gmime-parser.c (parser_step_headers): If we weren't able
1340	to find the end of the header, save it to our tmp buff before
1341	refilling our input buffer and set midline to TRUE. No need to
1342	check inptr < inend later because we know it to be true.
1343	(parser_step_headers): Append the raw header leftovers in the
1344	parser_fill() failure case.
1345
13462005-09-27  Jeffrey Stedfast  <fejj@novell.com>
1347
1348	* gmime/gmime-message-partial.c
1349	(g_mime_message_partial_split_message): Reworked the splitting
1350	logic to try and split on whole-lines.
1351
1352	* gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
1353	Return NULL if the number of parts is incorrect.
1354
13552005-09-20  Jeffrey Stedfast  <fejj@novell.com>
1356
1357	* gmime/gmime-message-partial.c (header_copy): Only set the value
1358	if the value is non-NULL. Thanks to Peter Bloomfield for this fix.
1359
13602005-08-18  Jeffrey Stedfast  <fejj@novell.com>
1361
1362	* README: Updated version
1363
1364	* configure.in: Bumped version to 2.1.16
1365
13662005-08-18  Joe Shaw  <joeshaw@novell.com>
1367
1368	* mono/Makefile.am: Install gmime-api.xml into gapi-2.0
1369
13702005-08-17  Joe Shaw  <joeshaw@novell.com>
1371
1372	* configure.in: Require gtk-sharp 2 for the mono bindings.
1373
1374	* mono/GMime.metadata: Rename a few items that the gtk-sharp 2
1375	parser added.
1376
1377	* mono/gmime-api.raw: Regengerate this using the gtk-sharp 2
1378	parser.
1379
13802005-08-16  Joe Shaw  <joeshaw@novell.com>
1381
1382	* mono/Makefile.am: libexecdir isn't right; we should be using
1383	$prefix/lib instead.
1384
13852005-07-12  Jeffrey Stedfast  <fejj@novell.com>
1386
1387	* mono/Makefile.am: libexecdir fixes by Stanislav
1388
1389	* gmime/internet-address.c: Fixes to various functions that used
1390	incorrect g_return*_if_fail variants. Thanks to sbrabec@suse.cz
1391
13922005-06-23  Jeffrey Stedfast  <fejj@novell.com>
1393
1394	* gmime/gmime-utils.c (g_mime_utils_header_decode_date): Handle
1395	the case where the number of tokens returned from datetok is 0
1396	which can happen if broken software sends an empty Date: header.
1397
13982005-06-13  Jeffrey Stedfast  <fejj@novell.com>
1399
1400	* README: Updated
1401
1402	* configure.in: Bumped version to 2.1.15
1403
1404	* gmime/gmime-parser.c (parser_step_headers): Don't check
1405	inptr[-1] unless inptr > start
1406
14072005-06-10  Joe Shaw  <joeshaw@novell.com>
1408
1409	* mono/Stream.custom (CopyToStream): Check to see if
1410	byte_array.data is IntPtr.Zero and don't try to copy if it is.
1411
14122005-06-10  Joe Shaw  <joeshaw@novell.com>
1413
1414	* mono/DataWrapper.custom: Added.  Adds a WriteToStream() overload
1415	which takes a System.IO.Stream.
1416
1417	* mono/Header.custom: Ditto.
1418
1419	* mono/Makefile.am: Add DataWrapper.custom and Header.custom to
1420	customs.
1421
1422	* mono/Object.custom: Remove the GetData() method... it was rather
1423	flawed.  WriteToStream() is the right way to go about it now.  Add
1424	a WriteToStream() overload like DataWrapper and Header.
1425
1426	* mono/Stream.custom: Add an internal CopyToStream() method which
1427	instantiates a GMime.StreamMem, calls WriteToStream() on it, and
1428	then copies the data from the GByteArray into a System.IO.Stream.
1429	Also add a WriteToStream() overload like the others.
1430
14312005-05-25  Joe Shaw  <joeshaw@novell.com>
1432
1433	* mono/GMime.metdata: Add a few extra rules since the
1434	parser/generator changed how certain types are represented.
1435
1436	* mono/InternetAddress.custom: Remove this file, move the code to...
1437
1438	* mono/InternetAddressList.cs: ... this file, making it a
1439	first-order object.  Since it implements IDisposable and people
1440	might want to explicitly dispose it.
1441
1442	* mono/Message.custom (GetRecipients): Return an
1443	InternetAddressList rather than an ICollection, so people can
1444	dispose when finished.  Also have it always return a valid
1445	InternetAddressList, so you don't have to do a null check before a
1446	foreach.
1447
1448	* mono/Makefile.am: Remove InternetAddress.custom from customs and
1449	add InternetAddressList.cs to sources.
1450
14512005-05-25  Joe Shaw  <joeshaw@novell.com>
1452
1453	* gmime/internet-address.c: Add accessor functions
1454	internet_address_get_type(), internet_address_get_name(),
1455	internet_address_get_addr() and internet_address_get_members() for
1456	binding into the Mono bindings.
1457
1458	* mono/GMime.metadata: Work around an automatic rename of the
1459	gtk-sharp generator of a method named "GetType" to a property
1460	named "GType," since this method doesn't return a GType.  Rename
1461	it to "GetAddressType" which is mapped to an "AddressType"
1462	property.
1463
1464	* mono/gmime-api.raw: Regenerated.
1465
14662005-05-20  Jeffrey Stedfast  <fejj@novell.com>
1467
1468	* gmime/gmime-utils.c (header_fold): Eat up extraneous whitespace
1469	after forcing a fold.
1470
14712005-03-30  Tim Mooney <Tim.Mooney@ndsu.edu>
1472
1473	* tests/test-stream.c: include <glib.h>, so we can use G_GNUC_FUNCTION
1474	and therefore compile with non-gcc compilers.
1475
14762005-04-14  Jeffrey Stedfast  <fejj@novell.com>
1477
1478	* configure.in: Applied patch from
1479	mooney@dogbert.cc.ndsu.nodak.edu to not assume that mcs was GNU
1480	Mono and to instead verify that it was. Fixes bug #172175.
1481
14822005-03-29  Jeffrey Stedfast  <fejj@novell.com>
1483
1484	* README: Updated.
1485
1486	* configure.in: Bumped version to 2.1.14
1487
1488	* gmime/gmime-parser.c (parser_step_headers): If we didn't find
1489	EOL for a header, set state based on 'inptr' rather than
1490	'start'. Fixes a bug parsing headers that cross read boundaries
1491	(and where headers are longer than the internal read-ahead buffer
1492	size).
1493
14942005-03-23  Joe Shaw  <joeshaw@novell.com>
1495
1496	* configure.in: Require gtk-sharp >= 1.0.6 for important
1497	memory leak fixes
1498
14992005-03-15  Joe Shaw  <joeshaw@novell.com>
1500
1501	* mono/Makefile.am: Build ObjectStream.cs
1502
1503	* mono/ObjectStream.cs: Added.  Implements a .net Stream for
1504	getting the conents from a GMime.Object.
1505
15062005-03-12  Joe Shaw  <joeshaw@novell.com>
1507
1508	* mono/GMime.metadata: Tag the return values of
1509	MessagePart.Message, Message.MimePart, Multipart.GetPart() and
1510	Multipart.GetSubpartFromContentId() as "owned", meaning that
1511	gtk-sharp should not ref them but take ownership of the single
1512	reference that's returned from the underlying C functions.
1513
1514	* mono/Message.custom: Don't instantiate InternetAddress
1515	objects, just deal with the C APIs directly.  This saves us a
1516	lot of allocations and fixes a bug in gtk-sharp where opaque
1517	objects would leak references.
1518
15192005-03-07  Jeffrey Stedfast  <fejj@novell.com>
1520
1521	* gmime/gmime-header.c (g_mime_header_prepend): New function to
1522	prepend a header to the list.
1523
15242005-03-07  Jeffrey Stedfast  <fejj@novell.com>
1525
1526	* README: Updated.
1527
1528	* configure.in: Bumped version to 2.1.13
1529
1530	* gmime/gmime-charset.c (g_mime_charset_step): Don't bother with
1531	MAX() for cases where we'll just end up setting level to 2.
1532
15332005-03-07  Joe Shaw  <joeshaw@novell.com>
1534
1535	* mono/GMime.metadata: Add the "owned" flag to the return
1536	value parameter for ConstructMessage on the GMimeParser,
1537	because this method returns a new object with a refcount
1538	of 1.  The binding needs to take ownership of the object.
1539
15402005-02-14  Jeffrey Stedfast  <fejj@novell.com>
1541
1542	* README: Updated
1543
1544	* configure.in: Bumped version to 2.1.12
1545
15462005-01-31  Jeffrey Stedfast  <fejj@novell.com>
1547
1548	* gmime/gmime-utils.c (header_fold): Don't break apart rfc2047
1549	encoded tokens.
1550
15512005-01-18  Jeffrey Stedfast  <fejj@novell.com>
1552
1553	* README: Updated
1554
1555	* configure.in: Bumped version to 2.1.11
1556
15572005-01-26  Joe Shaw  <joeshaw@novell.com>
1558
1559	* mono/GMime.metdata: The gtk-sharp generator doesn't handle
1560	"const unsigned char *" well, so override those methods in
1561	metadata.
1562
15632005-01-20  Jeffrey Stedfast  <fejj@novell.com>
1564
1565	* gmime/gmime-param.c (param_list_format): If folding mode is
1566	enabled, terminate the header with a \n.
1567
15682005-01-19  Jeffrey Stedfast  <fejj@novell.com>
1569
1570	* gmime/gmime-part.c (g_mime_part_init): Register a writer for
1571	Content-Disposition.
1572
1573	* gmime/gmime-object.c (g_mime_object_init): Register a new writer
1574	func for Content-Type headers so that we don't accidently fold in
1575	the middle of a parameter value.
1576
15772005-01-13  Joe Shaw  <joeshaw@novell.com>
1578
1579	* autogen.sh: Allow automake 1.9
1580
15812005-01-11  Jeffrey Stedfast  <fejj@novell.com>
1582
1583	* README: Updated
1584
1585	* configure.in: Bumped version to 2.1.10
1586
15872004-12-10  Jeffrey Stedfast  <fejj@ximian.com>
1588
1589	* gmime/internet-address.c (internet_address_to_string): rfc2047
1590	encode the group name too.
1591
15922004-12-08  Jeffrey Stedfast  <fejj@ximian.com>
1593
1594	* gmime/gmime-content-type.c (g_mime_content_type_is_type): Fixed
1595	to do as advertised - allow wildcard matching for type.
1596
15972004-12-06  Joe Shaw  <joeshaw@novell.com>
1598
1599	* mono/Makefile.am: Add InternetAddress.custom
1600
1601	* mono/InternetAddress.custom: Added.  Implements a new class
1602	which will handle the destroying of InternetAddressLists.
1603	Implement ParseString, which basically implements a managed
1604	version of internet_address_parse_string.
1605
1606	* mono/Message.custom: Use the InternetAddressList for
1607	GetRecipients ().
1608
16092004-12-01  Joe Shaw  <joeshaw@novell.com>
1610
1611	* configure.in: Error out if the user explicitly enables the mono
1612	bindings and we can't find mcs.
1613
1614	* gmime.spec.in: Add support for the mono bindings, placing them
1615	in a separate gmime-sharp package.  Patch from Ryan Skadberg
1616	<skadz@stigmata.org>
1617
16182004-11-29  Joe Shaw  <joeshaw@novell.com>
1619
1620	* mono/AssemblyInfo.cs.in: Add @srcdir@ to AssemblyKeyFile so we
1621	build when builddir != srcdir.
1622
1623	* mono/Makefile.am: Add gmime-sharp.pub to EXTRA_DIST.
1624
16252004-11-27  Jeffrey Stedfast  <fejj@ximian.com>
1626
1627	* gmime/gmime-gpg-context.c: #define _POSIX_SOURCE so it compiles
1628	on IRIX.
1629
1630	* gmime/gmime-multipart-signed.c (multipart_signed_remove_header):
1631	Same.
1632
1633	* gmime/gmime-multipart-encrypted.c
1634	(multipart_encrypted_remove_header): Don't return.
1635
16362004-11-19  Joe Shaw  <joeshaw@novell.com>
1637
1638	* mono/GMime.metadata: Don't autogenerate get GetDate method
1639
1640	* mono/Message.custom: Implement it by hand and return a DateTime.
1641
16422004-11-17  Joe Shaw  <joeshaw@novell.com>
1643
1644	* mono/GMime.metadata: More metadata goodness.
1645
1646	* mono/Makefile.am: Added Object.custom and Stream.custom.
1647
1648	* mono/Object.custom: Add a GetData() method which returns a byte
1649	array of the object's data.
1650
1651	* mono/Stream.custom: Add a wrapper around Seek() so that you
1652	don't need to specify whence.
1653
16542004-11-16  Joe Shaw  <joeshaw@novell.com>
1655
1656	* configure.in: Generate mono/gmime-sharp.pc.
1657
1658	* mono/GMime.metadata: Convert all ssize_t and off_t values to
1659	ints in C#, since they're not automatically handled by the
1660	generator right now.
1661
1662	* mono/Makefile.am: Install the gmime-sharp stuff as gmime-sharp
1663	and not gmime.
1664
1665	* mono/gmime-sharp.pc.in: Added.  pkgconfig file for the mono
1666	bindings.
1667
16682004-11-16  Joe Shaw  <joeshaw@novell.com>
1669
1670	* Makefile.am: iconv-detect.h should be in DISTCLEANFILES, not
1671	CLEANFILES, or else the build fails following a "make clean"
1672	unless you re-autogen.
1673
1674	* gmime/internet-address.[ch]: Added functions
1675	internet_address_list_next() and
1676	internet_address_list_get_address() since we can't poke at the
1677	structures by hand in mono.
1678
1679	* mono/GMime.metadata: Remove a bunch of commented out stuff, hide
1680	the entire InternetAddressList structure.  We'd prefer to do it
1681	with .net datatypes.
1682
1683	* mono/Message.custom: Added.  Adds a GetRecipients() method which
1684	returns an ICollection of InternetAddresses, and a
1685	GetRecipientsAsString() method which returns a stringified list
1686	for pretty printing.
1687
1688	* mono/gmime-api.raw: Regenerate this for the new
1689	InternetAddress.GetAddress() and Next() methods.
1690
16912004-11-15  Joe Shaw  <joeshaw@novell.com>
1692
1693	* Added a mono binding
1694
1695	* configure.in: Add optional checks for mono and gtk-sharp.
1696
1697	* Makefile.am: Build the mono subdir if enabled.
1698
1699	* gmime/Makefile.am: Add $(GLIB_LIBS) to the libgmime LIBADD line.
1700
1701	* gmime/*.h: Replace GMIME_CHECK macros with the G_TYPE_CHECK
1702	ones, because the gtk-sharp binding generator looks for them.
1703
1704	* gmime/gmime-type-utils.h: Removed.
1705
1706	* mono/AssemblyInfo.cs.in: Added.
1707
1708	* mono/sources.xml: Added. The sources file, which tells the
1709	generator how to generate the API data.
1710
1711	* mono/GMime.metadata: Added. Metadata file used to tweak the
1712	generated API.
1713
1714	* mono/Global.custom: Added.  The g_mime_init() function isn't
1715	being wrapped automatically for some reason, so add the code here.
1716
1717	* mono/gmime-api.raw: Added.  The raw generated API, so that the
1718	parser doesn't have to be run by most people.
1719
1720	* mono/gmime-sharp.pub: Added. Public key used to sign the
1721	assembly.
1722
17232004-10-22  Jeffrey Stedfast  <fejj@ximian.com>
1724
1725	* configure.in: Removed the --enable-ipv6 option. getaddrinfo is
1726	now the only way hostname resolution is done. Added checks to see
1727	if getaddrinfo requires -lsocket for Solaris boxen.
1728
1729	* gmime/gmime-host-utils.[c,h]: Removed
1730
1731	* gmime/gmime.h.in: Removed gmime-host-utils.h
1732
1733	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use
1734	getaddrinfo to resolve hostnames, don't bother with the
1735	gethostbyname() variants. Makes this code simpler and allows us to
1736	get rid of gmime-host-utils.[c,h].
1737
17382004-10-01  Jeffrey Stedfast  <fejj@ximian.com>
1739
1740	* README: Updated
1741
1742	* configure.in: Bumped version to 2.1.9
1743
17442004-09-29  Jeffrey Stedfast  <fejj@ximian.com>
1745
1746	* gmime/gmime-parser.c (parser_step_headers): Save the entire raw
1747	part header as well.
1748	(parser_init): Init the rawbuf (will be used for holding the raw
1749	part header).
1750	(parser_close): Free the rawbuf.
1751	(parser_construct_leaf_part): Set the raw header on the mime part.
1752	(parser_construct_multipart): Set the raw header on the multipart.
1753	(parser_construct_message): Don't use g_mime_message_set_mime_part
1754	or we'll end up clearing the raw header that we worked so hard to
1755	preserve.
1756	(parser_scan_message_part): Same.
1757	(parser_scan_multipart_face): Change comparison to >= so that we
1758	actually get rid of the last crlf sequence like we meant to.
1759	(parser_fill): Get rid of the atleast check (it isn't really
1760	needed and can cause breakage).
1761
1762	* gmime/gmime-message.c (message_get_headers): Modified to only
1763	write part headers if the toplevel mime part contains the raw
1764	header.
1765	(message_write_to_stream): Same.
1766	(g_mime_message_set_mime_part): Clear the raw message headers
1767	since it obviously won't contain the raw message headers.
1768	(message_add_header): If any message headers change, clear the raw
1769	header from the toplebel mime part.
1770	(message_set_header): Same.
1771
1772	* gmime/gmime-header.c (g_mime_header_set_raw): New function to
1773	set the raw part header (to be used in place of our own folding if
1774	available).
1775	(g_mime_header_has_raw): New function to check if the raw header
1776	is available.
1777
17782004-09-28  Peter Bloomfield  <PeterBloomfield@bellsouth.net>
1779
1780	* gmime/gmime-multipart-signed.c (sign_prepare): Must treat
1781	multipart/signed and multipart/encrypetd parts as opaque
1782	(e.g. don't even attempt to change their encodings).
1783
17842004-09-13  Jeffrey Stedfast  <fejj@novell.com>
1785
1786	* gmime/gmime-message.c (write_addrspec): New folding callback to
1787	use on addrspec headers.
1788	(g_mime_message_init): Register write_addrspec for all address
1789	headers.
1790
1791	* gmime/gmime-utils.c (header_fold): Fixed the logic a bit for
1792	structured headers such that we don't break long tokens.
1793
17942004-08-22  Jeffrey Stedfast  <fejj@ximian.com>
1795
1796	* README: Updated.
1797
1798	* configure.in: Bumped the version to 2.1.8
1799
1800	* gmime/gmime.h.in: #include <gmime/gmime-session-simple.h> for
1801	ia64 build fix on Debian (required because of the way gtk-doc's
1802	scan program works).
1803
1804	* gmime/gmime-filter-enriched.c (enriched_to_html): Don't replace
1805	<nofill> with <pre>. Also, replace lone '\n's with a space as
1806	suggested by rfc1896.
1807
18082004-08-08  Jeffrey Stedfast  <fejj@ximian.com>
1809
1810	* gmime/gmime-multipart-encrypted.c
1811	(g_mime_multipart_encrypted_encrypt): Don't set encrypted.asc as
1812	the filename anymore.
1813
1814	* gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
1815	Added a hack for Balsa so it can support S/MIME. Also don't set
1816	the filename to signature.asc. Balsa maintainers don't want this
1817	*shrug*.
1818	(g_mime_multipart_signed_verify): Same. These changes really
1819	require a design change to CipherContext but that'll have to wait.
1820
18212004-08-04  Jeffrey Stedfast  <fejj@ximian.com>
1822
1823	* configure.in: Changed the iconv-detect logic to not error-out on
1824	fail. The code can properly handle the case where iconv-detect.h
1825	doesn't exist, so let it do that instead.
1826
18272004-07-30  Jeffrey Stedfast  <fejj@novell.com>
1828
1829	* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't use
1830	g_unichar_isspace() here, we only want to break 'words' on ascii
1831	lwsp.
1832
18332004-07-16  Jeffrey Stedfast  <fejj@ximian.com>
1834
1835	* gmime/gmime.c (g_mime_init): Make intialisation ref-counted.
1836	(g_mime_shutdown): Updated.
1837
18382004-07-06  Jeffrey Stedfast  <fejj@ximian.com>
1839
1840	* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Break
1841	apart long words so that they we don't generate encoded-word
1842	tokens that are >75 chars. Fixes bug #145497.
1843
18442004-07-04  Jeffrey Stedfast  <fejj@novell.com>
1845
1846	* README: Updated.
1847
1848	* configure.in: Bumped the version to 2.1.7
1849
1850	* gmime/gmime-parser.c (parser_construct_leaf_part): Removed code
1851	to check that the content_type argument is NULL - it can never be
1852	NULL.
1853	(parser_scan_multipart_face): Fixed a possible buffer-overrun.
1854
1855	* gmime/gmime-object.c (process_header): Modified to call
1856	g_mime_object_set_content_type() if we got called with a
1857	Content-Type header. This way all the ::set_content_type()
1858	subclass methods get a chance to update the object's state.
1859	(process_header): Return TRUE if we've "processed" the value or
1860	FALSE otherwise.
1861	(add_header): Only add the header if process_header() didn't do
1862	anything with the header.
1863	(set_header): Same.
1864
1865	* gmime/gmime-message.c (g_mime_message_set_sender): Parse the
1866	sender string so we can properly encode it before setting it as
1867	the From header.
1868
18692004-06-28  Jeffrey Stedfast  <fejj@ximian.com>
1870
1871	* gmime/gmime-parser.c (parser_scan_content): Updated to handle
1872	crlf sequences.
1873	(parser_scan_mime_part_content): Same.
1874	(crlf2lf): New function to convert CRLF to LF.
1875	(parser_scan_multipart_face): Convert the pre/postface into lf
1876	format.
1877
18782004-06-27  Jeffrey Stedfast  <fejj@novell.com>
1879
1880	* util/url-scanner.c (g_url_web_end): Some fixes that I had to do
1881	recently for Camel as well.
1882
18832004-06-22  Jeffrey Stedfast  <fejj@novell.com>
1884
1885	* gmime/gmime-parser.c (parser_construct_leaf_part): Only destroy
1886	the existing content_type on the object if it is non-NULL.
1887	(parser_construct_multipart): Same.
1888
18892004-06-15  Jeffrey Stedfast  <fejj@ximian.com>
1890
1891	* configure.in: Added --enable-profile option and removed
1892	--enable-gprof. --enable-profile enables gprof and gcov.
1893
1894	* gmime/gmime-parser.c: #include <stdlib.h> for strtoul()
1895	(parser_construct_leaf_part): Got rid of an unused variable.
1896
1897	* gmime/gmime-param.c (rfc2184_param_new): Got rid of an unused
1898	variable.
1899	(rfc2184_decode): Got rid of an unused variable.
1900
1901	* util/gtrie.c (trie_utf8_getc): Get rid of the unused labels.
1902
19032004-06-09  Jeffrey Stedfast  <fejj@ximian.com>
1904
1905	* gmime/gmime-stream-filter.c (stream_write): Set flushed to
1906	FALSE.
1907	(stream_read): Set flushed to FALSE if we end up filtering more
1908	data.
1909
1910	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Record the
1911	nodata state.
1912	(gpg_verify): Check the nodata state.
1913
19142004-06-06  Jeffrey Stedfast  <fejj@ximian.com>
1915
1916	* README: Updated.
1917
1918	* configure.in: Bumped version to 2.1.6
1919
1920	* gmime/gmime-parser.c (parser_construct_multipart): Instead of
1921	using g_mime_object_set_content_type(), destroy the current
1922	content_type object and set our own on it directly. This prevents
1923	the raw Content-Type header value from being overridden by the
1924	re-written version from our parsed object.
1925	(parser_construct_leaf_part): Same.
1926
1927	* gmime/gmime-part.c (mime_part_write_to_stream): Don't sync the
1928	GMimeDisposition object to the header here anymore. We want to try
1929	and keep the original raw header if this is a parsed message.
1930
19312004-06-03  Jeffrey Stedfast  <fejj@ximian.com>
1932
1933	* gmime/gmime-part.c (sync_content_disposition): Moved. Also
1934	protect against a NULL disposition.
1935	(mime_part_write_to_stream): Sync the Content-Disposition header
1936	before writing to the stream.
1937
1938	* gmime/gmime-utils.c (header_fold): Fixed a folding bug where we
1939	could get a blank line (well, wasn't really blank - but we would
1940	get a "\n\t\n" sequence which isn't really useful nor desirable).
1941
1942	* gmime/gen-table.c: Added a new bit and corresponding macro.
1943
1944	* gmime/gmime-table-private.h: Updated.
1945
1946	* gmime/gmime-param.c (encode_param): If conversion into the best
1947	charset fails, fall back to using UTF-8. Also use the new
1948	convenience macro, is_attrchar(), to decide which characters in
1949	the param value to encode.
1950	(param_list_format): Use is_attrchar() for calculating how many
1951	characters we expect to either have to quote or encode.
1952	(decode_param_list): Rewritten.
1953
19542004-05-31  Jeffrey Stedfast  <fejj@ximian.com>
1955
1956	* gmime/gmime-data-wrapper.c (g_mime_data_wrapper_set_stream):
1957	Updated gtk-doc comments to note that you'll probably also want to
1958	call g_mime_data_wrapper_set_encoding().
1959
19602004-05-26  Jeffrey Stedfast  <fejj@ximian.com>
1961
1962	* gmime/gmime-message.c (write_subject): New function. Use
1963	unstructured folding rather than the default.
1964	(g_mime_message_init): Register the subject header writer.
1965
1966	* gmime/gmime-utils.c (g_mime_utils_structured_header_fold): New
1967	function (same as g_mime_utils_header_fold() but more
1968	appropriately named).
1969	(g_mime_utils_unstructured_header_fold): Fold unstructured headers
1970	like Subject.
1971	(header_fold): Moved all of the g_mime_utils_header_fold() logic
1972	into here with a small adjustment to differentiate structured vs
1973	unstructured header folding.
1974
19752004-05-25  Jeffrey Stedfast  <fejj@ximian.com>
1976
1977	* gmime/gmime-param.c (param_list_format): Modified to try and
1978	squeeze more characters per line and still keep it under 76 chars
1979	per line.
1980
19812004-05-24  Jeffrey Stedfast  <fejj@ximian.com>
1982
1983	* gmime/gmime-filter-gzip.c (g_mime_filter_gzip_finalize): Call
1984	inflateEnd/deflateEnd to fix a memory leak.
1985
1986	* gmime/gmime-parser.c (parser_offset): If priv->offset == -1,
1987	don't bother doing any pointer arithmetic as it will result in a
1988	value that will break certain code (eg. the boundary matching
1989	code).
1990
19912004-05-20  Jeffrey Stedfast  <fejj@ximian.com>
1992
1993	* gmime/gmime-gpg-context.c (gpg_ctx_new): Remember if our
1994	environment is in UTF-8 or not.
1995	(gpg_ctx_parse_status): Only convert the user name from the locale
1996	charset to UTF-8 if the env isn't UTF-8.
1997	(gpg_ctx_parse_status): Convert the password to the locale charset
1998	if the locale isn't UTF-8.
1999
20002004-05-15  Jeffrey Stedfast  <fejj@ximian.com>
2001
2002	* README: Updated.
2003
2004	* configure.in: Bumped version to 2.1.5
2005
2006	* gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
2007	Updated.
2008
2009	* gmime/gmime-cipher-context.h: Added a new GMimeSignatureValidity
2010	which replaces the now deprecated GMimeCipherValidity. Typedef
2011	GMimeCipherValidity to GMimeSignatureValidity and wrap deprecated
2012	functions with #ifndef GMIME_DISABLE_DEPRECATED.
2013
2014	* gmime/gmime-cipher-context.c (g_mime_signature_validity_new):
2015	New function.
2016	(g_mime_signature_validity_free): New.
2017	(g_mime_signature_validity_get_status): New.
2018	(g_mime_signature_validity_set_status): New.
2019	(g_mime_signature_validity_get_details): New.
2020	(g_mime_signature_validity_set_details): New.
2021	(g_mime_signature_validity_get_signers): New.
2022	(g_mime_signature_validity_add_signer): New.
2023	(g_mime_cipher_validity_new): Deprecated.
2024	(g_mime_cipher_validity_init): Deprecated.
2025	(g_mime_cipher_validity_get_valid): Deprecated.
2026	(g_mime_cipher_validity_set_valid): Deprecated.
2027	(g_mime_cipher_validity_get_description): Deprecated.
2028	(g_mime_cipher_validity_set_description): Deprecated.
2029	(g_mime_cipher_validity_clear): Deprecated.
2030	(g_mime_cipher_validity_free): Deprecated.
2031	(g_mime_signer_new): New function
2032	(g_mime_signer_free): New function.
2033
2034	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save more
2035	state.
2036	(gpg_verify): Updated to fill out the new GMimeSignatureValidity
2037	structure with more details.
2038
20392004-05-15  Jeffrey Stedfast  <fejj@ximian.com>
2040
2041	* gmime/gmime-host-utils.h: Wrap inclusion of netdb.h with G_OS_WIN32
2042
2043	* util/memchunk.c (memchunk_alloc): Fixed another cast warning on
2044	win32.
2045
2046	* gmime/gmime-message.c (g_mime_message_get_mime_part): New
2047	function.
2048	(g_mime_message_get_body): Fixed a bug where is_html could get set
2049	to TRUE even if the part wasn't html.
2050
20512004-05-13  Jeffrey Stedfast  <fejj@ximian.com>
2052
2053	* util/memchunk.c (memchunk_alloc): Add parens to fix casting
2054	warning on win32.
2055
2056	* gmime/gmime-message.c (write_received): Rewritten.
2057
20582004-05-10  Jeffrey Stedfast  <fejj@ximian.com>
2059
2060	* gmime/gmime-filter-gzip.c: New filter for compressing/inflating
2061	gzip streams.
2062
20632004-05-09  Jeffrey Stedfast  <fejj@ximian.com>
2064
2065	* gmime/gmime-message.c (write_received): Be careful to never
2066	append bytes beyond the end of the header value (eg the nul byte).
2067
2068	* gmime/gmime-utils.c (g_mime_utils_header_fold): Don't allow
2069	folded headers to end with \n\n.
2070
20712004-04-28  Jeffrey Stedfast  <fejj@ximian.com>
2072
2073	* gmime/gmime-multipart-encrypted.c
2074	(g_mime_multipart_encrypted_decrypt): Reset the stream before
2075	trying to parse it.
2076
20772004-04-25  Jeffrey Stedfast  <fejj@ximian.com>
2078
2079	* gmime/gmime-utils.c (g_mime_utils_header_fold): Rather than
2080	always using a tab character when folding, use the lwsp character
2081	that we are wrapping at instead.
2082
20832004-04-24  Jeffrey Stedfast  <fejj@ximian.com>
2084
2085	* gmime/gmime-parser.c (g_mime_parser_init): Initialise
2086	respect_content_length.
2087
20882004-04-24  Jeffrey Stedfast  <fejj@ximian.com>
2089
2090	* README: Updated
2091
2092	* configure.in: Bumped version to 2.1.4
2093
2094	* gmime/gmime-part.c (g_mime_part_get_content): Disable debug
2095	warning.
2096
2097	* gmime/gmime-iconv.c: Same.
2098
2099	* gmime/gmime-iconv-utils.c: Disable warnings.
2100
2101	* gmime/gmime-utils.c (decode_msgid): Try to always return a
2102	string buffer containing whatever we can get from the msg-id, even
2103	if it isn't a valid msg-id token.
2104
21052004-04-19  Jeffrey Stedfast  <fejj@ximian.com>
2106
2107	* gmime/gmime-content-type.c
2108	(g_mime_content_type_new_from_string): Chew up lwsp between the
2109	end of the subtype and the ';' token, if there is any.
2110
21112004-04-13  Jeffrey Stedfast  <fejj@ximian.com>
2112
2113	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Save both the
2114	TRUST_UNDEFINED trust state as well as the whether or not we get a
2115	NO_PUBKEY status message.
2116
21172004-04-11  Jeffrey Stedfast  <fejj@ximian.com>
2118
2119	* gmime/gmime-stream-filter.c (stream_read): Check that we haven't
2120	already flushed the stream if the source stream is at EOS - fixes
2121	an infinite loop case if the user doesn't use a loop to check
2122	eos() each loop.
2123
21242004-04-02  Jeffrey Stedfast  <fejj@ximian.com>
2125
2126	* gmime/gmime-stream-cat.c (stream_write): This should be writing
2127	data, not reading it from the underlying streams. Oops.
2128
21292004-03-30  Jeffrey Stedfast  <fejj@ximian.com>
2130
2131	* gmime/gmime-charset.c (charset_best_mask): Don't use the charset
2132	if it is lang specific and the lang doesn't match the
2133	locale. Fixes bug #138218.
2134
2135	* gmime/gmime-utils.c (mktime_utc): New function to mktime() into
2136	UTC.
2137	(parse_rfc822_date): Use mktime_utc() instead of doing it
2138	ourselves.
2139	(parse_broken_date): Same.
2140
21412004-03-21  Jeffrey Stedfast  <fejj@ximian.com>
2142
2143	* gmime/gmime-stream-buffer.c (stream_write): Fixed a bug when
2144	writing across block boundaries.
2145
21462004-03-09  Jeffrey Stedfast  <fejj@ximian.com>
2147
2148	* gmime/gmime-cipher-context.c (g_mime_cipher_verify): Allow the
2149	sigstream to be NULL (it is optional afterall).
2150
2151	Thanks to Peter Bloomfield for reminding me about
2152	g_ascii_strdown() and g_ascii_strup() and for providing the
2153	original patch.
2154
2155	* gmime/gmime-charset.c (locale_parse_lang): Don't use
2156	g_ascii_strdown() and g_ascii_strup() as these functions strdup
2157	the result rather than working on the input string.
2158	(g_mime_charset_map_init): Instead of strdup()ing the charset name
2159	and then using g_ascii_strdown(), just use g_ascii_strdown() since
2160	it malloc's. Also, even if we have nl_langinfo(), we want to parse
2161	LC_ALL to get the locale lang.
2162
21632004-03-06  Jeffrey Stedfast  <fejj@ximian.com>
2164
2165	* README: Updated
2166
2167	* configure.in: Bumped version to 2.1.3
2168
21692004-02-28  Jeffrey Stedfast  <fejj@ximian.com>
2170
2171	* gmime/gmime-stream-buffer.c (stream_write): Shrink buflen down
2172	by the number of bytes flushed or we'll loop forever writing the
2173	same block over and over.
2174
2175	* gmime/gmime-strea.[c,h]: Make stream_write() take a const char
2176	*buf argument instead of char *buf.
2177
2178	* gmime/gmime-stream-*.c (stream_write): constify the buf
2179	argument.
2180
2181	* gmime/gmime-stream-null.c (stream_write): Count newlines as
2182	well.
2183
21842004-02-26  Jeffrey Stedfast  <fejj@ximian.com>
2185
2186	* util/*.[c,h]: Moved here from gmime/
2187
2188	* gmime/*.h: Fixed #includes
2189
2190	* gmime/cache.[c,h]: Moved to util/
2191
2192	* gmime/gtrie.[c,h]: Moved to util/
2193
2194	* gmime/list.[c,h]: Moved to util/
2195
2196	* gmime/md5-utils.[c,h]: Moved to util/
2197
2198	* gmime/memchunk.[c,h]: Moved to util/
2199
2200	* gmime/url-scanner.[c,h]: Moved to util/
2201
2202	* gmime/gmime-parser.c: Don't use gobject macro casts.
2203
2204	* gmime/gmime-filter-md5.c: Move the MD5Context into a private
2205	structure so that we don't need to install md5-utils.h
2206
22072004-02-18  Jeffrey Stedfast  <fejj@ximian.com>
2208
2209	* gmime/gmime-utils.c (rfc2047_encode): Return a duplicate of the
2210	input string if there are no 'words'.
2211
2212	* gmime/internet-address.c (internet_address_to_string): Make sure
2213	ia->name is not an empty string.
2214
22152004-02-13  Jeffrey Stedfast  <fejj@ximian.com>
2216
2217	* gmime/gmime-parser.c (parser_construct_multipart): Pop our end
2218	boundary before scanning postface text data. Prevents a hang if a
2219	multipart brokenly has 2 end boundaries.
2220
22212004-02-08  Jeffrey Stedfast  <fejj@ximian.com>
2222
2223	* gmime/*.c: Use g_object_ref/unref instead of the
2224	g_mime_object_ref/unref and g_mime_stream_ref/unref.
2225
22262004-02-08  Jeffrey Stedfast  <fejj@ximian.com>
2227
2228	* gmime/gmime-utils.c (rfc2047_encode): Changed to take a safemask
2229	arg instead of a gboolean phrase arg since we never used 'phrase'
2230	directly.
2231	(g_mime_utils_header_encode_phrase): Pass IS_PSAFE as second
2232	argument.
2233	(g_mime_utils_header_encode_text): Pass IS_ESAFE as second
2234	argument.
2235
22362004-02-07  Jeffrey Stedfast  <fejj@ximian.com>
2237
2238	* README: Updated.
2239
2240	* configure.in: Bumped version to 2.1.2
2241
2242	* examples/README: New README explaining the purpose of each of
2243	the example sources.
2244
22452004-02-06  Jeffrey Stedfast  <fejj@ximian.com>
2246
2247	* gmime/gmime-parser.c (parser_construct_message): If we've been
2248	told to respect the Content-Length header, then parse the length
2249	value and calculate the offset of the beginning of the next
2250	message.
2251	(g_mime_parser_get_respect_content_length): New function to get
2252	whether we've been told to respect the Content-Length header.
2253	(g_mime_parser_set_respect_content_length): New function to set
2254	this option.
2255	(parser_offset): Now takes a private struct pointer rather than
2256	the parser object since it didn't really need it. Also makes it
2257	usable from check_boundary().
2258	(g_mime_parser_tell): Updated.
2259	(check_boundary): Only scan for end-boundaries if we've reached
2260	the projected end-of-content offset as calculated using the
2261	Content-Length header.
2262
22632004-02-06  Jeffrey Stedfast  <fejj@ximian.com>
2264
2265	* configure.in: Generate examples/Makefile
2266
2267	* gmime/gmime-utils.c (g_mime_utils_generate_message_id):
2268	Simplified and updated for g_gethostbyname_r() API changes.
2269
2270	* gmime/gmime-error.h: Changed the #define of GMIME_ERROR_QUARK to
2271	just be the GQuark variable. Also added GMIME_ERROR_IS_SYSTEM() to
2272	decide if an error is a system error (aka errno) or a GMime error.
2273
2274	* gmime/gmime.c: Make gmime_error_quark an actual variable and
2275	initialise it here.
2276
22772004-02-05  Jeffrey Stedfast  <fejj@ximian.com>
2278
2279	* gmime/gmime-host-utils.c (g_gethostbyname_r): Replace the herr
2280	argument with a GError to make the interface a bit nicer to use.
2281	(g_gethostbyaddr_r): Same.
2282
2283	* gmime/url-scanner.c: Added single/double quotes to url_braces[]
2284	in case the user is quoting the url.
2285	(g_url_web_end): Add "-;:" to list of punctuation to strip off the
2286	end of urls. Also fixed to handle user@domain's
2287	(g_url_addrspec_start): Strip open brace characters from the
2288	beginning of the addr.
2289	(g_url_web_start): Make sure "www" wasn't part of something not a
2290	url (like "Ewww.Gross") by check that pos[-1] is either an open
2291	brace or whitespace.
2292	(g_url_addrspec_end): Don't allow toplevel domain addr-specs
2293	(if we encounter something that looks like it is a toplevel domain
2294	addr, it is more likely to be bogus than correct).
2295
22962004-02-04  Jeffrey Stedfast  <fejj@ximian.com>
2297
2298	* gmime/gmime-stream-buffer.c (g_mime_stream_buffer_gets): Strip
2299	off \r too if the stream is in the canonical form.
2300
2301	* gmime/gmime.c (g_mime_shutdown): Oops, call
2302	g_mime_charset_map_shutdown(), not g_mime_charset_shutdown().
2303
23042004-01-26  Jeffrey Stedfast  <fejj@ximian.com>
2305
2306	* gmime/gmime.c (g_mime_shutdown): New public function to shutdown
2307	GMime. Fixes a segfault in applications that dynamically
2308	load/unload GMime during execution.
2309
2310	* gmime/gmime-iconv.c (g_mime_iconv_init): Don't register an
2311	atexit handler.
2312	(g_mime_iconv_shutdown): Make public.
2313
2314	* gmime/gmime-charset.c (g_mime_charset_map_init): Don't set a
2315	g_atexit handler for the shutdown routine.
2316	(g_mime_charset_map_shutdown): Make public.
2317
23182004-01-25  Jeffrey Stedfast  <fejj@ximian.com>
2319
2320	* gmime/gmime-param.c: Disable debugging and conditionally disable
2321	warnings.
2322
2323	* gmime/gmime-multipart.c: Disable debugging.
2324
2325	* gmime/gmime-stream.c: Disable debugging.
2326
2327	* gmime/internet-address.c: Same.
2328
2329	* gmime/gmime-parser.c: Conditionally disable warnings.
2330
23312004-01-19  Jeffrey Stedfast  <fejj@ximian.com>
2332
2333	* gmime/gmime-host-utils.c (g_gethostbyaddr_r): Fixed some compile
2334	problems in the IPv6 implementation.
2335
23362003-12-16  Jeffrey Stedfast  <fejj@ximian.com>
2337
2338	* gmime/gmime-stream-mmap.c (g_mime_stream_mmap_new): Don't add
2339	getpagesize() to the file length.
2340	(g_mime_stream_mmap_new_with_bounds): Same.
2341
23422003-12-11  Jeffrey Stedfast  <fejj@ximian.com>
2343
2344	* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Don't immediately
2345	prompt for a passwd after receiving the NEED_PASSPHRASE status
2346	message. Instead, parse the userid that gpg needs a passwd for and
2347	store it on our context. Wait for a GET_HIDDEN status message
2348	before prompting, this way if the user has their gpg configured to
2349	use gpg-agent, the user won't get 2 passwd prompts.
2350
23512003-12-06  Jeffrey Stedfast  <fejj@ximian.com>
2352
2353	* gmime/gmime-parser.c (parser_step_headers): If scanning for eoln
2354	results in finding inend, request a refill and try again (changed
2355	from inptr + 1 >= inend).
2356
23572003-12-05  Jeffrey Stedfast  <fejj@ximian.com>
2358
2359	* gmime/internet-address.c (decode_domain): Make sure domain->len
2360	> 0 before checking domain->str[domain->len - 1].
2361
2362	* gmime/gmime-gpg-context.c (gpg_ctx_op_start): Properly set the
2363	O_NONBLOCK flag on each of the pipes (ie. we need to get the
2364	current flags first and then add the O_NONBLOCK flag rather than
2365	just setting the O_NONBLOCK flag by itself).
2366
23672003-12-04  Jeffrey Stedfast  <fejj@ximian.com>
2368
2369	* README: Updated.
2370
2371	* configure.in: Bumped version to 2.1.1
2372
23732003-12-02  Jeffrey Stedfast  <fejj@ximian.com>
2374
2375	* gmime/gmime-gpg-context.c (gpg_ctx_op_start): Modified the code
2376	that closes the child's fds to use fcntl and also to start at fd =
2377	3 so as to get rid of the need to check for stdin/out/err.
2378
2379	* gmime/gmime-filter-from.c (filter_filter): Fixed to malloc the
2380	correct buffer length.
2381
23822003-10-28  Pawel Salek  <pawsa@theochem.kth.se>
2383
2384	* gmime.h.in: Use macros rather than the global variables to
2385	prevent compiler warnings.
2386
2387	* gmime-error.h: Removed the trailing comma after the last enum
2388	value to fix ANSI compile warnings.
2389
2390	* gmime-filter-basic.h: Same.
2391
2392	* gmime-filter-best.h: Here too.
2393
2394	* gmime-filter-crlf.h: And here.
2395
2396	* gmime-filter-from.h: Same.
2397
2398	* gmime-filter-yenc.h: Again here.
2399
2400	* gmime-multipart-encrypted.h: And here.
2401
2402	* gmime-multipart-signed.h: Here too.
2403
2404	* gmime-stream-buffer.h: Same.
2405
2406	* gmime-stream.h: And finally here.
2407
24082003-10-08  Jeffrey Stedfast  <fejj@ximian.com>
2409
2410	* configure.in: Added a check for altzone.
2411
2412	* gmime/gmime-utils.c (parse_broken_date, parse_rfc822_date):
2413	Account for altzone if the system libc defines it.
2414
24152003-09-26  Jeffrey Stedfast  <fejj@ximian.com>
2416
2417	* gmime/gmime-host-utils.c (g_gethostbyaddr_r): IPv6
2418	implementation rewritten to use getnameinfo() which is the proper
2419	function to use in this case.
2420
2421	* gmime/internet-address.c (internet_address_list_length): Changed
2422	to take a const argument.
2423	(internet_address_to_string): Now takes a const InternetAddress.
2424	(internet_address_list_to_string): Now takes a const
2425	InternetAddressList.
2426
24272003-09-12  Jeffrey Stedfast  <fejj@ximian.com>
2428
2429	* gmime/gmime-stream.c (g_mime_stream_read): If len == 0, return 0.
2430	(g_mime_stream_write): Same.
2431
2432	* gmime/gmime-parser.c (parser_push_boundary): Fix the
2433	boundarylenfinal calculation. Thanks to Bart Visscher for catching
2434	this mistake.
2435
24362003-08-30  Jeffrey Stedfast  <fejj@ximian.com>
2437
2438	* gmime/md5-utils.c (md5_get_digest_from_file): Open in binary
2439	mode, fixes a bug when built on Win32 systems.
2440
24412003-08-09  Jeffrey Stedfast  <fejj@ximian.com>
2442
2443	* README: Bumped to version 2.1.0
2444
2445	* configure.in: Bumped to version 2.1.0
2446
2447	* gmime/gmime-charset.c (g_mime_charset_name): Added back this
2448	symbol in order to avoid breaking ABI.
2449	(g_mime_charset_locale_name): Same.
2450
2451	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Slight
2452	fix for growing the buffer used by g_gethostbyname_r().
2453
24542003-08-09  Jeffrey Stedfast  <fejj@ximian.com>
2455
2456	* gmime/gmime.h.in: Added new headers.
2457
2458	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Use the
2459	re-entrant g_gethostbyname_r() function rather than
2460	gethostbyname() so that we are threadsafe.
2461
2462	* gmime/gmime-host-utils.[c,h]: New source files containing
2463	gethostbyname_r() and gethostbyaddr_r() implementations.
2464
2465	* gmime/gmime-filter-windows.[c,h]: New source files implementing
2466	a windows charset detection filter.
2467
2468	* gmime/gmime-charset.c (g_mime_charset_iso_to_windows): New
2469	function to return the windows-cp125# equivalent charset for
2470	iso-8859-# charsets.
2471
2472	* gmime/gmime-parser.c (parser_push_boundary): Soptimise a bit :-)
2473	(parser_push_boundary):
2474
24752003-08-06  Jeffrey Stedfast  <fejj@ximian.com>
2476
2477	* gmime/gmime-multipart.c (g_mime_multipart_foreach): Simplified.
2478
2479	* gmime/gmime-stream-cat.c (stream_read): Same here.
2480	(stream_write): And finally here.
2481
2482	* gmime/gmime-stream-file.c (stream_read): Same.
2483	(stream_write): And again...
2484
2485	* gmime/gmime-stream-fs.c (stream_read): Here too.
2486	(stream_write): And here.
2487
2488	* gmime/gmime-stream-mmap.c (stream_read): Same as the mem stream.
2489	(stream_write): Same.
2490
2491	* gmime/gmime-stream-mem.c (stream_read): Need to fix the MIN
2492	expresion so that both args are signed, otherwise 'len' will be
2493	the min if the 'bytes-left' calculation is negative.
2494	(stream_write): Same.
2495
24962003-07-29  Jeffrey Stedfast  <fejj@ximian.com>
2497
2498	* gmime/gmime-message.c (g_mime_message_get_recipients): Return
2499	const.
2500
2501	* gmime/gmime-message-part.c (g_mime_message_part_get_message):
2502	Ref the content message before returning it.
2503
25042003-07-25  Jeffrey Stedfast  <fejj@ximian.com>
2505
2506	* gmime/gmime-multipart.c (g_mime_multipart_foreach): Don't
2507	descend recursively... make the user descend into sub-multiparts
2508	him/herself. This makes more sense since the callback will be
2509	called on the multipart too...
2510	(g_mime_multipart_get_subpart_from_content_id): Make checking if
2511	the subpart is a multipart more efficient by using
2512	GMIME_IS_MULTIPART macro.
2513
25142003-07-15  Jeffrey Stedfast  <fejj@ximian.com>
2515
2516	* gmime/gmime-charset.c (g_mime_charset_canon_name): Updated to
2517	return canonical charset names for windows-cp125x charsets.
2518
25192003-06-19  Jeffrey Stedfast  <fejj@ximian.com>
2520
2521	* README: Added a section for links to language bindings starting
2522	with the Perl MIME::Fast modules.
2523
2524	* docs/reference/question_index.sgml: Updated docs about the Perl
2525	bindings.
2526
2527	* docs/tutorial/gmime-tut.sgml: Updated slightly.
2528
25292003-06-14  Jeffrey Stedfast  <fejj@ximian.com>
2530
2531	* gmime/gmime-parser.c (g_mime_parser_get_persist_stream): New
2532	function to get whether or not the parser will attempt to keep the
2533	content on disk when it constructs messages.
2534	(g_mime_parser_set_persist_stream): New function to set whether or
2535	not the above should be done.
2536	(parser_scan_mime_part_content): Only load content if persist and
2537	seekable are both TRUE.
2538
2539	* gmime/gmime-stream-fs.c (g_mime_stream_fs_get_owner): Same idea.
2540	(g_mime_stream_fs_set_owner): And here.
2541
2542	* gmime/gmime-stream-file.c (g_mime_stream_file_get_owner): New
2543	function, just like StreamMem.
2544	(g_mime_stream_file_set_owner): Same.
2545
2546	* gmime/gmime-stream-mem.c (g_mime_stream_mem_set_owner): New
2547	function to set whether or not the memory stream should free the
2548	backend memory buffer when finalized.
2549	(g_mime_stream_mem_get_owner): New function to get the above
2550	attribute.
2551
25522003-06-12  Jeffrey Stedfast  <fejj@ximian.com>
2553
2554	* gmime/gtrie.c (g_trie_free): Free the fail_states array.
2555
25562003-05-26  Jeffrey Stedfast  <fejj@ximian.com>
2557
2558	* gmime/gmime-common.c (g_mime_strcase_hash): Oops, fixed a bug.
2559
2560	* gmime/gmime-multipart-signed.c (g_mime_multipart_signed_verify):
2561	Do not strip trailing whitespace when verifying, this should allow
2562	us to verify both rfc2015 and rfc3156 signed messages (as well as
2563	this being the correct way of doing it anyway).
2564
25652003-05-26  Jeffrey Stedfast  <fejj@ximian.com>
2566
2567	* gmime/gmime-common.[c,h]: New source files implementing some
2568	common routines scattered throughout the gmime sources (currently
2569	a strcase_hash and strcase_equal implementation).
2570
2571	* gmime/gmime-object.c (type_registry_init): Use the new
2572	g_mime_strcase_[hash,equal] functions from gmime-common.h.
2573	(g_mime_object_register_type): Here too.
2574
2575	* gmime/gmime-filter-enriched.c
2576	(g_mime_filter_enriched_class_init): Use the new
2577	g_mime_strcase_[hash,equal] functions from gmime-common.h.
2578
25792003-05-22  Jeffrey Stedfast  <fejj@ximian.com>
2580
2581	* gmime/gmime-parser.c (parser_construct_multipart): Fixed to
2582	properly handle multiparts which do not end with their own
2583	end-boundary. See bug #113527 for details.
2584
25852003-05-22  Jeffrey Stedfast  <fejj@ximian.com>
2586
2587	* configure.in: Check for sys/param.h
2588
2589	* gmime/gmime-stream-mmap.h: Removed sys/mman.h and unistd.h from
2590	the #includes. These are needed in the ehader and will break the
2591	build on win32.
2592
2593	* gmime/gmime-utils.c: Only #include sys/param.h if the system has
2594	it. Also added unistd.h and sys/types.h as they should have been
2595	there for pid_t.
2596
25972003-05-21  Jeffrey Stedfast  <fejj@ximian.com>
2598
2599	* gmime/gmime-message.c (handle_multipart_mixed): Don't look at
2600	the subtype of the first_type unless we have already defined
2601	first_type. Fixes a crash.
2602
2603	* gmime/gmime-multipart.c
2604	(g_mime_multipart_get_subpart_from_content_id): Don't return a
2605	const GMimeObject, ref it to be consistant with the rest of the
2606	API.
2607
2608	* gmime/gmime-message-partial.c
2609	(g_mime_message_partial_split_message): Fixed an optimisation gone
2610	bad. Thanks to Piotr Klaban for reporting this.
2611
26122003-05-19  Jeffrey Stedfast  <fejj@ximian.com>
2613
2614	* tests/test-mbox.c: Fixed a memory leak.
2615
2616	* gmime/gmime-multipart-encrypted.c: Same as below.
2617
2618	* gmime/gmime-multipart-signed.c: Fixed the prototype for
2619	write_to_stream().
2620
26212003-05-17  Jeffrey Stedfast  <fejj@ximian.com>
2622
2623	* docs/reference/streams.sgml: Updated for correctness.
2624
2625	* docs/reference/data-wrappers.sgml: Pretty much re-written to
2626	better explain GMimeDataWrapper.
2627
2628	* gmime/gmime-session-simple.[c,h]: New simple instantiable class
2629	implementing the GMimeSession interfaces.
2630
26312003-04-30  Jeffrey Stedfast  <fejj@ximian.com>
2632
2633	* tests/test-mime.c: Fixed some compile warnings.
2634
2635	* src/uudecode.c: Fixed some compile warnings.
2636
2637	* src/uuencode.c: Fixed some compile warnings.
2638
2639	* gmime/gmime-parser.c (parser_scan_content): Initialise 'start'.
2640
2641	* gmime/gmime-multipart-signed.c: #include <string.h>
2642
2643	* gmime/gmime-message-part.c: #include <string.h>
2644
2645	* gmime/gmime-filter-enriched.c: #include <stdlib.h> for strtoul.
2646
2647	* gmime/gmime-charset.c (strdown): New function to lowercasify a
2648	string inline (rather than being lame and strdup'ing the bloody
2649	string like g_ascii_strdown does).
2650
2651	* gmime/gmime-iconv.c: Turn off cache debugging.
2652
26532003-04-21  Jeffrey Stedfast  <fejj@ximian.com>
2654
2655	* gmime/gmime-gpg-context.c (gpg_ctx_new): Initialise seen_eof1 to
2656	TRUE.
2657	(gpg_ctx_set_ostream): Set seen_eof1 to FALSE here, this way we
2658	only ever check for EOF for gpg's stdout if we care about the data
2659	received from it.
2660	(gpg_ctx_parse_status): Remove the hack that set seen_eof1 to TRUE
2661	when we received a TRUST status from gpg when verifying a
2662	signature. Same for when importing signatures.
2663	(gpg_ctx_op_step): Only FD_SET() fd's that we have not finished
2664	reading from.
2665	(gpg_ctx_op_exited): #if 0'd for now since we aren't using it
2666	anymore. Keeping it around for historical reasons and in case we
2667	find we really do need it back.
2668
26692003-04-15  Jeffrey Stedfast  <fejj@ximian.com>
2670
2671	* configure.in: Check for netdb.h, gethostname and gethostbyname.
2672
2673	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Guard
2674	against systems without netdb.h, gethostname() and/or
2675	gethostbyname(). Seems MingW does not have these things.
2676
2677	* gmime/gmime-gpg-context.c (gpg_ctx_get_diagnostics): Flush the
2678	diagnostics stream and append a nul-byte. This allows us to return
2679	a const char * which will allow us to avoid strdup/free later.
2680	(gpg_ctx_free): Unref the diagnostics stream.
2681	(gpg_ctx_new): Get the locale charset and setup a charset filter
2682	for the diagnostics stream (use a stream instead of a GByteArray
2683	like we did before so we can do charset conversion more easily).
2684	(gpg_ctx_op_step): Use g_mime_stream_write() to append data to the
2685	diagnostics buffer instead of g_byte_array_append() - this way we
2686	get some charset filtering action. When reporting errors, use
2687	gpg_ctx_get_diagnostics(). Also make the errors reported to the
2688	user a little nicer.
2689	(gpg_sign): Diagnostics is now const, so don't free the result.
2690	(gpg_verify): Same. But also don't exit the main loop when gpg
2691	exits - there could still be data in the pipes left to read.
2692	(gpg_encrypt): Same as gpg_sign().
2693	(gpg_decrypt): Same here.
2694	(gpg_import_keys): Here too.
2695	(gpg_export_keys): And here.
2696	(gpg_ctx_parse_status): Convert the userid hint to UTF-8.
2697
26982003-03-31  Jeffrey Stedfast  <fejj@ximian.com>
2699
2700	* gmime/*.c: s/g_str[n]casecmp/str[n]casecmp/g
2701
2702	* configure.in: Change the check for mmap so that we know we not
2703	only have mmap defined, but also that it "works". Also added
2704	checks for strcasecmp and strncasecmp and define them to the glib
2705	versions if appropriate (g_ascii_str[n]casecmp since
2706	g_str[n]casecmp is apparently deprecated *sigh*). Doing this
2707	because I don't want to type g_ascii_str[n]casecmp. Call me a lazy
2708	bastard, but this is rediculous.
2709
2710	* gmime/gmime-filter-enriched.[c,h]: New source files that can be
2711	used to convert text/enriched and text/rtf to text/html.
2712
27132003-03-31  Jeffrey Stedfast  <fejj@ximian.com>
2714
2715	* PORTING: Began writing a porting guide for developers porting
2716	their applications from GMime 2.0 to GMime 2.2.
2717
2718	* gmime/gmime-utils.c (g_mime_utils_8bit_header_encode_phrase):
2719	Re-added for binary compatability. At least for now?
2720	(g_mime_utils_8bit_header_encode): Same.
2721	(g_mime_utils_8bit_header_decode): Here too.
2722
27232003-03-30  Jeffrey Stedfast  <fejj@ximian.com>
2724
2725	* gmime/internet-address.c (internet_address_new_name): Use
2726	header_decode_phrase().
2727	(internet_address_new_group): Same.
2728	(internet_address_set_name): Again here.
2729	(encoded_name): Always use encode_phrase() here if rfc2047_encode
2730	is TRUE, even if the raw name contains no 8bit characters. It
2731	*should* do the Right Thing (tm) now.
2732
2733	* gmime/gmime-param.c (decode_param): Use
2734	g_mime_utils_header_decode_text().
2735
2736	* gmime/gmime-message.c (g_mime_message_set_subject): Use
2737	g_mime_utils_header_encode_text().
2738
2739	* gmime/gmime-utils.c (g_mime_utils_header_encode_phrase):
2740	Renamed. Also rewritten to do the Right Thing (ie. Group 'word's
2741	by type and so forth).
2742	(g_mime_utils_header_encode_text): Renamed from
2743	8bit_header_encode() to make it clear that this function is meant
2744	to encode 'text' fields (see rfc822 for the definition of 'text'
2745	and for which headers have text values). Does the same basic
2746	thing, but now shares a lot of code with encode_phrase().
2747	(rfc2047_encode_get_rfc822_words): Renamed from
2748	rfc2047_encode_phrase_get_words() - also now handles WORD_QSTRING
2749	and takes an arg to determine whether or not to allow for QSTRING
2750	words.
2751	(g_mime_utils_text_is_8bit): Don't go past '\0' if we encounter
2752	one before inend. Should allow our caller to cheat and pass in -1
2753	instead of strlen()ing the string if the string is nul-terminated.
2754	(g_mime_utils_header_decode_text): Renamed from
2755	8bit_header_decode(). Also made a lot less strict.
2756	(g_mime_utils_header_decode_phrase): Basically the same as
2757	decode_text() but with the same strictness of previous versions.
2758
27592003-03-30  Jeffrey Stedfast  <fejj@ximian.com>
2760
2761	* gmime/gmime-message.c (g_mime_message_set_subject): Encode the
2762	subject before setting it in the raw header list.
2763
2764	* gmime/gmime-header.c (g_mime_header_add): Don't try to encode
2765	the header here. This is not our responsibility.
2766	(g_mime_header_set): Same.
2767
27682003-03-27  Jeffrey Stedfast  <fejj@ximian.com>
2769
2770	* gmime/gmime-utils.c (rfc2047_encode_word): Add 1 to enclen so as
2771	to protect against buffer overruns.
2772	(rfc2047_encode_phrase_get_words): if c > 127 && c < 256, then set
2773	encoding to MAX (encoding, 1), not 2.
2774
27752003-03-11  Charles Kerr <charles@rebelbase.com>
2776
2777	* gmime/md5-utils.c (md5_get_digest_from_file): fix
2778	dangling file pointer.
2779
27802003-03-09  Jeffrey Stedfast  <fejj@ximian.com>
2781
2782	* gmime/url-scanner.c (g_url_addrspec_end): Make sure inptr != pos
2783	+ 1, if it does, then return FALSE.
2784
27852003-03-06  Jeffrey Stedfast  <fejj@ximian.com>
2786
2787	* configure.in: Check that the compiler supports the inline
2788	optimisation keyword (or variant) and #define it to 'inline'.
2789
2790	* gmime/gtrie.c (trie_utf8_getc): Same.
2791
2792	* gmime/gmime-filter-html.c (html_utf8_getc): Use the inline macro.
2793
27942003-03-03  Jeffrey Stedfast  <fejj@ximian.com>
2795
2796	* gmime/gmime-filter-charset.c (filter_filter): Use outbuf -
2797	filter->outbuf to calculate how much data we've written - simpler
2798	and less likely to be wrong.
2799	(filter_complete): Same.
2800
2801	* gmime/gmime-iconv.c: Modified to use the new cache
2802	implementation in cache.c
2803
2804	* gmime/cache.[c,h]: New source files implementing an LRU cache.
2805
2806	* gmime/list.[c,h]: New source files containing a really nice/fast
2807	linked-list implementation.
2808
28092003-03-02  Jeffrey Stedfast  <fejj@ximian.com>
2810
2811	* gmime/gmime-iconv.c (iconv_cache_bucket_new): If the current
2812	list of cache buckets is non-NULL, set list->prev to the new
2813	bucket being prepended.
2814	(g_mime_iconv_open): Only expire unused if the cache size is
2815	greater than the max allowable size.
2816
28172003-02-27  Jeffrey Stedfast  <fejj@ximian.com>
2818
2819	* gmime/gmime-stream-filter.c (stream_read): Set priv->flushed to
2820	TRUE if we call g_mime_filter_complete() on our filters.
2821	(stream_eos): It's not actually the end of the stream until we've
2822	flushed the filters. This fixes some possible truncation when
2823	reading from a filtered stream.
2824
28252003-02-25  Jeffrey Stedfast  <fejj@ximian.com>
2826
2827	* README: Bumped version to 2.1.0
2828
2829	* configure.in: Bumped version to 2.1.0
2830
2831	* gmime/gmime-utils.c (rfc2047_decode_word): Use
2832	g_mime_locale_charset().
2833
2834	* gmime/gmime-param.c (rfc2184_decode): Use
2835	g_mime_locale_charset().
2836
2837	* gmime/gmime-iconv-utils.c (iconv_utils_init): Same as
2838	below. Also use g_mime_locale_charset() rather than
2839	g_mime_charset_locale_name().
2840
2841	* gmime/gmime-iconv.c (g_mime_iconv_open): Use
2842	g_mime_charset_iconv_name() instead of the older deprecated
2843	g_mime_charset_name() function.
2844
2845	* gmime/gmime-charset.c (g_mime_charset_map_init): Initialize the
2846	locale_lang.
2847	(g_mime_charset_iconv_name): Renamed from g_mime_charset_name()
2848	(g_mime_charset_canon_name): New function which does almost the
2849	same thing as g_mime_charset_iconv_name() except that it will
2850	always return the canonical forms of the iso-8859 charsets.
2851	(g_mime_locale_charset): Renamed from g_mime_charset_locale_name()
2852	(g_mime_locale_language): New function to return the user's locale
2853	language.
2854	(g_mime_charset_language): New function to map charsets to their
2855	language code (meant for CJKR).
2856
28572003-02-13  Jeffrey Stedfast  <fejj@ximian.com>
2858
2859	* README: Bumped version to 2.0.2
2860
2861	* configure.in: Bumped version to 2.0.2
2862
2863	* gmime/gmime-parser.c (parser_scan_content): Stop looping if/when
2864	we find EOS in all cases. Also handle the case where an
2865	[end-]boundary ends an an EOS rather than a new-line.
2866
28672003-02-14  Jeffrey Stedfast  <fejj@ximian.com>
2868
2869	* gmime/url-scanner.c (g_url_file_end): If the file:// url is
2870	preceded with some sort of brace, when scanning for the end of the
2871	url - take this into consideration.
2872	(g_url_web_end): Same.
2873
28742003-02-13  Jeffrey Stedfast  <fejj@ximian.com>
2875
2876	* gmime/gmime-gpg-context.c: #include <sys/time.h>
2877
28782003-02-12  Jeffrey Stedfast  <fejj@ximian.com>
2879
2880	* gmime/url-scanner.c: Fixed the table to treat >=127 as a CTRL
2881	character.
2882
2883	* gmime/gtrie.c (trie_utf8_getc): When we encounter an invalid
2884	UTF-8 sequence, update in to point to in+1 and return 0xffff.
2885	(g_trie_add): Handle invalid UTF-8 sequences (ie, c == 0xffff).
2886	(g_trie_search): Same.
2887
2888	* gmime/gmime-filter-html.c (html_utf8_getc): Shortcut if inptr ==
2889	inend by returning 0 and treating it as if we found the
2890	terminating nul-char.
2891
28922003-02-08  Jeffrey Stedfast  <fejj@ximian.com>
2893
2894	* configure.in: Bumped the version to 2.0.1
2895
2896	* docs/*: A completely new set of documentation.
2897
28982003-02-07  Jeffrey Stedfast  <fejj@ximian.com>
2899
2900	* gmime/gmime-multipart.c (multipart_remove_part): When the part
2901	being removed is not the first part in the list, make sure to set
2902	node->prev->next = node->next -- oops :-)
2903	(multipart_remove_part_at): Same.
2904
29052003-01-25  Jeffrey Stedfast  <fejj@ximian.com>
2906
2907	* configure.in: Bumped the version to 2.0.0
2908
2909	* gmime/gmime-filter-html.c (writeln): Read the stream as UTF-8
2910	rather than 8bit so that we can properly write out unicode
2911	entities.
2912
29132002-12-17  Jeffrey Stedfast  <fejj@ximian.com>
2914
2915	Build fixes for G_DISABLE_DEPRECATED
2916
2917	* gmime/gmime-param.c (encode_param): Replace calls to
2918	g_string_sprintfa() with g_string_append_printf() since the former
2919	is marked as being deprecated.
2920	(param_list_format): Same.
2921
2922	* gmime/gmime-utils.c (rfc2047_encode_word): Here too.
2923
29242002-12-16  Jeffrey Stedfast  <fejj@ximian.com>
2925
2926	* configure.in: Bumped the version to 1.90.8
2927
2928	* doc/gmime-doc.sgml: Added a section for GMimeFilterMd5.
2929
2930	* doc/gmime-sections.txt: Added a section on GMimeFilterMd5.
2931
2932	* tests/test-parser.c (print_mime_struct): Validate Content-Md5
2933	headers.
2934
2935	* gmime/gmime-part.c (g_mime_part_set_content_md5): Rewritten to
2936	use the md5 filter and also to do things the right way by
2937	converting textual parts to their canonical CRLF form.
2938	(g_mime_part_verify_content_md5): Same.
2939
2940	* gmime/gmime-filter-md5.[c,h]: New filter to compute the md5
2941	digest of a stream passed through it.
2942
29432002-12-11  Jeffrey Stedfast  <fejj@ximian.com>
2944
2945	* gmime/gmime-message.c (g_mime_message_get_body): Reworked the
2946	logic a bit to properly handle multipart/alternative.
2947
29482002-12-10  Jeffrey Stedfast  <fejj@ximian.com>
2949
2950	* configure.in: Bumped the version to 1.90.7
2951
29522002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
2953
2954	* gmime/url-scanner.c: Use our own masking table since we need it
2955	atoms to be slightly different. There's a few more chars we want
2956	to restrict. Also has the benefit of being easier to split out if
2957	someone else wants to use it.
2958	(g_url_addrspec_end): Fixed to not be fooled in the case where the
2959	address is followed immediately by a period.
2960	(g_url_web_end): Made more robust.
2961	(g_url_scanner_scan): Oops. We need to set the match->pattern
2962	string pointer to the correct pattern before executing the
2963	start/end methods (as some of them rely on this info).
2964
29652002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
2966
2967	* gmime/url-scanner.c: Don't need a hash table anymore.
2968	(g_url_scanner_add): When adding a pattern to the trie, use the
2969	array index as the pattern_id argument.
2970	(g_url_scanner_scan): Use the matched_id set by g_trie_search() to
2971	lookup the urlpattern_t instead of using a hash table.
2972
2973	* gmime/gtrie.c (g_trie_add): Now takes a pattern_id argument so
2974	that we can avoid the use of GQuarks and thus save on unecessary
2975	memory usage.
2976	(g_trie_search): Instead of giving our caller back the pattern
2977	string pointer, give him back the pattern id.
2978
29792002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
2980
2981	* gmime/gtrie.c (g_trie_matches): Removed.
2982	(g_trie_search): Fixed the FIXME.
2983
29842002-12-09  Jeffrey Stedfast  <fejj@ximian.com>
2985
2986	* gmime/gmime-filter-html.c: Modified to use url-scanner.c instead
2987	of using glibc's regex routines. This has improved performance by
2988	~16.5x not to mention that it is also more accurate than the regex
2989	patterns had been (the url scanner can be setup to be much
2990	stricter in the matching).
2991
2992	* gmime/url-scanner.c: New source file implementing a simple
2993	expression scanner meant (currently designed for url matching)
2994	which uses gtrie.
2995
2996	* gmime/gtrie.c: New source file implementing Aho-Corasick's Trie
2997	graph algorithm.
2998
29992002-12-08  Jeffrey Stedfast  <fejj@ximian.com>
3000
3001	Fix for bug #91536
3002
3003	* gmime/gmime-object.c (g_mime_object_register_type): Use a struct
3004	to hold the object_type for the subtype hash. 64 archs use 32bit
3005	ints and so using GINT_TO_POINTER() and GPOINTER_TO_INT() doesn't
3006	work.
3007	(g_mime_object_new_type): Get the object_type from the subtype
3008	bucket.
3009
30102002-12-06  Jeffrey Stedfast  <fejj@ximian.com>
3011
3012	* gmime/gmime-stream.c (g_mime_stream_writev): Pointer arithmetic
3013	fixes.
3014
3015	* gmime/memchunk.c (memchunk_alloc): Pointer arithmetic fixes.
3016
30172002-12-03  Jeffrey Stedfast  <fejj@ximian.com>
3018
3019	* gmime/gmime-utils.c (datetok): Modified to properly handle when
3020	the first char of a token is a special char (such as a '-') that
3021	is also used as a token delimiter.
3022
30232002-12-02  Jeffrey Stedfast  <fejj@ximian.com>
3024
3025	* gmime/gmime-filter-html.c (g_mime_filter_html_init): match
3026	REG_ICASE so we don't cut off at the first capital letter, duh.
3027
30282002-12-01  Jeffrey Stedfast  <fejj@ximian.com>
3029
3030	* gmime/gmime-utils.c: #define _GNU_SOURCE for isblank on GNU
3031	systems.
3032
3033	* gmime/gmime-gpg-context.c (gpg_ctx_op_wait): Fixed the errno
3034	saving.
3035
30362002-11-21  Jeffrey Stedfast  <fejj@ximian.com>
3037
3038	* gmime/gmime-message.c (write_received): After skipping the
3039	special received token and it's value, skip any following comments
3040	as well.
3041	(skip_addrspec): Skip past the '.' and '@' chars before decoding
3042	the next word or domain respectively.
3043
30442002-11-20  Jeffrey Stedfast  <fejj@ximian.com>
3045
3046	* gmime/gmime-message.c (write_received): New function to nicely
3047	format Received headers.
3048	(write_msgid): New writer function that doesn't fold the msg-id no
3049	matter now long it is.
3050	(g_mime_message_init): Override the writer functions for Received
3051	and Message-Id headers. Should we also override the writer
3052	function for Path headers to not wrap?
3053
3054	* gmime/internet-address.c (decode_addrspec): Get rid of an extra
3055	call to decode_lwsp that wasn't needed.
3056
3057	* gmime/gmime-header.c (g_mime_header_register_writer): Renamed.
3058
30592002-11-18  Jeffrey Stedfast  <fejj@ximian.com>
3060
3061	* configure.in: Make sure to include -liconv on systems that need it.
3062
30632002-11-17  Jeffrey Stedfast  <fejj@ximian.com>
3064
3065	* configure.in: Check for gethostbyname in -lnsl and also bump the
3066	version to 1.90.6.
3067
3068	* src/getopt*.[c,h]: Added for portability to non-GNU systems.
3069
3070	* gmime/gmime-parser.c (g_mime_parser_init): Initialize scan_from
3071	and have_regex here instead of in parser_init() since we don't
3072	want these flags to be reset when a new stream gets set.
3073	(g_mime_parser_new_with_stream): New convenience function.
3074
30752002-11-16  Jeffrey Stedfast  <fejj@ximian.com>
3076
3077	* gmime/gmime-utils.c (decode_msgid): Eat the '<' before
3078	continuing to parse the addr-spec.
3079
30802002-11-14  Jeffrey Stedfast  <fejj@ximian.com>
3081
3082	* gmime/gmime-content-type.c
3083	(g_mime_content_type_new_from_string): #include
3084	"gmime-table-private.h" and use is_ttoken() to correctly parse
3085	type/subtype. Fixes bug #98463.
3086
30872002-11-13  Jeffrey Stedfast  <fejj@ximian.com>
3088
3089	* gmime/gmime-gpg-context.c (gpg_ctx_op_start): Don't bother
3090	stat()ing gpg->path, if the file doesn't exist, the exec() call
3091	will return immediately anyway.
3092
30932002-11-13  Jeffrey Stedfast  <fejj@ximian.com>
3094
3095	* configure.in: Bumped the version to 1.90.5.
3096
3097	* gmime/Makefile.am: Remove gmime-exception-list.def from the
3098	EXTRAS.
3099
31002002-11-12  Jeffrey Stedfast  <fejj@ximian.com>
3101
3102	* doc/*: Updated.
3103
3104	* gmime/gmime-error.h: Added.
3105
3106	* gmime/gmime-multipart-encrypted.[c,h]: Use GError instead of
3107	GMimeException.
3108
3109	* gmime/gmime-multipart-signed.[c,h]: Same.
3110
3111	* gmime/gmime-session.[c,h]: Here too.
3112
3113	* gmime/gmime-gpg-context.[c,h]: Don't use GMimeException anymore,
3114	instead use GError.
3115
3116	* gmime/gmime-cipher-context.[c,h]: Same here.
3117
3118	* gmime/gmime.h.in: Remove gmime-exception.h and add gmime-error.h
3119
31202002-11-09  Jeffrey Stedfast  <fejj@ximian.com>
3121
3122	* configure.in: Generate src/Makefile.
3123
3124	* Makefile.am: Add src to the SUBDIRS.
3125
3126	* src/Makefile.am: Build uuencode and uudecode.
3127
3128	* src/uuencode.c: New source file emulating GNU shareutils'
3129	uuencode.
3130
3131	* src/uudecode.c: New source file emulating GNU shareutils'
3132	uudecode.
3133
31342002-11-07  Jeffrey Stedfast  <fejj@ximian.com>
3135
3136	* configure.in: Bumped the version to 1.90.4
3137
3138	* PORTING: New document meant to help developers port their
3139	applications from gmime-1.0 to gmime-2.0.
3140
3141	* iconv-detect.c: Removed unused variables and #include <stdlib.h>
3142
3143	* gmime/gmime-multipart.c
3144	(g_mime_multipart_get_subpart_from_content_id): Init part to NULL.
3145
3146	* gmime/gmime-stream-cat.c (stream_write): Init n to -1 each time
3147	through the outer loop.
3148
3149	* gmime/gmime-filter-strip.c: #include <string.h> for memcpy.
3150
3151	* gmime/gmime-filter-html.c (html_convert): Make sure to
3152	initialise depth to 0 each loop so we don't use it uninitialised.
3153
31542002-11-07  Jeffrey Stedfast  <fejj@ximian.com>
3155
3156	* gmime*.[c,h]: Moved to gmime/ subdirectory. Also updated to
3157	#include <gmime/some-header.h> instead of #include "some-header.h"
3158
3159	* test-*.c: Moved to tests/ subdirectory.
3160
31612002-11-06  Jeffrey Stedfast  <fejj@ximian.com>
3162
3163	* Makefile.am: Install headers to $(includedir)/gmime-2.0/gmime
3164
31652002-11-04  Jeffrey Stedfast  <fejj@ximian.com>
3166
3167	* gmime-filter-basic.c (g_mime_filter_basic_new_type): Set the
3168	new->type to type.
3169
31702002-11-01  Jeffrey Stedfast  <fejj@ximian.com>
3171
3172	* gmime.h.in: Wrap in #ifdef __cplusplus
3173
3174	* gmime-filter-html.c (html_convert): If flush is TRUE, flush any
3175	remaining input rather than backing it up.
3176
31772002-10-31  Jeffrey Stedfast  <fejj@ximian.com>
3178
3179	* gmime-gpg-context.c: Renamed stdin to stdin_fd, stdout to
3180	stdout_fd, and stderr to stderr_fd to be more portable.
3181
31822002-10-30  Jeffrey Stedfast  <fejj@ximian.com>
3183
3184	* gmime-filter-html.c (html_convert): Rewrote to use regex for
3185	url/addr extraction. Outputs more correct html now too.
3186
31872002-10-18  Jeffrey Stedfast  <fejj@ximian.com>
3188
3189	* gmime-stream-filter.c (stream_read): Change presize from an int
3190	to a size_t to fix a 64bit cleanliness bug.
3191	(stream_write): Same.
3192
31932002-10-14  Jeffrey Stedfast  <fejj@ximian.com>
3194
3195	* gmime-gpg-context.c (gpg_ctx_get_argv): Setup the import/export
3196	command-line.
3197	(gpg_ctx_op_step): Handle import/export errors.
3198	(gpg_import_keys): Implemented.
3199	(gpg_export_keys): Implemented.
3200	(gpg_ctx_op_step): Don't do anything with gpg's stdin unless we
3201	have something to write to it (exporting keys doesn't require
3202	writing to gpg's stdin).
3203
32042002-10-13  Jeffrey Stedfast  <fejj@ximian.com>
3205
3206	* doc/*: Updated.
3207
3208	* gmime-utils.c (g_mime_utils_generate_message_id): New function
3209	to generate a valid unique message-id string.
3210
32112002-10-08  Jeffrey Stedfast  <fejj@ximian.com>
3212
3213	Fixes to make g_mime_message_partial_split_message() use the
3214	correct token as the id parameter.
3215
3216	* gmime-object.c (g_mime_object_set_content_id): Same as with
3217	GMimeMessage::message_id.
3218	(process_header): Same as process_header for gmime-message.c but
3219	for content_id.
3220
3221	* gmime-message.c (process_header): Set only the addr-spec portion
3222	of the msgid.
3223	(g_mime_message_set_message_id): Treat the message_id passed in as
3224	the addr-spec msgid (ie, as if it didn't contain <>'s).
3225
32262002-10-02  Jeffrey Stedfast  <fejj@ximian.com>
3227
3228	* gmime-gpg-context.c (gpg_import_keys): Renamed.
3229	(gpg_export_keys): Renamed.
3230
3231	* gmime-cipher-context.c (g_mime_cipher_export_keys): Renamed to
3232	be friendlier toward c++.
3233	(g_mime_cipher_import_keys): Renamed to be similarly named with
3234	the above function.
3235
32362002-09-30  Jeffrey Stedfast  <fejj@ximian.com>
3237
3238	* configure.in: Bumped version.
3239
3240	* Makefile.am: Don't install gmime.m4
3241
3242	* gmime.m4: Removed.
3243
32442002-09-30  Jeffrey Stedfast  <fejj@ximian.com>
3245
3246	* gmime-filter-charset.c (filter_filter): Rewritten, don't set
3247	errno to 0 before calling iconv (we can't assume that on success
3248	errno will not be set?). Also, don't grow the buffer here, save
3249	any un-converted text in the backup buffer to be converted next
3250	time through.
3251	(filter_complete): Pick up the slack of filter_filter by
3252	converting anything left over.
3253
32542002-09-29  Jeffrey Stedfast  <fejj@ximian.com>
3255
3256	* gmime-filter[c,h]: Ported to GObject.
3257
3258	* gmime-filter-basic.[c,h]:
3259	* gmime-filter-best.[c,h]:
3260	* gmime-filter-charset.[c,h]:
3261	* gmime-filter-crlf.[c,h]:
3262	* gmime-filter-from.[c,h]:
3263	* gmime-filter-html.[c,h]:
3264	* gmime-filter-strip.[c,h]:
3265	* gmime-filter-yenc.[c,h]: Ported to the new GMimeFilter.
3266
3267	* gmime-data-wrapper.c (write_to_stream): Unref the filter after
3268	adding it to the filtered stream.
3269
3270	* gmime-multipart-encrypted.c
3271	(g_mime_multipart_encrypted_encrypt): Unref the filters once we've
3272	added them to the filtered_stream.
3273	(g_mime_multipart_encrypted_decrypt): And here.
3274
3275	* gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
3276	the filters once we've added them to the filtered_stream.
3277	(g_mime_multipart_signed_verify): Same here.
3278
3279	* gmime-part.c (write_content): Unref the filter.
3280	(g_mime_part_set_pre_encoded_content): Here too.
3281
3282	* gmime-stream-filter.c (g_mime_stream_filter_add): Ref the filter
3283	here.
3284	(g_mime_stream_filter_remove): Unref the filter.
3285	(g_mime_stream_filter_finalize): Unref the filters here.
3286
32872002-09-23  Jeffrey Stedfast  <fejj@ximian.com>
3288
3289	* gmime-filter-charset.c: Try our best to handle EILSEQ (illegal
3290	multibyte sequences) by eating the illegal bytes and
3291	continuing. This seems to be what users expect (it's what Mozilla
3292	seems to do).
3293
32942002-09-15  Jeffrey Stedfast  <fejj@ximian.com>
3295
3296	* gmime-charset.c (g_mime_charset_name): Don't g_assert after
3297	using strtoul on the iso charset name, seems that some news
3298	clients use 'isolatin' as if it were a real charset (it's not) and
3299	we don't want to abort() on this.
3300
33012002-09-14  Jeffrey Stedfast  <fejj@ximian.com>
3302
3303	* doc/*: Updated.
3304
3305	* gmime-utils.c (g_mime_utils_decode_message_id): New function to
3306	decode a message-id as defined by rfc822.
3307	(g_mime_references_decode): New function to decode a references or
3308	in-reply-to header.
3309	(g_mime_references_append): New function to append a raw
3310	message-id to a GMimeReferences list.
3311	(g_mime_references_clear): New function to clear a GMimeReferences
3312	list.
3313
3314	* internet-address.c (decode_addrspec): New function to parse an
3315	addr-spec needed by the msg-id decoder.
3316	(decode_lwsp): Make public.
3317	(decode_word): Same.
3318
33192002-09-08  Jeffrey Stedfast  <fejj@ximian.com>
3320
3321	* gmime-utils.c (parse_broken_date): Wrap printfs in d() to
3322	prevent them from printing anything unless debugging is turned on.
3323
33242002-09-03  Jeffrey Stedfast  <fejj@ximian.com>
3325
3326	* gmime-utils.c (get_tzone): Fixed to not get false positives when
3327	the token is shorter than the actual timezone string (but matches
3328	the first little bit of it).
3329
33302002-09-03  Tomasz K�oczko  <kloczek@pld.org.pl>
3331
3332	* Makefile.am: fixes for automake >= 1.5 (removed duplicated
3333	variables) and few minor cleanups and better method for install gmime
3334	aclocal macros.
3335
3336	* doc/Makefile.am: fixes for "make install DESTDIR=</install/prefix>".
3337
33382002-09-01  Jeffrey Stedfast  <fejj@ximian.com>
3339
3340	* internet-address.c (decode_mailbox): When erroring out due to no
3341	local part in the add-spec, set *in to inptr + 1 so we don't get
3342	into an infinite loop.
3343
3344	* gmime-message-part.c (message_part_remove_header): Same as
3345	below.
3346
3347	* gmime-multipart.c (multipart_remove_header): Same as
3348	gmime-part.c
3349
3350	* gmime-part.c (mime_part_remove_header): Don't return anything
3351	here since our function is supposed to return void.
3352
33532002-08-31  Jeffrey Stedfast  <fejj@ximian.com>
3354
3355	* gmime-parser.c (parser_scan_mime_part_content): Pass `content'
3356	into parser_scan_content(), fixes bug #92183.
3357
33582002-08-30  Jeffrey Stedfast  <fejj@ximian.com>
3359
3360	* configure.in: Bumped version to 1.90.1
3361
3362	* doc/Makefile.am: Don't gtkdoc-fixxref if the user disabled
3363	gtk-doc from the build.
3364
33652002-08-25  Jeffrey Stedfast  <fejj@ximian.com>
3366
3367	* test-best.c: New test suite for the gmime-filter-best filter.
3368
3369	* gmime.h.in: Added gmime-filter-best.h
3370
3371	* gmime-filter-best.c (g_mime_filter_best_charset): Never return
3372	NULL, instead return us-ascii.
3373	(filter_filter): Fixed to not get into an infinite loop.
3374
33752002-08-23  Jeffrey Stedfast  <fejj@ximian.com>
3376
3377	* doc/*: Updated.
3378
3379	* gmime-message-part.c (message_part_write_to_stream): Changed the
3380	prototype to return ssize_t and not int.
3381
33822002-08-21  Jeffrey Stedfast  <fejj@ximian.com>
3383
3384	* gmime-filter-best.c: New filter for calculating the best charset
3385	and encoding for a stream.
3386
3387	* gmime-iconv-utils.c (g_mime_iconv_locale_to_utf8): Make
3388	threadsafe.
3389	(g_mime_iconv_locale_to_utf8_length): Same.
3390	(g_mime_iconv_utf8_to_locale): Here too.
3391	(g_mime_iconv_utf8_to_locale_length): And here.
3392
3393	* gmime.c (g_mime_init): Updated to call
3394	g_mime_charset_map_init().
3395
3396	* gmime-charset.c (g_mime_charset_locale_name): Initialize the
3397	charset map if it hasn't already been initialized.
3398	(g_mime_charset_map_init): Renamed from g_mime_charset_init().
3399	(g_mime_charset_init): Renamed from charset_init() and also made
3400	it globally accessable.
3401	(g_mime_charset_step): New external function (was an internal
3402	function before).
3403	(g_mime_charset_best_name): Now an external function also.
3404
34052002-08-19  Jeffrey Stedfast  <fejj@ximian.com>
3406
3407	* gmime-gpg-context.c (gpg_decrypt): Report better errors for when
3408	gpg fails to be executed.
3409	(gpg_encrypt): Same.
3410	(gpg_verify): Here too.
3411	(gpg_sign): And here.
3412	(gpg_ctx_op_start): Try stat()ing the gpg binary to make sure it
3413	exists and when handling an exception, save errno so we can re-set
3414	it after cleanup.
3415
34162002-08-11  Jeffrey Stedfast  <fejj@ximian.com>
3417
3418	* gmime-iconv.c: Instead of checking for #ifdef _REENTRANT, just
3419	check #ifdef G_THREADS_ENABLED and use a GStaticMutex rather than
3420	a pthread_mutex_t.
3421
3422	* gmime-charset.c (g_mime_charset_init): Use nl_langinfo() if it
3423	is available.
3424	(g_mime_charset_name): Call g_mime_charset_init() if
3425	iconv_charsets is NULL (meaning the programmer did not properly
3426	initialize gmime). Also do mutex locking around the use of the
3427	iconv_charset hash table.
3428
34292002-08-10  Jeffrey Stedfast  <fejj@ximian.com>
3430
3431	* test-pgpmime.c (test_multipart_signed): Unref the content object
3432	after setting it on the MIME part.
3433
3434	* gmime-multipart-signed.c (g_mime_multipart_signed_sign): Unref
3435	the content object after setting it on the MIME part.
3436	(g_mime_multipart_signed_verify): Unref the content object after
3437	we're done with it.
3438
3439	* gmime-multipart-encrypted.c
3440	(g_mime_multipart_encrypted_encrypt): Unref the content object
3441	after setting it on the MIME part.
3442	(g_mime_multipart_encrypted_decrypt): Unref the content object
3443	after we're done with it.
3444
3445	* gmime-message-partial.c
3446	(g_mime_message_partial_reconstruct_message): Unref the content
3447	object when we're done with it.
3448	(g_mime_message_partial_split_message): Unref the content object
3449	after setting it on the MIME part.
3450
3451	* gmime-parser.c (parser_scan_mime_part_content): Unref the
3452	content object after setting it on the MIME part.
3453
3454	* gmime-part.c (g_mime_part_set_content_object): Ref the new
3455	content object and unref the old.
3456	(g_mime_part_get_content_object): Ref the content object before
3457	returning it to our caller.
3458	(g_mime_part_finalize): Unref the content object.
3459
3460	* gmime-data-wrapper.c: Rewritten to subclass GObject.
3461	(g_mime_data_wrapper_destroy): Removed.
3462	(g_mime_data_wrapper_write_to_stream): Virtualize.
3463
34642002-08-08  Jeffrey Stedfast  <fejj@ximian.com>
3465
3466	* gmime-iconv.c: Implemented an all new iconv cache. Also has the
3467	beginnings of thread-safety but I'd really need to fix the
3468	Makefiles to conditionally link with -lpthread before it'd be of
3469	any value as well as needing to make gmime-charset.c's functions
3470	thread-safe.
3471
34722002-08-07  Jeffrey Stedfast  <fejj@ximian.com>
3473
3474	* gmime-message.c (message_remove_header): If the header to be
3475	removed is one of the special headers, then g_free() the cached
3476	value on the message object and set it to NULL. Fixes bug #90138.
3477
34782002-08-05  Jeffrey Stedfast  <fejj@ximian.com>
3479
3480	* doc/*: Updated.
3481
3482	* gmime-multipart-signed.c (g_mime_multipart_signed_sign):
3483	Documented.
3484	(g_mime_multipart_signed_verify): Documented.
3485
3486	* gmime-filter-from.c (g_mime_filter_from_new): Updated the
3487	documentation to explain the new mode argument.
3488
3489	* gmime-multipart-encrypted.c
3490	(g_mime_multipart_encrypted_encrypt): Documented.
3491	(g_mime_multipart_encrypted_decrypt): Documented.
3492
3493	* gmime-gpg-context.c (g_mime_gpg_context_get_always_trust):
3494	Implemented.
3495
34962002-08-04  Jeffrey Stedfast  <fejj@ximian.com>
3497
3498	* doc/*: Updated.
3499
35002002-08-03  Jeffrey Stedfast  <fejj@ximian.com>
3501
3502	* gmime-message.c (g_mime_message_set_message_id): Revert Charles'
3503	previous fix and just g_return_if_fail() if the message_id is NULL
3504	instead.
3505	(g_mime_message_set_subject): Same for NULL subjects.
3506	(g_mime_message_set_reply_to): Here too.
3507	(g_mime_message_set_sender): Again here.
3508	(g_mime_message_add_header): Check that the value != NULL.
3509	(g_mime_message_set_header): Same here.
3510
3511	* internet-address.c (decode_mailbox): Changed a for-loop into a
3512	while-loop to make the code a tad easier to read. Also fixed a
3513	type-o that meant to wrap a debug printf in d(). While we're at
3514	it, g_strstrip the resulting comment before using it as the name
3515	part of the address.
3516
35172002-08-02  Jeffrey Stedfast  <fejj@ximian.com>
3518
3519	* gmime-message-part.c: Fix some comments that say "message/*"
3520	(which is meant as a wildcard mime-type match) and change them to
3521	just "message" to prevent compiler warnings about a /* being
3522	inside a comment.
3523
3524	* gmime-charset.c: Get rid of a #include "unicode.h". This is no
3525	longer needed since we use glib2's unicode stuff.
3526
35272002-08-02  Charles Kerr <charles@rebelbase.com>
3528
3529	* gmime-message.c (gmime_message_foreach_part): if the message
3530	isn't a multipart message, just invoke the callback directly,
3531	passing in the single part.
3532
3533	* gmime-message.c (gmime_message_set_message_id): work around
3534	a g_strstrip() warning if message_id is NULL.
3535
3536	* gmime-part.c (g_mime_part_get_content_object): remove "const"
3537	from the retval; otherwise it's impossible to add a new filter.
3538
35392002-07-31  Jeffrey Stedfast  <fejj@ximian.com>
3540
3541	* gmime-filter-html.c (is_addr_char): Don't use "isprint(c)" to
3542	mean "c >= 32 && c < 128" since it doesn't in most locales.
3543	(is_url_char): Same.
3544	(is_trailing_garbage): Same.
3545	(is_domain_name_char): New macro for dns-valid characters
3546	(email_address_extract): Use is_domain_name_char rather than
3547	is_addr_char for the part after the @.
3548
35492002-07-30  Jeffrey Stedfast  <fejj@ximian.com>
3550
3551	* gmime-parser.c (parser_step_headers): Finish the fix from
3552	yesterday, the last statement of the while-loop needs to
3553	re-calculate `len' for parser_fill().
3554
35552002-07-30  Charles Kerr <charles@rebelbase.com>
3556
3557	* gmime-message.c (message_remove_header): Fix April 3 2002 bug
3558	that kept message-remove-header from removing headers.
3559
35602002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
3561
3562	* gmime-message.c (message_get_headers): Write the toplevel MIME
3563	Part's headers to the string as well, this fixes bug #88632 in
3564	bugzilla.gnome.org.
3565
35662002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
3567
3568	The following changes are meant to address bug #88100 on
3569	bugzilla.gnome.org - I'm as of yet unsure whether or not GMime
3570	should override the Message-Id write function or if Pan should do
3571	it. I'm sort of leaning towards Pan doing it simply because the
3572	current behavior is RFC compliant and the bug is really a "we need
3573	a workaround for a buggy NNTP server". However... It might just be
3574	simpler to have GMime do it.
3575
3576	* gmime-header.c (g_mime_header_new): Init a new hash table that
3577	stores info on how to write a particular header.
3578	(g_mime_header_destroy): Free the hash table.
3579	(g_mime_header_set_write_func): Set the writer function for a
3580	header.
3581	(g_mime_header_write_to_stream): Use the specified header write
3582	function for each ehader. If one wasn't specified, use the
3583	default.
3584
35852002-07-29  Charles Kerr  <charles@rebelbase.com>
3586
3587	* remove strlib.[ch]
3588	* use g_strcasecmp instead of strcasecmp
3589	* use g_strncasecmp instead of strncasecmp
3590	* use g_stpcpy instead of stpcpy
3591	* added "#include <string.h>" where needed
3592
35932002-07-29  Charles Kerr  <charles@rebelbase.com>
3594
3595	* gmime-filter-strip: fix trivial compiler warning.
3596	* gmime-message-part.c: same.
3597	* gmime-multipart-signed.c: same.
3598	* gmime-object.c: same.
3599	* gmime-param.c: same.
3600	* gmime-session.c: same.
3601	* test-iconv.c: same.
3602	* test-mbox.c: same.
3603	* test-parser.c: same.
3604	* test-partial.c: same.
3605
36062002-07-29  Jeffrey Stedfast  <fejj@ximian.com>
3607
3608	* gmime-parser.c (parser_step_headers): When refilling, make sure
3609	that the refilled buffer is larger than the buffer was before
3610	refilling, otherwise break out of the loop and parse whatever is
3611	left. Fixes bug #89260 on bugzilla.gnome.org
3612
36132002-07-27  Jeffrey Stedfast  <fejj@ximian.com>
3614
3615	* gmime-stream-cat.c (stream_read): Initialize `n' at the
3616	beginning of the while-loop so that it can't be used
3617	uninitialized.
3618
3619	* gmime-parser.c (header_parse): Check to make sure that the
3620	header was valid (ie, `colon' == ':'). If not, then set
3621	header->value to "".
3622
36232002-05-26  Charles Kerr <charles@rebelbase.com>
3624
3625	* alloca.c: removed.
3626	* gmime-charset.c: use g_alloca instead of alloca.
3627	* gmime-filter-from.c: same.
3628	* gmime-filter-strip.c: same.
3629	* gmime-iconv.c: same.
3630	* gmime-param.c: same.
3631	* gmime-part.c: same.
3632	* gmime-utils.c: same.
3633	* memchunk.c: same.
3634
36352002-07-21  Jeffrey Stedfast  <fejj@ximian.com>
3636
3637	* gmime-filter-crlf.c (filter_filter): Fix to not add an extra \r
3638	for pre-canonicalised streams.
3639
36402002-07-19  Jeffrey Stedfast  <fejj@ximian.com>
3641
3642	* gmime-iconv-utils.c (g_mime_iconv_strndup): Fix a logic mistake
3643	in the calculation of the number of bytes converted.
3644
36452002-07-18  Jeffrey Stedfast  <fejj@ximian.com>
3646
3647	* gmime-part.c (set_disposition): Fix to parse the disposition
3648	parameter values rather than assuming it is only the "attachment"
3649	or "inline" part of the value.
3650
36512002-07-14  Jeffrey Stedfast  <fejj@ximian.com>
3652
3653	* configure.in: check for gmtime_r
3654
3655	* gmime-utils.c (g_mime_utils_header_format_date): Use gmtime_r() if
3656	we have this function available to us.
3657
3658	* gmime-parser.c (parser_step_from): Save the From-line offset.
3659	(g_mime_parser_get_from_offset): Newly implemented function used
3660	for retrieving the offset of the From-line (for use when parsing
3661	mbox files).
3662
36632002-07-11  Jeffrey Stedfast  <fejj@ximian.com>
3664
3665	* strlib.c (strlcpy): Changed to behave the same as the Solaris
3666	strlcpy function.
3667	(strlcat): Changed to behave the same as the Solaris strlcat
3668	function.
3669
36702002-07-04  Jeffrey Stedfast  <fejj@ximian.com>
3671
3672	* gmime-iconv-utils.c (g_mime_iconv_strndup): Fix for
3673	nul-terminating some multibyte charsets.
3674
36752002-06-28  Jeffrey Stedfast  <fejj@ximian.com>
3676
3677	* gmime-gpg-context.c (gpg_ctx_op_step): If we get an EOF from the
3678	status-fd, then set gpg->complete to TRUE.
3679	(gpg_ctx_get_argv): Use --charset=UTF-8 and --keyserver-options to
3680	disable auto-key-retrieve rather than the deprecated
3681	--no-auto-key-retrieve flag.
3682
36832002-06-27  Jeffrey Stedfast  <fejj@ximian.com>
3684
3685	* gmime-gpg-context.c (gpg_ctx_op_step): Loop on our reads while
3686	errno is EINTR or EAGAIN. Also make sure to completely read stdout
3687	and stderr by keeping better state.
3688	(gpg_ctx_parse_status): If we encounted a NODATA error from gpg
3689	and we have diagnostics output, use that as the exception string.
3690	(gpg_ctx_op_exited): New function to determine if the gpg process
3691	has exited.
3692	(gpg_ctx_op_wait): Reuse any exit status information from
3693	gpg_ctx_op_exited().
3694	(gpg_verify): Check that the gpg process has not exited each loop.
3695
36962002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
3697
3698	* gmime-multipart-signed.c (g_mime_multipart_signed_sign): Once
3699	we've created the mime-part stream and armored the From lines and
3700	such, create a new MIME part based on this stream (since normally
3701	our QP encoder will not armor From lines) and use it as the
3702	content part for this multipart/signed part rather than the
3703	original MIME part.
3704	(multipart_signed_write_to_stream): This can now be simplified by
3705	calling our parent class's write_to_stream implementation since
3706	g_mime_multipart_signed_sign() takes care of all the From
3707	armoring.
3708
37092002-06-26  Jeffrey Stedfast  <fejj@ximian.com>
3710
3711	* test-pgpmime.c: New test suite for the pgp/mime code.
3712
3713	* gmime-gpg-context.c (gpg_ctx_parse_status): Handle a NODATA
3714	status message from gpg.
3715
3716	* gmime-message.c (g_mime_message_new): Don't set NULL header
3717	values via the g_mime_object_set_header interface.
3718
3719	* gmime-object.c (g_mime_object_add_header): Don't allow value == NULL.
3720	(g_mime_object_set_header): Same.
3721
3722	* gmime.h.in: Updated to #include the new headers related to
3723	encryption and digital signatures.
3724
3725	* gmime.c (g_mime_init): register the multipart/encrypted and
3726	multipart/signed cclass types.
3727
3728	* gmime-multipart-signed.c: Fixed to compile cleanly.
3729	(multipart_signed_write_to_stream): We need to handle writing out
3730	the subparts ourselves because we need to armor From-lines.
3731
3732	* gmime-multipart-encrypted.c: Fixed to compile cleanly.
3733
37342002-06-25  Jeffrey Stedfast  <fejj@ximian.com>
3735
3736	* gmime-param.c (g_string_append_len_quoted): Append length as
3737	advertised rather than appending the whole string. Oops.
3738
3739	* gmime-multipart-encrypted.c
3740	(g_mime_multipart_encrypted_decrypt): Ugh, the
3741	g_return_val_if_fail()'s should be returning NULL.
3742
3743	* test-pgp.c: New test suite to make sure that the gpg code works.
3744
3745	* gmime-gpg-context.c: Keep more state as it seems we needed
3746	it. Also keep information such as trust level and whether the
3747	signature was found to be valid and such (in case we ever decide
3748	to use it).
3749
37502002-06-24  Jeffrey Stedfast  <fejj@ximian.com>
3751
3752	* gmime-multipart-signed.c (g_mime_multipart_signed_get_type):
3753	Register as a subclass of a GMimeMultipart.
3754
3755	* gmime-multipart-encrypted.c
3756	(g_mime_multipart_encrypted_get_type): Same.
3757
3758	* gmime-gpg-context.[c,h]: A new class implementing the
3759	GMimeCipherContext interfaces for GnuPG.
3760
3761	* gmime-session.[c,h]: New abstract session class for use by the
3762	cipher context classes for requesting passphrases/etc.
3763
3764	* gmime-cipher-context.c (g_mime_cipher_context_finalize): Unref
3765	the gmime-session.
3766
37672002-06-22  Jeffrey Stedfast  <fejj@ximian.com>
3768
3769	* gmime-part.c: Oops, a prototype had the wrong return type.
3770
37712002-06-19  Jeffrey Stedfast  <fejj@ximian.com>
3772
3773	* gmime-multipart.c: Oops, some prototypes had the wrong return
3774	type.
3775
37762002-06-15  Jeffrey Stedfast  <fejj@ximian.com>
3777
3778	* gmime-parser.c (parser_scan_mime_part_content): Use
3779	g_mime_stream_mem_new_with_byte_array() so that the mem stream
3780	owns the byte array so we don't leak.
3781
37822002-06-12  Jeffrey Stedfast  <fejj@ximian.com>
3783
3784	* gen-table.c: Updated.
3785
3786	* gmime-utils.c (quoted_decode): Oops. ESPECIALs are allowed
3787	inside of the encoded-text section of the encoded-word.
3788
3789	* gmime-message.c (process_header): Add some NULL-protection.
3790
3791	* gmime-iconv.c (g_mime_iconv_open): If the from charset is
3792	"x-unknown", replace it with the user's locale charset.
3793
37942002-06-11  Jeffrey Stedfast  <fejj@ximian.com>
3795
3796	* gmime-parser.c (parser_scan_mime_part_content): If the parser
3797	stream is not seekable, then scan the content into a memory
3798	stream.
3799
38002002-06-09  Jeffrey Stedfast  <fejj@ximian.com>
3801
3802	* gmime-2.0.pc.in: New file for use in pkg-config.
3803
3804	* gmime-filter-strip.[c,h]: New source files implementing a stream
3805	filter for stripping trailing whitespace from lines (needed for
3806	PGP/MIME).
3807
3808	* gmime-exception.[c,h]: New source files implementing generic
3809	error reporting functionality.
3810
3811	* gmime-cipher-context.[c,h]: New abstract class for performing
3812	common functionality (such as encryption, decryption, signing,
3813	verifying, importing keys, and exporting keys) needed by any MIME
3814	cipher suite (PGP/MIME and S/MIME specifically).
3815
3816	* gmime-multipart-signed.[c,h]: New source files implementing the
3817	multipart/signed specification.
3818
3819	* gmime-multipart-encrypted.[c,h]: New source files implementing
3820	the multipart/encrypted specification.
3821
38222002-06-06  Jeffrey Stedfast  <fejj@ximian.com>
3823
3824	* test-mbox.c (test_parser): Test the new set_header_regex
3825	function.
3826
3827	* gmime-parser.c (g_mime_parser_set_header_regex): New convenience
3828	function to allow an application to be notified when a header
3829	matching a particular pattern is parsed by the
3830	parser. Particularly useful for finding the Status: header when
3831	parsing mbox files.
3832
38332002-06-04  Jeffrey Stedfast  <fejj@ximian.com>
3834
3835	* gmime-iconv-utils.c (g_mime_iconv_strndup): Pull up past fixes
3836	from the gmime-1 branch.
3837
38382002-06-02  Jeffrey Stedfast  <fejj@ximian.com>
3839
3840	* gmime.c (g_mime_init): Register the message-part class.
3841
3842	* gmime-message-part.c: New class for handling message/* subparts.
3843
3844	* gmime-parser.c (parser_scan_message_part): Handle mime parts of
3845	type message.
3846	(parser_construct_leaf_part): Find out if the leaf part is
3847	actually a message part.
3848
3849	* gmime-filter-from.c (g_mime_filter_from_new): Now takes a mode
3850	argument to specify how "From "'s should be protected.
3851	(filter_filter): If we are to armor the "From " then transform it
3852	into "=46rom " otherwise transform it into the normal ">From ".
3853
38542002-05-31  Jeffrey Stedfast  <fejj@ximian.com>
3855
3856	* gmime/gmime-stream-cat.c (stream_read): Rewritten to work
3857	correctly. This was broken worse than I could imagine :-)
3858	(stream_write): Fix similarly.
3859
38602002-05-30  Jeffrey Stedfast  <fejj@ximian.com>
3861
3862	* gmime-stream-cat.c (stream_reset): Same.
3863
3864	* gmime-stream-file.c (stream_reset): Same.
3865
3866	* gmime-stream-fs.c (stream_reset): If the stream position is
3867	already reset, just return 0.
3868
38692002-05-23  Jeffrey Stedfast  <fejj@ximian.com>
3870
3871	* doc/*: Updated documentation.
3872
38732002-05-22  Jeffrey Stedfast  <fejj@ximian.com>
3874
3875	* gmime-multipart.c (multipart_write_to_stream): Avoid adding an
3876	extranious newline character when a preface doesn't exist.
3877
38782002-05-20  Jeffrey Stedfast  <fejj@ximian.com>
3879
3880	* gmime-part.c (g_mime_part_set_content_md5): Fix some compiler
3881	warnings as well as doing some more error handling.
3882	(g_mime_part_verify_content_md5): Same.
3883
3884	* md5-utils.c: Removed some compiler warnings.
3885
38862002-05-20  Jeffrey Stedfast  <fejj@ximian.com>
3887
3888	* gmime-stream-cat.c (stream_seek): Return the absolute offset
3889	into the cat stream rather than the relative offset of one of the
3890	substreams on success. Fixed a few other things too.
3891	(stream_read): Fix the logic here so that we never try reading
3892	from a stream that is current at EOS.
3893
38942002-05-16  Jeffrey Stedfast  <fejj@ximian.com>
3895
3896	* gmime-parser.c (parser_scan_mime_part_content): Only compensate
3897	for the '\n' if we found a boundary.
3898
38992002-05-16  Charles Kerr <charles@rebelbase.com>
3900
3901	* gmime-filter-yenc.c: fixed regression that caused end line of
3902	yenc encoding to not be detected.  This was causing crc errors in Pan.
3903
39042002-05-14  Jeffrey Stedfast  <fejj@ximian.com>
3905
3906	* gmime-stream-filter.c (stream_destroy): Removed.
3907
39082002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
3909
3910	* gmime-stream-cat.c (stream_read): Don't allow our caller to read
3911	past the end of the stream.
3912	(stream_write): Same.
3913	(stream_seek): Don't forget to add the current source stream's
3914	bound_start when seeking on the current source stream.
3915
3916	* gmime-message-partial.c (g_mime_message_partial_init): Zero our
3917	extra fields.
3918	(g_mime_message_partial_finalize): Cleanup strdup'd memory.
3919	(message_partial_set_content_type): Implemented.
3920	(g_mime_message_partial_class_init): Override set_content_type().
3921	(g_mime_message_partial_get_id): Simplify.
3922	(g_mime_message_partial_get_number): Simplify.
3923	(g_mime_message_partial_get_total): Simplify.
3924
3925	* gmime-multipart.c (multipart_set_content_type): Implement.
3926	(g_mime_multipart_class_init): Override set_content_type().
3927
3928	* gmime-object.c: Make set_content_type() virtual.
3929
39302002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
3931
3932	* gmime-message-partial.c (partial_compare): Fixed to work
3933	properly.
3934
39352002-05-12  Jeffrey Stedfast  <fejj@ximian.com>
3936
3937	* test-partial.c: New test suite for gmime-message-partial.c.
3938
3939	* gmime-stream-cat.c: Several fixes.
3940	(g_mime_stream_cat_class_init): Overload the seek method.
3941
3942	* gmime-stream-mmap.c (g_mime_stream_mmap_class_init): Overload
3943	the seek method.
3944
3945	* gmime-stream-buffer.c (g_mime_stream_buffer_class_init):
3946	Overload the seek method.
3947
3948	* gmime-stream-null.c (g_mime_stream_null_class_init): Overload
3949	the seek method.
3950
3951	* gmime-stream-filter.c (g_mime_stream_filter_class_init):
3952	Overload the seek method.
3953
3954	* gmime-stream.c (g_mime_stream_class_init): Overload the seek
3955	method.
3956
3957	* gmime-stream-mem.c (g_mime_stream_mem_class_init): Overload the
3958	seek method.
3959
3960	* gmime-stream-file.c (g_mime_stream_file_class_init): Overload
3961	the seek method.
3962	(stream_length): The length of the stream is bound_end -
3963	bound_start.
3964
3965	* gmime-stream-fs.c (g_mime_stream_fs_class_init): Overload the
3966	seek method.
3967	(stream_length): The length of the stream is bound_end -
3968	bound_start.
3969
39702002-05-10  Jeffrey Stedfast  <fejj@ximian.com>
3971
3972	* gmime-stream-cat.c (stream_reset): Use stream_seek().
3973	(stream_read): Seek to position before starting our read, this is
3974	to protect against one of our source streams being read while we
3975	weren't looking and/or a substream related to our cat stream.
3976	(stream_write): Same.
3977
39782002-05-09  Jeffrey Stedfast  <fejj@ximian.com>
3979
3980	* gmime-message-partial.c: New class to handle MIME parts with a
3981	content-type of message/partial.
3982
3983	* gmime.c (g_mime_init): Register the message/partial class.
3984
3985	* gmime-object.c (g_mime_object_new_type): If we fail to find an
3986	appropriate mime object class, try falling back to the */*
3987	handler. Only if that fails do we return NULL.
3988
39892002-05-08  Jeffrey Stedfast  <fejj@ximian.com>
3990
3991	* Makefile.am: Added gmime-stream-cat.c to the build.
3992
3993	* gmime-stream-cat.c: New stream that acts similar to the Unix
3994	`cat` command by concatenating multiple streams.
3995
39962002-05-07  Jeffrey Stedfast  <fejj@ximian.com>
3997
3998	* gmime-stream-fs.c (stream_write): Do more error handling and
3999	also try to write out everything.
4000
40012002-05-02  Jeffrey Stedfast  <fejj@ximian.com>
4002
4003	* gmime-charset.c (main): Generate the multibyte charsets without
4004	the need for using external .dat files. Also attempt to condense
4005	the charset-map table a bit.
4006
4007	* gen-multibyte.c: Removed.
4008
40092002-04-30  Jeffrey Stedfast  <fejj@ximian.com>
4010
4011	* gmime-charset.c (main): Instead of converting the multibyte
4012	charset tables to UTF-8 and then using the unicode functions to
4013	convert UTF-8 to UCS4, just convert directly to UCS4. Also fixed a
4014	type-o in the Big5.dat filename (it should be Big5.dat not
4015	Big5.data).
4016
40172002-04-26  Jeffrey Stedfast  <fejj@ximian.com>
4018
4019	* gmime-parser.c (parser_fill): Try to align the end of our
4020	left-over buffer with realbuf + SCAN_HEAD so that we avoid: 1)
4021	completely filling the prespace or 2) reading more than SCAN_BUF
4022	bytes per read() call.
4023
40242002-04-25  Jeffrey Stedfast  <fejj@ximian.com>
4025
4026	* gmime-utils.c (g_mime_utils_base64_decode_step): Only backtrack
4027	if we have output data.
4028
40292002-04-23  Jeffrey Stedfast  <fejj@ximian.com>
4030
4031	* gmime-utils.c (rfc2047_encode_phrase): Fixed a small memory
4032	leak. Thanks to the Pan guys for finding this.
4033
40342002-04-21  Jeffrey Stedfast  <fejj@ximian.com>
4035
4036	* gmime-parser.c (parser_step_from): Fixes to make it work.
4037	(g_mime_parser_eos): New function to tell if a parser is at the
4038	end of it's stream.
4039
40402002-04-20  Jeffrey Stedfast  <fejj@ximian.com>
4041
4042	* docs/*: Updated.
4043
4044	* configure.in: Add $srcdir to the include path so it catches
4045	iconv-detect.h.
4046
40472002-04-18  Jeffrey Stedfast  <fejj@ximian.com>
4048
4049	* gmime-parser.c (parser_step_headers): Take advantage of the same
4050	optimization as parser_scan_content.
4051
40522002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
4053
4054	* gmime-parser.c (parser_scan_content): Optimized by a good 15% by
4055	simply changing my inner while-loop. See comment for explanation.
4056
4057	* gmime-part.c (g_mime_part_encoding_from_string): Added support
4058	for the binary encoding.
4059	(g_mime_part_encoding_to_string): Same.
4060
4061	* gmime-utils.h: Added GMIME_PART_ENCODING_BINARY.
4062
40632002-04-17  Jeffrey Stedfast  <fejj@ximian.com>
4064
4065	* gmime-parser.c (parser_scan_multipart_subparts): Don't leak
4066	objects!
4067
40682002-04-16  Jeffrey Stedfast  <fejj@ximian.com>
4069
4070	* gmime-message.c (process_header): process the headers we care
4071	about.
4072	(message_add_header): Call process_header.
4073	(message_set_header): Same.
4074
4075	* gmime-part.c (process_header): process the headers we care
4076	about.
4077	(mime_part_add_header): Call process_header.
4078	(mime_part_set_header): Same.
4079
4080	* gmime-object (process_header): process the headers we care
4081	about.
4082	(add_header): Call process_header.
4083	(set_header): Same.
4084
40852002-04-15  Jeffrey Stedfast  <fejj@ximian.com>
4086
4087	* gmime-parser.c (g_mime_parser_set_scan_from): New accessor
4088	method to set whether or not to scan from-lines.
4089	(g_mime_parser_get_scan_from): New accessor method to get the
4090	from-line mode.
4091
40922002-04-14  Jeffrey Stedfast  <fejj@ximian.com>
4093
4094	* gmime-utils.c (datetok): Treat ',' as a token delimeter. Also
4095	updated the datetok lookup table.
4096
4097	* configure.in: Check for off_t, size_t, and ssize_t.
4098
40992002-04-15  Jeffrey Stedfast  <fejj@ximian.com>
4100
4101	* gmime-parser.[c,h]: Brand spankin' new parser. Seems to work for
4102	at least simple messages, needs a lot more love though.
4103
4104	* gmime-stream*.c: Don't use a base_class init or finalize.
4105
4106	* gmime-object.c: Same.
4107
4108	* gmime-part.c: Same here.
4109
4110	* gmime.c (g_mime_init): Call g_type_init.
4111
4112	* gmime-utils.c (g_mime_utils_header_fold): Slight bugfix to get
4113	rid of extra whitespace at the end of a line.
4114
4115	* gmime-multipart.c (g_mime_multipart_set_preface): New accesor
4116	function to set the multipart preface.
4117	(g_mime_multipart_get_preface): New accesor function to get the
4118	multipart preface.
4119	(g_mime_multipart_set_postface): New accesor function to set the
4120	multipart postface.
4121	(g_mime_multipart_get_postface): New accesor function to get the
4122	multipart postface.
4123	(write_to_stream): Don't force a preface if we don't have one.
4124
41252002-04-08  Jeffrey Stedfast  <fejj@ximian.com>
4126
4127	* gmime-object.c: Don't tie the type-registry lifetime to the
4128	GMimeObject lifetime.
4129
4130	* gmime.c (g_mime_init): Register our generic and multipart/* MIME
4131	object classes here.
4132
4133	* gmime-part.c (g_mime_part_class_init): Don't register ourselves
4134	here anymore.
4135
4136	* gmime-multipart.c (g_mime_multipart_class_init): Don't register
4137	ourselves here anymore.
4138
41392002-04-07  Jeffrey Stedfast  <fejj@ximian.com>
4140
4141	* gmime-utils.c (g_mime_utils_uuencode_close): Fixed a bug that
4142	crept in during my simplification.
4143
41442002-04-07  Jeffrey Stedfast  <fejj@ximian.com>
4145
4146	* gmime-part.c (g_mime_part_set_content_id): Wrap the object
4147	set_content_id.
4148	(g_mime_part_get_content_id): Same.
4149
4150	* gmime-multipart.c
4151	(g_mime_multipart_get_subpart_from_content_id): Compare the
4152	object->content_id's.
4153
4154	* gmime-object.c (g_mime_object_set_content_id): New function
4155	since the Content-Id should really be stored on the object class.
4156	(g_mime_object_get_content_id): Same.
4157	(set_header): If we are setting the Content-Id header, also set
4158	our internal content_id member.
4159	(add_header): Same.
4160
4161	* gmime-content-type.c (g_mime_content_type_set_parameter):
4162	Renamed from g_mime_content_type_add_parameter.
4163
4164	* gmime-multipart.c (g_mime_multipart_new_with_subtype): New
4165	convenience function.
4166
4167	* Makefile.am temporarily removed gmime-parser.c from the
4168	build. It needs to be completely rewritten from scratch pretty
4169	much.
4170
41712002-04-06  Jeffrey Stedfast  <fejj@ximian.com>
4172
4173	* gmime-part.c (g_mime_part_add_subpart): Removed.
4174	(g_mime_part_set_boundary): Removed.
4175	(g_mime_part_get_boundary): Removed.
4176
4177	* gmime-object.c (g_mime_object_get_content_type_parameter): New
4178	function.
4179	(g_mime_object_set_content_type_parameter): New function.
4180
4181	* gmime-multipart.c (g_mime_multipart_new): New function, forgot
4182	to implement it before ;-)
4183	(multipart_set_boundary): Set the boundary parameter on the
4184	content-type.
4185
41862002-04-06  Jeffrey Stedfast  <fejj@ximian.com>
4187
4188	* gmime-part.c (g_mime_part_foreach): Removed.
4189	(g_mime_part_get_subpart_from_content_id): Same.
4190
4191	* gmime-multipart.c (g_mime_multipart_foreach): Moved here from
4192	gmime-part.c:g_mime_part_foreach since this is really only meant
4193	to work on multiparts.
4194	(g_mime_multipart_get_subpart_from_content_id): Same idea here too.
4195
4196	* gmime-object.c (g_mime_object_set_content_type): Move
4197	g_mime_part_set_content_type up to the GMimeObject abstraction.
4198	(g_mime_object_get_content_type): Same.
4199
42002002-04-03  Jeffrey Stedfast  <fejj@ximian.com>
4201
4202	* gmime-message.c: Initial port to GObject.
4203
42042002-04-02  Jeffrey Stedfast  <fejj@ximian.com>
4205
4206	* gmime-message.c (g_mime_message_add_recipients_from_string):
4207	Destroy the temporary addrlist.
4208
42092002-03-29  Jeffrey Stedfast  <fejj@ximian.com>
4210
4211	* configure.in: Detect the iconv-friendly formats for iso charsets
4212	at configure time and dump them into iconv-detect.h for use in
4213	gmime-charset.c.
4214
4215	* gmime-charset.c: Updated to use iconv-detect.h if it exists.
4216
42172002-03-25  Jeffrey Stedfast  <fejj@ximian.com>
4218
4219	* gmime-multipart.c: Compile fixes.
4220
4221	* gmime-header.c (g_mime_header_write_to_stream): Now returns the
4222	number of bytes written or -1 on fail.
4223
4224	* gmime-object.c: Compile fixes.
4225
4226	* gmime-stream-null.c (g_mime_stream_null_finalize): And finally
4227	here.
4228
4229	* gmime-stream-mmap.c (g_mime_stream_mmap_finalize): Here too.
4230
4231	* gmime-stream-mem.c (g_mime_stream_mem_finalize): And again...
4232
4233	* gmime-stream-fs.c (g_mime_stream_fs_finalize): Again here.
4234
4235	* gmime-stream-filter.c (g_mime_stream_filter_finalize): Here too.
4236
4237	* gmime-stream-file.c (g_mime_stream_file_finalize): Same.
4238
4239	* gmime-stream-buffer.c (g_mime_stream_buffer_finalize): Call
4240	GObject's finalize function.
4241
42422002-03-24  Jeffrey Stedfast  <fejj@ximian.com>
4243
4244	* memchunk.c: Make this compile.
4245
4246	* internet-address.c (decode_mailbox): No longer check
4247	gmime_interfaces_utf8 as that was a hack in gmime-1's branch.
4248
4249	* gmime-charset.c (charset_step): Sync with the gmime-1 branch. We
4250	now have multibyte charset detection.
4251
4252	* gmime-utils.c: Sync with gmime-1's changed.
4253	(rfc2047_decode_word): Always convert decoded text to UTF-8.
4254	(rfc2047_encode_phrase_get_words): We can always assume our input
4255	is in UTF-8 now.
4256	(rfc2047_encode_phrase): Sam here.
4257	(g_string_append_len): Removed since glib2 now has this function.
4258
4259	* gmime-param.c (decode_param): Make sure the decoded text is
4260	valid UTF-8.
4261	(encode_param): Convert to the best charset before encoding.
4262	(g_string_append_len): Removed since glib2 now has this function.
4263
4264	* gmime.c (g_mime_init): Initializes gmime. We no longer care
4265	about GMIME_INIT_FLAGS_UTF8 as we now always use UTF-8 interfaces.
4266
42672002-03-17  Jeffrey Stedfast  <fejj@ximian.com>
4268
4269	* gmime-stream-null.c (g_mime_stream_null_get_type): Use
4270	GMIME_TYPE_STREAM as our base class.
4271	(g_mime_stream_null_class_init): Our parent class is a
4272	GMIME_STREAM_CLASS, not a G_OBJECT_CLASS.
4273	(g_mime_stream_null_finalize): Call our parent's finalize, which
4274	is GMIME_STREAM_CLASS's finalize, not G_OBJECT_CLASS's finalize.
4275
4276	* gmime-stream-mmap.c: Same.
4277
4278	* gmime-stream-filter.c: Here too.
4279
4280	* gmime-stream-file.c: And here.
4281
4282	* gmime-stream-fs.c: Again here.
4283
4284	* gmime-stream-mem.c: And again...
4285
4286	* gmime-stream-buffer.c: And finally here.
4287
4288	* gmime-multipart.[c,h]: New class that inherits from GMimeObject
4289	that represents a MIME multipart.
4290
42912002-03-17  Jeffrey Stedfast  <fejj@ximian.com>
4292
4293	* gmime-object.c: Ported to glib2 by subclassing GObject and also
4294	added a GMimeHeader data member and methods to access those
4295	headers as well as adding abstract methods for getting the headers
4296	as one big string buffer and writing the object headers/content to
4297	a stream.
4298
4299	* gmime-stream-*.c (*_class_init): Don't set a destroy handler -
4300	we can't, we don't have a virtual function pointer for it!
4301
4302	* gmime-stream.c (g_mime_stream_substream): Use GET_CLASS since we
4303	are passing in an object.
4304	(g_mime_stream_length): Same.
4305	(g_mime_stream_tell): Here too.
4306	(g_mime_stream_seek): And here.
4307	(g_mime_stream_reset): And again here.
4308	(g_mime_stream_eos): Again.
4309	(g_mime_stream_close): Here too.
4310	(g_mime_stream_flush): Same.
4311	(g_mime_stream_write): Same here.
4312	(g_mime_stream_read): And finally here.
4313	(g_mime_stream_class_init): Setup default implementations of all
4314	the stream methods. Also no longer set a destroy handler.
4315
4316	* gmime-stream-buffer.[c,h]: Updated to subclass the new
4317	GMimeStream based on GObject.
4318
43192002-03-16  Jeffrey Stedfast  <fejj@ximian.com>
4320
4321	* gmime-stream-filter.[c,h]: Updated to subclass the new
4322	GMimeStream based on GObject.
4323
4324	* gmime-stream-fs.[c,h]: Updated to subclass the new GMimeStream
4325	based on GObject.
4326
4327	* gmime-stream-file.[c,h]: Updated to subclass the new GMimeStream
4328	based on GObject.
4329
4330	* gmime-stream-mmap.[c,h]: Updated to subclass the new GMimeStream
4331	based on GObject.
4332
4333	* gmime-stream-null.[c,h]: Updated to subclass the new GMimeStream
4334	based on GObject.
4335
4336	* gmime-stream-mem.[c,h]: Updated to be based on the new
4337	implementation of GMimeStream.
4338
4339	* gmime-type-utils.h: New file to contain some more-friendly
4340	type-cast macros around the glib2 ones.
4341
4342	* gmime-stream.[c,h]: Now subclasses GObject. Not sure if I got
4343	everything right, but I think it's mostly there?
4344
43452002-03-15  Charles Kerr <charles@rebelbase.com>
4346
4347	* gmime-filter-charset.c: fixed minor compiler warnings.
4348	* gmime-iconv-utils.c: same.
4349	* test-html.c: same.
4350	* test-iconv.c: same.
4351	* test-mime.c: same.
4352	* test-streams.c: same.
4353
43542002-03-15  Jeffrey Stedfast  <fejj@ximian.com>
4355
4356	* gmime-utils.c (g_mime_utils_uudecode_step): Fixed a logic
4357	mistake. All is good now in the land of UU :-)
4358
43592002-03-15  Charles Kerr <charles@rebelbase.com>
4360
4361	Syncing up with small changes from Pan...
4362
4363	* gmime-content-type.c: remove unused #include <alloca.h>
4364	* gmime-message.c: same.
4365	* gmime-part.c: same.
4366	* internet-address.c: same.
4367
4368	* gmime-filter-basic.c: add #include <string.h> (strncmp)
4369	* gmime-filter-yenc.c: add #include <string.h> (strncmp)
4370	* gmime-iconv-utils.c: add #include <string.h> (strlen)
4371	* gmime-iconv.c: add #include <string.h> (strlen)
4372	* gmime-iconv.c: add #include <stdio.h> (sprintf)
4373
43742002-03-14  Jeffrey Stedfast  <fejj@ximian.com>
4375
4376	* gmime-filter-yenc.c (filter_reset): Added a switch-statement
4377	based on direction. Yes, for now the INIT state for encode/decode
4378	are both the same but this may change? Probably not but oh well
4379	:-)
4380	(g_mime_ydecode_step): Sync up with Charles' yenc fixes.
4381
43822002-03-13  Jeffrey Stedfast  <fejj@ximian.com>
4383
4384	* gmime-filter-yenc.c: Compile fixes.
4385
43862002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
4387
4388	* gmime-filter-yenc.c (g_mime_filter_yenc_get_pcrc): Finalize the
4389	crc before returning.
4390	(g_mime_filter_yenc_get_crc): Same.
4391
43922002-03-12  Jeffrey Stedfast  <fejj@ximian.com>
4393
4394	* gmime-filter-yenc.c: New filter to encode/decode yEnc streams.
4395
43962002-03-03  Jeffrey Stedfast  <fejj@ximian.com>
4397
4398	Thanks to Carlos Morgado <chbm@chbm.nu>
4399
4400	* gmime.spec.in: Fix.
4401
44022002-03-03  Jeffrey Stedfast  <fejj@ximian.com>
4403
4404	* gmime-part.c (g_mime_part_write_to_stream): Get rid of some
4405	extra line feeds.
4406
44072002-02-21  Jeffrey Stedfast  <fejj@ximian.com>
4408
4409	* doc/*: Updated.
4410
4411	* configure.in: Updated version to 0.8.0
4412
44132002-01-25  Jeffrey Stedfast  <fejj@ximian.com>
4414
4415	* gmime-charset.c (g_mime_charset_name): Updated for AIX, HPUX,
4416	IRIX, and Sun systems.
4417
44182002-01-24  Jeffrey Stedfast  <fejj@ximian.com>
4419
4420	* gmime-iconv.c (iconv_cache_bucket_add_node): Fixed an oops.
4421	(iconv_cache_bucket_get_first_unused): Fixed another oops.
4422
44232002-01-20  Jeffrey Stedfast  <fejj@ximian.com>
4424
4425	* gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
4426	Handle the x-uuencode encoding type.
4427
4428	* gmime-utils.c (g_mime_utils_uuencode_close): No longer needs a
4429	uulen argument since it is now compacted into the state argument.
4430	(g_mime_utils_uuencode_step): Same here.
4431
4432	* gmime-filter-basic.c (filter_filter): Ignore data until we have
4433	found the "begin" line. Also, we no longer need uulen.
4434	(filter_complete): Same.
4435
4436	* gmime-part.c (g_mime_part_encoding_to_string): Handle
4437	x-uuencode.
4438	(g_mime_part_encoding_from_string): Same.
4439	(g_mime_part_set_pre_encoded_content): Here too.
4440	(write_content): And again here.
4441
44422002-01-19  Jeffrey Stedfast  <fejj@ximian.com>
4443
4444	* gmime-iconv.c (iconv_node_new): Return the node - how did I miss
4445	this!?
4446
44472002-01-18  Jeffrey Stedfast  <fejj@ximian.com>
4448
4449	* configure.in: Fixed more silliness.
4450
4451	* acconfig.h: Added #undef's for some iconv stuff.
4452
4453	* gmime-filter-charset.c (g_mime_filter_charset_new): Put the
4454	charset arguments in the right order.
4455
4456	* gmime-iconv.c (g_mime_iconv_open): Swap the to/from arguments so
4457	that they are in the same order as iconv_open.
4458
4459	* gmime-iconv-utils.c (iconv_utils_init): Put the to/from
4460	arguments in the right order.
4461
44622002-01-17  Jeffrey Stedfast  <fejj@ximian.com>
4463
4464	* gmime-iconv-utils.c (g_mime_iconv_strndup): If we get an EILSEQ,
4465	just return NULL rather than g_strndup'ing the original
4466	string. We'd rather get back NULL and know it failed than get back
4467	a string thinking everything went okay.
4468
4469	* configure.in: Fixed some silliness, thanks to Charles Schmidt.
4470
44712002-01-16  Jeffrey Stedfast  <fejj@ximian.com>
4472
4473	* gmime-iconv-utils.c (g_mime_iconv_strndup): New utility function
4474	to iconv n bytes of a string and return a buffer containing the
4475	converted string.
4476	(g_mime_iconv_strdup): Same but for the whole string.
4477	(g_mime_iconv_locale_to_utf8): Converts a string in the locale
4478	charset to utf8.
4479	(g_mime_iconv_locale_to_utf8_length): Same but for a sublength of
4480	the string.
4481	(g_mime_iconv_utf8_to_locale): Converts a string from utf8 to the
4482	locale charset.
4483	(g_mime_iconv_utf8_to_locale_length): Same but for a sublength of
4484	the string.
4485
44862002-01-15  Jeffrey Stedfast  <fejj@ximian.com>
4487
4488	* test-iconv.c: test suite to make sure that the gmime-iconv cache
4489	works.
4490
4491	* gmime-iconv.c (g_mime_iconv_init): Initialize the iconv_node
4492	memchunk.
4493	(g_mime_iconv_shutdown): Destroy the iconv_node memchunk.
4494	(iconv_node_destroy): Use memchunk_free instead of g_free.
4495	(iconv_node_new): Use memchunk_alloc.
4496	(iconv_node_set_used): Add/Remove the node to the iconv_open_hash.
4497
44982002-01-14  Jeffrey Stedfast  <fejj@ximian.com>
4499
4500	* configure.in: Bumped the version to 0.7.7
4501
4502	* doc/*: Updated to document the new gmime-iconv interfaces.
4503
4504	* gmime-filter-charset.c (g_mime_filter_charset_new): Use
4505	g_mime_iconv_open instead of iconv_open. Also no longer need to
4506	use g_mime_charset_name() since gmime-iconv does this for us.
4507	(filter_destroy): Use g_mime_iconv_close() instead of
4508	iconv_close().
4509
4510	* gmime-iconv.c (g_mime_iconv_open): New wrapper around
4511	iconv_open() so that we can cache the results. This'll be a major
4512	speedup for systems like Solaris where iconv_open() must dlopen a
4513	module for each of the charsets. Also uses g_mime_charset_name()
4514	to get the iconv-friendly charset name for you.
4515	(g_mime_iconv_close): New wrapper around iconv_close().
4516
45172002-01-13  Jeffrey Stedfast  <fejj@ximian.com>
4518
4519	* configure.in: Bumped version to 0.7.6
4520
4521	* doc/*: Updated to document the new charset code.
4522
4523	* gmime.h.in: Added #includes for gmime-charset.h and
4524	gmime-filter-charset.h.
4525
4526	* gmime-filter-charset.c: New filter for converting text between
4527	charsets using iconv.
4528
4529	* gmime-charset.c (g_mime_charset_name): New function to derive
4530	the iconv-friendly name for a given charset.
4531
45322002-01-09  Charles Kerr <charles@rebelbase.com>
4533
4534	* internet-address.c (internet_address_list_prepend): replaced
4535	"g_return_if_fail" with "g_return_val_if_fail".
4536	* internet-address.c (internet_address_list_append): same.
4537
4538	* internet-address.c (internet_address_set_group): removed
4539	unused variables to shut up compiler.
4540	* gmime-param.c (rfc2184_decode): same.
4541
45422002-01-08  Jeffrey Stedfast  <fejj@ximian.com>
4543
4544	* config.h.in: Added a #include <alloca.h> if HAVE_ALLOCA_H is
4545	defined - this limits the number of places I have to conditionally
4546	add #include <alloca.h> in the source files.
4547
45482002-01-05  Jeffrey Stedfast  <fejj@ximian.com>
4549
4550	* gmime-utils.c (parse_broken_date): Implemented.
4551
45522002-01-04  Jeffrey Stedfast  <fejj@ximian.com>
4553
4554	* memchunk.c (memchunk_clean): Oops, when tree_search() returns 0
4555	we want to prune it, not the other way around :-)
4556
45572002-01-02  Jeffrey Stedfast  <fejj@ximian.com>
4558
4559	* memchunk.c (memchunk_clean): Fixed a logic mistake that
4560	prevented pruning of the head node.
4561
45622002-01-01  Charles Kerr <charles@rebelbase.com>
4563
4564	* gmime-message (g_mime_message_get_body): added g_return_val_if_fail
4565	checks in the entry point.
4566
45672001-12-31  Jeffrey Stedfast  <fejj@ximian.com>
4568
4569	* internet-address.c (decode_address): Optimized group parsing.
4570
4571	* doc/*: Updated.
4572
45732001-12-31  Jeffrey Stedfast  <fejj@ximian.com>
4574
4575	* strlib.c (strncasecmp): Convert the chars to lowercase before
4576	diffing.
4577
45782001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
4579
4580	* configure.in: Bumped version number to 0.7.5 since the
4581	internet-address API and bits of the gmime-message API have
4582	changed.
4583
4584	* internet-address.c (internet_address_new): Initialize the
4585	refcount to 1.
4586	(internet_address_destroy): This is now an internal function.
4587	(internet_address_ref): New function to ref an InternetAddress
4588	object.
4589	(internet_address_unref): New function to unref an InternetAddress
4590	object.
4591	(internet_address_set_group): Updated to use the new
4592	internet_address_list functions.
4593	(internet_address_add_member): Same.
4594	(internet_address_list_prepend): New function to manipulate a list
4595	of InternetAddress objects.
4596	(internet_address_list_append): Same.
4597	(internet_address_list_concat): Another new function.
4598	(internet_address_list_length): Again...
4599	(internet_address_list_destroy): Destroy a list of addresses.
4600	(internet_address_list_to_string): New utility function to write a
4601	list of addresses to a string.
4602	(internet_address_parse_string): Optimized slightly by not using
4603	GLists' generic append function and also updated to use
4604	InternetAddressList.
4605
4606	* gmime-message.c (recipients_destroy): Updated to call
4607	internet_address_list_destroy.
4608	(sync_recipient_header): Updated to let the InternetAddress code
4609	do the work for us.
4610	(g_mime_message_add_recipient): Updated to use the new
4611	InternetAddress API.
4612	(g_mime_message_add_recipients_from_string): Same.
4613	(g_mime_message_get_recipients): Return an InternetaddressList
4614	instead of GList.
4615
46162001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
4617
4618	* strlib.c (strncasecmp): Do null-checking.
4619
4620	* TODO: Remove features that have already been
4621	implemented/fixed/whatever.
4622
46232001-12-30  Jeffrey Stedfast  <fejj@ximian.com>
4624
4625	* memchunk.c (memchunk_clean): Prune 'cleaned' nodes from our
4626	free-node list. Thanks to Charles Kerr for discovering this bug.
4627
4628	* strlib.c (strncasecmp): Moved the return calculation to within
4629	the loop so as to only take a difference if the strings are not
4630	identical. This also fixes a bug that would falsely return
4631	non-zero for strings that were identical for the first n bytes.
4632
46332001-12-20  Jeffrey Stedfast  <fejj@ximian.com>
4634
4635	* gmime-stream.c (g_mime_stream_construct): 'type' is now an
4636	unsigned int rather than a signed int.
4637
4638	* memchunk.c (memchunk_clean): Oops. Don't forget to free the tree
4639	after we're finished with it...
4640
46412001-12-18  Jeffrey Stedfast  <fejj@ximian.com>
4642
4643	Various compiler warning fixes to several source files (mostly
4644	"unused variable" type stuff).
4645
46462001-12-17  Jeffrey Stedfast  <fejj@ximian.com>
4647
4648	* gmime-utils.c (datetok): reimplement to not use GLists
4649	(appending is slow) and also to not g_strndup the token, instead
4650	just remember it's offset and length so we can examine it later.
4651	(decode_int): New function to decode an int.
4652	(get_wday): Now takes an inlen argument.
4653	(get_mday): Same. Also calls decode_int.
4654	(get_month): Here too.
4655	(get_year): Again here... also calls decode_int.
4656	(get_tzone): Modified to use struct _date_token.
4657	(get_time): Completely rewritten.
4658
46592001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
4660
4661	* memchunk.[c,h]: A memchunk library similar to g_mem_chunk's but
4662	faster.
4663
46642001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
4665
4666	* configure.in: Added a --enable-warnings to turn on compiler
4667	warnings.
4668
4669	* gmime-utils.c: Various compiler warning cleanup.
4670
4671	* gmime-object.c (g_mime_object_construct): Change the type
4672	argument to be of type unsigned rather than int.
4673
4674	* gmime-filter-html.c (url_extract): g_strndup takes an unsigned
4675	length argument.
4676
4677	* gmime-filter-from.c (filter_filter): memcpy takes an unsigned
4678	length argument.
4679
4680	* gmime-disposition.c (g_mime_disposition_new): g_strndup takes an
4681	unsigned length argument.
4682
4683	* gmime-content-type.c (g_mime_content_type_new_from_string):
4684	g_strndup takes an unsigned length argument.
4685
4686	* gmime-charset.c (g_mime_charset_init): g_strndup takes an
4687	unsigned length argument.
4688
46892001-12-16  Jeffrey Stedfast  <fejj@ximian.com>
4690
4691	* gmime-part.c (g_mime_part_destroy): Now an internal-only method.
4692
4693	* gmime-message.c (g_mime_message_destroy): Now an internal-only
4694	method.
4695
46962001-12-05  Jeffrey Stedfast  <fejj@ximian.com>
4697
4698	* gmime-filter-basic.c (filter_filter):
4699	(filter_complete): The outbuf for QP decoding can be up to len + 2
4700	bytes and UU decoding outbuf can be up to len + 3 bytes.
4701
47022001-12-01  Jeffrey Stedfast  <fejj@ximian.com>
4703
4704	* gmime-parser.c (parse_content_headers): Set is_multipart to
4705	FALSE.
4706	(g_mime_parser_construct_part_internal): Get the inlen properly
4707	and do content-offsetting a little better by skipping past the
4708	end-of-header marker.
4709
4710	* gmime-stream-buffer.c (g_mime_stream_buffer_gets): Use the
4711	'register' keyword for some variables.
4712
4713	* gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): Safeguard
4714	against NULL streams.
4715	(g_mime_data_wrapper_write_to_stream): Reset the stream before
4716	writing too.
4717
4718	* gmime-stream-mem.c (stream_seek): Fix to work like the others.
4719	(stream_read): On error, always return -1 (and not just any value
4720	less than 0)
4721	(stream_write): Same.
4722
47232001-11-30  Jeffrey Stedfast  <fejj@ximian.com>
4724
4725	* gmime-part.c (write_content): Implemented a slight optimization
4726	which bypasses the need to do any encoding in certain
4727	circumstances.
4728
47292001-11-28  Jeffrey Stedfast  <fejj@ximian.com>
4730
4731	* pan-mime-parser.c (parser_read_until_boundary): Make sure
4732	boundary is non-NULL before calling strlen on it.
4733
47342001-11-26  Jeffrey Stedfast  <fejj@ximian.com>
4735
4736	* gmime-parser.c (g_mime_parser_construct_part_internal): Fixed a
4737	bug - don't set bounds on the original stream, set the bounds on
4738	our temporary memory stream. Also got rid of find_header_end().
4739
4740	* gmime-filter-from.c (filter_filter): initialize fromcount to 0.
4741
47422001-11-25  Jeffrey Stedfast  <fejj@ximian.com>
4743
4744	* strlib.c (strlcpy): BSD defines the prototype as returning
4745	size_t, the strlen of the resultant string.
4746	(strlcat): Same.
4747
4748	* gmime-stream-buffer.c (stream_flush): Oops, memmove the buffer
4749	too and a smidgen of code cleanup.
4750	(stream_reset): Fix reset for block write mode.
4751
4752	* configure.in: Bumped the version to 0.7.4 and added checks for
4753	system mmap functions.
4754
4755	* gmime-stream-mmap.[c,h]: New stream that uses an mmaped buffer.
4756
47572001-11-24  Jeffrey Stedfast  <fejj@ximian.com>
4758
4759	* doc/gmime-docs.sgml: Added documentation of the use of filters.
4760
47612001-11-23  Jeffrey Stedfast  <fejj@ximian.com>
4762
4763	* gmime-stream-buffer.c (stream_seek): Implemented.
4764
4765	* gmime-parser.c (parse_content_headers): Fixed another memory
4766	leak here.
4767
4768	* gmime-param.c (decode_param_list): Fixed a small memory leak.
4769
47702001-11-22  Jeffrey stedfast  <fejj@ximian.com>
4771
4772	* gmime-filter-from.[c,h]: New filter to escape from-lines.
4773
4774	* pan-mime-parser.c (parser_read_until_boundary): Slight
4775	optimization.
4776
47772001-11-21  Jeffrey Stedfast  <fejj@ximian.com>
4778
4779	* gmime-utils.c (is_8bit_word_encoded): Make into a macro, we
4780	don't need to do a strlen because the atom is a GString which
4781	means we have it's length already. This also saves us some
4782	overhead of calling a function.
4783	(g_mime_utils_8bit_header_decode): Update to pass the len argument
4784	to is_8bit_word_encoded.
4785
47862001-11-18  Jeffrey Stedfast  <fejj@ximian.com>
4787
4788	* configure.in: Bumped version to 0.7.3
4789
4790	* gmime-param.c: GMimeParam is now a linked list of parameters
4791	rather than a single name/value pair.
4792	(g_mime_param_new_from_string): Now returns a parameter list based
4793	on the input string rather than only returning a single parameter
4794	name/value pair. Also updated to handle rfc2184 encoded
4795	parameters.
4796	(g_mime_param_destroy): Destroy the linked list of params.
4797	(g_mime_param_append): Append a new parameter.
4798	(g_mime_param_append_param): Append a new parameter object.
4799	(g_mime_param_write_to_string): New function (which replaces
4800	g_mime_param_to_string) which correctly encodes (either by quoting
4801	the value or rfc2184 encoding it) the list of parameters and
4802	optionally folds them suitable for header wrapping.
4803
4804	* gmime-disposition.[c,h]: New source files to handle
4805	parsing/generating Content-Disposition headers.
4806
4807	* gmime-part.c (g_mime_part_destroy): Updated to use
4808	g_mime_disposition_destroy.
4809	(g_mime_part_set_content_disposition_object): New function for
4810	setting the disposition object on a mime part.
4811	(g_mime_part_set_content_disposition): Updated to use
4812	g_mime_disposition_set.
4813	(g_mime_part_get_content_disposition): Updated to use
4814	g_mime_disposition_get.
4815	(g_mime_part_add_content_disposition_parameter): Updated to use
4816	g_mime_disposition_add_parameter.
4817	(g_mime_part_get_content_disposition_parameter): Updated to use
4818	g_mime_disposition_get_parameter.
4819	(g_mime_part_set_filename): Updated to use
4820	g_mime_disposition_add_parameter.
4821	(g_mime_part_get_filename): Updated to use
4822	g_mime_disposition_get_parameter.
4823
4824	* gmime-content-type.c (g_mime_content_type_new_from_string): Use
4825	the gmime-param code to parse any Content-Type parameters.
4826	(g_mime_content_type_destroy): Updated to use
4827	g_mime_param_destroy.
4828	(g_mime_content_type_add_parameter): Updated to use g_mime_param
4829	functions.
4830
4831	* gmime-utils.c (g_mime_utils_header_fold): Fixed a small header
4832	folding bug.
4833
4834	* gmime-parser.c (parse_content_headers): Updated to use the
4835	GMimeDisposition parser.
4836
4837	* pan-mime-parser.c (parse_content_headers): Updated to use the
4838	GMimeDisposition parser.
4839
48402001-11-16  Jeffrey Stedfast  <fejj@ximian.com>
4841
4842	* configure.in: Bumped version to 0.7.2 due to the change-over to
4843	refcounted mime objects.
4844
4845	* gmime-object[c,h]: New source files that implement an abstract
4846	Object class.
4847
4848	* gmime-message.c: Updated to subclass GMimeObject
4849
4850	* gmime-part.c: Updated to subclass GMimeObject
4851	(g_mime_part_set_content_header): Set an arbitrary mime content
4852	header.
4853	(g_mime_part_get_content_header): Get an arbitrary mime content
4854	header.
4855	(g_mime_part_add_child): Finally deprecated, please use
4856	g_mime_part_add_subpart instead if you aren't already.
4857
4858	* gmime-parser.c: Updated to unref mime parts where appropriate as
4859	well as set unknown content headers on mime parts.
4860
4861	* pan-mime-parser.c: Same as gmime-parser.c
4862
48632001-11-14  Jeffrey Stedfast  <fejj@ximian.com>
4864
4865	* gmime-stream-null.c (g_mime_stream_null_new): A new stream,
4866	similar to /dev/null basically.
4867
48682001-11-10  Jeffrey Stedfast  <fejj@ximian.com>
4869
4870	* configure.in: Added checks for strlib functions and bumped the
4871	version to 0.7.1 (there won't be an official 0.7.1 release but I
4872	figure I should be bumping version numbers whenever I add
4873	functionality).
4874
4875	* strlib.[c,h]: New string library that provides anything that the
4876	system libc doesn't (includig strnstr and stpcpy).
4877
4878	* gmime-filter-html.[c,h]: New filter that converts plain text
4879	into HTML suitable for display in things like GtkHTML (makes urls
4880	into hyperlinks and preserves whitespace and such).
4881
4882	* gmime-parser.c (g_strstrbound): Removed.
4883	(find_header_part_end): Use strnstr.
4884	(g_mime_parser_construct_part_internal): Use strnstr.
4885
48862001-10-26  Jeffrey Stedfast  <fejj@ximian.com>
4887
4888	* configure.in: Updated the version to 0.7.0
4889
4890	* doc/*: Updated.
4891
48922001-10-25  Jeffrey Stedfast  <fejj@ximian.com>
4893
4894	* gmime-message.c (g_mime_message_new): Now takes an
4895	"init_headers" argument, it doesn't really matter what value you
4896	put here - it's more a "I want my message headers to be in a nice
4897	friendly order rather than the order they are set in".
4898
4899	* gmime-parser.c (g_mime_parser_construct_message): Use
4900	!preserve_headers as the init_headers argument to
4901	g_mime_message_new ().
4902
4903	* pan-mime-parser.c (g_mime_parser_construct_message): Same.
4904
49052001-10-24  Jeffrey Stedfast  <fejj@ximian.com>
4906
4907	* pan-mime-parser.c (construct_message_headers): Use
4908	g_mime_header_add instead of g_mime_header_set so we can get
4909	multiple of the same header (such as "Received:").
4910
4911	* gmime-parser.c (construct_headers): Use g_mime_header_add
4912	instead of g_mime_header_set so we can get multiple of the same
4913	header (such as "Received:") and also move it into the switch
4914	statement into the default case.
4915
4916	* gmime-message.c (g_mime_message_set_header): New function to add
4917	a header to a message.
4918
4919	* gmime-header.c (g_mime_header_add): New function to add a
4920	header.
4921
4922	* gmime-stream.c (g_mime_stream_writev): New function to write a
4923	vector to a stream.
4924
49252001-10-21  Jeffrey Stedfast  <fejj@ximian.com>
4926
4927	* pan-mime-parser.c: Updated to use g_mime_stream_buffer_readln.
4928
4929	* gmime-stream-buffer.c (g_mime_stream_buffer_readln): New
4930	convenience function to read a single line from a stream.
4931
49322001-10-12  Jeffrey Stedfast  <fejj@ximian.com>
4933
4934	* gmime-part.c (g_mime_part_write_to_stream): No longer takes a
4935	'toplevel' argument.
4936	(g_mime_part_to_string): No longer takes a 'toplevel' argument.
4937
4938	* gmime-message.c (g_mime_message_write_to_stream): Write the
4939	MIME-Version header here instead of needing to pass a 'toplevel'
4940	argument to g_mime_part_write_to_stream().
4941
4942	* gmime-charset.c (g_mime_charset_init): Fix for Debian and
4943	Solaris.
4944
49452001-10-09  Charles Kerr <charles@rebelbase.com>
4946
4947	* gmime-filter.c (g_mime_filter_construct): make sure outptr is
4948	zeroed out before we read it in g_mime_filter_set_size().
4949
49502001-10-06  Jeffrey Stedfast  <fejj@ximian.com>
4951
4952	* gmime-filter-basic.c (filter_filter): Implemented uuencoding.
4953	(filter_complete): Implemented uuencoding.
4954
4955	* gmime-utils.c (g_mime_utils_uuencode_close): New function to
4956	flush the uuencoder.
4957	(g_mime_utils_uuencode_step): New function to uuencode a block of
4958	data.
4959
49602001-10-05  Jeffrey Stedfast  <fejj@ximian.com>
4961
4962	Fixes for c++ compilation
4963
4964	* gmime-stream*.c: s/template/stream_template
4965
4966	* gmime-filter*.c: s/template/filter_template
4967
49682001-10-04  Jeffrey Stedfast  <fejj@ximian.com>
4969
4970	* gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): If we
4971	just change the order of operations, we can get away without a
4972	second stream pointer.
4973
4974	* gmime-stream.c (g_mime_stream_substream): Revert.
4975
4976	* gmime-stream-buffer.c (stream_substream): Instead of calling
4977	g_mime_stream_substream(), call the source stream's substream
4978	method directly. I think this is the better fix for the bug
4979	Charles just fixed.
4980
49812001-10-04  Charles Kerr <charles@rebelbase.com>
4982
4983	* gmime-stream.c (g_mime_stream_substream): fix refcount stealth
4984	bug.  Calling this on a buffered stream wound up reffing two
4985	streams instead of one because of a nested call to
4986	g_mime_stream_substream().  This took a lot of scaffolding to
4987	find. :)
4988
4989	* gmime-data-wrapper.c (g_mime_data_wrapper_set_stream): fix
4990	refcount paranoia bug.  ref the new *before* unreffing the old
4991	just in case new==old.
4992
4993	* gmime-filter-basic.[ch]: fix some compiler warnings that I
4994	introduced yesterday.  (Strange how the same version of gcc finds
4995	different warnings on different platforms.)
4996
49972001-10-03  Charles Kerr <charles@rebelbase.com>
4998
4999	* gmime-part.c (g_mime_part_get_content): bugfix for when getting
5000	the content from a stream-mem.  We were just returning the
5001	stream-mem's gbytearray buffer, but we need to check against the
5002	stream's bounds.
5003
5004	* gmime-filter-basic.[ch]: added support for decoding a uuencoded
5005	stream; added a placeholder for uuencoding a stream.
5006
5007	* md5-utils.c: commented out d(x) macro.
5008
50092001-10-02  Jeffrey Stedfast  <fejj@ximian.com>
5010
5011	* gmime-stream-buffer.h: buflen should be an ssize_t not a
5012	size_t. Thanks to Charles for catching this.
5013
50142001-10-01  Charles Kerr <charles@rebelbase.com>
5015
5016	* gmime-filter.c: include <string.h> to pick up memcpy prototype.
5017	* gmime-stream-mem.c: same.
5018	* gmime-stream-buffer.c: same.
5019	* gmime-stream-filter.c: same.
5020
5021	* gmime-stream-mem.c (stream_flush): added a retval of 0.
5022
5023	* gmime-filter-crlf.h (g_mime_filter_crlf_new_type): renamed
5024	prototype as g_mime_filter_crlf_new to sync with .c
5025
5026	* gmime-part.h: added g_mime_part_set_content_object() prototype.
5027
5028	* gmime-content-type.h: Replaced <> with "" in #include
5029	<gmime-param.h>
5030
5031	* pan-mime-parser.c: added #include gmime-stream-buffer.h to pick
5032	up prototype for g_mime_stream_buffer_gets.
5033	(g_strstrbound): removed unused func.
5034
5035	* gmime-utils.c: on calls to ctype functions, explicitly upcast
5036	the char arguments as ints to shut up gcc warnings on Solaris.
5037	* gmime-param.c: same.
5038
50392001-09-29  Jeffrey Stedfast  <fejj@ximian.com>
5040
5041	* pan-mime-parser.c: New parser (with exactly the same API as
5042	gmime-parser.c) that is meant to parse MIME objects without
5043	needing them to be memory mapped. Quite a bit slower on average,
5044	but is vastly sped up by using a GMimeStreamBuffer in BLOCK_READ
5045	mode.
5046
5047	* gmime-stream-buffer.c (stream_write): Incremement the stream
5048	position by the number of bytes we wrote.
5049	(stream_tell): Return stream->position.
5050	(stream_substream): Just return a substream of our source stream.
5051	(g_mime_stream_buffer_gets): Increment the stream position by the
5052	number of bytes read if and only if we are operating on a buffered
5053	stream.
5054
50552001-09-27  Jeffrey Stedfast  <fejj@ximian.com>
5056
5057	* gmime-stream-file.c (stream_tell): Return stream->position here
5058	too.
5059
5060	* gmime-part.c (g_mime_part_set_pre_encoded_content): Don't decode
5061	into a stream and then set the data wrapper encoding to the
5062	incoming encoding type, instead use filters to decode into the
5063	stream and set the data wrapper encoding to the default.
5064
5065	* gmime-stream.c (g_mime_stream_set_bounds): Don't set the
5066	position equal to end if end == -1.
5067
5068	* gmime-parser.c (g_mime_parser_construct_message): Use the stream
5069	functions to find the beginning and end of the stream rather than
5070	breaking abstractions. Also reset the mem stream after writing to
5071	it.
5072	(g_mime_parser_construct_part): Reset the mem stream here too.
5073	(g_mime_parser_construct_part_internal): Use the stream interfaces
5074	to get the position instead of breaking abstractions.
5075
5076	* gmime-stream-fs.c (stream_tell): Return stream->position.
5077
5078	* gmime-stream-mem.c (stream_seek): Return the new syteam
5079	position.
5080	(stream_tell): Return stream->position.
5081
50822001-09-23  Jeffrey Stedfast  <fejj@ximian.com>
5083
5084	* doc/gmime-docs.sgml: Documented streams.
5085
5086	* gmime-stream-fs.c (stream_write): Seek to the position we think
5087	we're at before attempting to write, and increment the stream
5088	position after the write.
5089
5090	* gmime-stream-file.c (stream_write): Seek to the position we
5091	think we're at... this is just in case we are or have substreams
5092	that might have read or written in the meantime. Also remember to
5093	increment the stream position after the write.
5094	(stream_eos): Only return feof() if our end boundary is unlimited.
5095
5096	* gmime-stream-mem.c (stream_write): Start writing data at
5097	stream->position rather than always appending it to the end of the
5098	mem stream. Also don't go writing past the end boundary if it's
5099	set.
5100	(stream_length): Use a relative bound_end.
5101	(stream_seek): Same.
5102	(stream_eos): Here too.
5103	(stream_write): And here.
5104	(stream_read): And here.
5105	(stream_substream): Correctly set the bounds.
5106	(g_mime_stream_mem_new): Here too.
5107	(g_mime_stream_mem_new_with_byte_array): And here.
5108	(g_mime_stream_mem_new_with_buffer): Same.
5109	(g_mime_stream_mem_set_byte_array): And finally here.
5110
51112001-09-22  Jeffrey Stedfast  <fejj@ximian.com>
5112
5113	* test-streams.c: New test suite for streams.
5114
5115	* gmime-stream-buffer.c (stream_read): Fixed some logic bugs
5116	(including forgetting a break statement at the end of a case).
5117	(g_mime_stream_buffer_gets): Fixed some logic bugs.
5118
5119	* gmime-stream-mem.c (stream_read): Fixed logic error.
5120
51212001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
5122
5123	* gmime-stream-buffer.c (g_mime_stream_buffer_gets): Implemented.
5124	(stream_reset): Implemented.
5125	(stream_eos): Implemented.
5126	(stream_write): Reimplemented.
5127	(stream_read): Reimplemented.
5128
51292001-09-21  Jeffrey Stedfast  <fejj@ximian.com>
5130
5131	* gmime-stream-buffer.[c,h]: New stream that buffers reads or
5132	writes to/from another stream. Will also implement a gets() method
5133	for Charles.
5134
51352001-09-20  Jeffrey Stedfast  <fejj@ximian.com>
5136
5137	* gmime-stream-mem.c (stream_eos): Check for position >= instead
5138	of == bound_end
5139
5140	* gmime-stream.c (g_mime_stream_eos): Do some simple bounds
5141	checking.
5142
5143	* doc/*: Updated.
5144
5145	* gmime-part.c (g_mime_part_get_content_object): Added.
5146
51472001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
5148
5149	* gmime-stream-fs.c (stream_seek): Improve.
5150
5151	* gmime-stream-file.c (stream_reset): Oops, reset the position
5152	pointer on a successful reset.
5153	(stream_seek): Fixed.
5154
51552001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
5156
5157	* gmime-stream-fs.c (stream_reset): Reset the position offset. Doh!
5158
5159	* gmime-stream.c (g_mime_stream_write_to_stream): Don't increment
5160	total if no bytes were read/written.
5161
5162	* gmime-stream-filter.c (stream_substream): Copy over the filters.
5163
5164	* gmime-part.c (g_mime_part_verify_content_md5): Updated.
5165	(g_mime_part_set_content_md5): Updated.
5166	(g_mime_part_get_content): Updated.
5167	(write_content): Updated.
5168
5169	* gmime-data-wrapper.c (g_mime_data_wrapper_write_to_stream):
5170	Implemented.
5171
5172	* gmime-filter-basic.[c,h]: A basic filter that does Base64 and QP
5173	encoding/decoding.
5174
5175	* gmime-filter-crlf.[c,h]: A simple filter that does crlf(/dot)
5176	encoding/decoding.
5177
51782001-09-19  Jeffrey Stedfast  <fejj@ximian.com>
5179
5180	* gmime-data-wrapper.c (g_mime_data_wrapper_new_with_stream): Ref
5181	the stream.
5182	(g_mime_data_wrapper_set_stream): Same.
5183	(g_mime_data_wrapper_get_stream): Return the internal stream.
5184	(g_mime_data_wrapper_get_encoding): Return the internal stream's
5185	encoding.
5186	(g_mime_data_wrapper_write_to_stream): Not-yet-implemented.
5187
5188	* gmime-filter.[c,h]: Abstract class for filters.
5189
5190	* gmime-stream-filter.[c,h]: Abstract stream for filtering.
5191
5192	* gmime-part.c (g_mime_part_set_content): Updated for data-wrapper
5193	changes.
5194	(g_mime_part_set_content_byte_array): Same.
5195	(g_mime_part_set_pre_encoded_content): And here.
5196	(g_mime_part_get_content): And here too.
5197
5198	* gmime-parser.c (g_mime_parser_construct_part_internal): Fix
5199	offset calculations.
5200	(g_mime_parser_construct_part_internal): Updated for data-wrapper
5201	changes.
5202
52032001-09-18  Jeffrey Stedfast  <fejj@ximian.com>
5204
5205	* test-parser.c (test_parser): Updated.
5206
5207	* test-mime.c (test_parser): Updated.
5208
5209	* gmime-utils.h: Move the GMimePartEncodingType enum here.
5210
5211	* gmime-stream-fs.[c,h]: Implemented.
5212
5213	* gmime-stream.c (g_mime_stream_construct): New function to
5214	initialize the stream data members.
5215	(g_mime_stream_substream): New function to get a substream of
5216	another stream.
5217	(g_mime_stream_unref): If the stream is actually a substream,
5218	unref it's "super" stream if we are destroying the substream.
5219
5220	* gmime-stream-mem.c (stream_substream): Implemented.
5221	(g_mime_stream_mem_new): Updated to use g_mime_stream_construct().
5222	(g_mime_stream_mem_new_with_byte_array): Same.
5223	(g_mime_stream_mem_new_with_buffer): And here too.
5224
5225	* gmime-stream-file.c (stream_substream): Implemented.
5226	(g_mime_stream_file_new): Updated to use
5227	g_mime_stream_construct().
5228	(g_mime_stream_file_new_with_bounds): Same.
5229
5230	* gmime-part.c (g_mime_part_set_content_md5): Updated to use
5231	streams.
5232	(g_mime_part_verify_content_md5): Same.
5233	(g_mime_part_set_content): Updated to use streams and data
5234	wrappers.
5235	(g_mime_part_set_content_byte_array): Same.
5236	(g_mime_part_set_pre_encoded_content): And here.
5237	(g_mime_part_set_content_object): New function that allows one to
5238	set the content object of a MIME part.
5239	(g_mime_part_get_content): Updated to use streams.
5240	(write_content): Same.
5241	(g_mime_part_write_to_stream): Replacement for
5242	g_mime_part_write_to_string().
5243	(g_mime_part_to_string): Updated to use
5244	g_mime_part_write_to_stream().
5245	(g_mime_part_destroy): Updated to destroy the content object
5246	rather than destroying a GByteArray (since we longer use a
5247	GByteArray for the content data).
5248
5249	* gmime-parser.c (g_mime_parser_construct_message): Now takes a
5250	stream argument instead of a string.
5251	(g_mime_parser_construct_message_from_file): Deprecated.
5252	(g_mime_parser_construct_part): Also takes a stream now.
5253
5254	* gmime-message.c (g_mime_message_write_to_stream): Replacement
5255	for g_mime_message_write_to_string().
5256	(g_mime_message_to_string): Updated.
5257
5258	* gmime-header.c (g_mime_header_write_to_stream): Replacement for
5259	g_mime_header_write_to_string().
5260	(g_mime_header_to_string): Updated.
5261
52622001-09-17  Jeffrey Stedfast  <fejj@ximian.com>
5263
5264	* gmime-stream.[c,h]: Abstract stream class.
5265
5266	* gmime-stream-mem.[c,h]: Memory stream.
5267
5268	* gmime-stream-file.[c,h]: File stream.
5269
5270	* gmime-data-wrapper.[c,h]: Data wrapper class. Will be used as
5271	the content object in MIME parts.
5272
52732001-08-23  Jeffrey Stedfast  <fejj@ximian.com>
5274
5275	* gmime-utils.c (encode_8bit_word): Oops. Add the closing ? char.
5276	(g_mime_utils_8bit_header_encode): Oops. Make sure we encode *all*
5277	lwsp chars.
5278	(g_mime_utils_8bit_header_decode): Slightly better fix for the
5279	other day.
5280
52812001-08-19  Jeffrey Stedfast  <fejj@ximian.com>
5282
5283	* doc/*: Updated.
5284
52852001-08-18  Jeffrey Stedfast  <fejj@ximian.com>
5286
5287	* Makefile.am: Added gmime-charset.[c,h] to the build.
5288
5289	* gmime-charset.[c,h]: New source files for managing charset
5290	related issues.
5291	(g_mime_charset_init): New function to retrieve the user's locale
5292	information for later use with gmime_charset_locale_name.
5293	(g_mime_charset_locale_name): New function to return user's
5294	locale.
5295
5296	* gmime-utils.c (g_mime_utils_8bit_header_decode): linear
5297	whitespace isn't the only thing that can delimit atoms.
5298	(get_codeset): Removed in favor of the new gmime-charset
5299	functions.
5300	(g_mime_utils_8bit_header_encode): Use g_mime_charset_locale_name.
5301	(encode_8bit_word): And here too.
5302
53032001-08-15  Jeffrey Stedfast  <fejj@ximian.com>
5304
5305	* internet-address.c (decode_mailbox): When returning due to a
5306	missing local part, make sure to set *in to inptr.
5307
53082001-08-13  Charles Kerr <charles@rebelbase.com>
5309
5310	* gmime-utils.c (encode_8bit_word): query nl_langinfo for the
5311	codeset instead of just assuming iso-8859-1.  Thanks to Volodymyr
5312	M . Lisivka <lvm@mystery.lviv.net> for suggesting this patch.
5313
5314	* gmime-utils.c (g_mime_utils_8bit_header_encode): same.
5315
5316	* gmime-parser.c (find_header_part_end): new utility function to
5317	find the dividing line between body & header.
5318	(g_mime_parser_construct_part): sync.
5319	(g_mime_parser_construct_message): sync.
5320
5321	* gmime-parser.c (get_header_block): remove unused func.
5322	(rfc822_headers): remove unused static array.
5323
53242001-07-02  Jeffrey Stedfast  <fejj@ximian.com>
5325
5326	* zentimer.h: Added. Provides some timing macros for performace
5327	testing.
5328
5329	* zenprofiler.h: Added. Extends zentimer.h as a simple profiler
5330	that gives nice printouts.
5331
5332	* test-parser.c: Use zentimer.h
5333
53342001-06-23  Jeffrey Stedfast  <fejj@ximian.com>
5335
5336	* gmime-header.c (g_mime_header_remove): New function.
5337	(g_mime_header_set): Setting header to NULL no longer removes the
5338	header. Use g_mime_header_remove instead.
5339
5340	* gmime-message.c (g_mime_message_write_to_string): No longer have
5341	to sync the headers.
5342	(g_mime_message_get_headers): Same.
5343	(g_mime_message_set_sender): sync the From header.
5344	(g_mime_message_set_reply_to): Sync the Reply-To header.
5345	(g_mime_message_add_recipient): Sync the recipient header.
5346	(g_mime_message_add_recipients_from_string): Same.
5347	(g_mime_message_set_subject): Sync the Subject header.
5348	(g_mime_message_set_date): Sync the date header.
5349	(g_mime_message_set_message_id): Sync the Message-Id header.
5350
53512001-06-03  Jeffrey Stedfast  <fejj@ximian.com>
5352
5353	* gmime-utils.c (quoted_encode): Minor cleanup.
5354
53552001-06-02  Jeffrey Stedfast  <fejj@ximian.com>
5356
5357	* gmime-message.c (sync_headers): Oops. Don't place "Cc:" in the
5358	header value string :-)
5359
53602001-03-31  Charles Kerr <charles@rebelbase.com>
5361
5362	* gmime-utils.c (g_mime_utils_8bit_header_decode): big speedups.
5363
5364	* gmime-utils.c (g_mime_utils_8bit_header_encode): small speedups.
5365
53662001-05-29  Jeffrey Stedfast  <fejj@ximian.com>
5367
5368	* internet-address.c (decode_mailbox): Oops, test to make sure we
5369	won't be running past the end of the buffer when considering a
5370	retry. Thanks to Charles Kerr for this fix.
5371
53722001-03-29  Charles Kerr <charles@rebelbase.com>
5373
5374	* gmime-part.c (g_mime_part_append_pre_encoded_content): fix small
5375	bug that crept into the last commit.
5376
53772001-05-29  Jeffrey Stedfast  <fejj@ximian.com>
5378
5379	Fixes on behalf of Charles Kerr of Pan fame:
5380
5381	* gmime-parser.c (g_mime_parser_construct_part_from_file):
5382	Use g_mime_part_append_pre_encoded_content().
5383
5384	* gmime-part.c (g_mime_part_append_pre_encoded_content): New
5385	function so that the FILE parser doesn't need to manage it's own
5386	content array.
5387
5388	* gmime-header.[c,h]: const'ify.
5389	(g_mime_header_foreach): New function to call a chosen function
5390	for each header in the header object.
5391
53922001-05-26  Jeffrey Stedfast  <fejj@ximian.com>
5393
5394	* configure.in: Updated version to 0.6.0.
5395
5396	* README: Updated version to 0.6.0.
5397
5398	* doc/*: Updated again.
5399
5400	* gmime-header.c (g_mime_header_to_string): New function - mostly
5401	for the sake of keeping with the API of the rest of GMime.
5402	(g_mime_header_set): Make sure to always encode the header value
5403	before we set it.
5404
5405	* gmime-part.c (g_mime_part_write_to_string): New function to
5406	write the mime part to a GString.
5407	(g_mime_part_to_string): Use g_mime_part_write_to_string.
5408
5409	* gmime-message.c (g_mime_message_get_headers): Use the new
5410	g_mime_header_to_string function.
5411	(g_mime_message_write_to_string): New function to write the
5412	message to a GString.
5413	(g_mime_message_to_string): Use write_to_string.
5414
54152001-05-25  Jeffrey Stedfast  <fejj@ximian.com>
5416
5417	* doc/*: Updated.
5418
5419	* Makefile.am: Add gmime-header.[c,h] to the build.
5420
5421	* gmime-parser.c: Numerous changes to use gmime-header.
5422
5423	* gmime-message.c: Numerous changes to use gmime-header.
5424	(g_mime_message_add_arbitrary_header): Removed.
5425	(g_mime_message_set_header): The replacement for
5426	add_arbitrary_header.
5427	(g_mime_message_get_header): New function to get a header.
5428
5429	* gmime-header.[c,h]: New source fies to handle the complicated
5430	nature of setting/getting header pairs.
5431
54322001-05-24  Jeffrey Stedfast  <fejj@ximian.com>
5433
5434	* doc/*: Updated.
5435
5436	* doc/Makefile.am: Use $(INSTALL) and $(INSTALL_DATA) rather than
5437	`install -m 644`
5438
5439	* alloca.c: New file for systems that do not have alloca().
5440
5441	* Makefile.am: build alloca.c
5442
5443	* gmime-utils.c: Don't #include <alloca.h> - this is now handled
5444	by config.h.
5445
5446	* config.h.in: Added alloca define checks.
5447
5448	* acconfig.h: Remove some extra defines that we don't care about.
5449
54502001-05-20  Jeffrey Stedfast  <fejj@ximian.com>
5451
5452	* gmime-parser.c (parse_content_headers): Simplified and also
5453	unfolded content-headers.
5454
5455	* gmime-part.c (g_mime_part_get_filename): If there isn't a
5456	disposition, make sure that we don't ignore the possibility of a
5457	"name" param in the Content-Type header.
5458
54592001-05-12  Jeffrey Stedfast  <fejj@ximian.com>
5460
5461	* gmime-utils.c (need_quotes): Include '.' as a char to quote.
5462
5463	* gen-table.c (main): Fixed a type-o.
5464
5465	* internet-address.c (decode_mailbox): Be a little more forgiving
5466	about unexpected chars while parsing the name part of the email
5467	address. Skip the bad char and then retry. If we fail again,
5468	*then* we abort.
5469
5470	* gmime-utils.c: #include <alloca.h>
5471
5472	* gmime-parser.c (g_mime_parser_construct_part): Oops, inend
5473	points to the end of the string, not the last char of the string
5474	(ie, '\0' not the char before it).
5475
54762001-05-08  Jeffrey Stedfast  <fejj@ximian.com>
5477
5478	* gmime-table-private.h: Oops, take out the check for isblank().
5479
5480	* internet-address.c (decode_quoted_string): Get rid of unused
5481	variable.
5482	(decode_address): Same.
5483
54842001-04-03  Jeffrey Stedfast  <fejj@ximian.com>
5485
5486	* internet-address.c (decode_domain): Try to only get
5487	"fully-qualified" domain names, or ones that "look" like they are
5488	at least ;-)
5489	(decode_mailbox): If decode_domain() returns NULL, don't append
5490	the '@' char. Also make sure that the name is non-empty.
5491
54922001-04-01  Jeffrey Stedfast  <fejj@ximian.com>
5493
5494	* gmime-utils.c (g_mime_utils_quote_string): Made smarter.
5495
54962001-03-31  Jeffrey Stedfast  <fejj@ximian.com>
5497
5498	* Makefile.am: Added rules to build gen-table.c and added
5499	gmime-table-private.h to the build.
5500
5501	* gen-table.c: New file to generate gmime-table-private.h if need
5502	be.
5503
5504	* gmime-table-private.h: New file that contains
5505	gmime_special_table.
5506
5507	* gmime-utils.c: Remove the gmime_special_table from here and
5508	instead #include gmime-table-private.h.
5509
5510	* internet-address.c: #include gmime-table-private.h
5511
55122001-03-30  Jeffrey Stedfast  <fejj@ximian.com>
5513
5514	* gmime-message.c (create_header): Simplified a tad.
5515	(g_mime_message_add_recipient): Updated for the new
5516	InternetAddress API.
5517	(g_mime_message_add_recipients_from_string): Simplified greatly
5518	using the new InternetAddress API.
5519
5520	* internet-address.[c,h]: Completely rewritten to be a lot more
5521	rfc0822 compliant.
5522
55232001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
5524
5525	* README, configure.in: Updated version to 0.5.0
5526
55272001-03-29  Charles Kerr <charles@rebelbase.com>
5528
5529	* gmime-parser.c (g_mime_parser_construct_message_from_file): new
5530	function to read a message from a FILE* instead of a character
5531	array.  This can be used to reduce the memory requirements of very
5532	large messages.
5533
5534	* gmime-parser.c (get_next_line): new internal function.
5535	* gmime-parser.c (g_mime_parser_construct_part_from_file): same.
5536	* gmime-parser.c (parse_content_headers): same.
5537	* gmime-parser.c (find_header_end): same.
5538	* gmime-parser.c (get_header_block): same.
5539	* gmime-parser.c (get_header_block_from_file): same.
5540
55412001-03-28  Jeffrey Stedfast  <fejj@ximian.com>
5542
5543	* gmime-utils.c (get_time): Fix a compile warning.
5544
55452001-03-20  Charles Kerr <charles@rebelbase.com>
5546
5547	* gmime-utils.c (get_year): constify the argument list.
5548	* gmime-utils.c (get_time): same.
5549
5550	* gmime-utils.c (get_days_in_month): if #0'ed out unused code.
5551	* gmime-utils.c (parse_broken_date): same.
5552
55532001-03-15  Jeffrey Stedfast  <fejj@ximian.com>
5554
5555	* internet-address.c (internet_address_new_from_string): Try to be
5556	a little better about extracting the name, not 100% accurate but
5557	better I guess.
5558
55592001-03-14  Jeffrey Stedfast  <fejj@ximian.com>
5560
5561	* gmime-part.c (g_mime_part_get_content_disposition_parameter):
5562	It's okay to have a NULL disposition or a NULL param hash.
5563	(g_mime_part_get_filename): Same.
5564	(g_mime_part_get_content): It's okay not to have content.
5565
55662001-03-13  Jeffrey Stedfast  <fejj@ximian.com>
5567
5568	* gmime-utils.c (quoted_decode): Fix a possible buffer overrun.
5569
55702001-02-27  Jeffrey Stedfast  <fejj@ximian.com>
5571
5572	* gmime-utils.c (parse_rfc822_date): Allow for time token to not
5573	have a seconds field.
5574
55752001-02-11  Jeffrey Stedfast  <fejj@ximian.com>
5576
5577	* gmime-part.c (g_mime_part_to_string): Oops. Don't init
5578	content_md5 with the content location string ;-)
5579
5580	* gmime-parser.c (g_mime_parser_construct_part): Init content to
5581	NULL to get rid of a warning (this doesn't really matter as 'len'
5582	was init'd to 0)
5583
5584	* gmime-part.c: #include unistd.h
5585
55862001-01-27  Jeffrey Stedfast  <fejj@helixcode.com>
5587
5588	* gmime-part.c (g_mime_part_set_content_byte_array): So
5589	set_content_array() was no good. After inspecting glib it was
5590	discovered that there are hidden data members of a GByteArray that
5591	hold info like if the data is NUL terminated, how much data is
5592	allocated, etc.
5593
55942001-01-26  Charles Kerr <charles@superpimp.org>
5595
5596	* gmime-part.c (g_mime_part_set_content_array): new function.
5597
55982001-01-25  Charles Kerr <charles@superpimp.org>
5599
5600	* gmime-part.c (g_mime_part_destroy): fix memory leak - the
5601	disposition wasn't being g_free()d.
5602
56032001-01-24  Charles Kerr <charles@superpimp.org>
5604
5605	* gmime-part.c (g_mime_part_get_filename): Now takes a const
5606	GMimePart.
5607
56082001-01-17  Jeffrey Stedfast  <fejj@ximian.com>
5609
5610	* internet-address.c (encoded_name): Updated.
5611
5612	* gmime-part.c (g_mime_part_set_pre_encoded_content): Updated to
5613	reflect changes to gmime-utils.
5614
5615	* gmime-utils.c (g_mime_utils_text_is_8bit): Take a len argument.
5616	(g_mime_utils_best_encoding): Same.
5617	(encode_8bit_word): Updated.
5618
56192001-01-14  Jeffrey Stedfast  <fejj@ximian.com>
5620
5621	* gmime-parser.c (g_mime_parser_construct_part): Check for NULL
5622	returns from g_strstrbound.
5623
56242001-01-11  Charles Kerr <charles@superpimp.org>
5625
5626	* gmime-utils.c (get_year): small patch to handle 2-digit year
5627	representation a little better -- "71" now translates to 1971,
5628	but "01" now translates to 2001.  Thanks to Ihar Viarheichyk for
5629	suggesting this change.
5630
56312001-01-07  Jeffrey Stedfast  <fejj@helixcode.com>
5632
5633	* gmime-part.c (g_mime_part_set_content_md5): Don't allow the
5634	setting of Content-MD5 headers for multipart/* and message/rfc822
5635	types.
5636
5637	* rfc/rfc1864.txt: Added (Content-MD5 RFC).
5638
56392001-01-05  Jeffrey Stedfast  <fejj@helixcode.com>
5640
5641	* gmime-part.c (g_mime_part_set_content_md5): Oops, didn't quite
5642	do this right. It should be correct now.
5643	(g_mime_part_verify_content_md5): New function to verify the
5644	Content-MD5.
5645
56462001-01-04  Jeffrey Stedfast  <fejj@helixcode.com>
5647
5648	* gmime-parser.c (g_mime_parser_construct_part): Added support for
5649	parsing Content-Location and Content-Md5 headers. Trim excess
5650	trailing \n's. Also fix a bug where the end boundary would get
5651	included as part of the last MIME Part's contents.
5652	(g_strstrbound): Bounded strstr.
5653
5654	* configure.in:
5655	* README: Updated version to 0.4.0
5656
5657	* Makefile.am: Added md5-utils to the build.
5658
5659	* md5-utils.[c,h]: Added.
5660
5661	* gmime-part.c (g_mime_part_to_string): Slightly new
5662	implementation. Also added in support for Content-Location and
5663	Content-Md5 headers.
5664	(g_mime_part_destroy): Return if the mime part is
5665	NULL. Also free the new content_location and content_md5 headers.
5666	(g_mime_part_set_content_md5): Implemented.
5667	(g_mime_part_get_content_md5): Implemented.
5668	(g_mime_part_set_content_location): Implemented.
5669	(g_mime_part_get_content_location): Implemented.
5670	(get_content_type): Append a '\n'.
5671
56722001-01-01  Jeffrey Stedfast  <fejj@helixcode.com>
5673
5674	* doc/gmime-sections.txt: Updated.
5675
5676	* doc/sgml/*: Updated.
5677
5678	* doc/html/*: Updated.
5679
56802000-12-24  Jeffrey Stedfast  <fejj@helixcode.com>
5681
5682	* gmime-parser.c (g_mime_parser_construct_part): Don't set the
5683	boundary if we are able to get the boundary from the content-type
5684	because we'll just set the same data over again which is a
5685	waste. Also tack a \n onto the ends of the boundary markers so
5686	that "blah_" and "blah_D" don't trick the parser. Fix it so that
5687	an empty part won't set any contents (since setting a 0-length
5688	content stream causes a segfault).
5689	(construct_headers): Take an inlen argument so that we can parse
5690	headers without needing to strdup before passing into this
5691	function.
5692	(g_mime_parser_construct_message): Don't strdup the headers since
5693	we can just pass in the length to the construct_headers() function
5694	now.
5695
56962000-12-18  Jeffrey Stedfast  <fejj@helixcode.com>
5697
5698	* gmime-parser.c (g_mime_parser_construct_part): Moved from being
5699	an internal-only function.
5700
57012000-12-28  Charles Kerr <charles@superpimp.org>
5702
5703	* gmime-utils.c (g_mime_utils_text_is_8bit): gracefully handle
5704	a NULL pointer being passed in.  Thanks to Christophe Lambin for
5705	reporting this problem.
5706
57072000-12-14  Charles Kerr <charles@superpimp.org>
5708
5709	* gmime-messge.c (g_mime_message_get_message_id):  change
5710	g_return_if_fail() to g_return_val_if_fail() to ensure that
5711	a value is always returned.
5712
5713	* gmime-part.h (g_mime_part_get_content_description): make
5714	the GMimePart argument const.
5715	* gmime-part.h (g_mime_part_get_content): same.
5716
5717	* test-mime.c (test_addresses): fix bad printf statement.
5718
5719	* test-parser.c (test_parser): fixed the printf type of a time_t
5720	from an int to unsigned long to avoid compiler warnings.
5721
57222000-12-13  Jeffrey Stedfast  <fejj@helixcode.com>
5723
5724	* doc/sgml/*:
5725	* doc/html/*:
5726	* doc/gmime-sections.txt: Updated.
5727
5728	* README: Updated version line to 0.3.0
5729
57302000-12-12  Jeffrey Stedfast  <fejj@helixcode.com>
5731
5732	* gmime-part.c (g_mime_part_to_string): Wrap some content-*
5733	headers that might sometimes be long.
5734
5735	* gmime-message.c (create_header): Updated to reflect function
5736	name changes/moves.
5737
5738	* gmime-utils.c (g_mime_utils_header_printf): Moved here from
5739	gmime-message.c and slightly renamed ;-)
5740	(g_mime_utils_header_fold): Moved from being private to being
5741	public.
5742
57432000-12-12  Jeffrey Stedfast  <fejj@helixcode.com>
5744
5745	* gmime-part.c: Hmmm, why weren't multiparts using the internal
5746	get_content_type function rather than ...content_type_to_string?
5747	Possible FIXME: Should content_type_to_string do what
5748	get_content_type does? or should it remain untouched and just
5749	return "type/subtype"?
5750
5751	* gmime-part.h: No more boundary data member.
5752
5753	* gmime-part.c (g_mime_part_get_boundary): Updated, as we no
5754	longer store the boundary on the MIME Part and instead only on the
5755	content-type (where it belongs).
5756	(g_mime_part_set_boundary): And here too.
5757	(g_mime_part_destroy): No longer need to destroy the boundary.
5758
57592000-12-11  Jeffrey Stedfast  <fejj@helixcode.com>
5760
5761	* gmime-part.c (g_mime_part_get_subpart_from_content_id): Erm,
5762	smack me. This needs to be recursive (this is what happens when I
5763	code really late at night).
5764
57652000-12-11  Jeffrey Stedfast  <fejj@helixcode.com>
5766
5767	* configure.in (GMIME_MINOR_VERSION): Updated to 0.3.0
5768
5769	* gmime-parser.c (get_mime_part): Updated to reflect the
5770	add_subpart API change.
5771
5772	* test-mime.c (test_multipart): And here too.
5773
5774	* gmime-part.h (g_mime_part_add_child): Macro added for backward
5775	source compatability.
5776
5777	* gmime-part.c (g_mime_part_get_subpart_from_content_id): Renamed
5778	from g_mime_part_get_child_from_content_id as I think I'm gonna
5779	start calling them subparts in the API as it's a bit clearer than
5780	calling them children. Also fixed up some of the logic (what if
5781	the parent mime part had a content-id? The way the code was before
5782	it'd never search the subparts). Oh, it also returns const now.
5783	(g_mime_part_add_subpart): Renamed from g_mime_part_add_child and
5784	also now does some error checking to make sure the parent part is
5785	a multipart.
5786
57872000-12-10  Charles Kerr <charles@superpimp.org>
5788
5789	* gmime-part.c (g_mime_part_get_child_by_content_id): new
5790	utility function.
5791
57922000-12-09  Jeffrey Stedfast  <fejj@helixcode.com>
5793
5794	* gmime-part.c (g_mime_part_set_boundary): Generate a random
5795	boundary if passed boundary is NULL.
5796
57972000-12-07  Jeffrey Stedfast  <fejj@helixcode.com>
5798
5799	* gmime-message.c (multipart_get_body): Traverses a MIME Part and
5800	'always' extracts the body assuming it exists. Extracts the
5801	preffered text type if it exists, otherwise returns the type less
5802	preferred.
5803	(g_mime_message_get_body): Use multipart_get_body if the toplevel
5804	part is a multipart.
5805
58062000-12-05  Jeffrey Stedfast  <fejj@helixcode.com>
5807
5808	* README: Updated with more RFCs, etc.
5809
5810	* rfc/* Added a bunch more rfcs of interest.
5811
58122000-12-04  Jeffrey Stedfast  <fejj@helixcode.com>
5813
5814	* test-mime.c: Added test code for the address parser.
5815
5816	* gmime-utils.c (g_mime_utils_quoted_encode_step): Updated. No
5817	longer need to special-case whitespace chars as they have been put
5818	into the gmime_special_table (a while ago).
5819
58202000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
5821
5822	* Makefile.am: Install gmime.m4
5823
5824	* gmime.m4: Added.
5825
58262000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
5827
5828	* gmime-part.c (g_mime_part_foreach): New convenience function for
5829	manipulating each subpart of a mime part.
5830
5831	* gmime-message.c (g_mime_message_foreach_part): New convenience
5832	function for manipulating all mime parts of a message.
5833
58342000-12-02  Jeffrey Stedfast  <fejj@helixcode.com>
5835
5836	* doc/sgml/*:
5837	* doc/html/*: Updated.
5838
5839	* doc/gmime-sections.txt: Add g_mime_message_[g,s]et_message_id.
5840
5841	* gmime-parser.c (construct_headers): Parse out Message-Id
5842	headers.
5843
5844	* gmime-message.c (g_mime_message_destroy): Free the message id.
5845	(g_mime_message_set_message_id): New function to set the message
5846	id on a message.
5847	(g_mime_message_set_message_id): New accessor function for
5848	message-ids.
5849	(create_header): Write out the Message-Id if and only if it
5850	exists.
5851
58522000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
5853
5854	* README: Updated.
5855
5856	* doc/gmime-sections.txt: Added new functions.
5857
5858	* doc/html/*: Updated.
5859
58602000-11-29  Jeffrey Stedfast  <fejj@helixcode.com>
5861
5862	* configure.in: Bumped the version to 0.2.0 because the API has
5863	changed a bit.
5864
5865	* test-parser.c:
5866	* test-mime.c: Updated.
5867
5868	* gmime-utils.c (BASE64_ENCODE_LEN):
5869	(QP_ENCODE_LEN): Macros for determining how much space we need to
5870	encode a chunk of data to that encoding (estimate is liberal).
5871	(encode_8bit_word): Use the macros to determine the length we
5872	need.
5873
5874	* gmime-message.c (g_mime_message_get_body): Updated to reflect
5875	changes to gmime-part.
5876
5877	* gmime-parser.c (get_mime_part): Updated.
5878
5879	* gmime-part.c (g_mime_part_set_content): Now takes a len argument
5880	and has been updated to reflect the move to GByteArray.
5881	(g_mime_part_destroy): Updated.
5882	(g_mime_part_set_pre_encoded_content): New convenience function to
5883	decode pre-encoded content and set it on the mime part.
5884	(g_mime_part_get_content): Renamed from
5885	g_mime_part_decode_contents.
5886
5887	* gmime-part.h: GMimePart->content is now a GByteArray that will
5888	hold the raw content (in it's unencoded form).
5889
58902000-11-28  Jeffrey Stedfast  <fejj@helixcode.com>
5891
5892	* gmime-content-type.c (g_mime_content_type_new_from_string):
5893	Ignore extranious semicolons between parameters. Handle the event
5894	where the content-type doesn't specify a subtype (this is broken
5895	but some mailers will send "Content-Type: text" for example).
5896	(g_mime_content_type_new): If there isn't a type or subtype, print
5897	a warning and try to do some smart defaulting action.
5898
5899	* gmime-message.c (handle_multipart_alternative): Only remember
5900	the last subpart if it was a text part.
5901
59022000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
5903
5904	* doc/html/*:
5905	* doc/sgml/*: Updated.
5906
5907	* test-mime.c: Updated.
5908
5909	* gmime-utils.c (g_mime_utils_quote_string): Do the detection on
5910	whether or not to wrap the string in quotes here rather than
5911	requiring a boolean argument specifying whether the string should
5912	be quoted. RFC2045 provides us with a list of characters that are
5913	not safe.
5914
5915	* gmime-param.c (g_mime_param_to_string): Updated to reflect
5916	changes to g_mime_utils_quote_string. This function is the main
5917	reason for the change - parameter values should really only be
5918	quoted if they have to be else they should remain unquoted.
5919
5920	* internet-address.c (encoded_name): Updated to reflect changes to
5921	g_mime_utils_quote_string.
5922
59232000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
5924
5925	* TODO: Updated.
5926
5927	* gmime-utils.c: Updated gmime_special_table.
5928	(g_mime_utils_8bit_header_encode): Since rfc2047 states that all
5929	whitespace between encoded atoms must be ignored, the encoder
5930	should therefor make an effort to encode whitespace when it falls
5931	between two atoms that will be encoded. Use the IS_ESAFE mask.
5932	(quoted_encode): Now takes a safemask argument to specify which
5933	chars are safe to leave unencoded and also a arg to save whether
5934	or not the word was encoded.
5935	(g_mime_utils_8bit_header_encode_phrase): Updated to use the
5936	IS_PSAFE mask.
5937
59382000-11-19  Jeffrey Stedfast  <fejj@helixcode.com>
5939
5940	* gmime-parser.c (header_unfold): New function to unfold a header
5941	(to be used internally).
5942	(construct_headers): Unfold headers as we parse them.
5943
5944	* configure.in: Changed version to 0.1.1.
5945
5946	* gmime-part.c (get_content_disposition): Append a ";" before
5947	appending any parameters even when there is no disposition
5948	text. Also only enter into the param loop if there exist params.
5949
59502000-11-16  Jeffrey Stedfast  <fejj@helixcode.com>
5951
5952	* doc/sgml/*: Added.
5953
5954	* doc/gmime-sections.txt: Added g_mime_part_decode_contents and
5955	g_mime_header_printf.
5956
5957	* gmime-message.c (header_fold): New function to fold headers.
5958	(g_mime_header_printf): New convenience function to print a
5959	formatted header (which will get correctly folded).
5960	(create_header): Correctly fold each header.
5961
59622000-11-16  Charles Kerr <charles@superpimp.org>
5963
5964	* gmime-utils.c (datetok): don't crash if the date string passed
5965	in is NULL.
5966
59672000-11-15  Jeffrey Stedfast  <fejj@helixcode.com>
5968
5969	* gmime-part.c (g_mime_part_decode_contents): New convenience
5970	function to decode the contents of a mime part (based on code by
5971	Wayne Schuller).
5972
59732000-11-14  Jeffrey Stedfast  <fejj@helixcode.com>
5974
5975	* doc/html/index.sgml: Added - apparently we need this :-)
5976
5977	* doc/Makefile.am: Updated to pass distcheck
5978
59792000-11-10  Jeffrey Stedfast  <fejj@helixcode.com>
5980
5981	* doc/gmime-docs.sgml: Added a new paragraph explaining the
5982	difference between functions that return const and the ones that
5983	don't.
5984
5985	* doc/html/*.html: Updated.
5986
5987	* gmime-message.c:
5988	* gmime-part.c:
5989	* gmime-parser.c:
5990	* internet-address.c:
5991	* gmime-param.c: Updated Gtk-Doc comments.
5992
5993	* gmime-content-type.c: Wrote Gtk-Doc comments.
5994
59952000-11-10  Jeffrey Stedfast  <fejj@helixcode.com>
5996
5997	* Makefile.am (SUBDIRS): Added doc
5998
5999	* configure.in: Generate doc/Makefile
6000
6001	* doc/Makefile.am: Ignore more headers when performaing
6002	gtkdoc-scan.
6003
6004	* doc/gmime-docs.sgml:
6005	* doc/gmime-sections.txt: Added.
6006
6007	* doc/html/*.html: Generated library reference.
6008
60092000-11-09  Jeffrey Stedfast  <fejj@helixcode.com>
6010
6011	* TODO: Updated.
6012
6013	* test-mime.c: Added test of the new quote/unquote functions.
6014
6015	* gmime-message.c (g_mime_message_add_recipients_from_string):
6016	Check for escaped quotes.
6017
6018	* gmime-part.c (get_content_type): Correctly quote params.
6019	(get_content_disposition): Same.
6020
6021	* gmime-param.c (g_mime_param_new_from_string): Check for escaped
6022	quotes. Also use unquote_string() to unquote the value.
6023	(g_mime_param_to_string): Correctly quote the value.
6024
6025	* gmime-parser.c (get_mime_part): Check for escaped quotes and
6026	correctly unquote strings where appropriate.
6027
6028	* gmime-utils.c (g_mime_utils_quote_string): New convenience
6029	function to escape and quote a string.
6030	(g_mime_utils_unquote_string): New convenience function to
6031	un-escape and un-quote a string.
6032
6033	* internet-address.c (encoded_name): Use quote_string().
6034	(internet_address_new): Use unquote_string() to unquote and
6035	unescape the name component (it will be re-escaped and re-quoted
6036	when it's written to a string later).
6037
60382000-11-09  Jeffrey Stedfast  <fejj@helixcode.com>
6039
6040	* TODO: Updated.
6041
60422000-11-08  Jeffrey Stedfast  <fejj@helixcode.com>
6043
6044	* gmime-parser.c (construct_headers): Oops. Set the subject with
6045	the decoded string rather than the encoded one.
6046	(get_mime_part): On the chance that we come accross a broken
6047	multipart, default the mime type to text/plain and continue on.
6048
60492000-11-08  Jeffrey Stedfast  <fejj@helixcode.com>
6050
6051	* internet-address.c (internet_address_to_string): Moved code
6052	around to avoid unecessary warnings.
6053
6054	* gmime-utils.c: Added Gtk-Doc style comments to all the
6055	functions.
6056	(g_mime_utils_best_encoding): Return a GMimePartEncodingType
6057	instead of gint.
6058
60592000-11-01  Jeffrey Stedfast  <fejj@helixcode.com>
6060
6061	* Makefile.am (INCLUDES): Add -DG_LOG_DOMAIN=\"gmime\"
6062
60632000-10-31  Jeffrey Stedfast  <fejj@helixcode.com>
6064
6065	* test-parser.c (test_parser): Test g_mime_message_get_body() here
6066	as well.
6067
6068	* test-mime.c: Updated to reflect changes to get_body.
6069
6070	* gmime-message.c (g_mime_message_get_body): Return an allocated
6071	buffer because we want to return the decoded message body rather
6072	than the (possibly) encoded form.
6073	(create_header): Write out the arbitrary headers first as they may
6074	contain headers like "Received:" which really ought to be at the
6075	top.
6076
6077	* gmime-part.c: Removed some old cruft.
6078
60792000-10-29  Jeffrey Stedfast  <fejj@helixcode.com>
6080
6081	* internet-address.c (encoded_name): Use
6082	g_mime_utils_8bit_header_encode_phrase() to encode the addrspec.
6083
6084	* gmime-utils.c (g_mime_utils_8bit_header_decode): Fix to make the
6085	decoder more rfc compliant. As stated by rfc2047, all white space
6086	between encoded words MUST be ignored.
6087	(g_mime_utils_8bit_header_encode_phrase): New rfc2047 encoding
6088	function for phrases (see rfc2047 section 5 part 3).
6089
60902000-10-28  Jeffrey Stedfast  <fejj@helixcode.com>
6091
6092	* gmime-utils.c (parse_rfc822_date): Fixed the off-by-one-hour
6093	bug.
6094
6095	* test-mime.c: Updated to reflect changes to
6096	g_mime_message_get_body().
6097
6098	* gmime-message.c (g_mime_message_get_headers): Added Gtk-Doc
6099	comment.
6100	(g_mime_message_get_body): Modified to return a const pointer to
6101	the message body rather than allocating it.
6102
61032000-10-28  Charles Kerr <charles@superpimp.org>
6104
6105	* gmime-message.c (g_mime_message_get_headers): New function
6106	similar to g_mime_message_get_body.  Useful if you want a raw
6107	display of headers separate from the body.
6108
6109	* gmime-message.[c,h] (g_mime_message_get_body): made const.
6110
61112000-10-28  Jeffrey Stedfast  <fejj@helixcode.com>
6112
6113	* tests/Makefile.am: New automake file (when we make a release,
6114	this directory should really be a part of the tarball as it
6115	contains data for the test programs).
6116
6117	* tests/.cvsignore: Added.
6118
6119	* Makefile.am (SUBDIRS): Add the 'tests' directory
6120
6121	* configure.in: Generate tests/Makefile
6122
61232000-10-27  Jeffrey Stedfast  <fejj@helixcode.com>
6124
6125	* test-mime.c: Added code to test g_mime_message_get_body()
6126
6127	* gmime-message.c (g_mime_message_get_body): New convenience
6128	function that attempts to get the message body in the requested
6129	text format (plain vs html).
6130
6131	* gmime-parser.c (construct_headers): If the end of a header field
6132	is the end of the header, break out of the loop.
6133
6134	* gmime-content-type.[c,h]: Added const to arguments where
6135	appropriate.
6136
6137	* gmime-utils.h: Fixed a spelling mistake in a comment ;-)
6138
61392000-10-26  Charles Kerr <charles@superpimp.org>
6140
6141	* gmime-utils.h: made const the input ptrs for encode/decode
6142	funcs.
6143
6144	* gmime-utils.c: Updated to reflect const changes.
6145
61462000-10-26  Jeffrey Stedfast  <fejj@helixcode.com>
6147
6148	* test-mime.c: Also updated.
6149
6150	* gmime-parser.c (construct_headers): Updated to reflect name
6151	changes.
6152
6153	* gmime-message.c: Updated to reflect name changes.
6154
6155	* gmime-message.h: Changed the name of the recipient type
6156	#defines.
6157
61582000-10-24  Jeffrey Stedfast <fejj@helixcode.com>
6159
6160	* Makefile.am (SUBDIRS): Added "."
6161
6162	* configure.in: Create libgmime.spec
6163
61642000-10-24  Charles Kerr <charles@superpimp.org>
6165
6166	* gmime-utils.c: added #include <stdlib.h> to pick up atoi.
6167
6168	* internet-address.c (internet_address_new): removed unused
6169	variable `decoded'
6170
61712000-10-24  Jeffrey Stedfast  <fejj@helixcode.com>
6172
6173	Thanks to Charles Kerr of Pan fame for the following fixes.
6174
6175	* gmime-utils.c (encode_8bit_word): Oops, encode 'word' and not 'ptr'.
6176
6177	* gmime-part.c (g_mime_part_destroy): Free the content-id.
6178
61792000-10-21  Jeffrey Stedfast  <fejj@helixcode.com>
6180
6181	* gmime.h.in: Wrap definitions in #ifndef __GMIME_H__
6182
61832000-10-18  Jeffrey Stedfast  <fejj@helixcode.com>
6184
6185	* TODO: Updated.
6186
6187	* test-*.c: Updated to reflect GMime API changes.
6188
6189	* gmime-part.c: #include "gmime-utils.h"
6190
6191	* gmime-parser.c (g_mime_parser_construct_message): Now takes a
6192	boolean argument 'save_extra_headers' which tells the parser
6193	whether it should add unknown headers to the arbitrary header
6194	array or ignore them.
6195	(construct_headers): Save the extra headers if desired.
6196
6197	* gmime-message.c (g_mime_message_add_arbitrary_header): Use the
6198	new GMimeHeader structure.
6199	(g_mime_message_new): Always initialize the arbitrary header array.
6200	(g_mime_message_destroy): The arbitrary header array will never
6201	be NULL (as it is now pre-initialized) so don't bother
6202	checking.
6203	(create_header): rfc2047 encode the arbitrary header values.
6204
62052000-10-17  Jeffrey Stedfast  <fejj@helixcode.com>
6206
6207	* rfc/rfc*.txt: MIME specification RFCs
6208
6209	* README: Updated.
6210
6211	* TODO: Added a list of tasks that need to be done eventually.
6212
6213	* gmime-parser.c (get_mime_part): rfc2047 decode the
6214	content-description before we set the value.
6215
6216	* gmime-part.c (g_mime_part_to_string): rfc2047 encode the
6217	content-description before we write it to the string.
6218
62192000-10-06  Jeffrey Stedfast  <fejj@helixcode.com>
6220
6221	* gmime-parser.c (construct_headers): rfc2047 decode some headers.
6222
6223	* internet-address.c (internet_address_to_string): Now takes an
6224	argument to rfc2047 encode or not, when not rfc2047 encoding.
6225	(internet_address_new_from_string): Rewrote
6226
6227	* gmime-message.c (create_header): rfc2047 encode addresses and
6228	subject headers.
6229
62302000-10-05  Jeffrey Stedfast  <fejj@helixcode.com>
6231
6232	* gmime-utils.c (g_mime_utils_quoted_encode_step): Fixed some
6233	non-compliance issues like encoding all spaces as =20 even when
6234	they shouldn't have been.
6235
62362000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
6237
6238	* acconfig.h:
6239	* config.h.in: #undef HAVE_ISBLANK
6240
6241	* configure.in: Check for the isblank() GNU extension function.
6242
6243	* gmime-parser.c (get_mime_part): Parse for the Content-Id. Use
6244	isblank() instead of isspace() when looking to see if the content
6245	header was wrapped. We want it to match only if the next char is
6246	either a tab or a space.
6247	(isblank): Define an isblank() macro if HAVE_ISBLANK isn't
6248	defined.
6249
6250	* gmime-part.c (g_mime_part_set_content_id): New function to set
6251	the Content-ID.
6252	(g_mime_part_get_content_id): New function to get the Content-Id.
6253	(g_mime_part_to_string): Print content id's if available.
6254	(get_content_type): Eek! If there aren't any params, don't assign
6255	'string' an empty string! It's already been initialized with a
6256	type!
6257
62582000-10-04  Jeffrey Stedfast  <fejj@helixcode.com>
6259
6260	* gmime-utils.c (quoted_decode): New function to decode rfc2047's
6261	version of the quoted-printable encoding.
6262	(decode_8bit_word): Use quoted_decode()
6263	(quoted_encode): New function to encode to rfc2047's version of
6264	quoted-printable (removed from the internals of encode_8bit_word)
6265	(encode_8bit_word): Use quoted_encode()
6266
62672000-10-01  Jeffrey Stedfast  <fejj@helixcode.com>
6268
6269	* internet-address.c (internet_address_new_from_string): Fixed a
6270	logic error that cut off the last char of the name (or address).
6271
6272	* gmime-parser.c (construct_headers): Optimized.
6273
6274	* gmime-part.c (get_content_type): If there are no params, don't
6275	try to get any. Fixes a segfault.
6276
6277	* gmime-utils.[c,h]: New utilities functions for use with libgmime
6278	(time and encoding/decoding routines)
6279
6280	* test-mime.c: test some of the routines in gmime-utils.c
6281
6282	* gmime.h.in: #include "gmime-utils.h"
6283
6284	* configure.in: Added checks for time zone stuff
6285
6286	* acconfig.h:
6287	* config.h.in: Added some #undef's for timezone stuff
6288
6289	* Makefile.am: Added gmime-utils.[c,h]
6290
62912000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
6292
6293	* HACKING: Updated
6294
6295	* gmime-param.c: Wrote Gtk-docs comments
6296
6297	* gmime-parser.c: Wrote Gtk-docs comments
6298
6299	* AUTHORS: Updated
6300
6301	* autogen.sh: Updated autogen.sh to look for gmime.h.in instead of
6302	gmime.h
6303
63042000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
6305
6306	* gmime.h: Removed
6307
6308	* gmime.h.in: Replacement for gmime.h - modified to be dynamically
6309	created at build-time.
6310
6311	* configure.in: Updated to generate gmime.h and also to ignore
6312	doc/ until docs are written.
6313
6314	* Makefile.am: Modified to ignore doc/
6315
6316	* tests/*: MIME messages that break are likely to break MIME
6317	parsers.
6318
63192000-09-24  Jeffrey Stedfast  <fejj@helixcode.com>
6320
6321	* gmime-part.c (get_content_disposition): Put a space between
6322	disposition parameters.
6323	(get_content_type): New convenience function to dump the content
6324	type and it's params to a string (for use internally).
6325	(g_mime_part_to_string): Use get_content_type and add print for
6326	content-description's.
6327
6328	* gmime-parser.c (get_mime_part): strip leading/trailing
6329	whitespace from the disposition and convert param names to
6330	lowercase. Also fixed Content-Transfer-Encoding.
6331
63322000-09-23  Jeffrey Stedfast  <fejj@helixcode.com>
6333
6334	* gmime-part.c (g_mime_part_destroy): Erm, make sure to increment
6335	to the next item in the list.
6336
6337	* gmime-message.c (recipients_destroy): Optimized a bit
6338
6339	* gmime-content-type.c (g_mime_content_type_new_from_string):
6340	Change all parameter names to lowercase, this way we can look them
6341	up without having to know which case the original name used (eg
6342	boundary).
6343
6344	* test-mime.c: renamed from mime-test.c
6345
6346	* test-parser.c: a new test program that allows us to specify a
6347	file to get our test email from.
6348
63492000-09-22  Jeffrey Stedfast  <fejj@helixcode.com>
6350
6351	* configure.in: remember glib_cflags and glib_libs so we can dump
6352	them into gmime-config later.
6353
6354	* gmime-config.in: use glib_cflags and glib_libs.
6355
6356	* gmime.h: add variables for major/minor/micro release
6357
6358	* Makefile.am: switch to GMIME_ instead of LIBGMIME_ stuff
6359