summaryrefslogtreecommitdiff
path: root/src/cgg.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2013-04-07 12:01:40 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2013-04-07 12:12:42 +0200
commitddadb157cfa3e1658f120341b4085ec5421ff73f (patch)
tree18d6939c52fdd1d9da01010f84419611def133f5 /src/cgg.c
parent125aaf366c2ae370306f678b9c9c0b408e0d3908 (diff)
downloadcataract-ddadb157cfa3e1658f120341b4085ec5421ff73f.tar.xz
Strip unused template tags by default
If there's a tag defined but not used on replace table processing, this option determines whether it should be written in the generated file or ignored completely. Turned on by default, this will save a few bytes. Use commandline option '--debug-dont-strip-unused-tags' to turn it off, e.g. when debugging template files.
Diffstat (limited to 'src/cgg.c')
-rw-r--r--src/cgg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cgg.c b/src/cgg.c
index 7510d2e..5a4949a 100644
--- a/src/cgg.c
+++ b/src/cgg.c
@@ -44,6 +44,7 @@ static gchar *dst_dir = NULL;
static gboolean verbose = FALSE;
static gboolean update = FALSE;
static gboolean fullsize = FALSE;
+static gboolean dont_strip_unused_tags = FALSE;
static int jobs = 0;
@@ -68,6 +69,7 @@ parse_cmd (int argc, char *argv[])
NULL },
{ "update", 'u', 0, G_OPTION_ARG_NONE, &update, "Update the output structure", NULL },
{ "fullsize", 'f', 0, G_OPTION_ARG_NONE, &fullsize, "Override the nofullsize switch and generate full gallery", NULL },
+ { "debug-dont-strip-unused-tags", 0, 0, G_OPTION_ARG_NONE, &dont_strip_unused_tags, "Don't strip unused/unknown template tags", NULL },
{ NULL }
};
@@ -197,6 +199,7 @@ main (int argc, char* argv[])
setup->verbose = verbose;
setup->update_mode = update;
setup->override_nofullsize = fullsize;
+ setup->strip_unused_tags = ! dont_strip_unused_tags;
path_info = g_malloc0 (sizeof (TPathInfo));
path_info->templates_root = templates_basedir;