Back to index

courier  0.68.2
Functions
maildirflags.c File Reference
#include "config.h"
#include <sys/types.h>
#include <string.h>

Go to the source code of this file.

Functions

int maildir_hasflag (const char *filename, char flag)

Function Documentation

int maildir_hasflag ( const char *  filename,
char  flag 
)

Definition at line 11 of file maildirflags.c.

{
       const char *p=strrchr(filename, '/');

       if (p)
              filename=p+1;

       p=strrchr(filename, MDIRSEP[0]);
       if (p && strncmp(p, MDIRSEP "2,", 3) == 0 &&
           strchr(p+3, flag))
              return (1);
       return (0);
}