aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-filter-charset.c
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create tagGNOME_LIBS_1_4_1_4nobody2001-05-231-243/+0
| | | | | | 'GNOME_LIBS_1_4_1_4'. svn path=/tags/GNOME_LIBS_1_4_1_4/; revision=9929
* re-constify inbuf, to remove a warning.Not Zed2001-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2001-03-14 Not Zed <NotZed@Ximian.com> * camel-mime-filter-charset.c (filter, complete): re-constify inbuf, to remove a warning. * camel-mime-parser.c (folder_scan_step): When we're out of data, run the filter_complete. For some reason the logic that was there was never being run, always try it now, i think it was to work around a buggy filter, rather than fix it the right way. * camel-folder-summary.c (summary_build_content_info): If indexing html parts, use the html filter to convert it to some indexable format. (summary_build_content_info): Reset the filters before adding them back to the stream, if they get re-used in a given instance (likely). * Makefile.am (libcamelinclude_HEADERS): Added camel-mime-filter-html.[ch]. (INCLUDES): Added xml clags 2001-03-05 Not Zed <NotZed@Ximian.com> * camel-folder-search.c (camel_folder_search_class_init): Setup a new function, "uid" which matches uids. (search_uid): Implement the "match uid" command. svn path=/trunk/; revision=8705
* Changed this code to match the glibc iconv signature.Christopher James Lahey2001-02-151-2/+2
| | | | | | | | | | 2001-02-14 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Changed this code to match the glibc iconv signature. svn path=/trunk/; revision=8238
* Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_tJeffrey Stedfast2001-02-071-2/+2
| | | | | | | | | | 2001-02-06 Jeffrey Stedfast <fejj@ximian.com> * camel-search-private.c (utf8_get): Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_t (camel_ustrncasecmp): Same. svn path=/trunk/; revision=8026
* Made these pass char ** as the second parameter to iconv.Christopher James Lahey2001-02-071-2/+2
| | | | | | | | | | 2001-02-06 Christopher James Lahey <clahey@ximian.com> * camel-mime-filter-charset.c (complete, filter), camel-mime-utils.c (rfc2047_decode_word, rfc2047_encode_word): Made these pass char ** as the second parameter to iconv. svn path=/trunk/; revision=8022
* Use iconv instead of unicode_iconv.Dan Winship2000-11-301-14/+14
| | | | | | | * camel-mime-utils.c: * camel-mime-filter-charset.c: Use iconv instead of unicode_iconv. svn path=/trunk/; revision=6721
* Add tests.Not Zed2000-11-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Keep track of the caller bestenc flags that make sense.Not Zed2000-11-081-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2000-11-08 Not Zed <NotZed@HelixCode.com> * camel-mime-message.c (find_best_encoding): Keep track of the caller bestenc flags that make sense. * camel-mime-filter-bestenc.c (filter): Added code to detect when we have "^From " lines in the sequence of text. (camel_mime_filter_bestenc_get_best_encoding): Added a new flag CAMEL_BESTENC_NO_FROM: if set, it will not allow any lines matching "^From " to appear in the output - currently forcing base64 encoding to achieve this. * camel-mime-parser.c (folder_scan_step): Call camel_mime-filter_complete() once we're done, rather than filter_filter(). (folder_scan_content): Some fixes for state changing; so that when we do find another boundary it is properly flagged. Since we strip the last \n off all data, we must take that into account too. Sigh. Fixes a rather nasty set of bugs where multipart messages could start including following messages as parts, etc. (struct _header_scan_stack): Added new parameter, boundarylenfinal, which holds the length of the final boundary, if it is different (e.g. for From lines, whihc aren't) (folder_scan_step): Setup teh boundarylenfinal value when creating a new boundary. (folder_scan_content): Hmm, if we hit the end-of-buffer sentinal, reset the scanner back to leave 'atleast' chars in the buffer still, dump that content, and retry again. Stops us losing a check for a boundary on some data we haven't really looked at yet! (folder_scan_content): Use boundarylenfinal to calculate 'atleast'. (folder_scan_header): And here too. (folder_boundary_check): Use the atleast value directly, dont truncate it. Use the boundarylen/boundarylenfinal values directly too. (struct _header_scan_stack): Add an atleast parameter to cache the atleast info. (folder_push_part): Determine/set 'atleast', every time we add a new part. (folder_scan_header): Get the cached atleast info from the current part. (folder_scan_content): And here too. (folder_scan_header): Fix a problem where a part starting with " text" would be interpreted as a followon header wrongly. * camel-mime-filter-charset.c (complete): Add some assertions to find a bug. svn path=/trunk/; revision=6500
* Set the preface/postface from the parser into the multipart object.Not Zed2000-11-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Initialize the outbuf to be empty before calling unicode_iconv on it.Ettore Perazzoli2000-10-191-0/+3
| | | | | | This fixes a problem with duplicate message bodies on my machine. svn path=/trunk/; revision=5998
* Fixed some warnings.Christopher James Lahey2000-08-111-2/+4
| | | | | | | | | | | | | | | | 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
* Merge with camel-async.Peter Williams2000-08-111-32/+16
| | | | svn path=/trunk/; revision=4687
* MERGE NEW_PARSER branch into HEAD, fixed conflicts.NotZed2000-04-211-0/+243
2000-04-20 NotZed <NotZed@HelixCode.com> * MERGE NEW_PARSER branch into HEAD, fixed conflicts. * gmime-content-field.c (_print_parameter): Duh, removed again (@@#$@ cvs merge). * camel-mime-utils.c (header_content_type_is): Constify. (header_content_type_unref): Killed a couple warnings. * camel-folder.c (_init): Removed more log crap. * providers/Makefile.am (SUBDIRS): Removed nntp, pending fixes for summary changes. * providers/mbox/camel-mbox-folder.c (_get_message_by_number): Fixed for new summary interface. Added a warning for using this broken api. (_get_message_by_uid): Fixed for message new with session vanishing. svn path=/trunk/; revision=2531