[dovecot-cvs] dovecot/src/lib array.h, 1.13, 1.14 buffer.c, 1.28, 1.29 buffer.h, 1.16, 1.17 compat.h, 1.31, 1.32 data-stack.c, 1.23, 1.24 data-stack.h, 1.5, 1.6 fd-close-on-exec.c, 1.8, 1.9 fd-close-on-exec.h, 1.1, 1.2 fd-set-nonblock.c, 1.1, 1.2 fd-set-nonblock.h, 1.1, 1.2 file-dotlock.c, 1.29, 1.30 file-dotlock.h, 1.10, 1.11 hash.c, 1.22, 1.23 hash.h, 1.12, 1.13 hex-binary.c, 1.8, 1.9 ioloop-epoll.c, 1.9, 1.10 ioloop-notify-dn.c, 1.11, 1.12 ioloop-notify-inotify.c, 1.5, 1.6 ioloop-poll.c, 1.30, 1.31 ioloop.c, 1.29, 1.30 ioloop.h, 1.14, 1.15 istream-data.c, 1.14, 1.15 istream-file.c, 1.25, 1.26 istream-internal.h, 1.9, 1.10 istream-limit.c, 1.16, 1.17 istream-mmap.c, 1.18, 1.19 istream-seekable.c, 1.6, 1.7 istream.c, 1.31, 1.32 istream.h, 1.21, 1.22 lib-signals.c, 1.9, 1.10 lib-signals.h, 1.4, 1.5 mempool-alloconly.c, 1.33, 1.34 module-dir.c, 1.10, 1.11 module-dir.h, 1.2, 1.3 network.c, 1.35, 1.36 network.h, 1.13, 1.14 ostream-crlf.c, 1.11, 1.12 ostream-file.c, 1.57, 1.58 ostream-internal.h, 1.6, 1.7 ostream.c, 1.13, 1.14 ostream.h, 1.12, 1.13 printf-upper-bound.c, 1.6, 1.7 restrict-access.c, 1.20, 1.21 restrict-access.h, 1.6, 1.7 restrict-process-size.h, 1.2, 1.3 seq-range-array.c, 1.1, 1.2 seq-range-array.h, 1.1, 1.2 strfuncs.c, 1.53, 1.54 strfuncs.h, 1.26, 1.27 unlink-directory.c, 1.10, 1.11 unlink-directory.h, 1.2, 1.3 var-expand.c, 1.8, 1.9

cras at dovecot.org cras at dovecot.org
Fri Jan 13 22:26:14 EET 2006


Update of /var/lib/cvs/dovecot/src/lib
In directory talvi:/tmp/cvs-serv27808/src/lib

Modified Files:
	array.h buffer.c buffer.h compat.h data-stack.c data-stack.h 
	fd-close-on-exec.c fd-close-on-exec.h fd-set-nonblock.c 
	fd-set-nonblock.h file-dotlock.c file-dotlock.h hash.c hash.h 
	hex-binary.c ioloop-epoll.c ioloop-notify-dn.c 
	ioloop-notify-inotify.c ioloop-poll.c ioloop.c ioloop.h 
	istream-data.c istream-file.c istream-internal.h 
	istream-limit.c istream-mmap.c istream-seekable.c istream.c 
	istream.h lib-signals.c lib-signals.h mempool-alloconly.c 
	module-dir.c module-dir.h network.c network.h ostream-crlf.c 
	ostream-file.c ostream-internal.h ostream.c ostream.h 
	printf-upper-bound.c restrict-access.c restrict-access.h 
	restrict-process-size.h seq-range-array.c seq-range-array.h 
	strfuncs.c strfuncs.h unlink-directory.c unlink-directory.h 
	var-expand.c 
Log Message:
Added "bool" type and changed all ints that were used as booleans to bool.



Index: array.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/array.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- array.h	4 Jul 2005 11:32:19 -0000	1.13
+++ array.h	13 Jan 2006 20:26:01 -0000	1.14
@@ -81,7 +81,7 @@
 	array->buffer = NULL;
 }
 
-static inline int
+static inline bool
 array_is_created(const array_t *array)
 {
 	return array->buffer != NULL;
@@ -262,7 +262,7 @@
 	return array->buffer->used / array->element_size;
 }
 
-static inline int
+static inline bool
 array_cmp(const array_t *array1, const array_t *array2)
 {
 	if (!array_is_created(array1) || array1->buffer->used == 0)

Index: buffer.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/buffer.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- buffer.c	30 Jun 2005 20:30:06 -0000	1.28
+++ buffer.c	13 Jan 2006 20:26:01 -0000	1.29
@@ -290,7 +290,7 @@
 	return buf->alloc;
 }
 
-int buffer_cmp(const buffer_t *buf1, const buffer_t *buf2)
+bool buffer_cmp(const buffer_t *buf1, const buffer_t *buf2)
 {
 	if (buf1->used != buf2->used)
 		return FALSE;

Index: buffer.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/buffer.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- buffer.h	30 Jun 2005 20:30:06 -0000	1.16
+++ buffer.h	13 Jan 2006 20:26:01 -0000	1.17
@@ -85,7 +85,7 @@
 size_t buffer_get_size(const buffer_t *buf);
 
 /* Returns TRUE if buffer contents are identical. */
-int buffer_cmp(const buffer_t *buf1, const buffer_t *buf2);
+bool buffer_cmp(const buffer_t *buf1, const buffer_t *buf2);
 
 /* Returns pointer to beginning of buffer data. Current used size of buffer is
    stored in used_size if it's non-NULL. */

Index: compat.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/compat.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- compat.h	20 Oct 2005 09:27:47 -0000	1.31
+++ compat.h	13 Jan 2006 20:26:01 -0000	1.32
@@ -11,6 +11,14 @@
 #  define LLONG_MAX 9223372036854775807LL
 #endif
 
+#ifndef __cplusplus
+#ifdef HAVE__BOOL
+typedef _Bool bool;
+#else
+typedef int bool;
+#endif
+#endif
+
 #if defined (UOFF_T_INT)
 typedef unsigned int uoff_t;
 #elif defined (UOFF_T_LONG)

Index: data-stack.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/data-stack.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- data-stack.c	27 Mar 2005 13:29:04 -0000	1.23
+++ data-stack.c	13 Jan 2006 20:26:01 -0000	1.24
@@ -202,12 +202,12 @@
 	return block;
 }
 
-static void *t_malloc_real(size_t size, int permanent)
+static void *t_malloc_real(size_t size, bool permanent)
 {
 	struct stack_block *block;
         void *ret;
 #ifdef DEBUG
-	int warn = FALSE;
+	bool warn = FALSE;
 #endif
 
 	if (size == 0 || size > SSIZE_T_MAX)
@@ -284,7 +284,7 @@
         return mem;
 }
 
-int t_try_realloc(void *mem, size_t size)
+bool t_try_realloc(void *mem, size_t size)
 {
 	size_t last_alloc_size;
 
@@ -489,7 +489,7 @@
 	return mem;
 }
 
-int t_try_realloc(void *mem __attr_unused__, size_t size __attr_unused__)
+bool t_try_realloc(void *mem __attr_unused__, size_t size __attr_unused__)
 {
 	return FALSE;
 }

Index: data-stack.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/data-stack.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- data-stack.h	27 Mar 2005 13:29:04 -0000	1.5
+++ data-stack.h	13 Jan 2006 20:26:01 -0000	1.6
@@ -58,7 +58,7 @@
 
 /* Try growing allocated memory. Returns TRUE if successful. Works only
    for last allocated memory in current stack frame. */
-int t_try_realloc(void *mem, size_t size);
+bool t_try_realloc(void *mem, size_t size);
 
 /* Returns the number of bytes available in data stack without allocating
    more memory. */

Index: fd-close-on-exec.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/fd-close-on-exec.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- fd-close-on-exec.c	19 Jun 2004 21:24:55 -0000	1.8
+++ fd-close-on-exec.c	13 Jan 2006 20:26:01 -0000	1.9
@@ -9,7 +9,7 @@
 #include <sys/stat.h>
 #include <sys/un.h>
 
-void fd_close_on_exec(int fd, int set)
+void fd_close_on_exec(int fd, bool set)
 {
 	int flags;
 

Index: fd-close-on-exec.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/fd-close-on-exec.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fd-close-on-exec.h	1 Dec 2002 15:39:20 -0000	1.1
+++ fd-close-on-exec.h	13 Jan 2006 20:26:01 -0000	1.2
@@ -2,7 +2,7 @@
 #define __FD_CLOSE_ON_EXEC_H
 
 /* Change close-on-exec flag of fd. */
-void fd_close_on_exec(int fd, int set);
+void fd_close_on_exec(int fd, bool set);
 
 /* Verify that fds in given range don't exist. */
 void fd_debug_verify_leaks(int first_fd, int last_fd);

Index: fd-set-nonblock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/fd-set-nonblock.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fd-set-nonblock.c	25 Sep 2005 11:12:24 -0000	1.1
+++ fd-set-nonblock.c	13 Jan 2006 20:26:01 -0000	1.2
@@ -5,7 +5,7 @@
 
 #include <fcntl.h>
 
-int fd_set_nonblock(int fd, int nonblock)
+int fd_set_nonblock(int fd, bool nonblock)
 {
 	int flags;
 

Index: fd-set-nonblock.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/fd-set-nonblock.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fd-set-nonblock.h	25 Sep 2005 11:12:24 -0000	1.1
+++ fd-set-nonblock.h	13 Jan 2006 20:26:01 -0000	1.2
@@ -2,6 +2,6 @@
 #define __FD_SET_NONBLOCK_H
 
 /* Set file descriptor to blocking/nonblocking state */
-int fd_set_nonblock(int fd, int nonblock);
+int fd_set_nonblock(int fd, bool nonblock);
 
 #endif

Index: file-dotlock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- file-dotlock.c	25 Nov 2005 15:15:11 -0000	1.29
+++ file-dotlock.c	13 Jan 2006 20:26:01 -0000	1.30
@@ -46,7 +46,7 @@
 	time_t last_ctime, last_mtime;
 	time_t last_change;
 
-	int have_pid;
+	bool have_pid;
 	time_t last_pid_check;
 };
 
@@ -229,7 +229,7 @@
 }
 
 static int
-create_temp_file(const char *prefix, const char **path_r, int write_pid)
+create_temp_file(const char *prefix, const char **path_r, bool write_pid)
 {
 	string_t *path;
 	size_t len;
@@ -274,7 +274,7 @@
 	return fd;
 }
 
-static int try_create_lock_hardlink(struct lock_info *lock_info, int write_pid)
+static int try_create_lock_hardlink(struct lock_info *lock_info, bool write_pid)
 {
 	const char *temp_prefix = lock_info->set->temp_prefix;
 	const char *str, *p;
@@ -320,7 +320,7 @@
 	return 1;
 }
 
-static int try_create_lock_excl(struct lock_info *lock_info, int write_pid)
+static int try_create_lock_excl(struct lock_info *lock_info, bool write_pid)
 {
 	int fd;
 
@@ -345,7 +345,7 @@
 }
 
 static int dotlock_create(const char *path, struct dotlock *dotlock,
-			  enum dotlock_create_flags flags, int write_pid)
+			  enum dotlock_create_flags flags, bool write_pid)
 {
 	const struct dotlock_settings *set = &dotlock->settings;
 	const char *lock_path;
@@ -354,7 +354,8 @@
 	unsigned int stale_notify_threshold;
 	unsigned int change_secs, wait_left;
 	time_t now, max_wait_time, last_notify;
-	int do_wait, ret;
+	int ret;
+	bool do_wait;
 
 	now = time(NULL);
 

Index: file-dotlock.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/file-dotlock.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- file-dotlock.h	25 Nov 2005 15:15:11 -0000	1.10
+++ file-dotlock.h	13 Jan 2006 20:26:01 -0000	1.11
@@ -26,7 +26,7 @@
 	/* Callback is called once in a while. stale is set to TRUE if stale
 	   lock is detected and will be overridden in secs_left. If callback
 	   returns FALSE then, the lock will not be overridden. */
-	int (*callback)(unsigned int secs_left, int stale, void *context);
+	bool (*callback)(unsigned int secs_left, bool stale, void *context);
 	void *context;
 
 	/* Rely on O_EXCL locking to work instead of using hardlinks.

Index: hash.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/hash.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- hash.c	25 Sep 2005 10:35:17 -0000	1.22
+++ hash.c	13 Jan 2006 20:26:01 -0000	1.23
@@ -36,7 +36,7 @@
 	size_t pos;
 };
 
-static int hash_resize(struct hash_table *table, int grow);
+static bool hash_resize(struct hash_table *table, bool grow);
 
 static int direct_cmp(const void *p1, const void *p2)
 {
@@ -114,7 +114,7 @@
 	p_free(table->table_pool, table);
 }
 
-void hash_clear(struct hash_table *table, int free_nodes)
+void hash_clear(struct hash_table *table, bool free_nodes)
 {
 	if (!table->node_pool->alloconly_pool)
 		hash_destroy_nodes(table);
@@ -158,8 +158,8 @@
 	return node != NULL ? node->value : NULL;
 }
 
-int hash_lookup_full(const struct hash_table *table, const void *lookup_key,
-		     void **orig_key, void **value)
+bool hash_lookup_full(const struct hash_table *table, const void *lookup_key,
+		      void **orig_key, void **value)
 {
 	struct hash_node *node;
 
@@ -177,7 +177,7 @@
 
 static struct hash_node *
 hash_insert_node(struct hash_table *table, void *key, void *value,
-		 int check_existing)
+		 bool check_existing)
 {
 	struct hash_node *node, *prev;
 	unsigned int hash;
@@ -355,8 +355,8 @@
 	return node;
 }
 
-int hash_iterate(struct hash_iterate_context *ctx,
-		 void **key_r, void **value_r)
+bool hash_iterate(struct hash_iterate_context *ctx,
+		  void **key_r, void **value_r)
 {
 	struct hash_node *node;
 
@@ -398,7 +398,7 @@
 	}
 }
 
-static int hash_resize(struct hash_table *table, int grow)
+static bool hash_resize(struct hash_table *table, bool grow)
 {
 	struct hash_node *old_nodes, *node, *next;
 	size_t next_size, old_size, i;

Index: hash.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/hash.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- hash.h	25 Sep 2005 10:35:17 -0000	1.12
+++ hash.h	13 Jan 2006 20:26:01 -0000	1.13
@@ -20,11 +20,11 @@
 /* Remove all nodes from hash table. If free_collisions is TRUE, the
    memory allocated from node_pool is freed, or discarded with
    alloconly pools. */
-void hash_clear(struct hash_table *table, int free_collisions);
+void hash_clear(struct hash_table *table, bool free_collisions);
 
 void *hash_lookup(const struct hash_table *table, const void *key);
-int hash_lookup_full(const struct hash_table *table, const void *lookup_key,
-		     void **orig_key, void **value);
+bool hash_lookup_full(const struct hash_table *table, const void *lookup_key,
+		      void **orig_key, void **value);
 
 /* Insert/update node in hash table. The difference is that hash_insert()
    replaces the key in table to given one, while hash_update() doesnt. */
@@ -38,8 +38,8 @@
    functions while iterating, but if you add any new nodes, they may or may
    not be called for in this iteration. */
 struct hash_iterate_context *hash_iterate_init(struct hash_table *table);
-int hash_iterate(struct hash_iterate_context *ctx,
-		 void **key_r, void **value_r);
+bool hash_iterate(struct hash_iterate_context *ctx,
+		  void **key_r, void **value_r);
 void hash_iterate_deinit(struct hash_iterate_context *ctx);
 
 /* Hash table isn't resized, and removed nodes aren't removed from

Index: hex-binary.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/hex-binary.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- hex-binary.c	8 Oct 2004 17:51:48 -0000	1.8
+++ hex-binary.c	13 Jan 2006 20:26:01 -0000	1.9
@@ -5,7 +5,7 @@
 #include "hex-binary.h"
 
 static const char *
-binary_to_hex_case(const unsigned char *data, size_t size, int ucase)
+binary_to_hex_case(const unsigned char *data, size_t size, bool ucase)
 {
 	char *buf, *p, base_char;
 	size_t i;

Index: ioloop-epoll.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-epoll.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ioloop-epoll.c	27 Oct 2005 15:22:28 -0000	1.9
+++ ioloop-epoll.c	13 Jan 2006 20:26:01 -0000	1.10
@@ -103,7 +103,7 @@
 	return events;
 }
 
-static int iolist_add(struct io_list *list, struct io *io)
+static bool iolist_add(struct io_list *list, struct io *io)
 {
 	int i, idx;
 
@@ -129,9 +129,10 @@
 	return TRUE;
 }
 
-static int iolist_del(struct io_list *list, struct io *io)
+static bool iolist_del(struct io_list *list, struct io *io)
 {
-	int i, last = TRUE;
+	bool last = TRUE;
+	int i;
 
 	for (i = 0; i < EPOLL_IOS_PER_FD; i++) {
 		if (list->ios[i] != NULL) {
@@ -149,7 +150,8 @@
 	struct ioloop_handler_context *ctx = ioloop->handler_context;
 	struct io_list **list;
 	struct epoll_event event;
-	int ret, first, op, fd = io->fd;
+	int ret, op, fd = io->fd;
+	bool first;
 
 	list = array_idx_modifyable(&ctx->fd_index, fd);
 	if (*list == NULL)
@@ -182,7 +184,8 @@
 	struct ioloop_handler_context *ctx = ioloop->handler_context;
 	struct io_list **list;
 	struct epoll_event event;
-	int ret, last, op;
+	int ret, op;
+	bool last;
 
 	list = array_idx_modifyable(&ctx->fd_index, io->fd);
 	last = iolist_del(*list, io);
@@ -209,7 +212,8 @@
 	struct io *io;
 	struct timeval tv;
 	unsigned int t_id;
-	int msecs, ret, i, call;
+	int msecs, ret, i;
+	bool call;
 
         /* get the time left for next timeout task */
 	msecs = io_loop_get_wait_time(ioloop->timeouts, &tv, NULL);

Index: ioloop-notify-dn.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-notify-dn.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ioloop-notify-dn.c	11 Jan 2006 21:47:08 -0000	1.11
+++ ioloop-notify-dn.c	13 Jan 2006 20:26:01 -0000	1.12
@@ -17,7 +17,7 @@
 
 struct ioloop_notify_handler_context {
 	struct io *event_io;
-	int disabled;
+	bool disabled;
 
 	int event_pipe[2];
 };

Index: ioloop-notify-inotify.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-notify-inotify.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ioloop-notify-inotify.c	14 Aug 2005 21:54:20 -0000	1.5
+++ ioloop-notify-inotify.c	13 Jan 2006 20:26:01 -0000	1.6
@@ -26,10 +26,10 @@
 	struct io *event_io;
 
 	buffer_t *buf;
-	int disabled;
+	bool disabled;
 };
 
-static int event_read_next(struct ioloop *ioloop)
+static bool event_read_next(struct ioloop *ioloop)
 {
 	struct ioloop_notify_handler_context *ctx =
 		ioloop->notify_handler_context;

Index: ioloop-poll.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop-poll.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- ioloop-poll.c	13 Jan 2006 15:10:24 -0000	1.30
+++ ioloop-poll.c	13 Jan 2006 20:26:01 -0000	1.31
@@ -135,7 +135,8 @@
         struct timeval tv;
 	struct io *io;
 	unsigned int t_id;
-	int msecs, ret, call;
+	int msecs, ret;
+	bool call;
 
         /* get the time left for next timeout task */
 	msecs = io_loop_get_wait_time(ioloop->timeouts, &tv, NULL);

Index: ioloop.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- ioloop.c	31 Dec 2005 16:59:11 -0000	1.29
+++ ioloop.c	13 Jan 2006 20:26:01 -0000	1.30
@@ -240,7 +240,7 @@
         ioloop->running = TRUE;
 }
 
-int io_loop_is_running(struct ioloop *ioloop)
+bool io_loop_is_running(struct ioloop *ioloop)
 {
         return ioloop->running;
 }

Index: ioloop.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ioloop.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ioloop.h	31 Dec 2005 16:59:11 -0000	1.14
+++ ioloop.h	13 Jan 2006 20:26:01 -0000	1.15
@@ -47,7 +47,7 @@
 void io_loop_run(struct ioloop *ioloop);
 void io_loop_stop(struct ioloop *ioloop); /* safe to run in signal handler */
 
-int io_loop_is_running(struct ioloop *ioloop);
+bool io_loop_is_running(struct ioloop *ioloop);
 
 /* call these if you wish to run the iteration only once */
 void io_loop_set_running(struct ioloop *ioloop);

Index: istream-data.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-data.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- istream-data.c	9 Oct 2005 09:55:29 -0000	1.14
+++ istream-data.c	13 Jan 2006 20:26:01 -0000	1.15
@@ -23,14 +23,14 @@
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset,
-		  int mark __attr_unused__)
+		  bool mark __attr_unused__)
 {
 	stream->skip = v_offset;
 	stream->istream.v_offset = v_offset;
 }
 
 static const struct stat *
-_stat(struct _istream *stream, int exact __attr_unused__)
+_stat(struct _istream *stream, bool exact __attr_unused__)
 {
 	stream->statbuf.st_size = stream->pos;
 	return &stream->statbuf;

Index: istream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-file.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- istream-file.c	9 Oct 2005 09:55:29 -0000	1.25
+++ istream-file.c	13 Jan 2006 20:26:01 -0000	1.26
@@ -160,7 +160,7 @@
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset,
-		  int mark __attr_unused__)
+		  bool mark __attr_unused__)
 {
 	struct file_istream *fstream = (struct file_istream *) stream;
 
@@ -207,7 +207,7 @@
 }
 
 static const struct stat *
-_stat(struct _istream *stream, int exact __attr_unused__)
+_stat(struct _istream *stream, bool exact __attr_unused__)
 {
 	struct file_istream *fstream = (struct file_istream *) stream;
 
@@ -220,7 +220,7 @@
 }
 
 struct istream *i_stream_create_file(int fd, pool_t pool,
-				     size_t max_buffer_size, int autoclose_fd)
+				     size_t max_buffer_size, bool autoclose_fd)
 {
 	struct file_istream *fstream;
 	struct stat st;

Index: istream-internal.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-internal.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- istream-internal.h	9 Oct 2005 09:55:29 -0000	1.9
+++ istream-internal.h	13 Jan 2006 20:26:01 -0000	1.10
@@ -12,9 +12,9 @@
 
 /* methods: */
 	ssize_t (*read)(struct _istream *stream);
-	void (*seek)(struct _istream *stream, uoff_t v_offset, int mark);
+	void (*seek)(struct _istream *stream, uoff_t v_offset, bool mark);
 	void (*sync)(struct _istream *stream);
-	const struct stat *(*stat)(struct _istream *stream, int exact);
+	const struct stat *(*stat)(struct _istream *stream, bool exact);
 
 /* data: */
 	struct istream istream;

Index: istream-limit.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-limit.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- istream-limit.c	9 Oct 2005 09:55:29 -0000	1.16
+++ istream-limit.c	13 Jan 2006 20:26:01 -0000	1.17
@@ -81,7 +81,7 @@
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset,
-		  int mark __attr_unused__)
+		  bool mark __attr_unused__)
 {
 	struct limit_istream *lstream = (struct limit_istream *) stream;
 
@@ -92,7 +92,7 @@
 	stream->skip = stream->pos = 0;
 }
 
-static const struct stat *_stat(struct _istream *stream, int exact)
+static const struct stat *_stat(struct _istream *stream, bool exact)
 {
 	struct limit_istream *lstream = (struct limit_istream *) stream;
 	const struct stat *st;

Index: istream-mmap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-mmap.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- istream-mmap.c	9 Oct 2005 09:55:29 -0000	1.18
+++ istream-mmap.c	13 Jan 2006 20:26:01 -0000	1.19
@@ -142,7 +142,7 @@
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset,
-		  int mark __attr_unused__)
+		  bool mark __attr_unused__)
 {
 	struct mmap_istream *mstream = (struct mmap_istream *) stream;
 
@@ -186,7 +186,7 @@
 }
 
 static const struct stat *
-_stat(struct _istream *stream, int exact __attr_unused__)
+_stat(struct _istream *stream, bool exact __attr_unused__)
 {
 	struct mmap_istream *mstream = (struct mmap_istream *) stream;
 
@@ -198,7 +198,7 @@
 
 struct istream *i_stream_create_mmap(int fd, pool_t pool, size_t block_size,
 				     uoff_t start_offset, uoff_t v_size,
-				     int autoclose_fd)
+				     bool autoclose_fd)
 {
 	struct mmap_istream *mstream;
         struct istream *istream;

Index: istream-seekable.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream-seekable.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- istream-seekable.c	9 Oct 2005 09:55:29 -0000	1.6
+++ istream-seekable.c	13 Jan 2006 20:26:01 -0000	1.7
@@ -163,7 +163,7 @@
 	return ret;
 }
 
-static int read_from_buffer(struct seekable_istream *sstream, ssize_t *ret)
+static bool read_from_buffer(struct seekable_istream *sstream, ssize_t *ret)
 {
 	struct _istream *stream = &sstream->istream;
 	const unsigned char *data;
@@ -256,14 +256,14 @@
 }
 
 static void _seek(struct _istream *stream, uoff_t v_offset,
-		  int mark __attr_unused__)
+		  bool mark __attr_unused__)
 {
 	stream->istream.stream_errno = 0;
 	stream->istream.v_offset = v_offset;
 	stream->skip = stream->pos = 0;
 }
 
-static const struct stat *_stat(struct _istream *stream, int exact)
+static const struct stat *_stat(struct _istream *stream, bool exact)
 {
 	struct seekable_istream *sstream = (struct seekable_istream *)stream;
 	uoff_t old_offset;

Index: istream.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- istream.c	9 Oct 2005 09:55:29 -0000	1.31
+++ istream.c	13 Jan 2006 20:26:01 -0000	1.32
@@ -110,7 +110,7 @@
 		_stream->sync(_stream);
 }
 
-const struct stat *i_stream_stat(struct istream *stream, int exact)
+const struct stat *i_stream_stat(struct istream *stream, bool exact)
 {
 	struct _istream *_stream = stream->real_stream;
 
@@ -120,7 +120,7 @@
 	return _stream->stat(_stream, exact);
 }
 
-int i_stream_have_bytes_left(struct istream *stream)
+bool i_stream_have_bytes_left(struct istream *stream)
 {
 	struct _istream *_stream = stream->real_stream;
 
@@ -232,7 +232,7 @@
 		       size_t *size, size_t threshold)
 {
 	ssize_t ret = 0;
-	int read_more = FALSE;
+	bool read_more = FALSE;
 
 	do {
 		*data = i_stream_get_data(stream, size);

Index: istream.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/istream.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- istream.h	4 Nov 2005 11:34:45 -0000	1.21
+++ istream.h	13 Jan 2006 20:26:01 -0000	1.22
@@ -15,10 +15,10 @@
 };
 
 struct istream *i_stream_create_file(int fd, pool_t pool,
-				     size_t max_buffer_size, int autoclose_fd);
+				     size_t max_buffer_size, bool autoclose_fd);
 struct istream *i_stream_create_mmap(int fd, pool_t pool, size_t block_size,
 				     uoff_t start_offset, uoff_t v_size,
-				     int autoclose_fd);
+				     bool autoclose_fd);
 struct istream *i_stream_create_from_data(pool_t pool, const void *data,
 					  size_t size);
 struct istream *i_stream_create_limit(pool_t pool, struct istream *input,
@@ -64,9 +64,9 @@
    If exact=FALSE, the stream may not return exactly correct values, but the
    returned values can be compared to see if anything had changed (eg. in
    compressed stream st_size could be compressed size) */
-const struct stat *i_stream_stat(struct istream *stream, int exact);
+const struct stat *i_stream_stat(struct istream *stream, bool exact);
 /* Returns TRUE if there are any bytes left to be read or in buffer. */
-int i_stream_have_bytes_left(struct istream *stream);
+bool i_stream_have_bytes_left(struct istream *stream);
 
 /* Gets the next line from stream and returns it, or NULL if more data is
    needed to make a full line. Note that if the stream ends with LF not being

Index: lib-signals.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/lib-signals.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- lib-signals.c	25 Sep 2005 11:07:37 -0000	1.9
+++ lib-signals.c	13 Jan 2006 20:26:01 -0000	1.10
@@ -14,7 +14,7 @@
 	signal_handler_t *handler;
 	void *context;
 
-	int delayed;
+	bool delayed;
         struct signal_handler *next;
 };
 
@@ -29,7 +29,7 @@
 static void sig_handler(int signo)
 {
 	struct signal_handler *h;
-	int delayed_sent = FALSE;
+	bool delayed_sent = FALSE;
 
 	if (signo < 0 || signo > MAX_SIGNAL_VALUE)
 		return;
@@ -93,7 +93,7 @@
 	}
 }
 
-void lib_signals_set_handler(int signo, int delayed,
+void lib_signals_set_handler(int signo, bool delayed,
 			     signal_handler_t *handler, void *context)
 {
 	struct signal_handler *h;

Index: lib-signals.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/lib-signals.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- lib-signals.h	25 Sep 2005 11:07:37 -0000	1.4
+++ lib-signals.h	13 Jan 2006 20:26:01 -0000	1.5
@@ -8,7 +8,7 @@
 /* Set signal handler for specific signal. If delayed is TRUE, the handler
    will be called later, ie. not as a real signal handler. If handler is NULL,
    the signal is ignored. */
-void lib_signals_set_handler(int signo, int delayed,
+void lib_signals_set_handler(int signo, bool delayed,
 			     signal_handler_t *handler, void *context);
 void lib_signals_unset_handler(int signo,
 			       signal_handler_t *handler, void *context);

Index: mempool-alloconly.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/mempool-alloconly.c,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- mempool-alloconly.c	3 May 2005 17:02:24 -0000	1.33
+++ mempool-alloconly.c	13 Jan 2006 20:26:01 -0000	1.34
@@ -215,7 +215,7 @@
 	}
 }
 
-static int pool_try_grow(struct alloconly_pool *apool, void *mem, size_t size)
+static bool pool_try_grow(struct alloconly_pool *apool, void *mem, size_t size)
 {
 	/* see if we want to grow the memory we allocated last */
 	if (POOL_BLOCK_DATA(apool->block) +

Index: module-dir.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- module-dir.c	14 Dec 2005 21:50:56 -0000	1.10
+++ module-dir.c	13 Jan 2006 20:26:01 -0000	1.11
@@ -37,7 +37,7 @@
 	return ret;
 }
 
-static void *get_symbol(struct module *module, const char *symbol, int quiet)
+static void *get_symbol(struct module *module, const char *symbol, bool quiet)
 {
 	if (quiet)
 		return dlsym(module->handle, symbol);
@@ -57,7 +57,7 @@
 }
 
 static struct module *
-module_load(const char *path, const char *name, int require_init_funcs)
+module_load(const char *path, const char *name, bool require_init_funcs)
 {
 	void *handle;
 	void (*init)(void);
@@ -108,7 +108,7 @@
 	return strcmp(n1, n2);
 }
 
-struct module *module_dir_load(const char *dir, int require_init_funcs)
+struct module *module_dir_load(const char *dir, bool require_init_funcs)
 {
 	DIR *dirp;
 	struct dirent *d;
@@ -200,7 +200,8 @@
 
 #else
 
-struct module *module_dir_load(const char *dir __attr_unused__, int require_init_funcs __attr_unused__)
+struct module *module_dir_load(const char *dir __attr_unused__,
+			       bool require_init_funcs __attr_unused__)
 {
 	i_error("Dynamically loadable module support not built in");
 	return NULL;

Index: module-dir.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/module-dir.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- module-dir.h	30 May 2004 03:57:15 -0000	1.2
+++ module-dir.h	13 Jan 2006 20:26:01 -0000	1.3
@@ -11,7 +11,7 @@
 };
 
 /* Load all modules in given directory. */
-struct module *module_dir_load(const char *dir, int require_init_funcs);
+struct module *module_dir_load(const char *dir, bool require_init_funcs);
 /* Unload all modules */
 void module_dir_unload(struct module *modules);
 

Index: network.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/network.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- network.c	27 Oct 2005 13:40:40 -0000	1.35
+++ network.c	13 Jan 2006 20:26:01 -0000	1.36
@@ -25,7 +25,7 @@
 #  define SIZEOF_SOCKADDR(so) (sizeof(so.sin))
 #endif
 
-int net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2)
+bool net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2)
 {
 	if (ip1->family != ip2->family)
 		return 0;
@@ -204,16 +204,18 @@
 }
 
 /* Set socket blocking/nonblocking */
-void net_set_nonblock(int fd, int nonblock)
+void net_set_nonblock(int fd, bool nonblock)
 {
 	if (fd_set_nonblock(fd, nonblock) < 0)
 		i_fatal("fd_set_nonblock(%d) failed: %m", fd);
 }
 
-int net_set_cork(int fd __attr_unused__, int cork __attr_unused__)
+int net_set_cork(int fd __attr_unused__, bool cork __attr_unused__)
 {
 #ifdef TCP_CORK
-	return setsockopt(fd, IPPROTO_TCP, TCP_CORK, &cork, sizeof(cork));
+	int val = cork;
+
+	return setsockopt(fd, IPPROTO_TCP, TCP_CORK, &val, sizeof(val));
 #else
 	errno = ENOPROTOOPT;
 	return -1;
@@ -639,24 +641,24 @@
 	return entry == NULL ? NULL : entry->s_name;
 }
 
-int is_ipv4_address(const char *addr)
+bool is_ipv4_address(const char *addr)
 {
 	while (*addr != '\0') {
 		if (*addr != '.' && !i_isdigit(*addr))
-			return 0;
+			return FALSE;
                 addr++;
 	}
 
-	return 1;
+	return TRUE;
 }
 
-int is_ipv6_address(const char *addr)
+bool is_ipv6_address(const char *addr)
 {
 	while (*addr != '\0') {
 		if (*addr != ':' && !i_isxdigit(*addr))
-			return 0;
+			return FALSE;
                 addr++;
 	}
 
-	return 1;
+	return TRUE;
 }

Index: network.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/network.h,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- network.h	9 Jan 2005 16:51:06 -0000	1.13
+++ network.h	13 Jan 2006 20:26:01 -0000	1.14
@@ -40,7 +40,7 @@
 #define IPADDR_IS_V6(ip) ((ip)->family == AF_INET6)
 
 /* returns 1 if IPADDRs are the same */
-int net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2);
+bool net_ip_compare(const struct ip_addr *ip1, const struct ip_addr *ip2);
 
 /* Connect to socket with ip address */
 int net_connect_ip(const struct ip_addr *ip, unsigned int port,
@@ -51,10 +51,10 @@
 void net_disconnect(int fd);
 
 /* Set socket blocking/nonblocking */
-void net_set_nonblock(int fd, int nonblock);
+void net_set_nonblock(int fd, bool nonblock);
 /* Set TCP_CORK if supported, ie. don't send out partial frames.
    Returns 0 if ok, -1 if failed. */
-int net_set_cork(int fd, int cork);
+int net_set_cork(int fd, bool cork);
 
 /* Set IP to contain INADDR_ANY for IPv4 or IPv6. The IPv6 any address may
    include IPv4 depending on the system (Linux yes, BSD no). */
@@ -100,7 +100,7 @@
 /* Get name of TCP service */
 const char *net_getservbyport(unsigned short port);
 
-int is_ipv4_address(const char *addr);
-int is_ipv6_address(const char *addr);
+bool is_ipv4_address(const char *addr);
+bool is_ipv6_address(const char *addr);
 
 #endif

Index: ostream-crlf.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-crlf.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ostream-crlf.c	12 Oct 2005 17:52:38 -0000	1.11
+++ ostream-crlf.c	13 Jan 2006 20:26:01 -0000	1.12
@@ -15,7 +15,7 @@
 	struct _ostream ostream;
 
         struct ostream *output;
-	int last_cr;
+	bool last_cr;
 };
 
 static const struct const_iovec cr_iov = { "\r", 1 };
@@ -38,7 +38,7 @@
 	o_stream_set_max_buffer_size(cstream->output, max_size);
 }
 
-static void _cork(struct _ostream *stream, int set)
+static void _cork(struct _ostream *stream, bool set)
 {
 	struct crlf_ostream *cstream = (struct crlf_ostream *)stream;
 
@@ -55,7 +55,7 @@
 	return o_stream_flush(cstream->output);
 }
 
-static void _flush_pending(struct _ostream *stream, int set)
+static void _flush_pending(struct _ostream *stream, bool set)
 {
 	struct crlf_ostream *cstream = (struct crlf_ostream *)stream;
 
@@ -117,7 +117,7 @@
 	struct const_iovec new_iov;
 	unsigned int vec, i, len, start, new_iov_count = 0, new_iov_size = 0;
 	ssize_t ret, total;
-	int last_cr;
+	bool last_cr;
 
 	last_cr = cstream->last_cr;
 

Index: ostream-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-file.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -d -r1.57 -r1.58
--- ostream-file.c	19 Oct 2005 13:20:07 -0000	1.57
+++ ostream-file.c	13 Jan 2006 20:26:01 -0000	1.58
@@ -209,7 +209,7 @@
 	return IS_STREAM_EMPTY(fstream) ? 1 : 0;
 }
 
-static void _cork(struct _ostream *stream, int set)
+static void _cork(struct _ostream *stream, bool set)
 {
 	struct file_ostream *fstream = (struct file_ostream *)stream;
 	int ret;
@@ -242,7 +242,7 @@
 	return buffer_flush(fstream);
 }
 
-static void _flush_pending(struct _ostream *stream, int set)
+static void _flush_pending(struct _ostream *stream, bool set)
 {
 	struct file_ostream *fstream = (struct file_ostream *) stream;
 
@@ -722,7 +722,7 @@
 
 struct ostream *
 o_stream_create_file(int fd, pool_t pool, size_t max_buffer_size,
-		     int autoclose_fd)
+		     bool autoclose_fd)
 {
 	struct file_ostream *fstream;
 	struct ostream *ostream;

Index: ostream-internal.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream-internal.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ostream-internal.h	25 Sep 2005 10:49:03 -0000	1.6
+++ ostream-internal.h	13 Jan 2006 20:26:01 -0000	1.7
@@ -9,9 +9,9 @@
 	struct _iostream iostream;
 
 /* methods: */
-	void (*cork)(struct _ostream *stream, int set);
+	void (*cork)(struct _ostream *stream, bool set);
 	int (*flush)(struct _ostream *stream);
-	void (*flush_pending)(struct _ostream *stream, int set);
+	void (*flush_pending)(struct _ostream *stream, bool set);
 	size_t (*get_used_size)(struct _ostream *stream);
 	int (*seek)(struct _ostream *stream, uoff_t offset);
 	ssize_t (*sendv)(struct _ostream *stream, const struct const_iovec *iov,

Index: ostream.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ostream.c	25 Sep 2005 10:49:03 -0000	1.13
+++ ostream.c	13 Jan 2006 20:26:01 -0000	1.14
@@ -66,7 +66,7 @@
 	return _stream->flush(_stream);
 }
 
-void o_stream_set_flush_pending(struct ostream *stream, int set)
+void o_stream_set_flush_pending(struct ostream *stream, bool set)
 {
 	struct _ostream *_stream = stream->real_stream;
 

Index: ostream.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/ostream.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ostream.h	25 Sep 2005 10:49:03 -0000	1.12
+++ ostream.h	13 Jan 2006 20:26:01 -0000	1.13
@@ -25,7 +25,7 @@
    If max_buffer_size is 0, an "optimal" buffer size is used (max 128kB). */
 struct ostream *
 o_stream_create_file(int fd, pool_t pool, size_t max_buffer_size,
-		     int autoclose_fd);
+		     bool autoclose_fd);
 
 /* Reference counting. References start from 1, so calling o_stream_unref()
    destroys the stream if o_stream_ref() is never used. */
@@ -52,7 +52,7 @@
 int o_stream_flush(struct ostream *stream);
 /* Set "flush pending" state of stream. If set, the flush callback is called
    when more data is allowed to be sent, even if the buffer itself is empty. */
-void o_stream_set_flush_pending(struct ostream *stream, int set);
+void o_stream_set_flush_pending(struct ostream *stream, bool set);
 /* Returns number of bytes currently in buffer. */
 size_t o_stream_get_buffer_used_size(struct ostream *stream);
 

Index: printf-upper-bound.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/printf-upper-bound.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- printf-upper-bound.c	30 Jun 2005 21:36:01 -0000	1.6
+++ printf-upper-bound.c	13 Jan 2006 20:26:01 -0000	1.7
@@ -69,7 +69,7 @@
 {
   const char *format = *format_p;
   size_t len = 1;
-  int fix_format = FALSE;
+  bool fix_format = FALSE;
 
   if (!format)
     return len;
@@ -96,7 +96,7 @@
       else
         {
           PrintfArgSpec spec;
-          int seen_l = FALSE, conv_done = FALSE;
+          bool seen_l = FALSE, conv_done = FALSE;
           unsigned int conv_len = 0;
 
           memset(&spec, 0, sizeof(spec));

Index: restrict-access.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/restrict-access.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- restrict-access.c	9 Jun 2005 13:44:53 -0000	1.20
+++ restrict-access.c	13 Jan 2006 20:26:01 -0000	1.21
@@ -122,7 +122,7 @@
 	t_pop();
 }
 
-void restrict_access_by_env(int disallow_root)
+void restrict_access_by_env(bool disallow_root)
 {
 	const char *env;
 	gid_t gid;

Index: restrict-access.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/restrict-access.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- restrict-access.h	16 Jun 2004 02:04:02 -0000	1.6
+++ restrict-access.h	13 Jan 2006 20:26:01 -0000	1.7
@@ -11,6 +11,6 @@
 /* chroot, setuid() and setgid() based on environment variables.
    If disallow_roots is TRUE, we'll kill ourself if we didn't have the
    environment settings and we have root uid or gid. */
-void restrict_access_by_env(int disallow_root);
+void restrict_access_by_env(bool disallow_root);
 
 #endif

Index: restrict-process-size.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/restrict-process-size.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- restrict-process-size.h	1 Feb 2003 02:06:11 -0000	1.2
+++ restrict-process-size.h	13 Jan 2006 20:26:01 -0000	1.3
@@ -3,7 +3,6 @@
 
 /* Restrict max. process size. The size is in megabytes, setting it to
    (unsigned int)-1 sets it unlimited. */
-void restrict_process_size(unsigned int size __attr_unused__,
-			   unsigned int max_processes __attr_unused__);
+void restrict_process_size(unsigned int size, unsigned int max_processes);
 
 #endif

Index: seq-range-array.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- seq-range-array.c	25 Nov 2005 15:16:46 -0000	1.1
+++ seq-range-array.c	13 Jan 2006 20:26:01 -0000	1.2
@@ -4,7 +4,7 @@
 #include "array.h"
 #include "seq-range-array.h"
 
-static int seq_range_lookup(array_t *array, uint32_t seq, unsigned int *idx_r)
+static bool seq_range_lookup(array_t *array, uint32_t seq, unsigned int *idx_r)
 {
         ARRAY_SET_TYPE(array, struct seq_range);
 	struct seq_range *data;
@@ -167,7 +167,7 @@
 	}
 }
 
-int seq_range_exists(array_t *array, uint32_t seq)
+bool seq_range_exists(array_t *array, uint32_t seq)
 {
 	unsigned int idx;
 

Index: seq-range-array.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/seq-range-array.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- seq-range-array.h	25 Nov 2005 15:16:46 -0000	1.1
+++ seq-range-array.h	13 Jan 2006 20:26:01 -0000	1.2
@@ -7,6 +7,6 @@
 
 void seq_range_array_add(array_t *array, unsigned int init_count, uint32_t seq);
 void seq_range_array_remove(array_t *array, uint32_t seq);
-int seq_range_exists(array_t *array, uint32_t seq);
+bool seq_range_exists(array_t *array, uint32_t seq);
 
 #endif

Index: strfuncs.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/strfuncs.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- strfuncs.c	2 Jan 2006 10:04:12 -0000	1.53
+++ strfuncs.c	13 Jan 2006 20:26:01 -0000	1.54
@@ -352,7 +352,7 @@
         return str;
 }
 
-int is_numeric(const char *str, char end_char)
+bool is_numeric(const char *str, char end_char)
 {
 	if (*str == '\0' || *str == end_char)
 		return FALSE;
@@ -619,7 +619,7 @@
 	return str;
 }
 
-int strarray_remove(const char **arr, const char *value)
+bool strarray_remove(const char **arr, const char *value)
 {
 	const char **dest;
 

Index: strfuncs.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/strfuncs.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- strfuncs.h	25 Sep 2005 10:24:09 -0000	1.26
+++ strfuncs.h	13 Jan 2006 20:26:01 -0000	1.27
@@ -36,7 +36,7 @@
 
 /* Return TRUE if all characters in string are numbers.
    Stop when `end_char' is found from string. */
-int is_numeric(const char *str, char end_char);
+bool is_numeric(const char *str, char end_char);
 
 /* Like strlcpy(), but return -1 if buffer was overflown, 0 if not. */
 int strocpy(char *dest, const char *src, size_t dstsize);
@@ -74,7 +74,7 @@
 /* Return all strings from array joined into one string. */
 const char *t_strarray_join(const char *const *arr, const char *separator);
 /* Removes a value from NULL-terminated string array. Returns TRUE if found. */
-int strarray_remove(const char **arr, const char *value);
+bool strarray_remove(const char **arr, const char *value);
 
 /* INTERNAL */
 char *_vstrconcat(const char *str1, va_list args, size_t *ret_len);

Index: unlink-directory.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/unlink-directory.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- unlink-directory.c	26 Aug 2003 21:18:16 -0000	1.10
+++ unlink-directory.c	13 Jan 2006 20:26:01 -0000	1.11
@@ -148,7 +148,7 @@
 	return 0;
 }
 
-int unlink_directory(const char *dir, int unlink_dir)
+int unlink_directory(const char *dir, bool unlink_dir)
 {
 	int fd, ret, old_errno;
 

Index: unlink-directory.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/unlink-directory.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- unlink-directory.h	21 Dec 2002 12:13:58 -0000	1.2
+++ unlink-directory.h	13 Jan 2006 20:26:01 -0000	1.3
@@ -3,6 +3,6 @@
 
 /* Unlink directory and/or everything under it.
    Returns 0 if successful, -1 if error. */
-int unlink_directory(const char *dir, int unlink_dir);
+int unlink_directory(const char *dir, bool unlink_dir);
 
 #endif

Index: var-expand.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib/var-expand.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- var-expand.c	11 Sep 2005 20:22:35 -0000	1.8
+++ var-expand.c	13 Jan 2006 20:26:01 -0000	1.9
@@ -97,7 +97,7 @@
 	const char *(*modifier[MAX_MODIFIER_COUNT])
 		(const char *, struct var_expand_context *);
 	unsigned int i, modifier_count;
-	int zero_padding = FALSE;
+	bool zero_padding = FALSE;
 
 	memset(&ctx, 0, sizeof(ctx));
 	for (; *str != '\0'; str++) {



More information about the dovecot-cvs mailing list