7 /* address case folding
9 /* #include <fold_addr.h>
11 /* char *fold_addr(addr, flags)
15 /* fold_addr() case folds an address according to the options
16 /* specified with \fIflags\fR. The result value is the address
21 /* Null-terminated writable string with the address.
23 /* Zero or the bit-wise OR of:
26 /* Case fold the address local part.
28 /* Case fold the address domain part.
30 /* Alias for (FOLD_ADDR_USER | FOLD_ADDR_HOST).
33 /* msg(3) diagnostics interface
35 /* Fatal errors: memory allocation problem.
39 /* The Secure Mailer license must be distributed with this software.
42 /* IBM T.J. Watson Research
44 /* Yorktown Heights, NY 10598, USA
52 /* Utility library. */
54 #include <stringops.h>
58 #include <fold_addr.h>
60 /* fold_addr - case fold mail address */
62 char *fold_addr(char *addr
, int flags
)
67 * Fold the address as appropriate.
69 switch (flags
& FOLD_ADDR_ALL
) {
71 if ((cp
= strrchr(addr
, '@')) != 0)
75 if ((cp
= strrchr(addr
, '@')) != 0) {
82 case FOLD_ADDR_USER
| FOLD_ADDR_HOST
: