aboutsummaryrefslogtreecommitdiff
path: root/src/triplet.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 12:29:58 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2009-02-22 12:29:58 +0200
commite7860f6f4b7da3e45eee6d2100dfb42823d8106f (patch)
treea9dca4490c567054391579b627ae5db14995f5dd /src/triplet.c
parent0b63c31eadfe5d4e94c7014bd0f3bd4370783d19 (diff)
downloadwydawca-e7860f6f4b7da3e45eee6d2100dfb42823d8106f.tar.gz
wydawca-e7860f6f4b7da3e45eee6d2100dfb42823d8106f.tar.bz2
Minor improvements
* src/report.c: New file * src/Makefile.am (wydawca_SOURCES): Add report.c * src/cmdline.opt: Group options. New option -D (--define). * src/directive.c (process_directives): Call report_init before processing and report_finish afterwards. * src/triplet.c: New meta-variable `report'. * src/vtab.c (move_file, archive_file, symlink_file, rmsymlink_file): Update report stack. * src/wydawca.h: Include obstack.h (report_init, report_add, report_finish): New protos. (report_string): New declaration. * src/builtin.c, src/meta.c: Remove obstack inclusion.
Diffstat (limited to 'src/triplet.c')
-rw-r--r--src/triplet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/triplet.c b/src/triplet.c
index 6ebc142..3cfc4d0 100644
--- a/src/triplet.c
+++ b/src/triplet.c
@@ -543,6 +543,12 @@ expand_user_email (struct metadef *def, void *data)
return def->value;
}
+static const char *
+expand_report (struct metadef *def, void *data)
+{
+ return report_string;
+}
+
#define DECL_EXPAND_TIMER(what) \
static const char * \
__cat2__(expand_timer_,what) (struct metadef *def, void *data) \
@@ -578,6 +584,7 @@ struct metadef triplet_meta[] = {
{ "user:name", NULL, expand_user_name, NULL },
{ "user:real-name", NULL, expand_user_real_name, NULL },
{ "user:email", NULL, expand_user_email, NULL },
+ { "report", NULL, expand_report, NULL },
DECL_FULL_TIMER(wydawca),
DECL_FULL_TIMER(triplet),
DECL_FULL_TIMER(directory),

Return to:

Send suggestions and report system problems to the System administrator.