"Fossies" - the Fresh Open Source Software Archive

Member "tin-2.4.4/include/proto.h" (20 Nov 2019, 33344 Bytes) of package /linux/misc/tin-2.4.4.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 "proto.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.4.3_vs_2.4.4.

    1 /*
    2  *  Project   : tin - a Usenet reader
    3  *  Module    : proto.h
    4  *  Author    : Urs Janssen <urs@tin.org>
    5  *  Created   :
    6  *  Updated   : 2019-07-16
    7  *  Notes     :
    8  *
    9  * Copyright (c) 1997-2020 Urs Janssen <urs@tin.org>
   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 #ifndef PROTO_H
   42 #   define PROTO_H 1
   43 
   44 #ifndef KEYMAP_H
   45 #   include "keymap.h"
   46 #endif /* !KEYMAP_H */
   47 #ifndef OPTIONS_MENU_H
   48 #   include "options_menu.h"
   49 #endif /* !OPTIONS_MENU_H */
   50 
   51 /* This fixes ambiguities on platforms that don't distinguish extern case */
   52 #ifdef CASE_PROBLEM
   53 #   define Raw tin_raw
   54 #   define EndWin tin_EndWin
   55 #endif /* CASE_PROBLEM */
   56 
   57 /* active.c */
   58 extern char group_flag(char ch);
   59 extern int find_newnews_index(const char *cur_newnews_host);
   60 extern int read_news_active_file(void);
   61 extern t_bool match_group_list(const char *group, const char *group_list);
   62 extern t_bool parse_active_line(char *line, t_artnum *max, t_artnum *min, char *moderated);
   63 extern t_bool process_bogus(char *name);
   64 extern t_bool need_reread_active_file(void);
   65 extern t_bool resync_active_file(void);
   66 extern void create_save_active_file(void);
   67 extern void load_newnews_info(char *info);
   68 
   69 /* art.c */
   70 extern int find_artnum(t_artnum art);
   71 extern int global_get_multipart_info(int aindex, MultiPartInfo *setme);
   72 extern t_bool index_group(struct t_group *group);
   73 extern void do_update(t_bool catchup);
   74 extern void find_base(struct t_group *group);
   75 extern void make_threads(struct t_group *group, t_bool rethread);
   76 extern void set_article(struct t_article *art);
   77 extern void show_art_msg(const char *group);
   78 extern void sort_arts(unsigned /* int */ sort_art_type);
   79 
   80 /* attrib.c */
   81 extern int add_scope(const char *scope);
   82 extern void assign_attributes_to_groups(void);
   83 extern void build_news_headers_array(struct t_attribute *scope, t_bool header_to_display);
   84 extern void read_attributes_file(t_bool global_file);
   85 extern void write_attributes_file(const char *file);
   86 
   87 /* auth.c */
   88 #ifdef NNTP_ABLE
   89     extern t_bool authenticate(char *server, char *user, t_bool startup);
   90 #endif /* NNTP_ABLE */
   91 
   92 /* charset.c */
   93 extern char *convert_to_printable(char *buf, t_bool keep_tab);
   94 extern t_bool is_art_tex_encoded(FILE *fp);
   95 extern void convert_iso2asc(char *iso, char **asc_buffer, size_t *max_line_len, int t);
   96 extern void convert_tex2iso(char *from, char *to);
   97 #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
   98     extern wchar_t *wconvert_to_printable(wchar_t *wbuf, t_bool keep_tab);
   99 #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  100 
  101 /* color.c */
  102 extern void draw_pager_line(const char *str, int flags, t_bool raw_data);
  103 #ifdef HAVE_COLOR
  104     extern void bcol(int color);
  105     extern void fcol(int color);
  106 #   ifdef USE_CURSES
  107         extern void free_color_pair_arrays(void);
  108 #   endif /* USE_CURSES */
  109 #endif /* HAVE_COLOR */
  110 
  111 /* config.c */
  112 extern char **ulBuildArgv(char *cmd, int *new_argc);
  113 extern char *quote_space_to_dash(char *str);
  114 extern const char *print_boolean(t_bool value);
  115 extern t_bool match_boolean(char *line, const char *pat, t_bool *dst);
  116 extern t_bool match_integer(char *line, const char *pat, int *dst, int maxval);
  117 extern t_bool match_list(char *line, constext *pat, constext *const *table, int *dst);
  118 extern t_bool match_long(char *line, const char *pat, long *dst);
  119 extern t_bool match_string(char *line, const char *pat, char *dst, size_t dstlen);
  120 extern t_bool read_config_file(char *file, t_bool global_file);
  121 extern void quote_dash_to_space(char *str);
  122 extern void read_server_config(void);
  123 extern void write_config_file(char *file);
  124 
  125 /* cook.c */
  126 extern const char *get_filename(t_param *ptr);
  127 extern t_bool cook_article(t_bool wrap_lines, t_openartinfo *artinfo, int hide_uue, t_bool show_all_headers);
  128 extern t_bool expand_ctrl_chars(char **line, size_t *length, size_t lcook_width);
  129 
  130 /* curses.c */
  131 extern OUTC_RETTYPE outchar(OUTC_ARGS);
  132 extern int InitScreen(void);
  133 extern int RawState(void);
  134 extern int ReadCh(void);
  135 extern int get_arrow_key(int prech);
  136 #if !defined(USE_CURSES)
  137     extern int get_termcaps(void);
  138 #endif /* !USE_CURSES */
  139 extern void EndInverse(void);
  140 extern void EndWin(void);
  141 extern void InitWin(void);
  142 extern void Raw(int state);
  143 extern void StartInverse(void);
  144 extern void cursoroff(void);
  145 extern void cursoron(void);
  146 extern void highlight_string(int row, int col, int size);
  147 extern void set_keypad_off(void);
  148 extern void set_keypad_on(void);
  149 extern void set_xclick_off(void);
  150 extern void set_xclick_on(void);
  151 extern void setup_screen(void);
  152 extern void word_highlight_string(int row, int col, int size, int color);
  153 #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE) && !defined(USE_CURSES)
  154     extern wint_t ReadWch(void);
  155 #endif /* MULTIBYTE_ABLE && !NO_LOCALE && !USE_CURSES */
  156 #ifndef USE_CURSES
  157     extern void ClearScreen(void);
  158     extern void CleartoEOLN(void);
  159     extern void CleartoEOS(void);
  160     extern void MoveCursor(int row, int col);
  161     extern void ScrollScreen(int lines_to_scroll);
  162     extern void SetScrollRegion(int topline, int bottomline);
  163 #   ifdef HAVE_COLOR
  164         extern void reset_screen_attr(void);
  165 #   endif /* HAVE_COLOR */
  166 #endif /* USE_CURSES */
  167 #if 0
  168     extern void ToggleInverse(void);
  169 #endif /* 0 */
  170 
  171 /* debug.c */
  172 #ifdef DEBUG
  173     extern void debug_delete_files(void);
  174     extern void debug_print_file(const char *fname, const char *fmt, ...);
  175     extern void debug_print_active(void);
  176     extern void debug_print_arts(void);
  177     extern void debug_print_bitmap(struct t_group *group, struct t_article *art);
  178     extern void debug_print_comment(const char *comment);
  179     extern void debug_print_filters(void);
  180     extern void debug_print_header(struct t_article *s);
  181     extern void debug_print_malloc(int is_malloc, const char *xfile, int line, size_t size);
  182 #   ifdef DEBUG
  183     extern const char *logtime(void);
  184 #   endif /* DEBUG */
  185 #endif /* DEBUG */
  186 
  187 /* envarg.c */
  188 extern void envargs(int *Pargc, char ***Pargv, const char *envstr);
  189 
  190 /* feed.c */
  191 extern int feed_articles(int function, int level, t_function type, struct t_group *group, int respnum);
  192 
  193 /* filter.c */
  194 extern t_bool filter_articles(struct t_group *group);
  195 extern t_bool filter_menu(t_function type, struct t_group *group, struct t_article *art);
  196 extern t_bool filter_on_path(struct t_group *group);
  197 extern t_bool quick_filter(t_function type, struct t_group *group, struct t_article *art);
  198 extern t_bool quick_filter_select_posted_art(struct t_group *group, const char *subj, const char *a_message_id);
  199 extern t_bool read_filter_file(const char *file);
  200 extern void free_filter_array(struct t_filters *ptr);
  201 #if defined(SIGWINCH) || defined(SIGTSTP)
  202     extern void refresh_filter_menu(void);
  203 #endif /* SIGWINCH || SIGTSTP */
  204 extern void unfilter_articles(struct t_group *group);
  205 extern void write_filter_file(const char *filename);
  206 
  207 /* getline.c */
  208 extern char *tin_getline(const char *prompt, int number_only, const char *str, int max_chars, t_bool passwd, int which_hist);
  209 extern void gl_redraw(void);
  210 
  211 /* global.c */
  212 extern void bug_report(void);
  213 extern void move_up(void);
  214 extern void move_down(void);
  215 extern void page_up(void);
  216 extern void page_down(void);
  217 extern void top_of_list(void);
  218 extern void end_of_list(void);
  219 extern void move_to_item(int n);
  220 extern void prompt_item_num(int ch, const char *prompt);
  221 extern void scroll_down(void);
  222 extern void scroll_up(void);
  223 extern void set_first_screen_item(void);
  224 
  225 /* group.c */
  226 extern int group_page(struct t_group *group);
  227 extern t_bool group_mark_postprocess(int function, t_function feed_type, int respnum);
  228 extern void clear_note_area(void);
  229 extern void mark_screen(int screen_row, int screen_col, const char *value);
  230 extern void pos_first_unread_thread(void);
  231 extern void show_group_page(void);
  232 
  233 /* hashstr.c */
  234 extern char *hash_str(const char *s);
  235 extern void hash_init(void);
  236 extern void hash_reclaim(void);
  237 
  238 /* help.c */
  239 extern void show_help_page(const int level, const char *title);
  240 extern void show_mini_help(int level);
  241 extern void toggle_mini_help(int level);
  242 
  243 /* header.c */
  244 extern const char *get_domain_name(void);
  245 extern const char *get_fqdn(const char *host);
  246 extern const char *get_host_name(void);
  247 #ifndef FORGERY
  248     extern char *build_sender(void);
  249 #endif /* !FORGERY */
  250 
  251 /* heapsort.c */
  252 #ifndef HAVE_HEAPSORT
  253     extern int heapsort(void *, size_t, size_t, t_compfunc);
  254 #endif /* !HAVE_HEAPSORT */
  255 
  256 /* inews.c */
  257 extern t_bool submit_news_file(char *name, struct t_group *group, char *a_message_id);
  258 extern void get_from_name(char *from_name, struct t_group *thisgrp);
  259 extern void get_user_info(char *user_name, char *full_name);
  260 
  261 /* init.c */
  262 extern void init_selfinfo(void);
  263 extern void postinit_regexp(void);
  264 #ifdef HAVE_COLOR
  265     extern void postinit_colors(int last_color);
  266 #endif /* HAVE_COLOR */
  267 #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  268     extern t_bool utf8_pcre(void);
  269 #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  270 
  271 /* joinpath.c */
  272 extern void joinpath(char *result, size_t result_size, const char *dir, const char *file);
  273 
  274 /* keymap.c */
  275 extern t_bool read_keymap_file(void);
  276 extern void free_keymaps(void);
  277 extern void setup_default_keys(void);
  278 
  279 /* langinfo.c */
  280 #ifndef NO_LOCALE
  281     extern const char *tin_nl_langinfo(nl_item item);
  282 #endif /* !NO_LOCALE */
  283 
  284 /* list.c */
  285 extern char *random_organization(char *in_org);
  286 extern int find_group_index(const char *group, t_bool ignore_case);
  287 extern struct t_group *group_add(const char *group);
  288 extern struct t_group *group_find(const char *group_name, t_bool ignore_case);
  289 extern unsigned long hash_groupname(const char *group);
  290 extern void group_rehash(t_bool yanked_out);
  291 extern void init_group_hash(void);
  292 
  293 /* lock.c */
  294 extern int fd_lock(int fd, t_bool block);
  295 extern int fd_unlock(int fd);
  296 extern t_bool dot_lock(const char *filename);
  297 extern t_bool dot_unlock(const char *filename);
  298 #if 0 /* unused */
  299     extern int test_fd_lock(int fd);
  300 #endif /* 0 */
  301 
  302 /* mail.c */
  303 extern t_bool art_edit(struct t_group *group, struct t_article *article);
  304 extern void find_art_max_min(const char *group_path, t_artnum *art_max, t_artnum *art_min);
  305 extern void print_active_head(const char *active_file);
  306 extern void print_group_line(FILE *fp, const char *group_name, t_artnum art_max, t_artnum art_min, const char *base_dir);
  307 extern void read_descriptions(t_bool verb);
  308 extern void grp_del_mail_arts(struct t_group *group);
  309 extern void grp_del_mail_art(struct t_article *article);
  310 #ifdef HAVE_MH_MAIL_HANDLING
  311     extern void read_mail_active_file(void);
  312     extern void write_mail_active_file(void);
  313 #endif /* HAVE_MH_MAIL_HANDLING */
  314 
  315 /* main.c */
  316 extern int main(int argc, char *argv[]);
  317 extern int read_cmd_line_groups(void);
  318 extern void giveup(void);
  319 
  320 /* memory.c */
  321 extern void expand_active(void);
  322 extern void expand_art(void);
  323 extern void expand_base(void);
  324 extern void expand_newnews(void);
  325 extern void expand_save(void);
  326 extern void expand_scope(void);
  327 extern void init_alloc(void);
  328 extern void free_all_arrays(void);
  329 extern void free_art_array(void);
  330 extern void free_save_array(void);
  331 extern void free_scope(int num);
  332 extern void *my_malloc1(const char *file, int line, size_t size);
  333 extern void *my_calloc1(const char *file, int line, size_t nmemb, size_t size);
  334 extern void *my_realloc1(const char *file, int line, void *p, size_t size);
  335 #ifndef USE_CURSES
  336     extern void init_screen_array(t_bool allocate);
  337 #endif /* !USE_CURSES */
  338 
  339 /* mimetypes.c */
  340 extern void lookup_mimetype(const char *ext, t_part *part);
  341 extern t_bool lookup_extension(char *extension, size_t ext_len, const char *major, const char *minor);
  342 
  343 /* misc.c */
  344 extern char *buffer_to_ascii(char *c);
  345 extern char *escape_shell_meta(const char *source, int quote_area);
  346 extern char *get_tmpfilename(const char *filename);
  347 extern char *idna_decode(char *in);
  348 extern char *quote_wild(char *str);
  349 extern char *quote_wild_whitespace(char *str);
  350 extern char *strip_line(char *line);
  351 extern const char *eat_re(char *s, t_bool eat_was);
  352 extern const char *get_val(const char *env, const char *def);
  353 extern const char *gnksa_strerror(int errcode);
  354 extern int gnksa_check_from(char *from);
  355 extern int gnksa_split_from(const char *from, char *address, char *realname, int *addrtype);
  356 extern int get_initials(struct t_article *art, char *s, int maxsize);
  357 extern int gnksa_do_check_from(const char *from, char *address, char *realname);
  358 extern int my_mkdir(char *path, mode_t mode);
  359 extern int parse_from(const char *from, char *address, char *realname);
  360 extern int strfmailer(const char *mail_prog, char *subject, char *to, const char *filename, char *dest, size_t maxsize, const char *format);
  361 extern int strfpath(const char *format, char *str, size_t maxsize, struct t_group *group, t_bool expand_all);
  362 extern int strfquote(const char *group, int respnum, char *s, size_t maxsize, char *format);
  363 extern int tin_version_info(FILE *fp);
  364 extern int tin_gettime(struct t_tintime *tt);
  365 extern long file_mtime(const char *file);
  366 extern long file_size(const char *file);
  367 extern t_bool backup_file(const char *filename, const char *backupname);
  368 extern t_bool copy_fp(FILE *fp_ip, FILE *fp_op);
  369 extern t_bool invoke_cmd(const char *nam);
  370 extern t_bool invoke_editor(const char *filename, int lineno, struct t_group *group);
  371 extern t_bool mail_check(const char *mailbox_name);
  372 extern void append_file(char *old_filename, char *new_filename);
  373 extern void asfail(const char *file, int line, const char *cond);
  374 extern void base_name(const char *fullpath, char *file);
  375 extern void cleanup_tmp_files(void);
  376 extern void copy_body(FILE *fp_ip, FILE *fp_op, char *prefix, char *initl, t_bool raw_data);
  377 extern void create_index_lock_file(char *the_lock_file);
  378 extern void dir_name(const char *fullpath, char *dir);
  379 extern void draw_mark_selected(int i);
  380 extern void draw_percent_mark(long cur_num, long max_num);
  381 extern void get_author(t_bool thread, struct t_article *art, char *str, size_t len);
  382 extern void get_cwd(char *buf);
  383 extern void make_base_group_path(const char *base_dir, const char *group_name, char *group_path, size_t group_path_len);
  384 extern void make_group_path(const char *name, char *path);
  385 extern void process_charsets(char **line, size_t *max_line_len, const char *network_charset, const char *local_charset, t_bool conv_tex2iso);
  386 extern void read_input_history_file(void);
  387 extern void rename_file(const char *old_filename, const char *new_filename);
  388 extern void show_inverse_video_status(void);
  389 extern void strip_name(const char *from, char *address);
  390 extern void tin_done(int ret, const char *fmt, ...);
  391 extern void toggle_inverse_video(void);
  392 #if defined(CHARSET_CONVERSION) || (defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE))
  393     extern char *utf8_valid(char *line);
  394 #endif /* CHARSET_CONVERSION || (MULTIBYTE_ABLE && !NO_LOCALE) */
  395 #if defined(NO_LOCALE) || !defined(MULTIBYTE_ABLE)
  396     extern int my_isprint(int c);
  397 #endif /* NO_LOCALE || !MULTIBYTE_ABLE */
  398 #ifdef CHARSET_CONVERSION
  399     extern t_bool buffer_to_network(char *line, int mmnwcharset);
  400 #endif /* CHARSET_CONVERSION */
  401 #ifdef HAVE_COLOR
  402     extern t_bool toggle_color(void);
  403     extern void show_color_status(void);
  404 #endif /* HAVE_COLOR */
  405 #ifdef HAVE_ISPELL
  406     extern t_bool invoke_ispell(const char *nam, struct t_group *group);
  407 #endif /* HAVE_ISPELL */
  408 #ifndef NO_SHELL_ESCAPE
  409     extern void shell_escape(void);
  410     extern void do_shell_escape(void);
  411 #endif /* !NO_SHELL_ESCAPE */
  412 
  413 /* newsrc.c */
  414 extern int group_get_art_info(char *tin_spooldir, char *groupname, int grouptype, t_artnum *art_count, t_artnum *art_max, t_artnum *art_min);
  415 extern signed long int read_newsrc(char *newsrc_file, t_bool allgroups);
  416 extern signed long int write_newsrc(void);
  417 extern t_bool pos_group_in_newsrc(struct t_group *group, int pos);
  418 extern void art_mark(struct t_group *group, struct t_article *art, int flag);
  419 extern void backup_newsrc(void);
  420 extern void catchup_newsrc_file(void);
  421 extern void delete_group(char *group);
  422 extern void expand_bitmap(struct t_group *group, t_artnum min);
  423 extern void grp_mark_read(struct t_group *group, struct t_article *art);
  424 extern void grp_mark_unread(struct t_group *group);
  425 extern void parse_unread_arts(struct t_group *group, t_artnum min);
  426 extern void reset_newsrc(void);
  427 extern void subscribe(struct t_group *group, int sub_state, t_bool get_info);
  428 extern void thd_mark_read(struct t_group *group, long thread);
  429 extern void thd_mark_unread(struct t_group *group, long thread);
  430 extern void set_default_bitmap(struct t_group *group);
  431 
  432 /* nntplib.c */
  433 extern FILE *get_nntp_fp(FILE *fp);
  434 /* extern FILE *get_nntp_wr_fp(FILE *fp); */
  435 extern char *getserverbyfile(const char *file);
  436 extern int nntp_open(void);
  437 extern void nntp_close(t_bool send_no_quit);
  438 #ifdef NNTP_ABLE
  439     extern FILE *nntp_command(const char *, int, char *, size_t);
  440     extern char *get_server(char *string, int size);
  441     extern int check_extensions(int);
  442     extern int get_respcode(char *, size_t);
  443     extern int get_only_respcode(char *, size_t);
  444     extern int new_nntp_command(const char *command, int success, char *message, size_t mlen);
  445     extern void put_server(const char *string);
  446     extern void u_put_server(const char *string);
  447 #endif /* NNTP_ABLE */
  448 
  449 /* nrctbl.c */
  450 extern t_bool get_newsrcname(char *newsrc_name, size_t newsrc_name_len, const char *nntpserver_name);
  451 #ifdef NNTP_ABLE
  452     extern void get_nntpserver(char *nntpserver_name, size_t nntpserver_name_len, char *nick_name);
  453 #endif /* NNTP_ABLE */
  454 
  455 /* options_menu.c */
  456 extern char *fmt_option_prompt(char *dst, size_t len, t_bool editing, enum option_enum option);
  457 extern void config_page(const char *grpname, enum context level);
  458 extern int option_row(enum option_enum option);
  459 extern t_bool option_is_visible(enum option_enum option);
  460 extern void check_score_defaults(void);
  461 extern void refresh_config_page(enum option_enum act_option);
  462 extern void show_menu_help(const char *help_message);
  463 
  464 /* page.c */
  465 extern int show_page(struct t_group *group, int start_respnum, int *threadnum);
  466 extern void display_info_page(int part);
  467 extern void draw_page(const char *group, int part);
  468 extern void info_pager(FILE *info_fh, const char *title, t_bool wrap_at_ends);
  469 extern void resize_article(t_bool wrap_lines, t_openartinfo *artinfo);
  470 extern void toggle_raw(struct t_group *group);
  471 
  472 /* parsdate.y */
  473 extern time_t parsedate(char *p, TIMEINFO *now);
  474 
  475 /* pgp.c */
  476 #ifdef HAVE_PGP_GPG
  477     extern t_bool pgp_check_article(t_openartinfo *artinfo);
  478     extern void init_pgp(void);
  479     extern void invoke_pgp_mail(const char *nam, char *mail_to);
  480     extern void invoke_pgp_news(char *artfile);
  481 #endif /* HAVE_PGP_GPG */
  482 
  483 /* plp_snprintf.c */
  484 #ifndef HAVE_SNPRINTF
  485     extern int plp_snprintf(char *, size_t, const char *, ...);
  486 #endif /* !HAVE_SNPRINTF */
  487 #ifndef HAVE_VSNPRINTF
  488     extern int plp_vsnprintf(char *, size_t, const char *, va_list);
  489 #endif /* !HAVE_VSNPRINTF */
  490 
  491 /* post.c */
  492 extern char *backup_article_name(const char *the_article);
  493 extern char *checknadd_headers(const char *infile, struct t_group *group);
  494 extern int count_postponed_articles(void);
  495 extern int mail_to_author(const char *group, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data);
  496 extern int mail_to_someone(const char *address, t_bool confirm_to_mail, t_openartinfo *artinfo, const struct t_group *group);
  497 extern int post_response(const char *groupname, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data);
  498 extern int repost_article(const char *groupname, int respnum, t_bool supersede, t_openartinfo *artinfo);
  499 extern t_bool cancel_article(struct t_group *group, struct t_article *art, int respnum);
  500 extern t_bool mail_bug_report(void);
  501 extern t_bool pickup_postponed_articles(t_bool ask, t_bool all);
  502 extern t_bool post_article(const char *groupname);
  503 extern t_bool reread_active_after_posting(void);
  504 extern t_bool user_posted_messages(void);
  505 extern void init_postinfo(void);
  506 extern void quick_post_article(t_bool postponed_only, int num_cmd_line_groups);
  507 #if defined(SIGWINCH) || defined(SIGTSTP)
  508     extern void refresh_post_screen(int context);
  509 #endif /* SIGWINCH || SIGTSTP */
  510 #ifdef USE_CANLOCK
  511     extern char *build_canlock(const char *messageid, const char *secret);
  512     extern char *get_secret(void);
  513 #endif /* USE_CANLOCK */
  514 
  515 /* prompt.c */
  516 extern char *prompt_string_default(const char *prompt, char *def, const char *failtext, int history);
  517 extern char *sized_message(char **result, const char *format, const char *subject);
  518 extern int prompt_num(int ch, const char *prompt);
  519 extern int prompt_yn(const char *prompt, t_bool default_answer);
  520 extern int prompt_msgid(void);
  521 extern t_bool prompt_default_string(const char *prompt, char *buf, int buf_len, char *default_prompt, int which_hist);
  522 extern t_bool prompt_menu_string(int line, const char *prompt, char *var);
  523 extern t_bool prompt_option_char(enum option_enum option);
  524 extern t_bool prompt_option_list(enum option_enum option);
  525 extern t_bool prompt_option_num(enum option_enum option);
  526 extern t_bool prompt_option_on_off(enum option_enum option);
  527 extern t_bool prompt_option_string(enum option_enum option);
  528 extern t_bool prompt_string(const char *prompt, char *buf, int which_hist);
  529 extern void prompt_continue(void);
  530 extern void prompt_slk_redraw(void);
  531 extern void prompt_yn_redraw(void);
  532 
  533 /* read.c */
  534 extern char *tin_fgets(FILE *fp, t_bool header);
  535 #ifdef NNTP_ABLE
  536     extern void drain_buffer(FILE *fp);
  537 #endif /* NNTP_ABLE */
  538 
  539 /* refs.c */
  540 extern char *get_references(struct t_msgid *refptr);
  541 extern struct t_msgid *find_msgid(const char *msgid);
  542 extern void build_references(struct t_group *group);
  543 extern void clear_art_ptrs(void);
  544 extern void collate_subjects(void);
  545 extern void free_msgids(void);
  546 extern void thread_by_reference(void);
  547 
  548 /* regex.c */
  549 extern t_bool compile_regex(const char *regex, struct regex_cache *cache, int options);
  550 extern t_bool match_regex(const char *string, char *pattern, struct regex_cache *cache, t_bool icase);
  551 extern void highlight_regexes(int row, struct regex_cache *regex, int color);
  552 
  553 /* rfc1524.c */
  554 extern t_mailcap *get_mailcap_entry(t_part *part, const char *path);
  555 extern void free_mailcap(t_mailcap *tmailcap);
  556 
  557 /* rfc2045.c */
  558 extern int read_decoded_base64_line(FILE *file, char **line, size_t *max_line_len, const int max_lines_to_read, char **rest);
  559 extern int read_decoded_qp_line(FILE *file, char **line, size_t *max_line_len, const int max_lines_to_read);
  560 extern void rfc1521_encode(char *line, FILE *f, int e);
  561 
  562 /* rfc2046.c */
  563 extern FILE *open_art_fp(struct t_group *group, t_artnum art);
  564 extern const char *get_param(t_param *list, const char *name);
  565 extern char *parse_header(char *buf, const char *pat, t_bool decode, t_bool structured, t_bool keep_tab);
  566 extern int art_open(t_bool wrap_lines, struct t_article *art, struct t_group *group, t_openartinfo *artinfo, t_bool show_progress_meter, const char *pmesg);
  567 extern int content_type(char *type);
  568 extern int parse_rfc822_headers(struct t_header *hdr, FILE *from, FILE *to);
  569 extern t_param *new_params(void);
  570 extern t_part *new_part(t_part *part);
  571 extern void art_close(t_openartinfo *artinfo);
  572 extern void free_and_init_header(struct t_header *hdr);
  573 extern void free_list(t_param *list);
  574 extern void free_parts(t_part *ptr);
  575 extern void unfold_header(char *line);
  576 
  577 /* rfc2047.c */
  578 extern char *rfc1522_decode(const char *s);
  579 extern char *rfc1522_encode(char *s, const char *charset, t_bool ismail);
  580 extern int mmdecode(const char *what, int encoding, int delimiter, char *where);
  581 extern void rfc15211522_encode(const char *filename, constext *mime_encoding, struct t_group *group, t_bool allow_8bit_header, t_bool ismail);
  582 extern void compose_mail_mime_forwarded(const char *filename, FILE *articlefp, t_bool include_text, struct t_group *group);
  583 extern void compose_mail_text_plain(const char *filename, struct t_group *group);
  584 
  585 /* save.c */
  586 extern int check_start_save_any_news(int function, t_bool catchup);
  587 extern t_bool create_path(const char *path);
  588 extern t_bool post_process_files(t_function proc_type_func, t_bool auto_delete);
  589 extern t_bool save_and_process_art(t_openartinfo *artinfo, struct t_article *artptr, t_bool is_mailbox, const char *inpath, int max, t_bool post_process);
  590 extern t_part *get_part(int n);
  591 extern t_url *find_url(int n);
  592 extern void attachment_page(t_openartinfo *art);
  593 extern void decode_save_mime(t_openartinfo *art, t_bool postproc);
  594 extern void print_art_separator_line(FILE *fp, t_bool is_mailbox);
  595 
  596 /* screen.c */
  597 extern char *fmt_message(const char *fmt, va_list ap);
  598 extern void center_line(int line, t_bool inverse, const char *str);
  599 extern void clear_message(void);
  600 extern void draw_arrow_mark(int line);
  601 extern void erase_arrow(void);
  602 extern void error_message(unsigned int sdelay, const char *fmt, ...);
  603 extern void info_message(const char *fmt, ...);
  604 extern void perror_message(const char *fmt, ...);
  605 extern void ring_bell(void);
  606 extern void show_progress(const char *txt, t_artnum count, t_artnum total);
  607 extern void show_title(const char *title);
  608 extern void spin_cursor(void);
  609 extern void stow_cursor(void);
  610 extern void wait_message(unsigned int sdelay, const char *fmt, ...);
  611 
  612 /* search.c */
  613 extern enum option_enum search_config(t_bool forward, t_bool repeat, enum option_enum current, enum option_enum last);
  614 extern int get_search_vectors(int *start, int *end);
  615 extern int search(t_function func, int current_art, t_bool repeat);
  616 extern int search_active(t_bool forward, t_bool repeat);
  617 extern int search_article(t_bool forward, t_bool repeat, int start_line, int lines, t_lineinfo *line, int reveal_ctrl_l_lines, FILE *fp);
  618 extern int search_body(struct t_group *group, int current_art, t_bool repeat);
  619 extern int generic_search(t_bool forward, t_bool repeat, int current, int last, int level);
  620 extern void reset_srch_offsets(void);
  621 
  622 /* select.c */
  623 extern int add_my_group(const char *group, t_bool add, t_bool ignore_case);
  624 extern int choose_new_group(void);
  625 extern int skip_newgroups(void);
  626 extern void selection_page(int start_groupnum, int num_cmd_line_groups);
  627 extern void show_selection_page(void);
  628 extern void toggle_my_groups(const char *group);
  629 
  630 /* sigfile.c */
  631 extern void msg_write_signature(FILE *fp, t_bool include_dot_signature, struct t_group *thisgroup);
  632 
  633 /* signal.c */
  634 extern RETSIGTYPE(*sigdisp (int signum, RETSIGTYPE (*func)(SIG_ARGS))) (SIG_ARGS);
  635 extern t_bool set_win_size(int *num_lines, int *num_cols);
  636 extern void allow_resize(t_bool allow);
  637 extern void handle_resize(t_bool repaint);
  638 extern void set_noteslines(int num_lines);
  639 extern void set_signal_catcher(int flag);
  640 extern void set_signal_handlers(void);
  641 
  642 /* strftime.c */
  643 extern size_t my_strftime(char *s, size_t maxsize, const char *format, struct tm *timeptr);
  644 
  645 /* string.c */
  646 extern char *eat_tab(char *s);
  647 extern char *fmt_string(const char *fmt, ...);
  648 extern char *my_strdup(const char *str);
  649 extern char *str_trim(char *string);
  650 extern char *strunc(const char *message, int len);
  651 extern char *tin_ltoa(t_artnum value, int digits);
  652 extern char *tin_strtok(char *str, const char *delim);
  653 extern int sh_format(char *dst, size_t len, const char *fmt, ...);
  654 extern int strwidth(const char *str);
  655 extern size_t mystrcat(char **t, const char *s);
  656 extern void my_strncpy(char *p, const char *q, size_t n);
  657 extern void parse_format_string(const char *fmtstr, struct t_fmt *fmt);
  658 extern void str_lwr(char *str);
  659 extern int my_tolower(int);
  660 extern int my_toupper(int);
  661 #if !defined(HAVE_STRCASESTR) || defined(DECL_STRCASESTR)
  662     extern char *strcasestr(const char *haystack, const char *needle);
  663 #endif /* !HAVE_STRCASESTR || DECL_STRCASESTR */
  664 #if !defined(HAVE_STRSEP) || defined(DECL_SEP)
  665     extern char *strsep(char **stringp, const char *delim);
  666 #endif /* !HAVE_STRSEP || DECL_STRSEP */
  667 #ifndef HAVE_STRPBRK
  668     extern char *strpbrk(const char *str1, const char *str2);
  669 #endif /* !HAVE_STRPBRK */
  670 #ifndef HAVE_STRSTR
  671     extern char *strstr(const char *text, const char *pattern);
  672 #endif /* !HAVE_STRSTR */
  673 #ifndef HAVE_STRCASECMP
  674     extern int strcasecmp(const char *p, const char *q);
  675 #endif /* !HAVE STRCASECMP */
  676 #ifndef HAVE_STRNCASECMP
  677     extern int strncasecmp(const char *p, const char *q, size_t n);
  678 #endif /* !HAVE_STRNCASECMP */
  679 #ifndef HAVE_ATOI
  680     extern int atoi(const char *s);
  681 #endif /* !HAVE_ATOI */
  682 #ifndef HAVE_ATOL
  683     extern long atol(const char *s);
  684 #endif /* !HAVE_ATOL */
  685 #ifndef HAVE_STRTOL
  686     extern long strtol(const char *str, char **ptr, int use_base);
  687 #endif /* !HAVE STRTOL */
  688 #ifndef HAVE_STRERROR
  689     extern char *my_strerror(int n);
  690 #   define strerror(n) my_strerror(n)
  691 #endif /* !HAVE_STRERROR */
  692 #ifndef HAVE_STRRSTR
  693     extern char *my_strrstr(const char *str, const char *pat);
  694 #   define strrstr(s,p) my_strrstr(s,p)
  695 #endif /* !HAVE_STRRSTR */
  696 #if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  697     extern char *spart(const char *str, int columns, t_bool pad);
  698     extern char *wchar_t2char(const wchar_t *wstr);
  699     extern wchar_t *abbr_wcsgroupname(const wchar_t *grpname, int len);
  700     extern wchar_t *char2wchar_t(const char *str);
  701     extern wchar_t *wcspart(const wchar_t *wstr, int columns, t_bool pad);
  702     extern wchar_t *wexpand_tab(wchar_t *wstr, size_t tab_width);
  703     extern wchar_t *wstrunc(const wchar_t *wmessage, int len);
  704 #else
  705     extern char *abbr_groupname(const char *grpname, size_t len);
  706     extern char *expand_tab(char *str, size_t tab_width);
  707 #endif /* MULTIBYTE_ABLE && !NO_LOCALE */
  708 #if defined(HAVE_LIBICUUC) && defined(MULTIBYTE_ABLE) && defined(HAVE_UNICODE_UBIDI_H) && !defined(NO_LOCALE)
  709     extern char *render_bidi(const char *str, t_bool *is_rtl);
  710 #endif /* HAVE_LIBICUUC && MULTIBYTE_ABLE && HAVE_UNICODE_UBIDI_H && !NO_LOCALE */
  711 #ifdef HAVE_UNICODE_NORMALIZATION
  712     extern char *normalize(const char *str);
  713 #endif /* HAVE_UNICODE_NORMALIZATION */
  714 #if defined(HAVE_LIBICUUC) && defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
  715     extern UChar *char2UChar(const char *str);
  716     extern char *UChar2char(const UChar *ustr);
  717 #endif /* HAVE_LIBICUUC && MULTIBYTE_ABLE && !NO_LOCALE */
  718 
  719 /* tags.c */
  720 extern int line_is_tagged(int n);
  721 extern int tag_multipart(int base_index);
  722 extern t_bool arts_selected(void);
  723 extern t_bool set_range(int level, int min, int max, int curr);
  724 extern t_bool tag_article(int art);
  725 extern t_bool untag_all_articles(void);
  726 extern void do_auto_select_arts(void);
  727 extern void undo_auto_select_arts(void);
  728 extern void undo_selections(void);
  729 extern void untag_article(long art);
  730 
  731 /* tmpfile.c */
  732 #ifndef HAVE_TMPFILE
  733     extern FILE *tmpfile(void);
  734 #endif /* !HAVE_TMPFILE */
  735 
  736 /* my_tmpfile.c */
  737 extern int my_tmpfile(char *filename, size_t name_size, const char *base_dir);
  738 
  739 /* thread.c */
  740 extern int find_response(int i, int n);
  741 extern int get_score_of_thread(int n);
  742 extern int new_responses(int thread);
  743 extern int next_response(int n);
  744 extern int next_thread(int n);
  745 extern int next_unread(int n);
  746 extern int num_of_responses(int n);
  747 extern int prev_response(int n);
  748 extern int prev_unread(int n);
  749 extern int stat_thread(int n, struct t_art_stat *sbuf);
  750 extern int which_response(int n);
  751 extern int which_thread(int n);
  752 extern int thread_page(struct t_group *group, int respnum, int thread_depth, t_pagerinfo *page);
  753 extern t_bool thread_mark_postprocess(int function, t_function feed_type, int respnum);
  754 extern void fixup_thread(int respnum, t_bool redraw);
  755 
  756 /* version.c */
  757 extern struct t_version *check_upgrade(char *line, const char *skip, const char *version);
  758 extern void upgrade_prompt_quit(struct t_version *upgrade, const char *file);
  759 
  760 /* wildmat.c */
  761 extern t_bool wildmat(const char *text, char *p, t_bool icase);
  762 extern t_bool wildmatpos(const char *text, char *p, t_bool icase, int *srch_offsets, int srch_offsets_size);
  763 
  764 /* xface.c */
  765 #ifdef XFACE_ABLE
  766     extern void slrnface_stop(void);
  767     extern void slrnface_start(void);
  768     extern void slrnface_display_xface(char *face);
  769     extern void slrnface_clear_xface(void);
  770     extern void slrnface_suppress_xface(void);
  771     extern void slrnface_show_xface(void);
  772 #endif /* XFACE_ABLE */
  773 
  774 /* xref.c */
  775 extern t_bool overview_xref_support(void);
  776 extern void NSETRNG0(t_bitmap *bitmap, t_artnum low, t_artnum high);
  777 extern void NSETRNG1(t_bitmap *bitmap, t_artnum low, t_artnum high);
  778 extern void art_mark_xref_read(struct t_article *art);
  779 
  780 #endif /* !PROTO_H */