diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-03-11 23:52:43 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2013-03-11 23:52:43 +0200 |
commit | 7c10eca883faa5dd5b01bf1e50b04abb792a6639 (patch) | |
tree | 51fc8746681d42bca8034f88510ff7f144215e70 /src | |
parent | 10a5f20232d2a57beb0a50b38b1d7196a7f5236e (diff) | |
download | wydawca-7c10eca883faa5dd5b01bf1e50b04abb792a6639.tar.gz wydawca-7c10eca883faa5dd5b01bf1e50b04abb792a6639.tar.bz2 |
Follow up to 87602f54.
Fix minor bugs. Update the testsuite. All tests pass now.
* modules/mailutils/mod_mailutils.c (cb_statistics): Remove. Use
wy_cb_statistics.
(expand_email_admin, expand_email_owner): Add missing functions.
* src/config.c (wy_cb_statistics): New function.
(wydawca_kw): Restore "statistics" statement.
* src/dictionary.c (dictionary_lookup): Fix debug levels.
* src/wydawca.h (wy_cb_statistics): New proto.
* tests/atlocal.in (wydawca_expandmeta): Expand @WD_MODDIR@
* tests/check-notify.at: Create notify.rc from notify.rcin
* tests/notify-upl.at: Likewise.
* tests/mailstats.at: Likewise.
* tests/upload-dry.at: Fix the expected output.
* tests/etc/mailstats.rc: Rename to tests/etc/mailstats.rcin.
* tests/etc/notify.rc: Rename to tests/etc/notify.rcin.
* tests/etc/Makefile.am: Update.
* tests/etc/wydawca.rcin: Update to the new syntax.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.c | 10 | ||||
-rw-r--r-- | src/dictionary.c | 4 | ||||
-rw-r--r-- | src/wydawca.h | 3 |
3 files changed, 15 insertions, 2 deletions
diff --git a/src/config.c b/src/config.c index 8dbc788..b89beff 100644 --- a/src/config.c +++ b/src/config.c @@ -442,2 +442,9 @@ parse_statmask(grecs_locus_t *loc, grecs_value_t *val, unsigned long *pmask) +int +wy_cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node, + void *varptr, void *cb_data) +{ + return parse_statmask(&node->locus, node->v.value, varptr); +} + @@ -1296,2 +1303,5 @@ static struct grecs_keyword wydawca_kw[] = { + { "statistics", N_("items"), N_("Print these stats at the end of run"), + grecs_type_string, GRECS_DFLT, &print_stats, 0, wy_cb_statistics }, + { "sql", N_("id: string"), N_("Define SQL database"), diff --git a/src/dictionary.c b/src/dictionary.c index 4f18267..0b96543 100644 --- a/src/dictionary.c +++ b/src/dictionary.c @@ -131,6 +131,6 @@ dictionary_lookup(struct dictionary *dict, void *handle, const char *cmd) if (cmd) - wy_debug(1, (_("dictionary lookup: %s \"%s\""), + wy_debug(2, (_("dictionary lookup: %s \"%s\""), mp->name, cmd)); else - wy_debug(1, (_("dictionary lookup: %s"), + wy_debug(2, (_("dictionary lookup: %s"), mp->name)); diff --git a/src/wydawca.h b/src/wydawca.h index 89d0458..08126ac 100644 --- a/src/wydawca.h +++ b/src/wydawca.h @@ -277,2 +277,5 @@ enum wydawca_stat { #define STAT_MASK_ALL (STAT_MASK(MAX_STAT) - 1) + +int wy_cb_statistics(enum grecs_callback_command cmd, grecs_node_t *node, + void *varptr, void *cb_data); |