75 static int is_821_dot_string(
const char *local_part,
const char *end,
int flags)
85 if (local_part == end || local_part[0] == 0 || local_part[0] ==
'.')
87 for (cp = local_part; cp < end && (ch = *(
unsigned char *) cp) != 0; cp++) {
88 if (ch ==
'.' && cp[1] ==
'.')
96 if (ch ==
'<' || ch ==
'>'
97 || ch ==
'(' || ch ==
')'
98 || ch ==
'[' || ch ==
']'
99 || ch ==
'\\' || ch ==
','
100 || ch ==
';' || ch ==
':'
111 static VSTRING *make_821_quoted_string(
VSTRING *dst,
const char *local_part,
112 const char *end,
int flags)
122 for (cp = local_part; cp < end && (ch = *(
unsigned char *) cp) != 0; cp++) {
124 || ch ==
'\r' || ch ==
'\n' || ch ==
'"' || ch ==
'\\')
144 if ((at = strrchr(addr,
'@')) == 0)
145 at = addr + strlen(addr);
148 if (is_821_dot_string(addr, at, flags)) {
#define QUOTE_FLAG_8BITCLEAN
#define vstring_fgets_nonl(s, p)
VSTRING * quote_821_local_flags(VSTRING *dst, const char *addr, int flags)
int main(int argc, char **argv)
#define QUOTE_FLAG_EXPOSE_AT
#define VSTRING_TERMINATE(vp)
#define VSTRING_ADDCH(vp, ch)
VSTREAM * vstream_fprintf(VSTREAM *stream, const char *fmt,...)
#define VSTRING_RESET(vp)
VSTRING * vstring_alloc(ssize_t len)
int vstream_fflush(VSTREAM *stream)
#define quote_821_local(dst, src)
#define QUOTE_FLAG_APPEND
VSTRING * vstring_strcat(VSTRING *vp, const char *src)