Improve conversion between file mode and safety criteria and vice versa.
* include/mailutils/util.h (mu_file_safety_code_to_name): New proto. * libmailutils/base/filesafety.c: Remove static functions which checked file mode bits. Use safety_checker.mode for that directly. (mu_file_safety_code_to_name): New function. (mu_file_mode_to_safety_criteria): Bugfix. (mu_safety_criteria_to_file_mode): Change algorithm. * libmailutils/tests/.gitignore: Update * libmailutils/tests/fsaftomod.at: New file. * libmailutils/tests/fsaftomod.c: New file. * libmailutils/tests/modtofsaf.at: New file. * libmailutils/tests/modtofsaf.c: New file. * libmailutils/tests/Makefile.am (noinst_PROGRAMS): Add fsaftomod and modtofsaf. (TESTSUITE_AT): Add fsaftomod.at and modtofsaf.at * libmailutils/tests/testsuite.at: Include fsaftomod.at and modtofsaf.at
Showing
9 changed files
with
249 additions
and
34 deletions
libmailutils/tests/fsaftomod.at
0 → 100644
libmailutils/tests/fsaftomod.c
0 → 100644
libmailutils/tests/modtofsaf.at
0 → 100644
libmailutils/tests/modtofsaf.c
0 → 100644
-
Please register or sign in to post a comment