* A match means it's our responsibility to append to the file.
*
* Returns:
- * 1: Yes, we can append to the file
- * 0: No, appending isn't possible
+ * true: Yes, we can append to the file
+ * false: No, appending isn't possible
*/
-int
+bool
mutt_comp_can_append (CONTEXT *ctx)
{
if (!ctx)
- return 0;
+ return false;
/* If this succeeds, we know there's an open-hook */
COMPRESS_INFO *ci = set_compress_info (ctx);
if (!ci)
- return 0;
+ return false;
/* We have an open-hook, so to append we need an append-hook,
* or a close-hook. */
if (ci->append || ci->close)
- return 1;
+ return true;
mutt_error (_("Cannot append without an append-hook or close-hook : %s"), ctx->path);
- return 0;
+ return false;
}
/**
#ifndef _MUTT_COMPRESS_H
#define _MUTT_COMPRESS_H 1
-int mutt_comp_can_append (CONTEXT *ctx);
+bool mutt_comp_can_append (CONTEXT *ctx);
int mutt_comp_can_read (const char *path);
int mutt_comp_valid_command (const char *cmd);