Back to index

courier  0.68.2
Defines | Functions
maildirdelfolder.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <ctype.h>
#include <errno.h>
#include "maildirmisc.h"

Go to the source code of this file.

Defines

#define dirent   direct
#define NAMLEN(dirent)   (dirent)->d_namlen

Functions

int maildir_deletefolder (const char *maildir, const char *folder)

Define Documentation

#define dirent   direct

Definition at line 15 of file maildirdelfolder.c.

#define NAMLEN (   dirent)    (dirent)->d_namlen

Definition at line 16 of file maildirdelfolder.c.


Function Documentation

int maildir_deletefolder ( const char *  maildir,
const char *  folder 
)

Definition at line 41 of file maildirdelfolder.c.

{
char   *s;
int    rc;

       if (*folder == '.')
       {
              errno=EINVAL;
              return (-1);
       }

       s=malloc(strlen(maildir)+strlen(folder)+3);
       if (!s)       return (-1);
       strcat(strcat(strcpy(s, maildir), "/."), folder);

       rc=maildir_del(s);
       free(s);
       return (rc);
}

Here is the call graph for this function: