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

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

Go to the source code of this file.

Macros

#define PAGE_HEADER   4
 
#define ARTLINES   (NOTESLINES - (PAGE_HEADER - INDEX_TOP))
 
#define XFACE_SHOW()   /*nothing*/
 
#define XFACE_CLEAR()   /*nothing*/
 
#define XFACE_SUPPRESS()   /*nothing*/
 

Functions

static int build_url_list (void)
 
static int load_article (int new_respnum, struct t_group *group)
 
static int prompt_response (int ch, int curr_respnum)
 
static int scroll_page (int dir)
 
static t_bool deactivate_next_ctrl_l (void)
 
static t_bool activate_last_ctrl_l (void)
 
static t_bool process_url (int n)
 
static t_bool url_page (void)
 
static t_function page_left (void)
 
static t_function page_right (void)
 
static t_function page_mouse_action (t_function(*left_action)(void), t_function(*right_action)(void))
 
static t_function url_left (void)
 
static t_function url_right (void)
 
static void build_url_line (int i)
 
static void draw_page_header (const char *group)
 
static void draw_url_arrow (void)
 
static void free_url_list (void)
 
static void preprocess_info_message (FILE *info_fh)
 
static void print_message_page (FILE *file, t_lineinfo *messageline, size_t messagelines, size_t base_line, size_t begin, size_t end, int help_level)
 
static void process_search (int *lcurr_line, size_t message_lines, size_t screen_lines, int help_level)
 
static void show_url_page (void)
 
static void invoke_metamail (FILE *fp)
 
int show_page (struct t_group *group, int start_respnum, int *threadnum)
 
void draw_page (const char *group, int part)
 
void toggle_raw (struct t_group *group)
 
void resize_article (t_bool wrap_lines, t_openartinfo *artinfo)
 
void info_pager (FILE *info_fh, const char *title, t_bool wrap_at_ends)
 
void display_info_page (int part)
 
t_urlfind_url (int n)
 

Variables

int curr_line
 
static FILE * note_fp
 
static int artlines
 
static t_lineinfoartline
 
static t_urlurl_list
 
t_openartinfo pgart
 
int last_resp
 
int this_resp
 
size_t tabwidth = 8
 
static struct t_headernote_h = &pgart.hdr
 
static FILE * info_file
 
static const char * info_title
 
static int curr_info_line
 
static int hide_uue
 
static int num_info_lines
 
static int reveal_ctrl_l_lines
 
static int rotate
 
static int scroll_region_top
 
static int search_line
 
static t_lineinfoinfoline = (t_lineinfo *) 0
 
static t_bool show_all_headers
 
static t_bool show_raw_article
 
static t_bool reveal_ctrl_l
 
static t_menu urlmenu = { 0, 0, 0, show_url_page, draw_url_arrow, build_url_line }
 

Macro Definition Documentation

◆ ARTLINES

#define ARTLINES   (NOTESLINES - (PAGE_HEADER - INDEX_TOP))

Definition at line 54 of file page.c.

◆ PAGE_HEADER

#define PAGE_HEADER   4

Definition at line 53 of file page.c.

◆ XFACE_CLEAR

#define XFACE_CLEAR ( )    /*nothing*/

Definition at line 129 of file page.c.

◆ XFACE_SHOW

#define XFACE_SHOW ( )    /*nothing*/

Definition at line 128 of file page.c.

◆ XFACE_SUPPRESS

#define XFACE_SUPPRESS ( )    /*nothing*/

Definition at line 130 of file page.c.

Function Documentation

◆ activate_last_ctrl_l()

static t_bool activate_last_ctrl_l ( void  )
static

Definition at line 273 of file page.c.

References artline, C_CTRLL, curr_line, FALSE, reveal_ctrl_l, reveal_ctrl_l_lines, and TRUE.

Referenced by show_page().

◆ build_url_line()

static void build_url_line ( int  i)
static

◆ build_url_list()

◆ deactivate_next_ctrl_l()

static t_bool deactivate_next_ctrl_l ( void  )
static

Definition at line 244 of file page.c.

References artline, ARTLINES, artlines, C_CTRLL, curr_line, end, FALSE, reveal_ctrl_l, reveal_ctrl_l_lines, and TRUE.

Referenced by show_page().

◆ display_info_page()

◆ draw_page()

◆ draw_page_header()

◆ draw_url_arrow()

static void draw_url_arrow ( void  )
static

◆ find_url()

t_url* find_url ( int  n)

Definition at line 2539 of file page.c.

References urllist::next, and url_list.

Referenced by build_url_line(), draw_url_arrow(), generic_search(), and process_url().

◆ free_url_list()

static void free_url_list ( void  )
static

Definition at line 2663 of file page.c.

References urllist::next, urllist::url, and url_list.

Referenced by url_page().

◆ info_pager()

◆ invoke_metamail()

static void invoke_metamail ( FILE *  fp)
static

◆ load_article()

◆ page_left()

static t_function page_left ( void  )
static

Definition at line 188 of file page.c.

References GLOBAL_QUIT.

Referenced by info_pager(), and show_page().

◆ page_mouse_action()

static t_function page_mouse_action ( t_function(*)(void)  left_action,
t_function(*)(void)  right_action 
)
static

◆ page_right()

static t_function page_right ( void  )
static

Definition at line 196 of file page.c.

References PAGE_NEXT_UNREAD.

Referenced by info_pager(), and show_page().

◆ preprocess_info_message()

static void preprocess_info_message ( FILE *  info_fh)
static

◆ print_message_page()

◆ process_search()

static void process_search ( int *  lcurr_line,
size_t  message_lines,
size_t  screen_lines,
int  help_level 
)
static

◆ process_url()

◆ prompt_response()

static int prompt_response ( int  ch,
int  curr_respnum 
)
static

Definition at line 1918 of file page.c.

References _, clear_message(), find_response(), prompt_num(), txt_select_art, and which_thread().

Referenced by show_page().

◆ resize_article()

◆ scroll_page()

static int scroll_page ( int  dir)
static

◆ show_page()

int show_page ( struct t_group group,
int  start_respnum,
int *  threadnum 
)

Definition at line 305 of file page.c.

References _, activate_last_ctrl_l(), art_edit(), art_mark(), ART_UNAVAILABLE, ART_WILL_RETURN, t_msgid::article, artline, ARTLINES, artlines, t_article::artnum, arts, assert, attachment_page(), t_group::attribute, base, bool_not, buf, C_QUOTE1, C_QUOTE2, C_QUOTE3, can_post, cancel_article(), CATCHUP, CATCHUP_NEXT_UNREAD, config_page(), t_menu::curr, curr_line, cvers, deactivate_next_ctrl_l(), DIGIT_1, DIGIT_2, DIGIT_3, DIGIT_4, DIGIT_5, DIGIT_6, DIGIT_7, DIGIT_8, DIGIT_9, draw_page(), FALSE, feed_articles(), FEED_AUTOSAVE, FEED_MAIL, FEED_PIPE, FEED_PRINT, FEED_REPOST, FEED_SAVE, filter_articles(), filter_file, filter_file_offset, filter_menu(), find_artnum(), fixup_thread(), forever, func, func_to_key(), GLOBAL_ABORT, 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_OPTION_MENU, GLOBAL_PAGE_DOWN, GLOBAL_PAGE_UP, GLOBAL_PIPE, GLOBAL_POST, GLOBAL_POSTPONED, GLOBAL_PRINT, GLOBAL_QUICK_FILTER_KILL, GLOBAL_QUICK_FILTER_SELECT, GLOBAL_QUIT, GLOBAL_QUIT_TIN, GLOBAL_REDRAW_SCREEN, GLOBAL_SEARCH_AUTHOR_BACKWARD, GLOBAL_SEARCH_AUTHOR_FORWARD, GLOBAL_SEARCH_BODY, GLOBAL_SEARCH_REPEAT, GLOBAL_SEARCH_SUBJECT_BACKWARD, GLOBAL_SEARCH_SUBJECT_FORWARD, GLOBAL_SHELL_ESCAPE, GLOBAL_TOGGLE_HELP_DISPLAY, GLOBAL_TOGGLE_INFO_LAST_LINE, GLOBAL_TOGGLE_INVERSE_VIDEO, GLOBAL_VERSION, t_config::goto_next_unread, GOTO_NEXT_UNREAD_PGDN, GOTO_NEXT_UNREAD_TAB, GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, GRP_ARTUNAVAIL, GRP_EXIT, GRP_GOTOTHREAD, GRP_KILLED, GRP_NEXT, GRP_NEXTUNREAD, GRP_QUIT, GRP_RETSELECT, grpmenu, handle_keypad(), HAS_FOLLOWUPS, hide_uue, info_message(), invoke_editor(), is_art_tex_encoded(), KEYMAP_DOWN, KEYMAP_UP, t_config::kill_level, KILL_NOTHREAD, t_article::killed, last_resp, last_search, LEN, load_article(), mail_to_author(), t_attribute::mailing_list, make_threads(), MARK_ARTICLE_UNREAD, MARK_THREAD_UNREAD, t_menu::max, MAXKEYLEN, my_retouch, t_group::name, next_response(), next_thread(), next_unread(), NOT_ASSIGNED, note_fp, PAGE_AUTOSAVE, PAGE_BOTTOM_THREAD, PAGE_CANCEL, PAGE_EDIT_ARTICLE, PAGE_FOLLOWUP, PAGE_FOLLOWUP_QUOTE, PAGE_FOLLOWUP_QUOTE_HEADERS, PAGE_GOTO_PARENT, PAGE_GROUP_SELECT, page_keys, page_left(), PAGE_LEVEL, PAGE_LIST_THREAD, PAGE_MAIL, PAGE_MARK_THREAD_READ, page_mouse_action(), PAGE_NEXT_ARTICLE, PAGE_NEXT_THREAD, PAGE_NEXT_UNREAD, PAGE_NEXT_UNREAD_ARTICLE, PAGE_PREVIOUS_ARTICLE, PAGE_PREVIOUS_UNREAD_ARTICLE, PAGE_REPLY, PAGE_REPLY_QUOTE, PAGE_REPLY_QUOTE_HEADERS, PAGE_REPOST, PAGE_REVEAL, page_right(), PAGE_SAVE, PAGE_SKIP_INCLUDED_TEXT, PAGE_TAG, PAGE_TOGGLE_HEADERS, PAGE_TOGGLE_HIGHLIGHTING, PAGE_TOGGLE_RAW, PAGE_TOGGLE_ROT13, PAGE_TOGGLE_TABS, PAGE_TOGGLE_TEX2ISO, PAGE_TOGGLE_UUE, PAGE_TOP_THREAD, PAGE_VIEW_ATTACHMENTS, PAGE_VIEW_URL, t_msgid::parent, pgart, pickup_postponed_articles(), pos_first_unread_thread(), post_article(), post_response(), prev_response(), prev_unread(), printascii(), process_search(), prompt_msgid(), prompt_response(), prompt_yn(), quick_filter(), openartinfo::raw, read_filter_file(), t_article::refptr, resize_article(), reveal_ctrl_l, reveal_ctrl_l_lines, rotate, t_config::scroll_lines, scroll_page(), search(), search_article(), search_body(), search_line, set_xclick_off(), set_xclick_on(), shell_escape(), show_all_headers, show_help_page(), show_inverse_video_status(), show_raw_article, signal_context, snprintf, SPECIAL_MOUSE_TOGGLE, srch_lineno, T_ARTNUM_CONST, tabwidth, tag_article(), openartinfo::tex2iso, t_attribute::tex2iso_conv, thd_mark_read(), thd_mark_unread(), this_resp, t_article::thread, t_attribute::thread_articles, THREAD_NONE, tinrc, TINRC_CONFIRM_ACTION, toggle_inverse_video(), toggle_mini_help(), toggle_raw(), TRUE, txt_art_pager_com, txt_art_parent_killed, txt_art_parent_none, txt_art_parent_unavail, txt_article_upper, txt_bad_command, txt_begin_of_art, txt_cannot_post, txt_end_of_art, txt_enter_next_thread, txt_enter_next_unread_art, txt_info_add_kill, txt_info_add_select, txt_mark_art_read, txt_mark_thread_read, txt_marked_as_unread, txt_no_last_message, txt_no_prev_search, txt_no_prev_unread_art, txt_no_responses, txt_onoff, txt_thread_upper, txt_toggled_high, txt_toggled_rot13, txt_toggled_tabwidth, txt_toggled_tex2iso, txt_url_done, unfilter_articles(), url_page(), user_posted_messages(), UUE_ALL, UUE_NO, which_response(), which_thread(), word_highlight, XFACE_CLEAR, XFACE_SHOW, and XFACE_SUPPRESS.

Referenced by enter_pager().

◆ show_url_page()

◆ toggle_raw()

◆ url_left()

static t_function url_left ( void  )
static

Definition at line 2353 of file page.c.

References GLOBAL_QUIT.

Referenced by url_page().

◆ url_page()

◆ url_right()

static t_function url_right ( void  )
static

Definition at line 2361 of file page.c.

References URL_SELECT.

Referenced by url_page().

Variable Documentation

◆ artline

◆ artlines

int artlines
static

◆ curr_info_line

int curr_info_line
static

Definition at line 79 of file page.c.

Referenced by display_info_page(), and info_pager().

◆ curr_line

◆ hide_uue

int hide_uue
static

◆ info_file

FILE* info_file
static

Definition at line 77 of file page.c.

Referenced by display_info_page(), and info_pager().

◆ info_title

const char* info_title
static

Definition at line 78 of file page.c.

Referenced by display_info_page(), and info_pager().

◆ infoline

t_lineinfo* infoline = (t_lineinfo *) 0
static

Definition at line 86 of file page.c.

Referenced by display_info_page(), info_pager(), and preprocess_info_message().

◆ last_resp

int last_resp

Definition at line 70 of file page.c.

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

◆ note_fp

FILE* note_fp
static

Definition at line 57 of file page.c.

Referenced by draw_page(), load_article(), resize_article(), show_page(), and toggle_raw().

◆ note_h

◆ num_info_lines

int num_info_lines
static

Definition at line 81 of file page.c.

Referenced by display_info_page(), info_pager(), and preprocess_info_message().

◆ pgart

Initial value:
=
{
{ NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 , NULL},
0 , 0,
NULL, NULL, NULL, NULL,
}

Definition at line 63 of file page.c.

Referenced by body_search(), build_url_list(), cancel_article(), config_page(), draw_page_header(), feed_article(), group_page(), handle_resize(), load_article(), mail_to_author(), post_response(), resize_article(), show_cancel_info(), show_followup_info(), show_page(), strfquote(), thread_page(), and toggle_raw().

◆ reveal_ctrl_l

t_bool reveal_ctrl_l
static

◆ reveal_ctrl_l_lines

int reveal_ctrl_l_lines
static

◆ rotate

int rotate
static

Definition at line 83 of file page.c.

Referenced by load_article(), print_message_page(), and show_page().

◆ scroll_region_top

int scroll_region_top
static

Definition at line 84 of file page.c.

Referenced by display_info_page(), draw_page(), print_message_page(), process_search(), and scroll_page().

◆ search_line

int search_line
static

Definition at line 85 of file page.c.

Referenced by draw_page(), info_pager(), load_article(), process_search(), and show_page().

◆ show_all_headers

t_bool show_all_headers
static

Definition at line 88 of file page.c.

Referenced by cook_article(), load_article(), resize_article(), and show_page().

◆ show_raw_article

t_bool show_raw_article
static

◆ tabwidth

size_t tabwidth = 8

Definition at line 73 of file page.c.

Referenced by cook_article(), draw_page_header(), process_text_body_part(), and show_page().

◆ this_resp

◆ url_list

t_url* url_list
static

Definition at line 61 of file page.c.

Referenced by build_url_list(), find_url(), and free_url_list().

◆ urlmenu

t_menu urlmenu = { 0, 0, 0, show_url_page, draw_url_arrow, build_url_line }
static

Definition at line 118 of file page.c.

Referenced by draw_url_arrow(), show_url_page(), and url_page().