unify generatePoFile win32 and win64, fix optim in sci_set.c 43/19743/1
Antoine ELIAS [Sat, 10 Feb 2018 09:43:17 +0000 (10:43 +0100)]
Change-Id: Iaf1980eb11eb69a6f84e28fda59d87febd6a1350

scilab/modules/graphics/sci_gateway/c/sci_set.c
scilab/tools/localization/generatePoFile.vcxproj

index 1cc06f6..c97ca16 100644 (file)
 /* file: sci_set.h                                                        */
 /* desc : interface for sci_set routine                                   */
 /*------------------------------------------------------------------------*/
+#ifdef _MSC_VER
+#include <Windows.h>
+#endif
+
 #include <stdio.h>
 /*------------------------------------------------------------------------*/
 #include "gw_graphics.h"
@@ -465,11 +469,13 @@ int sci_set(char *fname, void *pvApiCtx)
         freeAllocatedSingleString(pstProperty);
     }
 
+#ifdef _MSC_VER
     //never occurs, just to break weird optimisation (bug 14896)
     if (iRhs == 0)
     {
-        sciprint("%d/%d\n", i, iRhs);
+        Sleep(1);
     }
+#endif
 
     AssignOutputVariable(pvApiCtx, 1) = 0;
     ReturnArguments(pvApiCtx);
index e6f1904..b59fedf 100644 (file)
     <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)locales\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
-    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(SolutionDir)bin\scilab" -nwni -ns -e exec(SCI+%27/tools/localization/generatePoFile.sce%27);quit
-exit  /B 0
+    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeBuildCommandLine>
     <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
-"$(SolutionDir)bin\scilab" -nwni -ns -e exec(SCI+%27/tools/localization/generatePoFile.sce%27);quit
-exit  /B 0
+
+"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeReBuildCommandLine>
-    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">rmdir /s /q  "$(SolutionDir)locale"</NMakeCleanCommandLine>
+    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
+</NMakeCleanCommandLine>
     <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
     <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
     <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -76,14 +76,14 @@ exit  /B 0
     <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)locales\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
-    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(SolutionDir)bin\scilab.bat" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
-exit  /B 0
+    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeBuildCommandLine>
     <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
-"$(SolutionDir)bin\scilab.bat" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
-exit  /B 0
+
+"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeReBuildCommandLine>
-    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">rmdir /s /q  "$(SolutionDir)locale"</NMakeCleanCommandLine>
+    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
+</NMakeCleanCommandLine>
     <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
     <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
     <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -92,14 +92,14 @@ exit  /B 0
     <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)locales\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
-    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(SolutionDir)bin\scilab" -nwni -ns -e exec(SCI+%27/tools/localization/generatePoFile.sce%27);quit
-exit  /B 0
+    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeBuildCommandLine>
     <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
-"$(SolutionDir)bin\scilab" -nwni -ns -e exec(SCI+%27/tools/localization/generatePoFile.sce%27);quit
-exit  /B 0
+
+"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeReBuildCommandLine>
-    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">rmdir /s /q  "$(SolutionDir)locale"</NMakeCleanCommandLine>
+    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
+</NMakeCleanCommandLine>
     <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
     <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
     <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>
@@ -108,14 +108,14 @@ exit  /B 0
     <NMakeForcedUsingAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(NMakeForcedUsingAssemblies)</NMakeForcedUsingAssemblies>
     <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)locales\</OutDir>
     <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
-    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(SolutionDir)bin\scilab.bat" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
-exit  /B 0
+    <NMakeBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeBuildCommandLine>
     <NMakeReBuildCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
-"$(SolutionDir)bin\scilab.bat" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
-exit  /B 0
+
+"$(SolutionDir)bin\scilab" -nwni -ns -quit -e "exec(\"SCI/tools/localization/generatePoFile.sce\");"
 </NMakeReBuildCommandLine>
-    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">rmdir /s /q  "$(SolutionDir)locale"</NMakeCleanCommandLine>
+    <NMakeCleanCommandLine Condition="'$(Configuration)|$(Platform)'=='Release|x64'">IF EXIST "$(SolutionDir)locale" rmdir /s /q  "$(SolutionDir)locale"
+</NMakeCleanCommandLine>
     <NMakeOutput Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
     <NMakePreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
     <NMakeIncludeSearchPath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(NMakeIncludeSearchPath)</NMakeIncludeSearchPath>