From 0b63c31eadfe5d4e94c7014bd0f3bd4370783d19 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Sat, 21 Feb 2009 18:26:51 +0200 Subject: Implement timers and destination URLs. * gconf/gconf-gram.y (stmt_end): Make sure end callback is called in the same environment as the begin one. * src/vtab.c, src/null.c, src/timer.c: New files. * src/Makefile.am (wydawca_SOURCES): Add new files. * src/config.c (cb_mailer): Remove useless check. (cb_destination_url): New function. (directory_kw): Change handling of the destination keyword. (cb_directory): Rewrite final checks. * src/directive.c, /src/process.c, src/triplet.c: Add timers. * src/diskio.c (move_file, archive_file, symlink_file, rmsymlink_file): Prefix with dir_. * src/mail.c (mail_stats): Add timer meta-variables. * src/wydawca.c (make_stat_expansion): Change definition. * src/wydawca.h (struct virt_tab): New data type. (struct directory_pair.dest_url): New member. * tests/upload-dry.at: Update expected output. --- gconf/gconf-gram.y | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'gconf') diff --git a/gconf/gconf-gram.y b/gconf/gconf-gram.y index ed685d0..a1d9f2a 100644 --- a/gconf/gconf-gram.y +++ b/gconf/gconf-gram.y @@ -377,17 +377,26 @@ stmt_begin (struct gconf_keyword *kwp, gconf_value_t tag) static void stmt_end (struct gconf_keyword *kwp) { + gconf_callback_fn callback = NULL; + void *dataptr = NULL; + if (cursect && cursect->callback) - cursect->callback (gconf_callback_section_end, - &gconf_current_locus, /* FIXME */ - kwp ? target_ptr(kwp) : NULL, - NULL, - &cursect->callback_data); + { + callback = cursect->callback; + dataptr = &cursect->callback_data; + } if (gl_list_size (sections) == 0) abort (); cursect = (struct gconf_keyword *) gl_list_get_at (sections, 0); gl_list_remove_at (sections, 0); + if (callback) + callback (gconf_callback_section_end, + &gconf_current_locus, /* FIXME */ + kwp ? target_ptr(kwp) : NULL, + NULL, + dataptr); + } static struct gconf_keyword * -- cgit v1.2.1