"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libs/rfc2045/rfc2045.c" 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.c  (sqwebmail-5.9.3.tar.bz2):rfc2045.c  (sqwebmail-6.0.0.tar.bz2)
/* /*
** Copyright 1998 - 2004 Double Precision, Inc. See COPYING for ** Copyright 1998 - 2018 Double Precision, Inc. See COPYING for
** distribution information. ** distribution information.
*/ */
/* /*
*/ */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
#include "rfc2045_config.h" #include "rfc2045_config.h"
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
skipping to change at line 624 skipping to change at line 624
free(p->boundary); free(p->boundary);
p->boundary=0; p->boundary=0;
} }
/* If this section's a message, we will expect to see /* If this section's a message, we will expect to see
** more RFC2045 stuff, so create a nested RFC2045 structure, ** more RFC2045 stuff, so create a nested RFC2045 structure,
** and indicate that we expect to see headers. ** and indicate that we expect to see headers.
*/ */
if (p->content_type && if (p->content_type &&
strcmp(p->content_type, "message/rfc822") == 0) rfc2045_message_content_type(p->content_type))
{ {
newp=append_part_noinherit(p, p->startbody); newp=append_part_noinherit(p, p->startbody);
newp->workinheader=1; newp->workinheader=1;
return; return;
} }
/* /*
** If this is a multipart message (boundary defined), ** If this is a multipart message (boundary defined),
** create a RFC2045 structure for the pseudo-section ** create a RFC2045 structure for the pseudo-section
** that precedes the first boundary line. ** that precedes the first boundary line.
skipping to change at line 740 skipping to change at line 740
memcpy(p+l, h->tokens[start+i].ptr, l2); memcpy(p+l, h->tokens[start+i].ptr, l2);
l += l2; l += l2;
} }
else p[l++]=h->tokens[start+i].token; else p[l++]=h->tokens[start+i].token;
} }
p[l]=0; p[l]=0;
return (p); return (p);
} }
/*
** Whether this MIME content type is a nested MIME message.
*/
int rfc2045_message_content_type(const char *content_type)
{
return strcasecmp(content_type, RFC2045_MIME_MESSAGE_RFC822) == 0 ||
strcasecmp(content_type, RFC2045_MIME_MESSAGE_GLOBAL) == 0;
}
/*
** Whether this MIME content type is a delivery status notification.
*/
int rfc2045_delivery_status_content_type(const char *content_type)
{
return strcasecmp(content_type,
RFC2045_MIME_MESSAGE_DELIVERY_STATUS) == 0 ||
strcasecmp(content_type,
RFC2045_MIME_MESSAGE_GLOBAL_DELIVERY_STATUS) == 0;
}
int rfc2045_message_headers_content_type(const char *content_type)
{
return strcasecmp(content_type,
RFC2045_MIME_MESSAGE_HEADERS) == 0 ||
strcasecmp(content_type,
RFC2045_MIME_MESSAGE_GLOBAL_HEADERS) == 0;
}
/* Various permutations of the above, including forcing the string to /* Various permutations of the above, including forcing the string to
** lowercase ** lowercase
*/ */
static char *lower_paste_tokens(struct rfc822t *h, int start, int cnt) static char *lower_paste_tokens(struct rfc822t *h, int start, int cnt)
{ {
char *p=paste_tokens(h, start, cnt); char *p=paste_tokens(h, start, cnt);
char *q; char *q;
for (q=p; q && *q; q++) for (q=p; q && *q; q++)
 End of changes. 3 change blocks. 
2 lines changed or deleted 32 lines changed or added

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