aboutsummaryrefslogtreecommitdiff
path: root/src/triplet.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/triplet.c')
-rw-r--r--src/triplet.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/src/triplet.c b/src/triplet.c
index 6641211..717fd2a 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -182,7 +182,7 @@ static bool
triplet_processor (void *data, void *proc_data)
{
struct file_triplet *trp = data;
- struct spool *spool = proc_data;
+ const struct spool *spool = proc_data;
trp->spool = spool;
@@ -230,14 +230,14 @@ triplet_processor (void *data, void *proc_data)
/* Process all triplets from the table according to the SPOOL */
void
-enumerate_triplets (struct spool *spool)
+enumerate_triplets (const struct spool *spool)
{
if (debug_level)
- logmsg (LOG_DEBUG, _("processing files for %s (%s)"),
- spool->url, mu_url_to_string (spool->dest_url));
+ logmsg (LOG_DEBUG, _("processing spool %s (%s)"),
+ spool->tag, mu_url_to_string (spool->dest_url));
if (triplet_table)
{
- hash_do_for_each (triplet_table, triplet_processor, spool);
+ hash_do_for_each (triplet_table, triplet_processor, (void*) spool);
hash_clear (triplet_table);
}
}
@@ -257,6 +257,13 @@ expand_project_base (struct metadef *def, void *data)
}
static const char *
+expand_tag (struct metadef *def, void *data)
+{
+ struct file_triplet *trp = data;
+ return trp->spool->tag;
+}
+
+static const char *
expand_url (struct metadef *def, void *data)
{
struct file_triplet *trp = data;
@@ -576,6 +583,7 @@ DECL_EXPAND_TIMER(system)
struct metadef triplet_meta[] = {
{ "project", NULL, expand_project_base, NULL },
{ "url", NULL, expand_url, NULL },
+ { "spool", NULL, expand_tag, NULL },
{ "dir", NULL, expand_relative_dir, NULL },
{ "dest-dir", NULL, expand_dest_dir, NULL },
{ "source-dir", NULL, expand_source_dir, NULL },

Return to:

Send suggestions and report system problems to the System administrator.