isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit 7619705428aabe91573c433195cda30146a89efa
parent 090ba0caa3f52579919f1c43c1e948d5f1853446
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Mon,  6 Jun 2022 12:37:47 +0200

whitespace fixes

consistently surround '|' with spaces.

Diffstat:
Msrc/config.c | 2+-
Msrc/drv_maildir.c | 12++++++------
Msrc/main.c | 14+++++++-------
Msrc/sync.c | 2+-
4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/config.c b/src/config.c @@ -403,7 +403,7 @@ merge_ops( int cops, int ops[], const char *chan_name ) if (!(cops & OP_MASK_TYPE)) cops |= OP_DFLT_TYPE; else if (!(cops & XOP_MASK_DIR)) - cops |= XOP_PULL|XOP_PUSH; + cops |= XOP_PULL | XOP_PUSH; if (cops & XOP_PULL) ops[N] |= cops & OP_MASK_TYPE; if (cops & XOP_PUSH) diff --git a/src/drv_maildir.c b/src/drv_maildir.c @@ -1280,7 +1280,7 @@ maildir_open_box( store_t *gctx, nfsnprintf( uvpath, sizeof(uvpath), "%s/.uidvalidity", ctx->path ); #ifndef USE_DB - if ((ctx->uvfd = open( uvpath, O_RDWR|O_CREAT, 0600 )) < 0) { + if ((ctx->uvfd = open( uvpath, O_RDWR | O_CREAT, 0600 )) < 0) { sys_error( "Maildir error: cannot write %s", uvpath ); cb( DRV_BOX_BAD, UIDVAL_BAD, aux ); return; @@ -1291,11 +1291,11 @@ maildir_open_box( store_t *gctx, nfsnprintf( uvpath, sizeof(uvpath), "%s/.isyncuidmap.db", ctx->path ); if ((ctx->uvfd = open( uvpath, O_RDWR, 0600 )) < 0) { if (ctx->conf->alt_map) { - if ((ctx->uvfd = open( uvpath, O_RDWR|O_CREAT, 0600 )) >= 0) + if ((ctx->uvfd = open( uvpath, O_RDWR | O_CREAT, 0600 )) >= 0) goto dbok; } else { nfsnprintf( uvpath, sizeof(uvpath), "%s/.uidvalidity", ctx->path ); - if ((ctx->uvfd = open( uvpath, O_RDWR|O_CREAT, 0600 )) >= 0) + if ((ctx->uvfd = open( uvpath, O_RDWR | O_CREAT, 0600 )) >= 0) goto fnok; } sys_error( "Maildir error: cannot write %s", uvpath ); @@ -1484,7 +1484,7 @@ maildir_rescan( maildir_store_t *ctx ) msgapp = &msg->next; } else { debug( " updating message %u\n", msg->uid ); - msg->status &= ~(M_FLAGS|M_RECENT); + msg->status &= ~(M_FLAGS | M_RECENT); free( msg->base ); free( msg->msgid ); maildir_init_msg( ctx, msg, msglist.array.data + i ); @@ -1605,7 +1605,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash, maildir_make_flags( ctx->conf->info_delimiter, data->flags, fbuf ); nfsnprintf( buf, sizeof(buf), "%s/tmp/%s%s", box, base, fbuf ); - if ((fd = open( buf, O_WRONLY|O_CREAT|O_EXCL, 0600 )) < 0) { + if ((fd = open( buf, O_WRONLY | O_CREAT | O_EXCL, 0600 )) < 0) { if (errno != ENOENT || !to_trash) { sys_error( "Maildir error: cannot create %s", buf ); free( data->data ); @@ -1617,7 +1617,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash, cb( ret, 0, aux ); return; } - if ((fd = open( buf, O_WRONLY|O_CREAT|O_EXCL, 0600 )) < 0) { + if ((fd = open( buf, O_WRONLY | O_CREAT | O_EXCL, 0600 )) < 0) { sys_error( "Maildir error: cannot create %s", buf ); free( data->data ); cb( DRV_BOX_BAD, 0, aux ); diff --git a/src/main.c b/src/main.c @@ -230,7 +230,7 @@ main( int argc, char **argv ) cops |= XOP_PUSH, mvars->ops[F] |= XOP_HAVE_TYPE; } else if (starts_with( opt, -1, "create", 6 )) { opt += 6; - op = OP_CREATE|XOP_HAVE_CREATE; + op = OP_CREATE | XOP_HAVE_CREATE; lcop: if (!*opt) cops |= op; @@ -247,7 +247,7 @@ main( int argc, char **argv ) mvars->ops[F] |= op & (XOP_HAVE_CREATE | XOP_HAVE_REMOVE | XOP_HAVE_EXPUNGE | XOP_HAVE_EXPUNGE_SOLO); } else if (starts_with( opt, -1, "remove", 6 )) { opt += 6; - op = OP_REMOVE|XOP_HAVE_REMOVE; + op = OP_REMOVE | XOP_HAVE_REMOVE; goto lcop; } else if (starts_with( opt, -1, "expunge-solo", 12 )) { opt += 12; @@ -255,7 +255,7 @@ main( int argc, char **argv ) goto lcop; } else if (starts_with( opt, -1, "expunge", 7 )) { opt += 7; - op = OP_EXPUNGE|XOP_HAVE_EXPUNGE; + op = OP_EXPUNGE | XOP_HAVE_EXPUNGE; goto lcop; } else if (!strcmp( opt, "no-expunge-solo" )) { mvars->ops[F] |= XOP_EXPUNGE_SOLO_NOOP | XOP_HAVE_EXPUNGE_SOLO; @@ -341,7 +341,7 @@ main( int argc, char **argv ) config = argv[oind++]; break; case 'C': - op = OP_CREATE|XOP_HAVE_CREATE; + op = OP_CREATE | XOP_HAVE_CREATE; cop: if (*ochar == 'f') mvars->ops[F] |= op, ochar++; @@ -358,16 +358,16 @@ main( int argc, char **argv ) mvars->ops[F] |= op & (XOP_HAVE_CREATE | XOP_HAVE_REMOVE | XOP_HAVE_EXPUNGE | XOP_HAVE_EXPUNGE_SOLO); break; case 'R': - op = OP_REMOVE|XOP_HAVE_REMOVE; + op = OP_REMOVE | XOP_HAVE_REMOVE; goto cop; case 'x': op = OP_EXPUNGE_SOLO | XOP_HAVE_EXPUNGE_SOLO; goto cop; case 'X': - op = OP_EXPUNGE|XOP_HAVE_EXPUNGE; + op = OP_EXPUNGE | XOP_HAVE_EXPUNGE; goto cop; case 'F': - cops |= XOP_PULL|XOP_PUSH; + cops |= XOP_PULL | XOP_PUSH; mvars->ops[F] |= XOP_HAVE_TYPE; break; case '0': diff --git a/src/sync.c b/src/sync.c @@ -1792,7 +1792,7 @@ static void box_closed_p2( sync_vars_t *svars, int t ); static void sync_close( sync_vars_t *svars, int t ) { - if ((~svars->state[t] & (ST_FOUND_NEW|ST_SENT_TRASH)) || svars->trash_pending[t] || + if ((~svars->state[t] & (ST_FOUND_NEW | ST_SENT_TRASH)) || svars->trash_pending[t] || (~svars->state[t^1] & (ST_SENT_NEW | ST_SENT_FLAGS)) || svars->new_pending[t^1] || svars->flags_pending[t^1]) return;