* link_is_dir - Does this symlink point to a directory?
* @param folder Folder
* @param path Link name
- * @retval 1 Links to a directory
- * @retval 0 Otherwise
+ * @retval true Links to a directory
+ * @retval false Otherwise
*/
-static int link_is_dir(const char *folder, const char *path)
+static bool link_is_dir(const char *folder, const char *path)
{
struct stat st;
char fullpath[PATH_MAX];
if (stat(fullpath, &st) == 0)
return S_ISDIR(st.st_mode);
- else
- return 0;
+
+ return false;
}
/**
* @param[out] redraw Set of #REDRAW_FULL if the screen may need redrawing
* @retval true If message contains inline PGP content
*/
-static int check_traditional_pgp(struct Header *h, int *redraw)
+static bool check_traditional_pgp(struct Header *h, int *redraw)
{
- int rc = 0;
+ bool rc = false;
h->security |= PGP_TRADITIONAL_CHECKED;
{
h->security = crypt_query(h->content);
*redraw |= REDRAW_FULL;
- rc = 1;
+ rc = true;
}
h->security |= PGP_TRADITIONAL_CHECKED;
* @param[out] redraw Set of #REDRAW_FULL if the screen may need redrawing
* @retval true If message contains inline PGP content
*/
-int mutt_check_traditional_pgp(struct Header *h, int *redraw)
+bool mutt_check_traditional_pgp(struct Header *h, int *redraw)
{
- int rc = 0;
+ bool rc = false;
if (h && !(h->security & PGP_TRADITIONAL_CHECKED))
rc = check_traditional_pgp(h, redraw);
else
void ci_bounce_message(struct Header *h);
void mutt_check_stats(void);
-int mutt_check_traditional_pgp(struct Header *h, int *redraw);
+bool mutt_check_traditional_pgp(struct Header *h, int *redraw);
void mutt_display_address(struct Envelope *env);
int mutt_display_message(struct Header *cur);
int mutt_edit_content_type(struct Header *h, struct Body *b, FILE *fp);
* @param g Group to test
* @retval true If the Group is empty
*/
-static int empty_group(struct Group *g)
+static bool empty_group(struct Group *g)
{
if (!g)
- return -1;
+ return true;
return !g->as && !g->rs;
}
* @param buf String to check
* @retval true If it is
*/
-static int is_ansi(unsigned char *buf)
+static bool is_ansi(unsigned char *buf)
{
while (*buf && (isdigit(*buf) || *buf == ';'))
buf++;