git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into 4.next
[exim.git]
/
src
/
src
/
rfc2047.c
diff --git
a/src/src/rfc2047.c
b/src/src/rfc2047.c
index 553b0e618fd7c01a1519b74d6a84cc0668068315..041a18858768ace59de0f89b6c38c433ffe8fbdd 100644
(file)
--- a/
src/src/rfc2047.c
+++ b/
src/src/rfc2047.c
@@
-1,10
+1,8
@@
-/* $Cambridge: exim/src/src/rfc2047.c,v 1.6 2010/06/07 00:12:42 pdp Exp $ */
-
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
/*************************************************
* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 20
09
*/
+/* Copyright (c) University of Cambridge 1995 - 20
15
*/
/* See the file NOTICE for conditions of use and distribution. */
/* This file contains a function for decoding message header lines that may
/* See the file NOTICE for conditions of use and distribution. */
/* This file contains a function for decoding message header lines that may
@@
-52,7
+50,7
@@
ptr = *ptrptr = store_get(Ustrlen(string) + 1); /* No longer than this */
while (*string != 0)
{
while (*string != 0)
{
-
register
int ch = *string++;
+ int ch = *string++;
if (ch == '_') *ptr++ = ' ';
else if (ch == '=')
if (ch == '_') *ptr++ = ' ';
else if (ch == '=')
@@
-122,7
+120,7
@@
for (;; string = mimeword + 2)
encoding = toupper((*q1ptr)[1]);
**endptr = 0;
if (encoding == 'B')
encoding = toupper((*q1ptr)[1]);
**endptr = 0;
if (encoding == 'B')
- dlen =
auth_
b64decode(*q2ptr+1, dptrptr);
+ dlen = b64decode(*q2ptr+1, dptrptr);
else if (encoding == 'Q')
dlen = rfc2047_qpdecode(*q2ptr+1, dptrptr);
**endptr = '?'; /* restore */
else if (encoding == 'Q')
dlen = rfc2047_qpdecode(*q2ptr+1, dptrptr);
**endptr = '?'; /* restore */
@@
-199,9
+197,9
@@
uschar *mimeword, *q1, *q2, *endword;
*error = NULL;
mimeword = decode_mimeword(string, lencheck, &q1, &q2, &endword, &dlen, &dptr);
*error = NULL;
mimeword = decode_mimeword(string, lencheck, &q1, &q2, &endword, &dlen, &dptr);
-if (
mimeword == NULL
)
+if (
!mimeword
)
{
{
- if (lenptr
!= NULL
) *lenptr = size;
+ if (lenptr) *lenptr = size;
return string;
}
return string;
}
@@
-212,7
+210,7
@@
string building code. */
yield = store_get(++size);
yield = store_get(++size);
-while (mimeword
!= NULL
)
+while (mimeword)
{
#if HAVE_ICONV
{
#if HAVE_ICONV
@@
-220,7
+218,7
@@
while (mimeword != NULL)
#endif
if (mimeword != string)
#endif
if (mimeword != string)
- yield = string_cat(yield, &size, &ptr, string, mimeword - string);
+ yield = string_cat
n
(yield, &size, &ptr, string, mimeword - string);
/* Do a charset translation if required. This is supported only on hosts
that have the iconv() function. Translation errors set error, but carry on,
/* Do a charset translation if required. This is supported only on hosts
that have the iconv() function. Translation errors set error, but carry on,
@@
-307,7
+305,7
@@
while (mimeword != NULL)
/* Add the new string onto the result */
/* Add the new string onto the result */
- yield = string_cat(yield, &size, &ptr, tptr, tlen);
+ yield = string_cat
n
(yield, &size, &ptr, tptr, tlen);
}
#if HAVE_ICONV
}
#if HAVE_ICONV
@@
-319,7
+317,7
@@
while (mimeword != NULL)
string = endword + 2;
mimeword = decode_mimeword(string, lencheck, &q1, &q2, &endword, &dlen, &dptr);
string = endword + 2;
mimeword = decode_mimeword(string, lencheck, &q1, &q2, &endword, &dlen, &dptr);
- if (mimeword
!= NULL
)
+ if (mimeword)
{
uschar *s = string;
while (isspace(*s)) s++;
{
uschar *s = string;
while (isspace(*s)) s++;
@@
-330,10
+328,10
@@
while (mimeword != NULL)
/* Copy the remaining characters of the string, zero-terminate it, and return
the length as well if requested. */
/* Copy the remaining characters of the string, zero-terminate it, and return
the length as well if requested. */
-yield = string_cat(yield, &size, &ptr, string
, Ustrlen(string)
);
+yield = string_cat(yield, &size, &ptr, string);
yield[ptr] = 0;
yield[ptr] = 0;
-if (lenptr
!= NULL
) *lenptr = ptr;
-if (sizeptr
!= NULL
) *sizeptr = size;
+if (lenptr) *lenptr = ptr;
+if (sizeptr) *sizeptr = size;
return yield;
}
return yield;
}