[dovecot-cvs]
dovecot/src/lib-storage/index/mbox istream-raw-mbox.c, 1.37,
1.38 istream-raw-mbox.h, 1.9, 1.10 mbox-file.c, 1.13,
1.14 mbox-file.h, 1.3, 1.4 mbox-list.c, 1.32, 1.33 mbox-lock.c,
1.20, 1.21 mbox-mail.c, 1.30, 1.31 mbox-md5.c, 1.1,
1.2 mbox-save.c, 1.89, 1.90 mbox-storage.c, 1.132,
1.133 mbox-storage.h, 1.39, 1.40 mbox-sync-parse.c, 1.47,
1.48 mbox-sync-private.h, 1.55, 1.56 mbox-sync-rewrite.c, 1.59,
1.60 mbox-sync-update.c, 1.43, 1.44 mbox-sync.c, 1.177,
1.178 mbox-transaction.c, 1.12, 1.13
cras at dovecot.org
cras at dovecot.org
Fri Jan 13 22:26:41 EET 2006
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/subscription-file
subscription-file.c, 1.26, 1.27 subscription-file.h, 1.9, 1.10
- Next message: [dovecot-cvs] dovecot/src/login-common client-common.c, 1.3,
1.4 client-common.h, 1.8, 1.9 common.h, 1.8, 1.9 main.c, 1.28,
1.29 master.c, 1.14, 1.15 master.h, 1.4, 1.5 sasl-server.c,
1.9, 1.10 ssl-proxy-gnutls.c, 1.11, 1.12 ssl-proxy-openssl.c,
1.30, 1.31 ssl-proxy.c, 1.6, 1.7 ssl-proxy.h, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/lib-storage/index/mbox
In directory talvi:/tmp/cvs-serv27808/src/lib-storage/index/mbox
Modified Files:
istream-raw-mbox.c istream-raw-mbox.h mbox-file.c mbox-file.h
mbox-list.c mbox-lock.c mbox-mail.c mbox-md5.c mbox-save.c
mbox-storage.c mbox-storage.h mbox-sync-parse.c
mbox-sync-private.h mbox-sync-rewrite.c mbox-sync-update.c
mbox-sync.c mbox-transaction.c
Log Message:
Added "bool" type and changed all ints that were used as booleans to bool.
Index: istream-raw-mbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- istream-raw-mbox.c 11 Jan 2006 20:45:03 -0000 1.37
+++ istream-raw-mbox.c 13 Jan 2006 20:26:36 -0000 1.38
@@ -284,7 +284,7 @@
}
static void _seek(struct _istream *stream, uoff_t v_offset,
- int mark __attr_unused__)
+ bool mark __attr_unused__)
{
struct raw_mbox_istream *rstream = (struct raw_mbox_istream *)stream;
@@ -306,7 +306,7 @@
rstream->istream.pos = 0;
}
-static const struct stat *_stat(struct _istream *stream, int exact)
+static const struct stat *_stat(struct _istream *stream, bool exact)
{
struct raw_mbox_istream *rstream = (struct raw_mbox_istream *)stream;
@@ -340,7 +340,7 @@
input->real_stream->abs_start_offset);
}
-static int istream_raw_mbox_is_valid_from(struct raw_mbox_istream *rstream)
+static bool istream_raw_mbox_is_valid_from(struct raw_mbox_istream *rstream)
{
const unsigned char *data;
size_t size;
@@ -521,7 +521,7 @@
{
struct raw_mbox_istream *rstream =
(struct raw_mbox_istream *)stream->real_stream;
- int check;
+ bool check;
rstream->corrupted = FALSE;
rstream->eof = FALSE;
@@ -561,7 +561,7 @@
return rstream->corrupted ? -1 : 0;
}
-int istream_raw_mbox_is_eof(struct istream *stream)
+bool istream_raw_mbox_is_eof(struct istream *stream)
{
struct raw_mbox_istream *rstream =
(struct raw_mbox_istream *)stream->real_stream;
Index: istream-raw-mbox.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/istream-raw-mbox.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- istream-raw-mbox.h 29 Mar 2005 10:30:20 -0000 1.9
+++ istream-raw-mbox.h 13 Jan 2006 20:26:37 -0000 1.10
@@ -34,6 +34,6 @@
int istream_raw_mbox_seek(struct istream *stream, uoff_t offset);
/* Returns TRUE if we've read the whole mbox. */
-int istream_raw_mbox_is_eof(struct istream *stream);
+bool istream_raw_mbox_is_eof(struct istream *stream);
#endif
Index: mbox-file.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-file.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mbox-file.c 7 Jan 2006 00:29:19 -0000 1.13
+++ mbox-file.c 13 Jan 2006 20:26:37 -0000 1.14
@@ -144,7 +144,7 @@
}
int mbox_file_seek(struct mbox_mailbox *mbox, struct mail_index_view *view,
- uint32_t seq, int *deleted_r)
+ uint32_t seq, bool *deleted_r)
{
const void *data;
uint64_t offset;
Index: mbox-file.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-file.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- mbox-file.h 8 Apr 2005 13:13:48 -0000 1.3
+++ mbox-file.h 13 Jan 2006 20:26:37 -0000 1.4
@@ -8,6 +8,6 @@
void mbox_file_close_stream(struct mbox_mailbox *mbox);
int mbox_file_seek(struct mbox_mailbox *mbox, struct mail_index_view *view,
- uint32_t seq, int *deleted_r);
+ uint32_t seq, bool *deleted_r);
#endif
Index: mbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-list.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- mbox-list.c 7 Jan 2006 00:29:46 -0000 1.32
+++ mbox-list.c 13 Jan 2006 20:26:37 -0000 1.33
@@ -32,7 +32,7 @@
struct imap_match_glob *glob;
struct subsfile_list_context *subsfile_ctx;
- int failed, inbox_found;
+ bool failed, inbox_found;
struct mailbox_list *(*next)(struct mbox_list_context *ctx);
@@ -69,7 +69,7 @@
}
static int list_opendir(struct mail_storage *storage,
- const char *path, int root, DIR **dirp)
+ const char *path, bool root, DIR **dirp)
{
*dirp = opendir(*path == '\0' ? "/" : path);
if (*dirp != NULL)
@@ -222,7 +222,8 @@
DIR *dirp;
size_t len;
enum imap_match_result match, match2;
- int ret, noselect;
+ int ret;
+ bool noselect;
/* skip all hidden files */
if (fname[0] == '.')
Index: mbox-lock.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-lock.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- mbox-lock.c 27 Oct 2005 13:11:44 -0000 1.20
+++ mbox-lock.c 13 Jan 2006 20:26:37 -0000 1.21
@@ -39,10 +39,10 @@
struct mbox_lock_context {
struct mbox_mailbox *mbox;
int lock_status[MBOX_LOCK_COUNT];
- int checked_file;
+ bool checked_file;
int lock_type;
- int dotlock_last_stale;
+ bool dotlock_last_stale;
};
struct mbox_lock_data {
@@ -77,7 +77,7 @@
{ 0, NULL, NULL }
};
-static int lock_settings_initialized = FALSE;
+static bool lock_settings_initialized = FALSE;
static enum mbox_lock_type read_locks[MBOX_LOCK_COUNT+1];
static enum mbox_lock_type write_locks[MBOX_LOCK_COUNT+1];
static int lock_timeout, dotlock_change_timeout;
@@ -184,7 +184,7 @@
return 0;
}
-static int dotlock_callback(unsigned int secs_left, int stale, void *context)
+static bool dotlock_callback(unsigned int secs_left, bool stale, void *context)
{
struct mbox_lock_context *ctx = context;
enum mbox_lock_type *lock_types;
@@ -448,7 +448,8 @@
{
struct mbox_lock_context ctx;
time_t max_wait_time;
- int ret, i, drop_locks;
+ int ret, i;
+ bool drop_locks;
index_storage_lock_notify_reset(&mbox->ibox);
Index: mbox-mail.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-mail.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- mbox-mail.c 11 Jan 2006 20:45:03 -0000 1.30
+++ mbox-mail.c 13 Jan 2006 20:26:37 -0000 1.31
@@ -35,7 +35,8 @@
(struct mbox_transaction_context *)mail->trans;
struct mbox_mailbox *mbox = (struct mbox_mailbox *)mail->ibox;
enum mbox_sync_flags sync_flags = 0;
- int ret, deleted;
+ int ret;
+ bool deleted;
if (mail->mail.mail.expunged)
return 0;
Index: mbox-md5.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-md5.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mbox-md5.c 15 Dec 2004 18:43:40 -0000 1.1
+++ mbox-md5.c 13 Jan 2006 20:26:37 -0000 1.2
@@ -9,17 +9,17 @@
struct mbox_md5_context {
struct md5_context hdr_md5_ctx;
- int seen_received_hdr;
+ bool seen_received_hdr;
};
struct mbox_md5_header_func {
const char *header;
- int (*func)(struct mbox_md5_context *ctx,
- struct message_header_line *hdr);
+ bool (*func)(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr);
};
-static int parse_date(struct mbox_md5_context *ctx,
- struct message_header_line *hdr)
+static bool parse_date(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr)
{
if (!ctx->seen_received_hdr) {
/* Received-header contains date too, and more trusted one */
@@ -28,15 +28,15 @@
return TRUE;
}
-static int parse_delivered_to(struct mbox_md5_context *ctx,
- struct message_header_line *hdr)
+static bool parse_delivered_to(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr)
{
md5_update(&ctx->hdr_md5_ctx, hdr->value, hdr->value_len);
return TRUE;
}
-static int parse_message_id(struct mbox_md5_context *ctx,
- struct message_header_line *hdr)
+static bool parse_message_id(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr)
{
if (!ctx->seen_received_hdr) {
/* Received-header contains unique ID too,
@@ -46,8 +46,8 @@
return TRUE;
}
-static int parse_received(struct mbox_md5_context *ctx,
- struct message_header_line *hdr)
+static bool parse_received(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr)
{
if (!ctx->seen_received_hdr) {
/* get only the first received-header */
@@ -58,8 +58,8 @@
return TRUE;
}
-static int parse_x_delivery_id(struct mbox_md5_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_delivery_id(struct mbox_md5_context *ctx,
+ struct message_header_line *hdr)
{
/* Let the local delivery agent help generate unique ID's but don't
blindly trust this header alone as it could just as easily come from
Index: mbox-save.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-save.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- mbox-save.c 16 Oct 2005 15:07:00 -0000 1.89
+++ mbox-save.c 13 Jan 2006 20:26:37 -0000 1.90
@@ -263,7 +263,7 @@
static int
mbox_save_init_file(struct mbox_save_context *ctx,
- struct mbox_transaction_context *t, int want_mail)
+ struct mbox_transaction_context *t, bool want_mail)
{
struct mbox_mailbox *mbox = ctx->mbox;
int ret;
@@ -322,7 +322,7 @@
}
static void save_header_callback(struct message_header_line *hdr,
- int *matched, void *context)
+ bool *matched, void *context)
{
struct mbox_save_context *ctx = context;
@@ -343,7 +343,7 @@
mbox_save_init(struct mailbox_transaction_context *_t,
enum mail_flags flags, struct mail_keywords *keywords,
time_t received_date, int timezone_offset __attr_unused__,
- const char *from_envelope, struct istream *input, int want_mail)
+ const char *from_envelope, struct istream *input, bool want_mail)
{
struct mbox_transaction_context *t =
(struct mbox_transaction_context *)_t;
Index: mbox-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.c,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- mbox-storage.c 31 Dec 2005 14:20:54 -0000 1.132
+++ mbox-storage.c 13 Jan 2006 20:26:37 -0000 1.133
@@ -50,7 +50,7 @@
return -1;
}
-static int mbox_handle_errors(struct index_storage *istorage)
+static bool mbox_handle_errors(struct index_storage *istorage)
{
struct mail_storage *storage = &istorage->storage;
@@ -65,7 +65,7 @@
return TRUE;
}
-static int mbox_is_file(const char *path, const char *name, int debug)
+static bool mbox_is_file(const char *path, const char *name, bool debug)
{
struct stat st;
@@ -96,7 +96,7 @@
return TRUE;
}
-static int mbox_is_dir(const char *path, const char *name, int debug)
+static bool mbox_is_dir(const char *path, const char *name, bool debug)
{
struct stat st;
@@ -127,9 +127,9 @@
return TRUE;
}
-static int mbox_autodetect(const char *data, enum mail_storage_flags flags)
+static bool mbox_autodetect(const char *data, enum mail_storage_flags flags)
{
- int debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
+ bool debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
const char *path;
path = t_strcut(data, ':');
@@ -159,7 +159,7 @@
static const char *get_root_dir(enum mail_storage_flags flags)
{
const char *home, *path;
- int debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
+ bool debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
home = getenv("HOME");
if (home != NULL) {
@@ -194,7 +194,7 @@
}
static const char *
-get_inbox_file(const char *root_dir, int only_root, int debug)
+get_inbox_file(const char *root_dir, bool only_root, bool debug)
{
const char *user, *path;
@@ -224,7 +224,7 @@
return path;
}
-static const char *create_root_dir(int debug)
+static const char *create_root_dir(bool debug)
{
const char *home, *path;
@@ -250,12 +250,12 @@
mbox_create(const char *data, const char *user, enum mail_storage_flags flags,
enum mail_storage_lock_method lock_method)
{
- int debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
+ bool debug = (flags & MAIL_STORAGE_FLAG_DEBUG) != 0;
struct mbox_storage *storage;
struct index_storage *istorage;
const char *root_dir, *inbox_file, *index_dir, *p;
struct stat st;
- int autodetect;
+ bool autodetect;
pool_t pool;
root_dir = inbox_file = index_dir = NULL;
@@ -354,10 +354,10 @@
pool_unref(storage->storage.pool);
}
-int mbox_is_valid_mask(struct mail_storage *storage, const char *mask)
+bool mbox_is_valid_mask(struct mail_storage *storage, const char *mask)
{
const char *p;
- int newdir;
+ bool newdir;
if ((storage->flags & MAIL_STORAGE_FLAG_FULL_FS_ACCESS) != 0)
return TRUE;
@@ -377,8 +377,8 @@
return TRUE;
}
-static int mbox_is_valid_create_name(struct mail_storage *storage,
- const char *name)
+static bool mbox_is_valid_create_name(struct mail_storage *storage,
+ const char *name)
{
size_t len;
@@ -390,8 +390,8 @@
return mbox_is_valid_mask(storage, name);
}
-static int mbox_is_valid_existing_name(struct mail_storage *storage,
- const char *name)
+static bool mbox_is_valid_existing_name(struct mail_storage *storage,
+ const char *name)
{
size_t len;
@@ -473,8 +473,8 @@
return t_strconcat(storage->dir, "/", name, NULL);
}
-static int mbox_mail_is_recent(struct index_mailbox *ibox __attr_unused__,
- uint32_t uid __attr_unused__)
+static bool mbox_mail_is_recent(struct index_mailbox *ibox __attr_unused__,
+ uint32_t uid __attr_unused__)
{
return FALSE;
}
@@ -651,7 +651,7 @@
}
static int mbox_mailbox_create(struct mail_storage *_storage, const char *name,
- int directory)
+ bool directory)
{
struct index_storage *storage = (struct index_storage *)_storage;
const char *path, *p;
@@ -907,7 +907,7 @@
}
static int mbox_set_subscribed(struct mail_storage *_storage,
- const char *name, int set)
+ const char *name, bool set)
{
struct index_storage *storage = (struct index_storage *)_storage;
const char *path;
Index: mbox-storage.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-storage.h,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- mbox-storage.h 1 Oct 2005 09:00:42 -0000 1.39
+++ mbox-storage.h 13 Jan 2006 20:26:37 -0000 1.40
@@ -34,7 +34,7 @@
unsigned int mbox_excl_locks, mbox_shared_locks;
struct dotlock *mbox_dotlock;
unsigned int mbox_lock_id;
- int mbox_readonly, mbox_writeonly;
+ bool mbox_readonly, mbox_writeonly;
time_t mbox_dirty_stamp;
off_t mbox_dirty_size;
@@ -83,7 +83,8 @@
mbox_save_init(struct mailbox_transaction_context *_t,
enum mail_flags flags, struct mail_keywords *keywords,
time_t received_date, int timezone_offset,
- const char *from_envelope, struct istream *input, int want_mail);
+ const char *from_envelope, struct istream *input,
+ bool want_mail);
int mbox_save_continue(struct mail_save_context *ctx);
int mbox_save_finish(struct mail_save_context *ctx, struct mail *dest_mail);
void mbox_save_cancel(struct mail_save_context *ctx);
@@ -91,6 +92,6 @@
int mbox_transaction_save_commit(struct mbox_save_context *ctx);
void mbox_transaction_save_rollback(struct mbox_save_context *ctx);
-int mbox_is_valid_mask(struct mail_storage *storage, const char *mask);
+bool mbox_is_valid_mask(struct mail_storage *storage, const char *mask);
#endif
Index: mbox-sync-parse.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-parse.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- mbox-sync-parse.c 28 Oct 2005 14:32:02 -0000 1.47
+++ mbox-sync-parse.c 13 Jan 2006 20:26:37 -0000 1.48
@@ -22,8 +22,8 @@
struct mbox_sync_header_func {
const char *header;
- int (*func)(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr);
+ bool (*func)(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr);
};
struct mbox_flag_type mbox_status_flags[] = {
@@ -93,23 +93,23 @@
ctx->mail.flags ^= MBOX_NONRECENT_KLUDGE;
}
-static int parse_status(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_status(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
parse_status_flags(ctx, hdr, mbox_status_flags);
ctx->hdr_pos[MBOX_HDR_STATUS] = str_len(ctx->header);
return TRUE;
}
-static int parse_x_status(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_status(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
parse_status_flags(ctx, hdr, mbox_xstatus_flags);
ctx->hdr_pos[MBOX_HDR_X_STATUS] = str_len(ctx->header);
return TRUE;
}
-static int keyword_is_valid(const char *keyword)
+static bool keyword_is_valid(const char *keyword)
{
/* try to only prevent the most malicious looking keywords. */
for (; *keyword != '\0'; keyword++) {
@@ -165,8 +165,8 @@
}
}
-static int parse_x_imap_base(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_imap_base(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
size_t i, j, uid_last_pos;
uint32_t uid_validity, uid_last;
@@ -239,8 +239,8 @@
return TRUE;
}
-static int parse_x_imap(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_imap(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
if (!parse_x_imap_base(ctx, hdr))
return FALSE;
@@ -251,8 +251,8 @@
return TRUE;
}
-static int parse_x_keywords(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_keywords(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
array_t ARRAY_DEFINE(keyword_list, unsigned int);
const unsigned int *list;
@@ -321,8 +321,8 @@
return TRUE;
}
-static int parse_x_uid(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_x_uid(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
uint32_t value = 0;
size_t i;
@@ -395,8 +395,8 @@
return TRUE;
}
-static int parse_content_length(struct mbox_sync_mail_context *ctx,
- struct message_header_line *hdr)
+static bool parse_content_length(struct mbox_sync_mail_context *ctx,
+ struct message_header_line *hdr)
{
uoff_t value = 0;
size_t i;
Index: mbox-sync-private.h
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-private.h,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- mbox-sync-private.h 27 Oct 2005 12:12:57 -0000 1.55
+++ mbox-sync-private.h 13 Jan 2006 20:26:37 -0000 1.56
@@ -128,7 +128,7 @@
};
int mbox_sync(struct mbox_mailbox *mbox, enum mbox_sync_flags flags);
-int mbox_sync_has_changed(struct mbox_mailbox *mbox, int leave_dirty);
+int mbox_sync_has_changed(struct mbox_mailbox *mbox, bool leave_dirty);
void mbox_sync_parse_next_mail(struct istream *input,
struct mbox_sync_mail_context *ctx);
@@ -146,7 +146,7 @@
void mbox_sync_apply_index_syncs(struct mbox_sync_context *sync_ctx,
struct mbox_sync_mail *mail,
- int *keywords_changed_r);
+ bool *keywords_changed_r);
int mbox_sync_seek(struct mbox_sync_context *sync_ctx, uoff_t from_offset);
int mbox_move(struct mbox_sync_context *sync_ctx,
uoff_t dest, uoff_t source, uoff_t size);
Index: mbox-sync-rewrite.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-rewrite.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- mbox-sync-rewrite.c 3 Nov 2005 18:36:36 -0000 1.59
+++ mbox-sync-rewrite.c 13 Jan 2006 20:26:37 -0000 1.60
@@ -366,7 +366,7 @@
struct mbox_sync_mail *mails,
uint32_t seq, uint32_t idx, uint32_t padding,
off_t move_diff, uoff_t expunged_space,
- uoff_t end_offset, int first_nonexpunged)
+ uoff_t end_offset, bool first_nonexpunged)
{
struct mbox_sync_mail_context new_mail_ctx;
uoff_t offset, dest_offset;
@@ -495,7 +495,7 @@
/* give space to this mail. end_offset is left to
contain this message's From-line (ie. below we
move only headers + body). */
- int first_nonexpunged = idx == first_nonexpunged_idx;
+ bool first_nonexpunged = idx == first_nonexpunged_idx;
next_move_diff = -mails[idx].space;
if (mbox_sync_read_and_move(sync_ctx, mail_ctx, mails,
Index: mbox-sync-update.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync-update.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- mbox-sync-update.c 11 Jan 2006 20:20:52 -0000 1.43
+++ mbox-sync-update.c 13 Jan 2006 20:26:37 -0000 1.44
@@ -377,7 +377,7 @@
void mbox_sync_update_header(struct mbox_sync_mail_context *ctx)
{
uint8_t old_flags;
- int keywords_changed;
+ bool keywords_changed;
i_assert(ctx->mail.uid != 0 || ctx->pseudo);
Index: mbox-sync.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-sync.c,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- mbox-sync.c 6 Jan 2006 14:50:35 -0000 1.177
+++ mbox-sync.c 13 Jan 2006 20:26:37 -0000 1.178
@@ -134,7 +134,7 @@
return 1;
}
-static int mbox_sync_buf_have_expunges(array_t *syncs_arr)
+static bool mbox_sync_buf_have_expunges(array_t *syncs_arr)
{
ARRAY_SET_TYPE(syncs_arr, struct mail_index_sync_rec);
const struct mail_index_sync_rec *syncs;
@@ -149,7 +149,7 @@
}
static int mbox_sync_read_index_syncs(struct mbox_sync_context *sync_ctx,
- uint32_t uid, int *sync_expunge_r)
+ uint32_t uid, bool *sync_expunge_r)
{
struct mail_index_sync_rec *sync_rec = &sync_ctx->sync_rec;
int ret;
@@ -231,7 +231,7 @@
void mbox_sync_apply_index_syncs(struct mbox_sync_context *sync_ctx,
struct mbox_sync_mail *mail,
- int *keywords_changed_r)
+ bool *keywords_changed_r)
{
const struct mail_index_sync_rec *syncs;
unsigned int i, count;
@@ -363,7 +363,7 @@
static int
mbox_sync_update_from_offset(struct mbox_sync_context *sync_ctx,
struct mbox_sync_mail *mail,
- int nocheck)
+ bool nocheck)
{
const void *data;
uint64_t offset;
@@ -457,7 +457,7 @@
sync records are automatically applied to rec->flags at the
end of index syncing, so calculate those new flags first */
struct mbox_sync_mail idx_mail;
- int keywords_changed;
+ bool keywords_changed;
memset(&idx_mail, 0, sizeof(idx_mail));
idx_mail.flags = rec->flags;
@@ -507,8 +507,8 @@
if (((idx_mail.flags ^ mbox_flags) &
MAIL_INDEX_MAIL_FLAG_DIRTY) != 0) {
/* dirty flag state changed */
- int dirty = (mbox_flags &
- MAIL_INDEX_MAIL_FLAG_DIRTY) != 0;
+ bool dirty = (mbox_flags &
+ MAIL_INDEX_MAIL_FLAG_DIRTY) != 0;
mail_index_update_flags(sync_ctx->t,
sync_ctx->idx_seq,
dirty ? MODIFY_ADD : MODIFY_REMOVE,
@@ -539,7 +539,7 @@
/* update from_offsets, but not if we're going to rewrite this message.
rewriting would just move it anyway. */
if (sync_ctx->need_space_seq == 0) {
- int nocheck = rec == NULL || sync_ctx->expunged_space > 0;
+ bool nocheck = rec == NULL || sync_ctx->expunged_space > 0;
if (mbox_sync_update_from_offset(sync_ctx, mail, nocheck) < 0)
return -1;
}
@@ -849,7 +849,8 @@
struct mbox_mailbox *mbox = sync_ctx->mbox;
uoff_t old_offset;
uint32_t uid;
- int ret, deleted;
+ int ret;
+ bool deleted;
if (seq == 0) {
if (istream_raw_mbox_seek(mbox->mbox_stream, 0) < 0) {
@@ -941,8 +942,8 @@
}
static int mbox_sync_partial_seek_next(struct mbox_sync_context *sync_ctx,
- uint32_t next_uid, int *partial,
- int *skipped_mails)
+ uint32_t next_uid, bool *partial,
+ bool *skipped_mails)
{
uint32_t messages_count;
int ret;
@@ -988,12 +989,13 @@
static int mbox_sync_loop(struct mbox_sync_context *sync_ctx,
struct mbox_sync_mail_context *mail_ctx,
- int partial)
+ bool partial)
{
const struct mail_index_record *rec;
uint32_t uid, messages_count;
uoff_t offset;
- int ret, expunged, skipped_mails;
+ int ret;
+ bool expunged, skipped_mails;
messages_count =
mail_index_view_get_messages_count(sync_ctx->sync_view);
@@ -1483,7 +1485,7 @@
return 0;
}
-int mbox_sync_has_changed(struct mbox_mailbox *mbox, int leave_dirty)
+int mbox_sync_has_changed(struct mbox_mailbox *mbox, bool leave_dirty)
{
const struct mail_index_header *hdr;
const struct stat *st;
@@ -1541,7 +1543,8 @@
uint32_t seq;
uoff_t offset;
unsigned int lock_id = 0;
- int ret, changed, delay_writes;
+ int ret;
+ bool changed, delay_writes;
delay_writes = mbox->ibox.readonly ||
((flags & MBOX_SYNC_REWRITE) == 0 &&
@@ -1561,7 +1564,7 @@
(flags & MBOX_SYNC_FORCE_SYNC) != 0)
changed = 1;
else {
- int leave_dirty = (flags & MBOX_SYNC_UNDIRTY) == 0;
+ bool leave_dirty = (flags & MBOX_SYNC_UNDIRTY) == 0;
if ((changed = mbox_sync_has_changed(mbox, leave_dirty)) < 0) {
if ((flags & MBOX_SYNC_LOCK_READING) != 0)
(void)mbox_unlock(mbox, lock_id);
@@ -1655,7 +1658,7 @@
if (!changed && delay_writes) {
/* if we have only flag changes, we don't need to open the
mbox file */
- int expunged;
+ bool expunged;
if (mbox_sync_read_index_syncs(&sync_ctx, 1, &expunged) < 0)
return -1;
Index: mbox-transaction.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-storage/index/mbox/mbox-transaction.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- mbox-transaction.c 8 Apr 2005 13:13:48 -0000 1.12
+++ mbox-transaction.c 13 Jan 2006 20:26:37 -0000 1.13
@@ -24,7 +24,8 @@
(struct mbox_transaction_context *)_t;
struct mbox_mailbox *mbox = (struct mbox_mailbox *)t->ictx.ibox;
unsigned int lock_id = t->mbox_lock_id;
- int mbox_modified, ret = 0;
+ bool mbox_modified;
+ int ret = 0;
if (t->save_ctx != NULL)
ret = mbox_transaction_save_commit(t->save_ctx);
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/subscription-file
subscription-file.c, 1.26, 1.27 subscription-file.h, 1.9, 1.10
- Next message: [dovecot-cvs] dovecot/src/login-common client-common.c, 1.3,
1.4 client-common.h, 1.8, 1.9 common.h, 1.8, 1.9 main.c, 1.28,
1.29 master.c, 1.14, 1.15 master.h, 1.4, 1.5 sasl-server.c,
1.9, 1.10 ssl-proxy-gnutls.c, 1.11, 1.12 ssl-proxy-openssl.c,
1.30, 1.31 ssl-proxy.c, 1.6, 1.7 ssl-proxy.h, 1.5, 1.6
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list