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

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

Go to the source code of this file.


#define IS_EXPIRED(a)   ((a)->article == ART_UNAVAILABLE || arts[(a)->article].thread == ART_EXPIRED)


static char get_art_mark (struct t_article *art)
static int enter_pager (int art, t_bool ignore_unavail, int level)
static int thread_catchup (t_function func, struct t_group *group)
static int thread_tab_pressed (void)
static t_bool find_unexpired (struct t_msgid *ptr)
static t_bool has_sibling (struct t_msgid *ptr)
static t_function thread_left (void)
static t_function thread_right (void)
static void build_tline (int l, struct t_article *art)
static void draw_thread_arrow (void)
static void draw_thread_item (int item)
static void make_prefix (struct t_msgid *art, char *prefix, int maxlen)
static void show_thread_page (void)
static void update_thread_page (void)
int thread_page (struct t_group *group, int respnum, int thread_depth, t_pagerinfo *page)
void fixup_thread (int respnum, t_bool redraw)
int new_responses (int thread)
int which_thread (int n)
int which_response (int n)
int num_of_responses (int n)
int get_score_of_thread (int n)
int stat_thread (int n, struct t_art_stat *sbuf)
int next_response (int n)
int next_thread (int n)
int prev_response (int n)
int find_response (int i, int n)
int next_unread (int n)
int prev_unread (int n)
t_bool thread_mark_postprocess (int function, t_function feed_type, int respnum)


int thread_basenote = 0
static int thread_respnum = 0
static struct t_fmt thrd_fmt
t_bool show_subject
static t_menu thdmenu = {0, 0, 0, show_thread_page, draw_thread_arrow, draw_thread_item }
static int ret_code = 0

Macro Definition Documentation


#define IS_EXPIRED (   a)    ((a)->article == ART_UNAVAILABLE || arts[(a)->article].thread == ART_EXPIRED)

Definition at line 49 of file thread.c.

Function Documentation

◆ build_tline()

◆ draw_thread_arrow()

◆ draw_thread_item()

static void draw_thread_item ( int  item)

Definition at line 383 of file thread.c.

References arts, build_tline(), find_response(), and thread_basenote.

◆ enter_pager()

◆ find_response()

◆ find_unexpired()

static t_bool find_unexpired ( struct t_msgid ptr)

Definition at line 1334 of file thread.c.

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

Referenced by has_sibling().

◆ fixup_thread()

◆ get_art_mark()

◆ get_score_of_thread()

int get_score_of_thread ( int  n)

◆ has_sibling()

static t_bool has_sibling ( struct t_msgid ptr)

Definition at line 1342 of file thread.c.

References FALSE, find_unexpired(), IS_EXPIRED, t_msgid::parent, t_msgid::sibling, and TRUE.

Referenced by make_prefix().

◆ make_prefix()

static void make_prefix ( struct t_msgid art,
char *  prefix,
int  maxlen 

◆ new_responses()

int new_responses ( int  thread)

Definition at line 975 of file thread.c.

References ART_READ, arts, and for_each_art_in_thread.

Referenced by pos_first_unread_thread(), search_body(), thread_page(), and toggle_read_unread().

◆ next_response()

int next_response ( int  n)

◆ next_thread()

int next_thread ( int  n)

Definition at line 1228 of file thread.c.

References base, grpmenu, t_menu::max, and which_thread().

Referenced by show_page().

◆ next_unread()

◆ num_of_responses()

int num_of_responses ( int  n)

◆ prev_response()

int prev_response ( int  n)

◆ prev_unread()

int prev_unread ( int  n)

Definition at line 1319 of file thread.c.

References ART_EXPIRED, ART_READ, arts, and prev_response().

Referenced by group_page(), show_page(), and toggle_read_unread().

◆ show_thread_page()

◆ stat_thread()

◆ thread_catchup()

◆ thread_left()

static t_function thread_left ( void  )

◆ thread_mark_postprocess()

t_bool thread_mark_postprocess ( int  function,
t_function  feed_type,
int  respnum 

◆ thread_page()

int thread_page ( struct t_group group,
int  respnum,
int  thread_depth,
t_pagerinfo page 

Definition at line 424 of file thread.c.

References _, t_pagerinfo::art, ART_ABORT, art_close(), ART_EXPIRED, art_mark(), art_open(), ART_READ, ART_UNAVAILABLE, ART_UNREAD, ART_WILL_RETURN, t_article::artnum, arts, t_group::attribute, base, bool_not, bug_report(), can_post, cancel_article(), CATCHUP, CATCHUP_NEXT_UNREAD, clear_note_area(), config_page(), t_menu::curr, curr_group, cvers, DIGIT_1, DIGIT_2, DIGIT_3, DIGIT_4, DIGIT_5, DIGIT_6, DIGIT_7, DIGIT_8, DIGIT_9, do_shell_escape(), draw_thread_arrow(), end_of_list(), enter_pager(), FALSE, FEED_ARTICLE, feed_articles(), FEED_AUTOSAVE, FEED_MAIL, FEED_MARK_READ, FEED_MARK_UNREAD, FEED_PIPE, FEED_PRINT, FEED_RANGE, FEED_SAVE, filter_articles(), filter_file, filter_file_offset, filter_menu(), find_artnum(), find_response(), t_menu::first, fixup_thread(), for_each_art_in_thread, func_to_key(), get_art_mark(), GLOBAL_ABORT, GLOBAL_BUGREPORT, GLOBAL_DISPLAY_POST_HISTORY, GLOBAL_EDIT_FILTER, GLOBAL_FIRST_PAGE, GLOBAL_HELP, GLOBAL_LAST_PAGE, GLOBAL_LAST_VIEWED, GLOBAL_LINE_DOWN, GLOBAL_LINE_UP, GLOBAL_LOOKUP_MESSAGEID, GLOBAL_MENU_FILTER_KILL, GLOBAL_MENU_FILTER_SELECT, global_mouse_action(), GLOBAL_OPTION_MENU, GLOBAL_PAGE_DOWN, GLOBAL_PAGE_UP, GLOBAL_PIPE, GLOBAL_POST, GLOBAL_POSTPONED, GLOBAL_PRINT, GLOBAL_QUIT, GLOBAL_QUIT_TIN, GLOBAL_REDRAW_SCREEN, GLOBAL_SCROLL_DOWN, GLOBAL_SCROLL_UP, GLOBAL_SEARCH_AUTHOR_BACKWARD, GLOBAL_SEARCH_AUTHOR_FORWARD, GLOBAL_SEARCH_BODY, GLOBAL_SEARCH_REPEAT, GLOBAL_SEARCH_SUBJECT_BACKWARD, GLOBAL_SEARCH_SUBJECT_FORWARD, GLOBAL_SET_RANGE, GLOBAL_SHELL_ESCAPE, GLOBAL_TOGGLE_HELP_DISPLAY, GLOBAL_TOGGLE_INFO_LAST_LINE, GLOBAL_TOGGLE_INVERSE_VIDEO, GLOBAL_VERSION, GROUP_LEVEL, GRP_EXIT, GRP_KILLED, GRP_QUIT, grpmenu, handle_keypad(), t_pagerinfo::ignore_unavail, t_config::info_in_last_line, info_message(), invoke_editor(), last_search, t_attribute::mailing_list, make_threads(), MARK_ARTICLE_UNREAD, MARK_FEED_READ, MARK_FEED_UNREAD, t_attribute::mark_ignore_tags, mark_offset, mark_screen(), MARK_THREAD_UNREAD, t_menu::max, MAXKEYLEN, move_down(), move_up(), my_retouch, t_group::name, new_responses(), NOT_ASSIGNED, num_of_responses(), num_of_tagged_arts, page_down(), page_up(), pgart, pickup_postponed_articles(), t_attribute::pos_first_unread, pos_first_unread_thread(), post_article(), printascii(), prompt_item_num(), prompt_msgid(), range_active, read_filter_file(), ret_code, scroll_down(), scroll_up(), search(), search_body(), t_article::selected, set_range(), set_xclick_off(), set_xclick_on(), t_attribute::show_author, SHOW_FROM_BOTH, SHOW_FROM_NONE, show_help_page(), show_inverse_video_status(), show_subject, show_thread_page(), signal_context, SPECIAL_CATCHUP_LEFT, T_ARTNUM_CONST, tag_article(), thd_mark_unread(), thdmenu, this_resp, t_article::thread, THREAD_AUTOSAVE, thread_basenote, THREAD_CANCEL, thread_catchup(), thread_keys, thread_left(), THREAD_LEVEL, THREAD_MAIL, THREAD_MARK_ARTICLE_READ, THREAD_READ_ARTICLE, THREAD_READ_NEXT_ARTICLE_OR_THREAD, thread_respnum, THREAD_REVERSE_SELECTIONS, thread_right(), THREAD_SAVE, THREAD_SELECT_ARTICLE, thread_tab_pressed(), THREAD_TAG, THREAD_TOGGLE_ARTICLE_SELECTION, THREAD_TOGGLE_SUBJECT_DISPLAY, THREAD_UNDO_SELECTIONS, THREAD_UNTAG, tin_ltoa(), tinrc, toggle_inverse_video(), toggle_mini_help(), top_of_list(), TRUE, txt_article_singular, txt_bad_command, txt_cannot_post, txt_marked_as_unread, txt_no_last_message, txt_no_prev_search, txt_no_responses, txt_no_resps_in_thread, txt_prefix_tagged, txt_prefix_untagged, txt_reading_article, txt_select_art, txt_thread_com, txt_thread_upper, unfilter_articles(), untag_all_articles(), update_thread_page(), user_posted_messages(), which_response(), and which_thread().

Referenced by enter_thread().

◆ thread_right()

static t_function thread_right ( void  )

Definition at line 402 of file thread.c.


Referenced by thread_page().

◆ thread_tab_pressed()

static int thread_tab_pressed ( void  )

◆ update_thread_page()

◆ which_response()

int which_response ( int  n)

◆ which_thread()

Variable Documentation

◆ ret_code

int ret_code = 0

Definition at line 83 of file thread.c.

Referenced by thread_page().

◆ show_subject

t_bool show_subject

Definition at line 54 of file thread.c.

Referenced by get_author(), parse_format_string(), show_thread_page(), and thread_page().

◆ thdmenu

◆ thrd_fmt

struct t_fmt thrd_fmt

Definition at line 53 of file thread.c.

Referenced by build_tline(), and show_thread_page().

◆ thread_basenote

◆ thread_respnum

int thread_respnum = 0