Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / rec_attr_map.c
blobe83f00aa031383ee5f09c2aeae63a251c2dfd3a8
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* rec_attr_map 3
6 /* SUMMARY
7 /* map named attribute record type to pseudo record type
8 /* SYNOPSIS
9 /* #include <rec_attr_map.h>
11 /* int rec_attr_map(attr_name)
12 /* const char *attr_name;
13 /* DESCRIPTION
14 /* rec_attr_map() maps the record type of a named attribute to
15 /* a pseudo record type, if such a mapping exists. The result
16 /* is the pseudo record type in case of success, 0 on failure.
17 /* LICENSE
18 /* .ad
19 /* .fi
20 /* The Secure Mailer license must be distributed with this software.
21 /* AUTHOR(S)
22 /* Wietse Venema
23 /* IBM T.J. Watson Research
24 /* P.O. Box 704
25 /* Yorktown Heights, NY 10598, USA
26 /*--*/
28 /* System library. */
30 #include <sys_defs.h>
31 #include <string.h>
33 /* Global library. */
35 #include <mail_proto.h>
36 #include <rec_type.h>
37 #include <rec_attr_map.h>
39 /* rec_attr_map - map named attribute to pseudo record type */
41 int rec_attr_map(const char *attr_name)
43 if (strcmp(attr_name, MAIL_ATTR_DSN_ORCPT) == 0) {
44 return (REC_TYPE_DSN_ORCPT);
45 } else if (strcmp(attr_name, MAIL_ATTR_DSN_NOTIFY) == 0) {
46 return (REC_TYPE_DSN_NOTIFY);
47 } else if (strcmp(attr_name, MAIL_ATTR_DSN_ENVID) == 0) {
48 return (REC_TYPE_DSN_ENVID);
49 } else if (strcmp(attr_name, MAIL_ATTR_DSN_RET) == 0) {
50 return (REC_TYPE_DSN_RET);
51 } else if (strcmp(attr_name, MAIL_ATTR_CREATE_TIME) == 0) {
52 return (REC_TYPE_CTIME);
53 } else {
54 return (0);