Clément DAVID [Mon, 5 Dec 2016 09:42:11 +0000 (10:42 +0100)]
Change-Id: I7ba0daf72b2b2f1c359926a0979d3509b70cb1eb

index c52caba..609d50a 100644 (file)
@@ -136,6 +136,7 @@ libsciscicos_algo_la_CPPFLAGS= -I\$(srcdir)/includes/ \
-I\$(srcdir)/src/scicos_sundials/include/sundials/ \
-I\$(srcdir)/src/scicos_sundials/src/ida/ \
-I\$(top_srcdir)/modules/output_stream/includes/ \
+                       -I\$(top_srcdir)/modules/fileio/includes/ \
-I\$(top_srcdir)/modules/dynamic_link/includes/ \
-I\$(top_srcdir)/modules/string/includes/ \
-I\$(top_srcdir)/modules/localization/includes/ \
index 71ddc9b..d012be4 100644 (file)
@@ -1066,6 +1066,7 @@ libsciscicos_la_LDFLAGS = \$(AM_LDFLAGS)
@XCOS_TRUE@                    -I\$(srcdir)/src/scicos_sundials/include/sundials/ \
@XCOS_TRUE@                    -I\$(srcdir)/src/scicos_sundials/src/ida/ \
@XCOS_TRUE@                    -I\$(top_srcdir)/modules/output_stream/includes/ \
+@XCOS_TRUE@                    -I\$(top_srcdir)/modules/fileio/includes/ \
@XCOS_TRUE@                    -I\$(top_srcdir)/modules/dynamic_link/includes/ \
@XCOS_TRUE@                    -I\$(top_srcdir)/modules/string/includes/ \
@XCOS_TRUE@                    -I\$(top_srcdir)/modules/localization/includes/ \
index 75708f9..b8f55a6 100644 (file)
@@ -29,6 +29,7 @@ extern "C"
{
#include "sci_malloc.h"
#include "localization.h"
+#include "getFullFilename.h"
#include "Scierror.h"
}
/*--------------------------------------------------------------------------*/
@@ -69,7 +70,9 @@ types::Function::ReturnValue sci_scicosDiagramToScilab(types::typed_list &in, in
out.resize(_iRetCount);
for (int i = 0; i < _iRetCount; i++)
{
-            char* f = wide_string_to_UTF8(files->get(i));
+            wchar_t* fullName = getFullFilenameW(files->get(i));
+            char* f = wide_string_to_UTF8(fullName);
+            FREE(fullName);
out[i] = importFile(f);
FREE(f);
if (out[i] == nullptr)
@@ -91,7 +94,9 @@ types::Function::ReturnValue sci_scicosDiagramToScilab(types::typed_list &in, in
}
for (int i = 0; i < _iRetCount; i++)
{
-            char* f = wide_string_to_UTF8(files->get(i));
+            wchar_t* fullName = getFullFilenameW(files->get(i));
+            char* f = wide_string_to_UTF8(fullName);
+            FREE(fullName);
bool success = exportFile(1 + i, f, in[1 + i]);
FREE(f);
if (!success)
index 10304d0..2e99c13 100644 (file)
@@ -82,7 +82,7 @@
</PreBuildEvent>
<ClCompile>
<Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../fileio/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -119,7 +119,7 @@ lib /DEF:"\$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../fileio/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -154,7 +154,7 @@ lib /DEF:"\$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../fileio/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -196,7 +196,7 @@ lib /DEF:"\$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>../;../../../src/cpp;../../../includes;../../../../../libs/intl;../../../../../libs/libxml2;../../../../core/includes;../../../../fileio/includes;../../../../time/includes;../../../../api_scilab/includes;../../../../output_stream/includes;../../../../scicos_blocks/includes;../../../../windows_tools/includes;../../../../localization/includes;../../../../string/includes;../../../../dynamic_link/includes;../../scicos_sundials/include;../../scicos_sundials/include/sundials;../../scicos_sundials/src/ida;../../../../action_binding/includes;../../../../ast/includes/types;../../../../ast/includes/ast;../../../../ast/includes/analysis;../../../../ast/includes/exps;../../../../ast/includes/operations;../../../../ast/includes/symbol;../../../../ast/includes/system_env;../../../../ast/includes/parse;../../../../threads/includes;../../../../console/includes;../../../../differential_equations/includes</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -392,6 +392,9 @@ lib /DEF:"\$(ProjectDir)../differential_equations_f_Import.def" /SUBSYSTEM:WINDOW
<ProjectReference Include="..\..\..\..\elementary_functions\src\c\elementary_functions.vcxproj">
<Project>{5b110267-7c18-437c-b87d-dba2b50729e9}</Project>
</ProjectReference>
+    <ProjectReference Include="..\..\..\..\fileio\fileio.vcxproj">
+      <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+    </ProjectReference>
<ProjectReference Include="..\..\..\..\localization\src\localization.vcxproj">
<Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
</ProjectReference>
index f2f8705..dbfbb80 100644 (file)
@@ -82,7 +82,7 @@
</PreBuildEvent>
<ClCompile>
<Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../fileio/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -120,7 +120,7 @@ lib /DEF:"\$(ProjectDir)Scicos_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:\$(Platfo
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../fileio/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
@@ -156,7 +156,7 @@ lib /DEF:"\$(ProjectDir)Scicos_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:\$(Platfo
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../fileio/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -199,7 +199,7 @@ lib /DEF:"\$(ProjectDir)Scicos_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:\$(Platfo
<ClCompile>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>.;../../includes;../cpp/;../cpp/model;../cpp/view_scilab;../scicos_sundials/include;../scicos_sundials/src/ida;../scicos_sundials/include/sundials;../../../../libs/intl;../../../core/includes;../../../time/includes;../../../api_scilab/includes;../../../output_stream/includes;../../../fileio/includes;../../../scicos_blocks/includes;../../../windows_tools/includes;../../../graphics/includes;../../../localization/includes;../../../string/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../ast/includes/types;../../../ast/includes/ast;../../../ast/includes/analysis;../../../ast/includes/exps;../../../ast/includes/operations;../../../ast/includes/symbol;../../../ast/includes/system_env;../../../ast/includes/parse;../../../threads/includes;../../../console/includes;../../../differential_equations/includes;../../../../libs/libxml2</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;SCICOS_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -404,6 +404,9 @@ lib /DEF:"\$(ProjectDir)Scicos_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:\$(Platfo
<ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
<Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
</ProjectReference>
+    <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+      <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+    </ProjectReference>
<ProjectReference Include="..\..\..\scicos_blocks\src\c\scicos_blocks.vcxproj">
<Project>{70f677f1-b535-4d0f-a16f-5093b799a540}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
@@ -427,4 +430,4 @@ lib /DEF:"\$(ProjectDir)Scicos_f_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:\$(Platfo
<Import Project="\$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>