]>
granicus.if.org Git - neomutt/log
Pietro Cerutti [Wed, 22 May 2019 14:12:52 +0000 (14:12 +0000)]
Run clang-format over test/address
Pietro Cerutti [Wed, 22 May 2019 14:11:31 +0000 (14:11 +0000)]
Test addresses with comments in mutt_addrlist_parse
Pietro Cerutti [Wed, 22 May 2019 12:01:41 +0000 (12:01 +0000)]
Add mutt_addr_to_local
Pietro Cerutti [Wed, 22 May 2019 11:15:25 +0000 (11:15 +0000)]
Fix test for mutt_addrlist_write and avoid leak
Pietro Cerutti [Wed, 22 May 2019 10:09:00 +0000 (10:09 +0000)]
Add tests for mutt_addrlist_write + make it more readable
Pietro Cerutti [Wed, 22 May 2019 09:00:42 +0000 (09:00 +0000)]
Add (basic) tests for mutt_addrlist_to_(intl|local)
Pietro Cerutti [Tue, 21 May 2019 13:01:25 +0000 (13:01 +0000)]
Add tests for mutt_addrlist_remove
Pietro Cerutti [Tue, 21 May 2019 12:53:51 +0000 (12:53 +0000)]
Add tests formutt_addrlist_remove_xrefs
Pietro Cerutti [Mon, 20 May 2019 16:11:57 +0000 (16:11 +0000)]
Simplify mutt_default_from
Pietro Cerutti [Mon, 20 May 2019 16:10:12 +0000 (16:10 +0000)]
Add helper to create and populate an Address, avoid leaks in tests
Pietro Cerutti [Mon, 20 May 2019 15:19:25 +0000 (15:19 +0000)]
Sort address functions by name
Pietro Cerutti [Mon, 20 May 2019 11:44:41 +0000 (11:44 +0000)]
Add tests for mutt_addrlist_qualify
Pietro Cerutti [Mon, 20 May 2019 11:37:07 +0000 (11:37 +0000)]
Add tests for mutt_addrlist_parse2
Pietro Cerutti [Mon, 20 May 2019 11:36:53 +0000 (11:36 +0000)]
Avoid leak in the test for mutt_addrlist_parse
Pietro Cerutti [Mon, 20 May 2019 11:36:22 +0000 (11:36 +0000)]
Slightly refactor mutt_addrlist_parse2
Pietro Cerutti [Mon, 20 May 2019 11:20:50 +0000 (11:20 +0000)]
Add tests for mutt_addrlist_parse + slight refactor and fix return value
Pietro Cerutti [Mon, 20 May 2019 10:45:51 +0000 (10:45 +0000)]
Add tests for mutt_addrlist_count_recips
Pietro Cerutti [Sun, 19 May 2019 12:47:18 +0000 (12:47 +0000)]
Rename mutt_addrlist_free_all into mutt_addrlist_clear, remove freeing functions
No facilities are provided for the heap allocation and freeing of
AddressLists. The suggested usage is to to have AddressLists as
variables on the stack.
Pietro Cerutti [Sun, 19 May 2019 11:20:25 +0000 (11:20 +0000)]
Kill duplicate copyright line
Pietro Cerutti [Sun, 19 May 2019 11:18:53 +0000 (11:18 +0000)]
Rename mutt_addrlist_has_recips to mutt_addrlist_count_recips and add tests
Richard Russon [Sun, 19 May 2019 10:44:03 +0000 (11:44 +0100)]
Revert queue.h formatting
Richard Russon [Sun, 19 May 2019 10:42:33 +0000 (11:42 +0100)]
tidy code
- NULL pointers
- variable case
- rename function
- sprinkle credit
Pietro Cerutti [Sun, 19 May 2019 09:29:11 +0000 (09:29 +0000)]
Boolify uses of Address' group
Pietro Cerutti [Sun, 19 May 2019 09:06:15 +0000 (09:06 +0000)]
Add tests for mutt_addrlist_free
Pietro Cerutti [Sun, 19 May 2019 08:53:25 +0000 (08:53 +0000)]
Add tests for mutt_addrlist_free_one
Pietro Cerutti [Sun, 19 May 2019 08:37:00 +0000 (08:37 +0000)]
Add tests for mutt_addrlist_free_all
Pietro Cerutti [Sun, 19 May 2019 08:28:02 +0000 (08:28 +0000)]
Add tests for mutt_addrlist_equal
Pietro Cerutti [Sun, 19 May 2019 08:19:19 +0000 (08:19 +0000)]
Run clang-format over test/address
Pietro Cerutti [Sun, 19 May 2019 08:17:28 +0000 (08:17 +0000)]
Add test for mutt_addrlist_dedupe, fix mutt_addrlist_parse
Pietro Cerutti [Sat, 18 May 2019 17:07:30 +0000 (17:07 +0000)]
Add tests for mutt_addrlist_copy
Pietro Cerutti [Sat, 18 May 2019 16:51:50 +0000 (16:51 +0000)]
Add test for mutt_addrlist_append and mutt_addrlist_prepend
Pietro Cerutti [Sat, 18 May 2019 16:45:28 +0000 (16:45 +0000)]
Add tests for mutt_addr_valid_msgid
Pietro Cerutti [Sat, 18 May 2019 16:32:13 +0000 (16:32 +0000)]
Add tests for mutt_addr_free
Pietro Cerutti [Sat, 18 May 2019 16:28:27 +0000 (16:28 +0000)]
Add tests for mutt_addr_copy
Pietro Cerutti [Sat, 18 May 2019 16:20:34 +0000 (16:20 +0000)]
Add tests for mutt_addr_cat, explain what it does does in the Doxygen block
Pietro Cerutti [Sat, 18 May 2019 16:20:15 +0000 (16:20 +0000)]
Add tests for mutt_addr_cmp
Richard Russon [Sat, 18 May 2019 11:55:08 +0000 (12:55 +0100)]
remove 'mutt_' from static functions
Richard Russon [Fri, 17 May 2019 21:37:08 +0000 (22:37 +0100)]
test: update basic address tests
Richard Russon [Fri, 17 May 2019 22:24:14 +0000 (23:24 +0100)]
doxy: fix comments
Pietro Cerutti [Fri, 17 May 2019 13:42:58 +0000 (13:42 +0000)]
Provide mutt_addrlist_append and mutt_addrlist_prepend
These are one-liners that call TAILQ_INSERT_TAIL and TAILQ_INSERT_HEAD,
but the macros have the ugly side-effect of evaluating their arguments
multiple times, so TAILQ_INSERT_TAIL(list, new_element()); doesn't do
what you would expect.
Pietro Cerutti [Fri, 17 May 2019 13:12:54 +0000 (13:12 +0000)]
Rename mutt_addresslist_* to mutt_addrlist_*
Pietro Cerutti [Fri, 17 May 2019 11:55:55 +0000 (11:55 +0000)]
Merge AddressNode into Address
Pietro Cerutti [Thu, 16 May 2019 16:42:05 +0000 (16:42 +0000)]
Remove "next" pointer from struct Address: conversion to TAILQ is complete
Pietro Cerutti [Thu, 16 May 2019 16:34:59 +0000 (16:34 +0000)]
Cleanup Address API: mutt_addrlist_to_(intl|local) -> mutt_addresslist_to_(intl|local)
Pietro Cerutti [Thu, 16 May 2019 15:44:11 +0000 (15:44 +0000)]
Cleanup Address API: mutt_addrlist_dedupe -> mutt_addresslist_dedupe
Pietro Cerutti [Thu, 16 May 2019 15:23:45 +0000 (15:23 +0000)]
Cleanup Address API: unexpose mutt_addr_set_(intl|local)
Pietro Cerutti [Thu, 16 May 2019 15:14:56 +0000 (15:14 +0000)]
Cleanup Address API: mutt_addr_remove_xrefs -> mutt_addresslist_remove_xrefs
Pietro Cerutti [Thu, 16 May 2019 14:52:33 +0000 (14:52 +0000)]
Cleanup Address API: mutt_addr_remove_from_list -> mutt_addresslist_remove
Pietro Cerutti [Thu, 16 May 2019 14:35:04 +0000 (14:35 +0000)]
Cleanup Address API: unexpose mutt_addr_mbox_to_udomain
Pietro Cerutti [Thu, 16 May 2019 14:28:21 +0000 (14:28 +0000)]
Cleanup Address API: unexpose mutt_addr_is_(intl|local)
Pietro Cerutti [Thu, 16 May 2019 14:06:18 +0000 (14:06 +0000)]
Fix match_user
Pietro Cerutti [Thu, 16 May 2019 13:29:38 +0000 (13:29 +0000)]
Fix and refactor mutt_is_list_recipient and mutt_is_subscribed_list_recipient
Pietro Cerutti [Thu, 16 May 2019 13:17:31 +0000 (13:17 +0000)]
Cleanup Address API: mutt_addr_write
Pietro Cerutti [Thu, 16 May 2019 12:07:25 +0000 (12:07 +0000)]
Cleanup Address API: mutt_addresslist_qualify
Pietro Cerutti [Thu, 16 May 2019 11:57:25 +0000 (11:57 +0000)]
Cleanup Address API: parse and free
Pietro Cerutti [Thu, 16 May 2019 11:30:10 +0000 (11:30 +0000)]
Cleanup Address API: mutt_addr_cmp_strict -> mutt_addresslist_equal
Pietro Cerutti [Thu, 16 May 2019 11:08:39 +0000 (11:08 +0000)]
Fix recursive alias lookup
Pietro Cerutti [Thu, 16 May 2019 09:23:46 +0000 (09:23 +0000)]
Fix variadic function
Pietro Cerutti [Wed, 15 May 2019 16:17:07 +0000 (16:17 +0000)]
Convert Envelope addresses to AddressList
Pietro Cerutti [Tue, 14 May 2019 11:53:21 +0000 (11:53 +0000)]
Convert Alias to use AddressList
Pietro Cerutti [Mon, 13 May 2019 13:14:57 +0000 (13:14 +0000)]
Convert mutt_addr_remove_from_list and mutt_addr_remove_xrefs API to AddressList
Pietro Cerutti [Mon, 13 May 2019 12:14:20 +0000 (12:14 +0000)]
Use AddressList in mutt_addrlist_to_intl and mutt_addrlist_to_local
Pietro Cerutti [Mon, 13 May 2019 12:13:56 +0000 (12:13 +0000)]
Use AddressList in mutt_addr_write
Pietro Cerutti [Mon, 13 May 2019 12:13:22 +0000 (12:13 +0000)]
Tidy Address free'ing functions
Pietro Cerutti [Mon, 13 May 2019 12:12:07 +0000 (12:12 +0000)]
Use AddressList in mutt_addr_remove_xrefs
Pietro Cerutti [Mon, 13 May 2019 12:26:06 +0000 (12:26 +0000)]
Use AddressList in mutt_addr_search
Pietro Cerutti [Mon, 13 May 2019 12:25:48 +0000 (12:25 +0000)]
Use AddressList in mutt_addr_has_recips
Pietro Cerutti [Mon, 13 May 2019 12:25:29 +0000 (12:25 +0000)]
Use AddressList in mutt_addr_cmp_strict
Pietro Cerutti [Mon, 13 May 2019 12:25:00 +0000 (12:25 +0000)]
Use AddressList in mutt_addr_append
Pietro Cerutti [Mon, 13 May 2019 12:24:39 +0000 (12:24 +0000)]
Use AddressList in mutt_addr_qualify
Pietro Cerutti [Mon, 13 May 2019 12:24:15 +0000 (12:24 +0000)]
Use AddressList in mutt_addr_remove_from_list
Pietro Cerutti [Mon, 13 May 2019 12:22:34 +0000 (12:22 +0000)]
Use AddressList in mutt_addr_free, implement mutt_addresslist_free_one
Pietro Cerutti [Mon, 13 May 2019 12:21:09 +0000 (12:21 +0000)]
Use AddressList in mutt_addr_copy_list
Pietro Cerutti [Mon, 13 May 2019 12:23:52 +0000 (12:23 +0000)]
Implement mutt_addresslist_new
Pietro Cerutti [Mon, 13 May 2019 12:18:11 +0000 (12:18 +0000)]
Const'ify parameter to mutt_addr_copy
Pietro Cerutti [Fri, 10 May 2019 16:21:57 +0000 (16:21 +0000)]
Use AddressList in mutt_addr_parse_list
Pietro Cerutti [Mon, 13 May 2019 08:44:11 +0000 (08:44 +0000)]
Use AddressList in mutt_addrlist_dedupe
Pietro Cerutti [Fri, 10 May 2019 15:52:53 +0000 (15:52 +0000)]
Add functions to convert to/from Address/AddressList
Pietro Cerutti [Fri, 10 May 2019 15:51:13 +0000 (15:51 +0000)]
Define an AddressList structure using TAILQ
Andres Freund [Tue, 21 May 2019 23:50:54 +0000 (16:50 -0700)]
Avoid redundant sort in entire-thread.
918885f added, indirectly, a mutt_sort_headers() call to
nm_read_entire_thread() (via mutt_mailbox_changed() ->
ctx_mailbox_changed() -> ctx_update()), but didn't remove the sort
after nm_read_entire_thread() in mutt_index_menu().
Remove the now superfluous sort.
Andres Freund [Tue, 21 May 2019 23:13:10 +0000 (16:13 -0700)]
entire-thread: determine current position before resorting.
Previously oldcur was determined after nm_read_entire_thread(),
leading to entire-thread unintentionally jumping to the first message
in the thread.
Before
918885f32db41 that used to work, because mutt_sort_headers()
wasn't called from within nm_read_entire_thread().
Fix by moving determination of pre nm_read_entire_thread() count a few
lines up. Also reuse existing oldcount variable, rather than
'oc' (which could also be oldcur).
Fixes: #1714
Andres Freund [Tue, 21 May 2019 13:29:07 +0000 (14:29 +0100)]
fix: reverse_name / alternates
Fixes: #1581
Richard Russon [Thu, 16 May 2019 14:43:07 +0000 (15:43 +0100)]
merge: minor tidying
* clang-format
* readme: split out contributors
* rename fd parameters
* increase buffer sizes to avoid truncation
* test: add missing #include guards
* unify char buffer inititialisation
* boolify: locals, params, args
* rename mailbox functions
* light tidying
* don't check for empty config strings
* rename struct Event and Mailbox.notify
* move el_free() to email
* tidy maildir_mbox_check()
* config: rename listener to observer
* tidy ternary operators
* tidy char pointers
* initialise pointers
* tidy pointer definitions
Richard Russon [Thu, 16 May 2019 14:18:28 +0000 (15:18 +0100)]
tidy pointer definitions
Separate multiple variable definitions which differ in type, e.g.
char buf[16], *p = NULL, **pp = NULL;
becomes
char buf[16];
char *p = NULL;
char **pp = NULL;
Richard Russon [Thu, 16 May 2019 13:53:31 +0000 (14:53 +0100)]
initialise pointers
Richard Russon [Wed, 15 May 2019 19:01:38 +0000 (20:01 +0100)]
tidy char pointers
Make char-pointer dereferencing more consistent.
Any functions that used both `*ptr` and `ptr[0]` notation have been tidied.
Richard Russon [Wed, 15 May 2019 22:53:37 +0000 (23:53 +0100)]
tidy ternary operators
- insert ()s
- expand checks against 0 or '\0'
Richard Russon [Wed, 15 May 2019 11:25:37 +0000 (12:25 +0100)]
config: rename listener to observer
This fits in with the GoF's subject/observer pattern.
Richard Russon [Wed, 15 May 2019 10:52:12 +0000 (11:52 +0100)]
tidy maildir_mbox_check()
Factor out a common pointer.
Richard Russon [Wed, 15 May 2019 10:50:02 +0000 (11:50 +0100)]
move el_free() to email
This function will be used elsewhere, soon.
Richard Russon [Tue, 12 Mar 2019 16:01:15 +0000 (16:01 +0000)]
rename struct Event and Mailbox.notify
Rename things out of the way of future work.
These names will be used by a general notifications system.
Richard Russon [Thu, 16 May 2019 11:55:40 +0000 (12:55 +0100)]
don't check for empty config strings
The config system stores empty strings as NULL.
Config variables must not be set directly, but using the config system
(this gives us validation and notifications).
Richard Russon [Tue, 30 Apr 2019 12:41:04 +0000 (13:41 +0100)]
light tidying
Lots of minor fixes, many inspired by cppcheck.
- reduce scope of variables
- return early
- NULL pointers after free
- fix typos
- correct retval type
Richard Russon [Wed, 15 May 2019 23:31:46 +0000 (00:31 +0100)]
rename mailbox functions
Fix mailbox function naming for consistency
Richard Russon [Sun, 12 May 2019 22:40:08 +0000 (23:40 +0100)]
boolify: locals, params, args
Richard Russon [Wed, 15 May 2019 21:52:26 +0000 (22:52 +0100)]
unify char buffer inititialisation
For consistency, use the format:
`char buf[16] = { 0 };`
Richard Russon [Sun, 12 May 2019 22:44:19 +0000 (23:44 +0100)]
test: add missing #include guards
Richard Russon [Wed, 15 May 2019 20:24:41 +0000 (21:24 +0100)]
increase buffer sizes to avoid truncation
This is just to hide a compiler warning.
Richard Russon [Wed, 15 May 2019 19:26:29 +0000 (20:26 +0100)]
rename fd parameters
Rename parameters to match other functions.
Richard Russon [Thu, 11 Apr 2019 10:38:08 +0000 (11:38 +0100)]
readme: split out contributors