7 /* write RECIPIENT structure to stream
9 /* #include <rcpt_print.h>
11 /* int rcpt_print(print_fn, stream, flags, ptr)
12 /* ATTR_PRINT_MASTER_FN print_fn;
17 /* rcpt_print() writes the contents of a RECIPIENT structure
18 /* to the named stream using the specified attribute print
19 /* routine. rcpt_print() is meant to be passed as a call-back
20 /* to attr_print(), thusly:
22 /* ... ATTR_TYPE_FUNC, rcpt_print, (void *) recipient, ...
24 /* Fatal: out of memory.
28 /* The Secure Mailer license must be distributed with this
31 /* Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown
32 /* Heights, NY 10598, USA
39 /* Utility library. */
45 #include <mail_proto.h>
46 #include <recipient_list.h>
47 #include <rcpt_print.h>
49 /* rcpt_print - write recipient to stream */
51 int rcpt_print(ATTR_PRINT_MASTER_FN print_fn
, VSTREAM
*fp
,
54 RECIPIENT
*rcpt
= (RECIPIENT
*) ptr
;
58 * The attribute order is determined by backwards compatibility. It can
59 * be sanitized after all the ad-hoc recipient read/write code is
63 print_fn(fp
, flags
| ATTR_FLAG_MORE
,
64 ATTR_TYPE_STR
, MAIL_ATTR_ORCPT
, rcpt
->orig_addr
,
65 ATTR_TYPE_STR
, MAIL_ATTR_RECIP
, rcpt
->address
,
66 ATTR_TYPE_LONG
, MAIL_ATTR_OFFSET
, rcpt
->offset
,
67 ATTR_TYPE_STR
, MAIL_ATTR_DSN_ORCPT
, rcpt
->dsn_orcpt
,
68 ATTR_TYPE_INT
, MAIL_ATTR_DSN_NOTIFY
, rcpt
->dsn_notify
,