summaryrefslogtreecommitdiffstats
path: root/addrbook.c
AgeCommit message (Collapse)Author
2020-03-06Change mutt_FormatString() data parameter to type void *.Kevin McCarthy
All invocations pass a pointer parameter. Perhaps at one point this was like the init.h combined usage. But as with that, using an unsigned long is incorrect, and we've been lucky to get away with it. Since we don't need a union, just change it to void * to properly size the parameter.
2019-11-10Add gcc comments for fallthrough case statements.Kevin McCarthy
Most of these were already commented. Change a few of them to a format gcc will recognize. In the future, we'll want to change to whatever is standardized.
2019-01-04Clean up code indentation.Kevin McCarthy
These are mostly automated changes corresponding to the emacs settings: (c-set-style "linux") (setq c-basic-offset 2) (c-set-offset 'case-label '+) Most of the code follows the convention: (add-to-list 'c-cleanup-list 'space-before-funcall) but this is not enforced by this indentation cleanup. Also, I personally dislike tabs, so I have: (setq-default indent-tabs-mode nil) in my own configuration. However I have no desire to change every line just for that effect. So this cleanup does nothing about the mix issue. Some of the secondary files (e.g. regex.c) have been skipped. I've also skipped crypt-gpgme.c, because I need to think about that file. Werner Koch and the GnuPG team contributed most it, and it follows the Gnu indentation settings. It should probably be made uniform with Mutt, but I don't want to discourage future GnuPG contribution to the file. I manually reverted a few unsightly cleanups, and added a few tweeks when I saw things that could be improved.
2018-12-31Remove trailing whitespace.Kevin McCarthy
The result of find . -name "*.[ch]" -exec emacs -batch {} \ --eval="(progn (delete-trailing-whitespace) (and (buffer-modified-p) (save-buffer)))" \;
2017-03-26Set refresh when popping the menu stack.Kevin McCarthy
This removes the need for the OPTNEEDREDRAW option and MAYBE_REDRAW macro previously used to communicate back the need to refresh after exiting a menu. Remove the redraw parameter from ci_bounce_message() and mix_make_chain() which served the same purpose.
2017-03-26Add a menu stack to track current and past menus.Kevin McCarthy
Change the pager to use a MENU, right now just to hold the refresh state.
2017-01-17Fix several alias hashtable issues.Kevin McCarthy
Convert to use the strdup keys hash. Addresses can be converted back and forth from intl to local forms. This frees and recreates a new addr->mailbox string, resulting in the hash table key being a dangling pointer. Change alias hash table insert/remove to ensure the address is in intl form. The alias menu (previously) converted address entries to local form when performing a completion. Even with the pointer issue fixed, the entries may not be removed from the hash if the intl and local forms are different. Lastly, there is no reason for the alias menu to manually convert to local form before writing the address to the output buffer. rfc822_write_address() has a display parameter that will call mutt_addr_for_display() instead when set. Change to set the display parameter and remove the conversion calls. This last change obviates the first two changes, but they are a good idea in any case.
2016-05-09Change M_* symbols to MUTT_*Derek Martin
Changeset 23334e967dd7 created a workaround for a namespace conflict with Solaris and derivatives. After some discussion, the team decided it would be best to move away from using the "M_" prefix for macros. This patch was automatically generated by running: perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print` with the exception that sys_socket.h was exempted. (That file will be backed out subsequent to this commit.) Thanks to Andras Salamon for supplying the perl script used to make this change.
2016-04-27Add cols parameter to mutt_FormatString()Kevin McCarthy
Continuing with the conversion to using windows for screen drawing, mutt_FormatString() was directly using COLS for right justification and similar formatting. Instead pass in a parameter, cols. This change involved seeding the parameter through callback functions too, as many of them call mutt_FormatString() back.
2011-12-03Declare many structures const (closes #3552)Dan Fandrich
Many structs used in mutt are actually constant but are defined without the 'const' keyword. This can slow initialization (slightly) in some environments due to extra copying and increases the amount of writable RAM required at run-time, which can be significant on non-MMU systems. Using const can also increase the opportunities for compiler optimization. The attached patch marks many such structures as const. On my test x86 build, this reduces the size of .data by over 50%.
2009-03-17Fix some warnings with -W about missing initializers in structsRocco Rutte
2009-01-04Update copyrights. Closes #3016.Brendan Cully
I went through the logs of each file with a copyright header and updated the years for the authors in the headers for any non-comment changes they introduced. What a pain!
2008-11-30Manage last search pattern outside of menu lifecycleRocco Rutte
Previously, the pattern was thrown away during menu destruction. For the next search, mutt then can't provide a good suggestion. The new behaviour is to manage the pattern outside the lifecyle to always provide the last pattern as suggestion.
2007-04-11Pass column value recursively when expanding format strings (bug #2840).Michael Elkins
2007-03-20Enlarge help string buffersRocco Rutte
Even on 80x25 terminals, SHORT_STRING (128 byte) may not be enough so use LONG_STRING (1k) as STRING (256 byte) may well be too short for wider terminals. Closes debian #4152777.
2005-09-17Gah, forgot the zip code when updating the FSF address...Brendan Cully
2005-09-17Update FSF address (via sed, I hope nothing got mangled). Closes: #2071.Brendan Cully
2005-02-03Add config.h to the top of every C file that could possibly want it.Brendan Cully
Remove it from mutt.h
2005-01-26Make some functions static.Ralf Wildenhues
2003-09-19As the ones of you who compile with new gcc's probably have noticed,Mads Martin Joergensen
there's a lot of type-punning in Mutt. With help from Philipp Thomas, I've fixed all I could find in CVS (please double-check, one might have slipped through the cracks), I can make one for 1.4 CVS branch as well if wanted.
2003-03-04Fixing more IDN bugs.Thomas Roessler
2003-03-03IDN support for e-mail messages. Things should work automagicallyThomas Roessler
once you have the GNU IDN library available from ftp://alpha.gnu.org/pub/gnu/libidn/ installed. For IDN's which can't be losslessly recoded to your local character set, mutt should automatically fall back to using the ASCII representation. There's probably a considerable number of bugs in this, and the code may, at this point, not even compile on machines without libidn. Will start working on that ASAP.
2002-12-11Fix Mike's and my e-mail addresses in copyright lines.Thomas Roessler
2002-12-10Replace safe_free calls by the FREE macro.Thomas Roessler
2002-12-09Fix #1390. Based on a patch submitted earlier by Edmund GrimleyAnders Helmersson
Evans.
2001-11-07Fix #858.Thomas Roessler
2001-10-16Address book nit fix from geerd.debruijn@nl.thalesgroup.com.Thomas Roessler
2001-09-11More addressbook fixes.Thomas Roessler
2001-09-11The addressbook used to crash when someone issued the alias andThomas Roessler
unalias commands while on that menu. This patch has a basic fix for this behaviour, and adds delete and undelete functions to this menu. While I'm on it, I've also made sure that "apply-tag" untags everything on all menus. The original crash was noted by Oliver Kauss <kauss@gmx.de>.
2001-04-26Add ascii_strcasecmp() and ascii_strncasecmp() functions which doThomas Roessler
locale-independent and case-insensitive string comparisons. Needed for mutt to work in iso-8859-9 environments, where tolower('I') != 'i'.
2000-03-03The FSF apparently has moved.Thomas Roessler
2000-01-06Update copyright notices for unstable.Thomas Roessler
1999-01-29Add generic menu searching.Thomas Roessler
1999-01-22Enable tagging in the file browser.Thomas Roessler
1999-01-07Get rid of RCS ids in source files. They are getting in our wayThomas Roessler
when merging changes.
1998-11-10Introduce or rewrite mutt_{str*cmp,strlen} and use them all over theThomas Roessler
place. If there are still segmentation faults due to missing NONULLs over, they are gone now.
1998-10-15Change "static char rcsid[]" to "static const char rcsid[]" to makemutt-0-94-13-relThomas Roessler
gcc shut up about this.
1998-10-13Add RCS $Id$ strings to (hopefully) all source files.Thomas Roessler
1998-10-12The attached patch removes some redundant code related to the macroThomas Roessler
function stuff. Since each menu calls km_dokey() to get the 'op' number to execute, the 'menu' argument to km_dokey() _is_ the CurrentMenu. Hence, there is no need to explicitly save/restore the CurrentMenu all over the code. The only places it is being captured now is just before mutt_enter_comamnd() is called. This is to help the 'exec' command completion code so that it knows which menu to try and complete the function name from. (From: Vikas Agnihotri <VikasA@att.com>)
1998-10-05Vikas' macro_function patch.Thomas Roessler
1998-10-01Translate the various help lines.Thomas Roessler
1998-10-01Adding gettext support, based on the patch by Marco d'Itri.Thomas Roessler
1998-08-27[patch-0.94.4i.gt.arrowcursor.1] Padding to the end ofThomas Roessler
line/right jusitifying does not work in menus when $arrow_cursor is set, because the extra space needed for the arrow is not taken into account. (From Gero Treuner <gero@faveve.uni-stuttgart.de>)
1998-08-25CVS branch clean-up.Thomas Roessler
1998-06-16Including Vikas' search code for the "attach message" menu.Thomas Roessler
1998-06-08Mutt 0.92.9i.mutt-0-92-9iThomas Roessler
1998-06-08Initial revisionThomas Roessler