Commit fd040416 fd04041628827f09e0b0c57e41491346357760e1 by Sergey Poznyakoff

Version 3.1

* configure.ac: version 3.1
* NEWS: Likewise.

* libmu_sieve/comparator.c: Attend to FIXMEs.
* libmu_sieve/conf.c: Likewise.
* libmu_sieve/prog.c: Likewise.
* libmu_sieve/runtime.c: Likewise.
* libmu_sieve/sieve.y: Likewise.
* libmu_sieve/util.c: Likewise.
* libmu_sieve/variables.c: Likewise.

* po/POTFILES.in: Add new files.
1 parent 985be0a2
......@@ -5,7 +5,7 @@ See the end of file for copying conditions.
Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 3.0.90 (Git)
Version 3.1 - 2016-12-13
* Sieve
......@@ -16,8 +16,8 @@ are implemented:
variables - RFC 5229
environment - RFC 5183
The tools define the Sieve environment "location", and
"phase" as follows:
The utilities define the Sieve environment "location", and
"phase" as per the following table:
Utility | "location" | "phase"
--------+-------------+--------
......
......@@ -16,7 +16,7 @@ dnl You should have received a copy of the GNU General Public License along
dnl with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
AC_INIT([GNU Mailutils], [3.0.90], [bug-mailutils@gnu.org], [mailutils],
AC_INIT([GNU Mailutils], [3.1], [bug-mailutils@gnu.org], [mailutils],
[http://mailutils.org])
AC_CONFIG_SRCDIR([libmailutils/mailbox/mailbox.c])
AC_CONFIG_AUX_DIR([build-aux])
......@@ -32,7 +32,7 @@ AB_INIT
dnl Library versioning
AC_SUBST(VI_CURRENT, 5)
AC_SUBST(VI_REVISION, 0)
AC_SUBST(VI_REVISION, 1)
AC_SUBST(VI_AGE, 0)
dnl Library paths
......
......@@ -266,7 +266,10 @@ mu_sieve_match_part_checker (mu_sieve_machine_t mach)
}
}
else
abort ();//FIXME
{
mu_error (_("%s:%d: INTERNAL ERROR, please report"), __FILE__, __LINE__);
abort ();
}
if (!compfun)
{
......@@ -400,7 +403,7 @@ i_ascii_numeric_is (mu_sieve_machine_t mach,
if (mu_isdigit (*str))
{
if (mu_isdigit (*text))
//FIXME: Error checking
/* FIXME: Error checking */
return strtol (str, NULL, 10) == strtol (text, NULL, 10);
else
return 0;
......
......@@ -45,7 +45,6 @@ struct sieve_settings
};
static struct sieve_settings sieve_settings;
/*FIXME: REMOVE BEGIN */
static int
_path_append (void *item, void *data)
{
......
......@@ -148,7 +148,7 @@ mu_i_sv_lint_command (struct mu_sieve_machine *mach,
exp_arg = reg->v.command.req_args ? reg->v.command.req_args : empty;
/* Pass 1: consolidation */
/* Pass 1: tag consolidation and argument checking */
for (i = 0; i < node->v.command.argcount; i++)
{
mu_sieve_value_t *val = start + i;
......@@ -223,9 +223,19 @@ mu_i_sv_lint_command (struct mu_sieve_machine *mach,
err = 1;
break;
}
//FIXME
if (mu_list_foreach (chk_list, _compare_ptr, cf) == 0)
mu_list_append (chk_list, cf);
{
rc = mu_list_append (chk_list, cf);
if (rc)
{
mu_diag_at_locus (MU_LOG_ERROR, &mach->locus,
"mu_list_append: %s",
mu_strerror (rc));
mu_i_sv_error (mach);
err = 1;
break;
}
}
}
}
else
......@@ -288,19 +298,19 @@ mu_i_sv_lint_command (struct mu_sieve_machine *mach,
if (node->v.command.tagcount)
{
/* Move tags to the end of the list */
/* Pass 2: Move tags to the end of the list */
for (i = 1; i < node->v.command.argcount; i++)
{
int j;//FIXME
size_t j;
mu_sieve_value_t tmp = start[i];
for (j = i - 1; j >= 0; j--)
for (j = i; j > 0; j--)
{
if (!tmp.tag && start[j].tag)
start[j + 1] = start[j];
if (!tmp.tag && start[j - 1].tag)
start[j] = start[j - 1];
else
break;
}
start[j + 1] = tmp;
start[j] = tmp;
}
}
......
......@@ -228,7 +228,7 @@ int
mu_sieve_set_dry_run (mu_sieve_machine_t mach, int val)
{
if (mach->state != mu_sieve_state_compiled)
return EINVAL; //FIXME: another error code
return EINVAL; /* FIXME: another error code */
return mach->dry_run = val;
}
......
......@@ -1007,10 +1007,8 @@ mu_i_sv_free_stringspace (mu_sieve_machine_t mach)
regex_t *rx = mach->stringspace[i].rx;
regfree (rx);
}
/* FIXME: Is it needed?
if (mach->stringspace[i].exp)
free (mach->stringspace[i].exp);
*/
/* There's no need to free mach->stringspace[i].exp, because
it is allocated in mach's memory pool */
}
}
......@@ -1575,7 +1573,6 @@ sieve_compile_strbuf (void *name)
return MU_ERR_FAILURE;
}
//FIXME: The API is clumsy
int
mu_sieve_compile_buffer (mu_sieve_machine_t mach,
const char *str, int strsize,
......
......@@ -81,7 +81,6 @@ mu_sieve_get_arg_untyped (mu_sieve_machine_t mach, size_t index)
mach->tagcount,
index);
abort ();
//FIXME mu_sieve_abort (mach);
}
return mach->valspace + mach->argstart + index;
......
......@@ -156,7 +156,7 @@ findprec (char const *name)
for (i = 0; i < MU_ARRAY_SIZE (modprec); i++)
if (strcmp (modprec[i].name, name) == 0)
return &modprec[i];
mu_error ("%s:%d: INTERNAL ERROR", __FILE__, __LINE__);
mu_error (_("%s:%d: INTERNAL ERROR, please report"), __FILE__, __LINE__);
abort ();
}
......
......@@ -38,6 +38,7 @@ libmu_auth/tls.c
libmu_sieve/actions.c
libmu_sieve/comparator.c
libmu_sieve/conf.c
libmu_sieve/mem.c
libmu_sieve/prog.c
libmu_sieve/relational.c
libmu_sieve/require.c
......@@ -46,6 +47,7 @@ libmu_sieve/sieve.l
libmu_sieve/sieve.y
libmu_sieve/tests.c
libmu_sieve/util.c
libmu_sieve/variables.c
libmu_sieve/extensions/list.c
libmu_sieve/extensions/moderator.c
......