From f3abedd58846e9bdfbdda772dceaf5b106fb5163 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Mon, 2 May 2016 20:11:34 +0300 Subject: [PATCH] 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 Signed-off-by: Dirk Hohndel --- file.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/file.c b/file.c index ad70551be..644a632b8 100644 --- a/file.c +++ b/file.c @@ -1123,6 +1123,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 ''; cat %s;echo '') | 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);