Create/manipulate threading in emails. More...
#include "config.h"
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include "mutt/lib.h"
#include "thread.h"
#include "email.h"
#include "envelope.h"
Go to the source code of this file.
Functions | |
bool | is_descendant (struct MuttThread *a, const struct MuttThread *b) |
Is one thread a descendant of another. More... | |
void | unlink_message (struct MuttThread **old, struct MuttThread *cur) |
Break the message out of the thread. More... | |
void | insert_message (struct MuttThread **add, struct MuttThread *parent, struct MuttThread *cur) |
Insert a message into a thread. More... | |
void | thread_hash_destructor (int type, void *obj, intptr_t data) |
Hash Destructor callback - Implements hash_hdata_free_t -. More... | |
struct Email * | find_virtual (struct MuttThread *cur, bool reverse) |
Find an email with a Virtual message number. More... | |
void | clean_references (struct MuttThread *brk, struct MuttThread *cur) |
Update email references for a broken Thread. More... | |
void | mutt_break_thread (struct Email *e) |
Break the email Thread. More... | |
Create/manipulate threading in emails.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file thread.c.
bool is_descendant | ( | struct MuttThread * | a, |
const struct MuttThread * | b | ||
) |
Is one thread a descendant of another.
a | Parent thread |
b | Child thread |
true | b is a descendent of a (child, grandchild, etc) |
Definition at line 44 of file thread.c.
void unlink_message | ( | struct MuttThread ** | old, |
struct MuttThread * | cur | ||
) |
Break the message out of the thread.
[in,out] | old | Root of thread |
[in] | cur | Child thread to separate |
Remove cur and its descendants from their current location. Also make sure ancestors of cur no longer are sorted by the fact that cur is their descendant.
Definition at line 64 of file thread.c.
void insert_message | ( | struct MuttThread ** | add, |
struct MuttThread * | parent, | ||
struct MuttThread * | cur | ||
) |
Insert a message into a thread.
[in,out] | add | New thread to add |
[in] | parent | Parent of new thread |
[in] | cur | Current thread to add after |
add cur as a prior sibling of *add, with parent parent
Definition at line 102 of file thread.c.
struct Email * find_virtual | ( | struct MuttThread * | cur, |
bool | reverse | ||
) |
Find an email with a Virtual message number.
cur | Thread to search |
reverse | If true, reverse the direction of the search |
ptr | Matching Email |
Definition at line 130 of file thread.c.
void clean_references | ( | struct MuttThread * | brk, |
struct MuttThread * | cur | ||
) |
Update email references for a broken Thread.
brk | Broken thread |
cur | Current thread |
Definition at line 181 of file thread.c.
void mutt_break_thread | ( | struct Email * | e | ) |
Break the email Thread.
e | Email to break at |
Definition at line 233 of file thread.c.