Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 212689 | Differences between
and this patch

Collapse All | Expand All

(-)src/project.cpp (-1 / +23 lines)
Lines 307-312 Link Here
307
	ifstream ifile;
307
	ifstream ifile;
308
	ostringstream intermed;
308
	ostringstream intermed;
309
	file_trans translator;
309
	file_trans translator;
310
311
	// Store the current locale and switch to "C"
312
	
313
	static char my_num_locale[32] = "C";
314
	strcpy(my_num_locale, setlocale(LC_NUMERIC, NULL));
315
	setlocale(LC_NUMERIC, "C");
310
	
316
	
311
	if (index == 0)		// Automatic detection
317
	if (index == 0)		// Automatic detection
312
	{
318
	{
Lines 328-334 Link Here
328
	}
334
	}
329
	
335
	
330
	istringstream interInput(intermed.str());
336
	istringstream interInput(intermed.str());
331
	return ReadGPR((* this), interInput, false);
337
	bool retval = ReadGPR((* this), interInput, false);
338
339
	// Change back to the original locale
340
	
341
	setlocale(LC_NUMERIC, my_num_locale);
342
343
	return retval;
332
}
344
}
333
345
334
bool project::ExportFile(const char * filename, int index)
346
bool project::ExportFile(const char * filename, int index)
Lines 337-342 Link Here
337
	stringstream intermed;
349
	stringstream intermed;
338
	file_trans translator;
350
	file_trans translator;
339
	
351
	
352
	// Store the current locale and switch to "C"
353
	
354
	static char my_num_locale[32] = "C";
355
	strcpy(my_num_locale, setlocale(LC_NUMERIC, NULL));
356
	setlocale(LC_NUMERIC, "C");
357
340
	WriteGPR_v100((* this), intermed);		// this is for openbabel-1.100.2
358
	WriteGPR_v100((* this), intermed);		// this is for openbabel-1.100.2
341
	istringstream interInput(intermed.str());
359
	istringstream interInput(intermed.str());
342
	
360
	
Lines 359-364 Link Here
359
		ofile.close();
377
		ofile.close();
360
	}
378
	}
361
	
379
	
380
	// Change back to the original locale
381
	
382
	setlocale(LC_NUMERIC, my_num_locale);
383
362
	return true;
384
	return true;
363
}
385
}
364
386

Return to bug 212689