Subject: CVS commit: pkgsrc/mail/gmime
From: Thomas Klausner
Date: 2008-04-16 16:37:39
Message id: 20080416143739.221A6175D0@cvs.netbsd.org

Log Message:
Update to 2.2.18:

2008-03-13  Jeffrey Stedfast

	* gmime/gmime-parser.c (parser_construct_message): Changed
	content_length to an unsigned long rather than unsigned int, fixes
	bug #521872. Thanks to Pawel Salek for this fix.

2008-03-10  Jeffrey Stedfast

	* gmime/gmime-parser.c (parser_scan_mime_part_content): Don't let
	size go negative.

2008-02-09  Jeffrey Stedfast

	* gmime/gmime-filter-basic.c (filter_filter): Use the new macros
	defined below.

	* gmime/gmime-utils.c (rfc2047_encode_word): Use the new macros.

	* gmime/gmime-utils.h: Added more accurate encoding-length macros
	for base64, quoted-printable, and uuencode which are try to
	minimize over-calculating the amount of output data that we
	need. Also namespaced them.

2008-02-08  Jeffrey Stedfast

	* src/uudecode.c (uudecode): Use g_strchomp() on the filename
	parsed from the 'begin' line.

2008-02-07  Jeffrey Stedfast

	* util/url-scanner.c (url_web_end): Handle IP address literals
	within []'s. Fixes bug #515088.

2008-02-06  Jeffrey Stedfast

	* gmime/gmime-utils.c (g_mime_utils_uuencode_step): Optimized.

2008-02-03  Jeffrey Stedfast

	* gmime/gmime-stream-cat.c (stream_read): Removed an extra seek.

2008-02-02  Jeffrey Stedfast

	Fix for https://bugzilla.novell.com/show_bug.cgi?id=333292 and
	some other bugs I discovered while fixing it.

	* gmime/gmime-parser.c (header_parse): Made an actual function
	rather than a macro. Don't turn invalid headers into
	X-Invalid-Headers, just ignore them. Instead of using
	g_strstrip(), do our own lwsp trimming so we can do it before
	malloc'ing - this helps reduce memory usage and memmove()
	processing in g_strstrip().
	(parser_step_headers): Validate the header field names as we go so
	that we can stop when we come to an invalid header in some
	cases. May now return with 3 states rather than only 1:
	HEADERS_END (as before), CONTENT (suggesting we've reached body
	content w/o a blank line to separate it from the headers), and
	COMPLETE (which suggests that we've reached the next message's
	From-line).
	(parser_skip_line): Rearranged a bit: don't fill unless/until we
	need to.
	(parser_step): For HEADERS_END state, skip a line and increment
	state to CONTENT. No-op for CONTENT and COMPLETE states.
	(parser_scan_message_part): parser_step() can return more than
	just HEADERS_END on 'success' when starting with HEADERS state, so
	check for error rather than HEADERS_END.
	(parser_construct_leaf_part): No need to parser_step() thru header
	parsing, they should already be parsed by the time we get
	here. Also, don't call parser_skip_line() directly to skip the
	blank line between headers and content, use parser_step() to do
	that for us.
	(parser_construct_multipart): Same as parser_construct_leaf_part()
	(found_immediate_boundary): Now takes an 'end' argument so callers
	can request a check against an end-boundary vs a part boundary.
	(parser_scan_multipart_subparts): Check for errors with
	parser_skip_line(). Set HEADERS state and use parser_step() to
	parse headers rather than calling parser_step_headers()
	directly. If, after parsing the headers, we are at the next
	message (aka COMPLETE state) and we have no header list, then
	break out of our loop and pretend we've found an
	end-boundary. After parsing the content of each MIME part, check
	that the boundary we found is our own and not a parent's (if it
	belongs to a parent, break out).
	(parser_construct_part): Loop parser_step() until we're at any
	state past the header block (>= HEADERS_END).
	(parser_construct_message): Same idea. Also, do error checking for
	decoded content_length value.

2008-02-02  Jeffrey Stedfast

	* gmime/gmime-iconv-utils.c (iconv_utils_init): Don't break if the
	user's locale is unset (e.g. US-ASCII).

2008-01-31  Jeffrey Stedfast

	* gmime/gmime-parser.c: Removed the need for 'unstep' state
	information.

2008-01-27  Jeffrey Stedfast

	* gmime/gmime-stream-buffer.c (stream_write): Don't modify the
	passed-in arguments so that it makes debugging easier if there's
	ever a bug.

2008-01-27  Jeffrey Stedfast

	* gmime/gmime-stream-buffer.c (stream_read): Optimized the
	BLOCK_READ code-path.
	(stream_write): Optimized the BLOCK_WRITE code-path.
	(stream_seek): Optimized the BLOCK_READ code-path.
	(g_mime_stream_buffer_gets): Updated for the changes made to the
	way bufptr is used in the BLOCK_READ case.

2008-01-14  Jeffrey Stedfast

	* gmime/gmime-charset.c (g_mime_set_user_charsets): Deep copy the
	string array. Fixes bug #509434.

2008-01-02  Jeffrey Stedfast

	* gmime/gmime-message.c (message_write_to_stream): Reworked the
	logic to be easier to understand what is going on.

	* gmime/gmime-multipart.c (multipart_write_to_stream): In the case
	where multipart->boundary is NULL /and/ we have a raw
	header (suggesting a parsed message), do not set a boundary as it
	will break the output because it will clobber the saved raw header
	and GMimeMessage's write_to_stream() method will have skipped
	writing its own headers if its toplevel part (us) have a raw
	header set. In this case, also skip writing the end boundary.

2008-01-01  Jeffrey Stedfast

	* gmime/gmime-utils.c (g_mime_utils_generate_message_id): Fixed a
	Free Memory Read access (FMR) by not freeing 'name' before using
	it's value. Also reworked to take advantage of uname(2) or
	getdomainname() to get the domain name if available to avoid
	having to do a DNS lookup.

2008-01-01  Jeffrey Stedfast

	Fixes bug #506701

	* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't
	reset the word-type variable as it needs to be preserved when
	breaking long words.
	(rfc2047_encode): Switch on word->encoding - if 0, rfc2047 encode
	as us-ascii.

2007-12-27  Jeffrey Stedfast

	* gmime/gmime-utils.c (decode_8bit): Now takes a default_charset
	argument which we use in place of the locale charet if
	non-NULL. We also now always include this charset in our list of
	charsets to check for a best-match (obviously this charset is
	unlikely to be an exact fit if this function is getting called, so
	we place it at the end of the list).
	(rfc2047_decode_word): If given a valid charset in the
	encoded-word token, always use that for charset conversion to UTF-8
	even if it doesn't convert fully. We don't want to fall back to
	the user's supplied charset list because it may contain iso-8859-1
	which will likely always be a 'best-match' charset.

2007-12-26  Jeffrey Stedfast

	* gmime/gmime-utils.c (g_mime_utils_decode_8bit): Made public.

	* gmime/internet-address.c (decode_mailbox): Instead of doing our
	own thing to convert raw 8bit/multibyte text sequences into UTF-8,
	use the same function we use in gmime-utils.c's header decoder.

2007-12-25  Jeffrey Stedfast

	* gmime/charset-map.c: New source file to generate the charset
	map (moved out of gmime-charset.c)

	* gmime/gmime-charset.c (main): Removed.

2007-12-25  Jeffrey Stedfast

	* gmime/gmime-charset.c (main): Cleaned up the logic and made it
	so that we can alias a block to a previous block if the blocks are
	identical rather than just aliasing when all values in the block
	are identical. Happens to make no difference in the output, but
	the logic is now there if that ever changes.

2007-12-24  Jeffrey Stedfast

	* gmime/gmime-charset-map-private.h: Regenerated.

	* gmime/gmime-charset.c (known_iconv_charsets): Map all of the
	gb2312 aliases to GBK as GBK is a superset of gb2312 (apparently
	some clients are tagging GBK as gb2312 which is missing some
	glyphs contained within GBK).
	(main): Added iso-8859-6 to the table for Arabic support.

2007-12-16  Jeffrey Stedfast

	* gmime/gmime-utils.c (decode_8bit): When reallocing our output
	buffer, we need to update outleft as well.

2007-12-08  Jeffrey Stedfast

	* gmime/gmime-utils.c (rfc2047_encode_merge_rfc822_words):
	Completely rewritten with new logic which will hopefully group
	words more logically.

2007-12-08  Jeffrey Stedfast

	Fixes bug #498720

	* gmime/internet-address.c (internet_address_list_writer): Renamed
	from the temporary internet_address_list_fold() name.
	(_internet_address_to_string): New internal function that writes
	an InternetAddress to a GString, doing proper folding and rfc2047
	encoding if requested.
	(internet_address_to_string): Use the new internal function.

	* tests/test-mime.c: Added another addrspec test and fixed up some
	exception strings to be a little more helpful.

2007-12-05  Jeffrey Stedfast

	* configure.in: Fixed a bug where explicitly disabling largefile
	support would add -D_FILE_OFFSET_BITS=no to the compiler
	CFLAGS. Also added a blaring WARNING when -enable-largefile is
	passed.

2007-11-23  Jeffrey Stedfast

	Attempt at solving bug #498720 for address fields, altho it should
	probably be made to handle folding single addresses in the case
	where they are too long to fit within a single line.

	* gmime/internet-address.c (internet_address_list_fold): New
	function.

	* gmime/gmime-message.c (write_structured): Renamed from
	write_addrspec().
	(write_addrspec): New header writer that writes
	InternetAddressLists in a nicely folded manner.

2007-11-12  Jeffrey Stedfast

	* gmime/internet-address.c (internet_address_destroy): No need to
	check if ia != NULL, we know this is true already.

Files:
RevisionActionfile
1.18modifypkgsrc/mail/gmime/Makefile
1.14modifypkgsrc/mail/gmime/distinfo