"Fossies" - the Fresh Open Source Software Archive

Member "tin-2.6.2/include/tinrc.h" (9 Dec 2022, 18338 Bytes) of package /linux/misc/tin-2.6.2.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "tinrc.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.6.1_vs_2.6.2.

    1 /*
    2  *  Project   : tin - a Usenet reader
    3  *  Module    : tinrc.h
    4  *  Author    : Jason Faultless <jason@altarstone.com>
    5  *  Created   : 1999-04-13
    6  *  Updated   : 2022-09-19
    7  *  Notes     :
    8  *
    9  * Copyright (c) 1999-2023 Jason Faultless <jason@altarstone.com>
   10  * All rights reserved.
   11  *
   12  * Redistribution and use in source and binary forms, with or without
   13  * modification, are permitted provided that the following conditions
   14  * are met:
   15  *
   16  * 1. Redistributions of source code must retain the above copyright notice,
   17  *    this list of conditions and the following disclaimer.
   18  *
   19  * 2. Redistributions in binary form must reproduce the above copyright
   20  *    notice, this list of conditions and the following disclaimer in the
   21  *    documentation and/or other materials provided with the distribution.
   22  *
   23  * 3. Neither the name of the copyright holder nor the names of its
   24  *    contributors may be used to endorse or promote products derived from
   25  *    this software without specific prior written permission.
   26  *
   27  * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
   28  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   29  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   30  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
   31  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
   32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
   33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   34  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
   35  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
   36  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
   37  * POSSIBILITY OF SUCH DAMAGE.
   38  */
   39 
   40 
   41 /*
   42  * These are the tin defaults read from the tinrc file
   43  * If you change this, ensure you change the initial values in init.c
   44  *
   45  * FIXME: most default_* could/should be stored in the .inputhistory
   46  *        and could be nuked if tin comes with a prefilled .inputhistory
   47  *        which is installed automatically if no .inputhistory is found.
   48  *
   49  * TODO:  sort in a useful order (also needs reordering in init.c)
   50  */
   51 
   52 #ifndef TINRC_H
   53 #   define TINRC_H 1
   54 
   55 struct t_config {
   56     /*
   57      * Chars used to show article status
   58      */
   59 #   if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
   60         wchar_t art_marked_deleted;
   61         wchar_t art_marked_inrange; /* misnomer, as it's also used for other ranges */
   62         wchar_t art_marked_return;
   63         wchar_t art_marked_selected;
   64         wchar_t art_marked_recent;
   65         wchar_t art_marked_unread;
   66         wchar_t art_marked_read;
   67         wchar_t art_marked_killed;
   68         wchar_t art_marked_read_selected;
   69 #   else
   70         char art_marked_deleted;
   71         char art_marked_inrange;    /* misnomer, as it's also used for other ranges */
   72         char art_marked_return;
   73         char art_marked_selected;
   74         char art_marked_recent;
   75         char art_marked_unread;
   76         char art_marked_read;
   77         char art_marked_killed;
   78         char art_marked_read_selected;
   79 #   endif /* MULTIBYTE_ABLE && !NO_LOCALE */
   80     char editor_format[PATH_LEN];       /* editor + parameters  %E +%N %F */
   81     char default_goto_group[HEADER_LEN];        /* default for the 'g' command */
   82     char default_mail_address[HEADER_LEN];
   83     char mailer_format[PATH_LEN];       /* mailer + parameters  %M %S %T %F */
   84 #   ifndef DONT_HAVE_PIPING
   85         char default_pipe_command[LEN];
   86 #   endif /* DONT_HAVE_PIPING */
   87     char default_post_newsgroups[HEADER_LEN];   /* default newsgroups to post to */
   88     char default_post_subject[LEN]; /* default subject when posting */
   89 #   ifndef DISABLE_PRINTING
   90         char printer[LEN];                  /* printer program specified from tinrc */
   91 #   endif /* !DISABLE_PRINTING */
   92     char default_range_group[LEN];
   93     char default_range_select[LEN];
   94     char default_range_thread[LEN];
   95     char default_pattern[LEN];
   96     char default_repost_group[LEN];     /* default group to repost to */
   97     char default_save_file[PATH_LEN];
   98     char default_search_art[LEN];       /* default when searching in article */
   99     char default_search_author[HEADER_LEN]; /* default when searching for author */
  100     char default_search_config[LEN];    /* default when searching config menu */
  101     char default_search_group[HEADER_LEN];      /* default when searching select screen */
  102     char default_search_subject[LEN];   /* default when searching by subject */
  103     char default_select_pattern[LEN];
  104     char default_shell_command[LEN];
  105     char mail_quote_format[LEN];
  106     char maildir[PATH_LEN];             /* mailbox dir where = saves are stored */
  107     int mailbox_format;                 /* format of the mailbox (mboxo, mboxrd, mmdf, ...) */
  108     char mail_address[HEADER_LEN];              /* user's mail address */
  109     char metamail_prog[PATH_LEN];               /* name of MIME message viewer */
  110 #   ifndef CHARSET_CONVERSION
  111         char mm_charset[LEN];               /* MIME charset */
  112 #   else
  113         int mm_network_charset;             /* MIME charset */
  114 #   endif /* !CHARSET_CONVERSION */
  115     char mm_local_charset[LEN];     /* display charset, not a rc/Menu-option anymore -> should be moved elsewhere */
  116 #   ifdef HAVE_ICONV_OPEN_TRANSLIT
  117         t_bool translit;                        /* use //TRANSLIT */
  118 #   endif /* HAVE_ICONV_OPEN_TRANSLIT */
  119     char news_headers_to_display[LEN];  /* which headers to display */
  120     char news_headers_to_not_display[LEN];  /* which headers to not display */
  121     char news_quote_format[LEN];
  122     char quote_chars[LEN];          /* quote chars for posting/mails ": " (size matches prefixbuf in copy_body() */
  123 #   ifdef HAVE_COLOR
  124         char quote_regex[LEN];              /* regex used to determine quoted lines */
  125         char quote_regex2[LEN];             /* regex used to determine twice quoted lines */
  126         char quote_regex3[LEN];             /* regex used to determine >=3 times quoted lines */
  127         char extquote_regex[LEN];           /* regex used to determine quoted lines from external sources */
  128 #   endif /* HAVE_COLOR */
  129     char slashes_regex[LEN];            /* regex used to highlight /slashes/ */
  130     char stars_regex[LEN];              /* regex used to highlight *stars* */
  131     char underscores_regex[LEN];            /* regex used to highlight _underscores_ */
  132     char strokes_regex[LEN];            /* regex used to highlight -strokes- */
  133     char sigfile[PATH_LEN];
  134     char strip_re_regex[LEN];           /* regex used to find and remove 'Re:'-like strings */
  135     char strip_was_regex[LEN];          /* regex used to find and remove '(was:.*'-like strings */
  136     char verbatim_begin_regex[LEN];         /* regex used to find the begin of a verbatim block */
  137     char verbatim_end_regex[LEN];           /* regex used to find the end of a verbatim block */
  138     char savedir[PATH_LEN];             /* directory to save articles to */
  139     char spamtrap_warning_addresses[LEN];
  140 #   ifdef NNTPS_ABLE
  141         char tls_ca_cert_file[PATH_LEN];    /* file containing trusted CA certificates */
  142 #   endif /* NNTPS_ABLE */
  143     char url_handler[LEN];              /* Helper app for opening URL's */
  144     char xpost_quote_format[LEN];
  145     int filter_days;                    /* num of days an article filter can be active */
  146     int default_filter_kill_header;
  147     int default_filter_select_header;
  148     int default_move_group;
  149     int default_save_mode;              /* Append/Overwrite existing file when saving */
  150     int getart_limit;                   /* number of article to get */
  151     int recent_time;                /* Time limit when article is "fresh" */
  152     int goto_next_unread;               /* jump to next unread article with SPACE|PGDN|TAB */
  153     int hide_uue;                       /* treatment of uuencoded data in pager */
  154     int kill_level;                     /* Define how killed articles are shown */
  155     int mail_mime_encoding;
  156     int post_mime_encoding;
  157     int post_process_type;              /* type of post processing to be performed */
  158     int reread_active_file_secs;        /* reread active file interval in seconds */
  159     int scroll_lines;                   /* # lines to scroll by in pager */
  160     int show_author;                    /* show_author value from 'M' menu in tinrc */
  161     int sort_article_type;              /* method used to sort arts[] */
  162     int sort_threads_type;              /* method used to sort base[] */
  163 #   ifdef USE_HEAPSORT
  164         int sort_function;              /* index into sort_function[] */
  165 #   endif /* USE_HEAPSORT */
  166     int strip_bogus;
  167     int thread_articles;                /* threading system for viewing articles */
  168     int thread_perc;                /* how close the match needs to be for THREAD_PERC to recognize two articles as the same thread */
  169     int thread_score;               /* how the score for threads is computed */
  170     int wildcard;                       /* 0=wildmat, 1=regex */
  171     int score_limit_kill;                   /* score limit to kill articles */
  172     int score_limit_select;                 /* score limit to select articles */
  173     int score_kill;                     /* default score for "kill" filter rules */
  174     int score_select;                   /* default score for "hot" filter rules */
  175     int trim_article_body;              /* remove unnecessary blank lines */
  176     int show_help_mail_sign;            /* show help/mail sign in level title */
  177 #   ifdef HAVE_COLOR
  178         int col_back;                       /* standard background color */
  179         int col_from;                       /* color of sender (From:) */
  180         int col_head;                       /* color of headerlines */
  181         int col_help;                       /* color of help pages */
  182         int col_invers_bg;                  /* color of inverse text (background) */
  183         int col_invers_fg;                  /* color of inverse text (foreground) */
  184         int col_minihelp;                   /* color of mini help menu */
  185         int col_normal;                     /* standard foreground color */
  186         int col_markdash;                   /* text highlighting with _underdashes_ */
  187         int col_markstar;                   /* text highlighting with *stars* */
  188         int col_markslash;                  /* text highlighting with /slashes/ */
  189         int col_markstroke;                 /* text highlighting with -strokes- */
  190         int col_message;                    /* color of message lines at bottom */
  191         int col_newsheaders;                /* color of actual news header fields */
  192         int col_quote;                      /* color of quotelines */
  193         int col_quote2;                     /* color of twice quoted lines */
  194         int col_quote3;                     /* color of >=3 times quoted lines */
  195         int col_extquote;                   /* color of quoted external text */
  196         int col_response;                   /* color of response counter */
  197         int col_signature;                  /* color of signature */
  198         int col_urls;                       /* color of urls highlight */
  199         int col_verbatim;                   /* color of verbatim blocks */
  200         int col_subject;                    /* color of article subject */
  201         int col_text;                       /* color of textlines */
  202         int col_title;                      /* color of Help/Mail-Sign */
  203 #   endif /* HAVE_COLOR */
  204     int word_h_display_marks;           /* display * or _ when highlighting or space or nothing */
  205     int mono_markdash;              /* attribute for text highlighting with _underdashes_ */
  206     int mono_markstar;              /* attribute for text highlighting with *stars* */
  207     int mono_markslash;             /* attribute for text highlighting with /slashes/ */
  208     int mono_markstroke;                /* attribute for text highlighting with -strokes- */
  209     t_bool word_highlight;              /* like word_highlight but stored in tinrc */
  210     t_bool url_highlight;               /* highlight urls in text bodies */
  211     int wrap_column;                /* screen column to wrap of text messages */
  212 #   ifdef HAVE_COLOR
  213         t_bool use_color;                   /* like use_color but stored in tinrc */
  214 #   endif /* HAVE_COLOR */
  215     t_bool abbreviate_groupname;        /* abbreviate groupnames like n.s.readers */
  216     t_bool add_posted_to_filter;
  217     t_bool advertising;
  218     t_bool alternative_handling;
  219     int auto_cc_bcc;                    /* add your name to cc/bcc automatically */
  220     t_bool auto_list_thread;            /* list thread when entering it using right arrow */
  221     t_bool auto_reconnect;              /* automatically reconnect to news server */
  222     t_bool batch_save;                  /* save arts if -M/-S command line switch specified */
  223     t_bool beginner_level;              /* beginner level (shows mini help a la elm) */
  224     t_bool cache_overview_files;        /* create local index files for NNTP overview files */
  225     t_bool catchup_read_groups;         /* ask if read groups are to be marked read */
  226     int confirm_choice;             /* what has to be confirmed */
  227     t_bool draw_arrow;                  /* draw -> or highlighted bar */
  228     t_bool force_screen_redraw;         /* force screen redraw after external (shell) commands */
  229     t_bool group_catchup_on_exit;       /* catchup group with left arrow key or not */
  230     t_bool info_in_last_line;
  231     t_bool inverse_okay;
  232     t_bool keep_dead_articles;          /* keep all dead articles in dead.articles */
  233     char posted_articles_file[PATH_LEN];        /* if set, file in which to keep posted articles */
  234     t_bool mail_8bit_header;            /* allow 8bit chars. in header of mail message */
  235     t_bool mark_ignore_tags;            /* Ignore tags for GROUP_MARK_THREAD_READ/THREAD_MARK_ARTICLE_READ */
  236     t_bool mark_saved_read;             /* mark saved article/thread as read */
  237     t_bool pos_first_unread;            /* position cursor at first/last unread article */
  238     t_bool post_8bit_header;            /* allow 8bit chars. in header when posting to newsgroup */
  239     t_bool post_process_view;           /* set TRUE to invoke mailcap viewer app */
  240 #   ifndef DISABLE_PRINTING
  241         t_bool print_header;                /* print all of mail header or just Subject: & From lines */
  242 #   endif /* !DISABLE_PRINTING */
  243     t_bool process_only_unread;         /* save/print/mail/pipe unread/all articles */
  244     t_bool prompt_followupto;           /* display empty Followup-To header in editor */
  245     int quote_style;                    /* quoting behaviour */
  246     t_bool show_description;
  247     t_bool show_only_unread_arts;       /* show only new/unread arts or all arts */
  248     t_bool show_only_unread_groups;     /* set TRUE to see only subscribed groups with new news */
  249     t_bool show_signatures;             /* show signatures when displaying articles */
  250     t_bool sigdashes;                   /* set TRUE to prepend every signature with dashes */
  251     t_bool signature_repost;            /* set TRUE to add signature when reposting articles */
  252 #   ifndef USE_CURSES
  253         t_bool strip_blanks;
  254 #   endif /* !USE_CURSES */
  255     t_bool strip_newsrc;
  256 #   if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  257         t_bool suppress_soft_hyphens;   /* set TRUE to remove soft hyphens (U+00AD) from articles */
  258 #   endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  259     t_bool tex2iso_conv;            /* convert "a to Umlaut-a */
  260     t_bool thread_catchup_on_exit;      /* catchup thread with left arrow key or not */
  261     t_bool unlink_article;
  262 #   if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  263         t_bool utf8_graphics;               /* use utf-8 characters for line drawing */
  264 #   endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  265     t_bool verbatim_handling;           /* Detection of verbatim blocks */
  266 #   ifdef HAVE_COLOR
  267         t_bool extquote_handling;       /* Detection of quoted text from external sources */
  268 #   endif /* HAVE_COLOR */
  269     char inews_prog[PATH_LEN];
  270 #   ifdef USE_CANLOCK
  271         int cancel_lock_algo;           /* algorithm used for Cancel-Lock/Cancel-Key */
  272 #   endif /* USE_CANLOCK */
  273     int interactive_mailer;         /* invoke user's mailreader */
  274     t_bool use_mouse;                   /* enables/disables mouse support under xterm */
  275 #   ifdef HAVE_KEYPAD
  276         t_bool use_keypad;
  277 #   endif /* HAVE_KEYPAD */
  278     t_bool wrap_on_next_unread;     /* Wrap around threads when searching next unread article */
  279     t_bool ask_for_metamail;            /* enables/disables the viewer query if a MIME message is going to be displayed */
  280     t_bool default_filter_kill_case;
  281     t_bool default_filter_kill_expire;
  282     t_bool default_filter_kill_global;
  283     t_bool default_filter_select_case;
  284     t_bool default_filter_select_expire;
  285 #   ifdef XFACE_ABLE
  286         t_bool use_slrnface;            /* Use the slrnface program to display 'X-Face:'s */
  287 #   endif /* XFACE_ABLE */
  288     t_bool default_filter_select_global;
  289     char select_format[LEN];        /* format string for the selection level */
  290     char group_format[LEN];         /* format string for the group level */
  291     char thread_format[LEN];        /* format string for the thread level */
  292     char date_format[LEN];          /* format string for the date display in the page header */
  293 #   ifdef HAVE_UNICODE_NORMALIZATION
  294         int normalization_form;
  295 #   endif /* HAVE_UNICODE_NORMALIZATION */
  296 #   if defined(HAVE_LIBICUUC) && defined(MULTIBYTE_ABLE) && defined(HAVE_UNICODE_UBIDI_H) && !defined(NO_LOCALE)
  297         t_bool render_bidi;
  298 #   endif /* HAVE_LIBICUUC && MULTIBYTE_ABLE && HAVE_UNICODE_UBIDI_H && !NO_LOCALE */
  299 #   ifdef CHARSET_CONVERSION
  300         int attrib_mm_network_charset;
  301         char attrib_undeclared_charset[LEN];
  302 #   endif /* !CHARSET_CONVERSION */
  303     char attrib_editor_format[PATH_LEN];
  304     char attrib_fcc[PATH_LEN];
  305     char attrib_maildir[PATH_LEN];
  306     char attrib_from[HEADER_LEN];
  307     char attrib_mailing_list[HEADER_LEN];
  308     char attrib_organization[LEN];
  309     char attrib_followup_to[LEN];
  310     char attrib_mime_types_to_save[LEN];
  311     char attrib_news_headers_to_display[LEN];
  312     char attrib_news_headers_to_not_display[LEN];
  313     char attrib_news_quote_format[LEN];
  314     char attrib_quote_chars[LEN];
  315     char attrib_sigfile[PATH_LEN];
  316     char attrib_savedir[PATH_LEN];
  317     char attrib_savefile[PATH_LEN];
  318     char attrib_x_body[LEN];
  319     char attrib_x_headers[HEADER_LEN];
  320 #   ifdef HAVE_ISPELL
  321         char attrib_ispell[PATH_LEN];
  322 #   endif /* HAVE_ISPELL */
  323     char attrib_quick_kill_scope[LEN];
  324     char attrib_quick_select_scope[LEN];
  325     char attrib_group_format[LEN];
  326     char attrib_thread_format[LEN];
  327     char attrib_date_format[LEN];
  328     int attrib_trim_article_body;
  329     int attrib_auto_cc_bcc;
  330     int attrib_quick_kill_header;
  331     int attrib_quick_select_header;
  332     int attrib_mail_mime_encoding;
  333 #   if defined(HAVE_ALARM) && defined(SIGALRM)
  334         /*
  335          * # seconds after which a read from the NNTP will timeout
  336          * NB: This is different from the NNTP server timing us out due to inactivity
  337          */
  338         int nntp_read_timeout_secs;
  339 #   endif /* HAVE_ALARM && SIGALRM */
  340     int attrib_post_mime_encoding;
  341     int attrib_post_process_type;
  342     int attrib_show_author;
  343     int attrib_sort_article_type;
  344     int attrib_sort_threads_type;
  345     int attrib_thread_articles;
  346     int attrib_thread_perc;
  347     t_bool attrib_add_posted_to_filter;
  348     t_bool attrib_advertising;
  349     t_bool attrib_alternative_handling;
  350     t_bool attrib_auto_list_thread;
  351     t_bool attrib_auto_select;
  352     t_bool attrib_batch_save;
  353     t_bool attrib_delete_tmp_files;
  354     t_bool attrib_group_catchup_on_exit;
  355     t_bool attrib_mail_8bit_header;
  356     t_bool attrib_mime_forward;
  357     t_bool attrib_mark_ignore_tags;
  358     t_bool attrib_mark_saved_read;
  359     t_bool attrib_pos_first_unread;
  360     t_bool attrib_post_8bit_header;
  361     t_bool attrib_post_process_view;
  362 #   ifndef DISABLE_PRINTING
  363         t_bool attrib_print_header;
  364 #   endif /* !DISABLE_PRINTING */
  365     t_bool attrib_process_only_unread;
  366     t_bool attrib_prompt_followupto;
  367     t_bool attrib_show_only_unread_arts;
  368     t_bool attrib_show_signatures;
  369     t_bool attrib_sigdashes;
  370     t_bool attrib_signature_repost;
  371 #   if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  372         t_bool attrib_suppress_soft_hyphens;
  373 #   endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  374     t_bool attrib_tex2iso_conv;
  375     t_bool attrib_thread_catchup_on_exit;
  376     t_bool attrib_verbatim_handling;
  377 #   ifdef HAVE_COLOR
  378         t_bool attrib_extquote_handling;
  379 #   endif /* HAVE_COLOR */
  380     t_bool attrib_x_comment_to;
  381     t_bool attrib_wrap_on_next_unread;
  382     t_bool attrib_ask_for_metamail;
  383     t_bool attrib_quick_kill_case;
  384     t_bool attrib_quick_kill_expire;
  385     t_bool attrib_quick_select_case;
  386     t_bool attrib_quick_select_expire;
  387 };
  388 
  389 #endif /* !TINRC_H */