Postfix3.3.1
rcpt_print.c
[詳解]
1 /*++
2 /* NAME
3 /* rcpt_print
4 /* SUMMARY
5 /* write RECIPIENT structure to stream
6 /* SYNOPSIS
7 /* #include <rcpt_print.h>
8 /*
9 /* int rcpt_print(print_fn, stream, flags, ptr)
10 /* ATTR_PRINT_MASTER_FN print_fn;
11 /* VSTREAM *stream;
12 /* int flags;
13 /* void *ptr;
14 /* DESCRIPTION
15 /* rcpt_print() writes the contents of a RECIPIENT structure
16 /* to the named stream using the specified attribute print
17 /* routine. rcpt_print() is meant to be passed as a call-back
18 /* to attr_print(), thusly:
19 /*
20 /* ... SEND_ATTR_FUNC(rcpt_print, (void *) recipient), ...
21 /* DIAGNOSTICS
22 /* Fatal: out of memory.
23 /* LICENSE
24 /* .ad
25 /* .fi
26 /* The Secure Mailer license must be distributed with this
27 /* software.
28 /* AUTHOR(S)
29 /* Wietse Venema
30 /* IBM T.J. Watson Research
31 /* P.O. Box 704
32 /* Yorktown Heights, NY 10598, USA
33 /*--*/
34 
35 /* System library. */
36 
37 #include <sys_defs.h>
38 
39 /* Utility library. */
40 
41 #include <attr.h>
42 
43 /* Global library. */
44 
45 #include <mail_proto.h>
46 #include <recipient_list.h>
47 #include <rcpt_print.h>
48 
49 /* rcpt_print - write recipient to stream */
50 
52  int flags, void *ptr)
53 {
54  RECIPIENT *rcpt = (RECIPIENT *) ptr;
55  int ret;
56 
57  /*
58  * The attribute order is determined by backwards compatibility. It can
59  * be sanitized after all the ad-hoc recipient read/write code is
60  * replaced.
61  */
62  ret =
63  print_fn(fp, flags | ATTR_FLAG_MORE,
70  return (ret);
71 }
const char * orig_addr
int(* ATTR_PRINT_MASTER_FN)(VSTREAM *, int,...)
Definition: attr.h:33
#define MAIL_ATTR_DSN_NOTIFY
Definition: mail_proto.h:275
#define MAIL_ATTR_ORCPT
Definition: mail_proto.h:133
const char * address
#define ATTR_TYPE_END
Definition: attr.h:39
#define MAIL_ATTR_DSN_ORCPT
Definition: mail_proto.h:276
#define SEND_ATTR_INT(name, val)
Definition: attr.h:63
#define SEND_ATTR_LONG(name, val)
Definition: attr.h:67
#define MAIL_ATTR_RECIP
Definition: mail_proto.h:134
const char * dsn_orcpt
int rcpt_print(ATTR_PRINT_MASTER_FN print_fn, VSTREAM *fp, int flags, void *ptr)
Definition: rcpt_print.c:51
#define ATTR_FLAG_MORE
Definition: attr.h:101
#define SEND_ATTR_STR(name, val)
Definition: attr.h:64
#define MAIL_ATTR_OFFSET
Definition: mail_proto.h:138