common: Add function is_valid_mailbox_mem.
authorWerner Koch <wk@gnupg.org>
Fri, 20 Mar 2015 14:39:49 +0000 (15:39 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 20 Mar 2015 14:40:09 +0000 (15:40 +0100)
commita0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805
tree257f7ad8c0a7169def38fc5012859f109d8c2e30
parent783a4a98378fa1aa222d5cb7427dd37151feb08b
common: Add function is_valid_mailbox_mem.

* common/mbox-util.c (mem_count_chr): New.
(my_memstr): New.
(has_invalid_email_chars): Change args to work on a buffer.
(is_valid_mailbox_mem): New.
(is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.

Signed-off-by: Werner Koch <wk@gnupg.org>
common/mbox-util.c
common/mbox-util.h