Commit Graph

23 Commits

Author SHA1 Message Date
7ac88d8631 Use the FOLD_SIZE as a recommended folding size, but add a new
2002-02-28  Not Zed  <NotZed@Ximian.com>

        * camel-mime-utils.c (header_fold): Use the FOLD_SIZE as a
        recommended folding size, but add a new FOLD_MAX_SIZE (=998, the
        smtp max line size) as the hard limit for any output.

svn path=/trunk/; revision=15866
2002-02-28 01:09:05 +00:00
42606efd98 More fixing of the license texts.
svn path=/trunk/; revision=14216
2001-10-27 18:06:04 +00:00
5
5b449d9ca7 Remove the stupid warning that should never have been there in the first
2001-10-25    <NotZed@Ximian.com>

        * camel-search-private.c (utf8_get): Remove the stupid warning
        that should never have been there in the first place.

        * camel-sasl-digest-md5.c (digest_response): s/iconv/e_iconv/

        * camel-pgp-context.c (pgp_verify): "

        * camel-mime-utils.c (rfc2047_decode_word, rfc2047_decode_word,
        append_8bit, rfc2047_encode_word, rfc2184_decode,
        header_decode_param): "

        * camel-mime-part-utils.c (convert_buffer, convert_buffer): "

        * camel-mime-filter-charset.c (reset, complete, filter): "

svn path=/trunk/; revision=14113
2001-10-26 00:37:52 +00:00
7429141682 Use search_type_mlist for mailing list searches.
* camel-filter-search.c, camel-folder-search.c (check_header): Use
	search_type_mlist for mailing list searches.

	* camel.c (camel_init): call camel-mime-utils-init func.

	* camel-mime-utils.c: Changed mail mail_list_magic to include a
	domain part, also pre-compile all the patterns.  They are all
	backward compatible except List-Id: which now uses the
	mail-address-like <list-name.host.name> part rather than the
	plain-text part (which might've been blank anyway).
	(camel_mime_utils_init): Initialisation function to setup any
	static data required by camel-mime-utils at run-time.  We now
	setup the base64/charset class tables here, so it doesn't need to
	be done statically.
	(camel_mime_special_table, camel_mime_base64_rank): No longer
	statically initialise these.
	(main): Removed + the tests at the end of the file.
	(header_raw_check_mailing_list): Dont compile regex's here,
	already compiled in utils_init.  Use the regex patterns to remove
	leading <'s from addresses.  Also, if there is a domain part
	matched, add that after a '@' is added.

	camel-search-private.c:
	(camel_search_header_match): Added SEARCH_TYPE_MLIST for mlist
	search types.  It ignores the domain part if either (but not both)
	of the values dont have it.

svn path=/trunk/; revision=13894
2001-10-22 21:08:05 +00:00
42d022008a (camel_search_header_match): Oops, missing i=0.
svn path=/trunk/; revision=13891
2001-10-22 19:12:06 +00:00
2
0787edd7b8 Match check against all addresses in a multiple address match. Should fix
2001-10-22    <NotZed@Ximian.com>

        * camel-search-private.c (camel_search_header_match): Match check
        against all addresses in a multiple address match.  Should fix
        #13051.

svn path=/trunk/; revision=13885
2001-10-22 18:29:01 +00:00
3
1ecc7068f5 Added MATCH_NEWLINE flag, -> REG_NEWLINE.
2001-10-03    <NotZed@Ximian.com>

	* camel-search-private.c (camel_search_build_match_regex): Added
	MATCH_NEWLINE flag, -> REG_NEWLINE.

	* camel-lock-helper.c: Include <string.h> to kill some warnings.

	* camel-filter-search.c (get_full_header): Put \n's between each
	line we generate.
	(header_full_regex): Dont drop the first argument to the command
	-> empty matches!
	(header_full_regex): Set match_newline for building regex.
	(body_regex): And here too.  These all fix #9877.

svn path=/trunk/; revision=13392
2001-10-03 22:17:10 +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
dd1fd6f7f6 check for NULL name and addr (fixes a bug i was about to report)
2001-08-08  jacob berkman  <jacob@ximian.com>

	* camel-search-private.c (camel_search_header_match): check for
	NULL name and addr (fixes a bug i was about to report)

svn path=/trunk/; revision=11786
2001-08-08 14:34:33 +00:00
5dfe756f5f Properly determine match type to pass to header_match.
2001-08-08  Not Zed  <NotZed@Ximian.com>

        * camel-filter-search.c (check_header): Properly determine match
        type to pass to header_match.
        (address_matches_exactly): Removed, effectively added to
        camel_search_header_match.

        * camel-folder-search.c (check_header): Properly determine the
        match type to pass to header_match.

        * camel-search-private.c (camel_search_header_match): Add a new
        parameter 'type' which is the type of header we're matching
        against.  ASIS means utf8 format, ADDRESS means an internet
        address ('formatted'), ADDRESS_ENCODED means a raw address header,
        ENCODED means rfc 2047 encoded text.
        (header_match): Move original logic here, have search_header_match
        call it as appropriate for the 'type' of match.

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

        * camel-session.c (camel_session_class_init): Only init the vee
        provider struct once (if we're subclassed this will get called
        multiple times).

        * camel-object.c (obj_finalize): Removed a bit of a debug that
        crept in with jacob's poolv patch (?).

svn path=/trunk/; revision=11772
2001-08-08 09:37:40 +00:00
a039733f70 New function to do danw's address "is" comparison (as specified in bug
2001-08-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-filter-search.c (address_matches_exactly): New function to
	do danw's address "is" comparison (as specified in bug #5886.
	(check_header): Special-case address-type headers when we are
	doing an exact match to use the address_matches_exactly function.

svn path=/trunk/; revision=11738
2001-08-07 19:55:34 +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
05817ac122 Replicate the semantics of the libunicode utf8 functions by returning NULL
2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * camel-search-private.c (utf8_get): Replicate the semantics of
        the libunicode utf8 functions by returning NULL in the arg
        on invalid utf8.

        * camel-pgp-context.c (pgp_verify): Check for valid utf8,
        terminate loop if something looks wrong.

        * camel-mime-utils.c (header_encode_phrase_get_words): Properly
        check for invalid utf8.
        (header_encode_string): Properly check for invalid utf8.

        * camel-charset-map.c (camel_charset_step): Properly check for
        invalid utf8.

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (is_citation): Check for bad utf8.

svn path=/trunk/; revision=9798
2001-05-14 21:04:35 +00:00
18af050c05 Remove UNICODE_CFLAGS (and some other stuff that's redundant with
* Makefile.am (INCLUDES): Remove UNICODE_CFLAGS (and some other
	stuff that's redundant with EXTRA_GNOME_CFLAGS)
	(libcamel_la_LIBADD): Replace UNICODE_LIBS with GAL_LIBS.

	* camel-search-private.c:
	* camel-pgp-context.c:
	* camel-mime-utils.c: Use gunicode interfaces rather than
	libunicode.

	* camel-charset-map.c: Use gunicode rather than libunicode. (The
	charmap-regen code still depends on libunicode though.)

	* camel-mime-filter-charset.h:
	* tests/message/test2.c (convert): Use iconv rather than
	unicode_iconv.

	* providers/smtp/Makefile.am (libcamelsmtp_la_LIBADD):
	* providers/pop3/Makefile.am (libcamelpop3_la_LIBADD):
	* providers/local/Makefile.am (libcamellocal_la_LIBADD): Remove
	UNICODE_LIBS.

	* camel.c (camel_init): Remove call to unicode_init.

	* camel-mime-parser.c: Remove unused unicode.h include.

svn path=/trunk/; revision=9585
2001-04-26 18:21:32 +00:00
fe962a2055 Big header cleanups and nntp compile fix
svn path=/trunk/; revision=9024
2001-03-29 20:31:40 +00:00
90dabbdb22 Reconstify variables to match iconv.
2001-03-02  Not Zed  <NotZed@Ximian.com>

        * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word):
        Reconstify variables to match iconv.

        * camel-search-private.c (camel_ustrstrcase): Change some
        assertions back into valid returns.

svn path=/trunk/; revision=8452
2001-03-01 17:31:33 +00:00
c13a70e866 Doh, cut and paste problem, use mlist not cc.
* camel-folder-summary.c (camel_message_info_new_from_header):
	Doh, cut and paste problem, use mlist not cc.

	* camel-folder.c (move_message_to):
	(copy_message_to): If the source folder doesn't support a
	summary, dont try and get the message info from it.

svn path=/trunk/; revision=8361
2001-02-23 01:40:46 +00:00
fa272d3dc9 Macro for making comparisons easy. (camel_ustrcasecmp): Use
2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
	comparisons easy.
	(camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
	end-of-string before the utf-8 error check.
	(camel_ustrncasecmp): Same.
	(camel_search_header_match): Strip leading spaces before doing
	anything else. Also use vlen and mlen so as to not need to do 500
	strlen()'s.
	(camel_ustrcasecmp): Don't get_utf8() for the 2 strings in the
	comparison part of the loop because of short-circuit expression
	evaluation. (blame JPR if this is the wrong term!)
	(camel_ustrncasecmp): Same.

svn path=/trunk/; revision=8057
2001-02-07 21:27:11 +00:00
187d85dbf8 Macro for making comparisons easy. (camel_ustrcasecmp): Use
2001-02-07  Jeffrey Stedfast  <fejj@ximian.com>

	* camel-search-private.c (CAMEL_SEARCH_COMPARE): Macro for making
	comparisons easy.
	(camel_ustrcasecmp): Use CAMEL_SEARCH_COMPARE and check for
	end-of-string before the utf-8 error check.
	(camel_ustrncasecmp): Same.
	(camel_search_header_match): Strip leading spaces before doing
	anything else. Also use vlen and mlen so as to not need to do 500
	strlen()'s.

svn path=/trunk/; revision=8055
2001-02-07 19:36:46 +00:00
7c6a688ab9 Rewrote using unicode_get_utf8(). (camel_ustrcasecmp): Use unicode_char_t
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
2001-02-06 21:50:37 +00:00
b8af62e803 Removed unwanted header. It was never put in for a reason. Stop fixing
2001-02-06  Not Zed  <NotZed@Ximian.com>

        * camel-search-private.c: Removed unwanted header.  It was never
        put in for a reason.  Stop fixing irrelevant warnings.

        (camel_ustrstrcase): Our own strstrcase impl for utf8 strings.
        (camel_ustrcasecmp): Ditto for strcasecmp.
        (camel_ustrncasecmp): And strncasecmp.
        (utf8_get): Simpler interface to utf8 string processing.
        (camel_search_header_match): Use the new things.

2001-02-05  Not Zed  <NotZed@Ximian.com>

        * camel-folder.c (get_summary): Removed some old variables/a small
        memleak.
        (free_summary): Removed old variables.

        * camel-mime-utils.c (header_raw_check_mailing_list): New utility
        function to get the mailing list (if any) that a set of headers
        came from.

svn path=/trunk/; revision=8008
2001-02-06 02:38:19 +00:00
19daa2bae2 Added a missing #include.
2001-02-05  Christopher James Lahey  <clahey@helixcode.com>

	* camel-stream-fs.c: Added a missing #include.

	* camel-search-private.c: Added a missing #include.

svn path=/trunk/; revision=7999
2001-02-05 22:37:24 +00:00
46e42dcf44 Oops.
svn path=/trunk/; revision=7801
2001-01-25 05:10:59 +00:00