dovecot-sieve-1.1: Use the updated APIs
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 16 14:06:47 EEST 2007
details: http://hg.dovecot.org/dovecot-sieve-1.1/rev/57c65bac08b3
changeset: 37:57c65bac08b3
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 16 14:06:44 2007 +0300
description:
Use the updated APIs
diffstat:
6 files changed, 38 insertions(+), 38 deletions(-)
src/libsieve/comparator.c | 10 +++++-----
src/libsieve/message.c | 2 +-
src/libsieve/sievec.c | 12 ++++++------
src/map.c | 6 +++---
src/sieve-cmu.c | 44 ++++++++++++++++++++++----------------------
src/xmalloc.h | 2 +-
diffs (258 lines):
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/libsieve/comparator.c
--- a/src/libsieve/comparator.c Sun Sep 09 06:49:13 2007 +0300
+++ b/src/libsieve/comparator.c Sun Sep 16 14:06:44 2007 +0300
@@ -176,7 +176,7 @@ static int octet_contains_(const char *t
}
static int octet_contains(const char *text, size_t tlen, const char *pat,
- void *rock __attr_unused__)
+ void *rock ATTR_UNUSED)
{
return octet_contains_(text, tlen, pat, 0);
}
@@ -242,7 +242,7 @@ static int octet_matches_(const char *te
}
static int octet_matches(const char *text, size_t tlen, const char *pat,
- void *rock __attr_unused__)
+ void *rock ATTR_UNUSED)
{
return octet_matches_(text, tlen, pat, 0);
}
@@ -250,7 +250,7 @@ static int octet_matches(const char *tex
#ifdef ENABLE_REGEX
static int octet_regex(const char *text, size_t tlen, const char *pat,
- void *rock __attr_unused__)
+ void *rock ATTR_UNUSED)
{
if (!text[tlen]) {
/* NUL-terminated string */
@@ -279,14 +279,14 @@ static int ascii_casemap_cmp(const char
static int ascii_casemap_contains(const char *text, size_t tlen,
const char *pat,
- void *rock __attribute__((unused)))
+ void *rock ATTR_UNUSED)
{
return octet_contains_(text, tlen, pat, 1);
}
static int ascii_casemap_matches(const char *text, size_t tlen,
const char *pat,
- void *rock __attribute__((unused)))
+ void *rock ATTR_UNUSED)
{
return octet_matches_(text, tlen, pat, 1);
}
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/libsieve/message.c
--- a/src/libsieve/message.c Sun Sep 09 06:49:13 2007 +0300
+++ b/src/libsieve/message.c Sun Sep 16 14:06:44 2007 +0300
@@ -465,7 +465,7 @@ int parse_address(const char *header, vo
}
char *get_address(address_part_t addrpart,
- void **data __attr_unused__,
+ void **data ATTR_UNUSED,
void **marker,
int canon_domain)
{
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/libsieve/sievec.c
--- a/src/libsieve/sievec.c Sun Sep 09 06:49:13 2007 +0300
+++ b/src/libsieve/sievec.c Sun Sep 16 14:06:44 2007 +0300
@@ -145,18 +145,18 @@ sieve_vacation_t vacation = {
(sieve_callback *) &foo /* send_response() */
};
-static int sieve_notify(void *ac __attr_unused__,
- void *interp_context __attr_unused__,
- void *script_context __attr_unused__,
- void *message_context __attr_unused__,
- const char **errmsg __attr_unused__)
+static int sieve_notify(void *ac ATTR_UNUSED,
+ void *interp_context ATTR_UNUSED,
+ void *script_context ATTR_UNUSED,
+ void *message_context ATTR_UNUSED,
+ const char **errmsg ATTR_UNUSED)
{
i_fatal("stub function called");
return SIEVE_FAIL;
}
static int mysieve_error(int lineno, const char *msg,
- void *i __attr_unused__, void *s)
+ void *i ATTR_UNUSED, void *s)
{
char buf[1024];
char **errstr = (char **) s;
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/map.c
--- a/src/map.c Sun Sep 09 06:49:13 2007 +0300
+++ b/src/map.c Sun Sep 16 14:06:44 2007 +0300
@@ -20,9 +20,9 @@ static ssize_t read_full_n(int fd, void
return all_ret;
}
-void map_refresh(int fd, int onceonly __attr_unused__, const char **base,
+void map_refresh(int fd, int onceonly ATTR_UNUSED, const char **base,
unsigned long *len, unsigned long newlen,
- const char *name, const char *mboxname __attr_unused__)
+ const char *name, const char *mboxname ATTR_UNUSED)
{
ssize_t ret;
void *p;
@@ -45,7 +45,7 @@ void map_refresh(int fd, int onceonly __
*len = ret;
}
-void map_free(const char **base, unsigned long *len __attr_unused__)
+void map_free(const char **base, unsigned long *len ATTR_UNUSED)
{
char *x = (char *) *base;
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/sieve-cmu.c
--- a/src/sieve-cmu.c Sun Sep 09 06:49:13 2007 +0300
+++ b/src/sieve-cmu.c Sun Sep 16 14:06:44 2007 +0300
@@ -397,7 +397,7 @@ static int getinclude(void *sc, const ch
return SIEVE_FAIL;
}
- if (strocpy(fname, compiled_path, size) < 0) {
+ if (i_strocpy(fname, compiled_path, size) < 0) {
i_info("include: Script path too long: '%s'",
str_sanitize(script, 80));
return SIEVE_FAIL;
@@ -406,7 +406,7 @@ static int getinclude(void *sc, const ch
}
static int sieve_redirect(void *ac,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc, void *mc, const char **errmsg)
{
sieve_redirect_context_t *rc = (sieve_redirect_context_t *) ac;
@@ -443,10 +443,10 @@ static int sieve_redirect(void *ac,
}
}
-static int sieve_discard(void *ac __attr_unused__,
- void *ic __attr_unused__,
- void *sc __attr_unused__, void *mc,
- const char **errmsg __attr_unused__)
+static int sieve_discard(void *ac ATTR_UNUSED,
+ void *ic ATTR_UNUSED,
+ void *sc ATTR_UNUSED, void *mc,
+ const char **errmsg ATTR_UNUSED)
{
sieve_msgdata_t *md = mc;
@@ -457,7 +457,7 @@ static int sieve_discard(void *ac __attr
}
static int sieve_reject(void *ac,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc, void *mc, const char **errmsg)
{
sieve_reject_context_t *rc = (sieve_reject_context_t *) ac;
@@ -527,10 +527,10 @@ static void get_flags(const sieve_imapfl
}
static int sieve_fileinto(void *ac,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc,
void *mc,
- const char **errmsg __attr_unused__)
+ const char **errmsg ATTR_UNUSED)
{
sieve_fileinto_context_t *fc = (sieve_fileinto_context_t *) ac;
script_data_t *sd = (script_data_t *) sc;
@@ -548,8 +548,8 @@ static int sieve_fileinto(void *ac,
}
static int sieve_keep(void *ac,
- void *ic __attr_unused__,
- void *sc, void *mc, const char **errmsg __attr_unused__)
+ void *ic ATTR_UNUSED,
+ void *sc, void *mc, const char **errmsg ATTR_UNUSED)
{
sieve_keep_context_t *kc = (sieve_keep_context_t *) ac;
script_data_t *sd = (script_data_t *) sc;
@@ -577,8 +577,8 @@ static bool contains_8bit(const char *ms
}
static int sieve_notify(void *ac,
- void *ic __attr_unused__,
- void *sc __attr_unused__,
+ void *ic ATTR_UNUSED,
+ void *sc ATTR_UNUSED,
void *mc,
const char **errmsg)
{
@@ -651,10 +651,10 @@ static int sieve_notify(void *ac,
}
static int autorespond(void *ac,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc,
void *mc,
- const char **errmsg __attr_unused__)
+ const char **errmsg ATTR_UNUSED)
{
sieve_autorespond_context_t *arc = (sieve_autorespond_context_t *) ac;
script_data_t *sd = (script_data_t *) sc;
@@ -675,7 +675,7 @@ static int autorespond(void *ac,
}
static int send_response(void *ac,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc, void *mc,
const char **errmsg)
{
@@ -741,7 +741,7 @@ static sieve_imapflags_t mark = { markfl
static sieve_imapflags_t mark = { markflags, 1 };
static int sieve_parse_error_handler(int lineno, const char *msg,
- void *ic __attr_unused__,
+ void *ic ATTR_UNUSED,
void *sc)
{
script_data_t *sd = (script_data_t *) sc;
@@ -754,9 +754,9 @@ static int sieve_parse_error_handler(int
}
static int sieve_execute_error_handler(const char *msg,
- void *ic __attr_unused__,
- void *sc __attr_unused__,
- void *mc __attr_unused__)
+ void *ic ATTR_UNUSED,
+ void *sc ATTR_UNUSED,
+ void *mc ATTR_UNUSED)
{
i_info("sieve runtime error: %s", msg);
return SIEVE_OK;
@@ -972,8 +972,8 @@ int cmu_sieve_run(struct mail_namespace
if (array_is_created(&mdata.body_parts)) {
array_free(&mdata.body_parts);
array_free(&mdata.return_body_parts);
- buffer_free(mdata.tmp_buffer);
- pool_unref(mdata.body_parts_pool);
+ buffer_free(&mdata.tmp_buffer);
+ pool_unref(&mdata.body_parts_pool);
}
return ret;
}
diff -r 0eb93cd3b462 -r 57c65bac08b3 src/xmalloc.h
--- a/src/xmalloc.h Sun Sep 09 06:49:13 2007 +0300
+++ b/src/xmalloc.h Sun Sep 16 14:06:44 2007 +0300
@@ -19,7 +19,7 @@
#include "lib.h"
/* we don't have strlcpy, but strocpy is the same except for return value */
-#define strlcpy strocpy
+#define strlcpy i_strocpy
#define lcase str_lcase
More information about the dovecot-cvs
mailing list