"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "include/tin.h" between
tin-2.4.5.tar.xz and tin-2.6.0.tar.xz

About: TIN is a threaded NNTP and spool based UseNet newsreader.

tin.h  (tin-2.4.5.tar.xz):tin.h  (tin-2.6.0.tar.xz)
/* /*
* Project : tin - a Usenet reader * Project : tin - a Usenet reader
* Module : tin.h * Module : tin.h
* Author : I. Lea & R. Skrenta * Author : I. Lea & R. Skrenta
* Created : 1991-04-01 * Created : 1991-04-01
* Updated : 2020-06-13 * Updated : 2021-07-09
* Notes : #include files, #defines & struct's * Notes : #include files, #defines & struct's
* *
* Copyright (c) 1997-2021 Iain Lea <iain@bricbrac.de>, Rich Skrenta <skrenta@pb m.com> * Copyright (c) 1997-2021 Iain Lea <iain@bricbrac.de>, Rich Skrenta <skrenta@pb m.com>
* All rights reserved. * All rights reserved.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions * modification, are permitted provided that the following conditions
* are met: * are met:
* *
* 1. Redistributions of source code must retain the above copyright notice, * 1. Redistributions of source code must retain the above copyright notice,
skipping to change at line 104 skipping to change at line 104
#ifndef LOCALEDIR #ifndef LOCALEDIR
# define LOCALEDIR "/usr/share/locale" # define LOCALEDIR "/usr/share/locale"
#endif /* !LOCALEDIR */ #endif /* !LOCALEDIR */
#if defined(__amiga__) || defined(__amiga) #if defined(__amiga__) || defined(__amiga)
# define SMALL_MEMORY_MACHINE # define SMALL_MEMORY_MACHINE
#endif /* __amiga__ || __amiga */ #endif /* __amiga__ || __amiga */
#include <signal.h> #include <signal.h>
enum context { cMain, cArt, cAttachment, cAttrib, cConfig, cFilter, cGroup, cHel p, cInfopager, cPage, cPost, cPostCancel, cPostFup, cReconnect, cScope, cSelect, cThread, cURL }; enum context { cMain, cArt, cAttachment, cAttrib, cConfig, cFilter, cGroup, cInf opager, cPage, cPOSTED, cPost, cPostCancel, cPostFup, cReconnect, cScope, cSelec t, cThread, cURL };
enum icontext { cNone, cGetline, cPromptCONT, cPromptSLK, cPromptYN }; enum icontext { cNone, cGetline, cPromptCONT, cPromptSLK, cPromptYN };
enum resizer { cNo, cYes, cRedraw }; enum resizer { cNo, cYes, cRedraw };
enum rc_state { RC_IGNORE, RC_UPGRADE, RC_DOWNGRADE, RC_ERROR }; enum rc_state { RC_IGNORE, RC_UPGRADE, RC_DOWNGRADE, RC_ERROR };
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_ERRNO_H #ifdef HAVE_ERRNO_H
# include <errno.h> # include <errno.h>
#else #else
# ifdef HAVE_SYS_ERRNO_H # ifdef HAVE_SYS_ERRNO_H
# include <sys/errno.h> # include <sys/errno.h>
skipping to change at line 595 skipping to change at line 595
#ifdef HAVE_LONG_FILE_NAMES #ifdef HAVE_LONG_FILE_NAMES
# define PATH_PART "part" # define PATH_PART "part"
# define PATH_PATCH "patch" # define PATH_PATCH "patch"
# define INDEX_LOCK "tin.%s.LCK" # define INDEX_LOCK "tin.%s.LCK"
#else #else
# define PATH_PART "" # define PATH_PART ""
# define PATH_PATCH "p" # define PATH_PATCH "p"
# define INDEX_LOCK "%s.LCK" # define INDEX_LOCK "%s.LCK"
#endif /* HAVE_LONG_FILE_NAMES */ #endif /* HAVE_LONG_FILE_NAMES */
/* inews.c:submit_inews() and save.c:save_and_process_art() */
#define PATHMASTER "not-for-mail"
/* /*
* How often should the active file be reread for new news * How often should the active file be reread for new news
*/ */
#ifndef REREAD_ACTIVE_FILE_SECS #ifndef REREAD_ACTIVE_FILE_SECS
# define REREAD_ACTIVE_FILE_SECS 1200 /* seconds (20 mins) */ # define REREAD_ACTIVE_FILE_SECS 1200 /* seconds (20 mins) */
#endif /* !REREAD_ACTIVE_FILE_SECS */ #endif /* !REREAD_ACTIVE_FILE_SECS */
/* /*
* Initial sizes of internal arrays for small (<4MB) & large memory machines * Initial sizes of internal arrays for small (<4MB) & large memory machines
*/ */
skipping to change at line 870 skipping to change at line 873
#define ctrl(c) ((c) & 0x1F) #define ctrl(c) ((c) & 0x1F)
#ifndef DEFAULT_ISO2ASC #ifndef DEFAULT_ISO2ASC
# define DEFAULT_ISO2ASC "-1 " /* ISO -> ASCII charset conversion */ # define DEFAULT_ISO2ASC "-1 " /* ISO -> ASCII charset conversion */
#endif /* !DEFAULT_ISO2ASC */ #endif /* !DEFAULT_ISO2ASC */
#ifndef DEFAULT_COMMENT #ifndef DEFAULT_COMMENT
# define DEFAULT_COMMENT "> " /* used when by follow-ups & replies */ # define DEFAULT_COMMENT "> " /* used when by follow-ups & replies */
#endif /* !DEFAULT_COMMENT */ #endif /* !DEFAULT_COMMENT */
#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
# define T_CHAR_FMT "lc"
#else
# define T_CHAR_FMT "c"
#endif /* MULTIBYTE_ABLE && !NO_LOCALE */
#ifndef ART_MARK_UNREAD #ifndef ART_MARK_UNREAD
# define ART_MARK_UNREAD '+' /* used to show that an art is unread */ # define ART_MARK_UNREAD '+' /* used to show that an art is unread */
#endif /* !ART_MARK_UNREAD */ #endif /* !ART_MARK_UNREAD */
#ifndef ART_MARK_RETURN #ifndef ART_MARK_RETURN
# define ART_MARK_RETURN '-' /* used to show that an art will return * / # define ART_MARK_RETURN '-' /* used to show that an art will return * /
#endif /* !ART_MARK_RETURN */ #endif /* !ART_MARK_RETURN */
#ifndef ART_MARK_SELECTED #ifndef ART_MARK_SELECTED
# define ART_MARK_SELECTED '*' /* used to show that an art was a uto selected */ # define ART_MARK_SELECTED '*' /* used to show that an art was a uto selected */
#endif /* !ART_MARK_SELECTED */ #endif /* !ART_MARK_SELECTED */
#ifndef ART_MARK_RECENT #ifndef ART_MARK_RECENT
skipping to change at line 1073 skipping to change at line 1081
# define KEYMAP_RIGHT 4 # define KEYMAP_RIGHT 4
# define KEYMAP_PAGE_UP 5 # define KEYMAP_PAGE_UP 5
# define KEYMAP_PAGE_DOWN 6 # define KEYMAP_PAGE_DOWN 6
# define KEYMAP_HOME 7 # define KEYMAP_HOME 7
# define KEYMAP_END 8 # define KEYMAP_END 8
# define KEYMAP_DEL 9 # define KEYMAP_DEL 9
# define KEYMAP_INS 10 # define KEYMAP_INS 10
# define KEYMAP_MOUSE 11 # define KEYMAP_MOUSE 11
/* /*
* used in curses.c and signal.c * used in main.c, curses.c and signal.c
* it's useless trying to run tin below these sizes * it's useless trying to run tin interactively below these sizes
* (values acquired by testing ;-) ) * (values acquired by testing ;-) )
*/ */
#define MIN_LINES_ON_TERMINAL 8 #define MIN_LINES_ON_TERMINAL 8
#define MIN_COLUMNS_ON_TERMINAL 50 #define MIN_COLUMNS_ON_TERMINAL 40
/* /*
* indicate given cmd-line options * indicate given cmd-line options
*/ */
#define CMDLINE_GETART_LIMIT 1 #define CMDLINE_GETART_LIMIT 1
#define CMDLINE_MAILDIR 2 #define CMDLINE_MAILDIR 2
#define CMDLINE_NNTPSERVER 4 #define CMDLINE_NNTPSERVER 4
#define CMDLINE_SAVEDIR 8 #define CMDLINE_SAVEDIR 8
#define CMDLINE_USE_COLOR 16 #define CMDLINE_USE_COLOR 16
skipping to change at line 1102 skipping to change at line 1110
#define SELECT_LEVEL 1 #define SELECT_LEVEL 1
#define GROUP_LEVEL 2 #define GROUP_LEVEL 2
#define THREAD_LEVEL 3 #define THREAD_LEVEL 3
#define PAGE_LEVEL 4 #define PAGE_LEVEL 4
#define INFO_PAGER 5 #define INFO_PAGER 5
#define SCOPE_LEVEL 6 #define SCOPE_LEVEL 6
#define CONFIG_LEVEL 7 #define CONFIG_LEVEL 7
#define ATTRIB_LEVEL 8 #define ATTRIB_LEVEL 8
#define ATTACHMENT_LEVEL 9 #define ATTACHMENT_LEVEL 9
#define URL_LEVEL 10 #define URL_LEVEL 10
#define POSTED_LEVEL 11
#define MINI_HELP_LINES 5 #define MINI_HELP_LINES 5
#define FEED_MAIL 1 #define FEED_MAIL 1
#define FEED_PIPE 2 #define FEED_PIPE 2
#define FEED_PRINT 3 #define FEED_PRINT 3
#define FEED_SAVE 4 #define FEED_SAVE 4
#define FEED_AUTOSAVE 5 #define FEED_AUTOSAVE 5
#define FEED_REPOST 6 #define FEED_REPOST 6
#define FEED_MARK_READ 7 #define FEED_MARK_READ 7
skipping to change at line 1238 skipping to change at line 1247
/* /*
* used in misc.c/rfc1524.c * used in misc.c/rfc1524.c
*/ */
enum quote_enum { enum quote_enum {
no_quote = 0, no_quote = 0,
dbl_quote, dbl_quote,
sgl_quote sgl_quote
}; };
/* /*
* Values used in show_article_by_msid
*/
enum {
LOOKUP_OK = 0,
LOOKUP_FAILED = -1,
LOOKUP_QUIT = -2,
LOOKUP_UNAVAIL = -3,
LOOKUP_REPLY = -4,
LOOKUP_ART_UNAVAIL = -5,
LOOKUP_NO_LAST = -6
};
/*
* index_point variable values used throughout tin * index_point variable values used throughout tin
*/ */
/* /*
* -1 is kind of overloaded as an error from which_thread() and other functions * -1 is kind of overloaded as an error from which_thread() and other functions
* where we wish to return to the next level up * where we wish to return to the next level up
*/ */
enum { enum {
GRP_RETSELECT = -1, /* Pager 'T' command only -> return to selection screen */ GRP_RETSELECT = -1, /* Pager 'T' command only -> return to selection screen */
GRP_QUIT = -2, /* Set by 'Q' when coming all the way out */ GRP_QUIT = -2, /* Set by 'Q' when coming all the way out */
skipping to change at line 1467 skipping to change at line 1489
*/ */
struct t_cmdlineopts { struct t_cmdlineopts {
int getart_limit; /* getart_limit */ int getart_limit; /* getart_limit */
char maildir[PATH_LEN]; /* maildir */ char maildir[PATH_LEN]; /* maildir */
char nntpserver[PATH_LEN]; /* nntpserver */ char nntpserver[PATH_LEN]; /* nntpserver */
char savedir[PATH_LEN]; /* savedir */ char savedir[PATH_LEN]; /* savedir */
unsigned int args:5; /* given options */ unsigned int args:5; /* given options */
}; };
/* /*
* Archive-Name: header
*/
struct t_archive {
char *name; /* name of archive */
char *partnum; /* part/patch no. in archive */
t_bool ispart:1; /* TRUE if part, FALSE if patch */
};
/*
* struct t_msgid - message id * struct t_msgid - message id
*/ */
struct t_msgid { struct t_msgid {
struct t_msgid *next; /* Next in hash chain */ struct t_msgid *next; /* Next in hash chain */
struct t_msgid *parent; /* Message-id followed up to */ struct t_msgid *parent; /* Message-id followed up to */
struct t_msgid *sibling; /* Next followup to parent */ struct t_msgid *sibling; /* Next followup to parent */
struct t_msgid *child; /* First followup to this article */ struct t_msgid *child; /* First followup to this article */
int article; /* index in arts[] or ART_NORMAL */ int article; /* index in arts[] or ART_NORMAL */
char txt[1]; /* The actual msgid */ char txt[1]; /* The actual msgid */
}; };
skipping to change at line 1513 skipping to change at line 1526
t_artnum artnum; /* Article number in spool directory for group */ t_artnum artnum; /* Article number in spool directory for group */
char *subject; /* Subject: line from mail header */ char *subject; /* Subject: line from mail header */
char *from; /* From: line from mail header (address) */ char *from; /* From: line from mail header (address) */
char *name; /* From: line from mail header (full name ) */ char *name; /* From: line from mail header (full name ) */
char *xref; /* Xref: cross posted article reference l ine */ char *xref; /* Xref: cross posted article reference l ine */
char *path; /* Path: line */ char *path; /* Path: line */
/* NB: The msgid and refs are only retained until the reference tree is b uilt */ /* NB: The msgid and refs are only retained until the reference tree is b uilt */
char *msgid; /* Message-ID: unique message identifier */ char *msgid; /* Message-ID: unique message identifier */
char *refs; /* References: article reference id's */ char *refs; /* References: article reference id's */
struct t_msgid *refptr; /* Pointer to us in the reference tree */ struct t_msgid *refptr; /* Pointer to us in the reference tree */
struct t_archive *archive; /* Archive-Name: header */
time_t date; /* Date: line from header in seconds */ time_t date; /* Date: line from header in seconds */
int line_count; /* Lines: number of lines in article */ int line_count; /* Lines: number of lines in article */
int gnksa_code; /* From: line from mail header (GNKSA err or code) */ int gnksa_code; /* From: line from mail header (GNKSA err or code) */
int tagged; /* 0 = not tagged, >0 = tagged */ int tagged; /* 0 = not tagged, >0 = tagged */
int thread; int thread;
int prev; int prev;
int score; /* score article has reached after filter ing */ int score; /* score article has reached after filter ing */
unsigned int status:2; /* 0 = read, 1 = unread, 2 = will return */ unsigned int status:2; /* 0 = read, 1 = unread, 2 = will return */
unsigned int killed:2; /* 0 = not killed, 1 = killed, 2 = killed unread */ unsigned int killed:2; /* 0 = not killed, 1 = killed, 2 = killed unread */
t_bool zombie:1; /* 1 = was alive (unread) before 'X' command */ t_bool zombie:1; /* 1 = was alive (unread) before 'X' command */
skipping to change at line 1553 skipping to change at line 1565
/* /*
* struct t_newsheader - holds an array of which news headers to [not] display * struct t_newsheader - holds an array of which news headers to [not] display
*/ */
struct t_newsheader { struct t_newsheader {
char **header; /* array of which headers to [not] display */ char **header; /* array of which headers to [not] display */
int num; /* number of headers in array header */ int num; /* number of headers in array header */
}; };
/* /*
* Use these macros to quiet gcc warnings when assigning into a bitfield.
*/
#define CAST_MASK(value,bits) (((1U << (bits)) - 1) & (unsigned) (value))
#define CAST_BOOL(value) CAST_MASK(value, 1)
#define CAST_BITS(value,bits) CAST_MASK(value, BITS_OF(bits))
#define BITS_OF(bits) BITS_OF_ ## bits
#define BoolField(value) unsigned value:1
#define IntField(value) unsigned value:BITS_OF(value)
#define BITS_OF_auto_cc_bcc 2
#define BITS_OF_mail_mime_encoding 2
#define BITS_OF_mm_network_charset 6
#define BITS_OF_post_mime_encoding 2
#define BITS_OF_post_process_type 2
#define BITS_OF_quick_kill_header 3
#define BITS_OF_quick_select_header 3
#define BITS_OF_show_author 2
#define BITS_OF_sort_article_type 4
#define BITS_OF_sort_threads_type 3
#define BITS_OF_thread_articles 3
#define BITS_OF_thread_perc 7
#define BITS_OF_trim_article_body 3
/*
* struct t_attribute - configurable attributes on a per group basis * struct t_attribute - configurable attributes on a per group basis
*/ */
struct t_attribute { struct t_attribute {
char *maildir; /* mail dir if other than ~/Mail */ char *maildir; /* mail dir if other than ~/Mail */
char *savedir; /* save dir if other than ~/News */ char *savedir; /* save dir if other than ~/News */
char *savefile; /* save articles to specified fil e */ char *savefile; /* save articles to specified fil e */
char *sigfile; /* sig file if other than ~/.Sig */ char *sigfile; /* sig file if other than ~/.Sig */
char *group_format; /* format string for group level */ char *group_format; /* format string for group level */
char *thread_format; /* format string for thread level */ char *thread_format; /* format string for thread level */
char *date_format; /* format string for the date dis play */ char *date_format; /* format string for the date dis play */
skipping to change at line 1583 skipping to change at line 1620
char *x_body; /* boilerplate text for message b ody */ char *x_body; /* boilerplate text for message b ody */
char *from; /* from line */ char *from; /* from line */
char *news_quote_format; /* another way to begin a posting format */ char *news_quote_format; /* another way to begin a posting format */
char *quote_chars; /* string to precede quoted text on each line */ char *quote_chars; /* string to precede quoted text on each line */
char *mime_types_to_save; /* MIME content major/minors we want to s ave */ char *mime_types_to_save; /* MIME content major/minors we want to s ave */
#ifdef HAVE_ISPELL #ifdef HAVE_ISPELL
char *ispell; /* path to ispell and options */ char *ispell; /* path to ispell and options */
#endif /* HAVE_ISPELL */ #endif /* HAVE_ISPELL */
#ifdef CHARSET_CONVERSION #ifdef CHARSET_CONVERSION
char *undeclared_charset; /* charset of articles without MI ME charset declaration */ char *undeclared_charset; /* charset of articles without MI ME charset declaration */
int mm_network_charset; /* network charset */ IntField(mm_network_charset); /* network charset */
#endif /* CHARSET_CONVERSION */ #endif /* CHARSET_CONVERSION */
struct t_newsheader *headers_to_display; /* array of which headers to display */ struct t_newsheader *headers_to_display; /* array of which headers to display */
struct t_newsheader *headers_to_not_display; /* array of which headers to not display */ struct t_newsheader *headers_to_not_display; /* array of which headers to not display */
unsigned global:1; /* global/group specific */ BoolField(global); /* global/group specific */
unsigned quick_kill_header:3; /* quick filter kill header */ IntField(quick_kill_header); /* quick filter kill header */
unsigned quick_kill_expire:1; /* quick filter kill limited/unlimited ti BoolField(quick_kill_expire); /* quick filter kill limited/unlimited ti
me */ me */
unsigned quick_kill_case:1; /* quick filter kill case sensiti BoolField(quick_kill_case); /* quick filter kill case sensiti
ve? */ ve? */
unsigned quick_select_header:3; /* quick filter select header */ IntField(quick_select_header); /* quick filter select header */
unsigned quick_select_expire:1; /* quick filter select limited/unlimited BoolField(quick_select_expire); /* quick filter select limited/unlimited
time */ time */
unsigned quick_select_case:1; /* quick filter select case sensitive? */ BoolField(quick_select_case); /* quick filter select case sensitive? */
unsigned add_posted_to_filter:1; /* add posted articles to filter BoolField(add_posted_to_filter); /* add posted articles to filter
*/ */
unsigned advertising:1; /* add User-Agent: -header */ BoolField(advertising); /* add User-Agent: -header */
unsigned alternative_handling:1; /* skip multipart/alternative par BoolField(alternative_handling); /* skip multipart/alternative par
ts */ ts */
unsigned ask_for_metamail:1; /* ask before using MIME viewer */ BoolField(ask_for_metamail); /* ask before using MIME viewer */
unsigned auto_cc_bcc:2; /* add your name to cc/bcc automa IntField(auto_cc_bcc); /* add your name to cc/bcc automa
tically */ tically */
unsigned auto_list_thread:1; /* list thread when entering it using rig BoolField(auto_list_thread); /* list thread when entering it using rig
ht arrow */ ht arrow */
unsigned auto_select:1; /* 0=show all unread, 1='X' just BoolField(auto_select); /* 0=show all unread, 1='X' just
hot arts */ hot arts */
unsigned auto_save:1; /* 0=none, 1=save */ BoolField(batch_save); /* 0=none, 1=save -S/mail -M */
unsigned batch_save:1; /* 0=none, 1=save -S/mail -M */ BoolField(delete_tmp_files); /* 0=leave, 1=delete */
unsigned delete_tmp_files:1; /* 0=leave, 1=delete */ BoolField(group_catchup_on_exit); /* ask if read groups are to be m
unsigned group_catchup_on_exit:1; /* ask if read groups are to be m arked read */
arked read */ BoolField(mail_8bit_header); /* allow 8bit chars. in header of mail me
unsigned mail_8bit_header:1; /* allow 8bit chars. in header of mail me ssage */
ssage */ IntField(mail_mime_encoding);
unsigned mail_mime_encoding:2; BoolField(mark_ignore_tags); /* Ignore tags for GROUP_MARK_THREAD_READ
unsigned mark_ignore_tags:1; /* Ignore tags for GROUP_MARK_THREAD_READ /THREAD_MARK_ARTICLE_READ */
/THREAD_MARK_ARTICLE_READ */ BoolField(mark_saved_read); /* mark saved article/thread as r
unsigned mark_saved_read:1; /* mark saved article/thread as r ead */
ead */ BoolField(pos_first_unread); /* position cursor at first/last unread a
unsigned pos_first_unread:1; /* position cursor at first/last unread a rticle */
rticle */ BoolField(post_8bit_header); /* allow 8bit chars. in header when posti
unsigned post_8bit_header:1; /* allow 8bit chars. in header when posti ng to newsgroup */
ng to newsgroup */ IntField(post_mime_encoding);
unsigned post_mime_encoding:2; BoolField(post_process_view); /* set TRUE to invoke mailcap viewer app
unsigned post_process_view:1; /* set TRUE to invoke mailcap viewer app */
*/
#ifndef DISABLE_PRINTING #ifndef DISABLE_PRINTING
unsigned print_header:1; /* print all of mail header or ju st Subject: & From lines */ BoolField(print_header); /* print all of mail header or ju st Subject: & From lines */
#endif /* !DISABLE_PRINTING */ #endif /* !DISABLE_PRINTING */
unsigned process_only_unread:1; /* save/print//mail/pipe unread/all artic BoolField(process_only_unread); /* save/print//mail/pipe unread/all artic
les */ les */
unsigned prompt_followupto:1; /* display empty Followup-To header in ed BoolField(prompt_followupto); /* display empty Followup-To header in ed
itor */ itor */
unsigned show_only_unread_arts:1; /* 0=all, 1=only unread */ BoolField(show_only_unread_arts); /* 0=all, 1=only unread */
unsigned sigdashes:1; /* set TRUE to prepend every sign BoolField(sigdashes); /* set TRUE to prepend every sign
ature with dashes */ ature with dashes */
unsigned signature_repost:1; /* set TRUE to add signature when reposti BoolField(signature_repost); /* set TRUE to add signature when reposti
ng articles */ ng articles */
unsigned start_editor_offset:1; /* start editor with line offset */ IntField(thread_articles); /* 0=unthread, 1=subject,
unsigned thread_articles:3; /* 0=unthread, 1=subject, 2=refs, 3=both, 4=multipart, 5=percentage */
2=refs, 3=both, 4=multipart, 5=percentage */ BoolField(thread_catchup_on_exit); /* catchup thread with left arrow
unsigned thread_catchup_on_exit:1; /* catchup thread with left arrow key or not */
key or not */ IntField(thread_perc); /* percentage threading threshold
unsigned thread_perc:7; /* percentage threading threshold */
*/ IntField(show_author); /* 0=none, 1=name, 2=addr, 3=both
unsigned show_author:2; /* 0=none, 1=name, 2=addr, 3=both */
*/ BoolField(show_signatures); /* 0=none, 1=show signatures */
unsigned show_signatures:1; /* 0=none, 1=show signatures */ IntField(trim_article_body); /* 0=Don't trim article body, 1=Skip lead
unsigned trim_article_body:3; /* 0=Don't trim article body, 1=Skip lead ing blank lines,
ing blank lines,
2=Skip trailing blank lines, 3=Sk ip leading and trailing blank lines, 2=Skip trailing blank lines, 3=Sk ip leading and trailing blank lines,
4=Compact multiple blank lines be tween textblocks, 4=Compact multiple blank lines be tween textblocks,
5=Compact multiple blank lines be tween textblocks and skip leading blank lines, 5=Compact multiple blank lines be tween textblocks and skip leading blank lines,
6=Compact multiple blank lines be tween textblocks and skip trailing blank lines, 6=Compact multiple blank lines be tween textblocks and skip trailing blank lines,
7=Compact multiple blank lines be tween textblocks and skip leading and trailing 7=Compact multiple blank lines be tween textblocks and skip leading and trailing
blank lines */ blank lines */
unsigned verbatim_handling:1; /* 0=none, 1=detect verbatim blocks */ BoolField(verbatim_handling); /* 0=none, 1=detect verbatim blocks */
#ifdef HAVE_COLOR #ifdef HAVE_COLOR
unsigned extquote_handling:1; /* 0=none, 1=detect quoted text f rom external sources */ BoolField(extquote_handling); /* 0=none, 1=detect quoted text f rom external sources */
#endif /* HAVE_COLOR */ #endif /* HAVE_COLOR */
unsigned wrap_on_next_unread:1; /* Wrap around threads when searching nex BoolField(wrap_on_next_unread); /* Wrap around threads when searching nex
t unread article */ t unread article */
unsigned sort_article_type:4; /* 0=none, 1=subj descend, 2=subj IntField(sort_article_type); /* 0=none, 1=subj descend, 2=subj
ascend, ascend,
3=from descend, 4=from ascend, 3=from descend, 4=from ascend,
5=date descend, 6=date ascend, 5=date descend, 6=date ascend,
7=score descend, 8=score ascen d */ 7=score descend, 8=score ascen d */
unsigned sort_threads_type:3; /* 0=none, 1=score descend, 2=score ascen d, IntField(sort_threads_type); /* 0=none, 1=score descend, 2=score ascen d,
3=last posting date descend, 4 =last posting date ascend */ 3=last posting date descend, 4 =last posting date ascend */
unsigned post_process_type:2; /* 0=none, 1=shar, 2=uudecode */ IntField(post_process_type); /* 0=none, 1=shar, 2=uudecode */
unsigned x_comment_to:1; /* insert X-Comment-To: in Followup */ BoolField(x_comment_to); /* insert X-Comment-To: in Followup */
unsigned tex2iso_conv:1; /* Convert TeX2ISO */ BoolField(tex2iso_conv); /* Convert TeX2ISO */
unsigned mime_forward:1; /* forward articles as attachment or inli BoolField(mime_forward); /* forward articles as attachment or inli
ne */ ne */
}; };
/* /*
* struct t_attribute_state - holds additional information * struct t_attribute_state - holds additional information
* about numeric attributes within a scope * about numeric attributes within a scope
*/ */
struct t_attribute_state { struct t_attribute_state {
unsigned add_posted_to_filter:1; BoolField(add_posted_to_filter);
unsigned advertising:1; BoolField(advertising);
unsigned alternative_handling:1; BoolField(alternative_handling);
unsigned ask_for_metamail:1; BoolField(ask_for_metamail);
unsigned auto_cc_bcc:1; BoolField(auto_cc_bcc);
unsigned auto_list_thread:1; BoolField(auto_list_thread);
unsigned auto_save:1; BoolField(auto_select);
unsigned auto_select:1; BoolField(batch_save);
unsigned batch_save:1; BoolField(date_format);
unsigned date_format:1; BoolField(delete_tmp_files);
unsigned delete_tmp_files:1; BoolField(editor_format);
unsigned editor_format:1; BoolField(fcc);
unsigned fcc:1; BoolField(followup_to);
unsigned followup_to:1; BoolField(from);
unsigned from:1; BoolField(group_catchup_on_exit);
unsigned group_catchup_on_exit:1; BoolField(group_format);
unsigned group_format:1;
#ifdef HAVE_ISPELL #ifdef HAVE_ISPELL
unsigned ispell:1; BoolField(ispell);
#endif /* HAVE_ISPELL */ #endif /* HAVE_ISPELL */
unsigned mail_8bit_header:1; BoolField(mail_8bit_header);
unsigned mail_mime_encoding:1; BoolField(mail_mime_encoding);
unsigned maildir:1; BoolField(maildir);
unsigned mailing_list:1; BoolField(mailing_list);
unsigned mark_ignore_tags:1; BoolField(mark_ignore_tags);
unsigned mark_saved_read:1; BoolField(mark_saved_read);
unsigned mime_forward:1; BoolField(mime_forward);
unsigned mime_types_to_save:1; BoolField(mime_types_to_save);
unsigned news_headers_to_display:1; BoolField(news_headers_to_display);
unsigned news_headers_to_not_display:1; BoolField(news_headers_to_not_display);
unsigned news_quote_format:1; BoolField(news_quote_format);
unsigned organization:1; BoolField(organization);
unsigned pos_first_unread:1; BoolField(pos_first_unread);
unsigned post_8bit_header:1; BoolField(post_8bit_header);
unsigned post_mime_encoding:1; BoolField(post_mime_encoding);
unsigned post_process_view:1; BoolField(post_process_view);
unsigned post_process_type:1; BoolField(post_process_type);
#ifndef DISABLE_PRINTING #ifndef DISABLE_PRINTING
unsigned print_header:1; BoolField(print_header);
#endif /* !DISABLE_PRINTING */ #endif /* !DISABLE_PRINTING */
unsigned process_only_unread:1; BoolField(process_only_unread);
unsigned prompt_followupto:1; BoolField(prompt_followupto);
unsigned quick_kill_case:1; BoolField(quick_kill_case);
unsigned quick_kill_expire:1; BoolField(quick_kill_expire);
unsigned quick_kill_header:1; BoolField(quick_kill_header);
unsigned quick_kill_scope:1; BoolField(quick_kill_scope);
unsigned quick_select_case:1; BoolField(quick_select_case);
unsigned quick_select_expire:1; BoolField(quick_select_expire);
unsigned quick_select_header:1; BoolField(quick_select_header);
unsigned quick_select_scope:1; BoolField(quick_select_scope);
unsigned quote_chars:1; BoolField(quote_chars);
unsigned savedir:1; BoolField(savedir);
unsigned savefile:1; BoolField(savefile);
unsigned show_author:1; BoolField(show_author);
unsigned show_only_unread_arts:1; BoolField(show_only_unread_arts);
unsigned show_signatures:1; BoolField(show_signatures);
unsigned sigdashes:1; BoolField(sigdashes);
unsigned sigfile:1; BoolField(sigfile);
unsigned signature_repost:1; BoolField(signature_repost);
unsigned sort_article_type:1; BoolField(sort_article_type);
unsigned sort_threads_type:1; BoolField(sort_threads_type);
unsigned start_editor_offset:1; BoolField(tex2iso_conv);
unsigned tex2iso_conv:1; BoolField(thread_articles);
unsigned thread_articles:1; BoolField(thread_catchup_on_exit);
unsigned thread_catchup_on_exit:1; BoolField(thread_format);
unsigned thread_format:1; BoolField(thread_perc);
unsigned thread_perc:1; BoolField(trim_article_body);
unsigned trim_article_body:1;
#ifdef CHARSET_CONVERSION #ifdef CHARSET_CONVERSION
unsigned undeclared_charset:1; BoolField(undeclared_charset);
unsigned mm_network_charset:1; BoolField(mm_network_charset);
#endif /* CHARSET_CONVERSION */ #endif /* CHARSET_CONVERSION */
unsigned verbatim_handling:1; BoolField(verbatim_handling);
#ifdef HAVE_COLOR #ifdef HAVE_COLOR
unsigned extquote_handling:1; BoolField(extquote_handling);
#endif /* HAVE_COLOR */ #endif /* HAVE_COLOR */
unsigned wrap_on_next_unread:1; BoolField(wrap_on_next_unread);
unsigned x_body:1; BoolField(x_body);
unsigned x_comment_to:1; BoolField(x_comment_to);
unsigned x_headers:1; BoolField(x_headers);
}; };
/* /*
* struct t_scope * struct t_scope
*/ */
struct t_scope { struct t_scope {
char *scope; /* scope for these group attribut es */ char *scope; /* scope for these group attribut es */
struct t_attribute *attribute; /* the attributes itself */ struct t_attribute *attribute; /* the attributes itself */
struct t_attribute_state *state; /* additional information about n umeric attributes */ struct t_attribute_state *state; /* additional information about n umeric attributes */
unsigned global:1; /* TRUE for scopes from global_at tributes_file */ BoolField(global); /* TRUE for scopes from global_at tributes_file */
}; };
/* /*
* struct t_newsrc - newsrc related info. * struct t_newsrc - newsrc related info.
*/ */
struct t_newsrc { struct t_newsrc {
t_bool present:1; /* update newsrc? */ t_bool present:1; /* update newsrc? */
t_artnum num_unread; /* unread articles in group */ t_artnum num_unread; /* unread articles in group */
t_artnum xmax; /* newsrc max */ t_artnum xmax; /* newsrc max */
t_artnum xmin; /* newsrc min */ t_artnum xmin; /* newsrc min */
skipping to change at line 1869 skipping to change at line 1902
/* /*
* struct t_filter - local & global filtering (ie. kill & auto-selection) * struct t_filter - local & global filtering (ie. kill & auto-selection)
*/ */
struct t_filter { struct t_filter {
struct t_filter_comment *comment; struct t_filter_comment *comment;
char *scope; /* NULL='*' (all groups) or 'comp.os.*' * / char *scope; /* NULL='*' (all groups) or 'comp.os.*' * /
char *subj; /* Subject: line */ char *subj; /* Subject: line */
char *from; /* From: line */ char *from; /* From: line */
char *msgid; /* Message-ID: line */ char *msgid; /* Message-ID: line */
char lines_cmp; /* Lines compare <> */
int lines_num; /* Lines: line */
char gnksa_cmp; /* GNKSA compare <> */
int gnksa_num; /* GNKSA code */
int score; /* score to give if rule matches */
char *xref; /* groups in xref line */ char *xref; /* groups in xref line */
char *path; /* server in path line */ char *path; /* server in path line */
time_t time; /* expire time in seconds */
struct t_filter *next; /* next rule valid in group */ struct t_filter *next; /* next rule valid in group */
time_t time; /* expire time in seconds */
int lines_num; /* Lines: line */
int gnksa_num; /* GNKSA code */
int score; /* score to give if rule matches */
char lines_cmp; /* Lines compare <> */
char gnksa_cmp; /* GNKSA compare <> */
unsigned int inscope:4; /* if group matches scope e.g. 'comp.os.* ' */ unsigned int inscope:4; /* if group matches scope e.g. 'comp.os.* ' */
unsigned int icase:2; /* Case sensitive filtering */ unsigned int icase:2; /* Case sensitive filtering */
unsigned int fullref:4; /* use full references or last entry only */ unsigned int fullref:4; /* use full references or last entry only */
}; };
/* /*
* struct t_filter_rule - provides parameters to build filter rule from * struct t_filter_rule - provides parameters to build filter rule from
*/ */
struct t_filter_rule { struct t_filter_rule {
struct t_filter_comment *comment; struct t_filter_comment *comment;
skipping to change at line 1925 skipping to change at line 1958
char *file; /* ptr to file part of *p ath */ char *file; /* ptr to file part of *p ath */
t_bool mailbox:1; /* Set if path is a mailbox */ t_bool mailbox:1; /* Set if path is a mailbox */
}; };
#ifndef USE_CURSES #ifndef USE_CURSES
struct t_screen { struct t_screen {
char *col; char *col;
}; };
#endif /* !USE_CURSES */ #endif /* !USE_CURSES */
struct t_posted { typedef struct posted {
char date[10]; char date[10];
char group[80]; char group[80];
char action; char action;
char subj[120]; char subj[120];
}; char mid[256];
struct posted *next;
} t_posted;
struct t_art_stat { struct t_art_stat {
#if defined(MULTIBYTE_ABLE) && !defined(NO_LOCALE)
wchar_t art_mark; /* mark to use for this thread - not used
for groups */
#else
char art_mark; /* mark to use for this thread - not used for gro ups */ char art_mark; /* mark to use for this thread - not used for gro ups */
#endif /* MULTIBYTE_ABLE && !NO_LOCALE */
int total; /* total article count */ int total; /* total article count */
int unread; /* number of unread articles (does not include se en) arts */ int unread; /* number of unread articles (does not include se en) arts */
int seen; /* number of seen articles (ART_WILL_RETURN) */ int seen; /* number of seen articles (ART_WILL_RETURN) */
int deleted; /* number of articles marked for deletion (mailgr oups) */ int deleted; /* number of articles marked for deletion (mailgr oups) */
int inrange; /* number of articles marked in a range */ int inrange; /* number of articles marked in a range */
int selected_total; /* total selected count */ int selected_total; /* total selected count */
int selected_unread; /* selected and unread */ int selected_unread; /* selected and unread */
int selected_seen; /* selected and seen */ int selected_seen; /* selected and seen */
int killed; /* killed */ int killed; /* killed */
int score; /* maximum score */ int score; /* maximum score */
skipping to change at line 2100 skipping to change at line 2139
* mouse buttons for use in xterm * mouse buttons for use in xterm
*/ */
#define MOUSE_BUTTON_1 0 #define MOUSE_BUTTON_1 0
#define MOUSE_BUTTON_2 1 #define MOUSE_BUTTON_2 1
#define MOUSE_BUTTON_3 2 #define MOUSE_BUTTON_3 2
#define REDIRECT_OUTPUT "> /dev/null 2>&1" #define REDIRECT_OUTPUT "> /dev/null 2>&1"
#define REDIRECT_PGP_OUTPUT "> /dev/null" #define REDIRECT_PGP_OUTPUT "> /dev/null"
#define ENV_VAR_MAILER "MAILER" #define ENV_VAR_MAILER "MAILER"
#define ENV_VAR_SHELL "SHELL" #define ENV_VAR_SHELL "SHELL"
#define TIN_EDITOR_FMT_OFF "%E %F" #define TIN_EDITOR_FMT "%E +%N %F"
#define TIN_EDITOR_FMT_ON "%E +%N %F"
#define MAILER_FORMAT "%M -oi -t < %F" #define MAILER_FORMAT "%M -oi -t < %F"
#define TMPDIR get_val("TMPDIR", _PATH_TMP) #define TMPDIR get_val("TMPDIR", _PATH_TMP)
#ifdef HAVE_KEY_PREFIX #ifdef HAVE_KEY_PREFIX
# define KEY_PREFIX 0x8f: case 0x9b # define KEY_PREFIX 0x8f: case 0x9b
#endif /* HAVE_KEY_PREFIX */ #endif /* HAVE_KEY_PREFIX */
#if !defined(S_ISDIR) #if !defined(S_ISDIR)
# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) # define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
#endif /* !S_ISDIR */ #endif /* !S_ISDIR */
skipping to change at line 2174 skipping to change at line 2212
#endif /* !W_OK */ #endif /* !W_OK */
#ifndef X_OK #ifndef X_OK
# define X_OK 1 /* Test for eXecute permission */ # define X_OK 1 /* Test for eXecute permission */
#endif /* !X_OK */ #endif /* !X_OK */
#ifndef F_OK #ifndef F_OK
# define F_OK 0 /* Test for existence of File */ # define F_OK 0 /* Test for existence of File */
#endif /* !F_OK */ #endif /* !F_OK */
/* Various function redefinitions */ /* Various function redefinitions */
#if defined(USE_DBMALLOC) || defined(USE_DMALLOC) #if defined(USE_DBMALLOC) || defined(USE_DMALLOC)
# define my_malloc(size) malloc(size) # define my_malloc(size) malloc((size_t) (size))
# define my_calloc(nmemb, size) calloc((nmemb), (size)) # define my_calloc(nmemb, size) calloc((nmemb), (size_t) (size))
# define my_realloc(ptr, size) realloc((ptr), (size)) # define my_realloc(ptr, size) realloc((ptr), (size_t) (size))
#else #else
# define my_malloc(size) my_malloc1(__FILE__, __LINE__, (size)) # define my_malloc(size) my_malloc1(__FILE__, __LINE__, (size_t) (size))
# define my_calloc(nmemb, size) my_calloc1(__FILE__, __LINE__, (nmemb), ( # define my_calloc(nmemb, size) my_calloc1(__FILE__, __LINE__, (nmemb), (
size)) size_t) (size))
# define my_realloc(ptr, size) my_realloc1(__FILE__, __LINE__, (ptr), (s # define my_realloc(ptr, size) my_realloc1(__FILE__, __LINE__, (ptr), (s
ize)) ize_t) (size))
#endif /* USE_DBMALLOC || USE_DMALLOC */ #endif /* USE_DBMALLOC || USE_DMALLOC */
#define ARRAY_SIZE(array) ((int) (sizeof(array) / sizeof(array[0]))) #define ARRAY_SIZE(array) ((int) (sizeof(array) / sizeof(array[0])))
#define FreeIfNeeded(p) if (p != NULL) free((void *) p) #define FreeIfNeeded(p) if (p != NULL) free((void *) p)
#define FreeAndNull(p) if (p != NULL) { free((void *) p); p = NULL; } #define FreeAndNull(p) if (p != NULL) { free((void *) p); p = NULL; }
#define BlankIfNull(p) ((p) ? (p) : "") #define BlankIfNull(p) ((p) ? (p) : "")
#define my_group_find(x) add_my_group(x, FALSE, FALSE) #define my_group_find(x) add_my_group(x, FALSE, FALSE)
#define my_group_add(x, y) add_my_group(x, TRUE, y) #define my_group_add(x, y) add_my_group(x, TRUE, y)
#define for_each_group(x) for (x = 0; x < num_active; x++) #define for_each_group(x) for (x = 0; x < num_active; x++)
#define for_each_art(x) for (x = 0; x < top_art; x++) #define for_each_art(x) for (x = 0; x < top_art; x++)
#define for_each_art_in_thread(x, y) for (x = (int) base[y]; x >= 0; x = arts[ x].thread) #define for_each_art_in_thread(x, y) for (x = (int) base[y]; x >= 0; x = arts[ x].thread)
/* /*
* Cast for the (few!) places where we need to examine 8-bit characters w/o * Cast for the (few!) places where we need to examine 8-bit characters w/o
* sign-extension, and a corresponding test-macro. * sign-extension, and a corresponding test-macro.
*/ */
#define EIGHT_BIT(ptr) (unsigned char *)ptr #define EIGHT_BIT(ptr) (unsigned char *)ptr
#define is_EIGHT_BIT(p) ((*EIGHT_BIT(p) < 32 && !isspace((int)*p)) || *EI GHT_BIT(p) > 127) #define is_EIGHT_BIT(p) ((*EIGHT_BIT(p) < 32 && !isspace((int)*p)) || *EI GHT_BIT(p) > 127)
skipping to change at line 2355 skipping to change at line 2393
/* libmss */ /* libmss */
#ifdef MSS #ifdef MSS
# ifdef strdup # ifdef strdup
# undef strdup # undef strdup
# endif /* strdup */ # endif /* strdup */
# include <mss.h> # include <mss.h>
# undef my_malloc # undef my_malloc
# undef my_realloc # undef my_realloc
# undef my_calloc # undef my_calloc
# define my_malloc(size) malloc(size) # define my_malloc(size) malloc((size_t)(size))
# define my_realloc(ptr, size) realloc((ptr), (size)) # define my_realloc(ptr, size) realloc((ptr), (size_t) (size))
# define my_calloc(nmemb, size) calloc((nmemb), (size)) # define my_calloc(nmemb, size) calloc((nmemb), (size_t) (size))
#endif /* MSS */ #endif /* MSS */
/* libcanlock */ /* libcanlock */
#ifdef USE_CANLOCK #ifdef USE_CANLOCK
# ifdef HAVE_LIBCANLOCK_3_CANLOCK_H # ifdef HAVE_LIBCANLOCK_3_CANLOCK_H
# include <libcanlock-3/canlock.h> # include <libcanlock-3/canlock.h>
# else # else
# include <canlock.h> # include <canlock.h>
# endif /* HAVE_LIBCANLOCK_3_CANLOCK_H */ # endif /* HAVE_LIBCANLOCK_3_CANLOCK_H */
#endif /* USE_CANLOCK */ #endif /* USE_CANLOCK */
skipping to change at line 2415 skipping to change at line 2453
#ifndef HAVE_VSNPRINTF #ifndef HAVE_VSNPRINTF
# define vsnprintf plp_vsnprintf # define vsnprintf plp_vsnprintf
#endif /* HAVE_VSNPRINTF */ #endif /* HAVE_VSNPRINTF */
/* gcc-specific attributes */ /* gcc-specific attributes */
#if defined(__GNUC__) && !defined(__cplusplus) && !defined(__APPLE_CC__) && !def ined(__NeXT__) #if defined(__GNUC__) && !defined(__cplusplus) && !defined(__APPLE_CC__) && !def ined(__NeXT__)
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) # if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6)
# define UNUSED(x) x __attribute__((unused)) # define UNUSED(x) x __attribute__((unused))
# else # else
# define UNUSED(x) x # define UNUSED(x) x
# endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) */ # endif /* __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) */
#else #else
# define UNUSED(x) x # define UNUSED(x) x
#endif /* __GNUC__ && !__cplusplus && !__APPLE_CC__ && !__NeXT__ */ #endif /* __GNUC__ && !__cplusplus && !__APPLE_CC__ && !__NeXT__ */
/* init_selfinfo() needs MM_CHARSET */ /* init_selfinfo() needs MM_CHARSET */
#ifndef MM_CHARSET #ifndef MM_CHARSET
# define MM_CHARSET "US-ASCII" # define MM_CHARSET "US-ASCII"
#endif /* !MM_CHARSET */ #endif /* !MM_CHARSET */
#if !defined(SEEK_SET) #if !defined(SEEK_SET)
 End of changes. 42 change blocks. 
188 lines changed or deleted 227 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)