GMime 2.4 has had a number of API changes since GMime 2.2. To start, ALL public
APIs that used to use off_t in GMime 2.2 now use gint64 so that the API and ABI
do not change based on whether or not large file support is enabled.
In addition, all of the functions marked as deprecated in 2.0 and 2.2 were
removed (usually they had equivalent functionality in a parent class).
Many functions have also been renamed for better clarity and/or consistency.
For convenience, GMime 2.4 source packages include a shell-script to aid in
porting applications using GMime 2.2 (should work for most GMime 2.0
applications as well) to the 2.4 API. You can find this script under the
tools/ directory, named `gmime-port-2-2-to-2-4.sh'.
This script won't fix everything, but it should help quite a bit.
2010-01-30 Jeffrey Stedfast <fejj@novell.com>
* README: Bumped version
* configure.in: Bumped version to 2.2.25
* configure.in: Disabled strict-aliasing to work around subtle
bugs generated by gcc 4.4 when optimizations are enabled.
* README: Bumped version
* configure.in: Bumped version to 2.2.24
* gmime/gmime-utils.c (charset_convert): If iconv() fails, treat
conditions where outleft == 0 the same as if we had gotten an
E2BIG error (e.g. we need to grow the output buffer) so that we
don't overrun it while appending a '?' placeholder character.
* configure.in: Simplified configuring of gmime in a
cross-compilation environment. Make it possible to work-around
AC_TRY_RUN limitations by copying of target system iconv-detect.h
and setting ac_cv_have_iconv_detect_h=yes.
This changes the buildlink3.mk files to use an include guard for the
recursive include. The use of BUILDLINK_DEPTH, BUILDLINK_DEPENDS,
BUILDLINK_PACKAGES and BUILDLINK_ORDER is handled by a single new
variable BUILDLINK_TREE. Each buildlink3.mk file adds a pair of
enter/exit marker, which can be used to reconstruct the tree and
to determine first level includes. Avoiding := for large variables
(BUILDLINK_ORDER) speeds up parse time as += has linear complexity.
The include guard reduces system time by avoiding reading files over and
over again. For complex packages this reduces both %user and %sys time to
half of the former time.
2008-09-14 Jeffrey Stedfast <fejj@novell.com>
* README: Bumped version
* configure.in: Bumped version to 2.2.23
2008-09-13 Jeffrey Stedfast <fejj@novell.com>
* docs/reference/gmime-sections.txt: Updated.
* gmime/gmime-parser.c (nearest_pow): New faster method for
calculating nearest power of 2, rather than an expensive
while-loop.
(g_mime_parser_get_headers_begin): New function backported from
2.3.x
(g_mime_parser_get_headers_end): Same.
2008-08-07 Jeffrey Stedfast <fejj@novell.com>
* gmime/gmime-message-part.c (g_mime_message_part_get_message):
Only ref the message if it is non-NULL. Thanks to Peter Bloomfield
for this fix.
* configure.in: Bumped version to 2.2.22
* src/uudecode.c (uudecode): Don't base64 decode the
end-tag ("====\n"). Fixes bug #542222.
* COPYING: Fixed to reference LGPL v2.1
* gmime/gmime-common.h: Removed unused prototypes.
* gmime/gmime-message.c (g_mime_message_add_recipient): Change
'type' argument to const char *.
(g_mime_message_add_recipients_from_string): Same.
* gmime/gmime-utils.h (GMIME_QP_ENCODE_LEN): Add an extra byte for
\n in the case of quoted_encode_close(). Thanks to Peter
Bloomfield for discovering this.
* gmime/internet-address.c (decode_mailbox): Prevent reading past
the end of the input string.
* examples/basic-example.c: Fixed to use GMimeSignatureValidity.
* gmime/gmime-multipart-encrypted.c (g_mime_multipart_encrypted_encrypt):
Don't use deprecated functions.
* gmime/gmime-stream.c (stream_eos): Fixed a typo.
* mono/StreamWrapper.cs: Allow seeking to position 0 for
GMimeStreamFilter. Thanks to Debajyoti Bera for this patch.
* README: Bumped version
* configure.in: Bumped version to 2.2.21
* gmime/gmime-parser.c: Check parser_step() against
GMIME_PARSER_STATE_ERROR rather than -1 in case the value ever
changes.
(struct _GMimeParserPrivate): Changed state to be 16bit int
instead of a 26bit int which apparently cannot be set to -1 on
Solaris. Fixes bug #534301.
(parser_step_headers): Fixed a corner-case where a read boundary
fell between the \n and \t of a folded header.
* README: Bumped version
* configure.in: Bumped version to 2.2.20
* gmime/gmime-stream-buffer.c (stream_read): Break if
g_mime_stream_read() returns 0 as well (meaning EOF, no more data
to read) and don't keep looping. Fixes bug #533331.
* README: Bumped version
* configure.in: Bumped version to 2.2.19
* gmime/gmime-parser.c (parser_step_headers): Fix for CRLF encoded
input.
* gmime/gmime-parser.c (header_parse): Fixed a memory leak in the
case of an invalid header.
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.
2007-04-25 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.8
* tests/test-pgp.c: Test exporting of keys.
* gmime/gmime-utils.c (rfc2047_decode_word): Fixed compile
warnings.
* gmime/gmime-stream-file.c (stream_reset): Removed an unused
variable.
* gmime/gmime-charset.c (g_mime_charset_can_encode):
s/if (mask->level = 1)/if (mask->level == 1)/
2007-04-23 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.7
2007-04-14 Jeffrey Stedfast
* gmime/*.c (g_mime_*_get_type): Set n_preallocs to 0.
2007-04-12 Jeffrey Stedfast
* gmime/*.c: no need for a second NULL argument to g_object_new()
* util/cache.c (cache_new): Change max_size and node_size to be of
type size_t.
* gmime/gmime-multipart-encrypted.c
(g_mime_multipart_encrypted_new): g_object_new() doesn't need a
second NULL argument.
* gmime/gmime-utils.c (decode_8bit): Close the iconv descriptor
and since we are using is_ascii() now, we don't need to use
unsigned char *'s.
2007-04-12 Jeffrey Stedfast
* gmime/gmime-utils.c (decode_8bit): Use is_ascii().
(g_mime_utils_header_decode_text): Same.
(g_mime_utils_header_decode_phrase): Here too.
* gmime/gen-table.c: Added a is_ascii() macro for use instead of
the ctype isascii() so that I don't have to worry about casting.
2007-04-11 Jeffrey Stedfast
Revision 1119 (previous commit) made the following 2 functions
even less attractive than they already were, so I decided to
rewrite them especially since it wasn't hard to find a far cleaner
approach.
* gmime/gmime-utils.c (g_mime_utils_header_decode_text): Rewritten
to be cleaner, faster, and more elegant.
(g_mime_utils_header_decode_phrase): Same.
2007-04-11 Jeffrey Stedfast
Fixes for bug #423760 and bug #342196
* gmime/gmime-charset.c (g_mime_charset_can_encode): New
convenience function to check whether a length of UTF-8 text can
be converted into the specified charset.
(g_mime_set_user_charsets): New function allowing an application
to provide GMime with a list of user-preferred charsets to use for
encoding and decoding headers.
(g_mime_user_charsets): New function to get the list of
user-preferred charsets.
* gmime/gmime-utils.c (decode_8bit): New function to convert
arbitrary 8bit text into UTF-8 using the charset list provided by
g_mime_user_charsets().
(rfc2047_decode_word): Don't assume that just because the declared
charset is UTF-8 that it actually is in UTF-8.
(rfc2047_decode_word): If we can't open a converter for the
declared charset to UTF-8 or if we can't convert from the declared
charset into UTF-8, fall back to using decode_8bit().
(g_mime_utils_header_decode_text): Convert 8bit word tokens into
UTF-8 using decode_8bit().
(g_mime_utils_header_decode_phrase): Same.
(rfc2047_encode_word): Be a little more efficient about removing
'\n' chars...
(rfc2047_encode): When encoding a level-2 word cluster, attempt to
fit the cluster within a charset provided by
g_mime_user_charsets() rather than using GMime's best-fit charset
table (unless, of course, it doesn't fit within any of the
user-specified charsets).
2007-03-28 Jeffrey Stedfast
* gmime/gmime-iconv-utils.c (g_mime_iconv_strndup): No need to
cast out to a char *, it already is.
* gmime/gmime-stream-mem.c (g_mime_stream_mem_set_byte_array):
Only free the previous memory buffer if we were the owner.
2007-03-28 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.6 - critical release for the
gmime-stream-fs and gmime-stream-file fixes below.
* gmime/gmime-stream-filter.c (stream_reset): Try resetting source
stream first, this way if that fails we don't reset our state
either.
* gmime/gmime-stream-fs.c (stream_reset): Same as below.
* gmime/gmime-stream-file.c (stream_reset): Make sure to always
return 0 or -1, not the value from fseek()ing back to the
beginning of the stream (which might not be position 0).
2007-03-27 Jeffrey Stedfast
* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): If we aren't
in a UTF-8 locale, convert status messages into UTF-8 when using
the status line in the GError.
2007-03-26 Jeffrey Stedfast
* gmime/gmime-utils.c (g_mime_utils_8bit_header_decode)
(g_mime_utils_8bit_header_encode)
(g_mime_utils_8bit_header_encode_phrase): Changed all of these
functions to take `const unsigned char *' like they used to. Fixes
bug #423147.
* gmime/gmime-gpg-context.c (gpg_ctx_new): Initialize flushed and
nodata state variables. Thanks to valgrind for finding these...
* gmime/gmime-content-type.c
(g_mime_content_type_new_from_string): Shouldn't need to
g_strstrip() the type, is_ttoken() won't match against lwsp
chars. Also, instead of simply scanning past lwsp between some
tokens, use decode_lwsp() between *all* tokens so that we handle
comments as well (not that there should be any...).
* gmime-2.0.pc.in: Got rid of the redundant @LIBS@ which contained
the same value as @GMIME_LIBS@.
* configure.in: Added configure checks for large file support.
2007-03-26 Jeffrey Stedfast
* gmime-param.c: #include "gmime-parse-utils.h" and got rid of
this file's own decode_lwsp() implementation.
* internet-address.c: #include "gmime-parse-utils.h" which is
where a bunch of the parser functions have been moved from here.
* gmime-utils.c: #include "gmime-parse-utils.h" for decode_lwsp()
and decode_domain()
(decode_addrspec): Moved here from internet-address.c which had
been exporting the symbol previously (so that decode_domain didn't
have to be copy/pasted). Now this function can be made static -
yay! No more exporting un-namespaced symbols!
* gmime/gmime-message.c: #include "gmime-parse-utils.h" for
decode_lwsp()
* gmime/gmime-parse-utils.[c,h]: New source files containing some
parse utility functions that had been copy/pasted between several
source files previously.
2007-03-25 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.5
2007-03-25 Jeffrey Stedfast
* tests/Makefile.am (local-check): Simplified.
* tests/test-streams.c: Generate our own test data if we aren't
given any.
* tests/test-cat.c: Updated for the new Makefile.am rule.
* gmime/gmime-stream-mmap.c (stream_length): Fixed to return the
correct length when bound_end == -1 but bound_start != 0.
Discovered this thanks to my new testsuite.
* gmime/internet-address.c (decode_mailbox): If we can't find a
local-part and inptr is ',', set *in = inptr; rather than *in =
inptr + 1; Discovered this bug thanks to my new testsuite.
* tests/test-mime.c: Rewritten to use testsuite library.
2007-03-24 Jeffrey Stedfast
* tests/Makefile.am (check-local): Rewritten to actually run the
automated tests.
* tests/test-mbox.c: Rewritten to use testsuite library.
* tests/test-pgp.c: Rewritten to use testsuite library.
* tests/test-pgpmime.c: Rewritten to use testsuite library.
* tests/test-cat.c: Rewritten to use testsuite library.
* tests/test-streams.c: Rewritten to use testsuite library.
* tests/test-iconv.c: Rewritten to use testsuite library.
* tests/testsuite.[c,h]: New automated test-suite helper library.
2007-03-20 Jeffrey Stedfast
* configure.in: Check for the existance of _timezone and nfds_t.
* gmime/gmime-utils.c (mktime_utc): Use _timezone if
HAVE__TIMEZONE is set.
* gmime/gmime.c (g_mime_init): If HAVE_TIMEZONE or HAVE__TIMEZONE
is set, call tzset() to initialise the timezone variable.
2007-03-12 Jeffrey Stedfast
* gmime/gmime-param.c (decode_param): Instead of only checking
that the param value begins with "=?", check if that sequence
exists anywhere in the value. Fixes bug #407522.
* src/uudecode.c (uudecode): Use a strcmp instead of comparing
against a string literal (which was technically correct in this
case, but the prettyification would be nice if "-" was specified
in argv too). Fixes bug #408613.
2007-03-10 Jeffrey Stedfast
* gmime/gmime-message.c (g_mime_message_get_all_recipients): New
convenience function to get To, Cc, and Bcc recipients all in a
single list.
2007-02-19 Jeffrey Stedfast
* gmime/gmime-message.h: Moved g_mime_message_get_body() into the
deprecated block.
2007-02-11 Jeffrey Stedfast
* gmime/gmime-utils.c: Removed the need for the ctype isblank()
function.
* gmime/gmime-param.c (decode_int): Need to use (unsigned char *)
when passing indexes to ctype functions.
2007-02-10 Jeffrey Stedfast
* gmime/gmime-charset.c: Changed the names of the charset format
macros to coincide with the new names output by iconv-charset.c.
(g_mime_charset_iconv_name): Use the new macro names.
* iconv-detect.c: Use %u instead of %d, also changed the names of
the format #defines that we print out.
* gmime/gmime-utils.c (g_mime_utils_quote_string): Optimise a
smidgen.
(g_mime_utils_unquote_string): Fixed, this wasn't working right...
2007-02-09 Jeffrey Stedfast
* gmime/gmime-stream-filter.c (stream_write): Instead of comparing
the return value of the source stream write() to our input length
to write, compare to -1. We can't assume the the value the source
stream will return will be what we expected, all we can do is
check for error.
* gmime/gmime-part.c: Same as below.
* gmime/gmime-filter-basic.c: Fixes to signedness compile warnings
and updated to reflect gmime-utils.h changes.
* gmime/gmime-multipart.c (multipart_set_boundary): Updated to
reflect gmime-utils.h changes.
* gmime/gmime-stream.c (g_mime_stream_writev): If any of the
writes fail, return -1.
* gmime/gmime-utils.c: header_encode_*() and header_decode_*() now
take const char * rather than const unsigned char *
arguments. This has been done in an effort to fix compile warnings
about signed vs unsigned char * pointers. The 'save' argument to
all of the stream encoders/decoders have been changed to a
guint32, again for signed vs unsigned warning fixes.
2007-02-08 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.4
2007-02-06 Jeffrey Stedfast
Fix for bug #394433
* configure.in: Detect if the system has GNU's getopt
implementation available for us to use.
* Makefile.am: Don't build our own copy of the GNU getopt library
if the system has it available.
* src/uuencode.c: If the system has getopt.h, use it instead of
our own getopt.h.
* src/uudecode.c: If the system has getopt.h, use it instead of
our own getopt.h.
2007-02-06 Jeffrey Stedfast
More fixes on account of my test suite...
* tests/test-cat.c (test_cat_substream): end = start + random
amount... duh. Fixes a bug where sometimes the end bound was < the
start bound.
* gmime/gmime-stream-cat.c (stream_substream): Calculate the
length of each of the source streams correctly. D'oh.
(stream_substream): Fixed the calculation for s->start.
(stream_substream): Fixed the s->end calculation for when end
within the source stream's bounds.
(stream_substream): Keep track of how long our substream is going
to be for use with setting absolute bound_end on a multi-stream
substream.
2007-02-05 Jeffrey Stedfast
Fixes on account of the awesome test suite I wrote earlier... still
need to fix ::substream() tho (or maybe it's just the test that's
broke?).
* gmime/gmime-stream-cat.c: Added an id member to struct
_cat_node, for use with debugging...
(stream_read): Seek in the source stream, don't call
Cat::stream_seek() to do it.
(stream_seek): Swapped the logic of the "within bounds" check, had
it backwards. When seeking past a stream, set the node->position
to the length of the stream (technically, it's like we read() thru
all that data, right?). Instead of resetting all streams starting
at n->next, reset them all starting at current->next... since 'n'
technically might be before 'current'.
(g_mime_stream_cat_add_source): Assign each node an id for easier
debugging...
2007-02-05 Jeffrey Stedfast
* tests/test-cat.c: The beginnings of a test suite for
GMimeStreamCat.
* gmime/gmime-stream-cat.c (stream_read): Go to the next stream if
nread <= 0, not just nread == 0.
2007-02-04 Jeffrey Stedfast
* gmime/gmime-stream-mem.c (stream_reset): No longer need to
update stream->position.
* gmime/gmime-stream-mmap.c (stream_reset): Same g_return_if_fail
change. Also don't update stream->position.
(stream_seek): Added similar sanity checking/eos resetting as
StreamFs code.
* gmime/gmime-stream-file.c (stream_read): Style changes.
(stream_write): Style changes.
(stream_close): Fixed compiler warning.
(stream_reset): Changed g_return_if_fail to a true if-then.
(stream_seek): Changed to mimic the StreamFs changes.
(g_mime_stream_file_new): Similar to fs_new() change.
* gmime/gmime-stream-fs.c (stream_close): Loop the close()
ourselves.
(stream_reset): Changed g_return_if_fail to a true if-then. Also
be better about resetting eos.
(stream_seek): Rewritten to be more correct/robust (at least I
hope). Also properly reset eos when appropriate.
(g_mime_stream_fs_new): If lseek() fails, pretend start offset is
0.
* gmime/gmime-stream.c (stream_reset): No longer needs to update
stream->position.
(g_mime_stream_reset): Update stream->position if everything reset
smoothly. This is just a convenience change to subclass
implementations.
* gmime/gmime-stream-cat.c (stream_read): Rewritten. Hopefully
correct now? Ugh. We can hope...
(stream_write): Fixed to work better.
(stream_close): Rewritten.
(stream_reset): Rewritten to reset the streams, don't seek.
(stream_seek): Rewritten... still not correct, but should be ok
assuming our bound_start is 0.
(stream_length): Rewritten to not depend on a pre-calculated
length value... this Does Not Work (tm) if the source streams are
unbound and we've written to them.
(stream_substream): Rewritten... because ::seek() is so complex
for this type of stream, I've tried to eliminate a lot of the
headaches by making substreams only slurp up the streams within
the bounds of the start/end requested. If the entire contents
within the requested bounds are contained within a single source
stream, we return a substream of said source stream instead.
(g_mime_stream_cat_add_source): Don't precalculate the length here
anymore.
* gmime/gmime-stream-buffer.c (stream_read): Fixed to never allow
buflen to be negative if the read() of our source stream fails.
(stream_close): Handle the case where we've already been closed.
(stream_eos): Simplified.
(stream_reset): Stylistic changes.
(stream_seek): Don't allow seeks under our bound_start.
2007-02-03 Jeffrey Stedfast
* gmime/gmime-stream-cat.c (stream_flush): Flush all streams up to
and including the current stream, not just the current stream.
(stream_write): break if we don't write any data to
current->stream or get an error so we can try the next stream.
* gmime/gmime-stream-file.c (stream_close): Same as below.
* gmime/gmime-stream-fs.c (stream_close): Allow closing multiple
times... makes this consistant with the other streams.
(stream_write): If a system write fails with EFBIG or ENOSPC, set
eos to TRUE.
2007-01-20 Jeffrey Stedfast
* tests/test-streams.c (test_stream_gets): printf formatter fixes.
* examples/imap-example.c: #include <glib/gstdio.h>, fixes bug
#394434.
2007-01-20 Jeffrey Stedfast
Fixes bug #394419
* gmime/gmime-filter-charset.c (filter_filter): Do iconv const
casting.
(filter_complete): Same.
2006-11-02 Jeffrey Stedfast
* gmime/gmime-utils.c (g_mime_utils_header_format_date): Changed
the names of the parameters to date and tz_offset to prevent
warnings from -Wshadow.
* gmime/gmime-filter-html.c (writeln): Fixed another possible
buffer overflow condition pointed out by hpj.
* gmime/gmime-filter-crlf.c (filter_filter): Fixed a possible
buffer overflow condition pointed out by hpj.
* gmime/gmime-gpg-context.c (gpg_ctx_op_step): Modified to use
poll() rather than select()
2006-09-18 Joe Shaw
* mono/Makefile.am: Use SOURCES_XML instead of XML_SOURCES to
specify the sources.xml file. XML_SOURCES breaks with newer
automakes.
2006-08-29 Pawel Salek
* gmime/gmime-message-partial.c: set buf just before use - since
the mem stream buffer may get reallocated in the meantime leading
to segfaults.
2006-08-29 Jeffrey Stedfast
* gmime/gmime-param.c (decode_quoted_string): Unescape escape
sequences. Fixes bug #352771.
* gmime/gmime-message.c (g_mime_message_set_subject): Updated the
docs.
(g_mime_message_get_subject): Same.
2006-08-21 Peter Bloomfield
* gmime/gmime-utils.c (g_mime_utils_unquote_string): handle an
arbitrary sequence of quoted and unquoted sections.
2006-08-02 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.3
* gmime/gmime-message.c (process_header): Decode the values for
Subject, From, Reply-To so that g_mime_message_get_subject/etc all
return decoded strings like they were meant to.
2006-06-23 Jeffrey Stedfast
* gmime/gmime-gpg-context.c (swrite): Use g_build_filename() and
g_get_tmp_dir() rather than hard-coding the tmpfile to be in /tmp.
2006-06-23 Jeffrey Stedfast
* gmime/gmime-part.c: Use g_ascii_* versions of str[n]casecmp.
* gmime/gmime-parser.c: Use g_ascii_* versions of str[n]casecmp.
* gmime/gmime-param.c: Use g_ascii_* versions of str[n]casecmp.
* gmime/gmime-multipart-signed.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-multipart-encrypted.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-multipart.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-message-partial.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-message-part.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-message.c: Use g_ascii_* versions of str[n]casecmp.
* gmime/gmime-iconv.c (g_mime_iconv_open): Use g_ascii_* versions
of str[n]casecmp.
* gmime/gmime-header.c (g_mime_header_new): Use
g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
reuse code.
* gmime/gmime-gpg-context.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-filter-enriched.c: Use g_ascii_* versions of
str[n]casecmp.
* gmime/gmime-disposition.c (g_mime_disposition_add_parameter):
Use g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
reuse code.
(g_mime_disposition_new): Same.
(param_equal): Removed.
(param_hash): Removed.
* gmime/gmime-content-type.c: Use g_ascii_* versions of
str[n]casecmp.
(g_mime_content_type_new_from_string): Use
g_mime_strcase_[hash,equal] rather than param_[hash,equal] to
reuse code.
(g_mime_content_type_set_parameter): Same.
(param_equal): Removed.
(param_hash): Removed.
* gmime/gmime-charset.c: Use g_ascii_* versions of str[n]casecmp.
2006-06-23 Jeffrey Stedfast
* gmime/gmime-stream-cat.c (stream_seek): Fixed to only seek if
necessary and also to use ::reset() if seeking back to the
beginning of the stream so that it works for non-seekable streams
too. Fixes bug #345503 - again thanks to Charles for reporting
this bug.
* gmime/gmime-object.c (subtype_bucket_foreach): Fixed to also
free the bucket memory. Fixes bug #345768, thanks to Charles Kerr
for pointing this out.
2006-06-22 Jeffrey Stedfast
* gmime/gmime-gpg-context.c: Removed #define _POSIX_SOURCE to fix
bug #172179.
2006-06-15 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.2
2006-06-01 Jeffrey Stedfast
* gmime/gmime-utils.c (parse_broken_date): Fixed to handle
MM-DD-YY properly and also to fallback to DD-MM-YY if the first
pair of digits isn't within range for a proper month.
2006-05-30 Jeffrey Stedfast
* gmime.h.in: Removed.
* gmime.h: Now static, no longer auto-generated.
* gmime/gmime.c: Set the gmime_[major,minor,micro]_version
variables.
(g_mime_check_version): New function to check the required
version.
* gmime/gmime-stream-fs.c: Implement our own no-op version of
fsync() for systems that don't have fsync().
2006-05-24 Jeffrey Stedfast
* examples/imap-example.c (main): Use g_mkdir() to make this
example portable to Win32.
2006-05-01 Jeffrey Stedfast
* gmime/gmime-gpg-context.c (gpg_ctx_parse_status): Handle prompts
from GnuPG asking for the user's PIN for their SmartCard.
2006-04-21 Jeffrey Stedfast
* gmime/gmime-stream.h: #include <stdio.h> for SEEK_SET/CUR/END
enum values.
2006-03-16 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.1
* gmime/gmime-parser.c (parser_step): No-op if we are in an ERROR
state.
(parser_construct_message): Don't bail if we don't start in state
INIT, this is valid.
(parser_step_from): We need to bail even if parser_fill() returns
> 0 if the line is incomplete (e.g. a forced refill was needed but
no additional data could be read).
2006-03-16 Jeffrey Stedfast
* README: Bumped version
* configure.in: Bumped version to 2.2.0, it's about time I made a
stable release.
2006-03-15 Jeffrey Stedfast
* gmime/gmime-parser.c (parser_step_from): If we fail to find a
From line, set an error state. Also fixed the End-Of-Data check to
prevent an infinite loop if the stream ends with \n\n.
(parser_construct_message): Make sure our state starts off at
INIT. Also check for the ERROR state in our parser_step() loop and
return NULL if we encounter an error.
2006-03-03 Jeffrey Stedfast
* util/url-scanner.c (g_url_web_end): Allow urls such as
"http://www.novell.com./path" (note the '.' before the path
component).
(g_url_addrspec_start): If the '@' is the first character in the
match, then it isn't a valid email address.
and add a new helper target and script, "show-buildlink3", that outputs
a listing of the buildlink3.mk files included as well as the depth at
which they are included.
For example, "make show-buildlink3" in fonts/Xft2 displays:
zlib
fontconfig
iconv
zlib
freetype2
expat
freetype2
Xrender
renderproto
RECOMMENDED is removed. It becomes ABI_DEPENDS.
BUILDLINK_RECOMMENDED.foo becomes BUILDLINK_ABI_DEPENDS.foo.
BUILDLINK_DEPENDS.foo becomes BUILDLINK_API_DEPENDS.foo.
BUILDLINK_DEPENDS does not change.
IGNORE_RECOMMENDED (which defaulted to "no") becomes USE_ABI_DEPENDS
which defaults to "yes".
Added to obsolete.mk checking for IGNORE_RECOMMENDED.
I did not manually go through and fix any aesthetic tab/spacing issues.
I have tested the above patch on DragonFly building and packaging
subversion and pkglint and their many dependencies.
I have also tested USE_ABI_DEPENDS=no on my NetBSD workstation (where I
have used IGNORE_RECOMMENDED for a long time). I have been an active user
of IGNORE_RECOMMENDED since it was available.
As suggested, I removed the documentation sentences suggesting bumping for
"security" issues.
As discussed on tech-pkg.
I will commit to revbump, pkglint, pkg_install, createbuildlink separately.
Note that if you use wip, it will fail! I will commit to pkgsrc-wip
later (within day).
file's sole purpose was to provide a dependency on pkg-config and set
some environment variables. Instead, turn pkg-config into a "tool"
in the tools framework, where the pkg-config wrapper automatically
adds PKG_CONFIG_LIBDIR to the environment before invoking the real
pkg-config.
For all package Makefiles that included pkg-config/buildlink3.mk, remove
that inclusion and replace it with USE_TOOLS+=pkg-config.
2004-10-01 Jeffrey Stedfast <fejj@ximian.com>
* README: Updated
* configure.in: Bumped version to 2.1.9
2004-09-29 Jeffrey Stedfast <fejj@ximian.com>
* gmime/gmime-parser.c (parser_step_headers): Save the entire raw
part header as well.
(parser_init): Init the rawbuf (will be used for holding the raw
part header).
(parser_close): Free the rawbuf.
(parser_construct_leaf_part): Set the raw header on the mime part.
(parser_construct_multipart): Set the raw header on the multipart.
(parser_construct_message): Don't use g_mime_message_set_mime_part
or we'll end up clearing the raw header that we worked so hard to
preserve.
(parser_scan_message_part): Same.
(parser_scan_multipart_face): Change comparison to >= so that we
actually get rid of the last crlf sequence like we meant to.
(parser_fill): Get rid of the atleast check (it isn't really
needed and can cause breakage).
* gmime/gmime-message.c (message_get_headers): Modified to only
write part headers if the toplevel mime part contains the raw
header.
(message_write_to_stream): Same.
(g_mime_message_set_mime_part): Clear the raw message headers
since it obviously won't contain the raw message headers.
(message_add_header): If any message headers change, clear the raw
header from the toplebel mime part.
(message_set_header): Same.
* gmime/gmime-header.c (g_mime_header_set_raw): New function to
set the raw part header (to be used in place of our own folding if
available).
(g_mime_header_has_raw): New function to check if the raw header
is available.
2004-09-28 Peter Bloomfield <PeterBloomfield@bellsouth.net>
* gmime/gmime-multipart-signed.c (sign_prepare): Must treat
multipart/signed and multipart/encrypetd parts as opaque
(e.g. don't even attempt to change their encodings).
2004-09-13 Jeffrey Stedfast <fejj@novell.com>
* gmime/gmime-message.c (write_addrspec): New folding callback to
use on addrspec headers.
(g_mime_message_init): Register write_addrspec for all address
headers.
* gmime/gmime-utils.c (header_fold): Fixed the logic a bit for
structured headers such that we don't break long tokens.
2004-08-22 Jeffrey Stedfast <fejj@ximian.com>
* README: Updated.
* configure.in: Bumped the version to 2.1.8
* gmime/gmime.h.in: #include <gmime/gmime-session-simple.h> for
ia64 build fix on Debian (required because of the way gtk-doc's
scan program works).
* gmime/gmime-filter-enriched.c (enriched_to_html): Don't replace
<nofill> with <pre>. Also, replace lone '\n's with a space as
suggested by rfc1896.
2004-08-08 Jeffrey Stedfast <fejj@ximian.com>
* gmime/gmime-multipart-encrypted.c
(g_mime_multipart_encrypted_encrypt): Don't set encrypted.asc as
the filename anymore.
* gmime/gmime-multipart-signed.c (g_mime_multipart_signed_sign):
Added a hack for Balsa so it can support S/MIME. Also don't set
the filename to signature.asc. Balsa maintainers don't want this
*shrug*.
(g_mime_multipart_signed_verify): Same. These changes really
require a design change to CipherContext but that'll have to wait.
2004-08-04 Jeffrey Stedfast <fejj@ximian.com>
* configure.in: Changed the iconv-detect logic to not error-out on
fail. The code can properly handle the case where iconv-detect.h
doesn't exist, so let it do that instead.
2004-07-30 Jeffrey Stedfast <fejj@novell.com>
* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Don't use
g_unichar_isspace() here, we only want to break 'words' on ascii
lwsp.
2004-07-16 Jeffrey Stedfast <fejj@ximian.com>
* gmime/gmime.c (g_mime_init): Make intialisation ref-counted.
(g_mime_shutdown): Updated.
2004-07-06 Jeffrey Stedfast <fejj@ximian.com>
* gmime/gmime-utils.c (rfc2047_encode_get_rfc822_words): Break
apart long words so that they we don't generate encoded-word
tokens that are >75 chars. Fixes bug #145497.
in the process. (More information on tech-pkg.)
Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.
Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
All library names listed by *.la files no longer need to be listed
in the PLIST, e.g., instead of:
lib/libfoo.a
lib/libfoo.la
lib/libfoo.so
lib/libfoo.so.0
lib/libfoo.so.0.1
one simply needs:
lib/libfoo.la
and bsd.pkg.mk will automatically ensure that the additional library
names are listed in the installed package +CONTENTS file.
Also make LIBTOOLIZE_PLIST default to "yes".
GMime is a set of utilities for parsing and creating messages using
the Multipurpose Internet Mail Extension (MIME) as defined by the
following RFCs:
* 0822: Standard for the Format of Arpa Internet Text Messages
* 1521: MIME (Multipurpose Internet Mail Extensions) Part One:
Mechanisms for Specifying and Describing the Format of
Internet Message Bodies
* 1847: Security Multiparts for MIME: Multipart/Signed and
Multipart/Encrypted
* 1864: The Content-MD5 Header Field (Obsoletes rfc1544)
* 2015: MIME Security with Pretty Good Privacy (PGP)
* 2045: Multipurpose Internet Mail Extensions (MIME) Part One:
Format of Internet Message Bodies
* 2046: Multipurpose Internet Mail Extensions (MIME) Part Two:
Media Types
* 2047: Multipurpose Internet Mail Extensions (MIME) Part Three:
Message Header Extensions for Non-ASCII Text
* 2048: Multipurpose Internet Mail Extensions (MIME) Part Four:
Registration Procedures
* 2049: Multipurpose Internet Mail Extensions (MIME) Part Five:
Conformance Criteria and Examples
* 2183: Communicating Presentation Information in Internet Messages:
The Content-Disposition Header Field
* 2184: MIME Parameter Value and Encoded Word Extensions: Character
Sets, Languages, and Continuations
* 2231: MIME Parameter Value and Encoded Word Extensions: Character
Sets, Languages, and Continuations (Obsoletes rfc2184)
* 3156: MIME Security with OpenPGP (Updates rfc2015)