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

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