whitespace fixes

consistently surround '|' with spaces.
This commit is contained in:
Oswald Buddenhagen 2022-06-06 12:37:47 +02:00
parent 090ba0caa3
commit 7619705428
4 changed files with 15 additions and 15 deletions

View File

@ -403,7 +403,7 @@ merge_ops( int cops, int ops[], const char *chan_name )
if (!(cops & OP_MASK_TYPE)) if (!(cops & OP_MASK_TYPE))
cops |= OP_DFLT_TYPE; cops |= OP_DFLT_TYPE;
else if (!(cops & XOP_MASK_DIR)) else if (!(cops & XOP_MASK_DIR))
cops |= XOP_PULL|XOP_PUSH; cops |= XOP_PULL | XOP_PUSH;
if (cops & XOP_PULL) if (cops & XOP_PULL)
ops[N] |= cops & OP_MASK_TYPE; ops[N] |= cops & OP_MASK_TYPE;
if (cops & XOP_PUSH) if (cops & XOP_PUSH)

View File

@ -1280,7 +1280,7 @@ maildir_open_box( store_t *gctx,
nfsnprintf( uvpath, sizeof(uvpath), "%s/.uidvalidity", ctx->path ); nfsnprintf( uvpath, sizeof(uvpath), "%s/.uidvalidity", ctx->path );
#ifndef USE_DB #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 ); sys_error( "Maildir error: cannot write %s", uvpath );
cb( DRV_BOX_BAD, UIDVAL_BAD, aux ); cb( DRV_BOX_BAD, UIDVAL_BAD, aux );
return; return;
@ -1291,11 +1291,11 @@ maildir_open_box( store_t *gctx,
nfsnprintf( uvpath, sizeof(uvpath), "%s/.isyncuidmap.db", ctx->path ); nfsnprintf( uvpath, sizeof(uvpath), "%s/.isyncuidmap.db", ctx->path );
if ((ctx->uvfd = open( uvpath, O_RDWR, 0600 )) < 0) { if ((ctx->uvfd = open( uvpath, O_RDWR, 0600 )) < 0) {
if (ctx->conf->alt_map) { 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; goto dbok;
} else { } else {
nfsnprintf( uvpath, sizeof(uvpath), "%s/.uidvalidity", ctx->path ); 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; goto fnok;
} }
sys_error( "Maildir error: cannot write %s", uvpath ); sys_error( "Maildir error: cannot write %s", uvpath );
@ -1484,7 +1484,7 @@ maildir_rescan( maildir_store_t *ctx )
msgapp = &msg->next; msgapp = &msg->next;
} else { } else {
debug( " updating message %u\n", msg->uid ); debug( " updating message %u\n", msg->uid );
msg->status &= ~(M_FLAGS|M_RECENT); msg->status &= ~(M_FLAGS | M_RECENT);
free( msg->base ); free( msg->base );
free( msg->msgid ); free( msg->msgid );
maildir_init_msg( ctx, msg, msglist.array.data + i ); 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 ); maildir_make_flags( ctx->conf->info_delimiter, data->flags, fbuf );
nfsnprintf( buf, sizeof(buf), "%s/tmp/%s%s", box, base, 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) { if (errno != ENOENT || !to_trash) {
sys_error( "Maildir error: cannot create %s", buf ); sys_error( "Maildir error: cannot create %s", buf );
free( data->data ); free( data->data );
@ -1617,7 +1617,7 @@ maildir_store_msg( store_t *gctx, msg_data_t *data, int to_trash,
cb( ret, 0, aux ); cb( ret, 0, aux );
return; 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 ); sys_error( "Maildir error: cannot create %s", buf );
free( data->data ); free( data->data );
cb( DRV_BOX_BAD, 0, aux ); cb( DRV_BOX_BAD, 0, aux );

View File

@ -230,7 +230,7 @@ main( int argc, char **argv )
cops |= XOP_PUSH, mvars->ops[F] |= XOP_HAVE_TYPE; cops |= XOP_PUSH, mvars->ops[F] |= XOP_HAVE_TYPE;
} else if (starts_with( opt, -1, "create", 6 )) { } else if (starts_with( opt, -1, "create", 6 )) {
opt += 6; opt += 6;
op = OP_CREATE|XOP_HAVE_CREATE; op = OP_CREATE | XOP_HAVE_CREATE;
lcop: lcop:
if (!*opt) if (!*opt)
cops |= op; 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); 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 )) { } else if (starts_with( opt, -1, "remove", 6 )) {
opt += 6; opt += 6;
op = OP_REMOVE|XOP_HAVE_REMOVE; op = OP_REMOVE | XOP_HAVE_REMOVE;
goto lcop; goto lcop;
} else if (starts_with( opt, -1, "expunge-solo", 12 )) { } else if (starts_with( opt, -1, "expunge-solo", 12 )) {
opt += 12; opt += 12;
@ -255,7 +255,7 @@ main( int argc, char **argv )
goto lcop; goto lcop;
} else if (starts_with( opt, -1, "expunge", 7 )) { } else if (starts_with( opt, -1, "expunge", 7 )) {
opt += 7; opt += 7;
op = OP_EXPUNGE|XOP_HAVE_EXPUNGE; op = OP_EXPUNGE | XOP_HAVE_EXPUNGE;
goto lcop; goto lcop;
} else if (!strcmp( opt, "no-expunge-solo" )) { } else if (!strcmp( opt, "no-expunge-solo" )) {
mvars->ops[F] |= XOP_EXPUNGE_SOLO_NOOP | XOP_HAVE_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++]; config = argv[oind++];
break; break;
case 'C': case 'C':
op = OP_CREATE|XOP_HAVE_CREATE; op = OP_CREATE | XOP_HAVE_CREATE;
cop: cop:
if (*ochar == 'f') if (*ochar == 'f')
mvars->ops[F] |= op, ochar++; 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); mvars->ops[F] |= op & (XOP_HAVE_CREATE | XOP_HAVE_REMOVE | XOP_HAVE_EXPUNGE | XOP_HAVE_EXPUNGE_SOLO);
break; break;
case 'R': case 'R':
op = OP_REMOVE|XOP_HAVE_REMOVE; op = OP_REMOVE | XOP_HAVE_REMOVE;
goto cop; goto cop;
case 'x': case 'x':
op = OP_EXPUNGE_SOLO | XOP_HAVE_EXPUNGE_SOLO; op = OP_EXPUNGE_SOLO | XOP_HAVE_EXPUNGE_SOLO;
goto cop; goto cop;
case 'X': case 'X':
op = OP_EXPUNGE|XOP_HAVE_EXPUNGE; op = OP_EXPUNGE | XOP_HAVE_EXPUNGE;
goto cop; goto cop;
case 'F': case 'F':
cops |= XOP_PULL|XOP_PUSH; cops |= XOP_PULL | XOP_PUSH;
mvars->ops[F] |= XOP_HAVE_TYPE; mvars->ops[F] |= XOP_HAVE_TYPE;
break; break;
case '0': case '0':

View File

@ -1792,7 +1792,7 @@ static void box_closed_p2( sync_vars_t *svars, int t );
static void static void
sync_close( sync_vars_t *svars, int t ) 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]) (~svars->state[t^1] & (ST_SENT_NEW | ST_SENT_FLAGS)) || svars->new_pending[t^1] || svars->flags_pending[t^1])
return; return;