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)  

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

Go to the source code of this file.


#define CHUNK   50
#define MATCH_REGEX(x, y, z)   (pcre_exec(x.re, x.extra, y, z, 0, 0, NULL, 0) >= 0)
#define PUT_UUE(part, qualifier_text)
#define PUT_ATTACH(part, depth, name, charset)


static t_bool charset_unsupported (const char *charset)
static t_bool header_wanted (const char *line)
static t_partnew_uue (t_part **part, char *name)
static void process_text_body_part (t_bool wrap_lines, FILE *in, t_part *part, int hide_uue)
static void put_cooked (size_t buf_len, t_bool wrap_lines, int flags, const char *fmt,...)
t_bool expand_ctrl_chars (char **line, size_t *length, size_t lcook_width)
const char * get_filename (t_param *ptr)
t_bool cook_article (t_bool wrap_lines, t_openartinfo *artinfo, int hide_uue, t_bool show_all_headers)


static t_openartinfoart

Macro Definition Documentation


#define CHUNK   50

Definition at line 51 of file cook.c.


#define MATCH_REGEX (   x,
)    (pcre_exec(x.re, x.extra, y, z, 0, 0, NULL, 0) >= 0)

Definition at line 58 of file cook.c.


#define PUT_ATTACH (   part,
put_cooked(LEN, wrap_lines, C_ATTACH, _(txt_attach), \
depth, "", \
charset ? _(txt_attach_charset) : "", BlankIfNull(charset), \
name ? _(txt_name) : "", BlankIfNull(name)); \
if (part->description) \
put_cooked(LEN, wrap_lines, C_ATTACH, \
depth, "", \
if (part->next != NULL || IS_PLAINTEXT(part)) \
put_cooked(1, wrap_lines, C_ATTACH, "\n")
static void put_cooked(size_t buf_len, t_bool wrap_lines, int flags, const char *fmt,...)
Definition: cook.c:206
constext txt_attach_description[]
Definition: lang.c:82
constext * content_encodings[]
Definition: lang.c:1461
constext txt_attach_charset[]
Definition: lang.c:80
constext txt_name[]
Definition: lang.c:668
constext * content_types[]
Definition: lang.c:1466
constext txt_attach[]
Definition: lang.c:79
#define C_ATTACH
Definition: rfc2046.h:155
const char * name
Definition: signal.c:117
Definition: rfc2046.h:93
unsigned type
Definition: rfc2046.h:94
char * subtype
Definition: rfc2046.h:100
int line_count
Definition: rfc2046.h:104
char * description
Definition: rfc2046.h:101
unsigned encoding
Definition: rfc2046.h:95
struct part * next
Definition: rfc2046.h:107
#define LEN
Definition: tin.h:860
#define _(Text)
Definition: tin.h:94
#define IS_PLAINTEXT(x)
Definition: tin.h:1036
#define BlankIfNull(p)
Definition: tin.h:2255

Definition at line 377 of file cook.c.


#define PUT_UUE (   part,
put_cooked(LEN, wrap_lines, C_UUE, _(txt_uue), \
part->depth ? (part->depth - 1) * 4 : 0, "", \
qualifier_text, part->line_count, get_filename(part->params))
const char * get_filename(t_param *ptr)
Definition: cook.c:353
constext txt_uue[]
Definition: lang.c:915
#define C_UUE
Definition: rfc2046.h:156
int depth
Definition: rfc2046.h:105
t_param * params
Definition: rfc2046.h:102

Definition at line 371 of file cook.c.


#define STRIP_ALTERNATIVE (   x)
(x)->hdr.ext->type == TYPE_MULTIPART && \
strcasecmp("alternative", (x)->hdr.ext->subtype) == 0)
struct t_group * curr_group
Definition: group.c:55
int strcasecmp(const char *p, const char *q)
Definition: string.c:475
Definition: rfc2046.h:48
unsigned alternative_handling
Definition: tin.h:1653
struct t_attribute * attribute
Definition: tin.h:1834

Definition at line 53 of file cook.c.

Function Documentation

◆ charset_unsupported()

static t_bool charset_unsupported ( const char *  charset)

Definition at line 776 of file cook.c.

References FALSE, strncasecmp(), and TRUE.

Referenced by cook_article().

◆ cook_article()

◆ expand_ctrl_chars()

t_bool expand_ctrl_chars ( char **  line,
size_t *  length,
size_t  lcook_width 

Definition at line 87 of file cook.c.

References assert, buf, FALSE, IS_LOCAL_CHARSET, LEN, my_isprint(), my_malloc, my_realloc, and TRUE.

Referenced by cook_article(), make_help_page(), and process_text_body_part().

◆ get_filename()

const char * get_filename ( t_param ptr)

◆ header_wanted()

static t_bool header_wanted ( const char *  line)

◆ new_uue()

static t_part * new_uue ( t_part **  part,
char *  name 

◆ process_text_body_part()

◆ put_cooked()

static void put_cooked ( size_t  buf_len,
t_bool  wrap_lines,
int  flags,
const char *  fmt,

Variable Documentation

◆ art