2008/7/24 Henrik Sundberg <[EMAIL PROTECTED]>:
> 2008/7/24 Leonardo Zide <[EMAIL PROTECTED]>:
>> On Mon, Jul 21, 2008 at 5:33 PM, Henrik Sundberg <[EMAIL PROTECTED]>
>> wrote:
>>> My first issue was that I needed to patch generated ldr files
>>> (changing ',' to '.' in all floats, and .DAT to .dat, and change to
>>> use the right pieces when ldraw knew them, but not Leocad (no piece
>>> manager)) - to be able to view the models ln LDView. I don't think
>>> generated files should depend on locale (I dislike that part of xml as
>>> well).
>>
>> I remember fixing the ',' problem a long time ago, is it happening again?
Here is a patch fixing the problem:
===================================================================
--- common/project.cpp (revision 727)
+++ common/project.cpp (arbetskopia)
@@ -1249,6 +1249,7 @@
strcat(buf, "\r\n");
file.Write(buf, strlen(buf));
+ const char * old_locale = setlocale(LC_NUMERIC, "C");
for (i = 1; i <= steps; i++)
{
for (pPiece = m_pPieces; pPiece; pPiece =
pPiece->m_pNext)
@@ -1270,6 +1271,7 @@
file.Write("0 STEP\r\n", 8);
}
file.Write("0\r\n", 3);
+ setlocale (LC_NUMERIC, old_locale);
}
else
FileSave(&file, false); // save me
/$
_______________________________________________
Leocad mailing list
[email protected]
https://list.gerf.org/listinfo/leocad