···11+2009-03-09 12:04 +0100 Vincent Lefevre <vincent@vinc17.org> (4ce562b7f5d7)
22+33+ * mbyte.h: Unbreak compilation on OS X with --with-regex/--without-wc-
44+ funcs. Closes #3149.
55+66+2009-03-09 11:58 +0100 Rocco Rutte <pdmef@gmx.net> (f3a33b77dc90)
77+88+ * ChangeLog, mutt.h, regex.c: Unbreak compilation with --without-wc-
99+ funcs on OS X 10.5.*, see #3149.
1010+1111+2009-03-09 11:49 +0100 Rocco Rutte <pdmef@gmx.net> (bcf1e9692caf)
1212+1313+ * init.h: Fix 11cd72da743a
1414+1515+2009-03-09 11:30 +0100 Rocco Rutte <pdmef@gmx.net> (11cd72da743a)
1616+1717+ * ChangeLog, init.h: Sort SSL-related variables, see #3191.
1818+1919+2009-03-09 11:11 +0100 Rocco Rutte <pdmef@gmx.net> (a96d427b203b)
2020+2121+ * hash.c, hash.h, init.c, mh.c, thread.c: Restore $reverse_alias
2222+ feature by using case-insensitive hash keys
2323+2424+ The fix is implemented as callbacks in the hash table so we can
2525+ avoid working with copies of the mailbox keys but work on the
2626+ originals instead and don't pollute the code with lower-case
2727+ conversions all over the place.
2828+2929+ While I'm at it, turn int hashes into unsigned values since the hash
3030+ function returns unsigned values now, too.
3131+3232+ Closes #3185.
3333+3434+2009-03-07 13:49 +0100 Rocco Rutte <pdmef@gmx.net> (ff1906f70b1b)
3535+3636+ * ChangeLog, init.h: Sort most variables (except crypto), see #3191.
3737+3838+2009-03-07 12:26 +0100 Rocco Rutte <pdmef@gmx.net> (49d3d03d41c2)
3939+4040+ * doc/manual.xml.head: Fix typo, see #2430.
4141+4242+2009-02-20 22:14 +0100 Rocco Rutte <pdmef@gmx.net> (35fbea209c6e)
4343+4444+ * ChangeLog, doc/manual.xml.head: Manual: verbosely document how the
4545+ initial folder is determined, see #3189.
4646+1472009-02-20 18:27 +0100 Rocco Rutte <pdmef@gmx.net> (3f57a654639d)
248349 * doc/manual.xml.head: Document address normalization. Closes #2430.
+1-1
doc/manual.xml.head
···51785178<title>Miscellany</title>
5179517951805180<para>
51815181-This section documents various feature that fit nowhere else.
51815181+This section documents various features that fit nowhere else.
51825182</para>
5183518351845184<variablelist>
+30-8
hash.c
···11/*
22- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
22+ * Copyright (C) 1996-2009 Michael R. Elkins <me@mutt.org>
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
···2323#include <stdlib.h>
2424#include <stdio.h>
2525#include <string.h>
2626+#include <ctype.h>
26272728#include "mutt.h"
28292930#define SOMEPRIME 149711
30313131-unsigned int hash_string (const unsigned char *s, unsigned int n)
3232+static unsigned int hash_string (const unsigned char *s, unsigned int n)
3233{
3334 unsigned int h = 0;
3435···3940 return h;
4041}
41424242-HASH *hash_create (int nelem)
4343+static unsigned int hash_case_string (const unsigned char *s, unsigned int n)
4444+{
4545+ unsigned int h = 0;
4646+4747+ while (*s)
4848+ h += (h << 7) + tolower (*s++);
4949+ h = (h * SOMEPRIME) % n;
5050+5151+ return h;
5252+}
5353+5454+HASH *hash_create (int nelem, int lower)
4355{
4456 HASH *table = safe_malloc (sizeof (HASH));
4557 if (nelem == 0)
4658 nelem = 2;
4759 table->nelem = nelem;
4860 table->table = safe_calloc (nelem, sizeof (struct hash_elem *));
6161+ if (lower)
6262+ {
6363+ table->hash_string = hash_case_string;
6464+ table->cmp_string = mutt_strcasecmp;
6565+ }
6666+ else
6767+ {
6868+ table->hash_string = hash_string;
6969+ table->cmp_string = mutt_strcmp;
7070+ }
4971 return table;
5072}
5173···5779int hash_insert (HASH * table, const char *key, void *data, int allow_dup)
5880{
5981 struct hash_elem *ptr;
6060- int h;
8282+ unsigned int h;
61836284 ptr = (struct hash_elem *) safe_malloc (sizeof (struct hash_elem));
6363- h = hash_string ((unsigned char *) key, table->nelem);
8585+ h = table->hash_string ((unsigned char *) key, table->nelem);
6486 ptr->key = key;
6587 ptr->data = data;
6688···76987799 for (tmp = table->table[h], last = NULL; tmp; last = tmp, tmp = tmp->next)
78100 {
7979- r = mutt_strcmp (tmp->key, key);
101101+ r = table->cmp_string (tmp->key, key);
80102 if (r == 0)
81103 {
82104 FREE (&ptr);
···99121 struct hash_elem *ptr = table->table[hash];
100122 for (; ptr; ptr = ptr->next)
101123 {
102102- if (mutt_strcmp (key, ptr->key) == 0)
124124+ if (table->cmp_string (key, ptr->key) == 0)
103125 return (ptr->data);
104126 }
105127 return NULL;
···114136 while (ptr)
115137 {
116138 if ((data == ptr->data || !data)
117117- && mutt_strcmp (ptr->key, key) == 0)
139139+ && table->cmp_string (ptr->key, key) == 0)
118140 {
119141 *last = ptr->next;
120142 if (destroy)
+6-5
hash.h
···11/*
22- * Copyright (C) 1996-2000 Michael R. Elkins <me@mutt.org>
22+ * Copyright (C) 1996-2009 Michael R. Elkins <me@mutt.org>
33 *
44 * This program is free software; you can redistribute it and/or modify
55 * it under the terms of the GNU General Public License as published by
···3030{
3131 int nelem;
3232 struct hash_elem **table;
3333+ unsigned int (*hash_string)(const unsigned char *, unsigned int);
3434+ int (*cmp_string)(const char *, const char *);
3335}
3436HASH;
35373636-#define hash_find(table, key) hash_find_hash(table, hash_string ((unsigned char *)key, table->nelem), key)
3838+#define hash_find(table, key) hash_find_hash(table, table->hash_string ((unsigned char *)key, table->nelem), key)
37393838-#define hash_delete(table,key,data,destroy) hash_delete_hash(table, hash_string ((unsigned char *)key, table->nelem), key, data, destroy)
4040+#define hash_delete(table,key,data,destroy) hash_delete_hash(table, table->hash_string ((unsigned char *)key, table->nelem), key, data, destroy)
39414040-HASH *hash_create (int nelem);
4141-unsigned int hash_string (const unsigned char *s, unsigned int n);
4242+HASH *hash_create (int nelem, int lower);
4243int hash_insert (HASH * table, const char *key, void *data, int allow_dup);
4344void *hash_find_hash (const HASH * table, int hash, const char *key);
4445void hash_delete_hash (HASH * table, int hash, const char *key, const void *data,
···260260 ** in a reply. For a full listing of defined \fCprintf(3)\fP-like sequences see
261261 ** the section on $$index_format.
262262 */
263263+ { "auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, 0 },
264264+ /*
265265+ ** .pp
266266+ ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
267267+ ** will be applied to all tagged messages (if there are any). When
268268+ ** unset, you must first use the \fC<tag-prefix>\fP function (bound to ``;''
269269+ ** by default) to make the next function apply to all tagged messages.
270270+ */
263271 { "autoedit", DT_BOOL, R_NONE, OPTAUTOEDIT, 0 },
264272 /*
265273 ** .pp
···270278 ** editing the body of your message.
271279 ** .pp
272280 ** Also see $$fast_reply.
273273- */
274274- { "auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, 0 },
275275- /*
276276- ** .pp
277277- ** When \fIset\fP, functions in the \fIindex\fP menu which affect a message
278278- ** will be applied to all tagged messages (if there are any). When
279279- ** unset, you must first use the \fC<tag-prefix>\fP function (bound to ``;''
280280- ** by default) to make the next function apply to all tagged messages.
281281 */
282282 { "beep", DT_BOOL, R_NONE, OPTBEEP, 1 },
283283 /*
···314314 ** follow these menus. The option is \fIunset\fP by default because many
315315 ** visual terminals don't permit making the cursor invisible.
316316 */
317317- { "check_mbox_size", DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
317317+#if defined(USE_SSL)
318318+ { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
318319 /*
319320 ** .pp
320320- ** When this variable is \fIset\fP, mutt will use file size attribute instead of
321321- ** access time when checking for new mail in mbox and mmdf folders.
321321+ ** This variable specifies the file where the certificates you trust
322322+ ** are saved. When an unknown certificate is encountered, you are asked
323323+ ** if you accept it or not. If you accept it, the certificate can also
324324+ ** be saved in this file and further connections are automatically
325325+ ** accepted.
322326 ** .pp
323323- ** This variable is \fIunset\fP by default and should only be enabled when
324324- ** new mail detection for these folder types is unreliable or doesn't work.
327327+ ** You can also manually add CA certificates in this file. Any server
328328+ ** certificate that is signed with one of these CA certificates is
329329+ ** also automatically accepted.
325330 ** .pp
326326- ** Note that enabling this variable should happen before any ``$mailboxes''
327327- ** directives occur in configuration files regarding mbox or mmdf folders
328328- ** because mutt needs to determine the initial new mail status of such a
329329- ** mailbox by performing a fast mailbox scan when it is defined.
330330- ** Afterwards the new mail status is tracked by file size changes.
331331+ ** Example:
332332+ ** .ts
333333+ ** set certificate_file=~/.mutt/certificates
334334+ ** .te
335335+ **
331336 */
337337+#endif
332338 { "charset", DT_STR, R_NONE, UL &Charset, UL 0 },
333339 /*
334340 ** .pp
···341347 ** \fBNote:\fP It should only be set in case Mutt isn't abled to determine the
342348 ** character set used correctly.
343349 */
350350+ { "check_mbox_size", DT_BOOL, R_NONE, OPTCHECKMBOXSIZE, 0 },
351351+ /*
352352+ ** .pp
353353+ ** When this variable is \fIset\fP, mutt will use file size attribute instead of
354354+ ** access time when checking for new mail in mbox and mmdf folders.
355355+ ** .pp
356356+ ** This variable is \fIunset\fP by default and should only be enabled when
357357+ ** new mail detection for these folder types is unreliable or doesn't work.
358358+ ** .pp
359359+ ** Note that enabling this variable should happen before any ``$mailboxes''
360360+ ** directives occur in configuration files regarding mbox or mmdf folders
361361+ ** because mutt needs to determine the initial new mail status of such a
362362+ ** mailbox by performing a fast mailbox scan when it is defined.
363363+ ** Afterwards the new mail status is tracked by file size changes.
364364+ */
344365 { "check_new", DT_BOOL, R_NONE, OPTCHECKNEW, 1 },
345366 /*
346367 ** .pp
···359380 ** .pp
360381 ** When \fIunset\fP, Mutt will not collapse a thread if it contains any
361382 ** unread messages.
362362- */
363363- { "uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, 0 },
364364- /*
365365- ** .pp
366366- ** When \fIset\fP, Mutt will jump to the next unread message, if any,
367367- ** when the current thread is \fIun\fPcollapsed.
368383 */
369384 { "compose_format", DT_STR, R_BOTH, UL &ComposeFormat, UL "-- Mutt: Compose [Approx. msg size: %l Atts: %a]%>-" },
370385 /*
···600615 ** agents tend to do with messages (in order to prevent tools from
601616 ** misinterpreting the line as a mbox message separator).
602617 */
618618+#if defined(USE_SSL_OPENSSL)
619619+ { "entropy_file", DT_PATH, R_NONE, UL &SslEntropyFile, 0 },
620620+ /*
621621+ ** .pp
622622+ ** The file which includes random data that is used to initialize SSL
623623+ ** library functions.
624624+ */
625625+#endif
603626 { "envelope_from_address", DT_ADDR, R_NONE, UL &EnvFrom, 0 },
604627 /*
605628 ** .pp
···778801 ** of the message you are replying to into the edit buffer.
779802 ** The $$weed setting applies.
780803 */
804804+#ifdef USE_HCACHE
805805+ { "header_cache", DT_PATH, R_NONE, UL &HeaderCache, 0 },
806806+ /*
807807+ ** .pp
808808+ ** This variable points to the header cache database.
809809+ ** If pointing to a directory Mutt will contain a header cache
810810+ ** database file per folder, if pointing to a file that file will
811811+ ** be a single global header cache. By default it is \fIunset\fP so no header
812812+ ** caching will be used.
813813+ ** .pp
814814+ ** Header caching can greatly improve speed when opening POP, IMAP
815815+ ** MH or Maildir folders, see ``$caching'' for details.
816816+ */
817817+#if defined(HAVE_QDBM) || defined(HAVE_TC)
818818+ { "header_cache_compress", DT_BOOL, R_NONE, OPTHCACHECOMPRESS, 1 },
819819+ /*
820820+ ** .pp
821821+ ** When mutt is compiled with qdbm or tokyocabinet as header cache backend,
822822+ ** this option determines whether the database will be compressed.
823823+ ** Compression results in database files roughly being one fifth
824824+ ** of the usual diskspace, but the uncompression can result in a
825825+ ** slower opening of cached folder(s) which in general is still
826826+ ** much faster than opening non header cached folders.
827827+ */
828828+#endif /* HAVE_QDBM */
829829+#if defined(HAVE_GDBM) || defined(HAVE_DB4)
830830+ { "header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, UL "16384" },
831831+ /*
832832+ ** .pp
833833+ ** When mutt is compiled with either gdbm or bdb4 as the header cache backend,
834834+ ** this option changes the database page size. Too large or too small
835835+ ** values can waste space, memory, or CPU time. The default should be more
836836+ ** or less optimal for most use cases.
837837+ */
838838+#endif /* HAVE_GDBM || HAVE_DB4 */
839839+#endif /* USE_HCACHE */
781840 { "help", DT_BOOL, R_BOTH, OPTHELP, 1 },
782841 /*
783842 ** .pp
···11861245 ** DOING!\fP
11871246 */
11881247#ifdef USE_HCACHE
11891189- { "header_cache", DT_PATH, R_NONE, UL &HeaderCache, 0 },
11901190- /*
11911191- ** .pp
11921192- ** This variable points to the header cache database.
11931193- ** If pointing to a directory Mutt will contain a header cache
11941194- ** database file per folder, if pointing to a file that file will
11951195- ** be a single global header cache. By default it is \fIunset\fP so no header
11961196- ** caching will be used.
11971197- ** .pp
11981198- ** Header caching can greatly improve speed when opening POP, IMAP
11991199- ** MH or Maildir folders, see ``$caching'' for details.
12001200- */
12011248 { "maildir_header_cache_verify", DT_BOOL, R_NONE, OPTHCACHEVERIFY, 1 },
12021249 /*
12031250 ** .pp
···12061253 ** message every time the folder is opened (which can be very slow for NFS
12071254 ** folders).
12081255 */
12091209-#if defined(HAVE_GDBM) || defined(HAVE_DB4)
12101210- { "header_cache_pagesize", DT_STR, R_NONE, UL &HeaderCachePageSize, UL "16384" },
12111211- /*
12121212- ** .pp
12131213- ** When mutt is compiled with either gdbm or bdb4 as the header cache backend,
12141214- ** this option changes the database page size. Too large or too small
12151215- ** values can waste space, memory, or CPU time. The default should be more
12161216- ** or less optimal for most use cases.
12171217- */
12181218-#endif /* HAVE_GDBM || HAVE_DB4 */
12191219-#if defined(HAVE_QDBM) || defined(HAVE_TC)
12201220- { "header_cache_compress", DT_BOOL, R_NONE, OPTHCACHECOMPRESS, 1 },
12211221- /*
12221222- ** .pp
12231223- ** When mutt is compiled with qdbm or tokyocabinet as header cache backend,
12241224- ** this option determines whether the database will be compressed.
12251225- ** Compression results in database files roughly being one fifth
12261226- ** of the usual diskspace, but the uncompression can result in a
12271227- ** slower opening of cached folder(s) which in general is still
12281228- ** much faster than opening non header cached folders.
12291229- */
12301230-#endif /* HAVE_QDBM */
12311231-#endif /* USE_HCACHE */
12561256+#endif
12321257 { "maildir_trash", DT_BOOL, R_NONE, OPTMAILDIRTRASH, 0 },
12331258 /*
12341259 ** .pp
···12761301 ** ``mbox'', ``MMDF'', ``MH'' and ``Maildir''. This is overriden by the
12771302 ** \fC-m\fP command-line option.
12781303 */
12791279- { "metoo", DT_BOOL, R_NONE, OPTMETOO, 0 },
12801280- /*
12811281- ** .pp
12821282- ** If \fIunset\fP, Mutt will remove your address (see the ``$alternates''
12831283- ** command) from the list of recipients when replying to a message.
12841284- */
12851304 { "menu_context", DT_NUM, R_NONE, UL &MenuContext, 0 },
12861305 /*
12871306 ** .pp
···13031322 ** is cleared and the next or previous page of the menu is displayed
13041323 ** (useful for slow links to avoid many redraws).
13051324 */
13251325+#if defined(USE_IMAP) || defined(USE_POP)
13261326+ { "message_cache_clean", DT_BOOL, R_NONE, OPTMESSAGECACHECLEAN, 0 },
13271327+ /*
13281328+ ** .pp
13291329+ ** If \fIset\fP, mutt will clean out obsolete entries from the message cache when
13301330+ ** the mailbox is synchronized. You probably only want to set it
13311331+ ** every once in a while, since it can be a little slow
13321332+ ** (especially for large folders).
13331333+ */
13341334+ { "message_cachedir", DT_PATH, R_NONE, UL &MessageCachedir, 0 },
13351335+ /*
13361336+ ** .pp
13371337+ ** Set this to a directory and mutt will cache copies of messages from
13381338+ ** your IMAP and POP servers here. You are free to remove entries at any
13391339+ ** time.
13401340+ ** .pp
13411341+ ** When setting this variable to a directory, mutt needs to fetch every
13421342+ ** remote message only once and can perform regular expression searches
13431343+ ** as fast as for local folders.
13441344+ ** .pp
13451345+ ** Also see the $$message_cache_clean variable.
13461346+ */
13471347+#endif
13481348+ { "message_format", DT_STR, R_NONE, UL &MsgFmt, UL "%s" },
13491349+ /*
13501350+ ** .pp
13511351+ ** This is the string displayed in the ``attachment'' menu for
13521352+ ** attachments of type \fCmessage/rfc822\fP. For a full listing of defined
13531353+ ** \fCprintf(3)\fP-like sequences see the section on $$index_format.
13541354+ */
13551355+ { "msg_format", DT_SYN, R_NONE, UL "message_format", 0 },
13561356+ /*
13571357+ */
13061358 { "meta_key", DT_BOOL, R_NONE, OPTMETAKEY, 0 },
13071359 /*
13081360 ** .pp
···13131365 ** pressed Esc then ``x''. This is because the result of removing the
13141366 ** high bit from \fC0xf8\fP is \fC0x78\fP, which is the ASCII character
13151367 ** ``x''.
13681368+ */
13691369+ { "metoo", DT_BOOL, R_NONE, OPTMETOO, 0 },
13701370+ /*
13711371+ ** .pp
13721372+ ** If \fIunset\fP, Mutt will remove your address (see the ``$alternates''
13731373+ ** command) from the list of recipients when replying to a message.
13161374 */
13171375 { "mh_purge", DT_BOOL, R_NONE, OPTMHPURGE, 0 },
13181376 /*
···13981456 ** Controls whether or not Mutt will move read messages
13991457 ** from your spool mailbox to your $$mbox mailbox, or as a result of
14001458 ** a ``$mbox-hook'' command.
14011401- */
14021402-#if defined(USE_IMAP) || defined(USE_POP)
14031403- { "message_cachedir", DT_PATH, R_NONE, UL &MessageCachedir, 0 },
14041404- /*
14051405- ** .pp
14061406- ** Set this to a directory and mutt will cache copies of messages from
14071407- ** your IMAP and POP servers here. You are free to remove entries at any
14081408- ** time.
14091409- ** .pp
14101410- ** When setting this variable to a directory, mutt needs to fetch every
14111411- ** remote message only once and can perform regular expression searches
14121412- ** as fast as for local folders.
14131413- ** .pp
14141414- ** Also see the $$message_cache_clean variable.
14151415- */
14161416- { "message_cache_clean", DT_BOOL, R_NONE, OPTMESSAGECACHECLEAN, 0 },
14171417- /*
14181418- ** .pp
14191419- ** If \fIset\fP, mutt will clean out obsolete entries from the message cache when
14201420- ** the mailbox is synchronized. You probably only want to set it
14211421- ** every once in a while, since it can be a little slow
14221422- ** (especially for large folders).
14231423- */
14241424-#endif
14251425- { "message_format", DT_STR, R_NONE, UL &MsgFmt, UL "%s" },
14261426- /*
14271427- ** .pp
14281428- ** This is the string displayed in the ``attachment'' menu for
14291429- ** attachments of type \fCmessage/rfc822\fP. For a full listing of defined
14301430- ** \fCprintf(3)\fP-like sequences see the section on $$index_format.
14311431- */
14321432- { "msg_format", DT_SYN, R_NONE, UL "message_format", 0 },
14331433- /*
14341459 */
14351460 { "narrow_tree", DT_BOOL, R_TREE|R_INDEX, OPTNARROWTREE, 0 },
14361461 /*
···21232148 ** keyid (the hash-value that OpenSSL generates) to work properly
21242149 ** (S/MIME only)
21252150 */
21262126-#if defined(USE_SSL)
21272127- { "ssl_client_cert", DT_PATH, R_NONE, UL &SslClientCert, 0 },
21282128- /*
21292129- ** .pp
21302130- ** The file containing a client certificate and its associated private
21312131- ** key.
21322132- */
21332133- { "ssl_force_tls", DT_BOOL, R_NONE, OPTSSLFORCETLS, 0 },
21342134- /*
21352135- ** .pp
21362136- ** If this variable is \fIset\fP, Mutt will require that all connections
21372137- ** to remote servers be encrypted. Furthermore it will attempt to
21382138- ** negotiate TLS even if the server does not advertise the capability,
21392139- ** since it would otherwise have to abort the connection anyway. This
21402140- ** option supersedes $$ssl_starttls.
21412141- */
21422142- { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES },
21432143- /*
21442144- ** .pp
21452145- ** If \fIset\fP (the default), mutt will attempt to use \fCSTARTTLS\fP on servers
21462146- ** advertising the capability. When \fIunset\fP, mutt will not attempt to
21472147- ** use \fCSTARTTLS\fP regardless of the server's capabilities.
21482148- */
21492149- { "ssl_verify_dates", DT_BOOL, R_NONE, OPTSSLVERIFYDATES, 1 },
21512151+ { "pipe_decode", DT_BOOL, R_NONE, OPTPIPEDECODE, 0 },
21502152 /*
21512153 ** .pp
21522152- ** If \fIset\fP (the default), mutt will not automatically accept a server
21532153- ** certificate that is either not yet valid or already expired. You should
21542154- ** only unset this for particular known hosts, using the
21552155- ** \fC$<account-hook>\fP function.
21542154+ ** Used in connection with the \fC<pipe-message>\fP command. When \fIunset\fP,
21552155+ ** Mutt will pipe the messages without any preprocessing. When \fIset\fP, Mutt
21562156+ ** will weed headers and will attempt to decode the messages
21572157+ ** first.
21562158 */
21572157- { "ssl_verify_host", DT_BOOL, R_NONE, OPTSSLVERIFYHOST, 1 },
21592159+ { "pipe_sep", DT_STR, R_NONE, UL &PipeSep, UL "\n" },
21582160 /*
21592161 ** .pp
21602160- ** If \fIset\fP (the default), mutt will not automatically accept a server
21612161- ** certificate whose host name does not match the host used in your folder
21622162- ** URL. You should only unset this for particular known hosts, using
21632163- ** the \fC$<account-hook>\fP function.
21622162+ ** The separator to add between messages when piping a list of tagged
21632163+ ** messages to an external Unix command.
21642164 */
21652165- { "certificate_file", DT_PATH, R_NONE, UL &SslCertFile, UL "~/.mutt_certificates" },
21662166- /*
21672167- ** .pp
21682168- ** This variable specifies the file where the certificates you trust
21692169- ** are saved. When an unknown certificate is encountered, you are asked
21702170- ** if you accept it or not. If you accept it, the certificate can also
21712171- ** be saved in this file and further connections are automatically
21722172- ** accepted.
21732173- ** .pp
21742174- ** You can also manually add CA certificates in this file. Any server
21752175- ** certificate that is signed with one of these CA certificates is
21762176- ** also automatically accepted.
21772177- ** .pp
21782178- ** Example:
21792179- ** .ts
21802180- ** set certificate_file=~/.mutt/certificates
21812181- ** .te
21822182- */
21832183-# ifdef USE_SSL_OPENSSL
21842184- { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
21852185- /*
21862186- ** .pp
21872187- ** If set to \fIyes\fP, mutt will use CA certificates in the
21882188- ** system-wide certificate store when checking if a server certificate
21892189- ** is signed by a trusted CA.
21902190- */
21912191- { "entropy_file", DT_PATH, R_NONE, UL &SslEntropyFile, 0 },
21922192- /*
21932193- ** .pp
21942194- ** The file which includes random data that is used to initialize SSL
21952195- ** library functions.
21962196- */
21972197- { "ssl_use_sslv2", DT_BOOL, R_NONE, OPTSSLV2, 1 },
21982198- /*
21992199- ** .pp
22002200- ** This variable specifies whether to attempt to use SSLv2 in the
22012201- ** SSL authentication process.
22022202- */
22032203-# endif /* defined USE_SSL_OPENSSL */
22042204- { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 1 },
22052205- /*
22062206- ** .pp
22072207- ** This variable specifies whether to attempt to use SSLv3 in the
22082208- ** SSL authentication process.
22092209- */
22102210- { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPTTLSV1, 1 },
22112211- /*
22122212- ** .pp
22132213- ** This variable specifies whether to attempt to use TLSv1 in the
22142214- ** SSL authentication process.
22152215- */
22162216-# ifdef USE_SSL_GNUTLS
22172217- { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 },
22182218- /*
22192219- ** .pp
22202220- ** This variable specifies the minimum acceptable prime size (in bits)
22212221- ** for use in any Diffie-Hellman key exchange. A value of 0 will use
22222222- ** the default from the GNUTLS library.
22232223- */
22242224- { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
22252225- /*
22262226- ** .pp
22272227- ** This variable specifies a file containing trusted CA certificates.
22282228- ** Any server certificate that is signed with one of these CA
22292229- ** certificates is also automatically accepted.
22302230- ** .pp
22312231- ** Example:
22322232- ** .ts
22332233- ** set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
22342234- ** .te
22352235- */
22362236-# endif /* USE_SSL_GNUTLS */
22372237-#endif /* defined(USE_SSL) */
22382165 { "pipe_split", DT_BOOL, R_NONE, OPTPIPESPLIT, 0 },
22392166 /*
22402167 ** .pp
···22452172 ** In both cases the messages are piped in the current sorted order,
22462173 ** and the $$pipe_sep separator is added after each message.
22472174 */
22482248- { "pipe_decode", DT_BOOL, R_NONE, OPTPIPEDECODE, 0 },
22492249- /*
22502250- ** .pp
22512251- ** Used in connection with the \fC<pipe-message>\fP command. When \fIunset\fP,
22522252- ** Mutt will pipe the messages without any preprocessing. When \fIset\fP, Mutt
22532253- ** will weed headers and will attempt to decode the messages
22542254- ** first.
22552255- */
22562256- { "pipe_sep", DT_STR, R_NONE, UL &PipeSep, UL "\n" },
21752175+#ifdef USE_POP
21762176+ { "pop_auth_try_all", DT_BOOL, R_NONE, OPTPOPAUTHTRYALL, 1 },
22572177 /*
22582178 ** .pp
22592259- ** The separator to add between messages when piping a list of tagged
22602260- ** messages to an external Unix command.
21792179+ ** If \fIset\fP, Mutt will try all available authentication methods.
21802180+ ** When \fIunset\fP, Mutt will only fall back to other authentication
21812181+ ** methods if the previous methods are unavailable. If a method is
21822182+ ** available but authentication fails, Mutt will not connect to the POP server.
22612183 */
22622262-#ifdef USE_POP
22632184 { "pop_authenticators", DT_STR, R_NONE, UL &PopAuthenticators, UL 0 },
22642185 /*
22652186 ** .pp
···22752196 ** .ts
22762197 ** set pop_authenticators="digest-md5:apop:user"
22772198 ** .te
22782278- */
22792279- { "pop_auth_try_all", DT_BOOL, R_NONE, OPTPOPAUTHTRYALL, 1 },
22802280- /*
22812281- ** .pp
22822282- ** If \fIset\fP, Mutt will try all available authentication methods.
22832283- ** When \fIunset\fP, Mutt will only fall back to other authentication
22842284- ** methods if the previous methods are unavailable. If a method is
22852285- ** available but authentication fails, Mutt will not connect to the POP server.
22862199 */
22872200 { "pop_checkinterval", DT_NUM, R_NONE, UL &PopCheckTimeout, 60 },
22882201 /*
···23152228 ** for retrieving only unread messages from the POP server when using
23162229 ** the \fC$<fetch-mail>\fP function.
23172230 */
22312231+ { "pop_pass", DT_STR, R_NONE, UL &PopPass, UL "" },
22322232+ /*
22332233+ ** .pp
22342234+ ** Specifies the password for your POP account. If \fIunset\fP, Mutt will
22352235+ ** prompt you for your password when you open a POP mailbox.
22362236+ ** .pp
22372237+ ** \fBWarning\fP: you should only use this option when you are on a
22382238+ ** fairly secure machine, because the superuser can read your muttrc
22392239+ ** even if you are the only one who can read the file.
22402240+ */
23182241 { "pop_reconnect", DT_QUAD, R_NONE, OPT_POPRECONNECT, M_ASKYES },
23192242 /*
23202243 ** .pp
···23272250 ** Your login name on the POP server.
23282251 ** .pp
23292252 ** This variable defaults to your user name on the local machine.
23302330- */
23312331- { "pop_pass", DT_STR, R_NONE, UL &PopPass, UL "" },
23322332- /*
23332333- ** .pp
23342334- ** Specifies the password for your POP account. If \fIunset\fP, Mutt will
23352335- ** prompt you for your password when you open a POP mailbox.
23362336- ** .pp
23372337- ** \fBWarning\fP: you should only use this option when you are on a
23382338- ** fairly secure machine, because the superuser can read your muttrc
23392339- ** even if you are the only one who can read the file.
23402253 */
23412254#endif /* USE_POP */
23422255 { "post_indent_string",DT_STR, R_NONE, UL &PostIndentString, UL "" },
···27802693 ** replacing ``%s'' with the supplied string.
27812694 ** For the default value, ``joe'' would be expanded to: ``~f joe | ~s joe''.
27822695 */
26962696+ { "sleep_time", DT_NUM, R_NONE, UL &SleepTime, 1 },
26972697+ /*
26982698+ ** .pp
26992699+ ** Specifies time, in seconds, to pause while displaying certain informational
27002700+ ** messages, while moving from folder to folder and after expunging
27012701+ ** messages from the current folder. The default is to pause one second, so
27022702+ ** a value of zero for this option suppresses the pause.
27032703+ */
27832704 { "smart_wrap", DT_BOOL, R_PAGER, OPTWRAP, 1 },
27842705 /*
27852706 ** .pp
···27962717 ** a line quoted text if it also matches $$smileys. This mostly
27972718 ** happens at the beginning of a line.
27982719 */
27992799- { "sleep_time", DT_NUM, R_NONE, UL &SleepTime, 1 },
28002800- /*
28012801- ** .pp
28022802- ** Specifies time, in seconds, to pause while displaying certain informational
28032803- ** messages, while moving from folder to folder and after expunging
28042804- ** messages from the current folder. The default is to pause one second, so
28052805- ** a value of zero for this option suppresses the pause.
28062806- */
28072720#ifdef USE_SMTP
28082721# ifdef USE_SASL
28092722 { "smtp_authenticators", DT_STR, R_NONE, UL &SmtpAuthenticators, UL 0 },
···29472860 ** initially set this variable to the value of the environment
29482861 ** variable \fC$$$MAIL\fP or \fC$$$MAILDIR\fP if either is defined.
29492862 */
28632863+#if defined(USE_SSL)
28642864+#ifdef USE_SSL_GNUTLS
28652865+ { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
28662866+ /*
28672867+ ** .pp
28682868+ ** This variable specifies a file containing trusted CA certificates.
28692869+ ** Any server certificate that is signed with one of these CA
28702870+ ** certificates is also automatically accepted.
28712871+ ** .pp
28722872+ ** Example:
28732873+ ** .ts
28742874+ ** set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
28752875+ ** .te
28762876+ */
28772877+#endif /* USE_SSL_GNUTLS */
28782878+ { "ssl_client_cert", DT_PATH, R_NONE, UL &SslClientCert, 0 },
28792879+ /*
28802880+ ** .pp
28812881+ ** The file containing a client certificate and its associated private
28822882+ ** key.
28832883+ */
28842884+ { "ssl_force_tls", DT_BOOL, R_NONE, OPTSSLFORCETLS, 0 },
28852885+ /*
28862886+ ** .pp
28872887+ ** If this variable is \fIset\fP, Mutt will require that all connections
28882888+ ** to remote servers be encrypted. Furthermore it will attempt to
28892889+ ** negotiate TLS even if the server does not advertise the capability,
28902890+ ** since it would otherwise have to abort the connection anyway. This
28912891+ ** option supersedes $$ssl_starttls.
28922892+ */
28932893+# ifdef USE_SSL_GNUTLS
28942894+ { "ssl_min_dh_prime_bits", DT_NUM, R_NONE, UL &SslDHPrimeBits, 0 },
28952895+ /*
28962896+ ** .pp
28972897+ ** This variable specifies the minimum acceptable prime size (in bits)
28982898+ ** for use in any Diffie-Hellman key exchange. A value of 0 will use
28992899+ ** the default from the GNUTLS library.
29002900+ */
29012901+# endif /* USE_SSL_GNUTLS */
29022902+ { "ssl_starttls", DT_QUAD, R_NONE, OPT_SSLSTARTTLS, M_YES },
29032903+ /*
29042904+ ** .pp
29052905+ ** If \fIset\fP (the default), mutt will attempt to use \fCSTARTTLS\fP on servers
29062906+ ** advertising the capability. When \fIunset\fP, mutt will not attempt to
29072907+ ** use \fCSTARTTLS\fP regardless of the server's capabilities.
29082908+ */
29092909+# ifdef USE_SSL_OPENSSL
29102910+ { "ssl_use_sslv2", DT_BOOL, R_NONE, OPTSSLV2, 1 },
29112911+ /*
29122912+ ** .pp
29132913+ ** This variable specifies whether to attempt to use SSLv2 in the
29142914+ ** SSL authentication process.
29152915+ */
29162916+# endif /* defined USE_SSL_OPENSSL */
29172917+ { "ssl_use_sslv3", DT_BOOL, R_NONE, OPTSSLV3, 1 },
29182918+ /*
29192919+ ** .pp
29202920+ ** This variable specifies whether to attempt to use SSLv3 in the
29212921+ ** SSL authentication process.
29222922+ */
29232923+ { "ssl_use_tlsv1", DT_BOOL, R_NONE, OPTTLSV1, 1 },
29242924+ /*
29252925+ ** .pp
29262926+ ** This variable specifies whether to attempt to use TLSv1 in the
29272927+ ** SSL authentication process.
29282928+ */
29292929+#ifdef USE_SSL_OPENSSL
29302930+ { "ssl_usesystemcerts", DT_BOOL, R_NONE, OPTSSLSYSTEMCERTS, 1 },
29312931+ /*
29322932+ ** .pp
29332933+ ** If set to \fIyes\fP, mutt will use CA certificates in the
29342934+ ** system-wide certificate store when checking if a server certificate
29352935+ ** is signed by a trusted CA.
29362936+ */
29372937+#endif
29382938+ { "ssl_verify_dates", DT_BOOL, R_NONE, OPTSSLVERIFYDATES, 1 },
29392939+ /*
29402940+ ** .pp
29412941+ ** If \fIset\fP (the default), mutt will not automatically accept a server
29422942+ ** certificate that is either not yet valid or already expired. You should
29432943+ ** only unset this for particular known hosts, using the
29442944+ ** \fC$<account-hook>\fP function.
29452945+ */
29462946+ { "ssl_verify_host", DT_BOOL, R_NONE, OPTSSLVERIFYHOST, 1 },
29472947+ /*
29482948+ ** .pp
29492949+ ** If \fIset\fP (the default), mutt will not automatically accept a server
29502950+ ** certificate whose host name does not match the host used in your folder
29512951+ ** URL. You should only unset this for particular known hosts, using
29522952+ ** the \fC$<account-hook>\fP function.
29532953+ */
29542954+#endif /* defined(USE_SSL) */
29502955 { "status_chars", DT_STR, R_BOTH, UL &StChars, UL "-*%A" },
29512956 /*
29522957 ** .pp
···30713076 ** .pp
30723077 ** Note that $$indent_string is ignored when this option is \fIset\fP.
30733078 */
30743074- { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTTHREADRECEIVED, 0 },
30753075- /*
30763076- ** .pp
30773077- ** When \fIset\fP, mutt uses the date received rather than the date sent
30783078- ** to thread messages by subject.
30793079- */
30803079 { "thorough_search", DT_BOOL, R_NONE, OPTTHOROUGHSRC, 0 },
30813080 /*
30823081 ** .pp
···30903089 ** character set conversions. Otherwise mutt will attempt to match against the
30913090 ** raw message received (for example quoted-printable encoded or with encoded
30923091 ** headers) which may lead to incorrect search results.
30923092+ */
30933093+ { "thread_received", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTTHREADRECEIVED, 0 },
30943094+ /*
30953095+ ** .pp
30963096+ ** When \fIset\fP, mutt uses the date received rather than the date sent
30973097+ ** to thread messages by subject.
30933098 */
30943099 { "tilde", DT_BOOL, R_PAGER, OPTTILDE, 0 },
30953100 /*
···31603165 ** machine without having to enter a password.
31613166 */
31623167#endif
31683168+ { "uncollapse_jump", DT_BOOL, R_NONE, OPTUNCOLLAPSEJUMP, 0 },
31693169+ /*
31703170+ ** .pp
31713171+ ** When \fIset\fP, Mutt will jump to the next unread message, if any,
31723172+ ** when the current thread is \fIun\fPcollapsed.
31733173+ */
31633174 { "use_8bitmime", DT_BOOL, R_NONE, OPTUSE8BITMIME, 0 },
31643175 /*
31653176 ** .pp
···32733284 ** .pp
32743285 ** (DEPRECATED) Equivalent to setting $$wrap with a negative value.
32753286 */
32873287+ { "write_bcc", DT_BOOL, R_NONE, OPTWRITEBCC, 1},
32883288+ /*
32893289+ ** .pp
32903290+ ** Controls whether mutt writes out the ``Bcc:'' header when preparing
32913291+ ** messages to be sent. Exim users may wish to unset this. If mutt
32923292+ ** is set to deliver directly via SMTP (see $$smtp_url), this
32933293+ ** option does nothing: mutt will never write out the ``Bcc:'' header
32943294+ ** in this case.
32953295+ */
32763296 { "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 },
32773297 /*
32783298 ** .pp
···32823302 ** .pp
32833303 ** Also see the $$read_inc, $$net_inc and $$time_inc variables and the
32843304 ** ``$tuning'' section of the manual for performance considerations.
32853285- */
32863286- { "write_bcc", DT_BOOL, R_NONE, OPTWRITEBCC, 1},
32873287- /*
32883288- ** .pp
32893289- ** Controls whether mutt writes out the ``Bcc:'' header when preparing
32903290- ** messages to be sent. Exim users may wish to unset this. If mutt
32913291- ** is set to deliver directly via SMTP (see $$smtp_url), this
32923292- ** option does nothing: mutt will never write out the ``Bcc:'' header
32933293- ** in this case.
32943305 */
32953306 /*--*/
32963307 { NULL }
···12421242 omask = umask (mh_umask (dest));
12431243 FOREVER
12441244 {
12451245- snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s",
12461246- dest->path, subdir, time (NULL), (unsigned int)getpid (),
12451245+ snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%lld.%u_%d.%s%s",
12461246+ dest->path, subdir, (long long)time (NULL), (unsigned int)getpid (),
12471247 Counter++, NONULL (Hostname), suffix);
1248124812491249 dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
···13281328 /* construct a new file name. */
13291329 FOREVER
13301330 {
13311331- snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir,
13321332- time (NULL), (unsigned int)getpid (), Counter++,
13311331+ snprintf (path, _POSIX_PATH_MAX, "%s/%lld.%u_%d.%s%s", subdir,
13321332+ (long long)time (NULL), (unsigned int)getpid (), Counter++,
13331333 NONULL (Hostname), suffix);
13341334 snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path);
13351335···18701870 * of each message we scanned. This is used in the loop over the
18711871 * existing messages below to do some correlation.
18721872 */
18731873- fnames = hash_create (1031);
18731873+ fnames = hash_create (1031, 0);
1874187418751875 for (p = md; p; p = p->next)
18761876 {
···20192019 mhs_free_sequences (&mhs);
2020202020212021 /* check for modifications and adjust flags */
20222022- fnames = hash_create (1031);
20222022+ fnames = hash_create (1031, 0);
2023202320242024 for (p = md; p; p = p->next)
20252025 hash_insert (fnames, p->h->path, p, 0);
+6
mutt.h
···3535#include <limits.h>
3636#include <stdarg.h>
3737#include <signal.h>
3838+/* On OS X 10.5.x, wide char functions are inlined by default breaking
3939+ * --without-wc-funcs compilation
4040+ */
4141+#ifdef __APPLE_CC__
4242+#define _DONT_USE_CTYPE_INLINE_
4343+#endif
3844#ifdef HAVE_WCHAR_H
3945# include <wchar.h>
4046#endif
+11-2
regex.c
···56565757#undef DEBUG
58585959+/* On OS X 10.5.x, wide char functions are inlined by default breaking
6060+ * --without-wc-funcs compilation
6161+ */
6262+#ifdef __APPLE_CC__
6363+#define _DONT_USE_CTYPE_INLINE_
6464+#endif
6565+5966#if (defined(HAVE_ALLOCA_H) && !defined(_AIX))
6067# include <alloca.h>
6168#endif
···73807481/* For platform which support the ISO C amendement 1 functionality we
7582 support user defined character classes. */
7676-#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H)
7777-# include <wctype.h>
8383+#ifdef HAVE_WCHAR_H
7884# include <wchar.h>
8585+#endif
8686+#if defined(HAVE_WCTYPE_H) && defined(HAVE_WC_FUNCS)
8787+# include <wctype.h>
7988#endif
80898190/* This is for other GNU distributions with internationalized messages. */
+6-6
thread.c
···416416{
417417 struct hash_elem *ptr;
418418 THREAD *tmp, *last = NULL;
419419- int hash;
419419+ unsigned int hash;
420420 LIST *subjects = NULL, *oldlist;
421421 time_t date = 0;
422422···424424425425 while (subjects)
426426 {
427427- hash = hash_string ((unsigned char *) subjects->data,
428428- ctx->subj_hash->nelem);
427427+ hash = ctx->subj_hash->hash_string ((unsigned char *) subjects->data,
428428+ ctx->subj_hash->nelem);
429429 for (ptr = ctx->subj_hash->table[hash]; ptr; ptr = ptr->next)
430430 {
431431 tmp = ((HEADER *) ptr->data)->thread;
···766766 init = 1;
767767768768 if (init)
769769- ctx->thread_hash = hash_create (ctx->msgcount * 2);
769769+ ctx->thread_hash = hash_create (ctx->msgcount * 2, 0);
770770771771 /* we want a quick way to see if things are actually attached to the top of the
772772 * thread tree or if they're just dangling, so we attach everything to a top
···13191319 HEADER *hdr;
13201320 HASH *hash;
1321132113221322- hash = hash_create (ctx->msgcount * 2);
13221322+ hash = hash_create (ctx->msgcount * 2, 0);
1323132313241324 for (i = 0; i < ctx->msgcount; i++)
13251325 {
···13371337 HEADER *hdr;
13381338 HASH *hash;
1339133913401340- hash = hash_create (ctx->msgcount * 2);
13401340+ hash = hash_create (ctx->msgcount * 2, 0);
1341134113421342 for (i = 0; i < ctx->msgcount; i++)
13431343 {