"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libs/rfc2045/rfc2045.h" between
sqwebmail-5.9.3.tar.bz2 and sqwebmail-6.0.0.tar.bz2

About: SqWebMail is a CGI Webmail client for Maildir mailboxes (module of the Courier mail server).

rfc2045.h  (sqwebmail-5.9.3.tar.bz2):rfc2045.h  (sqwebmail-6.0.0.tar.bz2)
/* /*
** Copyright 1998 - 2011 Double Precision, Inc. See COPYING for ** Copyright 1998 - 2018 Double Precision, Inc. See COPYING for
** distribution information. ** distribution information.
*/ */
/* /*
*/ */
#ifndef rfc2045_h #ifndef rfc2045_h
#define rfc2045_h #define rfc2045_h
#include "rfc2045/rfc2045_config.h" /* VPATH build */ #include "rfc2045/rfc2045_config.h" /* VPATH build */
#include "numlib/numlib.h" #include "numlib/numlib.h"
skipping to change at line 25 skipping to change at line 25
#include <stdio.h> #include <stdio.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#if 0 #if 0
} }
#endif #endif
#define RFC2045_MIME_MESSAGE_RFC822 "message/rfc822"
#define RFC2045_MIME_MESSAGE_GLOBAL "message/global"
#define RFC2045_MIME_MESSAGE_DELIVERY_STATUS "message/delivery-status"
#define RFC2045_MIME_MESSAGE_GLOBAL_DELIVERY_STATUS \
"message/global-delivery-status"
#define RFC2045_MIME_MESSAGE_HEADERS "text/rfc822-headers"
#define RFC2045_MIME_MESSAGE_GLOBAL_HEADERS "message/global-headers"
int rfc2045_message_content_type(const char *);
int rfc2045_delivery_status_content_type(const char *);
int rfc2045_message_headers_content_type(const char *);
#define RFC2045_ISMIME1(p) ((p) && atoi(p) == 1) #define RFC2045_ISMIME1(p) ((p) && atoi(p) == 1)
#define RFC2045_ISMIME1DEF(p) (!(p) || atoi(p) == 1) #define RFC2045_ISMIME1DEF(p) (!(p) || atoi(p) == 1)
struct rfc2045 { struct rfc2045 {
struct rfc2045 *parent; struct rfc2045 *parent;
unsigned pindex; unsigned pindex;
struct rfc2045 *next; struct rfc2045 *next;
off_t startpos, /* At which offset in msg this section starts */ off_t startpos, /* At which offset in msg this section starts */
endpos, /* Where it ends */ endpos, /* Where it ends */
skipping to change at line 63 skipping to change at line 77
char *content_language; char *content_language;
char *content_md5; char *content_md5;
char *content_base; char *content_base;
char *content_location; char *content_location;
struct rfc2045ac *rfc2045acptr; struct rfc2045ac *rfc2045acptr;
int has8bitchars; /* For rewriting */ int has8bitchars; /* For rewriting */
int haslongline; /* For rewriting */ int haslongline; /* For rewriting */
unsigned rfcviolation; /* Boo-boos */ unsigned rfcviolation; /* Boo-boos */
#define RFC2045_ERR8BITHEADER 1 /* 8 bit characters in headers */ #define RFC2045_ERR8BITHEADER 1 /* 8 bit characters in headers */
/* But this is now OK, in UTF8 mode */
#define RFC2045_ERR8BITCONTENT 2 /* 8 bit contents, but no 8bit #define RFC2045_ERR8BITCONTENT 2 /* 8 bit contents, but no 8bit
content-transfer-encoding */ content-transfer-encoding */
#define RFC2045_ERR2COMPLEX 4 /* Too many nested contents */ #define RFC2045_ERR2COMPLEX 4 /* Too many nested contents */
#define RFC2045_ERRBADBOUNDARY 8 /* Overlapping MIME boundaries */ #define RFC2045_ERRBADBOUNDARY 8 /* Overlapping MIME boundaries */
unsigned numparts; /* # of parts allocated */ unsigned numparts; /* # of parts allocated */
char *rw_transfer_encoding; /* For rewriting */ char *rw_transfer_encoding; /* For rewriting */
/* Use quoted-printable for 8bit content */
#define RFC2045_RW_7BIT 1 #define RFC2045_RW_7BIT 1
/*
** Convert quoted-printable, if the resulting line length is not
** excessive.
*/
#define RFC2045_RW_8BIT 2 #define RFC2045_RW_8BIT 2
/*
** Convert quoted printable without checking for maximum resulting
** line length.
*/
#define RFC2045_RW_8BIT_ALWAYS 3
/* Subsections */ /* Subsections */
struct rfc2045 *firstpart, *lastpart; struct rfc2045 *firstpart, *lastpart;
/* Working area */ /* Working area */
char *workbuf; char *workbuf;
size_t workbufsize; size_t workbufsize;
size_t workbuflen; size_t workbuflen;
int workinheader; int workinheader;
skipping to change at line 545 skipping to change at line 574
/* /*
** Do not decode MIME headers, only body. This is the same as using a ** Do not decode MIME headers, only body. This is the same as using a
** headerfilter_func that always returns 0 ** headerfilter_func that always returns 0
*/ */
#define RFC2045_DECODEMSG_NOHEADERNAME 0x04 #define RFC2045_DECODEMSG_NOHEADERNAME 0x04
/* /*
** Do not prepend name: to converted header content. ** Do not prepend name: to converted header content.
*/ */
#define RFC2045_DECODEMSG_NOATTACHHEADERS 0x08
/*
** Do not decode MIME headers of attachments. Decode only the message's
** main headers.
*/
/* /*
** Convert a message into a utf8 bytestream. The output produced by this ** Convert a message into a utf8 bytestream. The output produced by this
** function is a catentation of decoded header and text content data, converted ** function is a catentation of decoded header and text content data, converted
** to utf8. ** to utf8.
** **
** This is fed into an output function. The output function takes a single ** This is fed into an output function. The output function takes a single
** octet, and returns 0 if the octet was processed, or a negative value if ** octet, and returns 0 if the octet was processed, or a negative value if
** the output was aborted. ** the output was aborted.
*/ */
skipping to change at line 645 skipping to change at line 680
const char *attrValue); const char *attrValue);
void rfc2231_paramDecode(struct rfc2231param *paramList, void rfc2231_paramDecode(struct rfc2231param *paramList,
char *charsetPtr, char *charsetPtr,
char *langPtr, char *langPtr,
char *textPtr, char *textPtr,
int *charsetLen, int *charsetLen,
int *langLen, int *langLen,
int *textLen); int *textLen);
/*
** Encode an E-mail address as utf-8 address type specified in RFC 6533.
** The e-mail address parameter must be encoded in UTF-8.
**
** The E-mail address is encoded as "rfc822" address type if it has only
** ASCII characters, or if use_rfc822 is set to non0.
**
** A malloc-ed address gets returned.
*/
char *rfc6533_encode(const char *address, int use_rfc822);
/*
** Decode a utf-8 or an rfc-822 address type. Returns a malloc-ed buffer,
** or NULL if the address cannot be decoded.
**
** Assumes valid UTF-8 coding, and does not verify it.
**
** Does verify, for both rfc-822 and utf-8 formats, that the returned address
** does not contain control characters.
*/
char *rfc6533_decode(const char *address);
#if 0 #if 0
{ {
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif #endif
 End of changes. 8 change blocks. 
1 lines changed or deleted 60 lines changed or added

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