75 const char *delimiter_set)
85 if (*delimiter_set == 0 || full[strcspn(full, delimiter_set)] == 0) {
86 stripped = saved_ext = 0;
89 if ((ratsign = strrchr(stripped,
'@')) != 0)
91 if ((extent =
split_addr(stripped, delimiter_set)) != 0) {
94 *extent = full[strlen(stripped)];
101 memmove(extent, ratsign, strlen(ratsign) + 1);
105 stripped = saved_ext = 0;
109 *extension = saved_ext;
120 int main(
int unused_argc,
char **unused_argv)
185 msg_info(
"wanted: foo-ext -> %s",
"foo");
186 msg_info(
"strip_addr foo-ext -> %s", stripped);
194 msg_info(
"wanted: foo-ext -> %s %s",
"foo",
"-ext");
195 msg_info(
"strip_addr foo-ext -> %s %s", stripped, extension);
212 msg_info(
"wanted: foo-ext@bar -> %s",
"foo@bar");
213 msg_info(
"strip_addr foo-ext@bar -> %s", stripped);
221 msg_info(
"wanted: foo-ext@bar -> %s %s",
"foo@bar",
"-ext");
222 msg_info(
"strip_addr foo-ext@bar -> %s %s", stripped, extension);
231 msg_info(
"wanted: foo+ext@bar -> %s %s",
"foo@bar",
"+ext");
232 msg_info(
"strip_addr foo+ext@bar -> %s %s", stripped, extension);
241 msg_info(
"wanted: foo bar+ext -> %s %s",
"foo bar",
"+ext");
242 msg_info(
"strip_addr foo bar+ext -> %s %s", stripped, extension);
char * mystrdup(const char *str)
NORETURN msg_panic(const char *fmt,...)
int main(int argc, char **argv)
char * var_double_bounce_sender
#define DEF_DOUBLE_BOUNCE
char * strip_addr_internal(const char *full, char **extension, const char *delimiter_set)
void msg_info(const char *fmt,...)