* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2004, 2015
+/* Copyright (c) Tom Kistner <tom@duncanthrax.net> 2004 - 2015
* License: GPL
- * Copyright (c) The Exim Maintainers 2017
+ * Copyright (c) The Exim Maintainers 2015 - 2018
*/
#include "exim.h"
if ( ((c == '\t') || (c == ' ')) && (header_value_mode == 1) )
continue;
- /* we have hit a non-whitespace char, start copying value data */
- header_value_mode = 2;
+ /* we have hit a non-whitespace char, start copying value data */
+ header_value_mode = 2;
- if (c == '"') /* flip "quoted" mode */
- header_value_mode = header_value_mode==2 ? 3 : 2;
+ if (c == '"') /* flip "quoted" mode */
+ header_value_mode = header_value_mode==2 ? 3 : 2;
- /* leave value mode on unquoted ';' */
- if (header_value_mode == 2 && c == ';') {
- header_value_mode = 0;
- };
- /* -------------------------------- */
+ /* leave value mode on unquoted ';' */
+ if (header_value_mode == 2 && c == ';')
+ header_value_mode = 0;
+ /* -------------------------------- */
}
else
{
header[num_copied] = '\0';
/* return 0 for EOF or empty line */
-if ((c == EOF) || (num_copied == 1))
- return 0;
-else
- return 1;
+return c == EOF || num_copied == 1 ? 0 : 1;
}
/* parse headers, set up expansion variables */
while (mime_get_header(f, header))
- {
- struct mime_header * mh;
/* look for interesting headers */
- for (mh = mime_header_list;
+ for (struct mime_header * mh = mime_header_list;
mh < mime_header_list + mime_header_list_size;
mh++) if (strncmpic(mh->name, header, mh->namelen) == 0)
{
while (*p)
{
- mime_parameter * mp;
-
DEBUG(D_acl) debug_printf_indent("MIME: considering paramlist '%s'\n", p);
if ( !mime_filename
else
/* look for interesting parameters */
- for (mp = mime_parameter_list;
+ for (mime_parameter * mp = mime_parameter_list;
mp < mime_parameter_list + nelem(mime_parameter_list);
mp++
) if (strncmpic(mp->name, p, mp->namelen) == 0)
}
}
}
- }
/* set additional flag variables (easier access) */
if ( mime_content_type