diff cinst/nssstore_win.c @ 1060:317ee9dc4684

(issue46) Make debug output optional in cinst and mozilla and propagate its setting.
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 09 Sep 2014 18:49:02 +0200
parents 6684e5012b7a
children f110a3f6e387
line wrap: on
line diff
--- a/cinst/nssstore_win.c	Tue Sep 09 18:00:37 2014 +0200
+++ b/cinst/nssstore_win.c	Tue Sep 09 18:49:02 2014 +0200
@@ -415,6 +415,11 @@
      + NULL */
   cmd_line_len = wcslen (w_inst_dir) + 1 + 2 + wcslen (NSS_APP_NAME) +
                  + 1 + 2 + wcslen(selection_file) + 1;
+  if (g_debug)
+    {
+      /* Add space for whitespace and --debug*/
+      cmd_line_len += 8;
+    }
   retval = xmalloc (cmd_line_len * sizeof(wchar_t));
 
   wcscpy_s (retval, cmd_line_len, L"\"");
@@ -425,6 +430,11 @@
   wcscat_s (retval, cmd_line_len, selection_file);
   wcscat_s (retval, cmd_line_len, L"\"");
 
+  if (g_debug)
+    {
+      wcscat_s (retval, cmd_line_len, L" --debug");
+    }
+
   return retval;
 }
 

http://wald.intevation.org/projects/trustbridge/