summaryrefslogtreecommitdiffstats
path: root/core/file.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-05-02 20:11:34 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-02 10:24:58 -0700
commit43f911242032982a2456ef8f7fc0d8a3a1d3dd6b (patch)
tree8e75d7b54cf488197630ecea80a8d8778daa0719 /core/file.c
parenta480d28afd7702cb27e99765779cb70736cdea45 (diff)
downloadsubsurface-43f911242032982a2456ef8f7fc0d8a3a1d3dd6b.tar.gz
Print xsltproc command line on verbose mode
Printed command line can be used to manually test the import function, allowing faster testing of XSLT changes, and showing debug prints that are discarded by Subsurface. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/file.c')
-rw-r--r--core/file.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/file.c b/core/file.c
index b30bcd55e..85bc949fe 100644
--- a/core/file.c
+++ b/core/file.c
@@ -1177,6 +1177,14 @@ int parse_manual_file(const char *filename, char **params, int pnr)
if (try_to_xslt_open_csv(filename, &mem, "manualCSV"))
return -1;
+#ifndef SUBSURFACE_MOBILE
+ if (verbose >= 2) {
+ fprintf(stderr, "(echo '<manualCSV>'; cat %s;echo '</manualCSV>') | xsltproc ", filename);
+ for (i=0; params[i]; i+=2)
+ fprintf(stderr, "--stringparam %s %s ", params[i], params[i+1]);
+ fprintf(stderr, "%s/xslt/manualcsv2xml.xslt -\n", SUBSURFACE_SOURCE);
+ }
+#endif
ret = parse_xml_buffer(filename, mem.buffer, mem.size, &dive_table, (const char **)params);
free(mem.buffer);