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)  

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

Go to the source code of this file.

Macros

#define HI4BITS(c)   ((unsigned char) (*EIGHT_BIT(c) >> 4))
 
#define LO4BITS(c)   ((unsigned char) (*c & 0xf))
 

Functions

static int put_rest (char **rest, char **line, size_t *max_line_len, const int offset)
 
static unsigned char bin2hex (unsigned int x)
 
static void set_rest (char **rest, const char *ptr)
 
void rfc1521_encode (char *line, FILE *f, int e)
 
int read_decoded_base64_line (FILE *file, char **line, size_t *max_line_len, const int max_lines_to_read, char **rest)
 
int read_decoded_qp_line (FILE *file, char **line, size_t *max_line_len, const int max_lines_to_read)
 

Macro Definition Documentation

◆ HI4BITS

#define HI4BITS (   c)    ((unsigned char) (*EIGHT_BIT(c) >> 4))

Definition at line 63 of file rfc2045.c.

◆ LO4BITS

#define LO4BITS (   c)    ((unsigned char) (*c & 0xf))

Definition at line 64 of file rfc2045.c.

Function Documentation

◆ bin2hex()

static unsigned char bin2hex ( unsigned int  x)
static

Definition at line 54 of file rfc2045.c.

Referenced by rfc1521_encode().

◆ put_rest()

static int put_rest ( char **  rest,
char **  line,
size_t *  max_line_len,
const int  offset 
)
static

Definition at line 254 of file rfc2045.c.

References FreeAndNull, LEN, my_realloc, offset, and set_rest().

Referenced by read_decoded_base64_line().

◆ read_decoded_base64_line()

int read_decoded_base64_line ( FILE *  file,
char **  line,
size_t *  max_line_len,
const int  max_lines_to_read,
char **  rest 
)

Definition at line 323 of file rfc2045.c.

References buf, FALSE, FreeIfNeeded, LEN, mmdecode(), my_malloc, my_realloc, put_rest(), and tin_fgets().

Referenced by process_text_body_part().

◆ read_decoded_qp_line()

int read_decoded_qp_line ( FILE *  file,
char **  line,
size_t *  max_line_len,
const int  max_lines_to_read 
)

Definition at line 436 of file rfc2045.c.

References buf, FALSE, LEN, mmdecode(), my_malloc, my_realloc, and tin_fgets().

Referenced by process_text_body_part().

◆ rfc1521_encode()

void rfc1521_encode ( char *  line,
FILE *  f,
int  e 
)

Definition at line 75 of file rfc2045.c.

References base64_alphabet, bin2hex(), EIGHT_BIT, HI4BITS, is_EIGHT_BIT, LO4BITS, and STRCPY.

Referenced by do_rfc15211522_encode().

◆ set_rest()

static void set_rest ( char **  rest,
const char *  ptr 
)
static

Definition at line 227 of file rfc2045.c.

References FreeAndNull, FreeIfNeeded, and my_strdup().

Referenced by put_rest().