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)  

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

Go to the source code of this file.

Functions

static t_bool _lookup_mimetype (const char *file, const char *ext, t_part *part)
 
static t_bool _lookup_extension (char *extension, size_t ext_len, const char *file, const char *type)
 
void lookup_mimetype (const char *ext, t_part *part)
 
t_bool lookup_extension (char *extension, size_t ext_len, const char *major, const char *minor)
 

Function Documentation

◆ _lookup_extension()

static t_bool _lookup_extension ( char *  extension,
size_t  ext_len,
const char *  file,
const char *  type 
)
static

Definition at line 130 of file mimetypes.c.

References buf, FALSE, my_strncpy(), and TRUE.

Referenced by lookup_extension().

◆ _lookup_mimetype()

static t_bool _lookup_mimetype ( const char *  file,
const char *  ext,
t_part part 
)
static

Definition at line 58 of file mimetypes.c.

References buf, content_type(), FALSE, FreeIfNeeded, my_strdup(), PATH_LEN, strcasecmp(), part::subtype, TRUE, and part::type.

Referenced by lookup_mimetype().

◆ lookup_extension()

t_bool lookup_extension ( char *  extension,
size_t  ext_len,
const char *  major,
const char *  minor 
)

Definition at line 169 of file mimetypes.c.

References _lookup_extension(), buf, FALSE, homedir, joinpath(), my_malloc, my_strncpy(), PATH_LEN, and TRUE.

Referenced by generate_savepath().

◆ lookup_mimetype()

void lookup_mimetype ( const char *  ext,
t_part part 
)

Definition at line 105 of file mimetypes.c.

References _lookup_mimetype(), buf, homedir, joinpath(), and PATH_LEN.

Referenced by new_uue(), and view_file().