Improve mu_scan_datetime
* libmailutils/base/date.c (mu_scan_datetime): Handle optional blocks (%[ %| %], alternatives %( %| %), "any character" wildcards (%?) and strict character matches (%\C). Return MU_ERR_FORMAT on errors in format string. Compute tm->tm_yday. * libmailutils/diag/errors (MU_ERR_FORMAT): New error code. * libmailutils/tests/scantime.c: Print yday. Print input line with diagnostic messages. * libmailutils/tests/scantime.at: Add more tests. * include/mailutils/util.h (MU_DATETIME_RFC822): Split into two formats: MU_DATETIME_FORM_RFC822, for output formatting, and MU_DATETIME_SCAN_RFC822 for input scanning. All uses changed.
Showing
6 changed files
with
426 additions
and
30 deletions
-
Please register or sign in to post a comment