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
update to pre-4.87 master
[exim.git]
/
src
/
src
/
parse.c
diff --git
a/src/src/parse.c
b/src/src/parse.c
index 94e42c182b3dae808921aa7ee0bbf03dc66378d6..d3f382b9648468e9123df17ff79e926aff587f21 100644
(file)
--- a/
src/src/parse.c
+++ b/
src/src/parse.c
@@
-2,7
+2,7
@@
* 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. */
/* Functions for parsing addresses */
/* See the file NOTICE for conditions of use and distribution. */
/* Functions for parsing addresses */
@@
-550,9
+550,7
@@
read_addr_spec(uschar *s, uschar *t, int term, uschar **errorptr,
{
s = read_local_part(s, t, errorptr, FALSE);
if (*errorptr == NULL)
{
s = read_local_part(s, t, errorptr, FALSE);
if (*errorptr == NULL)
- {
if (*s != term)
if (*s != term)
- {
if (*s != '@')
*errorptr = string_sprintf("\"@\" or \".\" expected after \"%s\"", t);
else
if (*s != '@')
*errorptr = string_sprintf("\"@\" or \".\" expected after \"%s\"", t);
else
@@
-562,8
+560,6
@@
if (*errorptr == NULL)
*domainptr = t;
s = read_domain(s, t, errorptr);
}
*domainptr = t;
s = read_domain(s, t, errorptr);
}
- }
- }
return s;
}
return s;
}
@@
-817,7
+813,7
@@
if (*end - *start > ADDRESS_MAXLENGTH)
return NULL;
}
return NULL;
}
-return
(uschar *)
yield;
+return yield;
/* Use goto (via the macro FAILED) to get to here from a variety of places.
We might have an empty address in a group - the caller can choose to ignore
/* Use goto (via the macro FAILED) to get to here from a variety of places.
We might have an empty address in a group - the caller can choose to ignore
@@
-866,11
+862,11
@@
Returns: pointer to the original string, if no quoting needed, or
the introduction
*/
the introduction
*/
-uschar *
-parse_quote_2047(uschar *string, int len, uschar *charset, uschar *buffer,
+
const
uschar *
+parse_quote_2047(
const
uschar *string, int len, uschar *charset, uschar *buffer,
int buffer_size, BOOL fold)
{
int buffer_size, BOOL fold)
{
-uschar *s = string;
+
const
uschar *s = string;
uschar *p, *t;
int hlen;
BOOL coded = FALSE;
uschar *p, *t;
int hlen;
BOOL coded = FALSE;
@@
-910,7
+906,7
@@
for (; len > 0; len--)
{
*t++ = '_';
first_byte = FALSE;
{
*t++ = '_';
first_byte = FALSE;
- }
+ }
else
{
sprintf(CS t, "=%02X", ch);
else
{
sprintf(CS t, "=%02X", ch);
@@
-985,12
+981,13
@@
Arguments:
Returns: the fixed RFC822 phrase
*/
Returns: the fixed RFC822 phrase
*/
-uschar *
-parse_fix_phrase(uschar *phrase, int len, uschar *buffer, int buffer_size)
+
const
uschar *
+parse_fix_phrase(
const
uschar *phrase, int len, uschar *buffer, int buffer_size)
{
int ch, i;
BOOL quoted = FALSE;
{
int ch, i;
BOOL quoted = FALSE;
-uschar *s, *t, *end, *yield;
+const uschar *s, *end;
+uschar *t, *yield;
while (len > 0 && isspace(*phrase)) { phrase++; len--; }
if (len > buffer_size/4) return US"Name too long";
while (len > 0 && isspace(*phrase)) { phrase++; len--; }
if (len > buffer_size/4) return US"Name too long";
@@
-1119,7
+1116,7
@@
while (s < end)
else if (ch == '(')
{
else if (ch == '(')
{
- uschar *ss = s; /* uschar after '(' */
+
const
uschar *ss = s; /* uschar after '(' */
int level = 1;
while(ss < end)
{
int level = 1;
while(ss < end)
{
@@
-1245,7
+1242,7
@@
Returns: FF_DELIVERED addresses extracted
int
parse_forward_list(uschar *s, int options, address_item **anchor,
int
parse_forward_list(uschar *s, int options, address_item **anchor,
- uschar **error, uschar *incoming_domain, uschar *directory,
+ uschar **error,
const
uschar *incoming_domain, uschar *directory,
error_block **syntax_errors)
{
int count = 0;
error_block **syntax_errors)
{
int count = 0;