Back to index

courier  0.68.2
Defines | Functions
pcpacl.c File Reference
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "pcp.h"

Go to the source code of this file.

Defines

#define NAME(n, s)   if (flags & (n)) {if (*buf) strcat(buf, " "); strcat(buf,s);}
#define NAME(n, s)   if (strcasecmp(c, s) == 0) return (n)

Functions

void pcp_acl_name (int flags, char *buf)
int pcp_acl_num (const char *c)

Define Documentation

#define NAME (   n,
 
)    if (flags & (n)) {if (*buf) strcat(buf, " "); strcat(buf,s);}
#define NAME (   n,
 
)    if (strcasecmp(c, s) == 0) return (n)

Function Documentation

void pcp_acl_name ( int  flags,
char *  buf 
)

Definition at line 12 of file pcpacl.c.

{
#define NAME(n,s) if (flags & (n)) {if (*buf) strcat(buf, " "); strcat(buf,s);}

       NAME(PCP_ACL_MODIFY, "MODIFY");
       NAME(PCP_ACL_CONFLICT, "CONFLICT");
       NAME(PCP_ACL_LIST, "LIST");
       NAME(PCP_ACL_RETR, "RETR");
       NAME(PCP_ACL_NONE, "NONE");
#undef NAME
}

Here is the caller graph for this function:

int pcp_acl_num ( const char *  c)

Definition at line 24 of file pcpacl.c.

{
#define NAME(n,s) if (strcasecmp(c, s) == 0) return (n)

       NAME(PCP_ACL_MODIFY, "MODIFY");
       NAME(PCP_ACL_CONFLICT, "CONFLICT");
       NAME(PCP_ACL_LIST, "LIST");
       NAME(PCP_ACL_RETR, "RETR");
       NAME(PCP_ACL_NONE, "NONE");
#undef NAME
       return (0);
}

Here is the caller graph for this function: