"Fossies" - the Fresh Open Source Software Archive

Member "tin-2.4.5/include/proto.h" (1 Dec 2020, 33605 Bytes) of package /linux/misc/tin-2.4.5.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.4_vs_2.4.5.

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