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)  

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

Go to the source code of this file.

Data Structures

struct  msg_header


#define ADD_CAN_KEY(id)
#define MAX_MSG_HEADERS   20 /* shouldn't this be dynamic? */
#define POST_QUICK   0
#define POST_POSTPONED   1
#define POST_NORMAL   2
#define POST_RESPONSE   3
#define POST_REPOST   4
#define CA_ERROR_HEADER_LINE_BLANK   0x0000001
#define CA_ERROR_MISSING_FROM   0x0000004
#define CA_ERROR_DUPLICATED_FROM   0x0000008
#define CA_ERROR_MISSING_SUBJECT   0x0000010
#define CA_ERROR_EMPTY_SUBJECT   0x0000040
#define CA_ERROR_EMPTY_NEWSGROUPS   0x0000200
#define CA_ERROR_BAD_CHARSET   0x0000800
#define CA_ERROR_BAD_ENCODING   0x0001000
#define CA_ERROR_BAD_MESSAGE_ID   0x0002000
#define CA_ERROR_BAD_DATE   0x0004000
#define CA_ERROR_BAD_EXPIRES   0x0008000
#define CA_ERROR_NEWSGROUPS_NOT_7BIT   0x0010000
#define CA_ERROR_FOLLOWUP_TO_NOT_7BIT   0x0020000
#define CA_ERROR_NEWSGROUPS_POSTER   0x0080000
#define CA_ERROR_FOLLOWUP_TO_POSTER   0x0100000
#define CA_ERROR_SPACE_IN_NEWSGROUPS   0x0200000
#define CA_ERROR_SPACE_IN_FOLLOWUP_TO   0x0800000
#define CA_WARNING_LONG_SIGNATURE   0x000020
#define MAXREFSIZE   512
#define FromSameUser   (strcasestr(from_name, arts[respnum].from))
#define NotSuperseding   (!supersede || (!FromSameUser) || art_type != GROUP_TYPE_NEWS)
#define Superseding   (supersede && FromSameUser && art_type == GROUP_TYPE_NEWS)


static FILE * create_mail_headers (char *filename, size_t filename_len, const char *suffix, const char *to, const char *subject, struct t_header *extra_hdrs)
static char ** build_nglist (char *ngs_list, int *ngcnt)
static char ** split_address_list (const char *addresses, unsigned int *cnt)
static int add_mail_quote (FILE *fp, int respnum)
static int append_mail (const char *the_article, const char *addr, const char *the_mailbox)
static int build_post_hist_list (void)
static int check_article_to_be_posted (const char *the_article, int art_type, struct t_group **group, t_bool art_unchanged, t_bool use_cache)
static int mail_loop (const char *filename, t_function func, char *subject, const char *groupname, const char *prompt, FILE *articlefp)
static int msg_add_x_body (FILE *fp_out, const char *body)
static int msg_write_headers (FILE *fp)
static int post_loop (int type, struct t_group *group, t_function func, const char *posting_msg, int art_type, int offset)
static int process_post_hist (int n)
static unsigned int get_recipients (struct t_header *hdr, char *buf, size_t buflen)
static size_t skip_id (const char *id)
static struct t_groupcheck_moderated (const char *groups, int *art_type, const char *failmsg)
static t_bool address_in_list (const char *addresses, const char *address)
static t_bool backup_article (const char *the_article)
static t_bool check_for_spamtrap (const char *addr)
static t_bool create_normal_article_headers (struct t_group *group, const char *newsgroups, int art_type)
static t_bool damaged_id (const char *id)
static t_bool fetch_postponed_article (const char tmp_file[], char subject[], char newsgroups[])
static t_bool insert_from_header (const char *infile)
static t_bool is_crosspost (const char *xref)
static t_bool must_include (const char *id)
static t_bool repair_article (t_function *result, struct t_group *group)
static t_bool stripped_double_ngs (char **newsgroups, int *ngcnt)
static t_bool submit_mail_file (const char *file, struct t_group *group, FILE *articlefp, t_bool include_text)
static t_function post_hist_left (void)
static t_function post_hist_right (void)
static t_function prompt_rejected (void)
static t_function prompt_to_send (const char *subject)
static void add_headers (const char *infile, const char *a_message_id)
static void build_post_hist_line (int i)
static void draw_post_hist_arrow (void)
static void appendid (char **where, const char **what)
static void find_reply_to_addr (char *from_addr, t_bool parse, struct t_header *hdr)
static void free_post_hist_list (void)
static void join_references (char *buffer, const char *oldrefs, const char *newref)
static void msg_add_header (const char *name, const char *text)
static void msg_add_x_headers (const char *headers)
static void msg_free_headers (void)
static void msg_init_headers (void)
static void post_postponed_article (int ask, const char *subject, const char *newsgroups)
static void postpone_article (const char *the_article)
static void setup_check_article_screen (int *init)
static void show_followup_info (void)
static void show_post_hist_page (void)
static void strip_double_ngs (char *ngs_list)
static void update_active_after_posting (char *newsgroups)
static void update_posted_info_file (const char *group, int action, const char *subj, const char *a_message_id)
static void show_cancel_info (void)
void init_postinfo (void)
char * backup_article_name (const char *the_article)
t_bool post_hist_page (void)
t_postedfind_post_hist (int n)
void quick_post_article (t_bool postponed_only, int num_cmd_line_groups)
int count_postponed_articles (void)
t_bool pickup_postponed_articles (t_bool ask, t_bool all)
t_bool post_article (const char *groupname)
int post_response (const char *groupname, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data)
int mail_to_someone (const char *address, t_bool confirm_to_mail, t_openartinfo *artinfo, const struct t_group *group)
t_bool mail_bug_report (void)
int mail_to_author (const char *group, int respnum, t_bool copy_text, t_bool with_headers, t_bool raw_data)
t_bool cancel_article (struct t_group *group, struct t_article *art, int respnum)
int repost_article (const char *groupname, int respnum, t_bool supersede, t_openartinfo *artinfo)
char * checknadd_headers (const char *infile, struct t_group *group)
t_bool reread_active_after_posting (void)


static int start_line_offset = 1
char bug_addr [1024]
static char my_distribution [1024]
static char reply_to [1024]
static struct msg_header msg_headers [20/*shouldn 't this be dynamic? */]
static t_postedpost_hist_list
static t_menu phmenu = { 0, 0, 0, show_post_hist_page, draw_post_hist_arrow, build_post_hist_line }

Macro Definition Documentation


#define ADD_CAN_KEY (   id)

Definition at line 87 of file post.c.


#define ADD_MSG_ID_HEADER ( )

Definition at line 106 of file post.c.


#define CA_ERROR_BAD_CHARSET   0x0000800

Definition at line 1186 of file post.c.


#define CA_ERROR_BAD_DATE   0x0004000

Definition at line 1189 of file post.c.


#define CA_ERROR_BAD_ENCODING   0x0001000

Definition at line 1187 of file post.c.


#define CA_ERROR_BAD_EXPIRES   0x0008000

Definition at line 1190 of file post.c.


#define CA_ERROR_BAD_MESSAGE_ID   0x0002000

Definition at line 1188 of file post.c.



Definition at line 1193 of file post.c.



Definition at line 1185 of file post.c.


#define CA_ERROR_DUPLICATED_FROM   0x0000008

Definition at line 1178 of file post.c.



Definition at line 1183 of file post.c.



Definition at line 1180 of file post.c.


#define CA_ERROR_EMPTY_NEWSGROUPS   0x0000200

Definition at line 1184 of file post.c.


#define CA_ERROR_EMPTY_SUBJECT   0x0000040

Definition at line 1181 of file post.c.


#define CA_ERROR_FOLLOWUP_TO_NOT_7BIT   0x0020000

Definition at line 1192 of file post.c.


#define CA_ERROR_FOLLOWUP_TO_POSTER   0x0100000

Definition at line 1195 of file post.c.


#define CA_ERROR_HEADER_LINE_BLANK   0x0000001

Definition at line 1175 of file post.c.



Definition at line 1176 of file post.c.


#define CA_ERROR_MISSING_FROM   0x0000004

Definition at line 1177 of file post.c.



Definition at line 1182 of file post.c.


#define CA_ERROR_MISSING_SUBJECT   0x0000010

Definition at line 1179 of file post.c.



Definition at line 1200 of file post.c.



Definition at line 1198 of file post.c.


#define CA_ERROR_NEWSGROUPS_NOT_7BIT   0x0010000

Definition at line 1191 of file post.c.


#define CA_ERROR_NEWSGROUPS_POSTER   0x0080000

Definition at line 1194 of file post.c.


#define CA_ERROR_SPACE_IN_FOLLOWUP_TO   0x0800000

Definition at line 1199 of file post.c.


#define CA_ERROR_SPACE_IN_NEWSGROUPS   0x0200000

Definition at line 1197 of file post.c.



Definition at line 1208 of file post.c.



Definition at line 1210 of file post.c.


#define CA_WARNING_LONG_SIGNATURE   0x000020

Definition at line 1207 of file post.c.



Definition at line 1205 of file post.c.



Definition at line 1209 of file post.c.



Definition at line 1203 of file post.c.



Definition at line 1204 of file post.c.



Definition at line 1202 of file post.c.



Definition at line 1206 of file post.c.



Definition at line 120 of file post.c.

◆ FromSameUser

#define FromSameUser   (strcasestr(from_name, arts[respnum].from))

Definition at line 4479 of file post.c.


#define MAX_MSG_HEADERS   20 /* shouldn't this be dynamic? */

Definition at line 109 of file post.c.


#define MAXREFSIZE   512

Definition at line 3136 of file post.c.

◆ NotSuperseding

#define NotSuperseding   (!supersede || (!FromSameUser) || art_type != GROUP_TYPE_NEWS)

Definition at line 4481 of file post.c.


#define POST_NORMAL   2

Definition at line 114 of file post.c.


#define POST_POSTPONED   1

Definition at line 113 of file post.c.


#define POST_QUICK   0

Definition at line 112 of file post.c.


#define POST_REPOST   4

Definition at line 116 of file post.c.


#define POST_RESPONSE   3

Definition at line 115 of file post.c.



Definition at line 117 of file post.c.

◆ Superseding

#define Superseding   (supersede && FromSameUser && art_type == GROUP_TYPE_NEWS)

Definition at line 4482 of file post.c.

Function Documentation

◆ add_headers()

static void add_headers ( const char *  infile,
const char *  a_message_id 

◆ add_mail_quote()

static int add_mail_quote ( FILE *  fp,
int  respnum 

Definition at line 3787 of file post.c.

References buf, CURR_GROUP, HEADER_LEN, t_config::mail_quote_format, strfquote(), and tinrc.

Referenced by mail_to_author().

◆ address_in_list()

static t_bool address_in_list ( const char *  addresses,
const char *  address 

Definition at line 5427 of file post.c.

References FALSE, FreeIfNeeded, my_malloc, my_realloc, split_address_list(), strcasecmp(), strip_name(), and TRUE.

Referenced by create_mail_headers().

◆ append_mail()

◆ appendid()

static void appendid ( char **  where,
const char **  what 

Definition at line 3021 of file post.c.

Referenced by join_references().

◆ backup_article()

static t_bool backup_article ( const char *  the_article)

Definition at line 352 of file post.c.

References backup_article_name(), and backup_file().

Referenced by post_loop().

◆ backup_article_name()

char * backup_article_name ( const char *  the_article)

Definition at line 341 of file post.c.

References name, PATH_LEN, and snprintf.

Referenced by backup_article(), and post_loop().

◆ build_nglist()

static char ** build_nglist ( char *  ngs_list,
int *  ngcnt 

Definition at line 5873 of file post.c.

References my_malloc, and ulBuildArgv().

Referenced by check_article_to_be_posted(), and strip_double_ngs().

◆ build_post_hist_line()

◆ build_post_hist_list()

◆ cancel_article()

t_bool cancel_article ( struct t_group group,
struct t_article art,
int  respnum 

Definition at line 4222 of file post.c.

References _, ADD_CAN_KEY, ADD_MSG_ID_HEADER, art, t_group::attribute, buf, clear_message(), copy_fp(), cPostCancel, debug, DEBUG_MISC, t_header::distrib, error_message(), FALSE, forever, free_and_init_header(), t_header::from, func, get_from_name(), GLOBAL_ABORT, GLOBAL_QUIT, GROUP_TYPE_MAIL, GROUP_TYPE_SAVE, grp_del_mail_art(), openartinfo::hdr, HEADER_LEN, homedir, info_message(), invoke_editor(), joinpath(), LEN, MAXKEYLEN, t_header::messageid, t_group::moderated, msg_add_header(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), my_distribution, t_group::name, t_header::newsgroups, note_h, t_attribute::organization, parse_rfc822_headers(), PATH_LEN, perror_message(), pgart, POST_CANCEL, post_cancel_keys, post_delete_keys, POST_EDIT, POST_SUPERSEDE, PrintFuncKey, process_id, t_attribute::prompt_followupto, prompt_slk_response(), random_organization(), Raw(), openartinfo::raw, RawState(), redraw_screen, repost_article(), S_IRUSR, S_IWUSR, setup_check_article_screen(), show_cancel_info(), signal_context, sized_message(), snprintf, start_line_offset, strcasestr(), strip_double_ngs(), t_header::subj, submit_news_file(), TIN_CANCEL_NAME, TRUE, txt_art_cancel, txt_art_cannot_cancel, txt_article_cancelled, txt_cancel_article, txt_cancelling_art, txt_cannot_open, txt_error_header_line_missing, txt_quit_cancel, t_group::type, unlink, update_posted_info_file(), wait_message(), and t_attribute::x_headers.

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

◆ check_article_to_be_posted()

static int check_article_to_be_posted ( const char *  the_article,
int  art_type,
struct t_group **  group,
t_bool  art_unchanged,
t_bool  use_cache 

Definition at line 1230 of file post.c.

References _, t_group::aliasedto, t_group::attribute, t_config::beginner_level, BlankIfNull, build_nglist(), CA_ERROR_BAD_CHARSET, CA_ERROR_BAD_DATE, CA_ERROR_BAD_ENCODING, CA_ERROR_BAD_EXPIRES, CA_ERROR_BAD_MESSAGE_ID, CA_ERROR_DISTRIBUTIOIN_NOT_7BIT, CA_ERROR_DUPLICATED_FOLLOWUP_TO, CA_ERROR_DUPLICATED_FROM, CA_ERROR_DUPLICATED_NEWSGROUPS, CA_ERROR_DUPLICATED_SUBJECT, CA_ERROR_EMPTY_NEWSGROUPS, CA_ERROR_EMPTY_SUBJECT, CA_ERROR_FOLLOWUP_TO_NOT_7BIT, CA_ERROR_FOLLOWUP_TO_POSTER, CA_ERROR_HEADER_LINE_BLANK, CA_ERROR_MISSING_BODY_SEPARATOR, CA_ERROR_MISSING_FROM, CA_ERROR_MISSING_NEWSGROUPS, CA_ERROR_MISSING_SUBJECT, CA_ERROR_NEWLINE_IN_FOLLOWUP_TO, CA_ERROR_NEWLINE_IN_NEWSGROUPS, CA_ERROR_NEWSGROUPS_NOT_7BIT, CA_ERROR_NEWSGROUPS_POSTER, CA_ERROR_SPACE_IN_FOLLOWUP_TO, CA_ERROR_SPACE_IN_NEWSGROUPS, CA_WARNING_ENCODING_EXTERNAL_INEWS, CA_WARNING_FOLLOWUP_TO_EXAMPLE, CA_WARNING_LONG_SIGNATURE, CA_WARNING_MULTIPLE_SIGDASHES, CA_WARNING_NEWSGROUPS_EXAMPLE, CA_WARNING_RE_WITHOUT_REFERENCES, CA_WARNING_REFERENCES_WITHOUT_RE, CA_WARNING_SPACES_ONLY_SUBJECT, CA_WARNING_WRONG_SIGDASHES, cCOLS, damaged_id(), t_group::description, EndInverse(), FALSE, FreeIfNeeded, gnksa_check_from(), GNKSA_LOCALPART_MISSING, GNKSA_MISSING_REALNAME, GNKSA_OK, gnksa_split_from(), gnksa_strerror(), group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, HEADER_LEN, IMF_LINE_LEN, t_config::inews_prog, INTERNAL_CMD, isascii, list_active, MAX_COL, MAX_SIG_LINES, MIME_ENCODING_7BIT, MIME_ENCODING_BASE64, MIME_ENCODING_QP, t_config::mm_charset, t_config::mm_local_charset, my_fflush, my_fprintf, my_malloc, my_strdup(), N_, name, parse_header(), parsedate(), perror_message(), PLURAL, t_attribute::post_mime_encoding, t_config::post_mime_encoding, Raw(), RawState(), rfc1522_encode(), setup_check_article_screen(), SIGDASHES, StartInverse(), strcasecmp(), STRCMPEQ, STRCPY, stripped_double_ngs(), strncasecmp(), tin_fgets(), tinrc, TRUE, txt_art_mailgroups, txt_art_newsgroups, txt_base64, txt_cannot_open, txt_error_approved, txt_error_bad_approved, txt_error_bad_from, txt_error_bad_msgidfqdn, txt_error_bad_replyto, txt_error_bad_to, txt_error_followup_poster, txt_error_header_and_body_not_separate, txt_error_header_duplicate, txt_error_header_format, txt_error_header_line_bad_charset, txt_error_header_line_bad_encoding, txt_error_header_line_blank, txt_error_header_line_colon, txt_error_header_line_comma, txt_error_header_line_empty, txt_error_header_line_groups_contd, txt_error_header_line_missing, txt_error_header_line_not_7bit, txt_error_header_line_space, txt_error_newsgroups_poster, txt_error_sender_in_header_not_allowed, txt_followup_newsgroups, txt_followup_poster, txt_mime_7bit_charsets, txt_newsgroup, txt_quoted_printable, txt_warn_art_line_too_long, txt_warn_article_unchanged, txt_warn_blank_subject, txt_warn_encoding_and_external_inews, txt_warn_example_hierarchy, txt_warn_followup_to_several_groups, txt_warn_grp_renamed, txt_warn_missing_followup_to, txt_warn_multiple_sigs, txt_warn_not_in_newsrc, txt_warn_not_valid_newsgroup, txt_warn_posting_etiquette, txt_warn_re_but_no_references, txt_warn_references_but_no_re, txt_warn_sig_too_long, txt_warn_wrong_sig_format, t_group::type, and unfold_header().

Referenced by post_loop().

◆ check_for_spamtrap()

static t_bool check_for_spamtrap ( const char *  addr)

Definition at line 4158 of file post.c.

References FALSE, my_strdup(), t_config::spamtrap_warning_addresses, strcasestr(), tinrc, and TRUE.

Referenced by mail_to_author().

◆ check_moderated()

◆ checknadd_headers()

◆ count_postponed_articles()

int count_postponed_articles ( void  )

Definition at line 2780 of file post.c.

References t_group::count, HEADER_LEN, and postponed_articles_file.

Referenced by main(), and pickup_postponed_articles().

◆ create_mail_headers()

◆ create_normal_article_headers()

◆ damaged_id()

static t_bool damaged_id ( const char *  id)

Definition at line 3090 of file post.c.

References FALSE, isascii, and TRUE.

Referenced by check_article_to_be_posted(), and join_references().

◆ draw_post_hist_arrow()

static void draw_post_hist_arrow ( void  )

◆ fetch_postponed_article()

static t_bool fetch_postponed_article ( const char  tmp_file[],
char  subject[],
char  newsgroups[] 

◆ find_post_hist()

t_posted * find_post_hist ( int  n)

Definition at line 691 of file post.c.

References posted::next, and post_hist_list.

Referenced by build_post_hist_line(), draw_post_hist_arrow(), generic_search(), and process_post_hist().

◆ find_reply_to_addr()

static void find_reply_to_addr ( char *  from_addr,
t_bool  parse,
struct t_header hdr 

Definition at line 5074 of file post.c.

References t_header::from, HEADER_LEN, parse_from(), t_header::replyto, and rfc1522_decode().

Referenced by mail_to_author(), and repost_article().

◆ free_post_hist_list()

static void free_post_hist_list ( void  )

Definition at line 966 of file post.c.

References posted::next, and post_hist_list.

Referenced by build_post_hist_list(), and post_hist_page().

◆ get_recipients()

static unsigned int get_recipients ( struct t_header hdr,
char *  buf,
size_t  buflen 

◆ init_postinfo()

void init_postinfo ( void  )

Definition at line 286 of file post.c.

References my_distribution, my_strncpy(), and reply_to.

Referenced by init_selfinfo().

◆ insert_from_header()

◆ is_crosspost()

static t_bool is_crosspost ( const char *  xref)

Definition at line 3114 of file post.c.

References t_group::count, FALSE, and TRUE.

Referenced by post_response().

◆ join_references()

static void join_references ( char *  buffer,
const char *  oldrefs,
const char *  newref 

Definition at line 3145 of file post.c.

References appendid(), damaged_id(), MAXREFSIZE, must_include(), my_malloc, and skip_id().

Referenced by post_response(), and repost_article().

◆ mail_bug_report()

◆ mail_loop()

◆ mail_to_author()

◆ mail_to_someone()

◆ msg_add_header()

static void msg_add_header ( const char *  name,
const char *  text 

◆ msg_add_x_body()

static int msg_add_x_body ( FILE *  fp_out,
const char *  body 

Definition at line 4833 of file post.c.

References CURR_GROUP, FALSE, HEADER_LEN, PATH_LEN, STRCPY, and strfpath().

Referenced by create_normal_article_headers(), and post_response().

◆ msg_add_x_headers()

static void msg_add_x_headers ( const char *  headers)

◆ msg_free_headers()

static void msg_free_headers ( void  )

◆ msg_init_headers()

static void msg_init_headers ( void  )

◆ msg_write_headers()

static int msg_write_headers ( FILE *  fp)

◆ must_include()

static t_bool must_include ( const char *  id)

Definition at line 3048 of file post.c.

References FALSE, and TRUE.

Referenced by join_references().

◆ pickup_postponed_articles()

◆ post_article()

◆ post_hist_left()

static t_function post_hist_left ( void  )

Definition at line 477 of file post.c.

References GLOBAL_QUIT.

Referenced by post_hist_page().

◆ post_hist_page()

t_bool post_hist_page ( void  )

Definition at line 519 of file post.c.

References _, bool_not, build_post_hist_list(), clear_note_area(), t_menu::curr, currmenu, DIGIT_1, DIGIT_2, DIGIT_3, DIGIT_4, DIGIT_5, DIGIT_6, DIGIT_7, DIGIT_8, DIGIT_9, do_shell_escape(), end_of_list(), FALSE, forever, free_post_hist_list(), func, func_to_key(), generic_search(), GLOBAL_FIRST_PAGE, GLOBAL_HELP, GLOBAL_LAST_PAGE, GLOBAL_LINE_DOWN, GLOBAL_LINE_UP, GLOBAL_PAGE_DOWN, GLOBAL_PAGE_UP, GLOBAL_QUIT, GLOBAL_REDRAW_SCREEN, GLOBAL_SCROLL_DOWN, GLOBAL_SCROLL_UP, GLOBAL_SEARCH_REPEAT, GLOBAL_SEARCH_SUBJECT_BACKWARD, GLOBAL_SEARCH_SUBJECT_FORWARD, GLOBAL_SHELL_ESCAPE, GLOBAL_TOGGLE_HELP_DISPLAY, GLOBAL_TOGGLE_INFO_LAST_LINE, handle_keypad(), t_config::info_in_last_line, info_message(), last_search, LOOKUP_ART_UNAVAIL, LOOKUP_FAILED, LOOKUP_NO_LAST, LOOKUP_REPLY, LOOKUP_UNAVAIL, t_menu::max, MAXKEYLEN, move_down(), move_to_item(), move_up(), my_retouch, page_down(), page_up(), phmenu, post_hist_keys, post_hist_left(), post_hist_list, post_hist_right(), POSTED_LEVEL, POSTED_SELECT, PrintFuncKey, process_post_hist(), prompt_item_num(), scroll_down(), scroll_up(), set_xclick_off(), show_help_page(), show_post_hist_page(), tinrc, toggle_mini_help(), top_of_list(), TRUE, txt_art_unavailable, txt_bad_command, txt_lookup_func_not_available, txt_lookup_func_not_nntp, txt_no_last_message, txt_no_prev_search, txt_post_history_lookup_failed, txt_post_history_menu_com, txt_post_history_op_unavail_for_reply, txt_post_history_recursion, and txt_select_art.

Referenced by group_page(), selection_page(), show_page(), and thread_page().

◆ post_hist_right()

static t_function post_hist_right ( void  )

Definition at line 485 of file post.c.


Referenced by post_hist_page().

◆ post_loop()

static int post_loop ( int  type,
struct t_group group,
t_function  func,
const char *  posting_msg,
int  art_type,
int  offset 

Definition at line 2172 of file post.c.

References _, add_headers(), t_attribute::add_posted_to_filter, append_file(), append_mail(), t_cmdlineopts::args, article_name, t_group::attribute, backup_article(), backup_article_name(), buf, check_article_to_be_posted(), clear_message(), cmdline, CMDLINE_MAILDIR, config_page(), cPost, curr_group, dead_article, dead_articles, t_config::default_post_newsgroups, t_config::default_post_subject, errno, FALSE, file_mtime(), file_size(), filter_file, forever, free_and_init_header(), func, GLOBAL_ABORT, GLOBAL_OPTION_MENU, GLOBAL_POST, GLOBAL_QUIT, group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, HEADER_LEN, invoke_editor(), joinpath(), t_config::keep_dead_articles, LEN, t_cmdlineopts::maildir, t_attribute::maildir, t_config::maildir, MAXKEYLEN, my_strncpy(), t_group::name, t_header::newsgroups, offset, parse_rfc822_headers(), PATH_LEN, perror_message(), POST_EDIT, POST_NORMAL, post_post_keys, POST_POSTPONE, POST_POSTPONED, post_postponed_and_exit, POST_QUICK, POST_REPOST, POST_RESPONSE, POST_SUPERSEDED, t_config::posted_articles_file, POSTED_NONE, POSTED_OK, POSTED_REDRAW, postpone_article(), PrintFuncKey, prompt_rejected(), prompt_slk_response(), quick_filter_select_posted_art(), t_header::references, rename_file(), repair_article(), ret_code, signal_context, sized_message(), snprintf, STRCPY, strfpath(), t_header::subj, submit_mail_file(), submit_news_file(), tinrc, t_header::to, TRUE, txt_art_posted, txt_art_rejected, txt_cannot_open, txt_cannot_open_for_saving, txt_quit_edit_post, txt_quit_edit_xpost, t_group::type, unlink, t_config::unlink_article, update_active_after_posting(), update_posted_info_file(), userid, wait_message(), and write_filter_file().

Referenced by post_article(), post_postponed_article(), post_response(), quick_post_article(), and repost_article().

◆ post_postponed_article()

static void post_postponed_article ( int  ask,
const char *  subject,
const char *  newsgroups 

◆ post_response()

int post_response ( const char *  groupname,
int  respnum,
t_bool  copy_text,
t_bool  with_headers,
t_bool  raw_data 

Definition at line 3314 of file post.c.

References _, ADD_MSG_ID_HEADER, article_name, arts, t_group::attribute, buf, C_HEADER, openartinfo::cooked, openartinfo::cookl, copy_body(), cPostFup, t_header::distrib, eat_re(), eat_tab(), FALSE, lineinfo::flags, t_header::followup, t_attribute::followup_to, t_header::from, func, get_from_name(), get_initials(), GLOBAL_ABORT, GLOBAL_POST, GLOBAL_QUIT, group_find(), GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, openartinfo::hdr, HEADER_LEN, is_crosspost(), join_references(), mail_to_author(), t_attribute::mailing_list, MAXKEYLEN, t_header::messageid, msg_add_header(), msg_add_x_body(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), msg_write_signature(), my_distribution, my_strdup(), t_group::name, t_attribute::news_quote_format, t_config::news_quote_format, t_header::newsgroups, note_h, lineinfo::offset, offset, t_attribute::organization, PAGE_MAIL, perror_message(), pgart, POST_EDIT, POST_IGNORE_FUPTO, post_ignore_fupto_keys, post_loop(), POST_MAIL, post_mail_fup_keys, POST_RESPONSE, POSTED_NONE, PrintFuncKey, t_attribute::prompt_followupto, prompt_slk_response(), t_attribute::quote_chars, t_config::quote_chars, random_organization(), openartinfo::raw, t_header::references, reply_to, resize_article(), ret_code, S_IRUSR, S_IWUSR, SEEK_SET, show_followup_info(), signal_context, snprintf, start_line_offset, STRCMPEQ, strfquote(), strip_double_ngs(), t_header::subj, tinrc, toggle_raw(), TRUE, txt_cannot_open, txt_post_a_followup, txt_posting, txt_prompt_fup_ignore, txt_resp_to_poster, wait_message(), t_attribute::x_body, t_attribute::x_comment_to, t_attribute::x_headers, and t_config::xpost_quote_format.

Referenced by show_page().

◆ postpone_article()

static void postpone_article ( const char *  the_article)

◆ process_post_hist()

◆ prompt_rejected()

◆ prompt_to_send()

static t_function prompt_to_send ( const char *  subject)

◆ quick_post_article()

◆ repair_article()

◆ repost_article()

int repost_article ( const char *  groupname,
int  respnum,
t_bool  supersede,
t_openartinfo artinfo 

Definition at line 4492 of file post.c.

References _, ADD_CAN_KEY, ADD_MSG_ID_HEADER, article_name, t_group::attribute, buf, C_HEADER, check_moderated(), openartinfo::cooked, openartinfo::cookl, copy_fp(), default_organization, t_header::distrib, error_message(), FALSE, find_reply_to_addr(), lineinfo::flags, t_header::followup, t_header::from, FromSameUser, func, get_from_name(), get_user_info(), GLOBAL_OPTION_MENU, GLOBAL_POST, GLOBAL_QUIT, GROUP_TYPE_MAIL, GROUP_TYPE_NEWS, openartinfo::hdr, HEADER_LEN, join_references(), t_header::keywords, LEN, t_attribute::mailing_list, MAXKEYLEN, t_header::messageid, msg_add_header(), msg_add_x_headers(), msg_free_headers(), msg_init_headers(), msg_write_headers(), msg_write_signature(), my_distribution, t_header::newsgroups, note_h, NotSuperseding, lineinfo::offset, t_header::org, t_attribute::organization, perror_message(), POST_EDIT, post_loop(), post_post_keys, POST_POSTPONE, POST_REPOST, POST_SUPERSEDED, POSTED_NONE, PrintFuncKey, prompt_slk_response(), random_organization(), t_header::references, reply_to, resize_article(), ret_code, S_IRUSR, S_IWUSR, SEEK_SET, t_attribute::signature_repost, sized_message(), snprintf, start_line_offset, strip_double_ngs(), strwidth(), t_header::subj, t_header::summary, supersede, Superseding, TRUE, txt_art_not_posted, txt_article_reposted, txt_cannot_open, txt_quit_edit_xpost, txt_repost_an_article, txt_superseding_art, and t_attribute::x_headers.

Referenced by cancel_article(), and feed_article().

◆ reread_active_after_posting()

◆ setup_check_article_screen()

static void setup_check_article_screen ( int *  init)

◆ show_cancel_info()

static void show_cancel_info ( void  )

◆ show_followup_info()

static void show_followup_info ( void  )

◆ show_post_hist_page()

◆ skip_id()

static size_t skip_id ( const char *  id)

Definition at line 3068 of file post.c.

Referenced by join_references().

◆ split_address_list()

static char ** split_address_list ( const char *  addresses,
unsigned int *  cnt 

Definition at line 5281 of file post.c.

References end, my_malloc, and my_realloc.

Referenced by address_in_list(), and get_recipients().

◆ strip_double_ngs()

static void strip_double_ngs ( char *  ngs_list)

◆ stripped_double_ngs()

static t_bool stripped_double_ngs ( char **  newsgroups,
int *  ngcnt 

Definition at line 5903 of file post.c.

References FALSE, strcasecmp(), and TRUE.

Referenced by check_article_to_be_posted(), and strip_double_ngs().

◆ submit_mail_file()

◆ update_active_after_posting()

static void update_active_after_posting ( char *  newsgroups)

◆ update_posted_info_file()

static void update_posted_info_file ( const char *  group,
int  action,
const char *  subj,
const char *  a_message_id 

Variable Documentation

◆ bug_addr

char bug_addr[1024]

◆ msg_headers

struct msg_header msg_headers[ 20 /* shouldn't this be dynamic? */ ]

◆ my_distribution

char my_distribution[1024]

◆ phmenu

Definition at line 204 of file post.c.

Referenced by draw_post_hist_arrow(), post_hist_page(), and show_post_hist_page().

◆ post_hist_list

t_posted* post_hist_list

Definition at line 133 of file post.c.

Referenced by build_post_hist_list(), find_post_hist(), free_post_hist_list(), and post_hist_page().

◆ reply_to

char reply_to[1024]

◆ start_line_offset