1 |
/* GNU mailutils - a suite of utilities for electronic mail |
/* GNU Mailutils -- a suite of utilities for electronic mail |
2 |
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
3 |
|
|
4 |
This program is free software; you can redistribute it and/or modify |
GNU Mailutils is free software; you can redistribute it and/or modify |
5 |
it under the terms of the GNU Lesser General Public License as published by |
it under the terms of the GNU Lesser General Public License as published by |
6 |
the Free Software Foundation; either version 2, or (at your option) |
the Free Software Foundation; either version 2, or (at your option) |
7 |
any later version. |
any later version. |
8 |
|
|
9 |
This program is distributed in the hope that it will be useful, |
GNU Mailutils is distributed in the hope that it will be useful, |
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 |
GNU Lesser General Public License for more details. |
GNU Lesser General Public License for more details. |
13 |
|
|
14 |
You should have received a copy of the GNU Lesser General Public License |
You should have received a copy of the GNU Lesser General Public License |
15 |
along with this program; if not, write to the Free Software |
along with GNU Mailutils; if not, write to the Free Software |
16 |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ |
17 |
|
|
18 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
35 |
if (!newprog) |
if (!newprog) |
36 |
{ |
{ |
37 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
38 |
"out of memory!"); |
_("out of memory!")); |
39 |
return 1; |
return 1; |
40 |
} |
} |
41 |
sieve_machine->prog = newprog; |
sieve_machine->prog = newprog; |
154 |
if (rc) |
if (rc) |
155 |
{ |
{ |
156 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
157 |
"can't create iterator: %s", |
_("can't create iterator: %s"), |
158 |
mu_errstring (rc)); |
mu_errstring (rc)); |
159 |
return 1; |
return 1; |
160 |
} |
} |
173 |
if (!tag) |
if (!tag) |
174 |
{ |
{ |
175 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
176 |
"invalid tag name `%s' for `%s'", |
_("invalid tag name `%s' for `%s'"), |
177 |
val->v.string, reg->name); |
val->v.string, reg->name); |
178 |
err = 1; |
err = 1; |
179 |
break; |
break; |
182 |
if (!tag_list && (rc = list_create (&tag_list))) |
if (!tag_list && (rc = list_create (&tag_list))) |
183 |
{ |
{ |
184 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
185 |
"%s:%d: can't create tag list: %s", |
_("%s:%d: can't create tag list: %s"), |
186 |
mu_errstring (rc)); |
mu_errstring (rc)); |
187 |
err = 1; |
err = 1; |
188 |
break; |
break; |
206 |
if (!chk_list && (rc = list_create (&chk_list))) |
if (!chk_list && (rc = list_create (&chk_list))) |
207 |
{ |
{ |
208 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
209 |
"%s:%d: can't create check list: %s", |
_("%s:%d: can't create check list: %s"), |
210 |
mu_errstring (rc)); |
mu_errstring (rc)); |
211 |
err = 1; |
err = 1; |
212 |
break; |
break; |
218 |
else if (*exp_arg == SVT_VOID) |
else if (*exp_arg == SVT_VOID) |
219 |
{ |
{ |
220 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
221 |
"too many arguments in call to `%s'", |
_("too many arguments in call to `%s'"), |
222 |
reg->name); |
reg->name); |
223 |
err = 1; |
err = 1; |
224 |
break; |
break; |
239 |
else |
else |
240 |
{ |
{ |
241 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
242 |
"type mismatch in argument %d to `%s'", |
_("type mismatch in argument %d to `%s'"), |
243 |
exp_arg - reg->req_args + 1, |
exp_arg - reg->req_args + 1, |
244 |
reg->name); |
reg->name); |
245 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
246 |
"Expected %s but passed %s", |
_("Expected %s but passed %s"), |
247 |
sieve_type_str (*exp_arg), |
sieve_type_str (*exp_arg), |
248 |
sieve_type_str (val->type)); |
sieve_type_str (val->type)); |
249 |
err = 1; |
err = 1; |
254 |
if (!arg_list && (rc = list_create (&arg_list))) |
if (!arg_list && (rc = list_create (&arg_list))) |
255 |
{ |
{ |
256 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
257 |
"can't create arg list: %s", |
_("can't create arg list: %s"), |
258 |
mu_errstring (rc)); |
mu_errstring (rc)); |
259 |
err = 1; |
err = 1; |
260 |
break; |
break; |
272 |
if (*exp_arg != SVT_VOID) |
if (*exp_arg != SVT_VOID) |
273 |
{ |
{ |
274 |
sieve_compile_error (sieve_filename, sieve_line_num, |
sieve_compile_error (sieve_filename, sieve_line_num, |
275 |
"too few arguments in call to `%s'", |
_("too few arguments in call to `%s'"), |
276 |
reg->name); |
reg->name); |
277 |
err = 1; |
err = 1; |
278 |
} |
} |