changeset 953:411006be3c66 HEAD

Naming change for function typedefs.
author Timo Sirainen <tss@iki.fi>
date Sat, 11 Jan 2003 21:55:56 +0200
parents 5c8cd0bf94c1
children f7d0209bb7a6
files src/auth/auth-cyrus-sasl2.c src/auth/auth-digest-md5.c src/auth/auth-plain.c src/auth/auth.c src/auth/auth.h src/auth/cookie.h src/auth/userinfo-passwd-file.c src/imap/client.c src/imap/client.h src/imap/cmd-list.c src/imap/commands.c src/imap/commands.h src/lib-imap/imap-message-cache.c src/lib-index/mail-index-update.c src/lib-index/mail-index-util.c src/lib-index/mail-index.c src/lib-index/mail-index.h src/lib-index/maildir/maildir-sync.c src/lib-index/mbox/mbox-append.c src/lib-index/mbox/mbox-index.c src/lib-index/mbox/mbox-index.h src/lib-index/mbox/mbox-lock.c src/lib-index/mbox/mbox-rewrite.c src/lib-index/mbox/mbox-sync-full.c src/lib-mail/message-content-parser.c src/lib-mail/message-content-parser.h src/lib-mail/message-header-decode.c src/lib-mail/message-header-decode.h src/lib-mail/message-parser.c src/lib-mail/message-parser.h src/lib-mail/message-tokenize.c src/lib-mail/message-tokenize.h src/lib-storage/index/index-copy.c src/lib-storage/index/index-messageset.c src/lib-storage/index/index-messageset.h src/lib-storage/index/index-update-flags.c src/lib-storage/index/maildir/maildir-copy.c src/lib-storage/index/maildir/maildir-list.c src/lib-storage/index/maildir/maildir-storage.h src/lib-storage/index/mbox/mbox-list.c src/lib-storage/index/mbox/mbox-storage.h src/lib-storage/mail-search.c src/lib-storage/mail-search.h src/lib-storage/mail-sort.c src/lib-storage/mail-storage.h src/lib-storage/mail-thread.c src/lib-storage/subscription-file/subscription-file.c src/lib-storage/subscription-file/subscription-file.h src/lib/failures.c src/lib/failures.h src/lib/file-lock.c src/lib/file-lock.h src/lib/hash.c src/lib/hash.h src/lib/ioloop-internal.h src/lib/ioloop-poll.c src/lib/ioloop-select.c src/lib/ioloop.c src/lib/ioloop.h src/lib/iostream-internal.h src/lib/iostream.c src/lib/istream-data.c src/lib/istream-file.c src/lib/istream-mmap.c src/lib/istream.c src/lib/istream.h src/lib/ostream-file.c src/lib/ostream.c src/lib/ostream.h src/login/auth-connection.c src/login/auth-connection.h src/login/common.h src/login/master.c src/login/master.h src/master/auth-process.c src/master/auth-process.h src/master/ssl-init.c
diffstat 77 files changed, 400 insertions(+), 367 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/auth-cyrus-sasl2.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/auth-cyrus-sasl2.c	Sat Jan 11 21:55:56 2003 +0200
@@ -31,7 +31,7 @@
 static void auth_sasl_continue(struct cookie_data *cookie,
 			       struct auth_continued_request_data *request,
 			       const unsigned char *data,
-			       AuthCallback callback, void *context)
+			       auth_callback_t callback, void *context)
 {
 	struct auth_context *ctx = cookie->context;
 	struct auth_reply_data reply;
@@ -124,7 +124,7 @@
 
 void auth_cyrus_sasl_init(unsigned int login_pid,
 			  struct auth_init_request_data *request,
-			  AuthCallback callback, void *context)
+			  auth_callback_t callback, void *context)
 {
 	static const char *propnames[] = {
 		SASL_AUX_UIDNUM,
--- a/src/auth/auth-digest-md5.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/auth-digest-md5.c	Sat Jan 11 21:55:56 2003 +0200
@@ -522,7 +522,7 @@
 auth_digest_md5_continue(struct cookie_data *cookie,
 			 struct auth_continued_request_data *request,
 			 const unsigned char *data,
-			 AuthCallback callback, void *context)
+			 auth_callback_t callback, void *context)
 {
 	struct auth_data *auth = cookie->context;
 	struct auth_reply_data reply;
@@ -583,7 +583,7 @@
 
 static void auth_digest_md5_init(unsigned int login_pid,
 				 struct auth_init_request_data *request,
-				 AuthCallback callback, void *context)
+				 auth_callback_t callback, void *context)
 {
 	struct cookie_data *cookie;
 	struct auth_reply_data reply;
--- a/src/auth/auth-plain.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/auth-plain.c	Sat Jan 11 21:55:56 2003 +0200
@@ -9,7 +9,7 @@
 static void auth_plain_continue(struct cookie_data *cookie,
 				struct auth_continued_request_data *request,
 				const unsigned char *data,
-				AuthCallback callback, void *context)
+				auth_callback_t callback, void *context)
 {
 	struct auth_cookie_reply_data *cookie_reply = cookie->context;
 	struct auth_reply_data reply;
@@ -88,7 +88,7 @@
 
 static void auth_plain_init(unsigned int login_pid,
 			    struct auth_init_request_data *request,
-			    AuthCallback callback, void *context)
+			    auth_callback_t callback, void *context)
 {
 	struct cookie_data *cookie;
 	struct auth_reply_data reply;
--- a/src/auth/auth.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/auth.c	Sat Jan 11 21:55:56 2003 +0200
@@ -55,7 +55,7 @@
 
 void auth_init_request(unsigned int login_pid,
 		       struct auth_init_request_data *request,
-		       AuthCallback callback, void *context)
+		       auth_callback_t callback, void *context)
 {
 	struct auth_module_list *list;
 
@@ -88,7 +88,7 @@
 void auth_continue_request(unsigned int login_pid,
 			   struct auth_continued_request_data *request,
 			   const unsigned char *data,
-			   AuthCallback callback, void *context)
+			   auth_callback_t callback, void *context)
 {
 	struct cookie_data *cookie_data;
 
--- a/src/auth/auth.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/auth.h	Sat Jan 11 21:55:56 2003 +0200
@@ -3,15 +3,15 @@
 
 #include "auth-interface.h"
 
-typedef void (*AuthCallback)(struct auth_reply_data *reply,
-			     const void *data, void *context);
+typedef void (*auth_callback_t)(struct auth_reply_data *reply,
+				const void *data, void *context);
 
 struct auth_module {
 	enum auth_mech mech;
 
 	void (*init)(unsigned int login_pid,
 		     struct auth_init_request_data *request,
-		     AuthCallback callback, void *context);
+		     auth_callback_t callback, void *context);
 };
 
 extern enum auth_mech auth_mechanisms;
@@ -22,16 +22,16 @@
 
 void auth_init_request(unsigned int login_pid,
 		       struct auth_init_request_data *request,
-		       AuthCallback callback, void *context);
+		       auth_callback_t callback, void *context);
 void auth_continue_request(unsigned int login_pid,
 			   struct auth_continued_request_data *request,
 			   const unsigned char *data,
-			   AuthCallback callback, void *context);
+			   auth_callback_t callback, void *context);
 
 void auth_cyrus_sasl_init_lib(void);
 void auth_cyrus_sasl_init(unsigned int login_pid,
 			  struct auth_init_request_data *request,
-			  AuthCallback callback, void *context);
+			  auth_callback_t callback, void *context);
 
 void auth_init(void);
 void auth_deinit(void);
--- a/src/auth/cookie.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/cookie.h	Sat Jan 11 21:55:56 2003 +0200
@@ -11,7 +11,7 @@
 	void (*auth_continue)(struct cookie_data *cookie,
 			      struct auth_continued_request_data *request,
 			      const unsigned char *data,
-			      AuthCallback callback, void *context);
+			      auth_callback_t callback, void *context);
 
 	/* fills reply from cookie, returns TRUE if successful */
 	int (*auth_fill_reply)(struct cookie_data *cookie,
@@ -23,8 +23,6 @@
 	void *context;
 };
 
-typedef void (*CookieFreeFunc)(void *data);
-
 /* data->cookie is filled */
 void cookie_add(struct cookie_data *data);
 /* Looks up the cookie */
--- a/src/auth/userinfo-passwd-file.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/auth/userinfo-passwd-file.c	Sat Jan 11 21:55:56 2003 +0200
@@ -351,7 +351,7 @@
 	pw->stamp = st.st_mtime;
 	pw->fd = fd;
 	pw->users = hash_create(default_pool, pool, 100,
-				str_hash, (HashCompareFunc) strcmp);
+				str_hash, (hash_cmp_callback_t)strcmp);
 
 	passwd_file_parse_file(pw);
 	return pw;
--- a/src/imap/client.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/imap/client.c	Sat Jan 11 21:55:56 2003 +0200
@@ -34,7 +34,8 @@
 static struct client *my_client; /* we don't need more than one currently */
 static struct timeout *to_idle;
 
-static void client_input(struct client *client);
+static void client_input(void *context, int fd __attr_unused__,
+			 struct io *io __attr_unused__);
 
 static void client_output_timeout(void *context)
 {
@@ -72,7 +73,7 @@
 	o_stream_set_blocking(client->output, CLIENT_OUTPUT_TIMEOUT,
 			      client_output_timeout, client);
 
-	client->io = io_add(hin, IO_READ, (IOFunc) client_input, client);
+	client->io = io_add(hin, IO_READ, client_input, client);
 	client->parser = imap_parser_create(client->input, client->output,
 					    MAX_INBUF_SIZE,
 					    MAX_IMAP_ARG_ELEMENTS);
@@ -301,8 +302,11 @@
 	return TRUE;
 }
 
-static void client_input(struct client *client)
+static void client_input(void *context, int fd __attr_unused__,
+			 struct io *io __attr_unused__)
 {
+	struct client *client = context;
+
 	client->last_input = ioloop_time;
 
 	switch (i_stream_read(client->input)) {
--- a/src/imap/client.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/imap/client.h	Sat Jan 11 21:55:56 2003 +0200
@@ -6,7 +6,7 @@
 
 struct client;
 
-typedef int (*ClientCommandFunc) (struct client *client);
+typedef int (*client_command_func_t)(struct client *client);
 
 struct client {
 	int socket;
@@ -23,7 +23,7 @@
 	struct imap_parser *parser;
 	const char *cmd_tag; /* tag of command (allocated from parser pool), */
 	const char *cmd_name; /* command name (allocated from parser pool) */
-	ClientCommandFunc cmd_func;
+	client_command_func_t cmd_func;
 
 	unsigned int cmd_error:1;
 	unsigned int cmd_uid:1; /* used UID command */
--- a/src/imap/cmd-list.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/imap/cmd-list.c	Sat Jan 11 21:55:56 2003 +0200
@@ -77,8 +77,8 @@
 	return *node;
 }
 
-static void list_func(struct mail_storage *storage __attr_unused__,
-		      const char *name, enum mailbox_flags flags, void *context)
+static void list_cb(struct mail_storage *storage __attr_unused__,
+		    const char *name, enum mailbox_flags flags, void *context)
 {
 	struct list_context *ctx = context;
 	struct list_node *node;
@@ -173,11 +173,11 @@
 		if (!subscribed) {
 			failed = !client->storage->
 				find_mailboxes(client->storage,
-					       pattern, list_func, &ctx);
+					       pattern, list_cb, &ctx);
 		} else {
 			failed = !client->storage->
 				find_subscribed(client->storage,
-						pattern, list_func, &ctx);
+						pattern, list_cb, &ctx);
 		}
 
 		if (!failed) {
--- a/src/imap/commands.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/imap/commands.c	Sat Jan 11 21:55:56 2003 +0200
@@ -3,7 +3,7 @@
 #include "common.h"
 #include "commands.h"
 
-ClientCommandFunc client_command_find(const char *name)
+client_command_func_t client_command_find(const char *name)
 {
 	/* keep the command uppercased */
 	name = str_ucase(t_strdup_noconst(name));
--- a/src/imap/commands.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/imap/commands.h	Sat Jan 11 21:55:56 2003 +0200
@@ -4,7 +4,7 @@
 #include "commands-util.h"
 #include "imap-parser.h"
 
-ClientCommandFunc client_command_find(const char *name);
+client_command_func_t client_command_find(const char *name);
 
 /* Non-Authenticated State */
 int cmd_authenticate(struct client *client);
--- a/src/lib-imap/imap-message-cache.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-imap/imap-message-cache.c	Sat Jan 11 21:55:56 2003 +0200
@@ -296,19 +296,19 @@
 
 		if (msg->part == NULL && imap_msgcache_get_stream(cache, 0)) {
 			/* we need to parse the message */
-			MessageHeaderFunc func;
+			message_header_callback_t callback;
 
 			if ((fields & IMAP_CACHE_ENVELOPE) &&
 			    msg->cached_envelope == NULL) {
 				/* we need envelope too, fill the info
 				   while parsing headers */
-				func = parse_envelope_header;
+				callback = parse_envelope_header;
 			} else {
-				func = NULL;
+				callback = NULL;
 			}
 
 			msg->part = message_parse(msg->pool, cache->open_stream,
-						  func, msg);
+						  callback, msg);
 		}
 
 		failed = msg->part == NULL;
--- a/src/lib-index/mail-index-update.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mail-index-update.c	Sat Jan 11 21:55:56 2003 +0200
@@ -373,14 +373,14 @@
 	pool_t envelope_pool;
 	struct message_part_envelope_data *envelope;
 
-	MessageHeaderFunc header_func;
+	message_header_callback_t header_cb;
 	void *context;
 };
 
-static void update_header_func(struct message_part *part,
-			       const unsigned char *name, size_t name_len,
-			       const unsigned char *value, size_t value_len,
-			       void *context)
+static void update_header_cb(struct message_part *part,
+			     const unsigned char *name, size_t name_len,
+			     const unsigned char *value, size_t value_len,
+			     void *context)
 {
 	struct header_update_context *ctx = context;
 
@@ -397,16 +397,17 @@
 					   name, name_len, value, value_len);
 	}
 
-	if (ctx->header_func != NULL) {
-		ctx->header_func(part, name, name_len,
-				 value, value_len, ctx->context);
+	if (ctx->header_cb != NULL) {
+		ctx->header_cb(part, name, name_len,
+			       value, value_len, ctx->context);
 	}
 }
 
 void mail_index_update_headers(struct mail_index_update *update,
 			       struct istream *input,
                                enum mail_data_field cache_fields,
-			       MessageHeaderFunc header_func, void *context)
+			       message_header_callback_t header_cb,
+			       void *context)
 {
 	struct header_update_context ctx;
 	struct message_part *part;
@@ -420,7 +421,7 @@
 	ctx.update = update;
 	ctx.envelope_pool = NULL;
 	ctx.envelope = NULL;
-	ctx.header_func = header_func;
+	ctx.header_cb = header_cb;
 	ctx.context = context;
 
 	if (cache_fields == 0)
@@ -453,13 +454,13 @@
 
 		if (part == NULL) {
 			part = message_parse(pool, input,
-					     update_header_func, &ctx);
+					     update_header_cb, &ctx);
 		} else {
 			/* cached, construct the bodystructure using it.
 			   also we need to parse the header.. */
 			i_stream_seek(input, start_offset);
 			message_parse_header(NULL, input, NULL,
-					     update_header_func, &ctx);
+					     update_header_cb, &ctx);
 		}
 
 		/* save sizes */
@@ -508,7 +509,7 @@
 		pool_unref(pool);
 	} else {
 		message_parse_header(NULL, input, &hdr_size,
-				     update_header_func, &ctx);
+				     update_header_cb, &ctx);
 
 		body_size.physical_size = input->v_limit - input->v_offset;
 		if (body_size.physical_size == 0)
--- a/src/lib-index/mail-index-util.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mail-index-util.c	Sat Jan 11 21:55:56 2003 +0200
@@ -111,11 +111,11 @@
 {
 	struct mail_index *index = context;
 
-	if (index->lock_notify_func == NULL)
+	if (index->lock_notify_cb == NULL)
 		return;
 
-	index->lock_notify_func(MAIL_LOCK_NOTIFY_INDEX_ABORT,
-				secs_left, index->lock_notify_context);
+	index->lock_notify_cb(MAIL_LOCK_NOTIFY_INDEX_ABORT, secs_left,
+			      index->lock_notify_context);
 }
 
 int mail_index_wait_lock(struct mail_index *index, int lock_type)
--- a/src/lib-index/mail-index.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mail-index.c	Sat Jan 11 21:55:56 2003 +0200
@@ -460,9 +460,10 @@
 }
 
 void mail_index_set_lock_notify_callback(struct mail_index *index,
-					 MailLockNotifyFunc func, void *context)
+					 mail_lock_notify_callback_t callback,
+					 void *context)
 {
-	index->lock_notify_func = func;
+	index->lock_notify_cb = callback;
 	index->lock_notify_context = context;
 }
 
--- a/src/lib-index/mail-index.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mail-index.h	Sat Jan 11 21:55:56 2003 +0200
@@ -95,8 +95,9 @@
 	MAIL_INDEX_ERROR_MAILBOX_LOCK_TIMEOUT
 };
 
-typedef void (*MailLockNotifyFunc)(enum mail_lock_notify_type notify_type,
-				   unsigned int secs_left, void *context);
+typedef void (*mail_lock_notify_callback_t)
+	(enum mail_lock_notify_type notify_type,
+	 unsigned int secs_left, void *context);
 
 struct mail_index_header {
 	unsigned char compat_data[8];
@@ -209,7 +210,7 @@
 	/* If we have to wait for the lock, the given lock notify function
 	   is called once in a while. */
 	void (*set_lock_notify_callback)(struct mail_index *index,
-					 MailLockNotifyFunc func,
+					 mail_lock_notify_callback_t callback,
 					 void *context);
 
 	/* Rebuild the whole index. Note that this changes the indexid
@@ -390,7 +391,7 @@
 	time_t file_sync_stamp;
 	unsigned int first_recent_uid;
 
-	MailLockNotifyFunc lock_notify_func;
+	mail_lock_notify_callback_t lock_notify_cb;
 	void *lock_notify_context;
 
 	/* these fields are OR'ed to the fields in index header once we
@@ -432,7 +433,7 @@
 int mail_index_try_lock(struct mail_index *index,
 			enum mail_lock_type lock_type);
 void mail_index_set_lock_notify_callback(struct mail_index *index,
-					 MailLockNotifyFunc func,
+					 mail_lock_notify_callback_t callback,
 					 void *context);
 int mail_index_fsck(struct mail_index *index);
 struct mail_index_header *mail_index_get_header(struct mail_index *index);
@@ -491,7 +492,8 @@
 void mail_index_update_headers(struct mail_index_update *update,
 			       struct istream *input,
                                enum mail_data_field cache_fields,
-			       MessageHeaderFunc header_func, void *context);
+			       message_header_callback_t header_cb,
+			       void *context);
 int mail_index_update_cache(struct mail_index *index);
 int mail_index_compress(struct mail_index *index);
 int mail_index_compress_data(struct mail_index *index);
--- a/src/lib-index/maildir/maildir-sync.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/maildir/maildir-sync.c	Sat Jan 11 21:55:56 2003 +0200
@@ -215,7 +215,7 @@
 	count = index->header->messages_count + 16;
 	pool = pool_alloconly_create("Maildir sync", count*20);
 	files = hash_create(default_pool, pool, index->header->messages_count*2,
-			    str_hash, (HashCompareFunc) strcmp);
+			    str_hash, (hash_cmp_callback_t)strcmp);
 
 	while ((d = readdir(dirp)) != NULL) {
 		if (d->d_name[0] == '.')
--- a/src/lib-index/mbox/mbox-append.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-append.c	Sat Jan 11 21:55:56 2003 +0200
@@ -75,7 +75,7 @@
 	   from Status and X-Status fields. temporarily limit the stream length
 	   so the message body is parsed properly.
 
-	   the stream length limit is raised again by mbox_header_func after
+	   the stream length limit is raised again by mbox_header_cb after
 	   reading the headers. it uses Content-Length if available or finds
 	   the next From-line. */
 	mbox_header_init_context(&ctx, index, input);
@@ -84,7 +84,7 @@
 	i_stream_seek(input, abs_start_offset - input->start_offset);
 
 	i_stream_set_read_limit(input, eoh_offset);
-	mail_index_update_headers(update, input, 0, mbox_header_func, &ctx);
+	mail_index_update_headers(update, input, 0, mbox_header_cb, &ctx);
 
 	i_stream_seek(input, input->v_limit);
 	i_stream_set_read_limit(input, 0);
--- a/src/lib-index/mbox/mbox-index.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-index.c	Sat Jan 11 21:55:56 2003 +0200
@@ -248,10 +248,10 @@
 	return ret > 0;
 }
 
-void mbox_header_func(struct message_part *part __attr_unused__,
-		      const unsigned char *name, size_t name_len,
-		      const unsigned char *value, size_t value_len,
-		      void *context)
+void mbox_header_cb(struct message_part *part __attr_unused__,
+		    const unsigned char *name, size_t name_len,
+		    const unsigned char *value, size_t value_len,
+		    void *context)
 {
 	struct mbox_header_context *ctx = context;
 	uoff_t start_offset, end_offset;
--- a/src/lib-index/mbox/mbox-index.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-index.h	Sat Jan 11 21:55:56 2003 +0200
@@ -31,10 +31,10 @@
 			      struct mail_index *index,
 			      struct istream *input);
 void mbox_header_free_context(struct mbox_header_context *ctx);
-void mbox_header_func(struct message_part *part __attr_unused__,
-		      const unsigned char *name, size_t name_len,
-		      const unsigned char *value, size_t value_len,
-		      void *context);
+void mbox_header_cb(struct message_part *part __attr_unused__,
+		    const unsigned char *name, size_t name_len,
+		    const unsigned char *value, size_t value_len,
+		    void *context);
 void mbox_keywords_parse(const unsigned char *value, size_t len,
 			 const char *custom_flags[MAIL_CUSTOM_FLAGS_COUNT],
 			 void (*func)(const unsigned char *, size_t,
--- a/src/lib-index/mbox/mbox-lock.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-lock.c	Sat Jan 11 21:55:56 2003 +0200
@@ -91,11 +91,11 @@
 			return FALSE;
 		}
 
-		if (now != last_notify && index->lock_notify_func != NULL) {
+		if (now != last_notify && index->lock_notify_cb != NULL) {
 			last_notify = now;
-			index->lock_notify_func(MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
-						max_wait_time - now,
-						index->lock_notify_context);
+			index->lock_notify_cb(MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
+					      max_wait_time - now,
+					      index->lock_notify_context);
 		}
 
 		usleep(LOCK_RANDOM_USLEEP_TIME);
@@ -131,10 +131,10 @@
 			return FALSE;
 		}
 
-		if (index->lock_notify_func != NULL) {
-			index->lock_notify_func(MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
-						max_wait_time - now,
-						index->lock_notify_context);
+		if (index->lock_notify_cb != NULL) {
+			index->lock_notify_cb(MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
+					      max_wait_time - now,
+					      index->lock_notify_context);
 		}
 	}
 
@@ -186,17 +186,17 @@
 			}
 
 			if (last_notify != now &&
-			    index->lock_notify_func != NULL) {
+			    index->lock_notify_cb != NULL) {
 				last_notify = now;
 				if (now > last_change + stale_notify) {
 					secs_left = now - last_change +
 						dotlock_change_timeout;
-					index->lock_notify_func(
+					index->lock_notify_cb(
 					      MAIL_LOCK_NOTIFY_MAILBOX_OVERRIDE,
 					      secs_left,
 					      index->lock_notify_context);
 				} else {
-					index->lock_notify_func(
+					index->lock_notify_cb(
 						MAIL_LOCK_NOTIFY_MAILBOX_ABORT,
 						max_wait_time - now,
 						index->lock_notify_context);
--- a/src/lib-index/mbox/mbox-rewrite.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-rewrite.c	Sat Jan 11 21:55:56 2003 +0200
@@ -243,10 +243,10 @@
 	return str_len(str) == 0 ? NULL : str_c(str);
 }
 
-static void header_func(struct message_part *part __attr_unused__,
-			const unsigned char *name, size_t name_len,
-			const unsigned char *value, size_t value_len,
-			void *context)
+static void header_cb(struct message_part *part __attr_unused__,
+		      const unsigned char *name, size_t name_len,
+		      const unsigned char *value, size_t value_len,
+		      void *context)
 {
 	struct mbox_rewrite_context *ctx = context;
 	const char *str;
@@ -338,7 +338,7 @@
 	ctx.custom_flags = mail_custom_flags_list_get(index->custom_flags);
 
 	i_stream_set_read_limit(input, input->v_offset + hdr_size);
-	message_parse_header(NULL, input, &hdr_parsed_size, header_func, &ctx);
+	message_parse_header(NULL, input, &hdr_parsed_size, header_cb, &ctx);
 	i_stream_set_read_limit(input, 0);
 
 	i_assert(hdr_parsed_size.physical_size == hdr_size);
--- a/src/lib-index/mbox/mbox-sync-full.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-index/mbox/mbox-sync-full.c	Sat Jan 11 21:55:56 2003 +0200
@@ -132,7 +132,7 @@
 			   message flags in Status and X-Status fields */
 			mbox_header_init_context(&ctx, index, input);
 			message_parse_header(NULL, input, &hdr_parsed_size,
-					     mbox_header_func, &ctx);
+					     mbox_header_cb, &ctx);
 			md5_final(&ctx.md5, current_digest);
 
 			mbox_header_free_context(&ctx);
--- a/src/lib-mail/message-content-parser.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-content-parser.c	Sat Jan 11 21:55:56 2003 +0200
@@ -6,8 +6,8 @@
 #include "message-content-parser.h"
 
 void message_content_parse_header(const unsigned char *data, size_t size,
-				  ParseContentFunc func,
-				  ParseContentParamFunc param_func,
+				  parse_content_callback_t callback,
+				  parse_content_param_callback_t param_cb,
 				  void *context)
 {
 	static const enum message_token stop_tokens[] = { ';', TOKEN_LAST };
@@ -26,12 +26,12 @@
         /* first ';' separates the parameters */
 	message_tokenize_get_string(tok, str, NULL, stop_tokens);
 
-	if (func != NULL)
-		func(str_data(str), str_len(str), context);
+	if (callback != NULL)
+		callback(str_data(str), str_len(str), context);
 
 	t_pop();
 
-	if (param_func != NULL && message_tokenize_get(tok) == ';') {
+	if (param_cb != NULL && message_tokenize_get(tok) == ';') {
 		/* parse the parameters */
 		while ((token = message_tokenize_next(tok)) != TOKEN_LAST) {
 			/* <token> "=" <token> | <quoted-string> */
@@ -48,8 +48,8 @@
 				continue;
 
 			value = message_tokenize_get_value(tok, &value_len);
-			param_func(key, key_len, value, value_len,
-				   token == TOKEN_QSTRING, context);
+			param_cb(key, key_len, value, value_len,
+				 token == TOKEN_QSTRING, context);
 		}
 	}
 
--- a/src/lib-mail/message-content-parser.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-content-parser.h	Sat Jan 11 21:55:56 2003 +0200
@@ -2,17 +2,17 @@
 #define __MESSAGE_CONTENT_PARSER_H
 
 /* NOTE: name and value aren't \0-terminated. */
-typedef void (*ParseContentFunc)(const unsigned char *value, size_t value_len,
-				 void *context);
-typedef void (*ParseContentParamFunc)(const unsigned char *name,
-				      size_t name_len,
-				      const unsigned char *value,
-				      size_t value_len,
-				      int value_quoted, void *context);
+typedef void (*parse_content_callback_t)(const unsigned char *value,
+					 size_t value_len, void *context);
+typedef void (*parse_content_param_callback_t)(const unsigned char *name,
+					       size_t name_len,
+					       const unsigned char *value,
+					       size_t value_len,
+					       int value_quoted, void *context);
 
 void message_content_parse_header(const unsigned char *data, size_t size,
-				  ParseContentFunc func,
-				  ParseContentParamFunc param_func,
+				  parse_content_callback_t callback,
+				  parse_content_param_callback_t param_cb,
 				  void *context);
 
 #endif
--- a/src/lib-mail/message-header-decode.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-header-decode.c	Sat Jan 11 21:55:56 2003 +0200
@@ -46,7 +46,8 @@
 
 static int
 message_header_decode_encoded(const unsigned char *data, size_t *size,
-			      MessageHeaderDecodeFunc func, void *context)
+			      message_header_decode_callback_t callback,
+			      void *context)
 {
 	const unsigned char *text;
 	const char *charset, *encoding;
@@ -75,15 +76,16 @@
 		}
 	}
 
-	ret = func(buffer_get_data(decodebuf, NULL),
-		   buffer_get_used_size(decodebuf), charset, context);
+	ret = callback(buffer_get_data(decodebuf, NULL),
+		       buffer_get_used_size(decodebuf), charset, context);
 
 	t_pop();
 	return ret;
 }
 
 void message_header_decode(const unsigned char *data, size_t size,
-			   MessageHeaderDecodeFunc func, void *context)
+			   message_header_decode_callback_t callback,
+			   void *context)
 {
 	size_t pos, start_pos, subsize;
 
@@ -93,15 +95,15 @@
 			/* encoded string beginning */
 			if (pos != start_pos) {
 				/* send the unencoded data so far */
-				if (!func(data + start_pos, pos - start_pos,
-					  NULL, context))
+				if (!callback(data + start_pos, pos - start_pos,
+					      NULL, context))
 					return;
 			}
 
 			pos += 2;
 			subsize = size - pos;
 			if (!message_header_decode_encoded(data + pos, &subsize,
-							   func, context))
+							   callback, context))
 				return;
 
 			pos += subsize;
@@ -111,5 +113,5 @@
 		}
 	}
 
-	(void)func(data + start_pos, size - start_pos, NULL, context);
+	(void)callback(data + start_pos, size - start_pos, NULL, context);
 }
--- a/src/lib-mail/message-header-decode.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-header-decode.h	Sat Jan 11 21:55:56 2003 +0200
@@ -3,12 +3,15 @@
 
 /* Return FALSE if you wish to stop decoding. charset is NULL when it's not
    RFC2047-encoded. */
-typedef int (*MessageHeaderDecodeFunc)(const unsigned char *data, size_t size,
-				       const char *charset, void *context);
+typedef int (*message_header_decode_callback_t)(const unsigned char *data,
+						size_t size,
+						const char *charset,
+						void *context);
 
 /* Decode RFC2047 encoded words. Call specified function for each
    decoded block. */
 void message_header_decode(const unsigned char *data, size_t size,
-			   MessageHeaderDecodeFunc func, void *context);
+			   message_header_decode_callback_t callback,
+			   void *context);
 
 #endif
--- a/src/lib-mail/message-parser.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-parser.c	Sat Jan 11 21:55:56 2003 +0200
@@ -23,7 +23,7 @@
 	char *last_content_type;
 	struct message_boundary *boundaries;
 
-	MessageHeaderFunc func;
+	message_header_callback_t callback;
 	void *context;
 };
 
@@ -127,9 +127,9 @@
 	struct parser_context *parser_ctx = context;
 
 	/* call the user-defined header parser */
-	if (parser_ctx->func != NULL) {
-		parser_ctx->func(part, name, name_len, value, value_len,
-				 parser_ctx->context);
+	if (parser_ctx->callback != NULL) {
+		parser_ctx->callback(part, name, name_len, value, value_len,
+				     parser_ctx->context);
 	}
 
 	if (name_len == 12 && memcasecmp(name, "Content-Type", 12) == 0) {
@@ -253,14 +253,15 @@
 }
 
 struct message_part *message_parse(pool_t pool, struct istream *input,
-				   MessageHeaderFunc func, void *context)
+				   message_header_callback_t callback,
+				   void *context)
 {
 	struct message_part *part;
 	struct parser_context parser_ctx;
 
 	memset(&parser_ctx, 0, sizeof(parser_ctx));
 	parser_ctx.pool = pool;
-	parser_ctx.func = func;
+	parser_ctx.callback = callback;
 	parser_ctx.context = context;
 	parser_ctx.part = part = p_new(pool, struct message_part, 1);
 
@@ -314,7 +315,7 @@
 
 void message_parse_header(struct message_part *part, struct istream *input,
 			  struct message_size *hdr_size,
-			  MessageHeaderFunc func, void *context)
+			  message_header_callback_t callback, void *context)
 {
 	const unsigned char *msg;
 	size_t i, size, parse_size, startpos, missing_cr_count;
@@ -376,7 +377,8 @@
 			/* make sure the header doesn't continue to next line */
 			if (i+1 == size || !IS_LWSP(msg[i+1])) {
 				if (colon_pos != UINT_MAX &&
-				    colon_pos != line_start && func != NULL &&
+				    colon_pos != line_start &&
+				    callback != NULL &&
 				    !IS_LWSP(msg[line_start])) {
 					/* we have a valid header line */
 
@@ -399,9 +401,10 @@
 					if (msg[i-1] == '\r') value_len--;
 
 					/* and finally call the function */
-					func(part, msg + line_start, name_len,
-					     msg + colon_pos, value_len,
-					     context);
+					callback(part,
+						 msg + line_start, name_len,
+						 msg + colon_pos, value_len,
+						 context);
 				}
 
 				colon_pos = UINT_MAX;
@@ -435,9 +438,9 @@
 		i_assert(hdr_size->virtual_size >= hdr_size->physical_size);
 	}
 
-	if (func != NULL) {
+	if (callback != NULL) {
 		/* "end of headers" notify */
-		func(part, NULL, 0, NULL, 0, context);
+		callback(part, NULL, 0, NULL, 0, context);
 	}
 }
 
--- a/src/lib-mail/message-parser.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-parser.h	Sat Jan 11 21:55:56 2003 +0200
@@ -37,22 +37,25 @@
 
 /* NOTE: name and value aren't \0-terminated. Also called once at end of
    headers with name_len = value_len = 0. */
-typedef void (*MessageHeaderFunc)(struct message_part *part,
-				  const unsigned char *name, size_t name_len,
-				  const unsigned char *value, size_t value_len,
-				  void *context);
+typedef void (*message_header_callback_t)(struct message_part *part,
+					  const unsigned char *name,
+					  size_t name_len,
+					  const unsigned char *value,
+					  size_t value_len,
+					  void *context);
 
-/* func is called for each field in message header. */
+/* callback is called for each field in message header. */
 struct message_part *message_parse(pool_t pool, struct istream *input,
-				   MessageHeaderFunc func, void *context);
+				   message_header_callback_t callback,
+				   void *context);
 
-/* Call func for each field in message header. Fills the hdr_size.
+/* Call callback for each field in message header. Fills the hdr_size.
    part can be NULL, just make sure your header function works with it.
    This function doesn't use data stack so your header function may save
    values to it. When finished, input will point to beginning of message
    body. */
 void message_parse_header(struct message_part *part, struct istream *input,
 			  struct message_size *hdr_size,
-			  MessageHeaderFunc func, void *context);
+			  message_header_callback_t callback, void *context);
 
 #endif
--- a/src/lib-mail/message-tokenize.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-tokenize.c	Sat Jan 11 21:55:56 2003 +0200
@@ -9,7 +9,7 @@
 	const unsigned char *data;
 	size_t size;
 
-	MessageTokenizeErrorFunc error_func;
+	message_tokenize_error_callback_t error_cb;
 	void *error_context;
 
 	int token;
@@ -24,8 +24,8 @@
 
 #define PARSE_ERROR() \
 	STMT_START { \
-	if (tok->error_func != NULL && \
-	    !tok->error_func(data, i, '\0', tok->error_context)) { \
+	if (tok->error_cb != NULL && \
+	    !tok->error_cb(data, i, '\0', tok->error_context)) { \
 		tok->token = TOKEN_LAST; \
 		return TOKEN_LAST; \
 	} \
@@ -33,8 +33,8 @@
 
 #define PARSE_ERROR_MISSING(c) \
 	STMT_START { \
-	if (tok->error_func != NULL && \
-	    !tok->error_func(data, i, c, tok->error_context)) { \
+	if (tok->error_cb != NULL && \
+	    !tok->error_cb(data, i, c, tok->error_context)) { \
 		tok->token = TOKEN_LAST; \
 		return TOKEN_LAST; \
 	} \
@@ -43,7 +43,8 @@
 
 struct message_tokenizer *
 message_tokenize_init(const unsigned char *data, size_t size,
-		      MessageTokenizeErrorFunc error_func, void *error_context)
+		      message_tokenize_error_callback_t error_cb,
+		      void *error_context)
 {
 	struct message_tokenizer *tok;
 
@@ -51,7 +52,7 @@
 	tok->data = data;
 	tok->size = size;
 
-	tok->error_func = error_func;
+	tok->error_cb = error_cb;
 	tok->error_context = error_context;
 
 	tok->skip_comments = TRUE;
@@ -262,8 +263,8 @@
 	tok->parse_pos = i;
 
 	if (tok->token == TOKEN_LAST && tok->in_bracket &&
-	    tok->error_func != NULL) {
-		if (tok->error_func(data, i, '>', tok->error_context))
+	    tok->error_cb != NULL) {
+		if (tok->error_cb(data, i, '>', tok->error_context))
 			tok->token = TOKEN_LAST;
 	}
 
--- a/src/lib-mail/message-tokenize.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-mail/message-tokenize.h	Sat Jan 11 21:55:56 2003 +0200
@@ -29,15 +29,18 @@
 
    missing_char == '\0': unexpected character at str[pos]
    missing_char != '\0': missing character */
-typedef int (*MessageTokenizeErrorFunc)(const unsigned char *str, size_t pos,
-					char missing_char, void *context);
+typedef int (*message_tokenize_error_callback_t)(const unsigned char *str,
+						 size_t pos,
+						 char missing_char,
+						 void *context);
 
 /* Tokenize the string. Returns NULL if string is empty. Memory for
    returned array is allocated from data stack. You don't have to use
    the tokens_count, since last token is always 0. */
 struct message_tokenizer *
 message_tokenize_init(const unsigned char *data, size_t size,
-		      MessageTokenizeErrorFunc error_func, void *error_context);
+		      message_tokenize_error_callback_t error_cb,
+		      void *error_context);
 void message_tokenize_deinit(struct message_tokenizer *tok);
 
 /* Specify whether comments should be silently skipped (default yes). */
--- a/src/lib-storage/index/index-copy.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/index-copy.c	Sat Jan 11 21:55:56 2003 +0200
@@ -14,9 +14,9 @@
 	int copy_inside_mailbox;
 };
 
-static int copy_func(struct mail_index *index, struct mail_index_record *rec,
-		     unsigned int client_seq __attr_unused__,
-		     unsigned int idx_seq __attr_unused__, void *context)
+static int copy_cb(struct mail_index *index, struct mail_index_record *rec,
+		   unsigned int client_seq __attr_unused__,
+		   unsigned int idx_seq __attr_unused__, void *context)
 {
 	struct copy_context *ctx = context;
 	struct index_mailbox *dest_ibox = NULL;
@@ -82,7 +82,7 @@
 	ctx.dest = destbox;
 
 	failed = index_messageset_foreach(ibox, messageset, uidset,
-					  copy_func, &ctx) <= 0;
+					  copy_cb, &ctx) <= 0;
 
 	if (!index_storage_lock(ibox, MAIL_LOCK_UNLOCK))
 		return FALSE;
--- a/src/lib-storage/index/index-messageset.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/index-messageset.c	Sat Jan 11 21:55:56 2003 +0200
@@ -24,7 +24,7 @@
 
 static int mail_index_foreach(struct mail_index *index,
 			      unsigned int seq, unsigned int seq2,
-			      MsgsetForeachFunc func, void *context)
+			      msgset_foreach_callback_t callback, void *context)
 {
 	struct mail_index_record *rec;
 	const struct modify_log_expunge *expunges;
@@ -72,7 +72,7 @@
 			break;
 
 		t_push();
-		if (!func(index, rec, seq, idx_seq, context)) {
+		if (!callback(index, rec, seq, idx_seq, context)) {
 			t_pop();
 			return 0;
 		}
@@ -93,8 +93,8 @@
 static int mail_index_messageset_foreach(struct mail_index *index,
 					 const char *messageset,
 					 unsigned int messages_count,
-					 MsgsetForeachFunc func, void *context,
-					 const char **error)
+					 msgset_foreach_callback_t callback,
+					 void *context, const char **error)
 {
 	const char *input;
 	unsigned int seq, seq2;
@@ -164,7 +164,7 @@
 		}
 
 		t_push();
-		ret = mail_index_foreach(index, seq, seq2, func, context);
+		ret = mail_index_foreach(index, seq, seq2, callback, context);
 		t_pop();
 		if (ret <= 0)
 			return ret;
@@ -177,7 +177,8 @@
 
 static int mail_index_uid_foreach(struct mail_index *index,
 				  unsigned int uid, unsigned int uid2,
-				  MsgsetForeachFunc func, void *context)
+				  msgset_foreach_callback_t callback,
+				  void *context)
 {
 	struct mail_index_record *rec;
 	const struct modify_log_expunge *expunges;
@@ -215,7 +216,7 @@
 			   expunges->uid2 >= rec->uid));
 
 		t_push();
-		if (!func(index, rec, client_seq, idx_seq, context)) {
+		if (!callback(index, rec, client_seq, idx_seq, context)) {
 			t_pop();
 			return 0;
 		}
@@ -237,8 +238,8 @@
 static int mail_index_uidset_foreach(struct mail_index *index,
 				     const char *uidset,
 				     unsigned int messages_count,
-				     MsgsetForeachFunc func, void *context,
-				     const char **error)
+				     msgset_foreach_callback_t callback,
+				     void *context, const char **error)
 {
 	struct mail_index_record *rec;
 	const char *input;
@@ -299,7 +300,7 @@
 
 		t_push();
 		ret = mail_index_uid_foreach(index, uid, uid2,
-					     func, context);
+					     callback, context);
 		t_pop();
 		if (ret <= 0)
 			return ret;
@@ -312,7 +313,7 @@
 
 int index_messageset_foreach(struct index_mailbox *ibox,
 			     const char *messageset, int uidset,
-			     MsgsetForeachFunc func, void *context)
+			     msgset_foreach_callback_t callback, void *context)
 {
 	const char *error;
 	int ret;
@@ -320,11 +321,11 @@
 	if (uidset) {
 		ret = mail_index_uidset_foreach(ibox->index, messageset,
 						ibox->synced_messages_count,
-						func, context, &error);
+						callback, context, &error);
 	} else {
 		ret = mail_index_messageset_foreach(ibox->index, messageset,
 						    ibox->synced_messages_count,
-						    func, context, &error);
+						    callback, context, &error);
 	}
 
 	if (ret < 0) {
--- a/src/lib-storage/index/index-messageset.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/index-messageset.h	Sat Jan 11 21:55:56 2003 +0200
@@ -4,16 +4,17 @@
 #include "index-storage.h"
 
 /* If FALSE is returned, the loop is stopped. */
-typedef int (*MsgsetForeachFunc)(struct mail_index *index,
-				 struct mail_index_record *rec,
-				 unsigned int client_seq, unsigned int idx_seq,
-				 void *context);
+typedef int (*msgset_foreach_callback_t)(struct mail_index *index,
+					 struct mail_index_record *rec,
+					 unsigned int client_seq,
+					 unsigned int idx_seq,
+					 void *context);
 
 /* Returns 1 if all were found, 2 if some messages were deleted,
-   0 func returned FALSE, -1 if internal error occured or -2 if messageset
+   0 callback returned FALSE, -1 if internal error occured or -2 if messageset
    was invalid. */
 int index_messageset_foreach(struct index_mailbox *ibox,
 			     const char *messageset, int uidset,
-			     MsgsetForeachFunc func, void *context);
+			     msgset_foreach_callback_t callback, void *context);
 
 #endif
--- a/src/lib-storage/index/index-update-flags.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/index-update-flags.c	Sat Jan 11 21:55:56 2003 +0200
@@ -12,9 +12,9 @@
 	int notify;
 };
 
-static int update_func(struct mail_index *index, struct mail_index_record *rec,
-		       unsigned int client_seq, unsigned int idx_seq,
-		       void *context)
+static int update_cb(struct mail_index *index, struct mail_index_record *rec,
+		     unsigned int client_seq, unsigned int idx_seq,
+		     void *context)
 {
 	struct update_context *ctx = context;
 	struct mail_storage *storage;
@@ -91,7 +91,7 @@
 	ctx.notify = notify;
 
 	ret = index_messageset_foreach(ibox, messageset, uidset,
-				       update_func, &ctx);
+				       update_cb, &ctx);
 
 	if (!index_storage_lock(ibox, MAIL_LOCK_UNLOCK))
 		return FALSE;
--- a/src/lib-storage/index/maildir/maildir-copy.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/maildir/maildir-copy.c	Sat Jan 11 21:55:56 2003 +0200
@@ -16,10 +16,10 @@
 	const char **custom_flags;
 };
 
-static int copy_hard_func(struct mail_index *index,
-			  struct mail_index_record *rec,
-			  unsigned int client_seq __attr_unused__,
-			  unsigned int idx_seq __attr_unused__, void *context)
+static int copy_hard_cb(struct mail_index *index,
+			struct mail_index_record *rec,
+			unsigned int client_seq __attr_unused__,
+			unsigned int idx_seq __attr_unused__, void *context)
 {
 	struct copy_hard_context *ctx = context;
 	enum mail_flags flags;
@@ -77,7 +77,7 @@
 	ctx.custom_flags = mail_custom_flags_list_get(src->index->custom_flags);
 
 	ret = index_messageset_foreach(src, messageset, uidset,
-				       copy_hard_func, &ctx);
+				       copy_hard_cb, &ctx);
 
 	(void)index_storage_lock(src, MAIL_LOCK_UNLOCK);
 
--- a/src/lib-storage/index/maildir/maildir-list.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/maildir/maildir-list.c	Sat Jan 11 21:55:56 2003 +0200
@@ -12,7 +12,7 @@
 #include <sys/stat.h>
 
 struct find_subscribed_context {
-	MailboxFunc func;
+	mailbox_list_callback_t callback;
 	void *context;
 };
 
@@ -72,7 +72,7 @@
 }
 
 int maildir_find_mailboxes(struct mail_storage *storage, const char *mask,
-			   MailboxFunc func, void *context)
+			   mailbox_list_callback_t callback, void *context)
 {
         struct imap_match_glob *glob;
 	DIR *dirp;
@@ -142,21 +142,21 @@
 
 		t_push();
 		flags = maildir_get_marked_flags(storage, path);
-		func(storage, fname+1, flags, context);
+		callback(storage, fname+1, flags, context);
 		t_pop();
 	}
 
 	if (!failed && !found_inbox && imap_match(glob, "INBOX") > 0) {
 		/* .INBOX directory doesn't exist yet, but INBOX still exists */
-		func(storage, "INBOX", 0, context);
+		callback(storage, "INBOX", 0, context);
 	}
 
 	(void)closedir(dirp);
 	return !failed;
 }
 
-static int maildir_subs_func(struct mail_storage *storage, const char *name,
-			     void *context)
+static int maildir_subs_cb(struct mail_storage *storage, const char *name,
+			   void *context)
 {
 	struct find_subscribed_context *ctx = context;
 	enum mailbox_flags flags;
@@ -172,19 +172,19 @@
 			flags = MAILBOX_NOSELECT;
 	}
 
-	ctx->func(storage, name, flags, ctx->context);
+	ctx->callback(storage, name, flags, ctx->context);
 	return TRUE;
 }
 
 int maildir_find_subscribed(struct mail_storage *storage, const char *mask,
-			    MailboxFunc func, void *context)
+			    mailbox_list_callback_t callback, void *context)
 {
 	struct find_subscribed_context ctx;
 
-	ctx.func = func;
+	ctx.callback = callback;
 	ctx.context = context;
 
-	if (subsfile_foreach(storage, mask, maildir_subs_func, &ctx) <= 0)
+	if (subsfile_foreach(storage, mask, maildir_subs_cb, &ctx) <= 0)
 		return FALSE;
 
 	return TRUE;
--- a/src/lib-storage/index/maildir/maildir-storage.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/maildir/maildir-storage.h	Sat Jan 11 21:55:56 2003 +0200
@@ -11,9 +11,9 @@
 			 struct istream *data, uoff_t data_size);
 
 int maildir_find_mailboxes(struct mail_storage *storage, const char *mask,
-			   MailboxFunc func, void *context);
+			   mailbox_list_callback_t callback, void *context);
 int maildir_find_subscribed(struct mail_storage *storage, const char *mask,
-			    MailboxFunc func, void *context);
+			    mailbox_list_callback_t callback, void *context);
 
 int maildir_expunge_locked(struct index_mailbox *ibox, int notify);
 
--- a/src/lib-storage/index/mbox/mbox-list.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/mbox/mbox-list.c	Sat Jan 11 21:55:56 2003 +0200
@@ -11,13 +11,13 @@
 #include <sys/stat.h>
 
 struct find_subscribed_context {
-	MailboxFunc func;
+	mailbox_list_callback_t callback;
 	void *context;
 };
 
 static int mbox_find_path(struct mail_storage *storage,
 			  struct imap_match_glob *glob,
-			  MailboxFunc func, void *context,
+			  mailbox_list_callback_t callback, void *context,
 			  const char *relative_dir)
 {
 	DIR *dirp;
@@ -112,10 +112,10 @@
 		if (S_ISDIR(st.st_mode)) {
 			/* subdirectory, scan it too */
 			t_push();
-			func(storage, listpath, MAILBOX_NOSELECT, context);
+			callback(storage, listpath, MAILBOX_NOSELECT, context);
 			t_pop();
 
-			if (!mbox_find_path(storage, glob, func,
+			if (!mbox_find_path(storage, glob, callback,
 					    context, listpath)) {
 				failed = TRUE;
 				break;
@@ -123,7 +123,7 @@
 		} else if (match > 0 &&
 			   strcmp(fullpath, storage->inbox_file) != 0) {
 			t_push();
-			func(storage, listpath, MAILBOX_NOINFERIORS, context);
+			callback(storage, listpath, MAILBOX_NOINFERIORS, context);
 			t_pop();
 		}
 	}
@@ -148,7 +148,7 @@
 }
 
 int mbox_find_mailboxes(struct mail_storage *storage, const char *mask,
-			MailboxFunc func, void *context)
+			mailbox_list_callback_t callback, void *context)
 {
 	struct imap_match_glob *glob;
 	const char *relative_dir;
@@ -168,17 +168,17 @@
 	glob = imap_match_init(mask, TRUE, '/');
 	if (relative_dir == NULL && imap_match(glob, "INBOX") > 0) {
 		/* INBOX exists always, even if the file doesn't. */
-		func(storage, "INBOX", MAILBOX_NOINFERIORS, context);
+		callback(storage, "INBOX", MAILBOX_NOINFERIORS, context);
 	}
 
-	if (!mbox_find_path(storage, glob, func, context, relative_dir))
+	if (!mbox_find_path(storage, glob, callback, context, relative_dir))
 		return FALSE;
 
 	return TRUE;
 }
 
-static int mbox_subs_func(struct mail_storage *storage, const char *name,
-			  void *context)
+static int mbox_subs_cb(struct mail_storage *storage, const char *name,
+			void *context)
 {
 	struct find_subscribed_context *ctx = context;
 	enum mailbox_flags flags;
@@ -195,19 +195,19 @@
 			0 : MAILBOX_NOSELECT;
 	}
 
-	ctx->func(storage, name, flags, ctx->context);
+	ctx->callback(storage, name, flags, ctx->context);
 	return TRUE;
 }
 
 int mbox_find_subscribed(struct mail_storage *storage, const char *mask,
-			 MailboxFunc func, void *context)
+			 mailbox_list_callback_t callback, void *context)
 {
 	struct find_subscribed_context ctx;
 
-	ctx.func = func;
+	ctx.callback = callback;
 	ctx.context = context;
 
-	if (subsfile_foreach(storage, mask, mbox_subs_func, &ctx) <= 0)
+	if (subsfile_foreach(storage, mask, mbox_subs_cb, &ctx) <= 0)
 		return FALSE;
 
 	return TRUE;
--- a/src/lib-storage/index/mbox/mbox-storage.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/index/mbox/mbox-storage.h	Sat Jan 11 21:55:56 2003 +0200
@@ -11,9 +11,9 @@
 		      struct istream *data, uoff_t data_size);
 
 int mbox_find_mailboxes(struct mail_storage *storage, const char *mask,
-			MailboxFunc func, void *context);
+			mailbox_list_callback_t callback, void *context);
 int mbox_find_subscribed(struct mail_storage *storage, const char *mask,
-			 MailboxFunc func, void *context);
+			 mailbox_list_callback_t callback, void *context);
 
 int mbox_expunge_locked(struct index_mailbox *ibox, int notify);
 
--- a/src/lib-storage/mail-search.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/mail-search.c	Sat Jan 11 21:55:56 2003 +0200
@@ -386,7 +386,8 @@
 }
 
 static void search_arg_foreach(struct mail_search_arg *arg,
-			       MailSearchForeachFunc func, void *context)
+			       mail_search_foreach_callback_t callback,
+			       void *context)
 {
 	struct mail_search_arg *subarg;
 
@@ -401,7 +402,7 @@
 		subarg = arg->value.subargs;
 		while (subarg != NULL) {
 			if (subarg->result == 0)
-				search_arg_foreach(subarg, func, context);
+				search_arg_foreach(subarg, callback, context);
 
 			if (subarg->result == -1) {
 				/* failed */
@@ -422,7 +423,7 @@
 		arg->result = -1;
 		while (subarg != NULL) {
 			if (subarg->result == 0)
-				search_arg_foreach(subarg, func, context);
+				search_arg_foreach(subarg, callback, context);
 
 			if (subarg->result == 1) {
 				/* matched */
@@ -437,18 +438,19 @@
 		}
 	} else {
 		/* just a single condition */
-		func(arg, context);
+		callback(arg, context);
 	}
 }
 
 int mail_search_args_foreach(struct mail_search_arg *args,
-			     MailSearchForeachFunc func, void *context)
+			     mail_search_foreach_callback_t callback,
+			     void *context)
 {
 	int result;
 
 	result = 1;
 	for (; args != NULL; args = args->next) {
-		search_arg_foreach(args, func, context);
+		search_arg_foreach(args, callback, context);
 
 		if (args->result == -1) {
 			/* failed, abort */
--- a/src/lib-storage/mail-search.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/mail-search.h	Sat Jan 11 21:55:56 2003 +0200
@@ -67,8 +67,8 @@
 	int result;
 };
 
-typedef void (*MailSearchForeachFunc)(struct mail_search_arg *arg,
-				      void *context);
+typedef void (*mail_search_foreach_callback_t)(struct mail_search_arg *arg,
+					       void *context);
 
 /* Builds search arguments based on IMAP arguments. */
 struct mail_search_arg *
@@ -80,7 +80,8 @@
 /* goes through arguments in list that don't have a result yet.
    Returns 1 = search matched, -1 = search unmatched, 0 = don't know yet */
 int mail_search_args_foreach(struct mail_search_arg *args,
-			     MailSearchForeachFunc func, void *context);
+			     mail_search_foreach_callback_t callback,
+			     void *context);
 
 /* Fills have_headers, have_body and have_text based on if such search
    argument exists that needs to be checked. */
--- a/src/lib-storage/mail-sort.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/mail-sort.c	Sat Jan 11 21:55:56 2003 +0200
@@ -156,7 +156,7 @@
 		ctx->str_pool = pool_alloconly_create("sort str", 8192);
 		ctx->string_table = hash_create(default_pool, ctx->str_pool,
 						0, str_hash,
-						(HashCompareFunc)strcmp);
+						(hash_cmp_callback_t)strcmp);
 	}
 
 	ctx->sort_buffer = buffer_create_dynamic(system_pool,
--- a/src/lib-storage/mail-storage.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/mail-storage.h	Sat Jan 11 21:55:56 2003 +0200
@@ -63,8 +63,10 @@
 struct mail_fetch_data;
 struct mail_search_arg;
 
-typedef void (*MailboxFunc)(struct mail_storage *storage, const char *name,
-			    enum mailbox_flags flags, void *context);
+typedef void (*mailbox_list_callback_t)(struct mail_storage *storage,
+					const char *name,
+					enum mailbox_flags flags,
+					void *context);
 
 /* All methods returning int return either TRUE or FALSE. */
 struct mail_storage {
@@ -118,7 +120,7 @@
 	/* Execute specified function for all mailboxes matching given
 	   mask. The mask is in RFC2060 LIST format. */
 	int (*find_mailboxes)(struct mail_storage *storage, const char *mask,
-			      MailboxFunc func, void *context);
+			      mailbox_list_callback_t callback, void *context);
 
 	/* Subscribe/unsubscribe mailbox. There should be no error when
 	   subscribing to already subscribed mailbox. Subscribing to
@@ -128,7 +130,7 @@
 
 	/* Exactly like find_mailboxes(), but list only subscribed mailboxes. */
 	int (*find_subscribed)(struct mail_storage *storage, const char *mask,
-			       MailboxFunc func, void *context);
+			       mailbox_list_callback_t callback, void *context);
 
 	/* Returns mailbox name status */
 	int (*get_mailbox_name_status)(struct mail_storage *storage,
--- a/src/lib-storage/mail-thread.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/mail-thread.c	Sat Jan 11 21:55:56 2003 +0200
@@ -102,7 +102,7 @@
 					       APPROX_MSGID_SIZE);
 	ctx->msgid_hash = hash_create(default_pool, ctx->temp_pool,
 				      APPROX_MSG_COUNT*2, str_hash,
-				      (HashCompareFunc)strcmp);
+				      (hash_cmp_callback_t)strcmp);
 	ctx->callbacks = callbacks;
 	ctx->callback_context = callback_context;
 	ctx->output = output;
@@ -586,7 +586,7 @@
 	cb = ctx->callbacks;
 	ctx->subject_hash =
 		hash_create(default_pool, ctx->temp_pool, ctx->root_count * 2,
-			    str_hash, (HashCompareFunc)strcmp);
+			    str_hash, (hash_cmp_callback_t)strcmp);
 	for (node = ctx->root_nodes; node != NULL; node = node->next) {
 		if (!NODE_IS_DUMMY(node))
 			id = node->id;
--- a/src/lib-storage/subscription-file/subscription-file.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/subscription-file/subscription-file.c	Sat Jan 11 21:55:56 2003 +0200
@@ -170,7 +170,7 @@
 }
 
 int subsfile_foreach(struct mail_storage *storage, const char *mask,
-		     SubsFileForeachFunc func, void *context)
+		     subsfile_foreach_callback_t callback, void *context)
 {
         struct imap_match_glob *glob;
 	const char *path, *start, *end, *p, *line;
@@ -197,7 +197,7 @@
 
 		line = t_strdup_until(start, p);
 		if (line != NULL && *line != '\0' && imap_match(glob, line) > 0)
-			ret = func(storage, line, context);
+			ret = callback(storage, line, context);
 		t_pop();
 
 		if (p == end)
--- a/src/lib-storage/subscription-file/subscription-file.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib-storage/subscription-file/subscription-file.h	Sat Jan 11 21:55:56 2003 +0200
@@ -4,14 +4,14 @@
 #include "mail-storage.h"
 
 /* Returns FALSE if foreach should be aborted */
-typedef int (*SubsFileForeachFunc)(struct mail_storage *storage,
-				   const char *name, void *context);
+typedef int (*subsfile_foreach_callback_t)(struct mail_storage *storage,
+					   const char *name, void *context);
 
 int subsfile_set_subscribed(struct mail_storage *storage,
 			    const char *name, int set);
 
 /* Returns -1 if error, 0 if foreach function returned FALSE or 1 if all ok */
 int subsfile_foreach(struct mail_storage *storage, const char *mask,
-		     SubsFileForeachFunc func, void *context);
+		     subsfile_foreach_callback_t callback, void *context);
 
 #endif
--- a/src/lib/failures.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/failures.c	Sat Jan 11 21:55:56 2003 +0200
@@ -44,11 +44,13 @@
 static void default_info_handler(const char *format, va_list args);
 
 /* Initialize working defaults */
-static FailureFunc panic_handler __attr_noreturn__ = default_panic_handler;
-static FatalFailureFunc fatal_handler __attr_noreturn__ = default_fatal_handler;
-static FailureFunc error_handler = default_error_handler;
-static FailureFunc warning_handler = default_warning_handler;
-static FailureFunc info_handler = default_info_handler;
+static failure_callback_t panic_handler __attr_noreturn__ =
+	default_panic_handler;
+static fatal_failure_callback_t fatal_handler __attr_noreturn__ =
+	default_fatal_handler;
+static failure_callback_t error_handler = default_error_handler;
+static failure_callback_t warning_handler = default_warning_handler;
+static failure_callback_t info_handler = default_info_handler;
 
 static FILE *log_fd = NULL, *log_info_fd = NULL;
 static char *log_prefix = NULL, *log_stamp_format = NULL;
@@ -241,39 +243,39 @@
 	va_end(args);
 }
 
-void i_set_panic_handler(FailureFunc func __attr_noreturn__)
+void i_set_panic_handler(failure_callback_t callback __attr_noreturn__)
 {
-	if (func == NULL)
-		func = default_panic_handler;
-        panic_handler = func;
+	if (callback == NULL)
+		callback = default_panic_handler;
+        panic_handler = callback;
 }
 
-void i_set_fatal_handler(FatalFailureFunc func __attr_noreturn__)
+void i_set_fatal_handler(fatal_failure_callback_t callback __attr_noreturn__)
 {
-	if (func == NULL)
-		func = default_fatal_handler;
-        fatal_handler = func;
+	if (callback == NULL)
+		callback = default_fatal_handler;
+        fatal_handler = callback;
 }
 
-void i_set_error_handler(FailureFunc func)
+void i_set_error_handler(failure_callback_t callback)
 {
-	if (func == NULL)
-		func = default_error_handler;
-        error_handler = func;
+	if (callback == NULL)
+		callback = default_error_handler;
+        error_handler = callback;
 }
 
-void i_set_warning_handler(FailureFunc func)
+void i_set_warning_handler(failure_callback_t callback)
 {
-	if (func == NULL)
-		func = default_warning_handler;
-        warning_handler = func;
+	if (callback == NULL)
+		callback = default_warning_handler;
+        warning_handler = callback;
 }
 
-void i_set_info_handler(FailureFunc func)
+void i_set_info_handler(failure_callback_t callback)
 {
-	if (func == NULL)
-		func = default_info_handler;
-        info_handler = func;
+	if (callback == NULL)
+		callback = default_info_handler;
+        info_handler = callback;
 }
 
 static int syslog_handler(int level, const char *format, va_list args)
--- a/src/lib/failures.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/failures.h	Sat Jan 11 21:55:56 2003 +0200
@@ -14,8 +14,8 @@
 
 #define DEFAULT_FAILURE_STAMP_FORMAT "%b %d %H:%M:%S "
 
-typedef void (*FailureFunc) (const char *, va_list);
-typedef void (*FatalFailureFunc) (int status, const char *, va_list);
+typedef void (*failure_callback_t)(const char *, va_list);
+typedef void (*fatal_failure_callback_t)(int status, const char *, va_list);
 
 void i_panic(const char *format, ...) __attr_format__(1, 2) __attr_noreturn__;
 void i_fatal(const char *format, ...) __attr_format__(1, 2) __attr_noreturn__;
@@ -27,11 +27,11 @@
 	__attr_format__(2, 3) __attr_noreturn__;
 
 /* Change failure handlers. Make sure they don't modify errno. */
-void i_set_panic_handler(FailureFunc func __attr_noreturn__);
-void i_set_fatal_handler(FatalFailureFunc func __attr_noreturn__);
-void i_set_error_handler(FailureFunc func);
-void i_set_warning_handler(FailureFunc func);
-void i_set_info_handler(FailureFunc func);
+void i_set_panic_handler(failure_callback_t callback __attr_noreturn__);
+void i_set_fatal_handler(fatal_failure_callback_t callback __attr_noreturn__);
+void i_set_error_handler(failure_callback_t callback);
+void i_set_warning_handler(failure_callback_t callback);
+void i_set_info_handler(failure_callback_t callback);
 
 /* Send failures to syslog() */
 void i_syslog_panic_handler(const char *fmt, va_list args) __attr_noreturn__;
--- a/src/lib/file-lock.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/file-lock.c	Sat Jan 11 21:55:56 2003 +0200
@@ -31,7 +31,7 @@
 #include <signal.h>
 
 static int file_lock(int fd, int wait_lock, int lock_type, unsigned int timeout,
-		     void (*func)(unsigned int secs_left, void *context),
+		     void (*callback)(unsigned int secs_left, void *context),
 		     void *context)
 {
 	struct flock fl;
@@ -62,8 +62,8 @@
 			return 0;
 		}
 
-		if (func != NULL)
-			func(timeout_time - now, context);
+		if (callback != NULL)
+			callback(timeout_time - now, context);
 	}
 
 	return 1;
@@ -81,8 +81,8 @@
 }
 
 int file_wait_lock_full(int fd, int lock_type, unsigned int timeout,
-			void (*func)(unsigned int secs_left, void *context),
+			void (*callback)(unsigned int secs_left, void *context),
 			void *context)
 {
-	return file_lock(fd, TRUE, lock_type, timeout, func, context);
+	return file_lock(fd, TRUE, lock_type, timeout, callback, context);
 }
--- a/src/lib/file-lock.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/file-lock.h	Sat Jan 11 21:55:56 2003 +0200
@@ -15,10 +15,10 @@
    DEFAULT_LOCK_TIMEOUT. */
 int file_wait_lock(int fd, int lock_type);
 
-/* Like file_wait_lock(), but you can specify the timout and a function which
+/* Like file_wait_lock(), but you can specify the timout and a callback which
    is called once in a while if waiting takes longer. */
 int file_wait_lock_full(int fd, int lock_type, unsigned int timeout,
-			void (*func)(unsigned int secs_left, void *context),
+			void (*callback)(unsigned int secs_left, void *context),
 			void *context);
 
 #endif
--- a/src/lib/hash.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/hash.c	Sat Jan 11 21:55:56 2003 +0200
@@ -63,8 +63,8 @@
 
 	struct collision_node *free_cnodes;
 
-	HashFunc hash_func;
-	HashCompareFunc key_compare_func;
+	hash_callback_t hash_cb;
+	hash_cmp_callback_t key_compare_cb;
 };
 
 static int hash_resize(struct hash_table *table);
@@ -82,9 +82,9 @@
 	return POINTER_CAST_TO(p, unsigned int);
 }
 
-struct hash_table *hash_create(pool_t table_pool, pool_t node_pool,
-			       size_t initial_size, HashFunc hash_func,
-			       HashCompareFunc key_compare_func)
+struct hash_table *
+hash_create(pool_t table_pool, pool_t node_pool, size_t initial_size,
+	    hash_callback_t hash_cb, hash_cmp_callback_t key_compare_cb)
 {
 	struct hash_table *table;
 
@@ -94,9 +94,9 @@
 	table->size = I_MAX(primes_closest(initial_size),
 			    HASH_TABLE_MIN_SIZE);
 
-	table->hash_func = hash_func != NULL ? hash_func : direct_hash;
-	table->key_compare_func = key_compare_func == NULL ?
-		direct_cmp : key_compare_func;
+	table->hash_cb = hash_cb != NULL ? hash_cb : direct_hash;
+	table->key_compare_cb = key_compare_cb == NULL ?
+		direct_cmp : key_compare_cb;
 	table->nodes = p_new(table_pool, struct hash_node, table->size);
 	table->collisions_size = I_MAX(table->size / 10, COLLISIONS_MIN_SIZE);
 	table->collisions = p_new(table_pool, struct collision_node,
@@ -180,7 +180,7 @@
 	cnode = &table->collisions[hash % table->collisions_size];
 	do {
 		if (cnode->node.key != NULL) {
-			if (table->key_compare_func(cnode->node.key, key) == 0)
+			if (table->key_compare_cb(cnode->node.key, key) == 0)
 				return &cnode->node;
 		}
 		cnode = cnode->next;
@@ -200,7 +200,7 @@
 		if (table->removed_count == 0)
 			return NULL;
 	} else {
-		if (table->key_compare_func(node->key, key) == 0)
+		if (table->key_compare_cb(node->key, key) == 0)
 			return node;
 	}
 
@@ -211,7 +211,7 @@
 {
 	struct hash_node *node;
 
-	node = hash_lookup_node(table, key, table->hash_func(key));
+	node = hash_lookup_node(table, key, table->hash_cb(key));
 	return node != NULL ? node->value : NULL;
 }
 
@@ -221,7 +221,7 @@
 	struct hash_node *node;
 
 	node = hash_lookup_node(table, lookup_key,
-				table->hash_func(lookup_key));
+				table->hash_cb(lookup_key));
 	if (node == NULL)
 		return FALSE;
 
@@ -242,7 +242,7 @@
 
 	i_assert(key != NULL);
 
-	hash = table->hash_func(key);
+	hash = table->hash_cb(key);
 
 	if (check_existing && table->removed_count > 0) {
 		/* there may be holes, have to check everything */
@@ -264,7 +264,7 @@
 	}
 
 	if (check_existing) {
-		if (table->key_compare_func(node->key, key) == 0)
+		if (table->key_compare_cb(node->key, key) == 0)
 			return node;
 	}
 
@@ -277,7 +277,7 @@
 			break;
 
 		if (check_existing) {
-			if (table->key_compare_func(cnode->node.key, key) == 0)
+			if (table->key_compare_cb(cnode->node.key, key) == 0)
 				return node;
 		}
 
@@ -366,7 +366,7 @@
 
 		/* see if node in primary table was deleted */
 		if (hash == 0)
-			hash = table->hash_func(croot->node.key);
+			hash = table->hash_cb(croot->node.key);
 		node = &table->nodes[hash % table->size];
 		if (node->key == NULL) {
 			memcpy(node, &croot->node, sizeof(*node));
@@ -398,7 +398,7 @@
 	struct hash_node *node;
 	unsigned int hash;
 
-	hash = table->hash_func(key);
+	hash = table->hash_cb(key);
 
 	node = hash_lookup_node(table, key, hash);
 	node->key = NULL;
@@ -414,7 +414,8 @@
 	return table->nodes_count;
 }
 
-void hash_foreach(struct hash_table *table, HashForeachFunc func, void *context)
+void hash_foreach(struct hash_table *table, hash_foreach_callback_t callback,
+		  void *context)
 {
 	struct hash_node *node;
 	struct collision_node *cnode;
@@ -428,7 +429,7 @@
 		node = &table->nodes[i];
 
 		if (node->key != NULL) {
-			func(node->key, node->value, context);
+			callback(node->key, node->value, context);
 			if (foreach_stop) {
 				table->frozen--;
 				return;
@@ -442,8 +443,8 @@
 
 			do {
 				if (cnode->node.key != NULL) {
-					func(cnode->node.key, cnode->node.value,
-					     context);
+					callback(cnode->node.key,
+						 cnode->node.value, context);
 					if (foreach_stop) {
 						table->frozen--;
 						return;
--- a/src/lib/hash.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/hash.h	Sat Jan 11 21:55:56 2003 +0200
@@ -2,21 +2,20 @@
 #define __HASH_H
 
 /* Returns hash code. */
-typedef unsigned int (*HashFunc) (const void *p);
+typedef unsigned int (*hash_callback_t)(const void *p);
 /* Returns 0 if the pointers are equal. */
-typedef int (*HashCompareFunc) (const void *p1, const void *p2);
-typedef void (*HashForeachFunc) (void *key, void *value, void *context);
+typedef int (*hash_cmp_callback_t)(const void *p1, const void *p2);
+typedef void (*hash_foreach_callback_t)(void *key, void *value, void *context);
 
 /* Create a new hash table. If initial_size is 0, the default value is used.
-   If hash_func or key_compare_func is NULL, direct hashing/comparing
-   is used.
+   If hash_cb or key_compare_cb is NULL, direct hashing/comparing is used.
 
    table_pool is used to allocate/free large hash tables, node_pool is used
    for smaller allocations and can also be alloconly pool. The pools must not
    be free'd before hash_destroy() is called. */
-struct hash_table *hash_create(pool_t table_pool, pool_t node_pool,
-			       size_t initial_size, HashFunc hash_func,
-			       HashCompareFunc key_compare_func);
+struct hash_table *
+hash_create(pool_t table_pool, pool_t node_pool, size_t initial_size,
+	    hash_callback_t hash_cb, hash_cmp_callback_t key_compare_cb);
 void hash_destroy(struct hash_table *table);
 
 /* Remove all nodes from hash table. If free_collisions is TRUE, the
@@ -40,7 +39,7 @@
    call hash_*() functions inside your function, but if you add any
    new nodes, they may or may not be called for in this foreach loop. */
 void hash_foreach(struct hash_table *table,
-		  HashForeachFunc func, void *context);
+		  hash_foreach_callback_t callback, void *context);
 /* Stop the active hash_foreach() loop */
 void hash_foreach_stop(void);
 
--- a/src/lib/ioloop-internal.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ioloop-internal.h	Sat Jan 11 21:55:56 2003 +0200
@@ -29,7 +29,7 @@
 	unsigned int destroyed:1;
 	unsigned int invalid:1;
 
-	IOFunc func;
+	io_callback_t callback;
         void *context;
 };
 
@@ -41,7 +41,7 @@
 	int run_now;
         int destroyed;
 
-	TimeoutFunc func;
+	timeout_callback_t callback;
         void *context;
 };
 
--- a/src/lib/ioloop-poll.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ioloop-poll.c	Sat Jan 11 21:55:56 2003 +0200
@@ -188,8 +188,8 @@
 		if (pollfd->revents & POLLNVAL) {
 			if (!io->invalid) {
 				io->invalid = TRUE;
-				i_warning("invalid I/O fd %d, func %p",
-					  io->fd, (void *) io->func);
+				i_warning("invalid I/O fd %d, callback %p",
+					  io->fd, (void *) io->callback);
 			}
 
                         continue;
@@ -209,7 +209,7 @@
 		}
 
 		t_id = t_push();
-		io->func(io->context, io->fd, io);
+		io->callback(io->context, io->fd, io);
 		if (t_pop() != t_id)
 			i_panic("Leaked a t_pop() call!");
 
--- a/src/lib/ioloop-select.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ioloop-select.c	Sat Jan 11 21:55:56 2003 +0200
@@ -126,7 +126,7 @@
                         continue;
 
 		t_id = t_push();
-		io->func(io->context, io->fd, io);
+		io->callback(io->context, io->fd, io);
 		if (t_pop() != t_id)
 			i_panic("Leaked a t_pop() call!");
 
--- a/src/lib/ioloop.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ioloop.c	Sat Jan 11 21:55:56 2003 +0200
@@ -83,26 +83,26 @@
 	}
 }
 
-struct io *io_add(int fd, int condition, IOFunc func, void *data)
+struct io *io_add(int fd, int condition, io_callback_t callback, void *data)
 {
 	return io_add_priority(fd, IO_PRIORITY_DEFAULT,
-			       condition, func, data);
+			       condition, callback, data);
 }
 
 struct io *io_add_priority(int fd, int priority, int condition,
-			   IOFunc func, void *context)
+			   io_callback_t callback, void *context)
 {
 	struct io *io;
 
 	i_assert(fd >= 0);
-	i_assert(func != NULL);
+	i_assert(callback != NULL);
 
 	io = p_new(current_ioloop->pool, struct io, 1);
 	io->fd = fd;
 	io->priority = priority;
         io->condition = condition;
 
-	io->func = func;
+	io->callback = callback;
         io->context = context;
 
 	if (io->fd > current_ioloop->highest_fd)
@@ -184,14 +184,15 @@
 	}
 }
 
-struct timeout *timeout_add(int msecs, TimeoutFunc func, void *context)
+struct timeout *timeout_add(int msecs, timeout_callback_t callback,
+			    void *context)
 {
 	struct timeout *timeout;
 
 	timeout = p_new(current_ioloop->pool, struct timeout, 1);
         timeout->msecs = msecs;
 
-	timeout->func = func;
+	timeout->callback = callback;
 	timeout->context = context;
 
 	timeout_update_next(timeout, current_ioloop->running ?
@@ -280,7 +281,7 @@
                 timeout_update_next(t, &ioloop_timeval);
 
                 t_id = t_push();
-		t->func(t->context, t);
+		t->callback(t->context, t);
 		if (t_pop() != t_id)
                         i_panic("Leaked a t_pop() call!");
 	}
@@ -331,7 +332,7 @@
 
 		if (!io->destroyed) {
 			i_warning("I/O leak: %p (%d)",
-				  (void *) io->func, io->fd);
+				  (void *) io->callback, io->fd);
 			io_remove(io);
 		}
 		io_destroy(ioloop, io);
@@ -341,7 +342,7 @@
 		struct timeout *to = ioloop->timeouts;
 
 		if (!to->destroyed) {
-			i_warning("Timeout leak: %p", (void *) to->func);
+			i_warning("Timeout leak: %p", (void *) to->callback);
 			timeout_remove(to);
 		}
                 timeout_destroy(ioloop, to);
--- a/src/lib/ioloop.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ioloop.h	Sat Jan 11 21:55:56 2003 +0200
@@ -14,8 +14,8 @@
 struct timeout;
 struct ioloop;
 
-typedef void (*IOFunc) (void *context, int fd, struct io *io);
-typedef void (*TimeoutFunc) (void *context, struct timeout *timeout);
+typedef void (*io_callback_t) (void *context, int fd, struct io *io);
+typedef void (*timeout_callback_t) (void *context, struct timeout *timeout);
 
 /* Time when the I/O loop started calling handlers.
    Can be used instead of time(NULL). */
@@ -26,13 +26,14 @@
 /* I/O listeners - you can create different handlers for IO_READ and IO_WRITE,
    but make sure you don't create multiple handlers of same type, it's not
    checked and removing one will stop the other from working as well. */
-struct io *io_add(int fd, int condition, IOFunc func, void *context);
+struct io *io_add(int fd, int condition, io_callback_t callback, void *context);
 struct io *io_add_priority(int fd, int priority, int condition,
-			   IOFunc func, void *context);
+			   io_callback_t callback, void *context);
 void io_remove(struct io *io);
 
 /* Timeout handlers */
-struct timeout *timeout_add(int msecs, TimeoutFunc func, void *context);
+struct timeout *timeout_add(int msecs, timeout_callback_t callback,
+			    void *context);
 void timeout_remove(struct timeout *timeout);
 
 void io_loop_run(struct ioloop *ioloop);
--- a/src/lib/iostream-internal.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/iostream-internal.h	Sat Jan 11 21:55:56 2003 +0200
@@ -11,7 +11,7 @@
 	void (*destroy)(struct _iostream *stream);
 	void (*set_max_buffer_size)(struct _iostream *stream, size_t max_size);
 	void (*set_blocking)(struct _iostream *stream, int timeout_msecs,
-			     void (*timeout_func)(void *), void *context);
+			     void (*timeout_cb)(void *), void *context);
 };
 
 void _io_stream_init(pool_t pool, struct _iostream *stream);
@@ -20,7 +20,7 @@
 void _io_stream_close(struct _iostream *stream);
 void _io_stream_set_max_buffer_size(struct _iostream *stream, size_t max_size);
 void _io_stream_set_blocking(struct _iostream *stream, int timeout_msecs,
-			     void (*timeout_func)(void *), void *context);
+			     void (*timeout_cb)(void *), void *context);
 
 #define GET_TIMEOUT_TIME(fstream) \
         ((fstream)->timeout_msecs == 0 ? 0 : \
--- a/src/lib/iostream.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/iostream.c	Sat Jan 11 21:55:56 2003 +0200
@@ -64,7 +64,7 @@
 }
 
 void _io_stream_set_blocking(struct _iostream *stream, int timeout_msecs,
-			     void (*timeout_func)(void *), void *context)
+			     void (*timeout_cb)(void *), void *context)
 {
-	stream->set_blocking(stream, timeout_msecs, timeout_func, context);
+	stream->set_blocking(stream, timeout_msecs, timeout_cb, context);
 }
--- a/src/lib/istream-data.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/istream-data.c	Sat Jan 11 21:55:56 2003 +0200
@@ -41,7 +41,7 @@
 
 static void _set_blocking(struct _iostream *stream __attr_unused__,
 			  int timeout_msecs __attr_unused__,
-			  void (*timeout_func)(void *) __attr_unused__,
+			  void (*timeout_cb)(void *) __attr_unused__,
 			  void *context __attr_unused__)
 {
 }
--- a/src/lib/istream-file.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/istream-file.c	Sat Jan 11 21:55:56 2003 +0200
@@ -46,7 +46,7 @@
 	uoff_t skip_left;
 
 	int timeout_msecs;
-	void (*timeout_func)(void *);
+	void (*timeout_cb)(void *);
 	void *timeout_context;
 
 	unsigned int file:1;
@@ -80,12 +80,12 @@
 }
 
 static void _set_blocking(struct _iostream *stream, int timeout_msecs,
-			  void (*timeout_func)(void *), void *context)
+			  void (*timeout_cb)(void *), void *context)
 {
 	struct file_istream *fstream = (struct file_istream *) stream;
 
 	fstream->timeout_msecs = timeout_msecs;
-	fstream->timeout_func = timeout_func;
+	fstream->timeout_cb = timeout_cb;
 	fstream->timeout_context = context;
 
 	net_set_nonblock(fstream->istream.fd, timeout_msecs == 0);
@@ -186,8 +186,8 @@
 	do {
 		if (ret == 0 && timeout_time > 0 && time(NULL) > timeout_time) {
 			/* timeouted */
-			if (fstream->timeout_func != NULL)
-				fstream->timeout_func(fstream->timeout_context);
+			if (fstream->timeout_cb != NULL)
+				fstream->timeout_cb(fstream->timeout_context);
 			stream->istream.stream_errno = EAGAIN;
 			return -1;
 		}
--- a/src/lib/istream-mmap.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/istream-mmap.c	Sat Jan 11 21:55:56 2003 +0200
@@ -85,7 +85,7 @@
 
 static void _set_blocking(struct _iostream *stream __attr_unused__,
 			  int timeout_msecs __attr_unused__,
-			  void (*timeout_func)(void *) __attr_unused__,
+			  void (*timeout_cb)(void *) __attr_unused__,
 			  void *context __attr_unused__)
 {
 	/* we never block */
--- a/src/lib/istream.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/istream.c	Sat Jan 11 21:55:56 2003 +0200
@@ -55,10 +55,10 @@
 }
 
 void i_stream_set_blocking(struct istream *stream, int timeout_msecs,
-			   void (*timeout_func)(void *), void *context)
+			   void (*timeout_cb)(void *), void *context)
 {
 	_io_stream_set_blocking(stream->real_stream, timeout_msecs,
-				timeout_func, context);
+				timeout_cb, context);
 }
 
 void i_stream_set_start_offset(struct istream *stream, uoff_t offset)
--- a/src/lib/istream.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/istream.h	Sat Jan 11 21:55:56 2003 +0200
@@ -40,12 +40,12 @@
 /* Stream won't be read past specified offset. Giving 0 as offset
    removes the limit. */
 void i_stream_set_read_limit(struct istream *stream, uoff_t v_offset);
-/* Makes reads blocking until at least one byte is read. timeout_func is
+/* Makes reads blocking until at least one byte is read. timeout_cb is
    called if nothing is read in specified time. Setting timeout_msecs to 0
    makes it non-blocking. This call changes non-blocking state of file
    descriptor. */
 void i_stream_set_blocking(struct istream *stream, int timeout_msecs,
-			   void (*timeout_func)(void *), void *context);
+			   void (*timeout_cb)(void *), void *context);
 
 /* Returns number of bytes read if read was ok, -1 if EOF or error, -2 if the
    input buffer is full. */
--- a/src/lib/ostream-file.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ostream-file.c	Sat Jan 11 21:55:56 2003 +0200
@@ -58,7 +58,7 @@
 	size_t head, tail; /* first unsent/unused byte */
 
 	int timeout_msecs;
-	void (*timeout_func)(void *);
+	void (*timeout_cb)(void *);
 	void *timeout_context;
 
 	unsigned int full:1; /* if head == tail, is buffer empty or full? */
@@ -108,12 +108,12 @@
 }
 
 static void _set_blocking(struct _iostream *stream, int timeout_msecs,
-			  void (*timeout_func)(void *), void *context)
+			  void (*timeout_cb)(void *), void *context)
 {
 	struct file_ostream *fstream = (struct file_ostream *) stream;
 
 	fstream->timeout_msecs = timeout_msecs;
-	fstream->timeout_func = timeout_func;
+	fstream->timeout_cb = timeout_cb;
 	fstream->timeout_context = context;
 
 	net_set_nonblock(fstream->fd, timeout_msecs == 0);
@@ -263,8 +263,8 @@
 			first = FALSE;
 		else if (timeout_time > 0 && time(NULL) > timeout_time) {
 			/* timeouted */
-			if (fstream->timeout_func != NULL)
-				fstream->timeout_func(fstream->timeout_context);
+			if (fstream->timeout_cb != NULL)
+				fstream->timeout_cb(fstream->timeout_context);
 			fstream->ostream.ostream.stream_errno = EAGAIN;
 			return -1;
 		}
@@ -531,8 +531,8 @@
 			first = FALSE;
 		else if (timeout_time > 0 && time(NULL) > timeout_time) {
 			/* timeouted */
-			if (foutstream->timeout_func != NULL) {
-				foutstream->timeout_func(
+			if (foutstream->timeout_cb != NULL) {
+				foutstream->timeout_cb(
 					foutstream->timeout_context);
 			}
 			outstream->ostream.stream_errno = EAGAIN;
@@ -617,8 +617,8 @@
 
 		if (timeout_time > 0 && time(NULL) > timeout_time) {
 			/* timeouted */
-			if (foutstream->timeout_func != NULL) {
-				foutstream->timeout_func(
+			if (foutstream->timeout_cb != NULL) {
+				foutstream->timeout_cb(
 					foutstream->timeout_context);
 			}
 			outstream->ostream.stream_errno = EAGAIN;
--- a/src/lib/ostream.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ostream.c	Sat Jan 11 21:55:56 2003 +0200
@@ -49,10 +49,10 @@
 }
 
 void o_stream_set_blocking(struct ostream *stream, int timeout_msecs,
-			   void (*timeout_func)(void *), void *context)
+			   void (*timeout_cb)(void *), void *context)
 {
 	_io_stream_set_blocking(stream->real_stream, timeout_msecs,
-				timeout_func, context);
+				timeout_cb, context);
 }
 
 void o_stream_cork(struct ostream *stream)
--- a/src/lib/ostream.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/lib/ostream.h	Sat Jan 11 21:55:56 2003 +0200
@@ -26,10 +26,10 @@
 void o_stream_set_max_buffer_size(struct ostream *stream, size_t max_size);
 /* Stream is made to be flushed out whenever it gets full (assumes max_size
    is already set), ie. writes will never be partial. Also makes any blocking
-   writes to fail after specified timeout, calling timeout_func if it's
+   writes to fail after specified timeout, calling timeout_cb if it's
    set. This call changes non-blocking state of file descriptor. */
 void o_stream_set_blocking(struct ostream *stream, int timeout_msecs,
-			   void (*timeout_func)(void *), void *context);
+			   void (*timeout_cb)(void *), void *context);
 
 /* Delays sending as far as possible, writing only full buffers. Also sets
    TCP_CORK on if supported. o_stream_flush() removes the cork. */
--- a/src/login/auth-connection.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/login/auth-connection.c	Sat Jan 11 21:55:56 2003 +0200
@@ -282,7 +282,7 @@
 	i_stream_skip(conn->input, conn->in_reply.data_size);
 }
 
-int auth_init_request(enum auth_mech mech, AuthCallback callback,
+int auth_init_request(enum auth_mech mech, auth_callback_t callback,
 		      void *context, const char **error)
 {
 	struct auth_connection *conn;
--- a/src/login/auth-connection.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/login/auth-connection.h	Sat Jan 11 21:55:56 2003 +0200
@@ -5,11 +5,13 @@
 
 /* If result == AUTH_RESULT_INTERNAL_FAILURE, request may be NULL and
    reply_data_size contains the error message. */
-typedef void (*AuthCallback)(struct auth_request *request,
-			     unsigned int auth_process, enum auth_result result,
-			     const unsigned char *reply_data,
-			     size_t reply_data_size, const char *virtual_user,
-			     void *context);
+typedef void (*auth_callback_t)(struct auth_request *request,
+				unsigned int auth_process,
+				enum auth_result result,
+				const unsigned char *reply_data,
+				size_t reply_data_size,
+				const char *virtual_user,
+				void *context);
 
 struct auth_request {
         enum auth_mech mech;
@@ -18,7 +20,7 @@
 	unsigned int id;
 	unsigned char cookie[AUTH_COOKIE_SIZE];
 
-	AuthCallback callback;
+	auth_callback_t callback;
 	void *context;
 
 	unsigned int init_sent:1;
@@ -26,7 +28,7 @@
 
 extern enum auth_mech available_auth_mechs;
 
-int auth_init_request(enum auth_mech mech, AuthCallback callback,
+int auth_init_request(enum auth_mech mech, auth_callback_t callback,
 		      void *context, const char **error);
 
 void auth_continue_request(struct auth_request *request,
--- a/src/login/common.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/login/common.h	Sat Jan 11 21:55:56 2003 +0200
@@ -4,9 +4,6 @@
 #include "lib.h"
 #include "../auth/auth-interface.h"
 
-typedef struct _Client Client;
-typedef struct _AuthRequest AuthRequest;
-
 extern int disable_plaintext_auth, process_per_connection, verbose_proctitle;
 extern unsigned int max_logging_users;
 extern unsigned int login_process_uid;
--- a/src/login/master.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/login/master.c	Sat Jan 11 21:55:56 2003 +0200
@@ -13,7 +13,7 @@
 	struct waiting_request *next;
 
 	unsigned int id;
-	MasterCallback callback;
+	master_callback_t callback;
 	void *context;
 };
 
@@ -23,7 +23,7 @@
 static unsigned int master_pos;
 static char master_buf[sizeof(struct master_reply)];
 
-static void push_request(unsigned int id, MasterCallback callback,
+static void push_request(unsigned int id, master_callback_t callback,
 			 void *context)
 {
 	struct waiting_request *req;
@@ -66,7 +66,7 @@
 			 const char *login_tag,
 			 unsigned char cookie[AUTH_COOKIE_SIZE],
 			 struct ip_addr *ip,
-			 MasterCallback callback, void *context)
+			 master_callback_t callback, void *context)
 {
 	struct master_request req;
 
--- a/src/login/master.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/login/master.h	Sat Jan 11 21:55:56 2003 +0200
@@ -3,14 +3,15 @@
 
 #include "../master/master-interface.h"
 
-typedef void (*MasterCallback)(enum master_reply_result result, void *context);
+typedef void (*master_callback_t)(enum master_reply_result result,
+				  void *context);
 
 /* Request IMAP process for given cookie. */
 void master_request_imap(int fd, unsigned int auth_process,
 			 const char *login_tag,
 			 unsigned char cookie[AUTH_COOKIE_SIZE],
 			 struct ip_addr *ip,
-			 MasterCallback callback, void *context);
+			 master_callback_t callback, void *context);
 
 /* Notify master that we're not listening for new connections anymore. */
 void master_notify_finished(void);
--- a/src/master/auth-process.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/master/auth-process.c	Sat Jan 11 21:55:56 2003 +0200
@@ -37,7 +37,7 @@
         struct waiting_request *next;
 	unsigned int id;
 
-	AuthCallback callback;
+	auth_callback_t callback;
 	void *context;
 };
 
@@ -47,7 +47,7 @@
 static void auth_process_destroy(struct auth_process *p);
 
 static void push_request(struct auth_process *process, unsigned int id,
-			 AuthCallback callback, void *context)
+			 auth_callback_t callback, void *context)
 {
 	struct waiting_request *req;
 
@@ -310,7 +310,7 @@
 void auth_process_request(unsigned int login_pid,
 			  struct auth_process *process, unsigned int id,
 			  unsigned char cookie[AUTH_COOKIE_SIZE],
-			  AuthCallback callback, void *context)
+			  auth_callback_t callback, void *context)
 {
 	struct auth_cookie_request_data req;
 
--- a/src/master/auth-process.h	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/master/auth-process.h	Sat Jan 11 21:55:56 2003 +0200
@@ -2,8 +2,8 @@
 #define __AUTH_PROCESS_H
 
 /* cookie_reply is NULL if some error occured */
-typedef void (*AuthCallback)(struct auth_cookie_reply_data *cookie_reply,
-			     void *context);
+typedef void (*auth_callback_t)(struct auth_cookie_reply_data *cookie_reply,
+				void *context);
 
 /* Find process for given id */
 struct auth_process *auth_process_find(unsigned int id);
@@ -12,7 +12,7 @@
 void auth_process_request(unsigned int login_pid,
 			  struct auth_process *process, unsigned int id,
 			  unsigned char cookie[AUTH_COOKIE_SIZE],
-			  AuthCallback callback, void *context);
+			  auth_callback_t callback, void *context);
 
 /* Close any fds used by auth processes */
 void auth_processes_destroy_all(void);
--- a/src/master/ssl-init.c	Sat Jan 11 21:01:56 2003 +0200
+++ b/src/master/ssl-init.c	Sat Jan 11 21:55:56 2003 +0200
@@ -94,7 +94,8 @@
 	generating = FALSE;
 
 	/* check every 10 mins */
-	to = timeout_add(600*1000, (TimeoutFunc) check_parameters_file, NULL);
+	to = timeout_add(600*1000,
+			 (timeout_callback_t)check_parameters_file, NULL);
 
 	check_parameters_file();
 }