* @retval 1 if the command result was OK
* @retval 0 if NO or BAD
*/
-int imap_code(const char *s)
+bool imap_code(const char *s)
{
return cmd_status(s) == IMAP_CMD_OK;
}
*
* return cached mailbox stats or NULL if create is 0
*/
-struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create)
+struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, bool create)
{
struct ImapStatus *status = NULL;
#ifdef USE_HCACHE
return 0;
}
-int imap_subscribe(char *path, int subscribe)
+int imap_subscribe(char *path, bool subscribe)
{
struct ImapData *idata = NULL;
char buf[LONG_STRING];
int imap_buffy_check(int force, int check_stats);
int imap_status(char *path, int queue);
int imap_search(struct Context *ctx, const struct Pattern *pat);
-int imap_subscribe(char *path, int subscribe);
+int imap_subscribe(char *path, bool subscribe);
int imap_complete(char *dest, size_t dlen, char *path);
int imap_fast_trash(struct Context *ctx, char *dest);
int imap_check(struct ImapData *idata, int force);
int imap_create_mailbox(struct ImapData *idata, char *mailbox);
int imap_rename_mailbox(struct ImapData *idata, struct ImapMbox *mx, const char *newname);
-struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, int create);
+struct ImapStatus *imap_mboxcache_get(struct ImapData *idata, const char *mbox, bool create);
void imap_mboxcache_free(struct ImapData *idata);
int imap_exec_msgset(struct ImapData *idata, const char *pre, const char *post,
int flag, int changed, int invert);
int imap_cmd_start(struct ImapData *idata, const char *cmd);
int imap_cmd_step(struct ImapData *idata);
void imap_cmd_finish(struct ImapData *idata);
-int imap_code(const char *s);
+bool imap_code(const char *s);
const char *imap_cmd_trailer(struct ImapData *idata);
int imap_exec(struct ImapData *idata, const char *cmd, int flags);
int imap_cmd_idle(struct ImapData *idata);
bail:
FREE(&buf);
- return 0;
+ return NULL;
}
/**
bail:
FREE(&buf);
- return 0;
+ return NULL;
}
void imap_utf_encode(struct ImapData *idata, char **s)
sigset_t oldmask;
int rc;
- short imap_passive = option(OPT_IMAP_PASSIVE);
+ bool imap_passive = option(OPT_IMAP_PASSIVE);
set_option(OPT_IMAP_PASSIVE);
set_option(OPT_KEEP_QUIET);