├── .gitignore ├── .hgignore ├── .hgsigs ├── .hgtags ├── ABOUT-NLS ├── BEWARE ├── COPYRIGHT ├── ChangeLog ├── GPL ├── INSTALL ├── Makefile.am ├── NEWS ├── OPS ├── OPS.CRYPT ├── OPS.MIX ├── OPS.NOTMUCH ├── OPS.PGP ├── OPS.SIDEBAR ├── OPS.SMIME ├── PATCHES ├── README ├── README.SECURITY ├── README.SSL ├── README.cond-date ├── README.index-color ├── README.nested-if ├── README.notmuch ├── README.progress ├── README.quasi-delete ├── README.sidebar ├── README.status-color ├── README.tls-sni ├── TODO ├── UPDATING ├── UPDATING.kz ├── VERSION ├── VERSION.kz ├── _regex.h ├── account.c ├── account.h ├── addrbook.c ├── alias.c ├── ascii.c ├── ascii.h ├── attach.c ├── attach.h ├── base64.c ├── bcache.c ├── bcache.h ├── browser.c ├── browser.h ├── buffy.c ├── buffy.h ├── build-release ├── charset.c ├── charset.h ├── check_sec.sh ├── color.c ├── commands.c ├── complete.c ├── compose.c ├── configure.ac ├── contrib ├── Makefile.am ├── Mush.rc ├── Pine.rc ├── Tin.rc ├── ca-bundle.crt ├── colors.default ├── colors.linux ├── gpg.rc ├── iconv │ ├── README │ ├── iconv.aix-3.2.5.rc │ ├── iconv.aix-4.1.5.rc │ ├── iconv.aix-4.2.0.rc │ ├── iconv.aix-4.3.2.rc │ ├── iconv.freebsd-3.3.rc │ ├── iconv.glibc-2.1.3.rc │ ├── iconv.glibc-2.1.90.rc │ ├── iconv.hpux-10.01.rc │ ├── iconv.hpux-10.20.rc │ ├── iconv.hpux-11.00.rc │ ├── iconv.irix-6.5.rc │ ├── iconv.osf1-4.0a.rc │ ├── iconv.osf1-4.0d.rc │ ├── iconv.solaris-2.4.rc │ ├── iconv.solaris-2.5.1.rc │ ├── iconv.solaris-2.6-cjk.rc │ ├── iconv.solaris-2.6.rc │ ├── iconv.solaris-2.7.rc │ └── make.sh ├── language.txt ├── language50.txt ├── mutt_xtitle ├── patch.slang-1.2.2.keypad.1 ├── pgp2.rc ├── pgp5.rc ├── pgp6.rc ├── sample.mailcap ├── sample.muttrc ├── sample.muttrc-tlr ├── smime.rc └── smime_keys_test.pl ├── copy.c ├── copy.h ├── crypt-gpgme.c ├── crypt-gpgme.h ├── crypt-mod-pgp-classic.c ├── crypt-mod-pgp-gpgme.c ├── crypt-mod-smime-classic.c ├── crypt-mod-smime-gpgme.c ├── crypt-mod.c ├── crypt-mod.h ├── crypt.c ├── cryptglue.c ├── crypthash.h ├── curs_lib.c ├── curs_main.c ├── date.c ├── doc ├── Makefile.am ├── Muttrc.head ├── PGP-Notes.txt ├── TODO ├── applying-patches.txt ├── chunk.xsl ├── devel-notes.txt ├── dotlock.man ├── gen-map-doc ├── html.xsl ├── instdoc.sh.in ├── makedoc-defs.h ├── makedoc.c ├── manual.xml.head ├── manual.xml.tail ├── mbox.man ├── mmdf.man ├── mutt.css ├── mutt.man ├── mutt.pwl ├── mutt.xsl ├── muttbug.man ├── muttrc.cond-date ├── muttrc.index-color ├── muttrc.man.head ├── muttrc.man.tail ├── muttrc.nested-if ├── muttrc.progress ├── muttrc.quasi-delete ├── muttrc.sidebar ├── muttrc.status-color ├── muttrc.tls-sni ├── patch-notes.txt ├── pgpewrap.man ├── pgpring.man ├── smime-notes.txt ├── smime_keys.man ├── vimrc.index-color ├── vimrc.progress ├── vimrc.quasi-delete └── vimrc.sidebar ├── dotlock.c ├── dotlock.h ├── edit.c ├── editmsg.c ├── enter.c ├── extlib.c ├── filter.c ├── flags.c ├── flymake.am ├── from.c ├── functions.h ├── gen_defs ├── getdomain.c ├── globals.h ├── gnupgparse.c ├── group.c ├── group.h ├── handler.c ├── hash.c ├── hash.h ├── hcache.c ├── hcache.h ├── hcachever.sh.in ├── hdrline.c ├── headers.c ├── help.c ├── hg-changelog-map ├── hg-commit ├── history.c ├── history.h ├── hook.c ├── imap ├── Makefile.am ├── README ├── TODO ├── auth.c ├── auth.h ├── auth_anon.c ├── auth_cram.c ├── auth_gss.c ├── auth_login.c ├── auth_sasl.c ├── browse.c ├── command.c ├── imap.c ├── imap.h ├── imap_private.h ├── message.c ├── message.h ├── utf7.c └── util.c ├── init.c ├── init.h ├── intl ├── COPYING.LIB-2 ├── COPYING.LIB-2.1 ├── ChangeLog ├── Makefile.in ├── VERSION ├── bindtextdom.c ├── cat-compat.c ├── config.charset ├── dcgettext.c ├── dcigettext.c ├── dcngettext.c ├── dgettext.c ├── dngettext.c ├── explodename.c ├── finddomain.c ├── gettext.c ├── gettext.h ├── gettextP.h ├── hash-string.h ├── intl-compat.c ├── l10nflist.c ├── libgettext.h ├── libgnuintl.h ├── libintl.glibc ├── linux-msg.sed ├── loadinfo.h ├── loadmsgcat.c ├── localcharset.c ├── locale.alias ├── localealias.c ├── ngettext.c ├── plural.c ├── plural.y ├── po2tbl.sed.in ├── ref-add.sin ├── ref-del.sin ├── textdomain.c └── xopen-msg.sed ├── keymap.c ├── keymap.h ├── lib.c ├── lib.h ├── m4 ├── Makefile.am ├── README ├── codeset.m4 ├── curslib.m4 ├── funcdecl.m4 ├── funcs.m4 ├── gettext.m4 ├── glibc21.m4 ├── gpgme.m4 ├── gssapi.m4 ├── iconv.m4 ├── lcmessage.m4 ├── progtest.m4 └── types.m4 ├── mailbox.h ├── main.c ├── mapping.h ├── mbox.c ├── mbyte.c ├── mbyte.h ├── md5.c ├── md5.h ├── menu.c ├── mh.c ├── mime.h ├── mime.types ├── mkchangelog.sh ├── mkdtemp.c ├── mutt.h ├── mutt_crypt.h ├── mutt_curses.h ├── mutt_idna.c ├── mutt_idna.h ├── mutt_menu.h ├── mutt_notmuch.c ├── mutt_notmuch.h ├── mutt_regex.h ├── mutt_sasl.c ├── mutt_sasl.h ├── mutt_socket.c ├── mutt_socket.h ├── mutt_ssl.c ├── mutt_ssl.h ├── mutt_ssl_gnutls.c ├── mutt_tunnel.c ├── mutt_tunnel.h ├── muttbug ├── muttbug.sh.in ├── muttlib.c ├── mx.c ├── mx.h ├── pager.c ├── pager.h ├── parse.c ├── patchlist.sh ├── pattern.c ├── pgp.c ├── pgp.h ├── pgpewrap.c ├── pgpinvoke.c ├── pgpkey.c ├── pgplib.c ├── pgplib.h ├── pgpmicalg.c ├── pgppacket.c ├── pgppacket.h ├── pgppubring.c ├── po ├── Makefile.in.in ├── POTFILES.in ├── bg.po ├── ca.po ├── cs.po ├── da.po ├── de.po ├── el.po ├── eo.po ├── es.po ├── et.po ├── eu.po ├── fr.po ├── ga.po ├── gl.po ├── hu.po ├── id.po ├── it.po ├── ja.po ├── ko.po ├── lt.po ├── nl.po ├── pl.po ├── pt_BR.po ├── ru.po ├── sk.po ├── sv.po ├── tr.po ├── uk.po ├── zh_CN.po └── zh_TW.po ├── pop.c ├── pop.h ├── pop_auth.c ├── pop_lib.c ├── postpone.c ├── prepare ├── protos.h ├── query.c ├── recvattach.c ├── recvcmd.c ├── regex.c ├── remailer.c ├── remailer.h ├── resize.c ├── rfc1524.c ├── rfc1524.h ├── rfc2047.c ├── rfc2047.h ├── rfc2231.c ├── rfc2231.h ├── rfc3676.c ├── rfc3676.h ├── rfc822.c ├── rfc822.h ├── safe_asprintf.c ├── score.c ├── send.c ├── sendlib.c ├── setenv.c ├── sha1.c ├── sha1.h ├── sidebar.c ├── sidebar.h ├── signal.c ├── smime.c ├── smime.h ├── smime_keys.pl ├── smtp.c ├── snprintf.c ├── sort.c ├── sort.h ├── stamp-h.in ├── status.c ├── strcasecmp.c ├── strcasestr.c ├── strdup.c ├── strndup.c ├── strnlen.c ├── strsep.c ├── strtok_r.c ├── system.c ├── thread.c ├── txt2c.c ├── txt2c.sh ├── url.c ├── url.h ├── utf8.c ├── version.sh ├── wcscasecmp.c └── wcwidth.c /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.a 3 | aclocal.m4 4 | autom4te.cache 5 | build/ 6 | compile 7 | config.guess 8 | config.h 9 | config.h.in 10 | config.log 11 | config.status 12 | config.sub 13 | configure 14 | cscope.* 15 | depcomp 16 | .deps 17 | doc/advancedusage.html 18 | doc/configuration.html 19 | doc/gettingstarted.html 20 | doc/.*.html 21 | doc/index.html 22 | doc/instdoc 23 | doc/instdoc.sh 24 | doc/intro.html 25 | doc/makedoc 26 | doc/manual.aux 27 | doc/manual.html 28 | doc/manual.log 29 | doc/manual.out 30 | doc/manual.pdf 31 | doc/manual.tex 32 | doc/manual.txt 33 | doc/manual.xml 34 | doc/mimesupport.html 35 | doc/miscellany.html 36 | doc/mutt.1 37 | doc/Muttrc 38 | doc/muttrc.man 39 | doc/optionalfeatures.html 40 | doc/reference.html 41 | doc/security.html 42 | doc/smime_keys.1 43 | doc/stamp- 44 | doc/stamp-doc-chunked 45 | doc/stamp-doc-xml 46 | doc/tuning.html 47 | flea 48 | .gdb_history 49 | *.gmo 50 | hcachever.sh 51 | hcversion.h 52 | install-sh 53 | keymap_defs.h 54 | Makefile 55 | Makefile.in 56 | missing 57 | mutt 58 | muttbug.sh 59 | mutt_dotlock 60 | mutt_dotlock.c 61 | mutt_md5 62 | *.o 63 | *.orig 64 | patchlist.c 65 | pgpewrap 66 | pgpring 67 | po/mutt.pot 68 | po/POTFILES 69 | *.rej 70 | reldate.h 71 | ^.settings/ 72 | smime_keys 73 | stamp-doc-rc 74 | stamp-h1 75 | *.swp 76 | TAGS 77 | ID 78 | tags 79 | .xcodeproj/* 80 | keymap_alldefs.h 81 | po/mutt-kz.pot 82 | txt2c 83 | conststrings.c 84 | doc/pgpewrap.1 85 | doc/pgpring.1 86 | mutt-kz-*.tar.* 87 | 88 | -------------------------------------------------------------------------------- /.hgignore: -------------------------------------------------------------------------------- 1 | # autoconf products 2 | ^aclocal\.m4$ 3 | ^autom4te\.cache 4 | ^compile$ 5 | ^(contrib/|doc/|imap/|m4/|po/)?Makefile\.in$ 6 | ^config\.h(\.in~?)?$ 7 | ^config\.(log|status)$ 8 | ^configure$ 9 | ^hcachever.sh$ 10 | ^muttbug\.sh$ 11 | ^stamp-h1$ 12 | ^doc/Muttrc$ 13 | ^doc/instdoc\.sh$ 14 | ^po/POTFILES$ 15 | ^config.guess$ 16 | ^config.sub$ 17 | ^depcomp$ 18 | ^install-sh$ 19 | ^missing$ 20 | ^mkinstalldirs$ 21 | 22 | # built objects 23 | ^flea$ 24 | ^hcversion\.h$ 25 | ^keymap_(all)?defs\.h$ 26 | ^doc/makedoc$ 27 | ^mutt$ 28 | ^mutt_dotlock(\.c)?$ 29 | ^mutt_md5$ 30 | ^patchlist\.c$ 31 | ^conststrings\.c$ 32 | ^pgpewrap|pgpring$ 33 | ^reldate\.h$ 34 | ^smime_keys$ 35 | ^txt2c$ 36 | ^stamp-doc-rc$ 37 | ^doc/instdoc$ 38 | ^doc/manual\.(txt|xml|aux|log|out|tex|pdf)$ 39 | ^doc/mutt\.1$ 40 | ^doc/muttrc\.man$ 41 | ^doc/pgpewrap\.1$ 42 | ^doc/pgpring\.1$ 43 | ^doc/.*\.html$ 44 | ^doc/stamp- 45 | ^doc/smime_keys\.1$ 46 | ^po/mutt\.pot$ 47 | 48 | # xcode droppings 49 | ^build/ 50 | \.xcodeproj/ 51 | 52 | # eclipse 53 | ^\.c?project$ 54 | ^\.settings/ 55 | 56 | syntax: glob 57 | .deps 58 | Makefile 59 | GPATH 60 | GRTAGS 61 | GTAGS 62 | TAGS 63 | cscope.* 64 | *.swp 65 | *.o 66 | *.gmo 67 | *.orig 68 | *.rej 69 | *.a 70 | .gdb_history 71 | *~ 72 | -------------------------------------------------------------------------------- /BEWARE: -------------------------------------------------------------------------------- 1 | MUTT HACKERS BEWARE 2 | 3 | A word of warning about string comparisons: Since mutt may run in a 4 | huge variety of locales, case-insensitive string comparisons and 5 | case conversions may be dangerous. For instance, in iso-8859-9, 6 | tolower('I') is DIFFERENT from 'i' - it's indeed the Turkish dotless 7 | lowercase i. 8 | 9 | For this reason, always use the ascii_* functions defined in ascii.h 10 | and implemented in ascii.c when comparing or handling strings which 11 | are defined as us-ascii. This concerns lots of text-based 12 | protocols, message header tags, character set names, domain names, 13 | e-mail addresses, etc. 14 | 15 | Thu Apr 26 15:40:11 CEST 2001, 16 | -------------------------------------------------------------------------------- /COPYRIGHT: -------------------------------------------------------------------------------- 1 | The following copyright notices apply to most of the program. Some 2 | modules are under different licenses, or in the public domain. 3 | 4 | Please note that this is by no means an exhaustive list of all the 5 | persons who have been contributing to this program. Please see the 6 | manual for a (probably still non complete) list of the persons who 7 | have been helpful with the development of this program. Please also 8 | see our source code repository at http://dev.mutt.org/hg/mutt/ for 9 | the full history of commits. 10 | 11 | Copyright (C) 1996-2014 Michael R. Elkins 12 | Copyright (C) 1996-2002 Brandon Long 13 | Copyright (C) 1997-2009 Thomas Roessler 14 | Copyright (C) 1998-2005 Werner Koch 15 | Copyright (C) 1999-2014 Brendan Cully 16 | Copyright (C) 1999-2002 Tommi Komulainen 17 | Copyright (C) 2000-2004 Edmund Grimley Evans 18 | Copyright (C) 2006-2009 Rocco Rutte 19 | Copyright (C) 2014-2015 Kevin J. McCarthy 20 | 21 | This program is free software; you can redistribute it and/or modify 22 | it under the terms of the GNU General Public License as published by 23 | the Free Software Foundation; either version 2 of the License, or 24 | (at your option) any later version. 25 | 26 | This program is distributed in the hope that it will be useful, 27 | but WITHOUT ANY WARRANTY; without even the implied warranty of 28 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 29 | GNU General Public License for more details. 30 | 31 | You should have received a copy of the GNU General Public License 32 | along with this program; if not, write to the Free Software 33 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 34 | 35 | -------------------------------------------------------------------------------- /OPS.CRYPT: -------------------------------------------------------------------------------- 1 | OP_DECRYPT_SAVE "make decrypted copy and delete" 2 | OP_DECRYPT_COPY "make decrypted copy" 3 | OP_FORGET_PASSPHRASE "wipe passphrase(s) from memory" 4 | OP_EXTRACT_KEYS "extract supported public keys" 5 | -------------------------------------------------------------------------------- /OPS.MIX: -------------------------------------------------------------------------------- 1 | OP_MIX_USE "Accept the chain constructed" 2 | OP_MIX_APPEND "Append a remailer to the chain" 3 | OP_MIX_INSERT "Insert a remailer into the chain" 4 | OP_MIX_DELETE "Delete a remailer from the chain" 5 | OP_MIX_CHAIN_PREV "Select the previous element of the chain" 6 | OP_MIX_CHAIN_NEXT "Select the next element of the chain" 7 | OP_COMPOSE_MIX "send the message through a mixmaster remailer chain" 8 | -------------------------------------------------------------------------------- /OPS.NOTMUCH: -------------------------------------------------------------------------------- 1 | OP_MAIN_CHANGE_VFOLDER "open a different virtual folder" 2 | OP_MAIN_VFOLDER_FROM_QUERY "generate virtual folder from query" 3 | OP_MAIN_MODIFY_LABELS "modify (notmuch) tags" 4 | OP_MAIN_MODIFY_LABELS_THEN_HIDE "modify labeld and then hide message" 5 | OP_MAIN_ENTIRE_THREAD "read entire thread of the current message" 6 | -------------------------------------------------------------------------------- /OPS.PGP: -------------------------------------------------------------------------------- 1 | OP_COMPOSE_ATTACH_KEY "attach a PGP public key" 2 | OP_COMPOSE_PGP_MENU "show PGP options" 3 | OP_MAIL_KEY "mail a PGP public key" 4 | OP_VERIFY_KEY "verify a PGP public key" 5 | OP_VIEW_ID "view the key's user id" 6 | OP_CHECK_TRADITIONAL "check for classic PGP" 7 | -------------------------------------------------------------------------------- /OPS.SIDEBAR: -------------------------------------------------------------------------------- 1 | OP_SIDEBAR_NEXT "Move the highlight to next mailbox" 2 | OP_SIDEBAR_NEXT_NEW "Move the highlight to next mailbox with new mail" 3 | OP_SIDEBAR_OPEN "Open highlighted mailbox" 4 | OP_SIDEBAR_PAGE_DOWN "Scroll the Sidebar down 1 page" 5 | OP_SIDEBAR_PAGE_UP "Scroll the Sidebar up 1 page" 6 | OP_SIDEBAR_PREV "Move the highlight to previous mailbox" 7 | OP_SIDEBAR_PREV_NEW "Move the highlight to previous mailbox with new mail" 8 | OP_SIDEBAR_TOGGLE_VIRTUAL "toggle between mailboxes and virtual mailboxes" 9 | OP_SIDEBAR_TOGGLE_VISIBLE "Make the Sidebar (in)visible" 10 | -------------------------------------------------------------------------------- /OPS.SMIME: -------------------------------------------------------------------------------- 1 | OP_COMPOSE_SMIME_MENU "show S/MIME options" 2 | -------------------------------------------------------------------------------- /PATCHES: -------------------------------------------------------------------------------- 1 | patch-quasi-delete-neo-UNKNOWN 2 | patch-progress-neo-UNKNOWN 3 | patch-status-color-neo-UNKNOWN 4 | patch-index-color-neo-UNKNOWN 5 | patch-nested-if-neo-UNKNOWN 6 | patch-cond-date-neo-UNKNOWN 7 | patch-tls-sni-neo-UNKNOWN 8 | patch-sidebar-neo-UNKNOWN 9 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | README for mutt-1.5 2 | =================== 3 | 4 | When updating mutt from an earlier release or from Mercurial, please 5 | make sure to read the compatibility notes in ``UPDATING''. Older changes 6 | between mutt-1.2 and mutt-1.4 are listed in NEWS. 7 | 8 | If you got the mutt source code from the public Mercurial repository 9 | (http://dev.mutt.org/hg/mutt/), please read doc/devel-notes.txt to make 10 | sure that you have a complete development environment. 11 | 12 | Installation instructions are detailed in ``INSTALL''. The user manual 13 | is in doc/manual.txt. PGP users should read doc/PGP-Notes.txt. 14 | 15 | Before you start hacking on mutt, read doc/devel-notes.txt. Before 16 | applying patches to mutt, read doc/applying-patches.txt. Please, 17 | read these files, as they will save you from asking FAQs. 18 | 19 | For more information, see the Mutt home page: 20 | 21 | http://www.mutt.org/ 22 | 23 | The primary distribution points for Mutt is: 24 | 25 | ftp://ftp.mutt.org/pub/mutt 26 | 27 | A list of mirror sites can be found under 28 | . 29 | -------------------------------------------------------------------------------- /README.SECURITY: -------------------------------------------------------------------------------- 1 | $Id$ 2 | 3 | Recently, there have been reports on security problems induced by 4 | the interpretation of shell meta-characters embedded in MIME 5 | parameters. These reports were referring to Pine, but the problem 6 | also applied when using mutt. 7 | 8 | More precisely, a mailcap entry like this one would lead to 9 | problems: 10 | 11 | > text/test-mailcap-bug; cat %s; copiousoutput; \ 12 | > test=test "`echo %{charset} | tr '[A-Z]' '[a-z]'`" != iso-8859-1 13 | 14 | When expanded with a charset parameter of ``touch${IFS}ME``, a file 15 | named "ME" would be created in the current directory. 16 | 17 | While we don't completely agree that this is an actual MUA problem 18 | (see below), we have implemented a couple of fixes for this: 19 | 20 | - Backticks are handled specially when preparing % expandos for 21 | mailcap entries. This fix will keep the current problem from 22 | occurring, but we are sure there are other possible mailcap entries 23 | where this doesn't help. 24 | 25 | - We have added a configuration variable named $mailcap_sanitize, 26 | which is set by default. If set, mutt will restrict possible 27 | characters in mailcap % expandos to a well-defined set of safe 28 | characters. This is the safe setting, but we are not sure it 29 | doesn't break some more advanced MIME stuff. 30 | 31 | >>> DON'T UNSET THIS OPTION UNLESS YOU KNOW WHAT YOU ARE DOING. 32 | 33 | 34 | Anyway, this problem is not necessarily a problem which should be 35 | solved inside the MUA, as it's difficult (maybe impossible) to solve 36 | there. Additionally, there is more than one program which parses 37 | mailcap. So writing secure mailcap statements is generally a good 38 | idea. We encourage you to do this. 39 | 40 | The most basic rule is this one: 41 | 42 | >>> KEEP THE %-EXPANDOS AWAY FROM SHELL QUOTING. 43 | 44 | Don't quote them with single or double quotes. Mutt does this for 45 | you, the right way, as should any other program which interprets 46 | mailcap. Don't put them into backtick expansions - as you have seen 47 | above, this is a recipe for disaster. Be highly careful with eval 48 | statements, and avoid them if possible at all. 49 | 50 | If you have to use the %-expandos' values in context where you need 51 | quoting or backtick expansions, put that value into a shell variable 52 | and reference the shell variable where necessary (possibly with the 53 | proper quoting put around it, like in "$charset"). 54 | 55 | For example, a safe version of the mailcap statement above could 56 | look like this: 57 | 58 | > text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \ 59 | > && test "`echo \"$charset\" | tr '[A-Z]' '[a-z]'`" != iso-8859-1 60 | 61 | -------------------------------------------------------------------------------- /README.progress: -------------------------------------------------------------------------------- 1 | Progress Bar Patch 2 | ================== 3 | 4 | Show a visual progress bar on slow operations 5 | 6 | Patch 7 | ----- 8 | 9 | To check if Mutt supports "Progress Bar", look for "patch-progress" in the 10 | mutt version. 11 | 12 | Dependencies 13 | * mutt-1.5.24 14 | 15 | Introduction 16 | ------------ 17 | 18 | The "progress" patch shows a visual progress bar on slow tasks, such as 19 | indexing a large folder over the net. 20 | 21 | Colors 22 | ------ 23 | 24 | Progress Colors 25 | 26 | | Name | Default Color | Description | 27 | |------------|---------------|---------------------| 28 | | 'progress' | default | Visual progress bar | 29 | 30 | See Also 31 | -------- 32 | 33 | * NeoMutt project 34 | * Color command 35 | 36 | Known Bugs 37 | ---------- 38 | 39 | None 40 | 41 | Credits 42 | ------- 43 | 44 | * Rocco Rutte 45 | * Vincent Lefevre 46 | * Stefan Kuhn 47 | * Karel Zak 48 | * Richard Russon 49 | 50 | -------------------------------------------------------------------------------- /README.quasi-delete: -------------------------------------------------------------------------------- 1 | Quasi-Delete Patch 2 | ================== 3 | 4 | Mark emails that should be hidden, but not deleted 5 | 6 | Patch 7 | ----- 8 | 9 | To check if Mutt supports "Quasi-Delete", look for "patch-quasi-delete" in 10 | the mutt version. 11 | 12 | Dependencies 13 | * mutt-1.5.24 14 | 15 | Introduction 16 | ------------ 17 | 18 | The "quasi-delete" function marks an email that should be hidden from the 19 | index, but NOT deleted. 20 | 21 | On its own, this patch isn't very useful. It forms a useful part of the 22 | notmuch plugin. 23 | 24 | Functions 25 | --------- 26 | 27 | Quasi-Delete Functions 28 | 29 | | Menus | Default Key | Function | Description | 30 | |-------------|-------------|------------------|---------------------------------------| 31 | | index,pager | (none) | '' | delete from mutt, don't touch on disk | 32 | 33 | See Also 34 | -------- 35 | 36 | * NeoMutt project 37 | * notmuch patch 38 | 39 | Known Bugs 40 | ---------- 41 | 42 | None 43 | 44 | Credits 45 | ------- 46 | 47 | * Karel Zak 48 | * Richard Russon 49 | 50 | -------------------------------------------------------------------------------- /README.status-color: -------------------------------------------------------------------------------- 1 | Status Color Patch 2 | ================== 3 | 4 | Custom rules for theming the status bar 5 | 6 | Patch 7 | ----- 8 | 9 | To check if Mutt supports "Status Color", look for "patch-status-color" in 10 | the mutt version. 11 | 12 | Dependencies 13 | * mutt-1.5.24 14 | 15 | Introduction 16 | ------------ 17 | 18 | The "status-color" patch allows you to theme different parts of the status 19 | bar (also when it's used by the index). 20 | 21 | Unlike normal color commands, 'color status' can now take up to 2 extra 22 | parameters (regex, num). 23 | 24 | Commands 25 | -------- 26 | 27 | color status foreground background [ regex [ num ]] 28 | 29 | With zero parameters, Mutt will set the default color for the entire status 30 | bar. 31 | 32 | With one parameter, Mutt will only color the parts matching the regex. 33 | 34 | With two parameters, Mutt will only color the num'th sub-match of the regex. 35 | 36 | Colors 37 | ------ 38 | 39 | Status Colors 40 | 41 | | Name | Default Color | Description | 42 | |--------|---------------|-------------| 43 | | status | 'reverse' | Status bar | 44 | 45 | See Also 46 | -------- 47 | 48 | * NeoMutt project 49 | * Compile-Time Features 50 | * Regular Expressions 51 | * Patterns 52 | * index-color patch 53 | * Color command 54 | 55 | Known Bugs 56 | ---------- 57 | 58 | None 59 | 60 | Credits 61 | ------- 62 | 63 | * David Sterba 64 | * Thomas Glanzmann 65 | * Kirill A. Shutemov 66 | * Richard Russon 67 | 68 | -------------------------------------------------------------------------------- /README.tls-sni: -------------------------------------------------------------------------------- 1 | TLS-SNI Patch 2 | ============= 3 | 4 | Negotiate with a server for a TSL/SSL certificate 5 | 6 | Patch 7 | ----- 8 | 9 | To check if Mutt supports "TLS-SNI", look for "patch-tls-sni" in the mutt 10 | version. 11 | 12 | Dependencies 13 | * mutt-1.5.24 14 | * OpenSSL 15 | 16 | Introduction 17 | ------------ 18 | 19 | The "TLS-SNI" patch adds support for TLS virtual hosting. If your mail 20 | server doesn't support this everything will still work normally. 21 | 22 | TLS supports sending the expected server hostname during the handshake, via 23 | the SNI extension. This can be used to select a server certificate to issue 24 | to the client, permitting virtual-hosting without requiring multiple IP 25 | addresses. 26 | 27 | This has been tested against Exim 4.80, which optionally logs SNI and can 28 | perform vhosting. 29 | 30 | To verify TLS SNI support by a server, you can use: 31 | 32 | openssl s_client -host -port -tls1 -servername 33 | 34 | 35 | See Also 36 | -------- 37 | 38 | * NeoMutt project 39 | 40 | Known Bugs 41 | ---------- 42 | 43 | None 44 | 45 | Credits 46 | ------- 47 | 48 | * Jeremy Katz 49 | * Phil Pennock 50 | * Richard Russon 51 | 52 | -------------------------------------------------------------------------------- /TODO: -------------------------------------------------------------------------------- 1 | Problems are listed in approximate order of priority. 2 | 3 | - When displaying MIME headers, rfc 2047 decoding is applied (which 4 | should not happen), and rfc 2231 decoding is not applied (which 5 | should happen). 6 | 7 | - Help formatting could be revamped a bit. 8 | 9 | - In the "attachment" menu, assume this: 10 | 11 | 1 [text/plain, 7bit, 1.1K] 12 | 2 [message/rfc822, 7bit, 6.1K] A test message 13 | 3 [text/plain, 7bit, 0.1K] |-> 14 | 4 [message/rfc822, base64, 2.5K] |-> 15 | 5 [message/rfc822, base64, 2.7K] `-> 16 | 17 | (please note the "message/rfc822" attachments encoded as 18 | Base64; that's illegal, but Sun's Mailtool sends that 19 | kind of messages); then go to, say, attachment "4", 20 | delete it, and go to the main menu; you won't be able to 21 | quit the mailbox (ok, 'x' works, but 'q' doesn't). 22 | 23 | The problem here lies in the fact that mutt uses mailbox 24 | handling functions to access message/rfc822 type 25 | attachments. We'd need to perform an additional 26 | decoding step before using these functions to fix this 27 | bug. 28 | 29 | Please note that mutt's just assuming RFC-compliant mail 30 | here. Fixing this stuff may become a PITA. 31 | 32 | 33 | 34 | 35 | - BODY struct should probably have a pointer to its 36 | corresponding HEADER struct. this is needed for 37 | mh/maildir mailboxes so the correct pathname can be 38 | found. Or perhaps all we need is a .hdr member of the 39 | STATE struct so that all of the MIME handlers can look 40 | up the corresponding HEADERs if need be? 41 | 42 | - handle message/external-body in some fashion 43 | 44 | - handle message/partial reconstruction 45 | 46 | - make patterns generic (I have patches for this -tlr), and 47 | introduce generic menu limiting, menu pattern searching, and the 48 | like. 49 | 50 | Note: This still requires some thought, since we'd have to store 51 | per-entry data in the menu structure. As an alternative, we could 52 | extend the tag method to do something to more general flags. The 53 | latter approach would make the implementation of proper 54 | tag-prefix behaviour more simple: Functions should only be applied 55 | when a message is tagged and visible. Additionally, we must not 56 | access a menu's max field directly any more: Adding an entry to a 57 | menu will require re-allocating and possibly updating the v2r 58 | array. How do we handle "in-the-middle additions" properly? Do 59 | they happen at all? 60 | -------------------------------------------------------------------------------- /VERSION: -------------------------------------------------------------------------------- 1 | 1.6.0 2 | -------------------------------------------------------------------------------- /VERSION.kz: -------------------------------------------------------------------------------- 1 | .1 2 | -------------------------------------------------------------------------------- /account.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2000-2007,2012 Brendan Cully 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* remote host account manipulation (POP/IMAP) */ 20 | 21 | #ifndef _MUTT_ACCOUNT_H_ 22 | #define _MUTT_ACCOUNT_H_ 1 23 | 24 | #include "url.h" 25 | 26 | /* account types */ 27 | enum 28 | { 29 | M_ACCT_TYPE_NONE = 0, 30 | M_ACCT_TYPE_IMAP, 31 | M_ACCT_TYPE_POP, 32 | M_ACCT_TYPE_SMTP 33 | }; 34 | 35 | /* account flags */ 36 | #define M_ACCT_PORT (1<<0) 37 | #define M_ACCT_USER (1<<1) 38 | #define M_ACCT_LOGIN (1<<2) 39 | #define M_ACCT_PASS (1<<3) 40 | #define M_ACCT_SSL (1<<4) 41 | 42 | typedef struct 43 | { 44 | char user[64]; 45 | char login[64]; 46 | char pass[128]; 47 | char host[128]; 48 | unsigned short port; 49 | unsigned char type; 50 | unsigned char flags; 51 | } ACCOUNT; 52 | 53 | int mutt_account_match (const ACCOUNT* a1, const ACCOUNT* m2); 54 | int mutt_account_fromurl (ACCOUNT* account, ciss_url_t* url); 55 | void mutt_account_tourl (ACCOUNT* account, ciss_url_t* url); 56 | int mutt_account_getuser (ACCOUNT* account); 57 | int mutt_account_getlogin (ACCOUNT* account); 58 | int mutt_account_getpass (ACCOUNT* account); 59 | void mutt_account_unsetpass (ACCOUNT* account); 60 | 61 | #endif /* _MUTT_ACCOUNT_H_ */ 62 | -------------------------------------------------------------------------------- /ascii.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001-2002 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it 5 | * and/or modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later 8 | * version. 9 | * 10 | * This program is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied 12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public 17 | * License along with this program; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | * 21 | */ 22 | 23 | 24 | /* 25 | * Versions of the string comparison functions which are 26 | * locale-insensitive. 27 | */ 28 | 29 | #ifndef _ASCII_H 30 | # define _ASCII_H 31 | 32 | int ascii_isupper (int c); 33 | int ascii_islower (int c); 34 | int ascii_toupper (int c); 35 | int ascii_tolower (int c); 36 | int ascii_strcasecmp (const char *a, const char *b); 37 | int ascii_strncasecmp (const char *a, const char *b, int n); 38 | 39 | #define ascii_strcmp(a,b) mutt_strcmp(a,b) 40 | #define ascii_strncmp(a,b,c) mutt_strncmp(a,b,c) 41 | 42 | static inline char* ascii_strlower (char *s) 43 | { 44 | char *p = s; 45 | 46 | while (*p) 47 | { 48 | *p = ascii_tolower ((unsigned int) *p); 49 | p++; 50 | } 51 | 52 | return s; 53 | } 54 | 55 | #endif 56 | -------------------------------------------------------------------------------- /attach.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* common protos for compose / attach menus */ 20 | 21 | #ifndef _ATTACH_H_ 22 | #define _ATTACH_H_ 1 23 | 24 | #include "mutt_menu.h" 25 | 26 | typedef struct attachptr 27 | { 28 | BODY *content; 29 | int parent_type; 30 | char *tree; 31 | int level; 32 | int num; 33 | unsigned int unowned : 1; /* don't unlink on detach */ 34 | } ATTACHPTR; 35 | 36 | ATTACHPTR **mutt_gen_attach_list (BODY *, int, ATTACHPTR **, short *, short *, 37 | int, int); 38 | void mutt_update_tree (ATTACHPTR **, short); 39 | int mutt_view_attachment (FILE*, BODY *, int, HEADER *, ATTACHPTR **, short); 40 | 41 | int mutt_tag_attach (MUTTMENU *menu, int n, int m); 42 | int mutt_attach_display_loop (MUTTMENU *menu, int op, FILE *fp, HEADER *hdr, 43 | BODY *cur, ATTACHPTR ***idxp, short *idxlen, short *idxmax, 44 | int recv); 45 | 46 | 47 | void mutt_save_attachment_list (FILE *fp, int tag, BODY *top, HEADER *hdr, MUTTMENU *menu); 48 | void mutt_pipe_attachment_list (FILE *fp, int tag, BODY *top, int filter); 49 | void mutt_print_attachment_list (FILE *fp, int tag, BODY *top); 50 | 51 | void mutt_attach_bounce (FILE *, HEADER *, ATTACHPTR **, short, BODY *); 52 | void mutt_attach_resend (FILE *, HEADER *, ATTACHPTR **, short, BODY *); 53 | void mutt_attach_forward (FILE *, HEADER *, ATTACHPTR **, short, BODY *); 54 | void mutt_attach_reply (FILE *, HEADER *, ATTACHPTR **, short, BODY *, int); 55 | 56 | #endif /* _ATTACH_H_ */ 57 | -------------------------------------------------------------------------------- /browser.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _BROWSER_H 20 | #define _BROWSER_H 1 21 | 22 | struct folder_file 23 | { 24 | mode_t mode; 25 | off_t size; 26 | time_t mtime; 27 | struct stat *st; 28 | 29 | char *name; 30 | char *desc; 31 | 32 | unsigned int new; 33 | unsigned int all; 34 | 35 | #ifdef USE_IMAP 36 | char delim; 37 | 38 | unsigned imap : 1; 39 | unsigned selectable : 1; 40 | unsigned inferiors : 1; 41 | #endif 42 | unsigned tagged : 1; 43 | }; 44 | 45 | struct browser_state 46 | { 47 | struct folder_file *entry; 48 | unsigned int entrylen; /* number of real entries */ 49 | unsigned int entrymax; /* max entry */ 50 | #ifdef USE_IMAP 51 | short imap_browse; 52 | char *folder; 53 | unsigned noselect : 1; 54 | unsigned marked : 1; 55 | unsigned unmarked : 1; 56 | #endif 57 | }; 58 | 59 | struct mailbox_state 60 | { 61 | unsigned int new; 62 | unsigned int old; 63 | unsigned int messages; 64 | }; 65 | #endif /* _BROWSER_H */ 66 | -------------------------------------------------------------------------------- /build-release: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | 3 | # 4 | # Build a mutt release. 5 | # 6 | # This used to be part of the main Makefile, but is better handled 7 | # by a shell script. 8 | # 9 | # Note that this script won't work for you. I'm including it with 10 | # the distribution for the sake of completeness. 11 | # 12 | # Thomas Roessler Mon, 8 Nov 1999 22:32:41 +0100 13 | # 14 | 15 | set -e 16 | 17 | if test "$1" = "-nodiff" ; then 18 | diff=no 19 | else 20 | diff=yes 21 | fi 22 | 23 | 24 | #devel="devel/" # comment out for the stable branch 25 | 26 | # test for uncommitted changes 27 | if hg id | grep -q '+' 28 | then 29 | echo "Uncommitted changes" 30 | exit 1 31 | fi 32 | 33 | # update the source 34 | 35 | hg update 36 | 37 | # Do automated security checks 38 | 39 | ./check_sec.sh || exit 1 40 | 41 | # bump the version number, and calculate the tags 42 | 43 | OVERSION="`cat VERSION`" 44 | OTAG="mutt-`echo $OVERSION | tr . -`-rel" 45 | 46 | echo $OVERSION | awk -F . '{printf("%d.%d.%d\n", $1, $2, $3 + 1);}' > VERSION 47 | ${VISUAL:-vi} VERSION 48 | 49 | VERSION="`cat VERSION`" 50 | TAG="mutt-`echo $VERSION | tr . -`-rel" 51 | 52 | #echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > reldate.h 53 | 54 | # now, prepare the distribution tar balls 55 | 56 | automake --add-missing --copy --force-missing 57 | touch configure.ac 58 | make config.status 59 | ./config.status 60 | make update-doc 61 | make update-changelog 62 | (cd po && make update-po) 63 | 64 | # build them 65 | 66 | make dist 67 | 68 | # commit and tag the release 69 | 70 | hg commit -m "automatic post-release commit for mutt-${VERSION}" 71 | #make commit-changelog 72 | hg tag ${TAG} 73 | 74 | # build the diff between the two releases 75 | 76 | if test "$diff" = yes 77 | then 78 | hg diff -r ${OTAG} -r ${TAG} | gzip -9 \ 79 | > diff-${OVERSION}-${VERSION}.gz 80 | fi 81 | 82 | # sign the various files 83 | 84 | # DISTFILES="mutt-${VERSION}.tar.gz mutt-${VERSION}i.tar.gz diff-${OVERSION}i-${VERSION}i.gz" 85 | DISTFILES="mutt-${VERSION}.tar.gz" 86 | 87 | if test "$diff" = yes ; then 88 | DISTFILES="$DISTFILES diff-${OVERSION}-${VERSION}.gz" 89 | fi 90 | 91 | for f in $DISTFILES; do 92 | gpg -ba $f 93 | chmod 644 $f.asc 94 | done 95 | 96 | for f in $DISTFILES ; do 97 | scp $f $f.asc trithemius.gnupg.org:/home/ftp/mutt/${devel} 98 | done 99 | 100 | hg sign -m"mutt-${VERSION} signed" ${TAG} 101 | 102 | # Finally, announce the new mutt to the public 103 | 104 | # mutt -s "[Announce] mutt-${VERSION} is out" mutt-dev@mutt.org 105 | 106 | -------------------------------------------------------------------------------- /charset.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2003 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _CHARSET_H 20 | #define _CHARSET_H 21 | 22 | #ifdef HAVE_ICONV_H 23 | #include 24 | #endif 25 | 26 | #ifndef HAVE_ICONV_T_DEF 27 | typedef void *iconv_t; 28 | #endif 29 | 30 | #ifndef HAVE_ICONV 31 | #define ICONV_CONST /**/ 32 | iconv_t iconv_open (const char *, const char *); 33 | size_t iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *); 34 | int iconv_close (iconv_t); 35 | #endif 36 | 37 | int mutt_convert_string (char **, const char *, const char *, int); 38 | 39 | iconv_t mutt_iconv_open (const char *, const char *, int); 40 | size_t mutt_iconv (iconv_t, ICONV_CONST char **, size_t *, char **, size_t *, ICONV_CONST char **, const char *); 41 | 42 | typedef void * FGETCONV; 43 | 44 | FGETCONV *fgetconv_open (FILE *, const char *, const char *, int); 45 | int fgetconv (FGETCONV *); 46 | char * fgetconvs (char *, size_t, FGETCONV *); 47 | void fgetconv_close (FGETCONV **); 48 | 49 | void mutt_set_langinfo_charset (void); 50 | char *mutt_get_default_charset (void); 51 | 52 | /* flags for charset.c:mutt_convert_string(), fgetconv_open(), and 53 | * mutt_iconv_open(). Note that applying charset-hooks to tocode is 54 | * never needed, and sometimes hurts: Hence there is no M_ICONV_HOOK_TO 55 | * flag. 56 | */ 57 | #define M_ICONV_HOOK_FROM 1 /* apply charset-hooks to fromcode */ 58 | 59 | /* Check if given character set is valid (either officially assigned or 60 | * known to local iconv implementation). If strict is non-zero, check 61 | * against iconv only. Returns 0 if known and negative otherwise. 62 | */ 63 | int mutt_check_charset (const char *s, int strict); 64 | 65 | #endif /* _CHARSET_H */ 66 | -------------------------------------------------------------------------------- /check_sec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | 3 | # 4 | # grep for some things which may look like security problems. 5 | # 6 | 7 | TMPFILE="`mktemp check_sec.tmp.XXXXXX`" || exit 1 8 | 9 | RV=0; 10 | 11 | do_check_files () 12 | { 13 | pattern="$1" ; shift 14 | magic="$1" ; shift 15 | msg="$1" ; shift 16 | egrep -n "$pattern" "$@" | \ 17 | grep -v '^[^ ]*:[^ ]*#' | \ 18 | fgrep -v "$magic" > $TMPFILE 19 | 20 | test -s $TMPFILE && { 21 | echo "$msg" ; 22 | cat $TMPFILE; 23 | rm -f $TMPFILE; 24 | RV=1; 25 | } 26 | } 27 | 28 | do_check () 29 | { 30 | do_check_files "$1" "$2" "$3" `find . -path ./intl -prune -o -name '*.c' -print` 31 | } 32 | 33 | do_check '\ /dev/null \ 38 | || cp -p $$file $(distdir)/iconv ; \ 39 | done 40 | -------------------------------------------------------------------------------- /contrib/Mush.rc: -------------------------------------------------------------------------------- 1 | # 2 | # Key bindings similar to those of MUSH 3 | # 4 | 5 | # $Id$ 6 | 7 | bind index . display-message 8 | bind index t display-message 9 | macro index n "" 10 | bind index + next-entry 11 | bind index j next-entry 12 | bind index J next-entry 13 | bind index - previous-entry 14 | bind index k previous-entry 15 | bind index K previous-entry 16 | bind index { top-page 17 | bind index } bottom-page 18 | bind index f change-folder 19 | bind index \cu sync-mailbox 20 | bind index * flag-message 21 | -------------------------------------------------------------------------------- /contrib/Pine.rc: -------------------------------------------------------------------------------- 1 | # 2 | # This file contains commands to change the keybindings in Mutt to be 3 | # similar to those of PINE 3.95. 4 | # 5 | 6 | # 7 | # $Id$ 8 | # 9 | 10 | bind index v display-message 11 | bind index p previous-undeleted 12 | bind index n next-undeleted 13 | bind index ' ' next-page 14 | bind index c mail 15 | bind index g change-folder 16 | bind index w search 17 | bind index y print-message 18 | bind index x sync-mailbox 19 | bind index $ sort-mailbox 20 | bind index a tag-prefix 21 | bind index \; tag-entry 22 | 23 | # Not possible to simulate zoom-out... 24 | macro index z "~T" 25 | 26 | bind pager p previous-undeleted 27 | bind pager n next-undeleted 28 | bind pager ' ' next-page 29 | bind pager g change-folder 30 | bind pager c mail 31 | bind pager w search 32 | bind pager y print-message 33 | bind pager \n noop # PINE prints "No default action for this menu." 34 | bind pager previous-line 35 | bind pager next-line 36 | 37 | bind compose \cx send-message 38 | 39 | # PINE has different defaults for this variables 40 | set folder=~/mail 41 | set record=+sent-mail 42 | set nosave_name 43 | set postponed=~/postponed-msgs 44 | set hdr_format="%Z %3C %{%b %d} %-19.19L (%5c) %s" 45 | -------------------------------------------------------------------------------- /contrib/Tin.rc: -------------------------------------------------------------------------------- 1 | # From: Tom Gilbert 2 | # To: mutt-users@mutt.org 3 | # Subject: Re: Lynx-like movements 4 | # Date: Sat, 4 Sep 1999 21:09:00 +0000 5 | 6 | 7 | # 8 | # These key bindings may be nice for notorious lynx or tin users. 9 | # 10 | 11 | bind pager previous-line 12 | bind pager next-line 13 | bind pager exit 14 | bind pager view-attachments 15 | bind attach exit 16 | bind attach view-attach 17 | bind index display-message 18 | macro index "?" 19 | bind browser select-entry 20 | macro browser "!" 21 | 22 | 23 | -------------------------------------------------------------------------------- /contrib/ca-bundle.crt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/contrib/ca-bundle.crt -------------------------------------------------------------------------------- /contrib/colors.default: -------------------------------------------------------------------------------- 1 | # -*-muttrc-*- 2 | 3 | # Colors for use with xterm and the like, white background. 4 | 5 | color hdrdefault blue white 6 | color quoted blue white 7 | color signature red white 8 | color attachment red white 9 | color prompt brightmagenta white 10 | color message brightred white 11 | color error brightred white 12 | color indicator brightyellow red 13 | color status brightgreen blue 14 | color tree black white 15 | color normal black white 16 | color markers red white 17 | color search white black 18 | color tilde brightmagenta white 19 | color index blue white ~F 20 | color index red white "~N|~O" 21 | 22 | 23 | # color body brightblack white '\*+[^*]+\*+' 24 | # color body brightblack white '_+[^_]+_+' 25 | -------------------------------------------------------------------------------- /contrib/colors.linux: -------------------------------------------------------------------------------- 1 | # -*-muttrc-*- 2 | 3 | # Palette for use with the Linux console. Black background. 4 | 5 | color hdrdefault blue black 6 | color quoted blue black 7 | color signature blue black 8 | color attachment red black 9 | color prompt brightmagenta black 10 | color message brightred black 11 | color error brightred black 12 | color indicator black red 13 | color status brightgreen blue 14 | color tree white black 15 | color normal white black 16 | color markers red black 17 | color search white black 18 | color tilde brightmagenta black 19 | color index blue black ~F 20 | color index red black "~N|~O" 21 | 22 | # color body brightwhite black '\*+[^*]+\*+' 23 | # color body brightwhite black '_+[^_]+_+' 24 | -------------------------------------------------------------------------------- /contrib/iconv/README: -------------------------------------------------------------------------------- 1 | This directory contains sample collections of iconv-hooks for 2 | various platforms. The files have been auto-generated from the 3 | source code of Bruno Haible's libiconv implementation, version 1.5.1. 4 | 5 | libiconv is available from . 6 | 7 | If you want to re-generate the files from a newer version of 8 | libiconv, just type: 9 | 10 | rm -f *.rc 11 | ./make.sh 12 | 13 | Note, however, that make.sh isn't guaranteed to run on any system 14 | but the one used for generating these files. 15 | 16 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.aix-3.2.5.rc: -------------------------------------------------------------------------------- 1 | iconv-hook CP850 IBM-850 2 | iconv-hook ISO-8859-1 ISO8859-1 3 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.aix-4.1.5.rc: -------------------------------------------------------------------------------- 1 | iconv-hook CP1046 IBM-1046 2 | iconv-hook CP850 IBM-850 3 | iconv-hook CP856 IBM-856 4 | iconv-hook CP932 IBM-932 5 | iconv-hook EUC-CN IBM-eucCN 6 | iconv-hook EUC-JP IBM-eucJP 7 | iconv-hook EUC-KR IBM-eucKR 8 | iconv-hook EUC-TW IBM-eucTW 9 | iconv-hook ISO-8859-1 ISO8859-1 10 | iconv-hook ISO-8859-2 ISO8859-2 11 | iconv-hook ISO-8859-5 ISO8859-5 12 | iconv-hook ISO-8859-6 ISO8859-6 13 | iconv-hook ISO-8859-8 ISO8859-8 14 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.aix-4.2.0.rc: -------------------------------------------------------------------------------- 1 | iconv-hook BIG5 big5 2 | iconv-hook CP1046 IBM-1046 3 | iconv-hook CP850 IBM-850 4 | iconv-hook CP856 IBM-856 5 | iconv-hook CP922 IBM-922 6 | iconv-hook CP932 IBM-932 7 | iconv-hook EUC-CN IBM-eucCN 8 | iconv-hook EUC-JP IBM-eucJP 9 | iconv-hook EUC-KR IBM-eucKR 10 | iconv-hook EUC-TW IBM-eucTW 11 | iconv-hook ISO-8859-13 IBM-921 12 | iconv-hook ISO-8859-1 ISO8859-1 13 | iconv-hook ISO-8859-2 ISO8859-2 14 | iconv-hook ISO-8859-5 ISO8859-5 15 | iconv-hook ISO-8859-6 ISO8859-6 16 | iconv-hook ISO-8859-7 ISO8859-7 17 | iconv-hook ISO-8859-8 ISO8859-8 18 | iconv-hook ISO-8859-9 ISO8859-9 19 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.aix-4.3.2.rc: -------------------------------------------------------------------------------- 1 | iconv-hook BIG5 big5 2 | iconv-hook CP1046 IBM-1046 3 | iconv-hook CP1124 IBM-1124 4 | iconv-hook CP1129 IBM-1129 5 | iconv-hook CP1252 IBM-1252 6 | iconv-hook CP850 IBM-850 7 | iconv-hook CP856 IBM-856 8 | iconv-hook CP922 IBM-922 9 | iconv-hook CP932 IBM-932 10 | iconv-hook CP943 IBM-943 11 | iconv-hook EUC-CN IBM-eucCN 12 | iconv-hook EUC-JP IBM-eucJP 13 | iconv-hook EUC-KR IBM-eucKR 14 | iconv-hook EUC-TW IBM-eucTW 15 | iconv-hook ISO-8859-13 IBM-921 16 | iconv-hook ISO-8859-15 ISO8859-15 17 | iconv-hook ISO-8859-1 ISO8859-1 18 | iconv-hook ISO-8859-2 ISO8859-2 19 | iconv-hook ISO-8859-5 ISO8859-5 20 | iconv-hook ISO-8859-6 ISO8859-6 21 | iconv-hook ISO-8859-7 ISO8859-7 22 | iconv-hook ISO-8859-8 ISO8859-8 23 | iconv-hook ISO-8859-9 ISO8859-9 24 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.freebsd-3.3.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ASCII 2 | iconv-hook CP866 3 | iconv-hook ISO-8859-15 4 | iconv-hook ISO-8859-1 5 | iconv-hook ISO-8859-2 6 | iconv-hook KOI8-R 7 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.glibc-2.1.3.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ISO-8859-1 ANSI_X3.4-1968 2 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.glibc-2.1.90.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ASCII ANSI_X3.4-1968 2 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.hpux-10.01.rc: -------------------------------------------------------------------------------- 1 | iconv-hook EUC-CN hp15CN 2 | iconv-hook EUC-TW eucTW 3 | iconv-hook HP-ARABIC8 arabic8 4 | iconv-hook HP-GREEK8 greek8 5 | iconv-hook HP-HEBREW8 hebrew8 6 | iconv-hook HP-ROMAN8 roman8 7 | iconv-hook HP-TURKISH8 turkish8 8 | iconv-hook ISO-8859-1 iso88591 9 | iconv-hook ISO-8859-2 iso88592 10 | iconv-hook ISO-8859-5 iso88595 11 | iconv-hook ISO-8859-6 iso88596 12 | iconv-hook ISO-8859-7 iso88597 13 | iconv-hook ISO-8859-8 iso88598 14 | iconv-hook ISO-8859-9 iso88599 15 | iconv-hook TIS-620 tis620 16 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.hpux-10.20.rc: -------------------------------------------------------------------------------- 1 | iconv-hook HP-ARABIC8 arabic8 2 | iconv-hook HP-GREEK8 greek8 3 | iconv-hook HP-HEBREW8 hebrew8 4 | iconv-hook HP-ROMAN8 roman8 5 | iconv-hook HP-TURKISH8 turkish8 6 | iconv-hook ISO-8859-15 iso885915 7 | iconv-hook ISO-8859-1 iso88591 8 | iconv-hook ISO-8859-2 iso88592 9 | iconv-hook ISO-8859-5 iso88595 10 | iconv-hook ISO-8859-6 iso88596 11 | iconv-hook ISO-8859-7 iso88597 12 | iconv-hook ISO-8859-8 iso88598 13 | iconv-hook ISO-8859-9 iso88599 14 | iconv-hook TIS-620 tis620 15 | iconv-hook UTF-8 utf8 16 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.hpux-11.00.rc: -------------------------------------------------------------------------------- 1 | iconv-hook BIG5 big5 2 | iconv-hook EUC-CN hp15CN 3 | iconv-hook EUC-JP eucJP 4 | iconv-hook EUC-KR eucKR 5 | iconv-hook EUC-TW eucTW 6 | iconv-hook HP-ARABIC8 arabic8 7 | iconv-hook HP-GREEK8 greek8 8 | iconv-hook HP-HEBREW8 hebrew8 9 | iconv-hook HP-KANA8 kana8 10 | iconv-hook HP-ROMAN8 roman8 11 | iconv-hook HP-TURKISH8 turkish8 12 | iconv-hook ISO-8859-15 iso885915 13 | iconv-hook ISO-8859-1 iso88591 14 | iconv-hook ISO-8859-2 iso88592 15 | iconv-hook ISO-8859-5 iso88595 16 | iconv-hook ISO-8859-6 iso88596 17 | iconv-hook ISO-8859-7 iso88597 18 | iconv-hook ISO-8859-8 iso88598 19 | iconv-hook ISO-8859-9 iso88599 20 | iconv-hook TIS-620 tis620 21 | iconv-hook UTF-8 utf8 22 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.irix-6.5.rc: -------------------------------------------------------------------------------- 1 | iconv-hook EUC-CN eucCN 2 | iconv-hook EUC-JP eucJP 3 | iconv-hook EUC-KR eucKR 4 | iconv-hook EUC-TW eucTW 5 | iconv-hook ISO-8859-1 ISO8859-1 6 | iconv-hook ISO-8859-2 ISO8859-2 7 | iconv-hook ISO-8859-5 ISO8859-5 8 | iconv-hook ISO-8859-7 ISO8859-7 9 | iconv-hook ISO-8859-9 ISO8859-9 10 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.osf1-4.0a.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ISO-8859-1 ISO8859-1 2 | iconv-hook ISO-8859-7 ISO8859-7 3 | iconv-hook ISO-8859-9 ISO8859-9 4 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.osf1-4.0d.rc: -------------------------------------------------------------------------------- 1 | iconv-hook CP850 cp850 2 | iconv-hook ISO-8859-1 ISO8859-1 3 | iconv-hook ISO-8859-7 ISO8859-7 4 | iconv-hook ISO-8859-9 ISO8859-9 5 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.solaris-2.4.rc: -------------------------------------------------------------------------------- 1 | iconv-hook bug 2 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.solaris-2.5.1.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ISO-8859-1 ISO8859-1 2 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.solaris-2.6-cjk.rc: -------------------------------------------------------------------------------- 1 | iconv-hook EUC-CN gb2312 2 | iconv-hook EUC-JP eucJP 3 | iconv-hook EUC-KR 5601 4 | iconv-hook EUC-TW cns11643 5 | iconv-hook ISO-8859-1 ISO8859-1 6 | iconv-hook ISO-8859-2 ISO8859-2 7 | iconv-hook ISO-8859-4 ISO8859-4 8 | iconv-hook ISO-8859-5 ISO8859-5 9 | iconv-hook ISO-8859-7 ISO8859-7 10 | iconv-hook ISO-8859-9 ISO8859-9 11 | iconv-hook Shift_JIS PCK 12 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.solaris-2.6.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ISO-8859-1 ISO8859-1 2 | iconv-hook ISO-8859-2 ISO8859-2 3 | iconv-hook ISO-8859-4 ISO8859-4 4 | iconv-hook ISO-8859-5 ISO8859-5 5 | iconv-hook ISO-8859-7 ISO8859-7 6 | iconv-hook ISO-8859-9 ISO8859-9 7 | -------------------------------------------------------------------------------- /contrib/iconv/iconv.solaris-2.7.rc: -------------------------------------------------------------------------------- 1 | iconv-hook ASCII 646 2 | iconv-hook ISO-8859-15 ISO8859-15 3 | iconv-hook ISO-8859-1 ISO8859-1 4 | iconv-hook ISO-8859-2 ISO8859-2 5 | iconv-hook ISO-8859-4 ISO8859-4 6 | iconv-hook ISO-8859-5 ISO8859-5 7 | iconv-hook ISO-8859-6 ISO8859-6 8 | iconv-hook ISO-8859-7 ISO8859-7 9 | iconv-hook ISO-8859-8 ISO8859-8 10 | iconv-hook ISO-8859-9 ISO8859-9 11 | iconv-hook KOI8-R koi8-r 12 | iconv-hook TIS-620 TIS620.2533 13 | -------------------------------------------------------------------------------- /contrib/iconv/make.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | 3 | # 4 | # Create sample configuration files from the tables contained with libiconv. 5 | # Copyright (C) 2001 Thomas Roessler 6 | # 7 | # This ugly shell script is free software; you can distribute and/or modify 8 | # it under the terms of the GNU General Public License version 2 or later. 9 | # 10 | 11 | LIBICONV="$1" 12 | test -d $LIBICONV/libcharset/tools || { 13 | echo "Sorry, I can't find libiconv's source!" >&2 ; 14 | exit 1 ; 15 | } 16 | 17 | for f in $LIBICONV/libcharset/tools/* ; do 18 | rm -f tmp.rc. 19 | ( head -3 $f | grep -q 'locale name.*locale charmap.*locale_charset' ) && ( 20 | sed '1,/^$/d' $f | awk '($4 != $3) { printf ("iconv-hook %s %s\n", $4, $3); }' | \ 21 | sed -e 's/^iconv-hook SJIS /iconv-hook Shift_JIS /gi' | 22 | sort -u > tmp.rc ) 23 | test -s tmp.rc && mv tmp.rc iconv.`basename $f`.rc 24 | rm -f tmp.rc 25 | done 26 | -------------------------------------------------------------------------------- /contrib/language.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/contrib/language.txt -------------------------------------------------------------------------------- /contrib/mutt_xtitle: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Demonstration of format string pipes. Sets the xterm title and returns the 3 | # string unchanged. 4 | # 5 | # Example usage: 6 | # set status_format="mutt_xtitle '%r %f (%L) [Msgs:%?M?%M/?%m%?n? New:%n?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?]'|" 7 | 8 | printf "\033]0;$1\007" > /dev/tty 9 | echo "$1" 10 | -------------------------------------------------------------------------------- /contrib/patch.slang-1.2.2.keypad.1: -------------------------------------------------------------------------------- 1 | diff -ur slang.old/src/slcurses.c slang/src/slcurses.c 2 | --- slang.old/src/slcurses.c Fri Apr 24 09:16:46 1998 3 | +++ slang/src/slcurses.c Sat Jul 4 07:30:31 1998 4 | @@ -134,7 +134,10 @@ 5 | } 6 | else if (ch == 0xFFFF) return ERR; 7 | SLang_ungetkey (ch); 8 | - return SLkp_getkey (); 9 | + if ((ch = SLkp_getkey ()) != SL_KEY_ERR) 10 | + return ch; 11 | + else 12 | + return SLang_getkey (); 13 | } 14 | return SLang_getkey (); 15 | } 16 | diff -ur slang.old/src/slkeymap.c slang/src/slkeymap.c 17 | --- slang.old/src/slkeymap.c Fri Apr 24 09:16:47 1998 18 | +++ slang/src/slkeymap.c Sat Jul 4 07:41:42 1998 19 | @@ -343,6 +343,8 @@ 20 | 21 | SLang_Key_Type *SLang_do_key(SLKeyMap_List_Type *kml, int (*getkey)(void)) 22 | { 23 | + unsigned char SLang_Undo_Buffer [SL_MAX_INPUT_BUFFER_LEN]; 24 | + int SLang_Undo_Len = 0; 25 | register SLang_Key_Type *key, *next, *kmax; 26 | unsigned int len; 27 | unsigned char input_ch; 28 | @@ -356,6 +358,7 @@ 29 | return NULL; 30 | 31 | input_ch = (unsigned char) SLang_Last_Key_Char; 32 | + SLang_Undo_Buffer [SLang_Undo_Len++] = input_ch; 33 | 34 | key = (SLang_Key_Type *) &((kml->keymap)[input_ch]); 35 | 36 | @@ -372,7 +375,11 @@ 37 | 38 | key = kml->keymap + input_ch; 39 | if (key->type == 0) 40 | + { 41 | + if (getkey == (int (*)(void)) SLang_getkey) 42 | + SLang_ungetkey_string (SLang_Undo_Buffer, SLang_Undo_Len); 43 | return NULL; 44 | + } 45 | } 46 | 47 | /* It appears to be a prefix character in a key sequence. */ 48 | @@ -385,6 +392,7 @@ 49 | { 50 | SLang_Key_TimeOut_Flag = 1; 51 | SLang_Last_Key_Char = (*getkey)(); 52 | + SLang_Undo_Buffer [SLang_Undo_Len++] = (unsigned char) SLang_Last_Key_Char; 53 | SLang_Key_TimeOut_Flag = 0; 54 | 55 | len++; 56 | @@ -458,6 +466,8 @@ 57 | kmax = next; 58 | } 59 | 60 | + if (getkey == (int (*)(void)) SLang_getkey) 61 | + SLang_ungetkey_string (SLang_Undo_Buffer, SLang_Undo_Len); 62 | return NULL; 63 | } 64 | 65 | diff -ur slang.old/src/slkeypad.c slang/src/slkeypad.c 66 | --- slang.old/src/slkeypad.c Fri Apr 24 09:16:47 1998 67 | +++ slang/src/slkeypad.c Sat Jul 4 07:30:31 1998 68 | @@ -110,7 +110,7 @@ 69 | key = SLang_do_key (Keymap_List, (int (*)(void)) SLang_getkey); 70 | if ((key == NULL) || (key->type != SLKEY_F_KEYSYM)) 71 | { 72 | - SLang_flush_input (); 73 | + /* SLang_flush_input (); */ 74 | return SL_KEY_ERR; 75 | } 76 | 77 | -------------------------------------------------------------------------------- /contrib/pgp2.rc: -------------------------------------------------------------------------------- 1 | # -*-muttrc-*- 2 | # 3 | # PGP command formats for PGP 2. 4 | # 5 | # $Id$ 6 | # 7 | 8 | # 9 | # Note: In order to be able to read your own messages, you'll have 10 | # the +encrypttoself command line parameter to the pgp_encrypt_only_command 11 | # and pgp_encrypt_sign_command variables. 12 | # 13 | 14 | # decode application/pgp 15 | set pgp_decode_command="%?p?PGPPASSFD=0; export PGPPASSFD;? cat %?p?-? %f | pgp +language=mutt +verbose=0 +batchmode -f" 16 | 17 | # verify a pgp/mime signature 18 | set pgp_verify_command="pgp +language=mutt +verbose=0 +batchmode -t %s %f" 19 | 20 | # decrypt a pgp/mime attachment 21 | set pgp_decrypt_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode -f" 22 | 23 | # create a pgp/mime signed attachment 24 | set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode -abfst %?a? -u %a?" 25 | 26 | # create a pgp/mime encrypted attachment 27 | set pgp_encrypt_only_command="pgp +language=mutt +verbose=0 +batchmode -aeft %r < %f" 28 | 29 | # create a pgp/mime encrypted and signed attachment 30 | set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp +language=mutt +verbose=0 +batchmode -aefts %?a?-u %a? %r" 31 | 32 | # import a key into the public key ring 33 | set pgp_import_command="pgp -ka %f +language=mutt" 34 | 35 | # export a key from the public key ring 36 | set pgp_export_command="pgp -kxaf +language=mutt %r" 37 | 38 | # verify a key 39 | set pgp_verify_key_command="pgp -kcc +language=mutt %r" 40 | 41 | # read in the public key ring 42 | set pgp_list_pubring_command="pgpring -2 %r" 43 | 44 | # read in the secret key ring 45 | set pgp_list_secring_command="pgpring -s -2 %r" 46 | 47 | # pattern for good signature 48 | set pgp_good_sign="Good signature" 49 | -------------------------------------------------------------------------------- /contrib/pgp5.rc: -------------------------------------------------------------------------------- 1 | # -*-muttrc-*- 2 | # 3 | # PGP command formats for PGP 5. 4 | # 5 | # $Id$ 6 | # 7 | 8 | # decode application/pgp 9 | set pgp_decode_command="%?p?PGPPASSFD=0; export PGPPASSFD;? cat %?p?-? %f | pgpv +language=mutt +verbose=0 +batchmode -f --OutputInformationFD=0" 10 | 11 | # verify a pgp/mime signature 12 | set pgp_verify_command="pgpv +language=mutt +verbose=0 +batchmode --OutputInformationFD=1 %f %s" 13 | 14 | # string that the verify command outputs if the signature is good 15 | set pgp_good_sign = "Good signature" 16 | 17 | # decrypt a pgp/mime attachment 18 | set pgp_decrypt_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpv +language=mutt +verbose=0 +batchmode --OutputInformationFD=2 -f" 19 | 20 | # create a pgp/mime signed attachment 21 | set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgps +language=mutt +verbose=0 +batchmode -abft %?a? -u %a?" 22 | 23 | # create a pgp/mime encrypted attachment 24 | set pgp_encrypt_only_command="pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -aft -- -r %r < %f" 25 | 26 | # create a pgp/mime encrypted and signed attachment 27 | set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgpewrap pgpe +language=mutt +verbose=0 +batchmode +nobatchinvalidkeys=off -afts %?a? -u %a? -- -r %r" 28 | 29 | # import a key into the public key ring 30 | set pgp_import_command="pgpk -a +language=mutt --OutputInformationFD=1 %f" 31 | 32 | # export a key from the public key ring 33 | set pgp_export_command="pgpk -xa +language=mutt --OutputInformationFD=1 %r" 34 | 35 | # verify a key 36 | set pgp_verify_key_command="pgpk -c +batchmode +language=mutt --OutputInformationFD=1 %r" 37 | 38 | # read in the public key ring 39 | set pgp_list_pubring_command="pgpring -5 %r" 40 | 41 | # read in the secret key ring 42 | set pgp_list_secring_command="pgpring -5 -s %r" 43 | 44 | 45 | -------------------------------------------------------------------------------- /contrib/pgp6.rc: -------------------------------------------------------------------------------- 1 | # -*-muttrc-*- 2 | # 3 | # PGP command formats for PGP 6. 4 | # 5 | # $Id$ 6 | # 7 | 8 | # decode application/pgp 9 | set pgp_decode_command="%?p?PGPPASSFD=0; export PGPPASSFD;? cat %?p?-? %f | pgp6 +compatible +verbose=0 +batchmode -f" 10 | 11 | # verify a pgp/mime signature 12 | set pgp_verify_command="pgp6 +compatible +verbose=0 +batchmode -t %s %f" 13 | 14 | # decrypt a pgp/mime attachment 15 | set pgp_decrypt_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp6 +compatible +verbose=0 +batchmode -f" 16 | 17 | # create a pgp/mime signed attachment 18 | set pgp_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp6 +compatible +verbose=0 +batchmode -abfst %?a? -u %a?" 19 | 20 | # create a pgp/mime encrypted attachment 21 | set pgp_encrypt_only_command="pgp6 +compatible +verbose=0 +encrypttoself +batchmode -aeft %r < %f" 22 | 23 | # create a pgp/mime encrypted and signed attachment 24 | set pgp_encrypt_sign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp6 +compatible +verbose=0 +encrypttoself +batchmode +clearsig=off -aefts %?a? -u %a? %r" 25 | 26 | # import a key into the public key ring 27 | set pgp_import_command="pgp6 +compatible -ka %f " 28 | 29 | # export a key from the public key ring 30 | set pgp_export_command="pgp6 +compatible -kxaf %r" 31 | 32 | # verify a key 33 | set pgp_verify_key_command="pgp6 +compatible -kcc %r" 34 | 35 | # read in the public key ring 36 | set pgp_list_pubring_command="pgpring -5 %r" 37 | 38 | # read in the secret key ring 39 | set pgp_list_secring_command="pgpring -s -5 %r" 40 | 41 | # create a clearsigned message 42 | set pgp_clearsign_command="PGPPASSFD=0; export PGPPASSFD; cat - %f | pgp6 +compatible +verbose=0 +batchmode +clearsig -afst %?a? -u %a?" 43 | 44 | # fetch keys 45 | set pgp_getkeys_command="pkspxycwrap %r" 46 | -------------------------------------------------------------------------------- /contrib/sample.mailcap: -------------------------------------------------------------------------------- 1 | # $Id$ 2 | 3 | text/html; netscape -remote openURL\(%s\) 4 | image/gif; xv %s 5 | image/jpg; xv %s 6 | application/pgp-keys; pgp -f < %s ; copiousoutput 7 | -------------------------------------------------------------------------------- /crypt-gpgme.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2004 g10 Code GmbH 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef CRYPT_GPGME_H 20 | #define CRYPT_GPGME_H 21 | 22 | #include "mutt_crypt.h" 23 | 24 | void pgp_gpgme_init (void); 25 | void smime_gpgme_init (void); 26 | 27 | char *pgp_gpgme_findkeys (ADDRESS *adrlist, int oppenc_mode); 28 | char *smime_gpgme_findkeys (ADDRESS *adrlist, int oppenc_mode); 29 | 30 | BODY *pgp_gpgme_encrypt_message (BODY *a, char *keylist, int sign); 31 | BODY *smime_gpgme_build_smime_entity (BODY *a, char *keylist); 32 | 33 | int pgp_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur); 34 | int smime_gpgme_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur); 35 | 36 | int pgp_gpgme_check_traditional (FILE *fp, BODY *b, int tagged_only); 37 | void pgp_gpgme_invoke_import (const char* fname); 38 | 39 | int pgp_gpgme_application_handler (BODY *m, STATE *s); 40 | int smime_gpgme_application_handler (BODY *a, STATE *s); 41 | int pgp_gpgme_encrypted_handler (BODY *a, STATE *s); 42 | 43 | BODY *pgp_gpgme_make_key_attachment (char *tempf); 44 | 45 | BODY *pgp_gpgme_sign_message (BODY *a); 46 | BODY *smime_gpgme_sign_message (BODY *a); 47 | 48 | int pgp_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile); 49 | int smime_gpgme_verify_one (BODY *sigbdy, STATE *s, const char *tempfile); 50 | 51 | int pgp_gpgme_send_menu (HEADER *msg, int *redraw); 52 | int smime_gpgme_send_menu (HEADER *msg, int *redraw); 53 | 54 | int smime_gpgme_verify_sender (HEADER *h); 55 | 56 | void gpgme_set_sender (const char *sender); 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /crypt-mod.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2004 g10 Code GmbH 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #if HAVE_CONFIG_H 20 | # include "config.h" 21 | #endif 22 | 23 | #include "crypt-mod.h" 24 | 25 | /* A type an a variable to keep track of registered crypto modules. */ 26 | typedef struct crypt_module *crypt_module_t; 27 | 28 | struct crypt_module 29 | { 30 | crypt_module_specs_t specs; 31 | crypt_module_t next, *prevp; 32 | }; 33 | 34 | static crypt_module_t modules; 35 | 36 | /* Register a new crypto module. */ 37 | void crypto_module_register (crypt_module_specs_t specs) 38 | { 39 | crypt_module_t module_new = safe_malloc (sizeof (*module_new)); 40 | 41 | module_new->specs = specs; 42 | module_new->next = modules; 43 | if (modules) 44 | modules->prevp = &module_new->next; 45 | modules = module_new; 46 | } 47 | 48 | /* Return the crypto module specs for IDENTIFIER. This function is 49 | usually used via the CRYPT_MOD_CALL[_CHECK] macros. */ 50 | crypt_module_specs_t crypto_module_lookup (int identifier) 51 | { 52 | crypt_module_t module = modules; 53 | 54 | while (module && (module->specs->identifier != identifier)) 55 | module = module->next; 56 | 57 | return module ? module->specs : NULL; 58 | } 59 | -------------------------------------------------------------------------------- /crypthash.h: -------------------------------------------------------------------------------- 1 | #ifndef _CRYPTHASH_H 2 | # define _CRYPTHASH_H 3 | 4 | 5 | # include 6 | # if HAVE_INTTYPES_H 7 | # include 8 | # else 9 | # if HAVE_STDINT_H 10 | # include 11 | # endif 12 | # endif 13 | 14 | /* POINTER defines a generic pointer type */ 15 | typedef unsigned char *POINTER; 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /doc/TODO: -------------------------------------------------------------------------------- 1 | Documentation TODO in no particular order grouped by style and content. 2 | 3 | It would be nice to get some of these done for 1.6. 4 | 5 | Style/Technical 6 | --------------- 7 | 8 | * Re-check complete manual for consistency. The same things need to be 9 | consistently marked up, e.g. an item either always as or 10 | always (decide clearly which to use for what), make sure 11 | all option refs are links, things are consistently quoted. 12 | E.g. it has: 13 | 14 | If the filename begins with a tilde (``˜'') 15 | 16 | and 17 | 18 | If the filename ends with a vertical bar (|) 19 | 20 | We need to choose either style and use it. 21 | 22 | * Think about some way of templating to a) help improve consistency 23 | (i.e. some sort of macro to refer to key, options, functions, etc.) 24 | and b) reduce typing overhead. 25 | 26 | $pipe_split 27 | 28 | is neither fun to read nor to write. This would give us lots of 29 | options to improve it (e.g. an automated index). We depend on 30 | perl already to build docs, think about/look for simple perl 31 | templating engine. 32 | 33 | * Find a way (XSLT?) to trim the TOC for the option reference; it's 34 | ugly but we probably want to keep the TOC depth as-is for other 35 | sections. 36 | 37 | Content 38 | ------- 39 | 40 | * Some sections maybe should be better grouped by topic, instead of 41 | one section per task (e.g. hooks should be grouped under a section 42 | 'hooks' in the config chapter). 43 | 44 | * Talk a lot more about character sets and encodings. 45 | -------------------------------------------------------------------------------- /doc/applying-patches.txt: -------------------------------------------------------------------------------- 1 | Subject: Applying patches 2 | From: Thomas Roessler 3 | Date: Thu, 8 Oct 1998 14:32:53 +0200 4 | 5 | When applying patches to mutt, you may encounter strange error 6 | messages spit out by programs like aclocal, autoconf, automake. 7 | This will happen if your machine has a partial build environment 8 | (see devel-notes.txt for a description of what's needed for mutt 9 | development): Mutt has detected changes to some of the "meta source 10 | files" like configure.in and tries to rebuild other files such as 11 | aclocal.m4 or Makefile.in based on these changes; this will fail if 12 | your build environment is not complete. 13 | 14 | If you encounter this kind of problem, touching the following files 15 | after applying patches may help: 16 | 17 | Makefile.in 18 | config.h.in 19 | configure 20 | aclocal.m4 21 | 22 | After doing so, simply type "make"; the dependencies should take 23 | care of the necessary other re-building (this may quite well include 24 | a re-running of ./configure). 25 | $Id$ 26 | -------------------------------------------------------------------------------- /doc/chunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /doc/gen-map-doc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/perl -w 2 | 3 | use strict; 4 | 5 | my (%OPS, %MAP, %DOC, $map); 6 | 7 | my $xml = shift @ARGV; 8 | 9 | open F, "cat @ARGV |" or die "OPS*: $!"; 10 | while () { 11 | /(\w+) "(.+)"/ or die "$.: parse error"; 12 | $OPS{$1} = $2; 13 | } 14 | close F; 15 | 16 | while () { 17 | if (/^const struct binding_t Op.*{ \/\* map: (.*) \*\//) { 18 | $map = $1; 19 | $DOC{$map} = ""; 20 | } 21 | if ($map and /^\s*\*\*\s*(.*)/) { 22 | $DOC{$map} .= "$1\n"; 23 | } 24 | if ($map and /{\s*"(.+)"\s*,\s*(\w+)\s*,\s*(?:"([^"]+)"|(\w+))\s*}/) { 25 | my ($function, $op, $binding) = ($1, $2, $3 || $4); 26 | $binding =~ s/&/&/; 27 | # for , try CamelCasing into 28 | $binding =~ s/<(.)(.+)>/<\U$1\E$2>/; 29 | $binding =~ s//>/; 31 | $binding =~ s/ /<Space>/; 32 | $binding =~ s/^\\033/Esc /; 33 | $binding =~ s/^\\010/<Backspace>/; 34 | $binding =~ s/^\\(0\d+)$/'^'.chr(64+oct($1))/e; 35 | $binding =~ s/^\\(0\d+)(.)/'^'.chr(64+oct($1)) ." $2"/e; 36 | $binding =~ s/\\t/<Tab>/; 37 | $binding =~ s/M_ENTER_S/<Return>/; 38 | $binding =~ s/NULL//; 39 | die "unknown key $binding" if $binding =~ /\\[^\\]|<|>/; 40 | die "unknown OP $op" unless $OPS{$op}; 41 | $MAP{$map} .= "<$function>$binding$OPS{$op}\n"; 42 | } 43 | if ($map and /^}/) { 44 | undef $map; 45 | } 46 | } 47 | 48 | open XML, $xml or die "$xml: $!"; 49 | while () { 50 | if (/__print_map\((.*)\)/) { 51 | my $map = $1; 52 | my $maptitle = $1; 53 | $maptitle =~ s/^(.)/\U$1\E/; 54 | unless ($MAP{$map}) { 55 | warn "map $map undefined"; 56 | next; 57 | } 58 | my $title = $map; 59 | $title =~ s/(.)(.+)/\U$1\E$2/; 60 | print < 62 | $maptitle Menu 63 | $DOC{$map} 64 | 65 | 66 | Default $title Menu Bindings 67 | 68 | 69 | FunctionDefault keyDescription 70 | 71 | 72 | $MAP{$map} 73 | 74 | 75 |
76 | 77 | 78 | 79 | EOT 80 | delete $MAP{$map}; 81 | } else { 82 | print; 83 | } 84 | } 85 | close XML; 86 | 87 | warn "unprinted maps: ". join(" ", keys %MAP) if %MAP; 88 | -------------------------------------------------------------------------------- /doc/html.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /doc/instdoc.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | 3 | prefix=@prefix@ 4 | exec_prefix=@exec_prefix@ 5 | bindir=@bindir@ 6 | libdir=@libdir@ 7 | mandir=@mandir@ 8 | srcdir=@srcdir@ 9 | datarootdir=@datarootdir@ 10 | docdir=@docdir@ 11 | includedir=@includedir@ 12 | top_srcdir=@top_srcdir@ 13 | top_builddir=.. 14 | 15 | SOURCE="$1" 16 | TARGET="$2" 17 | 18 | 19 | rm -f "$TARGET" 20 | 21 | sed -e "s;/usr/local/bin/;$bindir/;g" \ 22 | -e "s;/usr/local/doc/mutt/;$docdir/;g" \ 23 | "$SOURCE" > $TARGET 24 | 25 | chmod 644 "$TARGET" 26 | -------------------------------------------------------------------------------- /doc/makedoc-defs.h: -------------------------------------------------------------------------------- 1 | /* build complete documentation */ 2 | 3 | #ifdef MAKEDOC_FULL 4 | # ifndef CRYPT_BACKEND_GPGME 5 | # define CRYPT_BACKEND_GPGME 6 | # endif 7 | # ifndef USE_IMAP 8 | # define USE_IMAP 9 | # endif 10 | # ifndef MIXMASTER 11 | # define MIXMASTER "mixmaster" 12 | # endif 13 | # ifndef USE_POP 14 | # define USE_POP 15 | # endif 16 | # ifndef USE_SMTP 17 | # define USE_SMTP 18 | # endif 19 | # ifndef USE_SSL_OPENSSL 20 | # define USE_SSL_OPENSSL 21 | # endif 22 | # ifndef USE_SSL_GNUTLS 23 | # define USE_SSL_GNUTLS 24 | # endif 25 | # ifndef USE_SSL 26 | # define USE_SSL 27 | # endif 28 | # ifndef USE_SOCKET 29 | # define USE_SOCKET 30 | # endif 31 | # ifndef USE_DOTLOCK 32 | # define USE_DOTLOCK 33 | # endif 34 | # ifndef DL_STANDALONE 35 | # define DL_STANDALONE 36 | # endif 37 | # ifndef USE_HCACHE 38 | # define USE_HCACHE 39 | # endif 40 | # ifndef HAVE_DB4 41 | # define HAVE_DB4 42 | # endif 43 | # ifndef HAVE_GDBM 44 | # define HAVE_GDBM 45 | # endif 46 | # ifndef HAVE_QDBM 47 | # define HAVE_QDBM 48 | # endif 49 | # ifndef HAVE_LIBIDN 50 | # define HAVE_LIBIDN 51 | # endif 52 | # ifndef HAVE_GETADDRINFO 53 | # define HAVE_GETADDRINFO 54 | # endif 55 | # ifndef USE_SASL 56 | # define USE_SASL 57 | # endif 58 | #endif 59 | -------------------------------------------------------------------------------- /doc/mutt.css: -------------------------------------------------------------------------------- 1 | body { margin-left:2%; margin-right:2%; font-family:serif; } 2 | .toc, .list-of-tables, .list-of-examples { font-family:sans-serif; } 3 | h1, h2, h3, h4, h5, h6 { font-family:sans-serif; } 4 | p { text-align:justify; } 5 | div.table p.title, div.example p.title { font-size:smaller; font-family:sans-serif; } 6 | .email, .email a { font-family:monospace; } 7 | div.table-contents table, div.informaltable table { border-collapse:collapse; border:1px solid #c0c0c0; } 8 | div.table-contents table td, div.informaltable td, div.table-contents table th, div.informaltable table th { padding:5px; text-align:left; } 9 | div.table-contents table th, div.informaltable table th { 10 | font-family:sans-serif; 11 | background:#d0d0d0; 12 | font-weight:normal; 13 | vertical-align:top; 14 | } 15 | div.cmdsynopsis { border-left:1px solid #707070; padding-left:5px; } 16 | li div.cmdsynopsis { border-left:none; padding-left:0px; } 17 | pre.screen, div.note { background:#f0f0f0; border:1px solid #c0c0c0; padding:5px; margin-left:2%; margin-right:2%; } 18 | div.example p.title { margin-left:2%; } 19 | div.note h3 { font-size:small; font-style:italic; font-variant: small-caps; } 20 | div.note h3:after { content: ":" } 21 | div.note { margin-bottom: 5px; } 22 | .command { font-family: monospace; font-weight: normal; } 23 | .command strong { font-weight: normal; } 24 | tr { vertical-align: top; } 25 | .comment { color:#707070; } 26 | -------------------------------------------------------------------------------- /doc/mutt.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]> 5 | 6 | 7 | 8 | 9 | text/css 10 | &css; 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /doc/muttrc.cond-date: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'index-color' feature. 2 | # 3 | # The default index_format is: 4 | # '%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' 5 | # 6 | # We replace the date field '%{%b %d}', giving: 7 | set index_format='%4C %Z %<[y?%<[m?%<[d?%[%H:%M ]&%[%a %d]>&%[%b %d]>&%[%m/%y ]> %-15.15L (%?l?%4l&%4c?) %s' 8 | 9 | # Test Date Range Format String Example 10 | # -------------------------------------------- 11 | # %[d Today %[%H:%M ] 12:34 12 | # %[m This month %[%a %d] Thu 12 13 | # %[y This year %[%b %d] Dec 10 14 | # - Older %[%m/%y ] 06/15 15 | 16 | # vim: syntax=muttrc 17 | -------------------------------------------------------------------------------- /doc/muttrc.index-color: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'index-color' feature. 2 | 3 | # Entire index line 4 | color index white black '.*' 5 | 6 | # Author name, %A %a %F %L %n 7 | 8 | # Give the author column a dark grey background 9 | color index_author default color234 '.*' 10 | 11 | # Highlight a particular from (~f) 12 | color index_author brightyellow color234 '~fRay Charles' 13 | 14 | # Message flags, %S %Z 15 | # Highlight the flags for flagged (~F) emails 16 | color index_flags default red '~F' 17 | 18 | # Subject, %s 19 | # Look for a particular subject (~s) 20 | color index_subject brightcyan default '~s\(closes #[0-9]+\)' 21 | 22 | # Number of messages in a collapsed thread, %M 23 | color index_collapsed default brightblue 24 | 25 | # Date field 26 | color index_date green default 27 | 28 | # Message label, %y %Y 29 | color index_label default brightgreen 30 | 31 | # Message number, %C 32 | color index_number red default 33 | 34 | # Message size, %c %l 35 | color index_size cyan default 36 | 37 | # vim: syntax=muttrc 38 | -------------------------------------------------------------------------------- /doc/muttrc.man.tail: -------------------------------------------------------------------------------- 1 | .\" -*-nroff-*- 2 | .SH SEE ALSO 3 | .PP 4 | .BR iconv (1), 5 | .BR iconv (3), 6 | .BR mailcap (5), 7 | .BR maildir (5), 8 | .BR mbox (5), 9 | .BR mutt (1), 10 | .BR printf (3), 11 | .BR regex (7), 12 | .BR strftime (3) 13 | .PP 14 | The Mutt Manual 15 | .PP 16 | The Mutt home page: http://www.mutt.org/ 17 | .SH AUTHOR 18 | .PP 19 | Michael Elkins, and others. Use to contact 20 | the developers. 21 | -------------------------------------------------------------------------------- /doc/muttrc.nested-if: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'nested-if' feature. 2 | 3 | # This patch uses the format: '%' for conditional 4 | # format strings that can be nested. 5 | 6 | # Example 1 7 | # if a thread is folded 8 | # display the number of messages (%M) 9 | # else if we know how many lines in the message 10 | # display lines in message (%l) 11 | # else display the size of the message in bytes (%c) 12 | set index_format='%4C %Z %{%b %d} %-25.25n %s%> %>' 13 | 14 | # Example 2 15 | # if a thread is folded 16 | # display the number of messages (%M) 17 | # display the subject (%s) 18 | # else if we know how many lines in the message 19 | # display lines in message (%l) 20 | # else 21 | # display the size of the message in bytes (%c) 22 | set index_format='%4C %Z %{%b %d} %-25.25n %>' 23 | 24 | # vim: syntax=muttrc 25 | -------------------------------------------------------------------------------- /doc/muttrc.progress: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'progress' patch. 2 | 3 | # The 'progress' patch provides clear visual feedback for 4 | # slow tasks, such as indexing a large folder over the net. 5 | 6 | # Set the color of the progress bar 7 | # White text on a red background 8 | color progress white red 9 | 10 | # vim: syntax=muttrc 11 | -------------------------------------------------------------------------------- /doc/muttrc.quasi-delete: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'quasi-delete' feature. 2 | 3 | # The 'quasi-delete' function marks an email that should be hidden 4 | # from the index, but NOT deleted. 5 | bind index,pager Q quasi-delete 6 | 7 | # vim: syntax=muttrc 8 | -------------------------------------------------------------------------------- /doc/muttrc.status-color: -------------------------------------------------------------------------------- 1 | # Example Mutt config file for the 'status-color' patch. 2 | 3 | # The 'status-color' patch allows you to theme different parts of 4 | # the status bar (also when it's used by the index). 5 | 6 | # For the examples below, set some defaults 7 | set status_format='-%r-Mutt: %f [Msgs:%?M?%M/?%m%?n? New:%n?%?o? Old:%o?%?d? Del:%d?%?F? Flag:%F?%?t? Tag:%t?%?p? Post:%p?%?b? Inc:%b?%?l? %l?]---(%s/%S)-%>-(%P)---' 8 | set index_format='%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?) %s' 9 | set sort=threads 10 | set sort_aux=last-date-received 11 | 12 | # 'status color' can take up to 2 extra parameters 13 | 14 | # color status foreground background [ regex [ num ]] 15 | 16 | # 0 extra parameters 17 | # Set the default color for the entire status line 18 | color status blue white 19 | 20 | # 1 extra parameter 21 | # Set the color for a matching pattern 22 | # color status foreground background regexp 23 | 24 | # Highlight New, Deleted, or Flagged emails 25 | color status brightred white '(New|Del|Flag):[0-9]+' 26 | 27 | # Highlight mailbox ordering if it's different from the default 28 | # First, highlight anything (*/*) 29 | color status brightred default '\([^)]+/[^)]+\)' 30 | 31 | # Then override the color for one specific case 32 | color status default default '\(threads/last-date-received\)' 33 | 34 | # 2 extra parameters 35 | # Set the color for the nth submatch of a pattern 36 | # color status foreground background regexp num 37 | 38 | # Highlight the contents of the []s but not the [] themselves 39 | color status red default '\[([^]]+)\]' 1 40 | 41 | # The '1' refers to the first regex submatch, which is the inner 42 | # part in ()s 43 | 44 | # Highlight the mailbox 45 | color status brightwhite default 'Mutt: ([^ ]+)' 1 46 | 47 | # Search for 'Mutt: ' but only highlight what comes after it 48 | 49 | # vim: syntax=muttrc 50 | -------------------------------------------------------------------------------- /doc/muttrc.tls-sni: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/doc/muttrc.tls-sni -------------------------------------------------------------------------------- /doc/patch-notes.txt: -------------------------------------------------------------------------------- 1 | From roessler@does-not-exist.org Wed Nov 7 11:49:56 2001 2 | Date: Wed, 7 Nov 2001 11:49:56 +0100 3 | From: Thomas Roessler 4 | To: mutt-dev@mutt.org 5 | Subject: To those shipping patches (v2) 6 | MIME-Version: 1.0 7 | Content-Type: text/plain; format=flowed 8 | Status: RO 9 | Content-Length: 1273 10 | Lines: 34 11 | 12 | You folks have convinced me that the old patchlist was almost the 13 | right way to go for mutt identifying what patches have been applied. 14 | 15 | Thus, I've implemented this scheme (and will commit it to the CVS 16 | in a moment): There's a new file called PATCHES in the source tree, 17 | which will be empty in the official distribution. 18 | 19 | This file's format is one patch ID per line. Patch IDs should be 20 | the same as the file names used for distributing patches. The 21 | format for these file names should be this: 22 | 23 | patch-... 24 | 25 | That is, Vsevolod's NNTP patch for mutt-1.3.42 could be named like 26 | this: 27 | 28 | patch-1.3.42.vvv.nntp.1 29 | 30 | From PATCHES, patchlist.c will be automatically generated. In 31 | order to properly construct PATCHES, please include the following 32 | chunk with your patch, replacing by your patch ID. 33 | 34 | ------------------------------snip------------------------------ 35 | --- PATCHES~ Tue Nov 6 19:59:33 2001 36 | +++ PATCHES Tue Nov 6 19:59:42 2001 37 | @@ -1,0 +1 @@ 38 | + 39 | ------------------------------snip------------------------------ 40 | 41 | The patch IDs will be displayed when mutt is run with the 'v' 42 | command line switch. 43 | 44 | -- 45 | Thomas Roessler http://log.does-not-exist.org/ 46 | 47 | -------------------------------------------------------------------------------- /doc/pgpewrap.man: -------------------------------------------------------------------------------- 1 | .\" -*-nroff-*- 2 | .\" 3 | .\" pgpewrap, a command line munging tool 4 | .\" Manpage Copyright (c) 2013 Honza Horak 5 | .\" 6 | .\" This program is free software; you can redistribute it and/or modify 7 | .\" it under the terms of the GNU General Public License as published by 8 | .\" the Free Software Foundation; either version 2 of the License, or 9 | .\" (at your option) any later version. 10 | .\" 11 | .\" This program is distributed in the hope that it will be useful, 12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | .\" GNU General Public License for more details. 15 | .\" 16 | .\" You should have received a copy of the GNU General Public License 17 | .\" along with this program; if not, write to the Free Software 18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | .\" 20 | .TH pgpewrap 1 "May 2013" Unix "User Manuals" 21 | .SH NAME 22 | pgpewrap \- Mutt command line munging tool 23 | 24 | .SH SYNTAX 25 | .PP 26 | \fBpgpewrap\fP [ \fBflags\fP ] \-\- \fBprefix\fP [ \fBrecipients\fP ] 27 | 28 | .SH DESCRIPTION 29 | .PP 30 | This is a little C program which does some command line munging: The 31 | first argument is a command to be executed. When \fBpgpewrap\fP 32 | encounters a "\-\-" (dash\-dash) argument, it will interpret the next 33 | argument as a prefix which is put in front of all following 34 | arguments. 35 | 36 | .SH EXAMPLE 37 | 38 | pgpewrap pgpe file \-\- \-r a b c 39 | 40 | will execute: 41 | 42 | pgpe file -r a -r b -r c 43 | 44 | This script is needed with PGP 5 and with GPG, since their command 45 | line interfaces can't be properly served by mutt's format mechanism. 46 | 47 | -------------------------------------------------------------------------------- /doc/pgpring.man: -------------------------------------------------------------------------------- 1 | .\" -*-nroff-*- 2 | .\" 3 | .\" pgpring, a key ring dumper 4 | .\" Manpage Copyright (c) 2004-2013 Matthew Wilcox, Honza Horak 5 | .\" 6 | .\" This program is free software; you can redistribute it and/or modify 7 | .\" it under the terms of the GNU General Public License as published by 8 | .\" the Free Software Foundation; either version 2 of the License, or 9 | .\" (at your option) any later version. 10 | .\" 11 | .\" This program is distributed in the hope that it will be useful, 12 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | .\" GNU General Public License for more details. 15 | .\" 16 | .\" You should have received a copy of the GNU General Public License 17 | .\" along with this program; if not, write to the Free Software 18 | .\" Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | .\" 20 | .TH pgpring 1 "May 2013" Unix "User Manuals" 21 | .SH NAME 22 | pgpring \- Mutt key ring dumper 23 | 24 | .SH SYNTAX 25 | .PP 26 | \fBpgpring\fP [ \fB\-k\fP \fIkeyring\fP ] [ \fB\-2\fP | \fB\-5\fP ] 27 | [ \fB\-s\fP ] [ \fB\-S\fP ] [ \fB\-f\fP ] 28 | 29 | .SH DESCRIPTION 30 | .PP 31 | pgpring is a key ring dumper. It extracts information from PGP's 32 | binary key ring and emits it in an (almost) readable output format 33 | understood by mutt's key selection routines. This output format 34 | mimics the one used by the GNU Privacy Guard (GPG). 35 | 36 | .SH OPTIONS 37 | .TP 38 | .BI \-k " keyring" 39 | Dump the contents of the specified keyring. 40 | .TP 41 | .B \-2 42 | Use the default keyring for PGP 2.x. 43 | .TP 44 | .B \-5 45 | Use the default keyring for PGP 5. 46 | .TP 47 | .B \-s 48 | Dump the secret keyring. 49 | .TP 50 | .B \-S 51 | Dump signatures. 52 | .TP 53 | .B \-f 54 | Dump fingerprints. 55 | 56 | .SH ENVIRONMENT 57 | .PP 58 | .IP "HOME" 59 | Full path of the user's home directory. 60 | .IP "PGPPATH" 61 | Directory in which the user's PGP public keyring can be found. 62 | 63 | .SH AUTHORS 64 | Thomas Roessler 65 | 66 | -------------------------------------------------------------------------------- /doc/vimrc.index-color: -------------------------------------------------------------------------------- 1 | " Vim syntax file for the mutt index-color patch 2 | 3 | syntax keyword muttrcColorField contained index 4 | syntax keyword muttrcColorField contained index_author 5 | syntax keyword muttrcColorField contained index_collapsed 6 | syntax keyword muttrcColorField contained index_date 7 | syntax keyword muttrcColorField contained index_flags 8 | syntax keyword muttrcColorField contained index_label 9 | syntax keyword muttrcColorField contained index_number 10 | syntax keyword muttrcColorField contained index_size 11 | syntax keyword muttrcColorField contained index_subject 12 | 13 | " vim: syntax=vim 14 | -------------------------------------------------------------------------------- /doc/vimrc.progress: -------------------------------------------------------------------------------- 1 | " Vim syntax file for the mutt progress patch 2 | 3 | syntax keyword muttrcColorField contained progress 4 | 5 | " vim: syntax=vim 6 | -------------------------------------------------------------------------------- /doc/vimrc.quasi-delete: -------------------------------------------------------------------------------- 1 | " Vim syntax file for the mutt quasi-delete patch 2 | 3 | syntax match muttrcFunction contained "\" 4 | 5 | " vim: syntax=vim 6 | -------------------------------------------------------------------------------- /dotlock.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * Copyright (C) 1998-2000 Thomas Roessler 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef _DOTLOCK_H 21 | #define _DOTLOCK_H 22 | 23 | /* exit values */ 24 | 25 | #define DL_EX_OK 0 26 | #define DL_EX_ERROR 1 27 | #define DL_EX_EXIST 3 28 | #define DL_EX_NEED_PRIVS 4 29 | #define DL_EX_IMPOSSIBLE 5 30 | 31 | /* flags */ 32 | 33 | #define DL_FL_TRY (1 << 0) 34 | #define DL_FL_UNLOCK (1 << 1) 35 | #define DL_FL_USEPRIV (1 << 2) 36 | #define DL_FL_FORCE (1 << 3) 37 | #define DL_FL_RETRY (1 << 4) 38 | #define DL_FL_UNLINK (1 << 5) 39 | 40 | #define DL_FL_ACTIONS (DL_FL_TRY|DL_FL_UNLOCK|DL_FL_UNLINK) 41 | 42 | #ifndef DL_STANDALONE 43 | int dotlock_invoke (const char *, int, int, int); 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /extlib.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it 5 | * and/or modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later 8 | * version. 9 | * 10 | * This program is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied 12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public 17 | * License along with this program; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | /* 23 | * Some simple dummies, so we can reuse the routines from 24 | * lib.c in external programs. 25 | */ 26 | 27 | #define WHERE 28 | #define _EXTLIB_C 29 | 30 | #if HAVE_CONFIG_H 31 | # include "config.h" 32 | #endif 33 | 34 | #include 35 | #include "lib.h" 36 | 37 | void (*mutt_error) (const char *, ...) = mutt_nocurses_error; 38 | 39 | void mutt_exit (int code) 40 | { 41 | exit (code); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /flymake.am: -------------------------------------------------------------------------------- 1 | get_cs_flags = $(foreach target,$(subst .,_,$(subst -,_,$($(2)))),$($(target)_$(1)FLAGS)) 2 | get_cs_all_flags = $(foreach type,$(2),$(call get_cs_flags,$(1),$(type))) 3 | get_cs_compile = $(if $(subst C,,$(1)),$($(1)COMPILE),$(COMPILE)) 4 | get_cs_cmdline = $(call get_cs_compile,$(1)) $(call get_cs_all_flags,$(1),check_PROGRAMS bin_PROGRAMS lib_LTLIBRARIES) -fsyntax-only 5 | 6 | check-syntax: 7 | s=$(suffix $(CHK_SOURCES));\ 8 | if [ "$$s" = ".c" ]; then \ 9 | $(call get_cs_cmdline,C) $(call get_cs_cmdline,CPP) $(CHK_SOURCES);\ 10 | else exit 1; fi 11 | 12 | .PHONY: check-syntax 13 | -------------------------------------------------------------------------------- /gen_defs: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # $Id$ 4 | 5 | echo '/* Automatically generated by gen_defs. Do not edit! */' 6 | echo '' 7 | 8 | for mode in help defs; do 9 | case $mode in 10 | help) 11 | echo "#ifdef HELP_C" 12 | echo "const char *HelpStrings[] = {" 13 | expr='s;^[^ ]* *\(.*\); N_(\1),;' 14 | ;; 15 | *) 16 | echo "enum {" 17 | expr='s;^\([^ ]*\).*; \1,;' 18 | ;; 19 | esac 20 | for i in $*; do 21 | sed -e '/^\/\*/d' -e "$expr" < $i 22 | done 23 | if test $mode = help; then 24 | echo ' NULL' 25 | else 26 | echo ' OP_MAX' 27 | fi 28 | echo "};" 29 | if test $mode = help; then 30 | echo "#endif /* MAIN_C */" 31 | echo '' 32 | fi 33 | done 34 | 35 | exit 0 36 | -------------------------------------------------------------------------------- /getdomain.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009,2013 Derek Martin 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #if HAVE_CONFIG_H 20 | # include "config.h" 21 | #endif 22 | 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | 29 | #include "mutt.h" 30 | 31 | 32 | int getdnsdomainname (char *d, size_t len) 33 | { 34 | /* A DNS name can actually be only 253 octets, string is 256 */ 35 | char *node; 36 | long node_len; 37 | struct addrinfo hints; 38 | struct addrinfo *h; 39 | char *p; 40 | int ret; 41 | 42 | *d = '\0'; 43 | memset(&hints, 0, sizeof (struct addrinfo)); 44 | hints.ai_flags = AI_CANONNAME; 45 | hints.ai_family = AF_UNSPEC; 46 | 47 | if ((node_len = sysconf(_SC_HOST_NAME_MAX)) == -1) 48 | node_len = STRING; 49 | node = safe_malloc(node_len + 1); 50 | if (gethostname(node, node_len)) 51 | ret = -1; 52 | else if (getaddrinfo(node, NULL, &hints, &h)) 53 | ret = -1; 54 | else 55 | { 56 | if (!(p = strchr(h->ai_canonname, '.'))) 57 | ret = -1; 58 | else 59 | { 60 | strfcpy(d, ++p, len); 61 | ret = 0; 62 | dprint(1, (debugfile, "getdnsdomainname(): %s\n", d)); 63 | } 64 | freeaddrinfo(h); 65 | } 66 | FREE (&node); 67 | return ret; 68 | } 69 | 70 | -------------------------------------------------------------------------------- /group.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2006 Thomas Roessler 3 | * Copyright (C) 2009 Rocco Rutte 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef _MUTT_GROUP_H_ 21 | #define _MUTT_GROUP_H_ 1 22 | 23 | #define M_GROUP 0 24 | #define M_UNGROUP 1 25 | 26 | void mutt_group_add_adrlist (group_t *g, ADDRESS *a); 27 | 28 | void mutt_group_context_add (group_context_t **ctx, group_t *group); 29 | void mutt_group_context_destroy (group_context_t **ctx); 30 | void mutt_group_context_add_adrlist (group_context_t *ctx, ADDRESS *a); 31 | int mutt_group_context_add_rx (group_context_t *ctx, const char *s, int flags, BUFFER *err); 32 | 33 | int mutt_group_match (group_t *g, const char *s); 34 | 35 | int mutt_group_context_clear (group_context_t **ctx); 36 | int mutt_group_context_remove_rx (group_context_t *ctx, const char *s); 37 | int mutt_group_context_remove_adrlist (group_context_t *ctx, ADDRESS *); 38 | 39 | #endif /* _MUTT_GROUP_H_ */ 40 | -------------------------------------------------------------------------------- /hash.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2009 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _HASH_H 20 | #define _HASH_H 21 | 22 | struct hash_elem 23 | { 24 | const char *key; 25 | void *data; 26 | struct hash_elem *next; 27 | }; 28 | 29 | typedef struct 30 | { 31 | int nelem; 32 | struct hash_elem **table; 33 | unsigned int (*hash_string)(const unsigned char *, unsigned int); 34 | int (*cmp_string)(const char *, const char *); 35 | } 36 | HASH; 37 | 38 | #define hash_find(table, key) hash_find_hash(table, table->hash_string ((unsigned char *)key, table->nelem), key) 39 | 40 | #define hash_delete(table,key,data,destroy) hash_delete_hash(table, table->hash_string ((unsigned char *)key, table->nelem), key, data, destroy) 41 | 42 | HASH *hash_create (int nelem, int lower); 43 | int hash_insert (HASH * table, const char *key, void *data, int allow_dup); 44 | void *hash_find_hash (const HASH * table, int hash, const char *key); 45 | void hash_delete_hash (HASH * table, int hash, const char *key, const void *data, 46 | void (*destroy) (void *)); 47 | void hash_destroy (HASH ** hash, void (*destroy) (void *)); 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /hcache.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2004 Thomas Glanzmann 3 | * Copyright (C) 2004 Tobias Werth 4 | * Copyright (C) 2004 Brian Fundakowski Feldman 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | */ 20 | 21 | #ifndef _HCACHE_H_ 22 | #define _HCACHE_H_ 1 23 | 24 | struct header_cache; 25 | typedef struct header_cache header_cache_t; 26 | 27 | typedef int (*hcache_namer_t)(const char* path, char* dest, size_t dlen); 28 | 29 | header_cache_t *mutt_hcache_open(const char *path, const char *folder, 30 | hcache_namer_t namer); 31 | void mutt_hcache_close(header_cache_t *h); 32 | HEADER *mutt_hcache_restore(const unsigned char *d, HEADER **oh); 33 | void *mutt_hcache_fetch(header_cache_t *h, const char *filename, size_t (*keylen)(const char *fn)); 34 | void *mutt_hcache_fetch_raw (header_cache_t *h, const char *filename, 35 | size_t (*keylen)(const char *fn)); 36 | 37 | typedef enum { 38 | M_GENERATE_UIDVALIDITY = 1 /* use gettimeofday() as value */ 39 | } mutt_hcache_store_flags_t; 40 | 41 | /* uidvalidity is an IMAP-specific unsigned 32 bit number */ 42 | int mutt_hcache_store(header_cache_t *h, const char *filename, HEADER *header, 43 | unsigned int uidvalidity, size_t (*keylen)(const char *fn), mutt_hcache_store_flags_t flags_t); 44 | int mutt_hcache_store_raw (header_cache_t *h, const char* filename, void* data, 45 | size_t dlen, size_t(*keylen) (const char* fn)); 46 | int mutt_hcache_delete(header_cache_t *h, const char *filename, size_t (*keylen)(const char *fn)); 47 | 48 | const char *mutt_hcache_backend (void); 49 | 50 | #endif /* _HCACHE_H_ */ 51 | -------------------------------------------------------------------------------- /hcachever.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BASEVERSION=2 4 | 5 | cleanstruct () { 6 | echo "$1" | sed -e 's/} *//' -e 's/;$//' 7 | } 8 | 9 | cleanbody () { 10 | echo "$1" | sed -e 's/{ *//' 11 | } 12 | 13 | getstruct () { 14 | STRUCT="" 15 | BODY='' 16 | inbody=0 17 | case "$1" in 18 | *'{') inbody=1 ;; 19 | *';') return ;; 20 | esac 21 | 22 | while read line 23 | do 24 | if test $inbody -eq 0 25 | then 26 | case "$line" in 27 | '{'*) inbody=1 ;; 28 | *';') return ;; 29 | esac 30 | fi 31 | 32 | case "$line" in 33 | '} '*) 34 | STRUCT=`cleanstruct "$line"` 35 | break 36 | ;; 37 | '}') 38 | read line 39 | STRUCT=`cleanstruct "$line"` 40 | break 41 | ;; 42 | '#'*) continue ;; 43 | *) 44 | if test $inbody -ne 0 45 | then 46 | BODY="$BODY $line" 47 | fi 48 | ;; 49 | esac 50 | done 51 | 52 | case $STRUCT in 53 | ADDRESS|LIST|BUFFER|PARAMETER|BODY|ENVELOPE|HEADER) 54 | BODY=`cleanbody "$BODY"` 55 | echo "$STRUCT: $BODY" 56 | ;; 57 | esac 58 | return 59 | } 60 | 61 | DEST="$1" 62 | TMPD="$DEST.tmp" 63 | 64 | TEXT="$BASEVERSION" 65 | 66 | echo "/* base version: $BASEVERSION" > $TMPD 67 | while read line 68 | do 69 | case "$line" in 70 | 'typedef struct'*) 71 | STRUCT=`getstruct "$line"` 72 | if test -n "$STRUCT" 73 | then 74 | NAME=`echo $STRUCT | cut -d: -f1` 75 | BODY=`echo $STRUCT | cut -d' ' -f2-` 76 | echo " * $NAME:" $BODY >> $TMPD 77 | TEXT="$TEXT $NAME {$BODY}" 78 | fi 79 | ;; 80 | esac 81 | done 82 | echo " */" >> $TMPD 83 | 84 | MD5TEXT=`echo "$TEXT" | ./mutt_md5` 85 | echo "#define HCACHEVER 0x"`echo $MD5TEXT | cut -c-8` >> $TMPD 86 | 87 | # TODO: validate we have all structs 88 | 89 | mv $TMPD $DEST 90 | -------------------------------------------------------------------------------- /hg-changelog-map: -------------------------------------------------------------------------------- 1 | header = '{date|isodate} {author|person} <{author|email}> ({node|short})\n\n' 2 | changeset = '\t* {files|stringify|fill68|tabindent|strip}\n\n' 3 | file = '{file}, ' 4 | last_file = '{file}: {desc}\n\t' 5 | no_files = '{desc}' 6 | -------------------------------------------------------------------------------- /hg-commit: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | MUTTDIR=$(dirname $0) 4 | 5 | (cd $MUTTDIR && ./check_sec.sh) || exit 1 6 | 7 | if [ -f $MUTTDIR/doc/manual.xml ] ; then 8 | ( cd $MUTTDIR/doc/ && make validate ) || exit 1 9 | fi 10 | 11 | lrev=$(hg log --limit 1 --template '{rev}' $MUTTDIR/ChangeLog) 12 | trev=$(hg tip --template '{rev}') 13 | if [ $lrev = $trev ] 14 | then 15 | exec hg commit "$@" 16 | fi 17 | 18 | # Include ChangeLog if given any explicit file names 19 | i=0 20 | while [[ $i -lt $# ]] 21 | do 22 | i=$((i+1)) 23 | case "${!i}" in 24 | # no-argument options 25 | -A) continue ;; 26 | # one-argument options 27 | -?) i=$((i+1)); continue ;; 28 | # one-argument options with no space 29 | -*) continue ;; 30 | *) cl=$MUTTDIR/ChangeLog ;; 31 | esac 32 | done 33 | 34 | { 35 | hg log --no-merges --style=$MUTTDIR/hg-changelog-map -r tip:$lrev | sed 's#ChangeLog, ##' 36 | hg cat $MUTTDIR/ChangeLog 37 | } > $MUTTDIR/ChangeLog 38 | ${VISUAL:-${EDITOR:-vi}} $MUTTDIR/ChangeLog 39 | 40 | hg commit "$@" $cl 41 | -------------------------------------------------------------------------------- /history.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _HISTORY_H 20 | #define _HISTORY_H 21 | 22 | enum history_class 23 | { 24 | HC_CMD, 25 | HC_ALIAS, 26 | HC_COMMAND, 27 | HC_FILE, 28 | HC_PATTERN, 29 | HC_OTHER, 30 | HC_MBOX, 31 | /* insert new items here to keep history file working */ 32 | HC_LAST 33 | }; 34 | 35 | #define HC_FIRST HC_CMD 36 | 37 | typedef enum history_class history_class_t; 38 | 39 | void mutt_init_history(void); 40 | void mutt_read_histfile(void); 41 | void mutt_history_add(history_class_t, const char *, int); 42 | char *mutt_history_next(history_class_t); 43 | char *mutt_history_prev(history_class_t); 44 | void mutt_reset_history_state (history_class_t); 45 | int mutt_history_at_scratch (history_class_t); 46 | void mutt_history_save_scratch (history_class_t, const char *); 47 | 48 | #endif 49 | -------------------------------------------------------------------------------- /imap/Makefile.am: -------------------------------------------------------------------------------- 1 | ## Process this file with automake to produce Makefile.in 2 | include $(top_srcdir)/flymake.am 3 | 4 | AUTOMAKE_OPTIONS = 1.6 foreign 5 | 6 | if USE_GSS 7 | GSSSOURCES = auth_gss.c 8 | endif 9 | 10 | if USE_SASL 11 | AUTHENTICATORS = auth_sasl.c 12 | else 13 | AUTHENTICATORS = auth_anon.c auth_cram.c 14 | endif 15 | 16 | EXTRA_DIST = README TODO auth_anon.c auth_cram.c auth_gss.c auth_sasl.c 17 | 18 | AM_CPPFLAGS = -I$(top_srcdir) -I../intl 19 | 20 | noinst_LIBRARIES = libimap.a 21 | noinst_HEADERS = auth.h imap_private.h message.h 22 | 23 | libimap_a_SOURCES = auth.c auth_login.c browse.c command.c imap.c imap.h \ 24 | message.c utf7.c util.c $(AUTHENTICATORS) $(GSSSOURCES) 25 | -------------------------------------------------------------------------------- /imap/README: -------------------------------------------------------------------------------- 1 | IMAP in mutt should be considered beta quality. For the most part it 2 | works well, but it is still not quite as stable or as full-featured 3 | as some of the other drivers. I believe it is now acceptable for 4 | daily use (and that's how I use it now, currently against Cyrus 1.6.24 and 5 | previously against UW-IMAP 4.7 and 2000). 6 | 7 | You may still lose some work if you are suddenly disconnected from your 8 | server (but your mailboxes should be fine). Currently accessing the same 9 | IMAP folder with multiple clients is not supported - it may work, but 10 | no guarantees. There are still several non-critical known bugs, see 11 | http://bugs.guug.de/ for the current list. 12 | 13 | You may also be disappointed in mutt's handling of very large IMAP mailboxes. 14 | To build the message index mutt must fetch a subset of headers from every 15 | message in the mailbox, which costs time and network traffic linear to the 16 | number of messages in your mailbox. 17 | 18 | Nevertheless in general mutt is quite a fast and fully-featured IMAP client. 19 | It tries to be polite to IMAP servers as well, opening few connections and 20 | avoiding needless polls of the server, unlike certain other popular IMAP 21 | clients by certain large corporations :) 22 | 23 | Mutt supports almost all official authentication and security protocols for 24 | IMAP, including SSL/TLS, native CRAM-MD5 and GSSAPI routines, and a SASL 25 | plugin which can handle just about everything else. 26 | 27 | Please report bugs to mutt-dev@mutt.org and/or brendan@kublai.com. Version, 28 | options, stack-trace and .muttdebug files are a plus. 29 | 30 | Brendan Cully 31 | 20010506 32 | -------------------------------------------------------------------------------- /imap/TODO: -------------------------------------------------------------------------------- 1 | IMAP enhancements, by priority: 2 | 3 | [ -- socket -- ] 4 | 5 | * Smarter connection code. Mutt should handle dropped connections/routing 6 | problems gracefully. It should be able to transparently reconnect. This 7 | is facilitated by the next item. 8 | 9 | * Interruptible socket calls, preferably without having to abort the 10 | connection. For example large downloads could be chunked. 11 | 12 | [ -- browsing -- ] 13 | 14 | * We should maybe add a new imap_format string for IMAP browsing, without all 15 | the stat variables but with tags like how many messages are in the folders, 16 | how many subfolders, that weird \Marked tag, etc. 17 | 18 | [ -- speed -- ] 19 | 20 | * Partial index loading, using server-side threading and sorting 21 | 22 | * Partial message loading, including parsing BODYSTRUCTURE for the 23 | view-attachments menu 24 | 25 | * Disconnected mode, probably based on an augmented header cache 26 | 27 | [ -- new mail detection -- ] 28 | 29 | * Possibly opening multiple connections for mailbox polling, now that 30 | we have IDLE support. 31 | 32 | Brendan Cully 33 | Updated: 20070409 34 | -------------------------------------------------------------------------------- /imap/auth.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2000-2001 Brendan Cully 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* common defs for authenticators. A good place to set up a generic callback 20 | * system */ 21 | 22 | #ifndef _IMAP_AUTH_H 23 | #define _IMAP_AUTH_H 1 24 | 25 | typedef enum 26 | { 27 | IMAP_AUTH_SUCCESS = 0, 28 | IMAP_AUTH_FAILURE, 29 | IMAP_AUTH_UNAVAIL 30 | } imap_auth_res_t; 31 | 32 | 33 | typedef struct 34 | { 35 | /* do authentication, using named method or any available if method is NULL */ 36 | imap_auth_res_t (*authenticate) (IMAP_DATA* idata, const char* method); 37 | /* name of authentication method supported, NULL means variable. If this 38 | * is not null, authenticate may ignore the second parameter. */ 39 | const char* method; 40 | } imap_auth_t; 41 | 42 | /* external authenticator prototypes */ 43 | #ifndef USE_SASL 44 | imap_auth_res_t imap_auth_anon (IMAP_DATA* idata, const char* method); 45 | imap_auth_res_t imap_auth_cram_md5 (IMAP_DATA* idata, const char* method); 46 | #endif 47 | imap_auth_res_t imap_auth_login (IMAP_DATA* idata, const char* method); 48 | #ifdef USE_GSS 49 | imap_auth_res_t imap_auth_gss (IMAP_DATA* idata, const char* method); 50 | #endif 51 | #ifdef USE_SASL 52 | imap_auth_res_t imap_auth_sasl (IMAP_DATA* idata, const char* method); 53 | #endif 54 | 55 | #endif /* _IMAP_AUTH_H */ 56 | -------------------------------------------------------------------------------- /imap/auth_anon.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001,2005 Brendan Cully 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* IMAP login/authentication code */ 20 | 21 | #if HAVE_CONFIG_H 22 | # include "config.h" 23 | #endif 24 | 25 | #include "mutt.h" 26 | #include "imap_private.h" 27 | #include "auth.h" 28 | 29 | /* this is basically a stripped-down version of the cram-md5 method. */ 30 | imap_auth_res_t imap_auth_anon (IMAP_DATA* idata, const char* method) 31 | { 32 | int rc; 33 | 34 | if (!mutt_bit_isset (idata->capabilities, AUTH_ANON)) 35 | return IMAP_AUTH_UNAVAIL; 36 | 37 | if (mutt_account_getuser (&idata->conn->account)) 38 | return IMAP_AUTH_FAILURE; 39 | 40 | if (idata->conn->account.user[0] != '\0') 41 | return IMAP_AUTH_UNAVAIL; 42 | 43 | mutt_message _("Authenticating (anonymous)..."); 44 | 45 | imap_cmd_start (idata, "AUTHENTICATE ANONYMOUS"); 46 | 47 | do 48 | rc = imap_cmd_step (idata); 49 | while (rc == IMAP_CMD_CONTINUE); 50 | 51 | if (rc != IMAP_CMD_RESPOND) 52 | { 53 | dprint (1, (debugfile, "Invalid response from server.\n")); 54 | goto bail; 55 | } 56 | 57 | mutt_socket_write (idata->conn, "ZHVtbXkK\r\n"); /* base64 ("dummy") */ 58 | 59 | do 60 | rc = imap_cmd_step (idata); 61 | while (rc == IMAP_CMD_CONTINUE); 62 | 63 | if (rc != IMAP_CMD_OK) 64 | { 65 | dprint (1, (debugfile, "Error receiving server response.\n")); 66 | goto bail; 67 | } 68 | 69 | if (imap_code (idata->buf)) 70 | return IMAP_AUTH_SUCCESS; 71 | 72 | bail: 73 | mutt_error _("Anonymous authentication failed."); 74 | mutt_sleep (2); 75 | return IMAP_AUTH_FAILURE; 76 | } 77 | -------------------------------------------------------------------------------- /imap/auth_login.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2001,2005,2009 Brendan Cully 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* plain LOGIN support */ 20 | 21 | #if HAVE_CONFIG_H 22 | # include "config.h" 23 | #endif 24 | 25 | #include "mutt.h" 26 | #include "imap_private.h" 27 | #include "auth.h" 28 | 29 | /* imap_auth_login: Plain LOGIN support */ 30 | imap_auth_res_t imap_auth_login (IMAP_DATA* idata, const char* method) 31 | { 32 | char q_user[SHORT_STRING], q_pass[SHORT_STRING]; 33 | char buf[STRING]; 34 | int rc; 35 | 36 | if (mutt_bit_isset (idata->capabilities, LOGINDISABLED)) 37 | { 38 | mutt_message _("LOGIN disabled on this server."); 39 | return IMAP_AUTH_UNAVAIL; 40 | } 41 | 42 | if (mutt_account_getuser (&idata->conn->account)) 43 | return IMAP_AUTH_FAILURE; 44 | if (mutt_account_getpass (&idata->conn->account)) 45 | return IMAP_AUTH_FAILURE; 46 | 47 | mutt_message _("Logging in..."); 48 | 49 | imap_quote_string (q_user, sizeof (q_user), idata->conn->account.user); 50 | imap_quote_string (q_pass, sizeof (q_pass), idata->conn->account.pass); 51 | 52 | #ifdef DEBUG 53 | /* don't print the password unless we're at the ungodly debugging level 54 | * of 5 or higher */ 55 | 56 | if (debuglevel < IMAP_LOG_PASS) 57 | dprint (2, (debugfile, "Sending LOGIN command for %s...\n", 58 | idata->conn->account.user)); 59 | #endif 60 | 61 | snprintf (buf, sizeof (buf), "LOGIN %s %s", q_user, q_pass); 62 | rc = imap_exec (idata, buf, IMAP_CMD_FAIL_OK | IMAP_CMD_PASS); 63 | 64 | if (!rc) 65 | { 66 | mutt_clear_error(); /* clear "Logging in...". fixes #3524 */ 67 | return IMAP_AUTH_SUCCESS; 68 | } 69 | 70 | mutt_error _("Login failed."); 71 | mutt_sleep (2); 72 | return IMAP_AUTH_FAILURE; 73 | } 74 | -------------------------------------------------------------------------------- /imap/message.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-1999 Brandon Long 3 | * Copyright (C) 1999-2000,2005 Brendan Cully 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | /* message.c data structures */ 21 | 22 | #ifndef MESSAGE_H 23 | #define MESSAGE_H 1 24 | 25 | /* -- data structures -- */ 26 | /* IMAP-specific header data, stored as HEADER->data */ 27 | typedef struct imap_header_data 28 | { 29 | /* server-side flags */ 30 | unsigned int read : 1; 31 | unsigned int old : 1; 32 | unsigned int deleted : 1; 33 | unsigned int flagged : 1; 34 | unsigned int replied : 1; 35 | unsigned int changed : 1; 36 | 37 | unsigned int parsed : 1; 38 | 39 | unsigned int uid; /* 32-bit Message UID */ 40 | LIST *keywords; 41 | } IMAP_HEADER_DATA; 42 | 43 | typedef struct 44 | { 45 | unsigned int sid; 46 | 47 | IMAP_HEADER_DATA* data; 48 | 49 | time_t received; 50 | long content_length; 51 | } IMAP_HEADER; 52 | 53 | /* -- macros -- */ 54 | #define HEADER_DATA(ph) ((IMAP_HEADER_DATA*) ((ph)->data)) 55 | 56 | #endif /* MESSAGE_H */ 57 | -------------------------------------------------------------------------------- /intl/ChangeLog: -------------------------------------------------------------------------------- 1 | 2001-09-13 GNU 2 | 3 | * Version 0.10.40 released. 4 | 5 | -------------------------------------------------------------------------------- /intl/VERSION: -------------------------------------------------------------------------------- 1 | GNU gettext library from gettext-0.10.40 2 | -------------------------------------------------------------------------------- /intl/cat-compat.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/intl/cat-compat.c -------------------------------------------------------------------------------- /intl/dcgettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of the dcgettext(3) function. 2 | Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "gettextP.h" 24 | #ifdef _LIBC 25 | # include 26 | #else 27 | # include "libgnuintl.h" 28 | #endif 29 | 30 | /* @@ end of prolog @@ */ 31 | 32 | /* Names for the libintl functions are a problem. They must not clash 33 | with existing names and they should follow ANSI C. But this source 34 | code is also used in GNU C Library where the names have a __ 35 | prefix. So we have to make a difference here. */ 36 | #ifdef _LIBC 37 | # define DCGETTEXT __dcgettext 38 | # define DCIGETTEXT __dcigettext 39 | #else 40 | # define DCGETTEXT dcgettext__ 41 | # define DCIGETTEXT dcigettext__ 42 | #endif 43 | 44 | /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY 45 | locale. */ 46 | char * 47 | DCGETTEXT (domainname, msgid, category) 48 | const char *domainname; 49 | const char *msgid; 50 | int category; 51 | { 52 | return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category); 53 | } 54 | 55 | #ifdef _LIBC 56 | /* Alias for function name in GNU C Library. */ 57 | weak_alias (__dcgettext, dcgettext); 58 | #endif 59 | -------------------------------------------------------------------------------- /intl/dcngettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of the dcngettext(3) function. 2 | Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include "gettextP.h" 24 | #ifdef _LIBC 25 | # include 26 | #else 27 | # include "libgnuintl.h" 28 | #endif 29 | 30 | /* @@ end of prolog @@ */ 31 | 32 | /* Names for the libintl functions are a problem. They must not clash 33 | with existing names and they should follow ANSI C. But this source 34 | code is also used in GNU C Library where the names have a __ 35 | prefix. So we have to make a difference here. */ 36 | #ifdef _LIBC 37 | # define DCNGETTEXT __dcngettext 38 | # define DCIGETTEXT __dcigettext 39 | #else 40 | # define DCNGETTEXT dcngettext__ 41 | # define DCIGETTEXT dcigettext__ 42 | #endif 43 | 44 | /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY 45 | locale. */ 46 | char * 47 | DCNGETTEXT (domainname, msgid1, msgid2, n, category) 48 | const char *domainname; 49 | const char *msgid1; 50 | const char *msgid2; 51 | unsigned long int n; 52 | int category; 53 | { 54 | return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category); 55 | } 56 | 57 | #ifdef _LIBC 58 | /* Alias for function name in GNU C Library. */ 59 | weak_alias (__dcngettext, dcngettext); 60 | #endif 61 | -------------------------------------------------------------------------------- /intl/dgettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of the dgettext(3) function. 2 | Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include 24 | 25 | #include "gettextP.h" 26 | #ifdef _LIBC 27 | # include 28 | #else 29 | # include "libgnuintl.h" 30 | #endif 31 | 32 | /* @@ end of prolog @@ */ 33 | 34 | /* Names for the libintl functions are a problem. They must not clash 35 | with existing names and they should follow ANSI C. But this source 36 | code is also used in GNU C Library where the names have a __ 37 | prefix. So we have to make a difference here. */ 38 | #ifdef _LIBC 39 | # define DGETTEXT __dgettext 40 | # define DCGETTEXT __dcgettext 41 | #else 42 | # define DGETTEXT dgettext__ 43 | # define DCGETTEXT dcgettext__ 44 | #endif 45 | 46 | /* Look up MSGID in the DOMAINNAME message catalog of the current 47 | LC_MESSAGES locale. */ 48 | char * 49 | DGETTEXT (domainname, msgid) 50 | const char *domainname; 51 | const char *msgid; 52 | { 53 | return DCGETTEXT (domainname, msgid, LC_MESSAGES); 54 | } 55 | 56 | #ifdef _LIBC 57 | /* Alias for function name in GNU C Library. */ 58 | weak_alias (__dgettext, dgettext); 59 | #endif 60 | -------------------------------------------------------------------------------- /intl/dngettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of the dngettext(3) function. 2 | Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #include 24 | 25 | #include "gettextP.h" 26 | #ifdef _LIBC 27 | # include 28 | #else 29 | # include "libgnuintl.h" 30 | #endif 31 | 32 | /* @@ end of prolog @@ */ 33 | 34 | /* Names for the libintl functions are a problem. They must not clash 35 | with existing names and they should follow ANSI C. But this source 36 | code is also used in GNU C Library where the names have a __ 37 | prefix. So we have to make a difference here. */ 38 | #ifdef _LIBC 39 | # define DNGETTEXT __dngettext 40 | # define DCNGETTEXT __dcngettext 41 | #else 42 | # define DNGETTEXT dngettext__ 43 | # define DCNGETTEXT dcngettext__ 44 | #endif 45 | 46 | /* Look up MSGID in the DOMAINNAME message catalog of the current 47 | LC_MESSAGES locale and skip message according to the plural form. */ 48 | char * 49 | DNGETTEXT (domainname, msgid1, msgid2, n) 50 | const char *domainname; 51 | const char *msgid1; 52 | const char *msgid2; 53 | unsigned long int n; 54 | { 55 | return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES); 56 | } 57 | 58 | #ifdef _LIBC 59 | /* Alias for function name in GNU C Library. */ 60 | weak_alias (__dngettext, dngettext); 61 | #endif 62 | -------------------------------------------------------------------------------- /intl/gettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of gettext(3) function. 2 | Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #ifdef _LIBC 24 | # define __need_NULL 25 | # include 26 | #else 27 | # include /* Just for NULL. */ 28 | #endif 29 | 30 | #include "gettextP.h" 31 | #ifdef _LIBC 32 | # include 33 | #else 34 | # include "libgnuintl.h" 35 | #endif 36 | 37 | /* @@ end of prolog @@ */ 38 | 39 | /* Names for the libintl functions are a problem. They must not clash 40 | with existing names and they should follow ANSI C. But this source 41 | code is also used in GNU C Library where the names have a __ 42 | prefix. So we have to make a difference here. */ 43 | #ifdef _LIBC 44 | # define GETTEXT __gettext 45 | # define DCGETTEXT __dcgettext 46 | #else 47 | # define GETTEXT gettext__ 48 | # define DCGETTEXT dcgettext__ 49 | #endif 50 | 51 | /* Look up MSGID in the current default message catalog for the current 52 | LC_MESSAGES locale. If not found, returns MSGID itself (the default 53 | text). */ 54 | char * 55 | GETTEXT (msgid) 56 | const char *msgid; 57 | { 58 | return DCGETTEXT (NULL, msgid, LC_MESSAGES); 59 | } 60 | 61 | #ifdef _LIBC 62 | /* Alias for function name in GNU C Library. */ 63 | weak_alias (__gettext, gettext); 64 | #endif 65 | -------------------------------------------------------------------------------- /intl/hash-string.h: -------------------------------------------------------------------------------- 1 | /* Description of GNU message catalog format: string hashing function. 2 | Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | /* @@ end of prolog @@ */ 20 | 21 | #ifndef PARAMS 22 | # if __STDC__ 23 | # define PARAMS(Args) Args 24 | # else 25 | # define PARAMS(Args) () 26 | # endif 27 | #endif 28 | 29 | /* We assume to have `unsigned long int' value with at least 32 bits. */ 30 | #define HASHWORDBITS 32 31 | 32 | 33 | /* Defines the so called `hashpjw' function by P.J. Weinberger 34 | [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, 35 | 1986, 1987 Bell Telephone Laboratories, Inc.] */ 36 | static unsigned long int hash_string PARAMS ((const char *__str_param)); 37 | 38 | static inline unsigned long int 39 | hash_string (str_param) 40 | const char *str_param; 41 | { 42 | unsigned long int hval, g; 43 | const char *str = str_param; 44 | 45 | /* Compute the hash value for the given string. */ 46 | hval = 0; 47 | while (*str != '\0') 48 | { 49 | hval <<= 4; 50 | hval += (unsigned long int) *str++; 51 | g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); 52 | if (g != 0) 53 | { 54 | hval ^= g >> (HASHWORDBITS - 8); 55 | hval ^= g; 56 | } 57 | } 58 | return hval; 59 | } 60 | -------------------------------------------------------------------------------- /intl/libgettext.h: -------------------------------------------------------------------------------- 1 | /* Convenience header for conditional use of GNU . 2 | Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifndef _LIBGETTEXT_H 20 | #define _LIBGETTEXT_H 1 21 | 22 | /* NLS can be disabled through the configure --disable-nls option. */ 23 | #if ENABLE_NLS 24 | 25 | /* Get declarations of GNU message catalog functions. */ 26 | # include 27 | 28 | #else 29 | 30 | # define gettext(Msgid) (Msgid) 31 | # define dgettext(Domainname, Msgid) (Msgid) 32 | # define dcgettext(Domainname, Msgid, Category) (Msgid) 33 | # define ngettext(Msgid1, Msgid2, N) \ 34 | ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) 35 | # define dngettext(Domainname, Msgid1, Msgid2, N) \ 36 | ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) 37 | # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ 38 | ((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2)) 39 | # define textdomain(Domainname) ((char *) (Domainname)) 40 | # define bindtextdomain(Domainname, Dirname) ((char *) (Dirname)) 41 | # define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset)) 42 | 43 | #endif 44 | 45 | /* For automatical extraction of messages sometimes no real 46 | translation is needed. Instead the string itself is the result. */ 47 | #define gettext_noop(Str) (Str) 48 | 49 | #endif /* _LIBGETTEXT_H */ 50 | -------------------------------------------------------------------------------- /intl/linux-msg.sed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/intl/linux-msg.sed -------------------------------------------------------------------------------- /intl/locale.alias: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/intl/locale.alias -------------------------------------------------------------------------------- /intl/ngettext.c: -------------------------------------------------------------------------------- 1 | /* Implementation of ngettext(3) function. 2 | Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc. 3 | 4 | This program is free software; you can redistribute it and/or modify it 5 | under the terms of the GNU Library General Public License as published 6 | by the Free Software Foundation; either version 2, or (at your option) 7 | any later version. 8 | 9 | This program is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Library General Public License for more details. 13 | 14 | You should have received a copy of the GNU Library General Public 15 | License along with this program; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 17 | USA. */ 18 | 19 | #ifdef HAVE_CONFIG_H 20 | # include 21 | #endif 22 | 23 | #ifdef _LIBC 24 | # define __need_NULL 25 | # include 26 | #else 27 | # include /* Just for NULL. */ 28 | #endif 29 | 30 | #include "gettextP.h" 31 | #ifdef _LIBC 32 | # include 33 | #else 34 | # include "libgnuintl.h" 35 | #endif 36 | 37 | #include 38 | 39 | /* @@ end of prolog @@ */ 40 | 41 | /* Names for the libintl functions are a problem. They must not clash 42 | with existing names and they should follow ANSI C. But this source 43 | code is also used in GNU C Library where the names have a __ 44 | prefix. So we have to make a difference here. */ 45 | #ifdef _LIBC 46 | # define NGETTEXT __ngettext 47 | # define DCNGETTEXT __dcngettext 48 | #else 49 | # define NGETTEXT ngettext__ 50 | # define DCNGETTEXT dcngettext__ 51 | #endif 52 | 53 | /* Look up MSGID in the current default message catalog for the current 54 | LC_MESSAGES locale. If not found, returns MSGID itself (the default 55 | text). */ 56 | char * 57 | NGETTEXT (msgid1, msgid2, n) 58 | const char *msgid1; 59 | const char *msgid2; 60 | unsigned long int n; 61 | { 62 | return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES); 63 | } 64 | 65 | #ifdef _LIBC 66 | /* Alias for function name in GNU C Library. */ 67 | weak_alias (__ngettext, ngettext); 68 | #endif 69 | -------------------------------------------------------------------------------- /intl/po2tbl.sed.in: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/intl/po2tbl.sed.in -------------------------------------------------------------------------------- /intl/ref-add.sin: -------------------------------------------------------------------------------- 1 | # Add this package to a list of references stored in a text file. 2 | # 3 | # Copyright (C) 2000 Free Software Foundation, Inc. 4 | # 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU Library General Public License as published 7 | # by the Free Software Foundation; either version 2, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | # 20 | # Written by Bruno Haible . 21 | # 22 | /^# Packages using this file: / { 23 | s/# Packages using this file:// 24 | ta 25 | :a 26 | s/ @PACKAGE@ / @PACKAGE@ / 27 | tb 28 | s/ $/ @PACKAGE@ / 29 | :b 30 | s/^/# Packages using this file:/ 31 | } 32 | -------------------------------------------------------------------------------- /intl/ref-del.sin: -------------------------------------------------------------------------------- 1 | # Remove this package from a list of references stored in a text file. 2 | # 3 | # Copyright (C) 2000 Free Software Foundation, Inc. 4 | # 5 | # This program is free software; you can redistribute it and/or modify it 6 | # under the terms of the GNU Library General Public License as published 7 | # by the Free Software Foundation; either version 2, or (at your option) 8 | # any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | # Library General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU Library General Public 16 | # License along with this program; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 18 | # USA. 19 | # 20 | # Written by Bruno Haible . 21 | # 22 | /^# Packages using this file: / { 23 | s/# Packages using this file:// 24 | s/ @PACKAGE@ / / 25 | s/^/# Packages using this file:/ 26 | } 27 | -------------------------------------------------------------------------------- /intl/xopen-msg.sed: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/intl/xopen-msg.sed -------------------------------------------------------------------------------- /m4/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST = README 2 | 3 | dist-hook: 4 | for i in $(srcdir)/*.m4 ; do \ 5 | cp -f -p $$i $(distdir) ; \ 6 | done 7 | -------------------------------------------------------------------------------- /m4/README: -------------------------------------------------------------------------------- 1 | These files are used by a program called aclocal (part of the GNU automake 2 | package). aclocal uses these files to create aclocal.m4 which is in turn 3 | used by autoconf to create the configure script at the the top level in 4 | this distribution. 5 | -------------------------------------------------------------------------------- /m4/codeset.m4: -------------------------------------------------------------------------------- 1 | #serial 1 2 | 3 | dnl From Bruno Haible. 4 | 5 | AC_DEFUN([MUTT_AM_LANGINFO_CODESET], 6 | [ 7 | AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, 8 | [AC_TRY_LINK([#include ], 9 | [char* cs = nl_langinfo(CODESET);], 10 | am_cv_langinfo_codeset=yes, 11 | am_cv_langinfo_codeset=no) 12 | ]) 13 | if test $am_cv_langinfo_codeset = yes; then 14 | AC_DEFINE(HAVE_LANGINFO_CODESET, 1, 15 | [Define if you have and nl_langinfo(CODESET).]) 16 | fi 17 | ]) 18 | -------------------------------------------------------------------------------- /m4/funcdecl.m4: -------------------------------------------------------------------------------- 1 | dnl --------------------------------------------------------------------------- 2 | dnl Check if a function is declared by including a set of include files. 3 | dnl Invoke the corresponding actions according to whether it is found or not. 4 | dnl 5 | dnl Gcc (unlike other compilers) will only warn about the miscast assignment 6 | dnl in the first test, but most compilers will oblige with an error in the 7 | dnl second test. 8 | dnl 9 | dnl CF_CHECK_FUNCDECL(INCLUDES, FUNCTION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 10 | AC_DEFUN([CF_CHECK_FUNCDECL], 11 | [ 12 | AC_MSG_CHECKING([for $2 declaration]) 13 | AC_CACHE_VAL(ac_cv_func_decl_$2, 14 | [AC_TRY_COMPILE([$1], 15 | [#ifndef ${ac_func} 16 | extern int ${ac_func}(); 17 | #endif],[ 18 | AC_TRY_COMPILE([$1], 19 | [#ifndef ${ac_func} 20 | int (*p)() = ${ac_func}; 21 | #endif],[ 22 | eval "ac_cv_func_decl_$2=yes"],[ 23 | eval "ac_cv_func_decl_$2=no"])],[ 24 | eval "ac_cv_func_decl_$2=yes"])]) 25 | if eval "test \"`echo '$ac_cv_func_'decl_$2`\" = yes"; then 26 | AC_MSG_RESULT(yes) 27 | ifelse([$3], , :, [$3]) 28 | else 29 | AC_MSG_RESULT(no) 30 | ifelse([$4], , , [$4 31 | ])dnl 32 | fi 33 | ])dnl 34 | dnl --------------------------------------------------------------------------- 35 | dnl Check if functions are declared by including a set of include files. 36 | dnl and define DECL_XXX if not. 37 | dnl 38 | dnl CF_CHECK_FUNCDECLS(INCLUDES, FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) 39 | AC_DEFUN([CF_CHECK_FUNCDECLS], 40 | [for ac_func in $2 41 | do 42 | CF_CHECK_FUNCDECL([$1], $ac_func, 43 | [ 44 | CF_UPPER(ac_tr_func,HAVE_$ac_func) 45 | AC_DEFINE_UNQUOTED($ac_tr_func) $3], 46 | [$4])dnl 47 | dnl [$3], 48 | dnl [ 49 | dnl CF_UPPER(ac_tr_func,DECL_$ac_func) 50 | dnl AC_DEFINE_UNQUOTED($ac_tr_func) $4])dnl 51 | done 52 | ])dnl 53 | dnl --------------------------------------------------------------------------- 54 | dnl Make an uppercase version of a variable 55 | dnl $1=uppercase($2) 56 | AC_DEFUN([CF_UPPER], 57 | [ 58 | changequote(,)dnl 59 | $1=`echo $2 | tr '[a-z]' '[A-Z]'` 60 | changequote([,])dnl 61 | ])dnl 62 | dnl --------------------------------------------------------------------------- 63 | -------------------------------------------------------------------------------- /m4/funcs.m4: -------------------------------------------------------------------------------- 1 | dnl XIPH_ macros are GPL, from http://svn.xiph.org/icecast/trunk/m4 2 | dnl 3 | # XIPH_FUNC_VA_COPY 4 | # Test for implementation of va_copy, or define appropriately if missing 5 | AC_DEFUN([XIPH_FUNC_VA_COPY], 6 | [dnl 7 | AC_MSG_CHECKING([for va_copy]) 8 | AC_TRY_LINK([#include ], [va_list ap1, ap2; va_copy(ap1, ap2);], 9 | AC_MSG_RESULT([va_copy]), 10 | [dnl 11 | AH_TEMPLATE([va_copy], [define if va_copy is not available]) 12 | AC_TRY_LINK([#include ], [va_list ap1, ap2; __va_copy(ap1, ap2);], 13 | [dnl 14 | AC_DEFINE([va_copy], [__va_copy]) 15 | AC_MSG_RESULT([__va_copy])], 16 | [dnl 17 | AC_DEFINE([va_copy(dest,src)], [memcpy(&dest,&src,sizeof(va_list))]) 18 | AC_MSG_RESULT([memcpy]) 19 | ]) 20 | ]) 21 | ]) 22 | ])dnl XIPH_FUNC_VA_COPY 23 | -------------------------------------------------------------------------------- /m4/glibc21.m4: -------------------------------------------------------------------------------- 1 | #serial 2 2 | 3 | # Test for the GNU C Library, version 2.1 or newer. 4 | # From Bruno Haible. 5 | 6 | AC_DEFUN([MUTT_jm_GLIBC21], 7 | [ 8 | AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, 9 | ac_cv_gnu_library_2_1, 10 | [AC_EGREP_CPP([Lucky GNU user], 11 | [ 12 | #include 13 | #ifdef __GNU_LIBRARY__ 14 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 15 | Lucky GNU user 16 | #endif 17 | #endif 18 | ], 19 | ac_cv_gnu_library_2_1=yes, 20 | ac_cv_gnu_library_2_1=no) 21 | ] 22 | ) 23 | AC_SUBST(GLIBC21) 24 | GLIBC21="$ac_cv_gnu_library_2_1" 25 | ] 26 | ) 27 | -------------------------------------------------------------------------------- /m4/iconv.m4: -------------------------------------------------------------------------------- 1 | #serial 2 2 | 3 | dnl From Bruno Haible. 4 | 5 | AC_DEFUN([MUTT_AM_ICONV], 6 | [ 7 | dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and 8 | dnl those with the standalone portable GNU libiconv installed). 9 | 10 | AC_ARG_WITH([libiconv-prefix], 11 | AC_HELP_STRING([--with-libiconv-prefix@<:@=DIR@:>@], [Search for libiconv in DIR/include and DIR/lib]), [ 12 | for dir in `echo "$withval" | tr : ' '`; do 13 | if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi 14 | if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi 15 | done 16 | ]) 17 | 18 | AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ 19 | am_cv_func_iconv="no, consider installing GNU libiconv" 20 | am_cv_lib_iconv=no 21 | AC_TRY_LINK([#include 22 | #include ], 23 | [iconv_t cd = iconv_open("",""); 24 | iconv(cd,NULL,NULL,NULL,NULL); 25 | iconv_close(cd);], 26 | am_cv_func_iconv=yes) 27 | if test "$am_cv_func_iconv" != yes; then 28 | am_save_LIBS="$LIBS" 29 | LIBS="$LIBS -liconv" 30 | AC_TRY_LINK([#include 31 | #include ], 32 | [iconv_t cd = iconv_open("",""); 33 | iconv(cd,NULL,NULL,NULL,NULL); 34 | iconv_close(cd);], 35 | am_cv_lib_iconv=yes 36 | am_cv_func_iconv=yes) 37 | LIBS="$am_save_LIBS" 38 | fi 39 | ]) 40 | if test "$am_cv_func_iconv" = yes; then 41 | AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) 42 | AC_MSG_CHECKING([for iconv declaration]) 43 | AC_CACHE_VAL(am_cv_proto_iconv, [ 44 | AC_TRY_COMPILE([ 45 | #include 46 | #include 47 | extern 48 | #ifdef __cplusplus 49 | "C" 50 | #endif 51 | #if defined(__STDC__) || defined(__cplusplus) 52 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); 53 | #else 54 | size_t iconv(); 55 | #endif 56 | ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") 57 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) 58 | am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` 59 | AC_MSG_RESULT([$]{ac_t:- 60 | }[$]am_cv_proto_iconv) 61 | AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, 62 | [Define as const if the declaration of iconv() needs const.]) 63 | fi 64 | LIBICONV= 65 | if test "$am_cv_lib_iconv" = yes; then 66 | LIBICONV="-liconv" 67 | fi 68 | AC_SUBST(LIBICONV) 69 | ]) 70 | -------------------------------------------------------------------------------- /m4/lcmessage.m4: -------------------------------------------------------------------------------- 1 | # Check whether LC_MESSAGES is available in . 2 | # Ulrich Drepper , 1995. 3 | # 4 | # This file can be copied and used freely without restrictions. It can 5 | # be used in projects which are not available under the GNU General Public 6 | # License or the GNU Library General Public License but which still want 7 | # to provide support for the GNU gettext functionality. 8 | # Please note that the actual code of the GNU gettext library is covered 9 | # by the GNU Library General Public License, and the rest of the GNU 10 | # gettext package package is covered by the GNU General Public License. 11 | # They are *not* in the public domain. 12 | 13 | # serial 2 14 | 15 | AC_DEFUN([MUTT_AM_LC_MESSAGES], 16 | [if test $ac_cv_header_locale_h = yes; then 17 | AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, 18 | [AC_TRY_LINK([#include ], [return LC_MESSAGES], 19 | am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) 20 | if test $am_cv_val_LC_MESSAGES = yes; then 21 | AC_DEFINE(HAVE_LC_MESSAGES, 1, 22 | [Define if your file defines LC_MESSAGES.]) 23 | fi 24 | fi]) 25 | -------------------------------------------------------------------------------- /m4/progtest.m4: -------------------------------------------------------------------------------- 1 | # Search path for a program which passes the given test. 2 | # Ulrich Drepper , 1996. 3 | # 4 | # This file can be copied and used freely without restrictions. It can 5 | # be used in projects which are not available under the GNU General Public 6 | # License or the GNU Library General Public License but which still want 7 | # to provide support for the GNU gettext functionality. 8 | # Please note that the actual code of the GNU gettext library is covered 9 | # by the GNU Library General Public License, and the rest of the GNU 10 | # gettext package package is covered by the GNU General Public License. 11 | # They are *not* in the public domain. 12 | 13 | # serial 2 14 | 15 | dnl MUTT_AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, 16 | dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) 17 | AC_DEFUN([MUTT_AM_PATH_PROG_WITH_TEST], 18 | [# Extract the first word of "$2", so it can be a program name with args. 19 | set dummy $2; ac_word=[$]2 20 | AC_MSG_CHECKING([for $ac_word]) 21 | AC_CACHE_VAL(ac_cv_path_$1, 22 | [case "[$]$1" in 23 | /*) 24 | ac_cv_path_$1="[$]$1" # Let the user override the test with a path. 25 | ;; 26 | *) 27 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" 28 | for ac_dir in ifelse([$5], , $PATH, [$5]); do 29 | test -z "$ac_dir" && ac_dir=. 30 | if test -f $ac_dir/$ac_word; then 31 | if [$3]; then 32 | ac_cv_path_$1="$ac_dir/$ac_word" 33 | break 34 | fi 35 | fi 36 | done 37 | IFS="$ac_save_ifs" 38 | dnl If no 4th arg is given, leave the cache variable unset, 39 | dnl so AC_PATH_PROGS will keep looking. 40 | ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" 41 | ])dnl 42 | ;; 43 | esac])dnl 44 | $1="$ac_cv_path_$1" 45 | if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then 46 | AC_MSG_RESULT([$]$1) 47 | else 48 | AC_MSG_RESULT(no) 49 | fi 50 | AC_SUBST($1)dnl 51 | ]) 52 | -------------------------------------------------------------------------------- /m4/types.m4: -------------------------------------------------------------------------------- 1 | dnl types.m4 2 | dnl macros for type checks not covered by autoconf 3 | 4 | dnl MUTT_C99_INTTYPES 5 | dnl Brendan Cully 6 | dnl 7 | # MUTT_C99_INTTYPES 8 | # Check for C99 integer type definitions, or define if missing 9 | AC_DEFUN([MUTT_C99_INTTYPES], 10 | [dnl 11 | AC_CHECK_HEADERS([inttypes.h]) 12 | AC_CHECK_TYPE([uint32_t], 13 | [AC_DEFINE(HAVE_C99_INTTYPES, 1, [Define if you have the C99 integer types])]) 14 | AC_CHECK_SIZEOF(short) 15 | AC_CHECK_SIZEOF(int) 16 | AC_CHECK_SIZEOF(long) 17 | AC_CHECK_SIZEOF(long long)]) 18 | AH_VERBATIM([X_HAVE_C99_INTTYPES], 19 | [#ifndef HAVE_C99_INTTYPES 20 | # if SIZEOF_SHORT == 4 21 | typedef unsigned short uint32_t; 22 | # elif SIZEOF_INT == 4 23 | typedef unsigned int uint32_t; 24 | # elif SIZEOF_LONG == 4 25 | typedef unsigned long uint32_t; 26 | # endif 27 | # if SIZEOF_INT == 8 28 | typedef unsigned int uint64_t; 29 | # elif SIZEOF_LONG == 8 30 | typedef unsigned long uint64_t; 31 | # elif SIZEOF_LONG_LONG == 8 32 | typedef unsigned long long uint64_t; 33 | # endif 34 | #endif 35 | ]) 36 | -------------------------------------------------------------------------------- /mapping.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef MAPPING_H 20 | #define MAPPING_H 21 | 22 | struct mapping_t 23 | { 24 | const char *name; 25 | int value; 26 | }; 27 | 28 | const char *mutt_getnamebyvalue (int, const struct mapping_t *); 29 | char *mutt_compile_help (char *, size_t, int, const struct mapping_t *); 30 | 31 | int mutt_getvaluebyname (const char *, const struct mapping_t *); 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /mbyte.h: -------------------------------------------------------------------------------- 1 | #ifndef _MBYTE_H 2 | # define _MBYTE_H 3 | 4 | # ifdef HAVE_WC_FUNCS 5 | # ifdef HAVE_WCHAR_H 6 | # include 7 | # endif 8 | # ifdef HAVE_WCTYPE_H 9 | # include 10 | # endif 11 | # endif 12 | 13 | # ifndef HAVE_WC_FUNCS 14 | #ifdef towupper 15 | # undef towupper 16 | #endif 17 | #ifdef towlower 18 | # undef towlower 19 | #endif 20 | #ifdef iswprint 21 | # undef iswprint 22 | #endif 23 | #ifdef iswspace 24 | # undef iswspace 25 | #endif 26 | #ifdef iswalnum 27 | # undef iswalnum 28 | #endif 29 | #ifdef iswalpha 30 | # undef iswalpha 31 | #endif 32 | #ifdef iswupper 33 | # undef iswupper 34 | #endif 35 | size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps); 36 | size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); 37 | int iswprint (wint_t wc); 38 | int iswspace (wint_t wc); 39 | int iswalnum (wint_t wc); 40 | int iswalpha (wint_t wc); 41 | int iswupper (wint_t wc); 42 | wint_t towupper (wint_t wc); 43 | wint_t towlower (wint_t wc); 44 | int wcwidth (wchar_t wc); 45 | # endif /* !HAVE_WC_FUNCS */ 46 | 47 | 48 | void mutt_set_charset (char *charset); 49 | extern int Charset_is_utf8; 50 | size_t utf8rtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *_ps); 51 | wchar_t replacement_char (void); 52 | 53 | #endif /* _MBYTE_H */ 54 | -------------------------------------------------------------------------------- /mime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000,2010 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* Content-Type */ 20 | enum 21 | { 22 | TYPEOTHER, 23 | TYPEAUDIO, 24 | TYPEAPPLICATION, 25 | TYPEIMAGE, 26 | TYPEMESSAGE, 27 | TYPEMODEL, 28 | TYPEMULTIPART, 29 | TYPETEXT, 30 | TYPEVIDEO, 31 | TYPEANY 32 | }; 33 | 34 | /* Content-Transfer-Encoding */ 35 | enum 36 | { 37 | ENCOTHER, 38 | ENC7BIT, 39 | ENC8BIT, 40 | ENCQUOTEDPRINTABLE, 41 | ENCBASE64, 42 | ENCBINARY, 43 | ENCUUENCODED 44 | }; 45 | 46 | /* Content-Disposition values */ 47 | enum 48 | { 49 | DISPINLINE, 50 | DISPATTACH, 51 | DISPFORMDATA, 52 | DISPNONE /* no preferred disposition */ 53 | }; 54 | 55 | /* MIME encoding/decoding global vars */ 56 | 57 | #ifndef _SENDLIB_C 58 | extern const int Index_hex[]; 59 | extern const int Index_64[]; 60 | extern const char B64Chars[]; 61 | #endif 62 | 63 | #define hexval(c) Index_hex[(unsigned int)(c)] 64 | #define base64val(c) Index_64[(unsigned int)(c)] 65 | 66 | #define is_multipart(x) \ 67 | ((x)->type == TYPEMULTIPART \ 68 | || ((x)->type == TYPEMESSAGE && (!strcasecmp((x)->subtype, "rfc822") \ 69 | || !strcasecmp((x)->subtype, "news")))) 70 | 71 | extern const char *BodyTypes[]; 72 | extern const char *BodyEncodings[]; 73 | 74 | #define TYPE(X) ((X->type == TYPEOTHER) && (X->xtype != NULL) ? X->xtype : BodyTypes[(X->type)]) 75 | #define ENCODING(X) BodyEncodings[(X)] 76 | 77 | /* other MIME-related global variables */ 78 | #ifndef _SENDLIB_C 79 | extern char MimeSpecials[]; 80 | #endif 81 | -------------------------------------------------------------------------------- /mkchangelog.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | lrev=$(hg log --limit 1 --template '{rev}' ChangeLog) 4 | 5 | hg log --style=./hg-changelog-map -r "reverse($lrev::.)" 6 | -------------------------------------------------------------------------------- /mkdtemp.c: -------------------------------------------------------------------------------- 1 | /* taken from XFCE's Xarchiver, made to work without glib for mutt */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | /* mkdtemp function for systems which don't have one */ 10 | char *mkdtemp (char *tmpl) 11 | { 12 | static const char LETTERS[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 13 | static long value = 0; 14 | long v; 15 | int len; 16 | int i, j; 17 | 18 | len = strlen (tmpl); 19 | if (len < 6 || strcmp (&tmpl[len - 6], "XXXXXX") != 0) 20 | { 21 | errno = EINVAL; 22 | return NULL; 23 | } 24 | 25 | value += ((long) time (NULL)) ^ getpid (); 26 | 27 | for (i = 0; i < 7 ; ++i, value += 7777) 28 | { 29 | /* fill in the random bits */ 30 | for (j = 0, v = value; j < 6; ++j) 31 | tmpl[(len - 6) + j] = LETTERS[v % 62]; v /= 62; 32 | 33 | /* try to create the directory */ 34 | if (mkdir (tmpl, 0700) == 0) 35 | return tmpl; 36 | else if (errno != EEXIST) 37 | return NULL; 38 | } 39 | 40 | errno = EEXIST; 41 | return NULL; 42 | } 43 | -------------------------------------------------------------------------------- /mutt_idna.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2003,2005 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _MUTT_IDNA_H 20 | # define _MUTT_IDNA_H 21 | 22 | #include "rfc822.h" 23 | #include "charset.h" 24 | 25 | #ifdef HAVE_IDNA_H 26 | #include 27 | #elif defined(HAVE_IDN_IDNA_H) 28 | #include 29 | #endif 30 | 31 | #define MI_MAY_BE_IRREVERSIBLE (1 << 0) 32 | 33 | /* Work around incompatibilities in the libidn API */ 34 | 35 | #ifdef HAVE_LIBIDN 36 | # if (!defined(HAVE_IDNA_TO_ASCII_8Z) && defined(HAVE_IDNA_TO_ASCII_FROM_UTF8)) 37 | # define idna_to_ascii_8z(a,b,c) idna_to_ascii_from_utf8(a,b,(c)&1,((c)&2)?1:0) 38 | # endif 39 | # if (!defined(HAVE_IDNA_TO_ASCII_LZ) && defined(HAVE_IDNA_TO_ASCII_FROM_LOCALE)) 40 | # define idna_to_ascii_lz(a,b,c) idna_to_ascii_from_locale(a,b,(c)&1,((c)&2)?1:0) 41 | # endif 42 | # if (!defined(HAVE_IDNA_TO_UNICODE_8Z8Z) && defined(HAVE_IDNA_TO_UNICODE_UTF8_FROM_UTF8)) 43 | # define idna_to_unicode_8z8z(a,b,c) idna_to_unicode_utf8_from_utf8(a,b,(c)&1,((c)&2)?1:0) 44 | # endif 45 | #endif /* HAVE_LIBIDN */ 46 | 47 | 48 | int mutt_addrlist_to_intl (ADDRESS *, char **); 49 | int mutt_addrlist_to_local (ADDRESS *); 50 | 51 | void mutt_env_to_local (ENVELOPE *); 52 | int mutt_env_to_intl (ENVELOPE *, char **, char **); 53 | 54 | const char *mutt_addr_for_display (ADDRESS *a); 55 | 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /mutt_notmuch.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2011 Karel Zak 3 | */ 4 | #ifndef _MUTT_NOTMUCH_H_ 5 | #define _MUTT_NOTMUCH_H_ 1 6 | 7 | int nm_read_query(CONTEXT *ctx); 8 | int nm_read_entire_thread(CONTEXT *ctx, HEADER *h); 9 | 10 | int nm_sync(CONTEXT * ctx, int *index_hint); 11 | int nm_check_database(CONTEXT * ctx, int *index_hint); 12 | char *nm_header_get_folder(HEADER *h); 13 | int nm_header_get_magic(HEADER *h); 14 | char *nm_header_get_fullpath(HEADER *h, char *buf, size_t bufsz); 15 | int nm_update_filename(CONTEXT *ctx, const char *o, const char *n, HEADER *h); 16 | char *nm_uri_from_query(CONTEXT *ctx, char *buf, size_t bufsz); 17 | int nm_modify_message_tags(CONTEXT *ctx, HEADER *hdr, char *tags); 18 | 19 | void nm_longrun_init(CONTEXT *cxt, int writable); 20 | void nm_longrun_done(CONTEXT *cxt); 21 | 22 | char *nm_get_description(CONTEXT *ctx); 23 | int nm_description_to_path(const char *desc, char *buf, size_t bufsz); 24 | 25 | int nm_record_message(CONTEXT *ctx, char *path, HEADER *h); 26 | 27 | void nm_debug_check(CONTEXT *ctx); 28 | int nm_get_all_tags(CONTEXT *ctx, char **tag_list, int *tag_count); 29 | 30 | /* 31 | * functions usable outside notmuch CONTEXT 32 | */ 33 | int nm_nonctx_get_count(char *path, int *all, int *new); 34 | 35 | char *nm_header_get_tag_transformed(char *tag, HEADER *h); 36 | char *nm_header_get_tags_transformed(HEADER *h); 37 | char *nm_header_get_tags(HEADER *h); 38 | 39 | #endif /* _MUTT_NOTMUCH_H_ */ 40 | -------------------------------------------------------------------------------- /mutt_regex.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* 20 | * A (more) generic interface to regular expression matching 21 | */ 22 | 23 | #ifndef MUTT_REGEX_H 24 | #define MUTT_REGEX_H 25 | 26 | #ifdef USE_GNU_REGEX 27 | #include "_regex.h" 28 | #else 29 | #include 30 | #endif 31 | 32 | /* this is a non-standard option supported by Solaris 2.5.x which allows 33 | * patterns of the form \<...\> 34 | */ 35 | #ifndef REG_WORDS 36 | #define REG_WORDS 0 37 | #endif 38 | 39 | #define REGCOMP(X,Y,Z) regcomp(X, Y, REG_WORDS|REG_EXTENDED|(Z)) 40 | #define REGEXEC(X,Y) regexec(&X, Y, (size_t)0, (regmatch_t *)0, (int)0) 41 | 42 | typedef struct 43 | { 44 | char *pattern; /* printable version */ 45 | regex_t *rx; /* compiled expression */ 46 | int not; /* do not match */ 47 | } REGEXP; 48 | 49 | WHERE REGEXP Mask; 50 | WHERE REGEXP QuoteRegexp; 51 | WHERE REGEXP ReplyRegexp; 52 | WHERE REGEXP Smileys; 53 | WHERE REGEXP GecosMask; 54 | 55 | #endif /* MUTT_REGEX_H */ 56 | -------------------------------------------------------------------------------- /mutt_sasl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2000-2005,2008 Brendan Cully 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | /* common SASL helper routines */ 20 | 21 | #ifndef _MUTT_SASL_H_ 22 | #define _MUTT_SASL_H_ 1 23 | 24 | #include 25 | 26 | #include "mutt_socket.h" 27 | 28 | int mutt_sasl_client_new (CONNECTION*, sasl_conn_t**); 29 | sasl_callback_t* mutt_sasl_get_callbacks (ACCOUNT*); 30 | int mutt_sasl_interact (sasl_interact_t*); 31 | void mutt_sasl_setup_conn (CONNECTION*, sasl_conn_t*); 32 | void mutt_sasl_done (void); 33 | 34 | typedef struct 35 | { 36 | sasl_conn_t* saslconn; 37 | const sasl_ssf_t* ssf; 38 | const unsigned int* pbufsize; 39 | 40 | /* read buffer */ 41 | const char *buf; 42 | unsigned int blen; 43 | unsigned int bpos; 44 | 45 | /* underlying socket data */ 46 | void* sockdata; 47 | int (*msasl_open) (CONNECTION* conn); 48 | int (*msasl_close) (CONNECTION* conn); 49 | int (*msasl_read) (CONNECTION* conn, char* buf, size_t len); 50 | int (*msasl_write) (CONNECTION* conn, const char* buf, size_t count); 51 | int (*msasl_poll) (CONNECTION* conn); 52 | } 53 | SASL_DATA; 54 | 55 | #endif /* _MUTT_SASL_H_ */ 56 | -------------------------------------------------------------------------------- /mutt_ssl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Tommi Komulainen 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _MUTT_SSL_H_ 20 | #define _MUTT_SSL_H_ 1 21 | 22 | #include "mutt_socket.h" 23 | 24 | #if defined(USE_SSL) 25 | int mutt_ssl_starttls (CONNECTION* conn); 26 | int mutt_ssl_socket_setup (CONNECTION *conn); 27 | #endif 28 | 29 | #endif /* _MUTT_SSL_H_ */ 30 | -------------------------------------------------------------------------------- /mutt_tunnel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This program is free software; you can redistribute it and/or modify 3 | * it under the terms of the GNU General Public License as published by 4 | * the Free Software Foundation; either version 2 of the License, or 5 | * (at your option) any later version. 6 | * 7 | * This program is distributed in the hope that it will be useful, 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 | * GNU General Public License for more details. 11 | * 12 | * You should have received a copy of the GNU General Public License 13 | * along with this program; if not, write to the Free Software 14 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 | */ 16 | 17 | #ifndef _MUTT_TUNNEL_H_ 18 | #define _MUTT_TUNNEL_H_ 1 19 | 20 | #include "mutt_socket.h" 21 | 22 | int mutt_tunnel_socket_setup (CONNECTION *); 23 | 24 | #endif /* _MUTT_TUNNEL_H_ */ 25 | -------------------------------------------------------------------------------- /muttbug: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | exec flea "$@" 4 | -------------------------------------------------------------------------------- /pager.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #include "attach.h" 20 | 21 | /* dynamic internal flags */ 22 | #define M_SHOWFLAT (1<<0) 23 | #define M_SHOWCOLOR (1<<1) 24 | #define M_HIDE (1<<2) 25 | #define M_SEARCH (1<<3) 26 | #define M_TYPES (1<<4) 27 | #define M_SHOW (M_SHOWCOLOR | M_SHOWFLAT) 28 | 29 | /* exported flags for mutt_(do_)?pager */ 30 | #define M_PAGER_NSKIP (1<<5) /* preserve whitespace with smartwrap */ 31 | #define M_PAGER_MARKER (1<<6) /* use markers if option is set */ 32 | #define M_PAGER_RETWINCH (1<<7) /* need reformatting on SIGWINCH */ 33 | #define M_PAGER_MESSAGE (M_SHOWCOLOR | M_PAGER_MARKER) 34 | #define M_PAGER_ATTACHMENT (1<<8) 35 | #define M_PAGER_NOWRAP (1<<9) /* format for term width, ignore $wrap */ 36 | 37 | #define M_DISPLAYFLAGS (M_SHOW | M_PAGER_NSKIP | M_PAGER_MARKER) 38 | 39 | typedef struct 40 | { 41 | CONTEXT *ctx; /* current mailbox */ 42 | HEADER *hdr; /* current message */ 43 | BODY *bdy; /* current attachment */ 44 | FILE *fp; /* source stream */ 45 | ATTACHPTR **idx; /* attachment information */ 46 | short idxlen; 47 | } pager_t; 48 | 49 | int mutt_do_pager (const char *, const char *, int, pager_t *); 50 | int mutt_pager (const char *, const char *, int, pager_t *); 51 | -------------------------------------------------------------------------------- /patchlist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -- 2 | 3 | list_patches_PATCHES () { 4 | cat - 5 | } 6 | 7 | list_patches_mq () { 8 | hg qapplied | sed -e 's/^/mq-/' 9 | } 10 | 11 | list_patches () { 12 | if [ -f .hg/patches/series ]; then 13 | list_patches_mq 14 | else 15 | list_patches_PATCHES 16 | fi 17 | } 18 | 19 | cat < 24 | #include 25 | 26 | #include "mutt.h" 27 | 28 | void mutt_print_patchlist (void) 29 | { 30 | EOF 31 | 32 | list_patches | while read patch ; do 33 | echo " puts (\"${patch}\");" 34 | done 35 | 36 | echo "}" 37 | -------------------------------------------------------------------------------- /pgpewrap.c: -------------------------------------------------------------------------------- 1 | /* 2 | * C version by Wessel Dankers 3 | * 4 | * This code is in the public domain. 5 | * 6 | */ 7 | #ifdef HAVE_CONFIG_H 8 | #include "config.h" 9 | #endif 10 | 11 | #include 12 | #include 13 | #include 14 | #include 15 | 16 | void print_usage(const char *progname) { 17 | fprintf(stderr, "Command line usage: %s [flags] -- prefix [recipients]\n", progname); 18 | exit(1); 19 | } 20 | 21 | int main(int argc, char **argv) { 22 | char **opts, **opt, *pfx; 23 | int i; 24 | 25 | if (argc <= 1) { 26 | print_usage(argv[0]); 27 | } 28 | 29 | opts = malloc((2 * argc + 1) * sizeof (* opts)); /* __MEM_CHECKED__ */ 30 | if(!opts) { 31 | perror(argv[0]); 32 | exit(2); 33 | } 34 | 35 | if (argc < 2) 36 | { 37 | fprintf (stderr, 38 | "Command line usage: %s [flags] -- prefix [recipients]\n", 39 | argv[0]); 40 | return 1; 41 | } 42 | 43 | opt = opts; 44 | *opt++ = argv[1]; 45 | pfx = NULL; 46 | 47 | for(i = 2; i < argc; ) { 48 | if(!strcmp(argv[i], "--")) { 49 | i += 2; 50 | if(i > argc) { 51 | print_usage(argv[0]); 52 | } 53 | pfx = argv[i-1]; 54 | } 55 | if(pfx) 56 | *opt++ = pfx; 57 | *opt++ = argv[i++]; 58 | } 59 | *opt = NULL; 60 | 61 | execvp(opts[0], opts); 62 | perror(argv[0]); 63 | return 2; 64 | } 65 | -------------------------------------------------------------------------------- /pgplib.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-1997 Michael R. Elkins 3 | * Copyright (C) 1999-2002 Thomas Roessler 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifdef CRYPT_BACKEND_CLASSIC_PGP 21 | 22 | #include "mutt_crypt.h" 23 | 24 | 25 | typedef struct pgp_signature 26 | { 27 | struct pgp_signature *next; 28 | unsigned char sigtype; 29 | unsigned long sid1; 30 | unsigned long sid2; 31 | } 32 | pgp_sig_t; 33 | 34 | struct pgp_keyinfo 35 | { 36 | char *keyid; 37 | char *fingerprint; 38 | struct pgp_uid *address; 39 | int flags; 40 | short keylen; 41 | time_t gen_time; 42 | int numalg; 43 | const char *algorithm; 44 | struct pgp_keyinfo *parent; 45 | struct pgp_signature *sigs; 46 | struct pgp_keyinfo *next; 47 | }; 48 | /* Note, that pgp_key_t is now pointer and declared in crypt.h */ 49 | 50 | typedef struct pgp_uid 51 | { 52 | char *addr; 53 | short trust; 54 | int flags; 55 | struct pgp_keyinfo *parent; 56 | struct pgp_uid *next; 57 | struct pgp_signature *sigs; 58 | } 59 | pgp_uid_t; 60 | 61 | enum pgp_version 62 | { 63 | PGP_V2, 64 | PGP_V3, 65 | PGP_GPG, 66 | PGP_UNKNOWN 67 | }; 68 | 69 | /* prototypes */ 70 | 71 | const char *pgp_pkalgbytype (unsigned char); 72 | 73 | pgp_key_t pgp_remove_key (pgp_key_t *, pgp_key_t ); 74 | pgp_uid_t *pgp_copy_uids (pgp_uid_t *, pgp_key_t ); 75 | 76 | short pgp_canencrypt (unsigned char); 77 | short pgp_cansign (unsigned char); 78 | short pgp_get_abilities (unsigned char); 79 | 80 | void pgp_free_key (pgp_key_t *kpp); 81 | 82 | #define pgp_new_keyinfo() safe_calloc (sizeof *((pgp_key_t)0), 1) 83 | 84 | #endif /* CRYPT_BACKEND_CLASSIC_PGP */ 85 | -------------------------------------------------------------------------------- /pgppacket.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU General Public License as 6 | * published by the Free Software Foundation; either version 2 of 7 | * the License, or (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public 15 | * License along with this program; if not, write to the Free 16 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 17 | * MA 02110-1301, USA. 18 | */ 19 | 20 | /* 21 | * Definitions for a rudimentary PGP packet parser which is shared 22 | * by mutt proper and the PGP public key ring lister. 23 | */ 24 | 25 | #ifndef _PGPPACKET_H 26 | # define _PGPPACKET_H 27 | 28 | enum packet_tags 29 | { 30 | PT_RES0 = 0, /* reserved */ 31 | PT_ESK, /* Encrypted Session Key */ 32 | PT_SIG, /* Signature Packet */ 33 | PT_CESK, /* Conventionally Encrypted Session Key Packet */ 34 | PT_OPS, /* One-Pass Signature Packet */ 35 | PT_SECKEY, /* Secret Key Packet */ 36 | PT_PUBKEY, /* Public Key Packet */ 37 | PT_SUBSECKEY, /* Secret Subkey Packet */ 38 | PT_COMPRESSED, /* Compressed Data Packet */ 39 | PT_SKE, /* Symmetrically Encrypted Data Packet */ 40 | PT_MARKER, /* Marker Packet */ 41 | PT_LITERAL, /* Literal Data Packet */ 42 | PT_TRUST, /* Trust Packet */ 43 | PT_NAME, /* Name Packet */ 44 | PT_SUBKEY, /* Subkey Packet */ 45 | PT_RES15, /* Reserved */ 46 | PT_COMMENT /* Comment Packet */ 47 | }; 48 | 49 | unsigned char *pgp_read_packet (FILE * fp, size_t * len); 50 | void pgp_release_packet (void); 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | account.c 2 | addrbook.c 3 | alias.c 4 | attach.c 5 | browser.c 6 | buffy.c 7 | charset.c 8 | color.c 9 | commands.c 10 | compose.c 11 | crypt-gpgme.c 12 | crypt.c 13 | cryptglue.c 14 | curs_lib.c 15 | curs_main.c 16 | edit.c 17 | editmsg.c 18 | flags.c 19 | handler.c 20 | headers.c 21 | help.c 22 | history.c 23 | hook.c 24 | imap/auth.c 25 | imap/auth_anon.c 26 | imap/auth_cram.c 27 | imap/auth_gss.c 28 | imap/auth_login.c 29 | imap/auth_sasl.c 30 | imap/browse.c 31 | imap/command.c 32 | imap/imap.c 33 | imap/message.c 34 | imap/util.c 35 | init.c 36 | keymap.c 37 | lib.c 38 | main.c 39 | mbox.c 40 | menu.c 41 | mh.c 42 | mutt_sasl.c 43 | mutt_socket.c 44 | mutt_ssl.c 45 | mutt_ssl_gnutls.c 46 | mutt_tunnel.c 47 | muttlib.c 48 | mx.c 49 | pager.c 50 | parse.c 51 | pattern.c 52 | pgp.c 53 | pgpinvoke.c 54 | pgpkey.c 55 | pop.c 56 | pop_auth.c 57 | pop_lib.c 58 | postpone.c 59 | query.c 60 | recvattach.c 61 | recvcmd.c 62 | remailer.c 63 | rfc1524.c 64 | score.c 65 | send.c 66 | sendlib.c 67 | signal.c 68 | smime.c 69 | smtp.c 70 | sort.c 71 | status.c 72 | thread.c 73 | -------------------------------------------------------------------------------- /po/bg.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/bg.po -------------------------------------------------------------------------------- /po/de.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/de.po -------------------------------------------------------------------------------- /po/el.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/el.po -------------------------------------------------------------------------------- /po/es.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/es.po -------------------------------------------------------------------------------- /po/et.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/et.po -------------------------------------------------------------------------------- /po/ga.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/ga.po -------------------------------------------------------------------------------- /po/gl.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/gl.po -------------------------------------------------------------------------------- /po/hu.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/hu.po -------------------------------------------------------------------------------- /po/ja.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/ja.po -------------------------------------------------------------------------------- /po/ko.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/ko.po -------------------------------------------------------------------------------- /po/lt.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/lt.po -------------------------------------------------------------------------------- /po/pl.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/pl.po -------------------------------------------------------------------------------- /po/pt_BR.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/pt_BR.po -------------------------------------------------------------------------------- /po/sk.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/karelzak/mutt-kz/a8e0411599f08643329066f181faf97da5dad1ad/po/sk.po -------------------------------------------------------------------------------- /prepare: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if autoreconf --install && ./configure "$@" 4 | then 5 | echo 6 | echo "The mutt source code was successfully prepared and configured." 7 | echo "Type make && make install to build and install mutt." 8 | echo 9 | else 10 | echo 11 | echo "Some part of the preparation process failed." 12 | echo "Please refer to doc/devel-notes.txt for details." 13 | echo 14 | exit 1 15 | fi 16 | -------------------------------------------------------------------------------- /remailer.h: -------------------------------------------------------------------------------- 1 | #ifndef _REMAILER_H 2 | #define _REMAILER_H 3 | 4 | /* 5 | * Copyright (C) 1999-2000 Thomas Roessler 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | /* 23 | * Mixmaster support for Mutt 24 | */ 25 | 26 | #ifdef MIXMASTER 27 | 28 | #define MIX_CAP_COMPRESS (1 << 0) 29 | #define MIX_CAP_MIDDLEMAN (1 << 1) 30 | #define MIX_CAP_NEWSPOST (1 << 2) 31 | #define MIX_CAP_NEWSMAIL (1 << 3) 32 | 33 | /* Mixmaster's maximum chain length. Don't change this. */ 34 | 35 | #define MAXMIXES 19 36 | 37 | struct type2 38 | { 39 | int num; 40 | char *shortname; 41 | char *addr; 42 | char *ver; 43 | int caps; 44 | }; 45 | 46 | typedef struct type2 REMAILER; 47 | 48 | 49 | struct mixchain 50 | { 51 | size_t cl; 52 | int ch[MAXMIXES]; 53 | }; 54 | 55 | typedef struct mixchain MIXCHAIN; 56 | 57 | int mix_send_message (LIST *, const char *); 58 | int mix_check_message (HEADER *msg); 59 | void mix_make_chain (LIST **, int *); 60 | 61 | #endif /* MIXMASTER */ 62 | 63 | #endif /* _REMAILER_H */ 64 | -------------------------------------------------------------------------------- /resize.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #if HAVE_CONFIG_H 20 | # include "config.h" 21 | #endif 22 | 23 | #include "mutt.h" 24 | #include "mutt_curses.h" 25 | 26 | #include 27 | #include 28 | #include 29 | #include 30 | 31 | #ifdef HAVE_SYS_IOCTL_H 32 | #include 33 | #else 34 | # ifdef HAVE_IOCTL_H 35 | # include 36 | # endif 37 | #endif 38 | 39 | /* this routine should be called after receiving SIGWINCH */ 40 | void mutt_resize_screen (void) 41 | { 42 | char *cp; 43 | int fd; 44 | struct winsize w; 45 | #ifdef HAVE_RESIZETERM 46 | int SLtt_Screen_Rows, SLtt_Screen_Cols; 47 | #endif 48 | 49 | SLtt_Screen_Rows = -1; 50 | SLtt_Screen_Cols = -1; 51 | if ((fd = open ("/dev/tty", O_RDONLY)) != -1) 52 | { 53 | if (ioctl (fd, TIOCGWINSZ, &w) != -1) 54 | { 55 | SLtt_Screen_Rows = w.ws_row; 56 | SLtt_Screen_Cols = w.ws_col; 57 | } 58 | close (fd); 59 | } 60 | if (SLtt_Screen_Rows <= 0) 61 | { 62 | if ((cp = getenv ("LINES")) != NULL && mutt_atoi (cp, &SLtt_Screen_Rows) < 0) 63 | SLtt_Screen_Rows = 24; 64 | } 65 | if (SLtt_Screen_Cols <= 0) 66 | { 67 | if ((cp = getenv ("COLUMNS")) != NULL && mutt_atoi (cp, &SLtt_Screen_Cols) < 0) 68 | SLtt_Screen_Cols = 80; 69 | } 70 | #ifdef USE_SLANG_CURSES 71 | delwin (stdscr); 72 | SLsmg_reset_smg (); 73 | SLsmg_init_smg (); 74 | stdscr = newwin (0, 0, 0, 0); 75 | keypad (stdscr, TRUE); 76 | #else 77 | resizeterm (SLtt_Screen_Rows, SLtt_Screen_Cols); 78 | #endif 79 | } 80 | -------------------------------------------------------------------------------- /rfc1524.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #ifndef _RFC1524_H 20 | #define _RFC1524_H 21 | 22 | typedef struct rfc1524_mailcap_entry { 23 | /* char *contenttype; */ /* we don't need this, as we search for it */ 24 | char *command; 25 | char *testcommand; 26 | char *composecommand; 27 | char *composetypecommand; 28 | char *editcommand; 29 | char *printcommand; 30 | char *nametemplate; 31 | char *convert; 32 | /* char *description; */ /* we don't need this */ 33 | unsigned int needsterminal : 1; /* endwin() and system */ 34 | unsigned int copiousoutput : 1; /* needs pager, basically */ 35 | } rfc1524_entry; 36 | 37 | rfc1524_entry *rfc1524_new_entry (void); 38 | void rfc1524_free_entry (rfc1524_entry **); 39 | int rfc1524_expand_command (BODY *, char *, char *, char *, int); 40 | int rfc1524_expand_filename (char *, char *, char *, size_t); 41 | int rfc1524_mailcap_lookup (BODY *, char *, rfc1524_entry *, int); 42 | int mutt_rename_file (char *, char *); 43 | 44 | #endif /* _RFC1524_H */ 45 | -------------------------------------------------------------------------------- /rfc2047.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | char *mutt_choose_charset (const char *fromcode, const char *charsets, 20 | char *u, size_t ulen, char **d, size_t *dlen); 21 | int convert_nonmime_string (char **); 22 | 23 | void _rfc2047_encode_string (char **, int, int); 24 | void rfc2047_encode_adrlist (ADDRESS *, const char *); 25 | 26 | #define rfc2047_encode_string(a) _rfc2047_encode_string (a, 0, 32); 27 | 28 | void rfc2047_decode (char **); 29 | void rfc2047_decode_adrlist (ADDRESS *); 30 | -------------------------------------------------------------------------------- /rfc2231.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1999-2000 Thomas Roessler 3 | * 4 | * This program is free software; you can redistribute it 5 | * and/or modify it under the terms of the GNU General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later 8 | * version. 9 | * 10 | * This program is distributed in the hope that it will be 11 | * useful, but WITHOUT ANY WARRANTY; without even the implied 12 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 13 | * PURPOSE. See the GNU General Public License for more 14 | * details. 15 | * 16 | * You should have received a copy of the GNU General Public 17 | * License along with this program; if not, write to the Free 18 | * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 19 | * Boston, MA 02110-1301, USA. 20 | */ 21 | 22 | void rfc2231_decode_parameters (PARAMETER **); 23 | int rfc2231_encode_string (char **); 24 | 25 | -------------------------------------------------------------------------------- /rfc3676.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2005 Andreas Krennmair 3 | * Copyright (C) 2005 Peter J. Holzer 4 | * Copyright (C) 2005,2007 Rocco Rutte 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 19 | * 20 | */ 21 | 22 | /* This file was originally part of mutt-ng */ 23 | 24 | #ifndef _MUTT_RFC3676_H 25 | #define _MUTT_RFC3676_H 26 | 27 | #include "mutt.h" 28 | 29 | /* body handler implementing RfC 3676 for format=flowed */ 30 | int rfc3676_handler (BODY *a, STATE *s); 31 | 32 | /* this does the space-stuffing for RfC3676 style messages */ 33 | void rfc3676_space_stuff (HEADER *hdr); 34 | 35 | #endif /* !_MUTT_RFC3676_H */ 36 | -------------------------------------------------------------------------------- /rfc822.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * Copyright (C) 2012 Michael R. Elkins 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | #ifndef rfc822_h 21 | #define rfc822_h 22 | 23 | #include "lib.h" 24 | 25 | /* possible values for RFC822Error */ 26 | enum 27 | { 28 | ERR_MEMORY = 1, 29 | ERR_MISMATCH_PAREN, 30 | ERR_MISMATCH_QUOTE, 31 | ERR_BAD_ROUTE, 32 | ERR_BAD_ROUTE_ADDR, 33 | ERR_BAD_ADDR_SPEC 34 | }; 35 | 36 | typedef struct address_t 37 | { 38 | #ifdef EXACT_ADDRESS 39 | char *val; /* value of address as parsed */ 40 | #endif 41 | char *personal; /* real name of address */ 42 | char *mailbox; /* mailbox and host address */ 43 | int group; /* group mailbox? */ 44 | struct address_t *next; 45 | unsigned is_intl : 1; 46 | unsigned intl_checked : 1; 47 | } 48 | ADDRESS; 49 | 50 | void rfc822_dequote_comment (char *s); 51 | void rfc822_free_address (ADDRESS **); 52 | void rfc822_qualify (ADDRESS *, const char *); 53 | ADDRESS *rfc822_parse_adrlist (ADDRESS *, const char *s); 54 | ADDRESS *rfc822_cpy_adr (ADDRESS *addr, int); 55 | ADDRESS *rfc822_cpy_adr_real (ADDRESS *addr); 56 | ADDRESS *rfc822_append (ADDRESS **a, ADDRESS *b, int); 57 | int rfc822_write_address (char *, size_t, ADDRESS *, int); 58 | void rfc822_write_address_single (char *, size_t, ADDRESS *, int); 59 | void rfc822_free_address (ADDRESS **addr); 60 | void rfc822_cat (char *, size_t, const char *, const char *); 61 | int rfc822_valid_msgid (const char *msgid); 62 | int rfc822_remove_from_adrlist (ADDRESS **a, const char *mailbox); 63 | 64 | extern int RFC822Error; 65 | extern const char * const RFC822Errors[]; 66 | 67 | #define rfc822_error(x) RFC822Errors[x] 68 | #define rfc822_new_address() safe_calloc(1,sizeof(ADDRESS)) 69 | 70 | #endif /* rfc822_h */ 71 | -------------------------------------------------------------------------------- /setenv.c: -------------------------------------------------------------------------------- 1 | /* Replacement for a missing setenv. 2 | ** 3 | ** Written by Russ Allbery 4 | ** This work is hereby placed in the public domain by its author. 5 | ** 6 | ** Provides the same functionality as the standard library routine setenv 7 | ** for those platforms that don't have it. 8 | */ 9 | 10 | #include "config.h" 11 | 12 | #include 13 | #include 14 | 15 | int 16 | setenv(const char *name, const char *value, int overwrite) 17 | { 18 | char *envstring; 19 | 20 | if (!overwrite && getenv(name) != NULL) 21 | return 0; 22 | 23 | /* Allocate memory for the environment string. We intentionally don't 24 | use concat here, or the xmalloc family of allocation routines, since 25 | the intention is to provide a replacement for the standard library 26 | function which sets errno and returns in the event of a memory 27 | allocation failure. */ 28 | envstring = malloc(strlen(name) + 1 + strlen(value) + 1); /* __MEM_CHECKED__ */ 29 | if (envstring == NULL) 30 | return -1; 31 | 32 | /* Build the environment string and add it to the environment using 33 | putenv. Systems without putenv lose, but XPG4 requires it. */ 34 | strcpy(envstring, name); /* __STRCPY_CHECKED__ */ 35 | strcat(envstring, "="); /* __STRCAT_CHECKED__ */ 36 | strcat(envstring, value); /* __STRCAT_CHECKED__ */ 37 | return putenv(envstring); 38 | 39 | /* Note that the memory allocated is not freed. This is intentional; 40 | many implementations of putenv assume that the string passed to 41 | putenv will never be freed and don't make a copy of it. Repeated use 42 | of this function will therefore leak memory, since most 43 | implementations of putenv also don't free strings removed from the 44 | environment (due to being overwritten). */ 45 | } 46 | -------------------------------------------------------------------------------- /sha1.h: -------------------------------------------------------------------------------- 1 | /* 2 | SHA-1 in C 3 | 4 | By Steve Reid , with small changes to make it 5 | fit into mutt by Thomas Roessler . 6 | 7 | */ 8 | 9 | #ifndef _SHA1_H 10 | # define _SHA1_H 11 | 12 | #include "crypthash.h" 13 | 14 | typedef struct { 15 | uint32_t state[5]; 16 | uint32_t count[2]; 17 | unsigned char buffer[64]; 18 | } SHA1_CTX; 19 | 20 | void SHA1Transform(uint32_t state[5], const unsigned char buffer[64]); 21 | void SHA1Init(SHA1_CTX* context); 22 | void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len); 23 | void SHA1Final(unsigned char digest[20], SHA1_CTX* context); 24 | 25 | # define SHA1_Transform SHA1Transform 26 | # define SHA1_Init SHA1Init 27 | # define SHA1_Update SHA1Update 28 | # define SHA1_Final SHA1Final 29 | 30 | # define SHA_DIGEST_LENGTH 20 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /sidebar.h: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 2004 Justin Hibbits 2 | * Copyright (C) 2004 Thomer M. Gil 3 | * Copyright (C) 2015-2016 Richard Russon 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA. 18 | */ 19 | 20 | #ifndef SIDEBAR_H 21 | #define SIDEBAR_H 22 | 23 | #include "mutt.h" 24 | #include "buffy.h" 25 | 26 | void sb_change_mailbox (int op); 27 | void sb_draw (void); 28 | const char * sb_get_highlight (void); 29 | void sb_init (void); 30 | void sb_notify_mailbox (BUFFY *b, int created); 31 | void sb_set_buffystats (const CONTEXT *ctx); 32 | BUFFY * sb_set_open_buffy (const char *path); 33 | void sb_set_update_time (void); 34 | int sb_should_refresh (void); 35 | void sb_toggle_virtual (void); 36 | 37 | #endif /* SIDEBAR_H */ 38 | -------------------------------------------------------------------------------- /smime.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2001-2002 Oliver Ehli 3 | * Copyright (C) 2004 g10 Code GmbH 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2 of the License, or 8 | * (at your option) any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 18 | */ 19 | 20 | 21 | #ifdef CRYPT_BACKEND_CLASSIC_SMIME 22 | 23 | #include "mutt_crypt.h" 24 | 25 | typedef struct smime_key { 26 | char *email; 27 | char *hash; 28 | char *label; 29 | char *issuer; 30 | char trust; /* i=Invalid r=revoked e=expired u=unverified v=verified t=trusted */ 31 | int flags; 32 | struct smime_key *next; 33 | } smime_key_t; 34 | 35 | 36 | void smime_free_key (smime_key_t **); 37 | 38 | void smime_void_passphrase (void); 39 | int smime_valid_passphrase (void); 40 | 41 | int smime_decrypt_mime (FILE *, FILE **, BODY *, BODY **); 42 | 43 | int smime_application_smime_handler (BODY *, STATE *); 44 | 45 | 46 | BODY* smime_sign_message (BODY *); 47 | 48 | BODY* smime_build_smime_entity (BODY *, char *); 49 | 50 | int smime_verify_one(BODY *, STATE *, const char *); 51 | 52 | 53 | int smime_verify_sender(HEADER *); 54 | 55 | 56 | char* smime_get_field_from_db (char *, char *, short, short); 57 | 58 | void smime_getkeys (ENVELOPE *); 59 | 60 | smime_key_t *smime_ask_for_key(char *, short, short); 61 | 62 | char *smime_findKeys (ADDRESS *adrlist, int oppenc_mode); 63 | 64 | void smime_invoke_import (char *, char *); 65 | 66 | int smime_send_menu (HEADER *msg, int *redraw); 67 | 68 | #endif 69 | 70 | 71 | -------------------------------------------------------------------------------- /sort.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 1996-2000 Michael R. Elkins 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #define SORT_DATE 1 /* the date the mail was sent. */ 20 | #define SORT_SIZE 2 21 | #define SORT_SUBJECT 3 22 | #define SORT_ALPHA 3 /* makedoc.c requires this */ 23 | #define SORT_FROM 4 24 | #define SORT_ORDER 5 /* the order the messages appear in the mailbox. */ 25 | #define SORT_THREADS 6 26 | #define SORT_RECEIVED 7 /* when the message were delivered locally */ 27 | #define SORT_TO 8 28 | #define SORT_SCORE 9 29 | #define SORT_ALIAS 10 30 | #define SORT_ADDRESS 11 31 | #define SORT_KEYID 12 32 | #define SORT_TRUST 13 33 | #define SORT_SPAM 14 34 | #define SORT_DESC 15 35 | #define SORT_COUNT 16 36 | #define SORT_COUNT_NEW 17 37 | #define SORT_FLAGGED 18 38 | #define SORT_PATH 19 39 | 40 | /* dgc: Sort & SortAux are shorts, so I'm bumping these bitflags up from 41 | * bits 4 & 5 to bits 8 & 9 to make room for more sort keys in the future. */ 42 | #define SORT_MASK 0xff 43 | #define SORT_REVERSE (1<<8) 44 | #define SORT_LAST (1<<9) 45 | 46 | typedef int sort_t (const void *, const void *); 47 | sort_t *mutt_get_sort_func (int); 48 | 49 | void mutt_clear_threads (CONTEXT *); 50 | void mutt_sort_headers (CONTEXT *, int); 51 | void mutt_sort_threads (CONTEXT *, int); 52 | int mutt_select_sort (int); 53 | THREAD *mutt_sort_subthreads (THREAD *, int); 54 | 55 | WHERE short BrowserSort INITVAL (SORT_SUBJECT); 56 | WHERE short Sort INITVAL (SORT_DATE); 57 | WHERE short SortAux INITVAL (SORT_DATE); /* auxiliary sorting method */ 58 | WHERE short SortAlias INITVAL (SORT_ALIAS); 59 | WHERE short SidebarSortMethod INITVAL (SORT_ORDER); 60 | 61 | /* FIXME: This one does not belong to here */ 62 | WHERE short PgpSortKeys INITVAL (SORT_ADDRESS); 63 | 64 | #include "mapping.h" 65 | extern const struct mapping_t SortMethods[]; 66 | -------------------------------------------------------------------------------- /stamp-h.in: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /strcasecmp.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | /* UnixWare doesn't have these functions in its standard C library */ 5 | 6 | int strncasecmp (char *s1, char *s2, size_t n) 7 | { 8 | register int c1, c2, l = 0; 9 | 10 | while (*s1 && *s2 && l < n) 11 | { 12 | c1 = tolower ((unsigned char) *s1); 13 | c2 = tolower ((unsigned char) *s2); 14 | if (c1 != c2) 15 | return (c1 - c2); 16 | s1++; 17 | s2++; 18 | l++; 19 | } 20 | if (l == n) 21 | return (int) (0); 22 | else 23 | return (int) (*s1 - *s2); 24 | } 25 | 26 | int strcasecmp (char *s1, char *s2) 27 | { 28 | register int c1, c2; 29 | 30 | while (*s1 && *s2) 31 | { 32 | c1 = tolower ((unsigned char) *s1); 33 | c2 = tolower ((unsigned char) *s2); 34 | if (c1 != c2) 35 | return (c1 - c2); 36 | s1++; 37 | s2++; 38 | } 39 | return (int) (*s1 - *s2); 40 | } 41 | -------------------------------------------------------------------------------- /strcasestr.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2002 Manuel Novoa III 3 | * Copyright (C) 2000-2005 Erik Andersen 4 | * 5 | * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. 6 | */ 7 | #include 8 | #include 9 | 10 | char *strcasestr(const char *s1, const char *s2) 11 | { 12 | register const char *s = s1; 13 | register const char *p = s2; 14 | 15 | #if 1 16 | do { 17 | if (!*p) { 18 | return (char *) s1;; 19 | } 20 | if ((*p == *s) 21 | || (tolower(*((unsigned char *)p)) == tolower(*((unsigned char *)s))) 22 | ) { 23 | ++p; 24 | ++s; 25 | } else { 26 | p = s2; 27 | if (!*s) { 28 | return NULL; 29 | } 30 | s = ++s1; 31 | } 32 | } while (1); 33 | #else 34 | while (*p && *s) { 35 | if ((*p == *s) 36 | || (tolower(*((unsigned char *)p)) == tolower(*((unsigned char *)s))) 37 | ) { 38 | ++p; 39 | ++s; 40 | } else { 41 | p = s2; 42 | s = ++s1; 43 | } 44 | } 45 | 46 | return (*p) ? NULL : (char *) s1; 47 | #endif 48 | } 49 | -------------------------------------------------------------------------------- /strdup.c: -------------------------------------------------------------------------------- 1 | /* ultrix doesn't have strdup */ 2 | 3 | #include 4 | #include 5 | 6 | char *strdup (const char *s) /* __MEM_CHECKED__ */ 7 | { 8 | char *d; 9 | 10 | if (s == NULL) 11 | return NULL; 12 | 13 | if ((d = malloc (strlen (s) + 1)) == NULL) /* __MEM_CHECKED__ */ 14 | return NULL; 15 | 16 | memcpy (d, s, strlen (s) + 1); 17 | return d; 18 | } 19 | 20 | -------------------------------------------------------------------------------- /strndup.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Karel Zak 3 | */ 4 | 5 | #if HAVE_CONFIG_H 6 | # include "config.h" 7 | #endif 8 | 9 | #include "mutt.h" 10 | 11 | char *strndup(const char *s, size_t n) 12 | { 13 | size_t len = strnlen(s, n); 14 | char *new = (char *) malloc((len + 1) * sizeof(char)); 15 | if (!new) 16 | return NULL; 17 | new[len] = '\0'; 18 | return (char *) memcpy(new, s, len); 19 | } 20 | -------------------------------------------------------------------------------- /strnlen.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2013 Karel Zak 3 | */ 4 | 5 | #if HAVE_CONFIG_H 6 | # include "config.h" 7 | #endif 8 | 9 | #include "mutt.h" 10 | 11 | size_t strnlen(const char *s, size_t maxlen) 12 | { 13 | int i; 14 | 15 | for (i = 0; i < maxlen; i++) { 16 | if (s[i] == '\0') 17 | return i + 1; 18 | } 19 | return maxlen; 20 | } 21 | -------------------------------------------------------------------------------- /strsep.c: -------------------------------------------------------------------------------- 1 | /* Copyright (C) 1992, 93, 96, 97, 98, 99, 2004 Free Software Foundation, Inc. 2 | This file is part of the GNU C Library. 3 | 4 | The GNU C Library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | The GNU C Library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with the GNU C Library; if not, write to the Free 16 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 17 | 02111-1307 USA. */ 18 | 19 | #include 20 | 21 | /* Taken from glibc 2.6.1 */ 22 | 23 | char *strsep (char **stringp, const char *delim) 24 | { 25 | char *begin, *end; 26 | 27 | begin = *stringp; 28 | if (begin == NULL) 29 | return NULL; 30 | 31 | /* A frequent case is when the delimiter string contains only one 32 | character. Here we don't need to call the expensive `strpbrk' 33 | function and instead work using `strchr'. */ 34 | if (delim[0] == '\0' || delim[1] == '\0') 35 | { 36 | char ch = delim[0]; 37 | 38 | if (ch == '\0') 39 | end = NULL; 40 | else 41 | { 42 | if (*begin == ch) 43 | end = begin; 44 | else if (*begin == '\0') 45 | end = NULL; 46 | else 47 | end = strchr (begin + 1, ch); 48 | } 49 | } 50 | else 51 | /* Find the end of the token. */ 52 | end = strpbrk (begin, delim); 53 | 54 | if (end) 55 | { 56 | /* Terminate the token and set *STRINGP past NUL character. */ 57 | *end++ = '\0'; 58 | *stringp = end; 59 | } 60 | else 61 | /* No more delimiters; this is the last token. */ 62 | *stringp = NULL; 63 | 64 | return begin; 65 | } 66 | -------------------------------------------------------------------------------- /strtok_r.c: -------------------------------------------------------------------------------- 1 | /* Reentrant string tokenizer. Generic version. 2 | Copyright (C) 1991,1996-1999,2001,2004 Free Software Foundation, Inc. 3 | This file is part of the GNU C Library. 4 | 5 | The GNU C Library is free software; you can redistribute it and/or 6 | modify it under the terms of the GNU Lesser General Public 7 | License as published by the Free Software Foundation; either 8 | version 2.1 of the License, or (at your option) any later version. 9 | 10 | The GNU C Library is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | Lesser General Public License for more details. 14 | 15 | You should have received a copy of the GNU Lesser General Public 16 | License along with the GNU C Library; if not, write to the Free 17 | Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 18 | 02111-1307 USA. */ 19 | 20 | #include 21 | 22 | /* Taken from glibc 2.6.1 */ 23 | 24 | /* Parse S into tokens separated by characters in DELIM. 25 | If S is NULL, the saved pointer in SAVE_PTR is used as 26 | the next starting point. For example: 27 | char s[] = "-abc-=-def"; 28 | char *sp; 29 | x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" 30 | x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL 31 | x = strtok_r(NULL, "=", &sp); // x = NULL 32 | // s = "abc\0-def\0" 33 | */ 34 | char * 35 | strtok_r (char *s, const char *delim, char **save_ptr) 36 | { 37 | char *token; 38 | 39 | if (s == NULL) 40 | s = *save_ptr; 41 | 42 | /* Scan leading delimiters. */ 43 | s += strspn (s, delim); 44 | if (*s == '\0') 45 | { 46 | *save_ptr = s; 47 | return NULL; 48 | } 49 | 50 | /* Find the end of the token. */ 51 | token = s; 52 | s = strpbrk (token, delim); 53 | if (s == NULL) 54 | /* This token finishes the string. */ 55 | *save_ptr = strchr (token, '\0'); 56 | else 57 | { 58 | /* Terminate the token and make *SAVE_PTR point past it. */ 59 | *s = '\0'; 60 | *save_ptr = s + 1; 61 | } 62 | return token; 63 | } 64 | -------------------------------------------------------------------------------- /txt2c.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define per_line 12 4 | 5 | void 6 | txt2c(char *sym, FILE *fp) 7 | { 8 | unsigned char buf[per_line]; 9 | int i; 10 | int sz = 0; 11 | 12 | printf("unsigned char %s[] = {\n", sym); 13 | while (1) { 14 | sz = fread(buf, sizeof(unsigned char), per_line, fp); 15 | if (sz == 0) 16 | break; 17 | printf("\t"); 18 | for (i = 0; i < sz; i++) 19 | printf("0x%02x, ", buf[i]); 20 | printf("\n"); 21 | } 22 | 23 | printf("\t0x00\n};\n"); 24 | } 25 | 26 | 27 | int 28 | main(int argc, char *argv[]) 29 | { 30 | if (argc != 2) { 31 | fprintf(stderr, "usage: %s symbol textfile.c\n", argv[0]); 32 | return 2; 33 | } 34 | 35 | txt2c(argv[1], stdin); 36 | return 0; 37 | } 38 | -------------------------------------------------------------------------------- /txt2c.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | txt2c_fallback () { 4 | # consumes stdin 5 | 6 | # declaration 7 | echo "unsigned char $1[] = " 8 | 9 | # initializer - filter out unwanted characters, then convert problematic 10 | # or odd-looking sequences. The result is a sequence of quote-bounded 11 | # C strings, which the compiler concatenates into a single C string. 12 | tr -c '\011\012\015\040[!-~]' '?' | 13 | sed \ 14 | -e 's/\\/\\\\/g' \ 15 | -e 's/"/\\"/g' \ 16 | -e 's/??/\\?\\?/g' \ 17 | -e 's/ /\\t/'g \ 18 | -e 's/ /\\r/g' \ 19 | -e 's/^/ "/g' \ 20 | -e 's/$/\\n"/g' 21 | echo ";" 22 | } 23 | 24 | ./txt2c test /dev/null 2>&1 && 25 | ./txt2c "$1" || 26 | txt2c_fallback "$1" 27 | -------------------------------------------------------------------------------- /url.h: -------------------------------------------------------------------------------- 1 | #ifndef _URL_H 2 | # define _URL_H 3 | 4 | typedef enum url_scheme 5 | { 6 | U_FILE, 7 | U_POP, 8 | U_POPS, 9 | U_IMAP, 10 | U_IMAPS, 11 | U_SMTP, 12 | U_SMTPS, 13 | U_MAILTO, 14 | #ifdef USE_NOTMUCH 15 | U_NOTMUCH, 16 | #endif 17 | U_UNKNOWN 18 | } 19 | url_scheme_t; 20 | 21 | #define U_DECODE_PASSWD (1) 22 | #define U_PATH (1 << 1) 23 | 24 | typedef struct ciss_url 25 | { 26 | url_scheme_t scheme; 27 | char *user; 28 | char *pass; 29 | char *host; 30 | unsigned short port; 31 | char *path; 32 | } 33 | ciss_url_t; 34 | 35 | url_scheme_t url_check_scheme (const char *s); 36 | int url_parse_file (char *d, const char *src, size_t dl); 37 | int url_parse_ciss (ciss_url_t *ciss, char *src); 38 | int url_ciss_tostring (ciss_url_t* ciss, char* dest, size_t len, int flags); 39 | int url_parse_mailto (ENVELOPE *e, char **body, const char *src); 40 | int url_pct_decode (char *s); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /utf8.c: -------------------------------------------------------------------------------- 1 | #if HAVE_CONFIG_H 2 | # include "config.h" 3 | #endif 4 | 5 | #ifndef HAVE_WC_FUNCS 6 | 7 | #include 8 | #include 9 | 10 | #ifndef EILSEQ 11 | #define EILSEQ EINVAL 12 | #endif 13 | 14 | int mutt_wctoutf8 (char *s, unsigned int c, size_t buflen) 15 | { 16 | if (c < (1 << 7)) 17 | { 18 | if (s && buflen >= 1) 19 | *s++ = c; 20 | return 1; 21 | } 22 | else if (c < (1 << 11)) 23 | { 24 | if (s && buflen >= 2) 25 | { 26 | *s++ = 0xc0 | (c >> 6); 27 | *s++ = 0x80 | (c & 0x3f); 28 | } 29 | return 2; 30 | } 31 | else if (c < (1 << 16)) 32 | { 33 | if (s && buflen >= 3) 34 | { 35 | *s++ = 0xe0 | (c >> 12); 36 | *s++ = 0x80 | ((c >> 6) & 0x3f); 37 | *s++ = 0x80 | (c & 0x3f); 38 | } 39 | return 3; 40 | } 41 | else if (c < (1 << 21)) 42 | { 43 | if (s && buflen >= 4) 44 | { 45 | *s++ = 0xf0 | (c >> 18); 46 | *s++ = 0x80 | ((c >> 12) & 0x3f); 47 | *s++ = 0x80 | ((c >> 6) & 0x3f); 48 | *s++ = 0x80 | (c & 0x3f); 49 | } 50 | return 4; 51 | } 52 | else if (c < (1 << 26)) 53 | { 54 | if (s && buflen >= 5) 55 | { 56 | *s++ = 0xf8 | (c >> 24); 57 | *s++ = 0x80 | ((c >> 18) & 0x3f); 58 | *s++ = 0x80 | ((c >> 12) & 0x3f); 59 | *s++ = 0x80 | ((c >> 6) & 0x3f); 60 | *s++ = 0x80 | (c & 0x3f); 61 | } 62 | return 5; 63 | } 64 | else if (c < (1 << 31)) 65 | { 66 | if (s && buflen >= 6) 67 | { 68 | *s++ = 0xfc | (c >> 30); 69 | *s++ = 0x80 | ((c >> 24) & 0x3f); 70 | *s++ = 0x80 | ((c >> 18) & 0x3f); 71 | *s++ = 0x80 | ((c >> 12) & 0x3f); 72 | *s++ = 0x80 | ((c >> 6) & 0x3f); 73 | *s++ = 0x80 | (c & 0x3f); 74 | } 75 | return 6; 76 | } 77 | errno = EILSEQ; 78 | return -1; 79 | } 80 | 81 | #endif /* !HAVE_WC_FUNCS */ 82 | -------------------------------------------------------------------------------- /version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | HG=hg 4 | 5 | # Switch to directory where this script lives so that further commands are run 6 | # from the root directory of the source. The script path and srcdir are double 7 | # quoted to allow the space character to appear in the path. 8 | srcdir=`dirname "$0"` && cd "$srcdir" || exit 1 9 | 10 | catversion() { 11 | cat VERSION VERSION.kz | tr -d \\n 12 | exit 13 | } 14 | 15 | # Ensure that we have a repo here and that mercurial is installed. If 16 | # not, just cat the VERSION file; it contains the latest release number. 17 | { [ -d ".hg" ] && $HG >/dev/null 2>&1; } \ 18 | || catversion 19 | 20 | # This is a mercurial repo and we have the hg command. 21 | 22 | # Get essential properties of the current working copy 23 | set -- `$HG parents --template='{rev} {node|short}\n'` 24 | rev="$1" 25 | node="$2" 26 | 27 | # translate release tags into ##.##.## notation 28 | cleantag () { 29 | case "$1" in 30 | mutt-*-rel) echo "$1" | sed -e 's/mutt-//' -e 's/-rel//' | tr - . ;; 31 | *) echo "$1" ;; 32 | esac 33 | } 34 | 35 | getdistance_old () { 36 | # fudge it 37 | set -- `$HG tags | sort -n -k 2 | egrep 'mutt-.*rel' | tail -1 | cut -d: -f1` 38 | latesttag="$1" 39 | latestrev="$2" 40 | distance=`expr $rev - $latestrev` 41 | echo $latesttag $distance 42 | } 43 | 44 | getdistance_new () { 45 | $HG parents --template='{latesttag} {latesttagdistance}\n' 46 | } 47 | 48 | 49 | # latesttag appeared in hg 1.4. Test for it. 50 | [ "`$HG log -r . --template='{latesttag}'`" = '' ] && 51 | set -- `getdistance_old` || 52 | set -- `getdistance_new` 53 | 54 | tag=`cleantag "$1"` 55 | dist=$2 56 | 57 | if [ $dist -eq 0 ]; then 58 | dist= 59 | else 60 | dist="+$dist" 61 | fi 62 | 63 | # if we have mq patches applied, mention it 64 | qparent=`$HG log -r qparent --template='{rev}\n' 2>/dev/null || echo $rev` 65 | qdelta=`expr $rev - $qparent` 66 | if [ $qdelta -eq 0 ]; then 67 | qdist="" 68 | else 69 | qdist=",mq+$qdelta" 70 | fi 71 | 72 | echo "$tag$dist$qdist ($node)" 73 | exit 0 74 | -------------------------------------------------------------------------------- /wcscasecmp.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2009 Rocco Rutte 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; either version 2 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 17 | */ 18 | 19 | #if HAVE_CONFIG_H 20 | # include "config.h" 21 | #endif 22 | 23 | #include "mutt.h" 24 | #include "mbyte.h" 25 | 26 | int wcscasecmp (const wchar_t *a, const wchar_t *b) 27 | { 28 | const wchar_t *p = a; 29 | const wchar_t *q = b; 30 | int i; 31 | 32 | if (!a && !b) 33 | return 0; 34 | if (!a && b) 35 | return -1; 36 | if (a && !b) 37 | return 1; 38 | 39 | for ( ; *p || *q; p++, q++) 40 | { 41 | if ((i = towlower (*p)) - towlower (*q)) 42 | return i; 43 | } 44 | return 0; 45 | } 46 | --------------------------------------------------------------------------------