[pacman-dev] [PATCH] Implement parsing of the new SigLevel directive

Kerrick Staley mail at kerrickstaley.com
Tue Jul 19 22:09:24 EDT 2011


Dan,
Thanks for the feedback, especially regarding the code layout (your
version is a lot cleaner) and the attempt to print the mutilated
string. I do think that there are too many directives in your version:
it'd be better to have a few directives that address the most likely
cases, and then just provide one directive for each internal flag to
allow advanced configuration. This also makes for a conciser
description in the manpage.

For the signed vs. unsigned issue, one solution that would work just
as well (I think) would be to
typedef int alpm_siglevel_t;
and then use #defines for ALPM_SIG_* and have process_siglevel()
return negative values on error conditions like before
(ALPM_SIG_USE_DEFAULT would have to become 1 << 30). It kills the type
safety though. Just an idea: what do you think?

-Kerrick Staley


More information about the pacman-dev mailing list