359 |
list_do (list, (list_action_t*) tag_printer, &dbg); |
list_do (list, (list_action_t*) tag_printer, &dbg); |
360 |
} |
} |
361 |
|
|
362 |
|
static int |
363 |
|
tag_finder (void *item, void *data) |
364 |
|
{ |
365 |
|
sieve_runtime_tag_t *val = item; |
366 |
|
sieve_runtime_tag_t *target = data; |
367 |
|
|
368 |
|
if (strcmp (val->tag, target->tag) == 0) |
369 |
|
{ |
370 |
|
target->arg = val->arg; |
371 |
|
return 1; |
372 |
|
} |
373 |
|
return 0; |
374 |
|
} |
375 |
|
|
376 |
|
int |
377 |
|
sieve_tag_lookup (list_t taglist, char *name, sieve_value_t **arg) |
378 |
|
{ |
379 |
|
sieve_runtime_tag_t t; |
380 |
|
|
381 |
|
t.tag = name; |
382 |
|
if (list_do (taglist, tag_finder, &t)) |
383 |
|
{ |
384 |
|
if (arg) |
385 |
|
*arg = t.arg; |
386 |
|
return 1; |
387 |
|
} |
388 |
|
return 0; |
389 |
|
} |
390 |
|
|
391 |
int |
int |
392 |
sieve_mark_deleted (message_t msg, int deleted) |
sieve_mark_deleted (message_t msg, int deleted) |
393 |
{ |
{ |