comparison 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
comparison
equal deleted inserted replaced
1059:f638eb1f3b0f 1060:317ee9dc4684
413 413
414 /* installdir + dirsep + quotes + process name + space + quotes + selection_file 414 /* installdir + dirsep + quotes + process name + space + quotes + selection_file
415 + NULL */ 415 + NULL */
416 cmd_line_len = wcslen (w_inst_dir) + 1 + 2 + wcslen (NSS_APP_NAME) + 416 cmd_line_len = wcslen (w_inst_dir) + 1 + 2 + wcslen (NSS_APP_NAME) +
417 + 1 + 2 + wcslen(selection_file) + 1; 417 + 1 + 2 + wcslen(selection_file) + 1;
418 if (g_debug)
419 {
420 /* Add space for whitespace and --debug*/
421 cmd_line_len += 8;
422 }
418 retval = xmalloc (cmd_line_len * sizeof(wchar_t)); 423 retval = xmalloc (cmd_line_len * sizeof(wchar_t));
419 424
420 wcscpy_s (retval, cmd_line_len, L"\""); 425 wcscpy_s (retval, cmd_line_len, L"\"");
421 wcscat_s (retval, cmd_line_len, w_inst_dir); 426 wcscat_s (retval, cmd_line_len, w_inst_dir);
422 wcscat_s (retval, cmd_line_len, L"\\"); 427 wcscat_s (retval, cmd_line_len, L"\\");
423 wcscat_s (retval, cmd_line_len, NSS_APP_NAME); 428 wcscat_s (retval, cmd_line_len, NSS_APP_NAME);
424 wcscat_s (retval, cmd_line_len, L"\" \""); 429 wcscat_s (retval, cmd_line_len, L"\" \"");
425 wcscat_s (retval, cmd_line_len, selection_file); 430 wcscat_s (retval, cmd_line_len, selection_file);
426 wcscat_s (retval, cmd_line_len, L"\""); 431 wcscat_s (retval, cmd_line_len, L"\"");
432
433 if (g_debug)
434 {
435 wcscat_s (retval, cmd_line_len, L" --debug");
436 }
427 437
428 return retval; 438 return retval;
429 } 439 }
430 440
431 /** @brief Increase the privileges of the current token to allow registry access 441 /** @brief Increase the privileges of the current token to allow registry access

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