aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/config.c10
-rw-r--r--src/dictionary.c4
-rw-r--r--src/wydawca.h3
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
@@ -440,6 +440,13 @@ parse_statmask(grecs_locus_t *loc, grecs_value_t *val, unsigned long *pmask)
return err;
}
+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);
+}
+
static int
cb_sql_host(enum grecs_callback_command cmd, grecs_node_t *node,
@@ -1294,6 +1301,9 @@ static struct grecs_keyword wydawca_kw[] = {
N_("Control implicit signature archivation"),
grecs_type_bool, GRECS_DFLT, &archive_signatures },
+ { "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"),
grecs_type_section, GRECS_DFLT, NULL, 0, cb_sql, NULL, sql_kw },
diff --git a/src/dictionary.c b/src/dictionary.c
index 4f18267..0b96543 100644
--- a/src/dictionary.c
+++ b/src/dictionary.c
@@ -129,10 +129,10 @@ dictionary_lookup(struct dictionary *dict, void *handle, const char *cmd)
struct dictionary_descr *mp = dictionary_tab + dict->type;
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));
if (!dict->init_passed) {
diff --git a/src/wydawca.h b/src/wydawca.h
index 89d0458..08126ac 100644
--- a/src/wydawca.h
+++ b/src/wydawca.h
@@ -275,6 +275,9 @@ enum wydawca_stat {
#define STAT_MASK(c) (1<<(c))
#define STAT_MASK_NONE 0
#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);
enum notification_event {
ev_success,

Return to:

Send suggestions and report system problems to the System administrator.