Commit Graph

57 Commits

Author SHA1 Message Date
1
a5fa3f992d Removed charset/locale charset lookup and iconv_open/close functions,
2001-10-11    <NotZed@Ximian.com>

        * camel-charset-map.[ch]: Removed charset/locale charset lookup
        and iconv_open/close functions, moved to gal.  Fixed all callers.

svn path=/trunk/; revision=13602
2001-10-11 22:08:20 +00:00
2
65014a74aa Change to camel_charset_iconv_open/close.
2001-10-02    <NotZed@Ximian.com>

        * camel-sasl-digest-md5.c (digest_response):  Change to
        camel_charset_iconv_open/close.

        * camel-pgp-context.c (pgp_verify): Change to
        camel_charset_iconv_open/close.

        * camel-mime-part-utils.c (convert_buffer): Change to
        camel_charset_iconv_open().

        * camel-mime-filter-charset.c
        (camel_mime_filter_charset_new_convert, finalise): Change to
        camel_charset_iconv_open, etc.

        * camel-mime-utils.c: Use the camel_charset_iconv_open/close()
        functions to open/close it.

        * camel-charset-map.c (camel_charset_iconv_open): New function,
        wrap iconv_open, so we can cache ic's.
        (camel_charset_iconv_close): Likewise for close.
        (camel_charset_map_init,shutdown): Init/free iconv cache.

svn path=/trunk/; revision=13361
2001-10-03 00:12:49 +00:00
4
450e955e76 If the type is encoded, get the fallback charset from the message
2001-09-24    <NotZed@Ximian.com>

        * camel-filter-search.c (check_header): If the type is encoded,
        get the fallback charset from the message content-type.

        * camel-mime-part-utils.c (check_html_charset): Dont check for
        charset==null before calling charset_to_iconv.
        (simple_data_wrapper_construct_from_parser): "

        * camel-mime-message.c (process_header): Try use content-type
        charset param as the fallback charset.

        * camel-charset-map.c (camel_charset_to_iconv): Handle name ==
        NULL, return NULL.

        * camel-folder-summary.c (camel_folder_summary_format_address):
        (camel_folder_summary_format_string): Made private again, removed
        #warning about it.  Renamed to s/camel_folder//.
        (summary_format_string): Take default charset param.
        (camel_message_info_new_from_header, message_info_new): Decode
        content-type field to get the charset parameter to use as the
        default charset for decoding strings.

        * camel-search-private.c (camel_search_header_match): Pass NULL as
        the charset, the locale charset is always tried.
        (camel_search_header_match): Supply a default_charset parameter to
        be used with TYPE_ENCODED params.

        * camel-mime-utils.c
        (header_param): get rid of the g_strcasecmp crap.
        (header_set_param): Same here.
        (header_decode_param_list): And here.
        (header_decode_text): Totally rewritten.  30% of its size.  If the
        word is not rfc2047 encoded, always try default_charset if
        supplied, if that fails, try locale charset if it exists, if that
        fails then assume latin1/7 bit ascii.
        (append_8bit): Changed to return FALSE if we can't convert for
        whatever reason, and dont append anything.

        * camel-mime-part.h (struct _CamelMimePart): Move content_type and
        headers out of the 'private' section.

        * camel-mime-part.c (get_headers): Dont do any conversion on the
        header.
        (process_header): Get the content-type charset as the fallback
        charset for decode_string.
        (construct_from_parser): IF we have a content-type header, process
        it before doing anything else, so we have access to a fallback
        charset for invalid headers.

svn path=/trunk/; revision=13096
2001-09-24 19:31:07 +00:00
c9ee98edc7 Convert the charset to the iconv-friendly name.
2001-09-13  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Convert the charset
	to the iconv-friendly name.

	* camel-charset-map.c (camel_charset_to_iconv): Add code to
	convert windows-[cp]#### charsets to their iconv-friendly format
	of cp####.

svn path=/trunk/; revision=12804
2001-09-13 18:36:53 +00:00
4b3b92a763 Reuse the original boundary instead of generating our own.
2001-09-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Reuse the
	original boundary instead of generating our own.

svn path=/trunk/; revision=12681
2001-09-07 19:39:34 +00:00
6fbbb872fe re-read the iconv man page, and treat the return value properly. It
2001-08-27  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): re-read the iconv man
        page, and treat the return value properly.  It returns the number
        of non-reversible conversions performed, not the number of output
        characters, sigh.
        (check_html_charset): Changed to just take a buffer of data, and
        not the mime parser.
        (simple_data_wrapper_construct_from_parser): Since we dont need
        the charset till we have all the data, search for the charset
        after we've read the data, if we have html data with no charset in
        the header.
        (simple_data_wrapper_construct_from_parser): Remove the
        seekable_source stuff.

        * Re-apply patches from before.

svn path=/trunk/; revision=12481
2001-08-27 06:33:41 +00:00
7a67b5c2ff Revert Not Zed's previous commits as they apparently can cause serious
2001-08-24  Peter Williams  <peterw@ximian.com>

	* Revert Not Zed's previous commits as they apparently can
	cause serious data loss for POP3 users.

svn path=/trunk/; revision=12461
2001-08-24 22:38:22 +00:00
5a94f4ea53 Limit the maximum output buffer size. iconv bugs? returns E2BIG forever on
2001-08-24  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (convert_buffer): Limit the maximum
        output buffer size.  iconv bugs?  returns E2BIG forever on some
        (valid) data?

svn path=/trunk/; revision=12432
2001-08-24 03:59:36 +00:00
d7597f0757 Likewise.
2001-08-24  Not Zed  <NotZed@Ximian.com>

        * providers/local/camel-spool-summary.c (summary_rebuild): Likewise.

        * providers/local/camel-mbox-summary.c (summary_rebuild):
        Summarising is spelt with an s.

2001-08-23  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part.c (write_to_stream): If we have rawtext, then
        dont do any charset conversion, only encoding/crlf conversion.

        * camel-data-wrapper.h (struct _CamelDataWrapper): Added 'rawtext'
        member, says the character encoding is raw, not utf8.

        * providers/local/camel-spool-summary.c
        (spool_summary_sync_quick): Synchronising is spelt with an s, not a z.
        (spool_summary_sync_full): "

        * providers/local/camel-mbox-summary.c (mbox_summary_sync_full):
        No, synchronising is spelt with an s.
        (mbox_summary_sync_quick): "

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_parser): Remove the
        warnings which aren't going anywhere fast.
        (convert_buffer): Function to convert a bytearray of textual
        content from one charset to another.  If the charset doesn't exist
        or fails, then do no conversion.
        (simple_data_wrapper_construct_from_parser): First, read in data,
        then try and convert it using the specified charset if supplied.
        If that fails, then dont do any conversion, and leave as raw.
        Also, if we have any x-* charsets, then dont do any processing.

svn path=/trunk/; revision=12429
2001-08-24 01:48:23 +00:00
f1738a4b78 renamed to camel_charset_to_iconv() to make it just a little more
2001-07-20  Not Zed  <NotZed@Ximian.com>

        * camel-charset-map.c (camel_charset_get_iconv_friendly_name):
        renamed to camel_charset_to_iconv() to make it just a little more

svn path=/trunk/; revision=11254
2001-07-20 04:59:46 +00:00
25ea76f3a7 Convert to the iconv-friendly charset names.
2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-filter-charset.c
	(camel_mime_filter_charset_new_convert): Convert to the
	iconv-friendly charset names.

	* providers/imap/camel-imap-store.c (create_folder): Fixed a
	compiler warning about returning without a value in a non-void
	function. Blah.

	* camel-mime-part.c (process_header): Pass the locale charset as
	the default_charset to header_decode_string().

	* camel-folder-summary.c (camel_folder_summary_format_string):
	Pass the locale charset as the default_charset to
	header_decode_string().
	(content_info_new): Same.

	* camel-mime-message.c (process_header): Pass the locale charset
	as the default_charset to header_decode_string().

	* camel-mime-utils.c (append_8bit): New helper function who's
	purpose is similar to append_latin1() but for 8bit text that we
	are assuming is not latin1.
	(header_decode_text): Now takes a default_charset parameter and
	calls append_8bit when appropriate.
	(header_decode_string): Also takes a default_charset parameter
	now.
	(header_decode_mailbox): Pass NULL as the default_charset to
	header_decode_string().

svn path=/trunk/; revision=11250
2001-07-20 00:08:50 +00:00
3f9e744cab No need for `acharset' anymore. (check_html_charset): Return a const char*
2001-07-19  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): No need for
	`acharset' anymore.
	(check_html_charset): Return a const char* and also use
	camel_charset_get_iconv_friendly_name() internally.

svn path=/trunk/; revision=11236
2001-07-19 21:08:14 +00:00
b88f6b9593 Removed. (check_html_charset): Replaced with this.
2001-07-12  Not Zed  <NotZed@Ximian.com>

        * camel-mime-part-utils.c (extract_metatag_charset): Removed.
        (check_html_charset): Replaced with this.
        (simple_data_wrapper_construct_from_parser): Call
        check_html_charset if we dont have a charset on the content-type,
        and we have text/html data.
        (check_html_charset): We also need to do qp/base64 decoding
        ourselves, sigh.

        * camel-mime-utils.c (html_meta_param_list_decode): Removed.  This
        was very wrong, the rules for mail headers vastly different from
        rules for decoding html elements.
        (rfc2184_decode): Move the malloc inside the iconv_open worked,
        otherwise we have a memleak.

        * camel-mime-filter-html.c (camel_mime_filter_html_finalize, init,
        run, reset): Changed to use camelhtmlparser, and fixed a tiny
        memleak.

        * camel-html-parser.c: Made the html indexer tokeniser re-usable.
        ONLY TO BE USED INTERNAL TO CAMEL HOWEVER.
        (tokenise_step): Slight fix to non-quoted values.

svn path=/trunk/; revision=11028
2001-07-12 05:02:11 +00:00
768ef5c60b New function to extract a meta-tag charset value if it exists.
2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c (extract_metatag_charset): New function
	to extract a meta-tag charset value if it exists.
	(simple_data_wrapper_construct_from_parser): Along the same lines
	as the code I previously ripped out, but this time use the
	mime-parser's seek ability to help us along. Currently I read up
	to a 2k buffer size - this is probably overkill, 1k is probably
	plenty.

	* camel-mime-utils.c (html_meta_param_list_decode): When we get to
	an `=', we must skip past it before trying to grab the param
	value. duh.

svn path=/trunk/; revision=11021
2001-07-11 23:56:31 +00:00
1606416242 Ripped out my code since it was never being used since the mime parser is
2001-07-11  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Ripped out my code
	since it was never being used since the mime parser is not using a
	seekable stream (ever?) which pretty much means my code needs to
	be done someplace else.

svn path=/trunk/; revision=11016
2001-07-11 21:10:52 +00:00
e39d94c5ef New function to parse an HTML meta-tag.
2001-07-10  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-mime-utils.c (html_meta_param_list_decode): New function
	to parse an HTML meta-tag.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): If the Content-Type
	did not contain a charset parameter and it's also a text/html
	part, we have 1 last place to look - in the META html tags. *sigh*

	* camel-mime-message.c (camel_mime_message_get_source):
	s/gint/unsigned since that's what it should be.

svn path=/trunk/; revision=10976
2001-07-10 22:06:56 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
156996ac5e Remove this. It was only a thin wrapper around struct _header_content_type
* gmime-content-field.[ch]: Remove this. It was only a thin
	wrapper around struct _header_content_type anyway, and didn't
	match the naming scheme of anything else.

	* Makefile.am: Remove gmime-content-field.[ch]

	* camel.h: Remove gmime-content-field.h

	* camel-types.h: Add CamelContentType as a typedef for struct
	_header_content_type (especially for use outside of camel).

	* camel-multipart.c:
	* camel-mime-part.c:
	* camel-mime-message.c:
	* camel-folder-summary.c:
	* camel-folder-search.c:
	* camel-data-wrapper.[ch]: Use CamelContentType and
	header_content_type_* functions rather than the GMime stuff.

	* camel-mime-part-utils.c:
	* camel-medium.c: Remove unused gmime-content-field.h include.

svn path=/trunk/; revision=7186
2000-12-28 19:28:39 +00:00
99e80d6ecf Add tests.
2000-11-24  Not Zed  <NotZed@HelixCode.com>

	* Makefile.am (SUBDIRS): Add tests.

	* camel-mime-filter-basic.c (filter): Well, I'll add the extra
	bytes here too, lathough not strictly needed, might save a
	re-malloc when we get to complete().

	* camel-mime-filter-charset.c (filter): Make sure we have room if
	we only convert very short data.
	(complete): and here too.

	* tests/Makefile.am: Initial test harness & tests.  Requires gcc
	for this.

	* camel-internet-address.c (d): Turn off debug.

	* camel-charset-map.c (camel_charset_step): Oops, & masks for set
	intersection, not | them.  Dunno how this got even close to
	working.

2000-11-23  Not Zed  <NotZed@HelixCode.com>

	* camel-mime-filter-basic.c (filter): For base64 encoding, the
	output size for 0, 1, or 2 bytes of input can exceed input*2, so
	make sure we account for that as well.
	(complete): And here.
	(complete): Similarly for qp encoding, if we have a trailing
	space, we need some extra bytes (not needed for 'filter()', as any
	such bytes are stored in state/save).

	* camel-mime-utils.c (quoted_decode_step): Removed fixme not required.
	(quoted_encode_close): Dont append a trailing afterall.  Otherwise
	a pass through the encode/decode will grow the message each time.

svn path=/trunk/; revision=6656
2000-11-24 03:18:20 +00:00
a34a4b15b8 Shite, -1 on error, >=0 on success. So i've just been truncating all the
2000-11-21  Not Zed  <NotZed@HelixCode.com>

	* providers/local/camel-mh-summary.c (mh_summary_sync_message):
	Shite, -1 on error, >=0 on success.  So i've just been truncating
	all the messages I touched, good one zed.
	(mh_summary_sync_message): Sigh, and write to the right damn fd as
	well.
	(mh_summary_sync_message): Argh, and we need to compare the length
	of the old xev -1 to the new xev, to check if we can optimise it.

	* camel-folder.c (camel_folder_change_info_new): Init the pool.
	(camel_folder_change_info_add_source): Allocate string in the
	pool.
	(camel_folder_change_info_add_source_list):
	(camel_folder_change_info_add_update): No longer free the key, as
	it cannot be yet.
	(change_info_add_uid): Add a new arg, copy, telling it whether to
	copy the uid argument or not, and copy using mempool_strdup.
	(change_info_cat): Tell add_uid to copy the string.
	(camel_folder_change_info_add_update): Call add_uid directly.
	(change_info_remove): Call add_uid directly, with no copy, and
	dont free the key.
	(change_info_free_update): No longer required since we dont malloc
	the keys.
	(camel_folder_change_info_add_uid): Fix for add_uid change.
	(camel_folder_change_info_remove_uid):
	(camel_folder_change_info_change_uid):
	(change_info_clear): No longer needed, just set the size to 0 on
	the array directly.
	(camel_folder_change_info_clear): Empty the arrays directly, and
	flush the mempool too, and also clear uid_source, incase anyone
	was silly enough to call us in the wrong order.
	(camel_folder_change_info_free): Dont bother clearing the array's
	contents, just free the pool and throw away all the indexes.

	* camel-folder.h: Added a mempool to CamelFolderChangeInfo to
	store the uid's we get.

	* camel-folder-search.c (search_match_all): If we are only
	matching a single info, just use that/do the search.
	(camel_folder_search_match_expression): New function.  Matches a
	single message info against an expression.
	(camel_folder_search_init): Init a hash table used to map the
	returned gptrarrays' to mempools.
	(camel_folder_search_execute_expression): Store all of the string
	data in a mempool, slightly faster, less wasted space (usually),.
	(camel_folder_search_free_result): Check for the mempool that
	stores the data for the list, and free that if we have it,
	otherwise assume we need to use g_free() (which should only happen
	if the list is empty at the moment).
	: commented out the debugging prints.  Got sick of 'executing
	header search' crap.

	* providers/vee/camel-vee-folder.c (camel_vee_folder_init): Init
	changes.
	(camel_vee_folder_finalise): Free changes.
	(vfolder_add_match): Simple helper to add a new matching info
	record.
	(camel_vee_folder_add_folder): Only trigger a changed event if we
	have changes.
	(vfolder_change_match): New function, changes our local vfolder
	info to match the source.
	(vfolder_add_match): Add a new info to the vfolder list.
	(vfolder_remove_match): Remove a no-longer matching info from the
	vfolder summary.
	(message_changed): check if the message still matches, and
	remove/etc as required.
	(camel_vee_folder_finalise, init): init/free search object.
	(vee_folder_build_folder): Build the changes to the folder into
	the changes data, as we go.
	(folder_changed): If the folder gave us an explicit list of
	changes, then process each one separately (unless there's a lot
	added/changed).

	* providers/vee/camel-vee-folder.h: Added a changes field to the
	folder.

svn path=/trunk/; revision=6628
2000-11-21 13:38:53 +00:00
338344b2e4 Set the preface/postface from the parser into the multipart object.
2000-11-04  Not Zed  <NotZed@HelixCode.com>

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_parser): Set the
        preface/postface from the parser into the multipart object.

        * camel-multipart.c (camel_multipart_set_postface): Function to
        set the postface text on a multipart.
        (camel_multipart_set_preface): Similarly for preface text.

        * camel-mime-parser.c (folder_scan_content): If we scan until a
        boundary, then we do not include the \n that starts the boundary
        line in the content.
        (struct _header_scan_stack): Added a ByteArray to store the
        multipart pre/post-text as we're scanning.
        (folder_pull_part): Free pre/posttext if they are allocated.
        (folder_scan_step): Build into the pre/posttext arrays as we
        encounter data.
        (camel_mime_parser_preface): REturn the multipart preface text, if
        there is any scanned.
        (camel_mime_parser_postface): Likewise for postface text.
        (byte_array_to_string): helper function for above.

        * providers/mbox/camel-mbox-folder.c (mbox_append_message): Change
        the from line to be "\nFrom ..." always, so no need to
        check/append a \n to messages.
        (mbox_append_message): Open the output stream with append mode
        [assuming this is more efficient than seeking to the end]
        And dont prepend \n  on the From line if its the first in the
        mbox.
        (mbox_append_message): Pass the offset of the real start of the
        "From " line when we perform the update (which may != 'seek')

        * camel-mime-filter-charset.c (complete): Removed the terminating
        NUL 'fix'.

        * camel-stream-filter.c (do_read): Added some debug.
        (do_flush): And here.
        (do_write): And here too.
        (do_write): ARGH!!! ARGH!  Ok, so the filter stream was writing a
        different number of bytes than the requester was asking it to
        write (because of filtering, of course!).  So instead of returning
        the true number of written bytes, we'll return what they asked us
        to write - unless there is an error in which case we return -1.

        * camel-mime-utils.c (base64_encode_close): Sigh, forgot to make
        it unsigned.  I think this is actually a gcc bug as (48 >> 2)
        somehow ended up negative, when it obviously should not, even if
        the data load was signed.

svn path=/trunk/; revision=6388
2000-11-04 02:34:46 +00:00
81f994a359 More UTF-8 handling
svn path=/trunk/; revision=5032
2000-08-25 04:31:13 +00:00
40eea3692e Fixed some warnings.
2000-08-10  Christopher James Lahey  <clahey@helixcode.com>

	* camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
	camel-mime-filter-charset.c, camel-mime-filter.c,
	camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
	camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
	camel-movemail.c, camel-multipart.c, camel-object.c,
	camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
	providers/mbox/camel-mbox-summary.c,
	providers/mh/camel-mh-folder.c,
	providers/smtp/camel-smtp-transport.c: Fixed some warnings.

svn path=/trunk/; revision=4719
2000-08-11 02:57:11 +00:00
8cb514d6dd Merge with camel-async.
svn path=/trunk/; revision=4687
2000-08-10 17:30:50 +00:00
4f20138bfc flush the filter stream before unreffing it, so it will
* camel-mime-part.c (write_to_stream): flush the filter stream
	before unreffing it, so it will camel_mime_filter_complete.

	* camel-stream-filter.c (camel_stream_filter_class_init): Fix a
	braino so camel_stream_flush works here.

	* camel-stream-mem.c (stream_seek): Fix a bug that resulted in
	large attachments being silently dropped.

	* providers/pop3/camel-pop3-store.c
	(camel_pop3_command_get_additional_data): Don't use g_strjoinv
	here, since it is O(n^2) on the length of the output string, and
	we can do O(n).

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): add a CRLF decoder
	after the QP/B64 decoder if it's text.

svn path=/trunk/; revision=3658
2000-06-21 02:09:48 +00:00
f0600c2ccb KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet, output
* camel-mime-utils.c (rfc2047_decode_word):
	* camel-mime-part-utils.c (simple_data_wrapper_construct_from_parser):
	* camel-folder-summary.c (summary_build_content_info):
	KLUDGE! Since neither ETable nor GtkHTML supports UTF-8 yet,
	output ISO-8859-1 instead, so Ettore can read his Italian mail. :)
	This will be reverted later.

svn path=/trunk/; revision=3597
2000-06-16 22:42:12 +00:00
7e66242575 Fixes Bug 192.
2000-06-01  Not Zed  <NotZed@HelixCode.com>

        * camel-mime-part.c (construct_from_parser): For a message part,
        set the default content-type to message/rfc822.  Maybe needs to be
        done for multiparts too?

2000-05-31  Not Zed  <NotZed@HelixCode.com>

        * camel-mime-message.c (construct_from_parser): Typo in assersion.

        * camel-mime-parser.c (folder_scan_step): Use a default type of
        message/rfc822 for multipart/digest.  Bug Z192.
        (folder_scan_drop_step): Remove warning.

svn path=/trunk/; revision=3340
2000-06-01 22:08:07 +00:00
f5ba4dde57 Don't set a default boundary. Require the caller to do that.
* camel-multipart.c (camel_multipart_init): Don't set a default
	boundary. Require the caller to do that.
	(set_boundary): if boundary is NULL, generate a "random" boundary.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Add a call to
	camel_multipart_set_boundary after creating a new multipart.

svn path=/trunk/; revision=3217
2000-05-26 14:46:13 +00:00
5429c7017c Replace simple data wrapper here too, oops.
2000-05-25  NotZed  <NotZed@HelixCode.com>

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Replace simple
	data wrapper here too, oops.

svn path=/trunk/; revision=3208
2000-05-25 23:25:35 +00:00
0cd1c1934c remove get/set_output_stream operations. They're redundant with
* camel-data-wrapper.c: remove get/set_output_stream operations.
	They're redundant with write_to_stream, and CamelMimePart and
	CamelMimeMessage only implement the latter, meaning that trying to
	get_output_stream on a CamelMimeMessage that was built from pieces
	rather than being parsed from a stream doesn't work. Anything that
	uses get_output_stream can be rewritten to use write_to_stream, so
	we'll standardize on that.
	(camel_data_wrapper_new): remove this: CamelDataWrapper is
	supposed to be an abstract class.
	(write_to_stream): remove default implementation. (Moved to
	CamelSimpleDataWrapper)

	* camel-simple-data-wrapper.c: resurrect, although it's not really
	the same thing it was before. A simple data wrapper, which is
	backed by a CamelStream.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): Use
	construct_from_stream rather than set_output_stream.
	(camel_mime_part_construct_content_from_parser): Change
	camel_data_wrapper_new to camel_simple_data_wrapper_new.

	* camel-mime-part.c (camel_mime_part_set_content): Change
	camel_data_wrapper_new to camel_simple_data_wrapper_new.

svn path=/trunk/; revision=3112
2000-05-18 01:00:25 +00:00
580d885820 Make camel not leak like a sieve.
* camel-object.c: New subclass of GtkObject which is now the base
	of the Camel object hierarchy. Currently the only difference
	between CamelObject and GtkObject is that CamelObjects don't start
	out floating.

	* *.h: Move a bunch of typedefs to camel-types.h. Standardize on
	using <camel/foo.h> in header files rather than <foo.h>, "foo.h",
	or "camel/foo.h". Remove some unneeded includes.

	* camel-address.c, camel-data-wrapper.c, camel-folder-search.c,
	camel-folder-summary.c, camel-folder.c, camel-mime-filter.c,
	camel-mime-parser.c, camel-service.c, camel-session.c,
	camel-stream.c: These are now subclasses of CamelObject.

	* camel-data-wrapper.c (set_output_stream):
	* camel-medium.c (set_content_object):
	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds):
	* providers/mbox/camel-mbox-folder.c (mbox_get_message_by_uid):
	remove gtk_object_sink calls.

	* camel-stream-buffer.c (init_vbuf):
	* camel-stream-filter.c (camel_stream_filter_new_with_stream):
	ref the original stream.

	* camel-folder-summary.c (camel_folder_summary_finalise): unref
	the filters when finalizing.

	* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser,
	camel_mime_part_construct_content_from_parser):
	* camel-mime-part.c (camel_mime_part_set_content): Unref objects
	that are created only to be handed off to other objects. If
	they're going to be needed later, they will have been additionally
	ref'ed by the object that needs them.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	unref the message stream after creating the data from it.

	* camel-stream.c, camel-stream-buffer.c, camel-stream-filter.c,
	camel-stream-fs.c, camel-stream-mem.c: Remove camel_stream_close,
	since its semantics are dubious (what happens when you close a
	stream other people still have references on?).

	* providers/nntp/camel-nntp-store.c:
	* providers/smtp/camel-smtp-transport.c:
	* providers/pop3/camel-pop3-store.c:
	replace camel_stream_close calls with gtk_object_unref.

	* providers/mbox/camel-mbox-folder.c:
	* providers/nntp/camel-nntp-folder.c:
	* providers/sendmail/camel-sendmail-transport.c:
	replace camel_stream_close with camel_stream_flush +
	gtk_object_unref

svn path=/trunk/; revision=2882
2000-05-07 21:56:32 +00:00
aa7851f1f0 And same here ...
2000-05-05  NotZed  <NotZed@HelixCode.com>

        * camel-folder-summary.c: And same here ...

        * camel-mime-utils.c: Defined out some memory profiling stuff I
        left there by mistake.

        * camel-mime-parser.c (folder_scan_content): Apply the fix from
        the header scanner to here too.
        (folder_scan_header): Only check for end of header if we have
        space for it (didn't end the read with a newline)
        (folder_scan_header): inptr is the only real thing we need
        registerised for performance.  Try to help the compiler be smart
        about it ..
        (folder_scan_header): Simplified the save header case a tad.

        Commented out some memory profiling stuff.

svn path=/trunk/; revision=2811
2000-05-05 08:47:02 +00:00
f8bfbef0a7 No, we're not going to have g_strcasecmp for no good reason,
not even if its slipped in with no changelog.

2000-05-04  NotZed  <NotZed@HelixCode.com>

	* providers/mbox/camel-mbox-summary.c: Yes, and anotherone.

	* camel-mime-utils.c: And another one.

	* camel-mime-part.c: And another one.

	* camel-mime-part-utils.c: And another one.

	* camel-folder-search.c: And another one.

	* camel-mime-parser.c: Reverted a change wihtout a ChangeLog entry.

2000-05-04  NotZed  <NotZed@HelixCode.com>

	* camel-folder-summary.[hc]: Yes, CamelFolderSummary is back ...
	... re-usable class to summarise and index any stream or message
	and to manage/load/save the created summaries.

	* camel-folder.c: Include string.h to kill a warning.

2000-05-03  NotZed  <NotZed@HelixCode.com>

	* camel-folder.h: Added pos/bodypos/endpos to the basic message
	content info object.  Size to be removed?  Moved the
	messageconentinfo and messageinfo back to camel-folder-summary.h.

	* camel-mime-filter-index.c (camel_mime_filter_index_set_ibex):
	New function to (re)set the index to use on a filter.

	* camel-mime-parser.c (camel_mime_parser_scan_from): Whole bunch
	of inline docs.
	(camel_mime_parser_drop_step): New function to drop a state from
	the parser.  Needs more testing.

svn path=/trunk/; revision=2789
2000-05-04 05:45:30 +00:00
3ccfb61399 s/strcasecmp/g_strcasecamp/ everywhere except intl/, per michael's
request.

svn path=/trunk/; revision=2776
2000-05-03 14:43:10 +00:00
44575d972d > * gmime-utils.[ch]: What the hell, remove it. This will break the
> 	nntp provider (but its broken anyway).  The mime parser can be
>	used instead though.
> 	Removed from all code including it (but none were using it).
>
> 	* gmime-utils.c (_store_header_pair_from_string): Removed bizarre
> 	string_dichotomy version of this.  This code is somewhat redundant
> 	now, and is headed for death anyway.
>
> 	* gstring-util.c (g_string_dichotomy): Same with this one.
> 	(g_string_clone): Removed a memory leak, g_string_new() allocates
> 	its own memory.
> 	(g_string_append_g_string): Allow to append an empty gstring onto
> 	another gstring, dont abort()!
>
> 	* string-utils.c (string_dichotomy): Removed this incredibly weird
> 	function.
>
> 	* camel-folder.c (_create): Replaced the rather obtuse use of
> 	"string_dichotomy" function with a simple strrchr().  Still not
> 	sure it'll work.
>
> 	* camel-folder-summary.c: cvs removed a long-removed file.

svn path=/trunk/; revision=2753
2000-05-02 20:37:06 +00:00
2
b5ddb0c7c8 Dont use autofill on these fucking long function anmes!!!!!!
2000-05-02    <notzed@helixcode.com>

        * camel-mime-part-utils.c
        (simple_data_wrapper_construct_from_parser): Dont use autofill on
        these fucking long function anmes!!!!!!

svn path=/trunk/; revision=2750
2000-05-02 18:05:13 +00:00
18903e6b22 camel_mime_parser_tell() returns an offset from where it started parsing,
* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser):
	camel_mime_parser_tell() returns an offset from where it started
	parsing, not necessarily from the start of data. Since we're
	parsing a bounded seekable_stream, we need to add the stream's
	starting bound to camel_mime_parser_tell's return value to
	create the substream in the right place.

	* camel-seekable-substream.c
	(camel_seekable_substream_new_with_seekable_stream_and_bounds):
	say CAMEL_STREAM_UNBOUND rather than -1 in doc.

	* camel-seekable-stream.c (camel_seekable_stream_seek): Add more
	info to docs.

svn path=/trunk/; revision=2680
2000-04-29 15:57:11 +00:00
2a6a191e05 Remove. We weren't using the fields that made this different from
* camel-mime-body-part.[ch]: Remove. We weren't using the fields
	that made this different from camel-mime-part, so it basically
	just forced us to do lots of gratuitous typecasting.

	* camel-multipart.[ch]: Use CamelMimePart. Remove the multipart
	parent stuff, since we weren't using that either.

	* etc: update for CamelMimeBodyPart -> CamelMimePart

svn path=/trunk/; revision=2645
2000-04-26 21:30:32 +00:00
c93a2e37f5 Big cleanup of camel-stream-*, got rid of 3 classes, improved the interfaces,
and fixed at least one problem (end of stream never happening in certain
cases).  Things that can fail now have a way of saying they failed too.

So much for taking ANZAC day off to get drunk!

2000-04-26  NotZed  <NotZed@HelixCode.com>

	* camel-seekable-substream.c (stream_seek): Changed to have
	absolute seek semantics, not relative to the bounds.

	* camel-seekable-stream.c (reset): When we reset, seek to the
	start of the bound, if there is one.
	(stream_tell): Make tell virtual.

	* camel-stream-filter.c (do_available): Removed.

	* camel-stream-buffer.c: Remove leading _'s from static functions.
	(stream_read): Renamed from read().  Fancy that conflicting!  (my
	boo!)  Others too.

	* providers/pop3/camel-pop3-folder.c (get_message_by_number):
	Changed to stream_mem interface.

	* providers/mbox/camel-mbox-folder.c (_get_message_by_uid): Fixed
	for streamfs interface changes, and implement a failure case.
	(_append_message): Changed for fs stream interface change.

	* camel-multipart.c (print_part): Iterate rahter than callback.  I
	hate glists's interface (hence, move this to write_to_stream).
	(write_to_stream): Return an error (yuck, this is a royal PITA to
	do with the stream write interface).

	* camel-mime-message.c: Removed leading _ from static names.

	* camel-mime-part.h: construct_from_parser() now returns an error
	code.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Changed to use a
	camel-data-wrapper instead of a camel-simple-data-wrapper (no
	change needed elsewhere?).
	(simple_data_wrapper_construct_from_parser): Fixes for stream-mem
	interface changes.

	* camel-simple-data-wrapper.[ch],
	camel-simple-data-wrapper-stream.[ch],
	camel-stream-data-wrapper.[ch], removed.  Fixed including of these
	files.

	* camel-mime-part.c (camel_mime_part_set_text): Remove the use of
	the camel-simple-data-wrapper-stream, just use a mem stream.
	(write_to_stream): Renamed from my_*
	(construct_from_stream): Return an error on error.

	* camel-stream-mem.c (camel_stream_mem_new*): Remove mode
	parameter.

	* camel-stream-mem.h (enum CamelStreamMemMode): Removed.  It
	wasn't used at all.

	* camel-data-wrapper.h: Add camel_data_wrapper_new() to create
	these.
	(write_to_stream, construct_from_stream): Return an error
	indicator for success.  Fixed all methods to match (ICK).

	* Makefile.am (libcamel_la_SOURCES): Remove
	camel-simple-data-wrapper.c, camel-simple-data-wrapper-stream.c,
	camel-stream-data-wrapper.c.  Obsoleted by code re-use!

	* camel-data-wrapper.c (construct_from_stream): Change the default
	implementation to just set the output stream == construction
	stream.  Well, this lets me get rid of both simple-data-wrapper
	and stream-data-wrapper (unused anyway), and
	simple-data-wrapper-stream in one hit.  CamelDataWrapper is now
	also a concrete class.
	(write_to_stream): Use camel_stream_write_to_stream() to
	calculate/return values (and save code).
	Include <errno.h> for obvious reasons.

	* camel-stream.c (eos): Provide a default implementation of .eos().
	(camel_stream_write_to_stream): Make it return an error code on
	error.
	(camel_stream_printf): Changed to return the number of bytes
	written/error.
	(camel_stream_available): Removed.

	* camel-stream-fs.h (enum CamelStreamFsMode): Removed.  Changed to
	use unix modes and so forth (wasn't used for anything but new file
	creation and didn't work well either).

	* camel-stream-fs.c: Removed leading _'s for names.  And removed
	some virtual method 'documentation'.
	(destroy): Dont try and close a closed/error fd.  Only report
	error if close returns -1.  Moved all the code to finalise(), and
	killed this function.
	(init_with_fd): Properly setup the seek offset, if it is a
	valid and seekable file descriptor.
	(init_with_fd_and_bounds): Use off_t for bounds, set bounds on the
	seekable stream.
	(init_with_name): Return error codes.
	(init_with_name_and_bounds): Ditto.
	(camel_stream_fs_new_with_name): REturn NULL object if it failed.
	(camel_stream_fs_new_with_name_and_bounds): Return NULL object on
	failure.  Changed with_name* api's to take unix open style args
	and flags.
	(read): The bounded stream bounds checking seemed off, simplified
	code a bit.
	(write): Implement bounds checking for writing, the comment was
	wrong, it could make sense to bound writing.  Cleaned up a little.
	(available): Gone.
	(eos): Removed.  Use CamelStream's implementation now.
	(close): Reset the fd to -1, provide a warning for bad usage.
	(seek): Cleaned up.  Changed the behaviour a little, the returned
	offset is the absolute position in the file, even in bounded
	streams.
	(seek): Seek from end mirrors lseek() behaviour (reverse seeking).

2000-04-25  NotZed  <NotZed@HelixCode.com>

	* camel-stream-fs.h (struct _CamelStreamFs): Moved bounds and eof
	indicator to other parent classes.

	* camel-stream.c (camel_stream_printf): New utility
	function.  Obvious use.

	* camel-stream-mem.c: Removed leading _'s from static func's.
	(camel_stream_mem_new_with_byte_array): Fixed for api changes, set
	the owner for the byte array to us.
	: Removed A bunch of gtk doc stuff for static (implementation) functions.
	(available): Removed.
	(write): Fixed the write implementation so that seek() works on a
	seekable memory stream, as expected.  Seeking past the end of the
	buffer has unix semantics (filling with 0).
	(available): Removed.
	(write): Implement seekable stream bounded stream.
	(read): Implement seekable stream bounded stream.
	(close): Dont free the stream_mem if we're not the owner.
	(seek): Allow to seek beyond the end of memory area,
	implement bounds checking.
	(seek): Set errno on bad policy.

	* camel-stream-mem.h (struct _CamelStreamMem): Changed position to off_t.
	(new_with_buffer): Changed len to be a size_t.
	(set_buffer, set_byte_array): New interface functions.
	(struct _CamelStreamMem): Removed position, it is stored in the
	superclass.

	* camel-stream.h: Removed some of the seemingly random
	whitespace.  Removed the available method (its not
	impelemented/useful enough).

	* camel-seekable-substream.c
	(init_with_seekable_stream_and_bounds): Remove the data_available
	stuff, it hasn't been properly implemented/finished, and may never
	work (unfortunately *sigh).
	(reemit_parent_signal): Removed part of the above change.
	(set_bounds): Removed (moved to seekable-stream).
	: Fixed up some of the generally unreadable indenting (sorry,
	wrapping at 80 characters with
	camels_really_long_function_names()
	just_doesnt_work_very_well_does_it().
	(available): Removed.
	(stream_seek): Fixup for object changes.  Make sure we return -1
	if the parent stream can't seek.

	* camel-seekable-stream.c (ccamel_seekable_stream_set_bounds): New
	function to bound any seekable stream.
	: Removed _'s.
	(camel_seekable_stream_class_init): Implement an init function, to
	setup the stream bounds to unbound.

	* camel-seekable-stream.h (CamelSeekableStreamClass): New virtual
	method set_bounds for seekable streams.
	(CAMEL_STREAM_UNBOUND): New define for no bound.

	* camel-seekable-substream.h (struct _CamelSeekableSubstream):
	Removed sup_bound and inf_bound, moved to CamelSeekableStream (and
	renamed, and changed to off_t's).
	(new_with_seekable_stream_and_bounds): Use off_t as the bounds.
	(CamelSeekableSubstreamClass): Uh, why was the intialiser virtual?
	Removed.

	* camel-seekable-stream.[ch] (CamelSeekableStreamClass): Changed seek
	to accept an off_t as the offset.
	(struct _CamelSeekableStream): Renamed cur_pos to position and
	changed it to an off_t type.
	(enum CamelStreamSeekPolicy): Set to match the SEEK_* constants
	from lseek().
	(get_current_position): Renamed to tell().

	* camel-stream-buffer.h: Commented out set_vbuf - never implemented.

svn path=/trunk/; revision=2624
2000-04-26 10:35:25 +00:00
d38dcd1631 fix a cut-and-pasto.
* camel-mime-part-utils.c
	(simple_data_wrapper_construct_from_parser): fix a cut-and-pasto.

svn path=/trunk/; revision=2587
2000-04-24 19:58:28 +00:00
27937ec41f Big fixes for the last commit which broke the message creation entirely.
Plus an address decoder/formatter, etc.

	* camel-mime-message.c (construct_from_parser): Allow MESSAGE_END
	_or_ EOF as valid termination conditions.

	* providers/mbox/camel-mbox-summary.c (message_struct_new): Decode
	and then re-encode the addresses, so they are consistently
	formatted.

	* camel-mime-utils.c (header_decode_mailbox): Store the address in
	a _header_address.  And try to get a comment-stored name if there
	is one.
	(header_decode_address): Actually return an address.
	(header_to_decode): Renamed to header_address_decode()
	(header_mailbox_decode): New function to get a single mailbox.
	(header_mime_decode): Return the major/minor value, as
	appropriate.
	(header_address_new, and friends): Whole bunch of utility
	functions for working with the address thingies.
	(header_decode_domain): Free the string header, and dont expand
	'.' into ' . '.

	(camel_mime_part_construct_content_from_parser): Oops, this was
	totally screwed up, try creating the right cotnent on the right
	object.

svn path=/trunk/; revision=2579
2000-04-24 09:12:31 +00:00
8c9b0cc3f0 No longer call data_wrapper_repository_init.
2000-04-24  NotZed  <NotZed@HelixCode.com>

	* camel.c (camel_init): No longer call
	data_wrapper_repository_init.

	* camel-medium.c (write_to_stream): Moved (back) to
	camel-mime-part.
	(add_header):
	(set_header):
	(remove_header):
	(get_header): Make all these abstract, and spit warnings if
	called.  I guess it could manage the list, but well, it doesn't.

	* camel-medium.h (struct _CamelMedium): Dont store headers here,
	the implementor is the only one who knows their format.
	(CamelMediumClass): Changed header values to be void *'s.  They
	need not be strings?

	* camel-simple-data-wrapper.c (construct_from_stream): And we're
	back.  Set the output stream.
	(construct_from_parser): Moved to camel-mime-part-utils.

	* camel-mime-part-utils.c
	(camel_mime_part_construct_content_from_parser): Create the
	contents of multipart and simple messages.

	* camel-multipart.c (construct_from_parser): Moved to
	camel-mime-part-utils.
	(separate_part): Removed.

	* camel-mime-part.c (construct_from_stream): Back again!  This now
	switches over to using a mime parser for any mime parts, only.
	(my_write_to_stream): Write our headers and so forth here.
	(add_header): Add header directly, parent class is abstract.
	(remove_header): Ditto.
	(set_header): Ditto.

	* camel-data-wrapper.c (camel_data_wrapper_construct_from_stream):
	Remade abstract.
	(camel_data_wrapper_construct_from_parser): Moved to
	camel_mime_part.

	* camel-data-wrapper.h: Put back construct_from_stream.

	* camel-mime-part.h: Put construct_from_parser in here, the
	data-wrapper shouldn't know about mime.  Ok, so now to undo half
	of the last hours changes ... duh.

2a51,93
	* providers/pop3/camel-pop3-folder.c (get_message_by_number): Use
	construct_from_stream instead of set_input_stream().

	* camel-simple-data-wrapper-stream.c
	(camel_simple_data_wrapper_stream_construct): REmoved the destroy
	callback code.
	(wrapper_destroy_cb): Removed.

	* camel-simple-data-wrapper.h: Add prototype for _construct()
	method.

	* camel.c: Include unicode.h to kill a warning.

	* camel-data-wrapper.h (CameldataWrapperClass): Removed
	construct_from_stream virtual method.
	Removed get/set input stream.

	* data-wrapper-repository.[ch]: Removed&from build.  Obsoleted?
	The justification as is follows: It is mixing storage
	protocol/format with message architecture.  It really just doesn't
	serve any purpose, as each medium implementor will have to have its
	own type->handler mapping, and the only current implementor,
	mimepart has a very simple structure and no need for this.

	* camel-medium.c (write_to_stream): Moved here from most of the
	stuff in camel-mime-part.  Well, the MEDIUM is the one that knows
	what the headers are, and the content is, let it write it out.

	* camel-mime-part-utils.c (camel_mime_part_construct_content):
	Copied from camel-mime-part.c, removed handling of message
	followon state (moved to camel-mime-message).
	(camel_mime_part_construct_content_from_parser): Renamed from
	construct_content.
	(camel_mime_part_construct_headers_from_stream):
	(camel_mime_part_construct_content_from_stream):
	(camel_mime_part_store_stream_in_buffer): Removed.  Replaced by
	the new construct from parser stuff.

	* camel-mime-message.c (construct_from_parser): Do
	construct_from_parser for mime-message.
	(_write_to_stream): Set the mime-version header for medium to
	write out, rather than writing it out ourselves.

4a96,102
	(construct_from_stream): Removed.
	(camel_data_wrapper_construct_from_stream): Changed to a helper
	function, creates a mime_parser, and constructs from that.
	(set_input_stream): Removed.
	(camel_data_wrapper_set_input_stream): Removed.
	(get_input_stream): Removed.
	(camel_data_wrapper_get_input_stream): Removed.
11a110,111
	(_get_message_by_uid): Use construct_from_stream() instead of
	creating our own parser.
16a117,131
	(camel_mime_part_construct_content): Removed to
	camel-mime-part-utils.c
	(my_get_output_stream): Removed.  The streeam is in the
	data-wrapper.
	(my_get_content_object): Removed.  The content object is stored in
	the medium.  If none is there, the object wasn't created properly.
	(my_write_content_to_stream): Removed.  The content object is the
	one that knows how to write itself out!!!!!!!!
	(my_write_to_stream): Remove the base header writing stuff - has
	been moved to camel-medium, where it belongs.  This can just be
	used to check for mandatory headers.
	(my_construct_from_stream): Removed.
	(my_set_input_stream): What the hell, i'll remove this too.
	Nobody seems to understand how it differs from create from stream,
	and they both seem to serve the same purpose ...
19a135,136
	(construct_from_stream): Removed!  Job taken over by
	construct_from_parser.
24a142
	(set_input_stream): REmoved.  Replaced by construct_from_parser.

svn path=/trunk/; revision=2577
2000-04-24 06:05:41 +00:00
fe97fa2fbb kill camel-log
svn path=/trunk/; revision=2487
2000-04-18 19:05:15 +00:00
1e7ab47d26 fix the name of "Helix Code, Inc." in all the copyrights
svn path=/trunk/; revision=2091
2000-03-09 19:52:48 +00:00
519501b7fe Make sure we open with create with a creation mask.
2000-03-03  NotZed  <NotZed@HelixCode.com>

        * providers/mbox/camel-mbox-utils.c (camel_mbox_write_xev): Make
        sure we open with create with a creation mask.

2000-03-01  NotZed  <NotZed@HelixCode.com>

        * camel-mime-part-utils.c
        (camel_mime_part_construct_content_from_stream): DO NOT assert on
        content type, we have fallback code 4 lines below it ... *sigh*

svn path=/trunk/; revision=2026
2000-03-03 20:28:04 +00:00
e4842dc1b1 Free the data in the headers hash table. (_add_header): g_strdup the
* camel-medium.c (_finalize): Free the data in the headers hash
        table.
        (_add_header): g_strdup the header name and value when adding it.

        * camel-mime-part-utils.c
        (camel_mime_part_construct_headers_from_stream): Free the header
        data after calling camel_medium_add_header, since it will have
        g_strdup()ed it itself.

svn path=/trunk/; revision=1913
2000-02-23 21:04:30 +00:00
7f04720b1e don't seek the begining of the substream. (_eos): fix eos condition
2000-02-16  bertrand  <Bertrand.Guiheneuf@aful.org>

	* camel/camel-seekable-substream.c (_set_bounds): don't
	seek the begining of the substream.
	(_eos): fix eos condition testing.
	(_finalize): unref parent stream
	(_init_with_seekable_stream_and_bounds): ref parent stream

	* camel/gstring-util.c (g_string_equal_for_hash):
	(g_string_equal_for_glist): return type is int.

	* camel/camel.h:
	* camel/camel.c (camel_init): use (void)
	instead of ().

A lot of other small changes to make the set_input_stream
scheme work. It actually works.

svn path=/trunk/; revision=1798
2000-02-16 18:04:40 +00:00
f926f10e86 this routine replaces the _read_part routine and does not store the part
2000-02-15  bertrand  <bertrand@helixcode.com>

	* camel/camel-multipart.c (_localize_part):
	this routine replaces the _read_part routine
	and does not store the part in a buffer.
	(_set_input_stream): use the set_input_stream
	instead of the construct_from_stream.
	each bodypart is given an input stream.

	* camel/camel-mime-part-utils.c:
	include the data-wrapper-repository header.
	(camel_mime_part_construct_content_from_stream):
	use the set_input_stream instead of the
	construct_from_stream method.

	* camel/camel-seekable-substream.c (_set_bounds):
	cur position is set to 0 not to inf_bound.

Sync

svn path=/trunk/; revision=1790
2000-02-16 10:44:35 +00:00
8e008e868d If we get a -1 read, DONT update the total bytes, and try and truncate the
2000-02-09  NotZed  <notzed@zedzone.helixcode.com>

	* camel/camel-mime-part-utils.c
	(camel_mime_part_store_stream_in_buffer): If we get a -1 read,
	DONT update the total bytes, and try and truncate the array in
	reverse.  Eek.

	* camel/camel-mime-part.c (camel_mime_part_encoding_from_string):
	This was DEFINETLEY not the right way to do it. strncmp!=strcmp
	(camel_mime_part_encoding_to_string): Handle the default case.
	: include string.h for strcmp() etc.

svn path=/trunk/; revision=1720
2000-02-10 02:15:02 +00:00