/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* SPDX-License-Identifier: GPL-2.0-or-later */
static const uschar *
nextword(const uschar *ptr, uschar *buffer, int size, BOOL bracket)
{
static const uschar *
nextword(const uschar *ptr, uschar *buffer, int size, BOOL bracket)
{
{
*error_pointer = string_sprintf("word is too long in line %d of "
"filter file (max = %d chars)", line_number, size);
break;
}
{
*error_pointer = string_sprintf("word is too long in line %d of "
"filter file (max = %d chars)", line_number, size);
break;
}
if (sscanf(CS s, "%i%n", &value, &count) != 1) return 0;
if (tolower(s[count]) == 'k') { value *= 1024; count++; }
if (tolower(s[count]) == 'm') { value *= 1024*1024; count++; }
if (sscanf(CS s, "%i%n", &value, &count) != 1) return 0;
if (tolower(s[count]) == 'k') { value *= 1024; count++; }
if (tolower(s[count]) == 'm') { value *= 1024*1024; count++; }
{
header_add(htype_other, "%s%s", s,
s[Ustrlen(s)-1] == '\n' ? "" : "\n");
{
header_add(htype_other, "%s%s", s,
s[Ustrlen(s)-1] == '\n' ? "" : "\n");