View | Details | Raw Unified | Return to issue 59251
Collapse All | Expand All

(-)file_not_specified_in_diff (-10 / +10 lines)
Line  Link Here
0
-- sal/osl/w32/process.c
0
++ sal/osl/w32/process.c
Lines 264-285 Link Here
264
	0
264
	0
265
};
265
};
266
266
267
static rtl_uString ** osl_createCommandArgs_Impl (int argc, char ** argv)
267
static rtl_uString ** osl_createCommandArgs_Impl (int argc)
268
{
268
{
269
	rtl_uString ** ppArgs =
269
	rtl_uString ** ppArgs =
270
		(rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*));
270
		(rtl_uString**)rtl_allocateZeroMemory (argc * sizeof(rtl_uString*));
271
	if (ppArgs != 0)
271
	if (ppArgs != 0)
272
	{
272
	{
273
		rtl_TextEncoding encoding = osl_getThreadTextEncoding();
274
275
		int i;
273
		int i;
276
		for (i = 0; i < argc; i++)
274
		int nArgs;
275
		LPWSTR *wargv = CommandLineToArgvW( GetCommandLineW(), &nArgs );
276
		OSL_ASSERT( nArgs == argc );
277
		for (i = 0; i < nArgs; i++)
277
		{
278
		{
278
			/* Convert to unicode */
279
			rtl_uString_newFromStr(
279
			rtl_string2UString (
280
				&(ppArgs[i]),
280
				&(ppArgs[i]),
281
				argv[i], rtl_str_getLength (argv[i]), encoding,
281
				wargv[i]);
282
				OSTRING_TO_OUSTRING_CVTFLAGS);
283
		}
282
		}
284
		if (ppArgs[0] != 0)
283
		if (ppArgs[0] != 0)
285
		{
284
		{
Lines 368-377 Link Here
368
367
369
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
368
void SAL_CALL osl_setCommandArgs (int argc, char ** argv)
370
{
369
{
370
	(void) argv;
371
	osl_acquireMutex (*osl_getGlobalMutex());
371
	osl_acquireMutex (*osl_getGlobalMutex());
372
	if (g_command_args.m_nCount == 0)
372
	if (g_command_args.m_nCount == 0)
373
	{
373
	{
374
		rtl_uString** ppArgs = osl_createCommandArgs_Impl (argc, argv);
374
		rtl_uString** ppArgs = osl_createCommandArgs_Impl (argc);
375
		if (ppArgs != 0)
375
		if (ppArgs != 0)
376
		{
376
		{
377
			g_command_args.m_nCount = argc;
377
			g_command_args.m_nCount = argc;

Return to issue 59251