tin  2.6.1
About: TIN is a threaded NNTP and spool based UseNet newsreader.
  Fossies Dox: tin-2.6.1.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

refs.c File Reference
#include "tin.h"
Include dependency graph for refs.c:

Go to the source code of this file.

Macros

#define MAX_REFS   100 /* Limit recursion depth */
 
#define REF_SEP   " \t" /* Separator chars in ref headers */
 
#define SKIP_ART(ptr)
 

Functions

static char * _get_references (struct t_msgid *refptr, int depth)
 
static struct t_msgidadd_msgid (int key, const char *msgid, struct t_msgid *newparent)
 
static struct t_msgidfind_next (struct t_msgid *ptr)
 
static struct t_msgidparse_references (char *r)
 
static t_bool valid_msgid (char *msgid)
 
static unsigned int hash_msgid (const char *key)
 
static void add_to_parent (struct t_msgid *ptr)
 
static void build_thread (struct t_msgid *ptr)
 
static void rearrange_siblings (void)
 
struct t_msgidfind_msgid (const char *msgid)
 
char * get_references (struct t_msgid *refptr)
 
void free_msgids (void)
 
void clear_art_ptrs (void)
 
void thread_by_reference (void)
 
void collate_subjects (void)
 
void build_references (struct t_group *group)
 

Variables

static struct t_msgidmsgids [222199] = {0}
 

Macro Definition Documentation

◆ MAX_REFS

#define MAX_REFS   100 /* Limit recursion depth */

Definition at line 47 of file refs.c.

◆ REF_SEP

#define REF_SEP   " \t" /* Separator chars in ref headers */

Definition at line 48 of file refs.c.

◆ SKIP_ART

#define SKIP_ART (   ptr)
Value:
(ptr && (ptr->article == ART_UNAVAILABLE || \
(arts[ptr->article].thread != ART_UNTHREADED || \
(tinrc.kill_level == KILL_NOTHREAD && arts[ptr->article].killed))))
struct t_article * arts
Definition: memory.c:69
struct t_config tinrc
Definition: init.c:192
int thread
Definition: tin.h:1548
unsigned int killed
Definition: tin.h:1552
int kill_level
Definition: tinrc.h:151
#define KILL_NOTHREAD
Definition: tin.h:1219
#define ART_UNTHREADED
Definition: tin.h:1334
#define ART_UNAVAILABLE
Definition: tin.h:1348

Definition at line 754 of file refs.c.

Function Documentation

◆ _get_references()

static char * _get_references ( struct t_msgid refptr,
int  depth 
)
static

◆ add_msgid()

static struct t_msgid * add_msgid ( int  key,
const char *  msgid,
struct t_msgid newparent 
)
static

◆ add_to_parent()

static void add_to_parent ( struct t_msgid ptr)
static

Definition at line 132 of file refs.c.

References t_msgid::child, t_msgid::parent, and t_msgid::sibling.

Referenced by add_msgid().

◆ build_references()

◆ build_thread()

static void build_thread ( struct t_msgid ptr)
static

Definition at line 828 of file refs.c.

References t_msgid::article, arts, find_next(), t_article::prev, SKIP_ART, and t_article::thread.

Referenced by thread_by_reference().

◆ clear_art_ptrs()

void clear_art_ptrs ( void  )

Definition at line 683 of file refs.c.

References ART_UNAVAILABLE, t_msgid::article, MSGID_HASH_SIZE, msgids, and t_msgid::next.

Referenced by make_threads().

◆ collate_subjects()

void collate_subjects ( void  )

Definition at line 913 of file refs.c.

References t_hashnode::aptr, art, arts, for_each_art, IGNORE_ART, t_article::prev, and t_article::thread.

Referenced by make_threads().

◆ find_msgid()

struct t_msgid * find_msgid ( const char *  msgid)

Definition at line 351 of file refs.c.

References hash_msgid(), msgids, t_msgid::next, strcasecmp(), and t_msgid::txt.

Referenced by process_post_hist(), and prompt_msgid().

◆ find_next()

static struct t_msgid * find_next ( struct t_msgid ptr)
static

Definition at line 760 of file refs.c.

References t_msgid::child, FALSE, t_msgid::parent, t_msgid::sibling, SKIP_ART, and TRUE.

Referenced by build_thread().

◆ free_msgids()

void free_msgids ( void  )

Definition at line 554 of file refs.c.

References MSGID_HASH_SIZE, msgids, and t_msgid::next.

Referenced by free_all_arrays(), index_group(), and read_overview().

◆ get_references()

char * get_references ( struct t_msgid refptr)

Definition at line 532 of file refs.c.

References _get_references().

◆ hash_msgid()

static unsigned int hash_msgid ( const char *  key)
static

Definition at line 112 of file refs.c.

References MSGID_HASH_SIZE.

Referenced by add_msgid(), and find_msgid().

◆ parse_references()

static struct t_msgid * parse_references ( char *  r)
static

Definition at line 382 of file refs.c.

References add_msgid(), debug, DEBUG_REFS, t_msgid::parent, REF_REF, REF_SEP, and valid_msgid().

Referenced by build_references().

◆ rearrange_siblings()

static void rearrange_siblings ( void  )
static

◆ thread_by_reference()

◆ valid_msgid()

static t_bool valid_msgid ( char *  msgid)
static

Definition at line 168 of file refs.c.

References FALSE, isascii, str_trim(), and TRUE.

Referenced by build_references(), and parse_references().

Variable Documentation

◆ msgids

struct t_msgid* msgids[222199] = {0}
static

Definition at line 79 of file refs.c.

Referenced by add_msgid(), clear_art_ptrs(), find_msgid(), free_msgids(), and thread_by_reference().