Create/manipulate threading in emails. More...
#include "config.h"
#include <stdbool.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 (const struct MuttThread *a, const struct MuttThread *b) |
Is one thread a descendant of another. | |
void | unlink_message (struct MuttThread **old, struct MuttThread *cur) |
Break the message out of the thread. | |
void | insert_message (struct MuttThread **add, struct MuttThread *parent, struct MuttThread *cur) |
Insert a message into a thread. | |
struct Email * | find_virtual (struct MuttThread *cur, bool reverse) |
Find an email with a Virtual message number. | |
void | clean_references (struct MuttThread *brk, struct MuttThread *cur) |
Update email references for a broken Thread. | |
void | mutt_break_thread (struct Email *e) |
Break the email Thread. | |
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 | ( | const 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 46 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 66 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 104 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 124 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 177 of file thread.c.
void mutt_break_thread | ( | struct Email * | e | ) |
Break the email Thread.
e | Email to break at |
Definition at line 229 of file thread.c.