* Bug #14397 fixed - mgeti did not read u-int64 > 2^52 18/21418/5
Samuel GOUGEON [Sun, 28 Aug 2016 04:31:48 +0000 (06:31 +0200)]
  http://bugzilla.scilab.org/14397

Change-Id: I4115f4564df90a5cbf408b8e1a3b1667ee981be3

15 files changed:
scilab/CHANGES.md
scilab/modules/core/src/c/core.vcxproj
scilab/modules/fileio/Makefile.am
scilab/modules/fileio/Makefile.in
scilab/modules/fileio/help/en_US/mget.xml
scilab/modules/fileio/help/ja_JP/mget.xml [deleted file]
scilab/modules/fileio/help/ru_RU/mget.xml
scilab/modules/fileio/includes/fileio_gw.hxx
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.cpp
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcxproj
scilab/modules/fileio/sci_gateway/cpp/fileio_gw.vcxproj.filters
scilab/modules/fileio/sci_gateway/cpp/sci_mgeti.cpp [new file with mode: 0644]
scilab/modules/fileio/tests/nonreg_tests/bug_14397.tst [new file with mode: 0644]
scilab/modules/fileio/tests/unit_tests/mgeti.tst
scilab/modules/integer/macros/mgeti.sci [deleted file]

index 8b8545b..c2b9890 100644 (file)
@@ -193,6 +193,7 @@ Feature changes and additions on 6.1.0
 * `circshift` is introduced.
 * `atomsGetInstalledPath` is no longer sensitive to the case or completeness of the modules names. Providing the modules versions is now optional.
 * `function` replaces `mc` as the new overloading code for functions in Scilab language.
+* `mgeti` can now read correctly 64-bit int64 / uint64 integers bigger than 2^52.
 
 
 Feature changes and additions on 6.1.1
@@ -237,7 +238,7 @@ Feature changes and additions on 6.1.1
 Help pages:
 -----------
 
-* overhauled / rewritten: `bitget`, `edit`, `factorial`, `fft`, `vectorfind`, `datafit`
+* overhauled / rewritten: `bitget`, `edit`, `factorial`, `fft`, `vectorfind`, `datafit`, `mgeti`
 * fixed / improved:  `bench_run` `M_SWITCH`, `comet`, `comet3d`, `plot2d`
 * Rewritten: `getdate`, `weekday`
 * Translations added:
@@ -504,6 +505,7 @@ Bug Fixes
 * [#13766](https://bugzilla.scilab.org/13766): Minimal values for `.figure_size` were not documented.
 * [#14015](https://bugzilla.scilab.org/14015): Nan terms added to a polynomial were ignored.
 * [#14191](https://bugzilla.scilab.org/14191): Unlike `plot2d()`, `plot()` did not accept logflags among input arguments.
+* [#14397](https://bugzilla.scilab.org/14397): `mgeti` wrongly handled `int64` or `uint64` integers bigger then 2^52. The `mget`/`mgeti` help page was unclear.
 * [#14422](https://bugzilla.scilab.org/14422): `clc(0)` did nothing, now clears last console entry. Remove leading blank after a `clc()`.
 * [#14498](https://bugzilla.scilab.org/14498): `size([],3)` returned 1 instead of 0.
 * [#14501](https://bugzilla.scilab.org/14501): `strsubst` crashed on consecutive occurrences.
index 0e49fa4..809796c 100644 (file)
@@ -1,93 +1,93 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{C6E2BC17-34D8-46E4-85F3-6293CB21ADCD}</ProjectGuid>\r
-    <RootNamespace>core</RootNamespace>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>false</WholeProgramOptimization>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <WholeProgramOptimization>false</WholeProgramOptimization>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <CharacterSet>MultiByte</CharacterSet>\r
-    <PlatformToolset>v141</PlatformToolset>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup>\r
-    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>\r
-    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>\r
-    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>\r
-    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <WarningLevel>Level3</WarningLevel>\r
-    </ClCompile>\r
-    <PreLinkEvent>\r
-      <Message>Make dependencies</Message>\r
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{C6E2BC17-34D8-46E4-85F3-6293CB21ADCD}</ProjectGuid>
+    <RootNamespace>core</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>false</WholeProgramOptimization>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <WholeProgramOptimization>false</WholeProgramOptimization>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <CharacterSet>MultiByte</CharacterSet>
+    <PlatformToolset>v141</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)bin\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)bin\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)bin\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(ProjectDir)$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)bin\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(ProjectDir)$(Configuration)\</IntDir>
+    <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+    </ClCompile>
+    <PreLinkEvent>
+      <Message>Make dependencies</Message>
       <Command>setlocal EnableDelayedExpansion
 cd $(ConfigurationName)
 set LIST_OBJ=
@@ -97,37 +97,37 @@ copy $(ProjectName).def+..\core_export.def ..\$(ProjectName).def &gt;nul
 del *.def &gt;nul
 cd ..
 
-</Command>\r
-    </PreLinkEvent>\r
-    <Link>\r
-      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>\r
-    </Link>\r
-    <PreBuildEvent>\r
+</Command>
+    </PreLinkEvent>
+    <Link>
+      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>
+    </Link>
+    <PreBuildEvent>
       <Command>lib /DEF:"$(ProjectDir)functions_manager_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)functions_manager.lib" 1&gt;NUL 2&gt;NUL
-</Command>\r
-    </PreBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <Optimization>Disabled</Optimization>\r
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\r
-      <WarningLevel>Level3</WarningLevel>\r
-    </ClCompile>\r
-    <PreLinkEvent>\r
-      <Message>Make dependencies</Message>\r
+</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;_DEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+    </ClCompile>
+    <PreLinkEvent>
+      <Message>Make dependencies</Message>
       <Command>setlocal EnableDelayedExpansion
 cd $(ConfigurationName)
 set LIST_OBJ=
@@ -137,37 +137,37 @@ copy $(ProjectName).def+..\core_export.def ..\$(ProjectName).def &gt;nul
 del *.def &gt;nul
 cd ..
 
-</Command>\r
-    </PreLinkEvent>\r
-    <Link>\r
-      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>\r
-    </Link>\r
-    <PreBuildEvent>\r
+</Command>
+    </PreLinkEvent>
+    <Link>
+      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>
+    </Link>
+    <PreBuildEvent>
       <Command>lib /DEF:"$(ProjectDir)functions_manager_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)functions_manager.lib" 1&gt;NUL 2&gt;NUL
-</Command>\r
-    </PreBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
-      <WholeProgramOptimization>false</WholeProgramOptimization>\r
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-    </ClCompile>\r
-    <PreLinkEvent>\r
-      <Message>Make dependencies</Message>\r
+</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <PreLinkEvent>
+      <Message>Make dependencies</Message>
       <Command>setlocal EnableDelayedExpansion
 cd $(ConfigurationName)
 set LIST_OBJ=
@@ -177,42 +177,42 @@ copy $(ProjectName).def+..\core_export.def ..\$(ProjectName).def &gt;nul
 del *.def &gt;nul
 cd ..
 
-</Command>\r
-    </PreLinkEvent>\r
-    <Link>\r
-      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>\r
-      <GenerateDebugInformation>false</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX86</TargetMachine>\r
-      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>\r
-    </Link>\r
-    <PreBuildEvent>\r
+</Command>
+    </PreLinkEvent>
+    <Link>
+      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX86</TargetMachine>
+      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>
+    </Link>
+    <PreBuildEvent>
       <Command>lib /DEF:"$(ProjectDir)functions_manager_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)functions_manager.lib" 1&gt;NUL 2&gt;NUL
-</Command>\r
-    </PreBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <Midl>\r
-      <TargetEnvironment>X64</TargetEnvironment>\r
-    </Midl>\r
-    <ClCompile>\r
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
-      <WholeProgramOptimization>false</WholeProgramOptimization>\r
-      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <StringPooling>true</StringPooling>\r
-      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <MultiProcessorCompilation>true</MultiProcessorCompilation>\r
-    </ClCompile>\r
-    <PreLinkEvent>\r
-      <Message>Make dependencies</Message>\r
+</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <Midl>
+      <TargetEnvironment>X64</TargetEnvironment>
+    </Midl>
+    <ClCompile>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>.;../../includes;../../../../libs/GetWindowsVersion;../../../../libs/intl;../../../../libs/libxml2;../../../../libs/libxml2/libxml;../../../mexlib/includes;../../../api_scilab/includes;../../../string/includes;../../../functions/includes;../../../dynamic_link/includes;../../../action_binding/includes;../../../output_stream/includes;../../../fileio/includes;../../../elementary_functions/includes;../../../tclsci/includes;../../../localization/includes;../../../tclsci/includes/tcltk;../../../windows_tools/includes;../../../windows_tools/src/c;../../../windows_tools/src/c/scilab_windows;../../../call_scilab/includes;../../../call_scilab/src/c;../../../graphics/includes;../../../io/includes;../../../console/includes;../../../preferences/includes;../../../history_manager/includes;../../../threads/includes;../../../external_objects/includes;../../../functions_manager/includes;../../../jvm/includes;../../../gui/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;../../../fftw/includes;../../../ui_data/includes</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;NDEBUG;_WINDOWS;_USRDLL;CORE_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <WarningLevel>Level3</WarningLevel>
+      <MultiProcessorCompilation>true</MultiProcessorCompilation>
+    </ClCompile>
+    <PreLinkEvent>
+      <Message>Make dependencies</Message>
       <Command>setlocal EnableDelayedExpansion
 cd $(ConfigurationName)
 set LIST_OBJ=
@@ -222,233 +222,233 @@ copy $(ProjectName).def+..\core_export.def ..\$(ProjectName).def &gt;nul
 del *.def &gt;nul
 cd ..
 
-</Command>\r
-    </PreLinkEvent>\r
-    <Link>\r
-      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>\r
-      <GenerateDebugInformation>false</GenerateDebugInformation>\r
-      <SubSystem>Windows</SubSystem>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>\r
-      <TargetMachine>MachineX64</TargetMachine>\r
-      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>\r
-      <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
-      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>\r
-    </Link>\r
-    <PreBuildEvent>\r
+</Command>
+    </PreLinkEvent>
+    <Link>
+      <AdditionalDependencies>functions_manager.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OutputFile>$(SolutionDir)bin\$(ProjectName).dll</OutputFile>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <ImportLibrary>$(SolutionDir)bin\$(ProjectName).lib</ImportLibrary>
+      <TargetMachine>MachineX64</TargetMachine>
+      <CLRUnmanagedCodeCheck>true</CLRUnmanagedCodeCheck>
+      <RandomizedBaseAddress>false</RandomizedBaseAddress>
+      <ModuleDefinitionFile>core.def</ModuleDefinitionFile>
+    </Link>
+    <PreBuildEvent>
       <Command>lib /DEF:"$(ProjectDir)functions_manager_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platform) /OUT:"$(ProjectDir)functions_manager.lib" 1&gt;NUL 2&gt;NUL
-</Command>\r
-    </PreBuildEvent>\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="..\cpp\banner.cpp" />\r
-    <ClCompile Include="..\cpp\getfunctionsname.cpp" />\r
-    <ClCompile Include="..\cpp\getmacrosname.cpp" />\r
-    <ClCompile Include="..\cpp\getvariablesname.cpp" />\r
-    <ClCompile Include="..\cpp\InitScilab.cpp" />\r
-    <ClCompile Include="..\cpp\parsecommand.cpp" />\r
-    <ClCompile Include="..\cpp\pause.cpp" />\r
-    <ClCompile Include="..\cpp\runner.cpp" />\r
-    <ClCompile Include="..\cpp\setformat.cpp" />\r
-    <ClCompile Include="..\cpp\setlines.cpp" />\r
-    <ClCompile Include="..\cpp\storeCommand.cpp" />\r
-    <ClCompile Include="..\cpp\tasks.cpp" />\r
-    <ClCompile Include="..\cpp\with_module.cpp" />\r
-    <ClCompile Include="..\cpp\backtrace_print.cpp" />\r
-    <ClCompile Include="backtrace.c" />\r
-    <ClCompile Include="commandwords.c" />\r
-    <ClCompile Include="DllmainCore.c" />\r
-    <ClCompile Include="dynamic_gateways.c" />\r
-    <ClCompile Include="freeArrayOfString.c" />\r
-    <ClCompile Include="getcommandlineargs.c" />\r
-    <ClCompile Include="getdynamicdebuginfo.c" />\r
-    <ClCompile Include="getdynamicDebugInfo_Windows.c" />\r
-    <ClCompile Include="getmaxMALLOC.c" />\r
-    <ClCompile Include="getmemory.c" />\r
-    <ClCompile Include="getmodules.c" />\r
-    <ClCompile Include="getos.c" />\r
-    <ClCompile Include="getstaticdebuginfo.c" />\r
-    <ClCompile Include="getstaticDebugInfo_Windows.c" />\r
-    <ClCompile Include="getversion.c" />\r
-    <ClCompile Include="GetXmlFileEncoding.c" />\r
-    <ClCompile Include="hashtable\hashtable.c" />\r
-    <ClCompile Include="hashtable\hashtable_utility.c" />\r
-    <ClCompile Include="InitializePreferences.c" />\r
-    <ClCompile Include="isanan.c" />\r
-    <ClCompile Include="islittleendian.c" />\r
-    <ClCompile Include="loadversion.c" />\r
-    <ClCompile Include="md5.c" />\r
-    <ClCompile Include="returnanan.c" />\r
-    <ClCompile Include="saveCWDInPreferences.c" />\r
-    <ClCompile Include="setPrecisionFPU.c" />\r
-    <ClCompile Include="transposeMatrix.c" />\r
-    <ClCompile Include="version.c" />\r
-    <ClCompile Include="win_mem_alloc.c" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <None Include="..\..\locales\core.pot" />\r
-    <None Include="..\..\core.iss" />\r
-    <CustomBuildStep Include="..\..\includes\machine.h.vc">\r
-      <FileType>Document</FileType>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>\r
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>\r
-    </CustomBuildStep>\r
-    <None Include="..\..\Makefile.am" />\r
-    <None Include="core.def" />\r
-    <None Include="core_export.def" />\r
-    <None Include="functions_manager_Import.def" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="..\..\includes\backtrace_print.h" />\r
-    <ClInclude Include="..\..\includes\banner.hxx" />\r
-    <ClInclude Include="..\..\includes\BOOL.h" />\r
-    <ClInclude Include="..\..\includes\commandwords.h" />\r
-    <ClInclude Include="..\..\includes\core_gw.hxx" />\r
-    <ClInclude Include="..\..\includes\core_math.h" />\r
-    <ClInclude Include="..\..\includes\dynlib_core.h" />\r
-    <ClInclude Include="..\..\includes\existfunction.h" />\r
-    <ClInclude Include="..\..\includes\exit_status.hxx" />\r
-    <ClInclude Include="..\..\includes\freeArrayOfString.h" />\r
-    <ClInclude Include="..\..\includes\getcommandlineargs.h" />\r
-    <ClInclude Include="..\..\includes\getfunctionsname.h" />\r
-    <ClInclude Include="..\..\includes\getmacrosname.h" />\r
-    <ClInclude Include="..\..\includes\getmaxMALLOC.h" />\r
-    <ClInclude Include="..\..\includes\getmemory.h" />\r
-    <ClInclude Include="..\..\includes\getmodules.h" />\r
-    <ClInclude Include="..\..\includes\getos.h" />\r
-    <ClInclude Include="..\..\includes\getvariablesname.h" />\r
-    <ClInclude Include="..\..\includes\getversion.h" />\r
-    <ClInclude Include="..\..\includes\GetXmlFileEncoding.h" />\r
-    <ClInclude Include="..\..\includes\gw_core.h" />\r
-    <ClInclude Include="..\..\includes\gw_user.h" />\r
-    <ClInclude Include="..\..\includes\gw_user2.h" />\r
-    <ClInclude Include="..\..\includes\hashtable.h" />\r
-    <ClInclude Include="..\..\includes\hashtable_private.h" />\r
-    <ClInclude Include="..\..\includes\hashtable_utility.h" />\r
-    <ClInclude Include="..\..\includes\inffic.h" />\r
-    <ClInclude Include="..\..\includes\InitializePreferences.h" />\r
-    <ClInclude Include="..\..\includes\initMacOSXEnv.h" />\r
-    <ClInclude Include="..\..\includes\InitScilab.h" />\r
-    <ClInclude Include="..\..\includes\isanan.h" />\r
-    <ClInclude Include="..\..\includes\islittleendian.h" />\r
-    <ClInclude Include="..\..\includes\loadversion.h" />\r
-    <ClInclude Include="..\..\includes\machine.h" />\r
-    <ClInclude Include="..\..\includes\md5.h" />\r
-    <ClInclude Include="..\..\includes\parsecommand.h" />\r
-    <ClInclude Include="..\..\includes\pause.h" />\r
-    <ClInclude Include="..\..\includes\sci_malloc.h" />\r
-    <ClInclude Include="..\..\includes\PARAMS.h" />\r
-    <ClInclude Include="..\..\includes\PATH_MAX.h" />\r
-    <ClInclude Include="..\..\includes\realmain.h" />\r
-    <ClInclude Include="..\..\includes\returnanan.h" />\r
-    <ClInclude Include="..\..\includes\runner.hxx" />\r
-    <ClInclude Include="..\..\includes\scilabDefaults.h" />\r
-    <ClInclude Include="..\..\includes\scimem.h" />\r
-    <ClInclude Include="..\..\includes\scisparse.h" />\r
-    <ClInclude Include="..\..\includes\sci_tools.h" />\r
-    <ClInclude Include="..\..\includes\sci_types.h" />\r
-    <ClInclude Include="..\..\includes\setformat.h" />\r
-    <ClInclude Include="..\..\includes\setlines.h" />\r
-    <ClInclude Include="..\..\includes\setPrecisionFPU.h" />\r
-    <ClInclude Include="..\..\includes\sigbas.h" />\r
-    <ClInclude Include="..\..\includes\signal_mgmt.h" />\r
-    <ClInclude Include="..\..\includes\storeCommand.h" />\r
-    <ClInclude Include="..\..\includes\suspendProcess.h" />\r
-    <ClInclude Include="..\..\includes\syncexec.h" />\r
-    <ClInclude Include="..\..\includes\tasks.hxx" />\r
-    <ClInclude Include="..\..\includes\timer.hxx" />\r
-    <ClInclude Include="..\..\includes\transposeMatrix.h" />\r
-    <ClInclude Include="..\..\includes\version.h" />\r
-    <ClInclude Include="..\..\includes\win_mem_alloc.h" />\r
-    <ClInclude Include="..\..\includes\with_module.h" />\r
-    <ClInclude Include="..\cpp\partition.hxx" />\r
-    <ClInclude Include="..\cpp\unrolled_algorithms.hxx" />\r
-    <ClInclude Include="backtrace.h" />\r
-    <ClInclude Include="dynamic_gateways.h" />\r
-    <ClInclude Include="getdebuginfo.h" />\r
-    <ClInclude Include="getdynamicdebuginfo.h" />\r
-    <ClInclude Include="getdynamicDebugInfo_Windows.h" />\r
-    <ClInclude Include="getstaticdebuginfo.h" />\r
-    <ClInclude Include="getstaticDebugInfo_Windows.h" />\r
-    <ClInclude Include="gw_dynamic_generic.h" />\r
-    <ClInclude Include="saveCWDInPreferences.h" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ProjectReference Include="..\..\..\..\libs\GetWindowsVersion\GetWindowsVersion.vcxproj">\r
-      <Project>{982bf37f-42c4-4d37-8d14-60521b141503}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">\r
-      <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">\r
-      <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\ast\ast.vcxproj">\r
-      <Project>{0d3fa25b-8116-44ec-a45e-260789daa3d9}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\console\src\c\console.vcxproj">\r
-      <Project>{445d3b85-c9b1-498b-9c88-0a3c2390b1cc}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\dynamic_link\src\c\dynamic_link.vcxproj">\r
-      <Project>{eab6c580-22b3-4359-ba1d-dd7499a96163}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\fftw\fftw.vcxproj">\r
-      <Project>{13b86307-5a11-48d6-94be-71f77bcb82d1}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">\r
-      <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\graphics\graphics.vcxproj">\r
-      <Project>{8ccdd3c2-b025-4a12-a986-1aa28d7c0c33}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\gui\src\c\gui.vcxproj">\r
-      <Project>{45ca5b12-7601-4968-ae16-16069fd1a152}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\hdf5\src\c\hdf5.vcxproj">\r
-      <Project>{a824ea62-af07-4f43-9036-0e63990556bd}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\history_manager\src\c\history_manager.vcxproj">\r
-      <Project>{1b98dc87-44f5-48ae-b5d0-29dd8ad86f5e}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\io\src\c\io.vcxproj">\r
-      <Project>{80c0f142-184b-4e08-a8ee-5e71437cf904}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\jvm\libjvm.vcxproj">\r
-      <Project>{8ba2dda8-bd04-4d4d-8ee6-6caa955f7470}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">\r
-      <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">\r
-      <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\preferences\src\c\preferences.vcxproj">\r
-      <Project>{7b893e9f-d032-44de-9b71-197a29c4989b}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\string\src\c\string.vcxproj">\r
-      <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\tclsci\tclsci.vcxproj">\r
-      <Project>{c456d5b8-8a32-496a-a2ee-164b0d734126}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\threads\threads.vcxproj">\r
-      <Project>{50a1ffc8-adc2-4d9e-a2d0-5dcd63188ae9}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\ui_data\src\c\ui_data.vcxproj">\r
-      <Project>{142d643b-a9ec-49db-9d48-a925a20f63b1}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\windows_tools\src\c\scilab_windows\scilab_windows.vcxproj">\r
-      <Project>{8028f371-6a94-4a26-8804-6e7f05f1d1aa}</Project>\r
-    </ProjectReference>\r
-    <ProjectReference Include="..\..\..\windows_tools\src\c\windows_tools.vcxproj">\r
-      <Project>{9594ac02-20ee-4fbf-95b4-bfa5865ed7ca}</Project>\r
-    </ProjectReference>\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
+</Command>
+    </PreBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\cpp\banner.cpp" />
+    <ClCompile Include="..\cpp\getfunctionsname.cpp" />
+    <ClCompile Include="..\cpp\getmacrosname.cpp" />
+    <ClCompile Include="..\cpp\getvariablesname.cpp" />
+    <ClCompile Include="..\cpp\InitScilab.cpp" />
+    <ClCompile Include="..\cpp\parsecommand.cpp" />
+    <ClCompile Include="..\cpp\pause.cpp" />
+    <ClCompile Include="..\cpp\runner.cpp" />
+    <ClCompile Include="..\cpp\setformat.cpp" />
+    <ClCompile Include="..\cpp\setlines.cpp" />
+    <ClCompile Include="..\cpp\storeCommand.cpp" />
+    <ClCompile Include="..\cpp\tasks.cpp" />
+    <ClCompile Include="..\cpp\with_module.cpp" />
+    <ClCompile Include="..\cpp\backtrace_print.cpp" />
+    <ClCompile Include="backtrace.c" />
+    <ClCompile Include="commandwords.c" />
+    <ClCompile Include="DllmainCore.c" />
+    <ClCompile Include="dynamic_gateways.c" />
+    <ClCompile Include="freeArrayOfString.c" />
+    <ClCompile Include="getcommandlineargs.c" />
+    <ClCompile Include="getdynamicdebuginfo.c" />
+    <ClCompile Include="getdynamicDebugInfo_Windows.c" />
+    <ClCompile Include="getmaxMALLOC.c" />
+    <ClCompile Include="getmemory.c" />
+    <ClCompile Include="getmodules.c" />
+    <ClCompile Include="getos.c" />
+    <ClCompile Include="getstaticdebuginfo.c" />
+    <ClCompile Include="getstaticDebugInfo_Windows.c" />
+    <ClCompile Include="getversion.c" />
+    <ClCompile Include="GetXmlFileEncoding.c" />
+    <ClCompile Include="hashtable\hashtable.c" />
+    <ClCompile Include="hashtable\hashtable_utility.c" />
+    <ClCompile Include="InitializePreferences.c" />
+    <ClCompile Include="isanan.c" />
+    <ClCompile Include="islittleendian.c" />
+    <ClCompile Include="loadversion.c" />
+    <ClCompile Include="md5.c" />
+    <ClCompile Include="returnanan.c" />
+    <ClCompile Include="saveCWDInPreferences.c" />
+    <ClCompile Include="setPrecisionFPU.c" />
+    <ClCompile Include="transposeMatrix.c" />
+    <ClCompile Include="version.c" />
+    <ClCompile Include="win_mem_alloc.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\..\locales\core.pot" />
+    <None Include="..\..\core.iss" />
+    <CustomBuildStep Include="..\..\includes\machine.h.vc">
+      <FileType>Document</FileType>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
+      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
+    </CustomBuildStep>
+    <None Include="..\..\Makefile.am" />
+    <None Include="core.def" />
+    <None Include="core_export.def" />
+    <None Include="functions_manager_Import.def" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\includes\backtrace_print.h" />
+    <ClInclude Include="..\..\includes\banner.hxx" />
+    <ClInclude Include="..\..\includes\BOOL.h" />
+    <ClInclude Include="..\..\includes\commandwords.h" />
+    <ClInclude Include="..\..\includes\core_gw.hxx" />
+    <ClInclude Include="..\..\includes\core_math.h" />
+    <ClInclude Include="..\..\includes\dynlib_core.h" />
+    <ClInclude Include="..\..\includes\existfunction.h" />
+    <ClInclude Include="..\..\includes\exit_status.hxx" />
+    <ClInclude Include="..\..\includes\freeArrayOfString.h" />
+    <ClInclude Include="..\..\includes\getcommandlineargs.h" />
+    <ClInclude Include="..\..\includes\getfunctionsname.h" />
+    <ClInclude Include="..\..\includes\getmacrosname.h" />
+    <ClInclude Include="..\..\includes\getmaxMALLOC.h" />
+    <ClInclude Include="..\..\includes\getmemory.h" />
+    <ClInclude Include="..\..\includes\getmodules.h" />
+    <ClInclude Include="..\..\includes\getos.h" />
+    <ClInclude Include="..\..\includes\getvariablesname.h" />
+    <ClInclude Include="..\..\includes\getversion.h" />
+    <ClInclude Include="..\..\includes\GetXmlFileEncoding.h" />
+    <ClInclude Include="..\..\includes\gw_core.h" />
+    <ClInclude Include="..\..\includes\gw_user.h" />
+    <ClInclude Include="..\..\includes\gw_user2.h" />
+    <ClInclude Include="..\..\includes\hashtable.h" />
+    <ClInclude Include="..\..\includes\hashtable_private.h" />
+    <ClInclude Include="..\..\includes\hashtable_utility.h" />
+    <ClInclude Include="..\..\includes\inffic.h" />
+    <ClInclude Include="..\..\includes\InitializePreferences.h" />
+    <ClInclude Include="..\..\includes\initMacOSXEnv.h" />
+    <ClInclude Include="..\..\includes\InitScilab.h" />
+    <ClInclude Include="..\..\includes\isanan.h" />
+    <ClInclude Include="..\..\includes\islittleendian.h" />
+    <ClInclude Include="..\..\includes\loadversion.h" />
+    <ClInclude Include="..\..\includes\machine.h" />
+    <ClInclude Include="..\..\includes\md5.h" />
+    <ClInclude Include="..\..\includes\parsecommand.h" />
+    <ClInclude Include="..\..\includes\pause.h" />
+    <ClInclude Include="..\..\includes\sci_malloc.h" />
+    <ClInclude Include="..\..\includes\PARAMS.h" />
+    <ClInclude Include="..\..\includes\PATH_MAX.h" />
+    <ClInclude Include="..\..\includes\realmain.h" />
+    <ClInclude Include="..\..\includes\returnanan.h" />
+    <ClInclude Include="..\..\includes\runner.hxx" />
+    <ClInclude Include="..\..\includes\scilabDefaults.h" />
+    <ClInclude Include="..\..\includes\scimem.h" />
+    <ClInclude Include="..\..\includes\scisparse.h" />
+    <ClInclude Include="..\..\includes\sci_tools.h" />
+    <ClInclude Include="..\..\includes\sci_types.h" />
+    <ClInclude Include="..\..\includes\setformat.h" />
+    <ClInclude Include="..\..\includes\setlines.h" />
+    <ClInclude Include="..\..\includes\setPrecisionFPU.h" />
+    <ClInclude Include="..\..\includes\sigbas.h" />
+    <ClInclude Include="..\..\includes\signal_mgmt.h" />
+    <ClInclude Include="..\..\includes\storeCommand.h" />
+    <ClInclude Include="..\..\includes\suspendProcess.h" />
+    <ClInclude Include="..\..\includes\syncexec.h" />
+    <ClInclude Include="..\..\includes\tasks.hxx" />
+    <ClInclude Include="..\..\includes\timer.hxx" />
+    <ClInclude Include="..\..\includes\transposeMatrix.h" />
+    <ClInclude Include="..\..\includes\version.h" />
+    <ClInclude Include="..\..\includes\win_mem_alloc.h" />
+    <ClInclude Include="..\..\includes\with_module.h" />
+    <ClInclude Include="..\cpp\partition.hxx" />
+    <ClInclude Include="..\cpp\unrolled_algorithms.hxx" />
+    <ClInclude Include="backtrace.h" />
+    <ClInclude Include="dynamic_gateways.h" />
+    <ClInclude Include="getdebuginfo.h" />
+    <ClInclude Include="getdynamicdebuginfo.h" />
+    <ClInclude Include="getdynamicDebugInfo_Windows.h" />
+    <ClInclude Include="getstaticdebuginfo.h" />
+    <ClInclude Include="getstaticDebugInfo_Windows.h" />
+    <ClInclude Include="gw_dynamic_generic.h" />
+    <ClInclude Include="saveCWDInPreferences.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\..\..\libs\GetWindowsVersion\GetWindowsVersion.vcxproj">
+      <Project>{982bf37f-42c4-4d37-8d14-60521b141503}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\..\tools\Dumpexts\Dumpexts.vcxproj">
+      <Project>{3170e4c2-1173-4264-a222-7ee8ccb3ddf7}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\api_scilab\api_scilab.vcxproj">
+      <Project>{43c5bab1-1dca-4743-a183-77e0d42fe7d0}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\ast\ast.vcxproj">
+      <Project>{0d3fa25b-8116-44ec-a45e-260789daa3d9}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\console\src\c\console.vcxproj">
+      <Project>{445d3b85-c9b1-498b-9c88-0a3c2390b1cc}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\dynamic_link\src\c\dynamic_link.vcxproj">
+      <Project>{eab6c580-22b3-4359-ba1d-dd7499a96163}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\fftw\fftw.vcxproj">
+      <Project>{13b86307-5a11-48d6-94be-71f77bcb82d1}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\fileio\fileio.vcxproj">
+      <Project>{4fc72d4a-80ee-4b1a-8724-0201c1a35621}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\graphics\graphics.vcxproj">
+      <Project>{8ccdd3c2-b025-4a12-a986-1aa28d7c0c33}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\gui\src\c\gui.vcxproj">
+      <Project>{45ca5b12-7601-4968-ae16-16069fd1a152}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\hdf5\src\c\hdf5.vcxproj">
+      <Project>{a824ea62-af07-4f43-9036-0e63990556bd}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\history_manager\src\c\history_manager.vcxproj">
+      <Project>{1b98dc87-44f5-48ae-b5d0-29dd8ad86f5e}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\io\src\c\io.vcxproj">
+      <Project>{80c0f142-184b-4e08-a8ee-5e71437cf904}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\jvm\libjvm.vcxproj">
+      <Project>{8ba2dda8-bd04-4d4d-8ee6-6caa955f7470}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\localization\src\localization.vcxproj">
+      <Project>{ecffeb0c-1eda-45ee-9a10-b18143852e17}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\output_stream\src\c\output_stream.vcxproj">
+      <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\preferences\src\c\preferences.vcxproj">
+      <Project>{7b893e9f-d032-44de-9b71-197a29c4989b}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\string\src\c\string.vcxproj">
+      <Project>{8d45767a-9b03-4905-97f6-d2f3f79141ea}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\tclsci\tclsci.vcxproj">
+      <Project>{c456d5b8-8a32-496a-a2ee-164b0d734126}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\threads\threads.vcxproj">
+      <Project>{50a1ffc8-adc2-4d9e-a2d0-5dcd63188ae9}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\ui_data\src\c\ui_data.vcxproj">
+      <Project>{142d643b-a9ec-49db-9d48-a925a20f63b1}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\windows_tools\src\c\scilab_windows\scilab_windows.vcxproj">
+      <Project>{8028f371-6a94-4a26-8804-6e7f05f1d1aa}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\..\..\windows_tools\src\c\windows_tools.vcxproj">
+      <Project>{9594ac02-20ee-4fbf-95b4-bfa5865ed7ca}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
 </Project>
\ No newline at end of file
index 6aeb229..ae31184 100644 (file)
@@ -53,6 +53,7 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_mopen.cpp \
        sci_gateway/cpp/sci_mclose.cpp \
        sci_gateway/cpp/sci_mget.cpp \
+       sci_gateway/cpp/sci_mgeti.cpp \
        sci_gateway/cpp/sci_mput.cpp \
        sci_gateway/cpp/sci_mputl.cpp \
        sci_gateway/cpp/sci_mgetl.cpp \
index ff112c1..79942ed 100644 (file)
@@ -254,6 +254,7 @@ am__objects_4 = sci_gateway/cpp/libscifileio_la-fileio_gw.lo \
        sci_gateway/cpp/libscifileio_la-sci_mopen.lo \
        sci_gateway/cpp/libscifileio_la-sci_mclose.lo \
        sci_gateway/cpp/libscifileio_la-sci_mget.lo \
+       sci_gateway/cpp/libscifileio_la-sci_mgeti.lo \
        sci_gateway/cpp/libscifileio_la-sci_mput.lo \
        sci_gateway/cpp/libscifileio_la-sci_mputl.lo \
        sci_gateway/cpp/libscifileio_la-sci_mgetl.lo \
@@ -341,6 +342,7 @@ am__depfiles_remade =  \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfprintf.Plo \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfscanf.Plo \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mget.Plo \
+       sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Plo \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetl.Plo \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetstr.Plo \
        sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mopen.Plo \
@@ -817,6 +819,7 @@ GATEWAY_CPP_SOURCES = \
        sci_gateway/cpp/sci_mopen.cpp \
        sci_gateway/cpp/sci_mclose.cpp \
        sci_gateway/cpp/sci_mget.cpp \
+       sci_gateway/cpp/sci_mgeti.cpp \
        sci_gateway/cpp/sci_mput.cpp \
        sci_gateway/cpp/sci_mputl.cpp \
        sci_gateway/cpp/sci_mgetl.cpp \
@@ -1256,6 +1259,9 @@ sci_gateway/cpp/libscifileio_la-sci_mclose.lo:  \
 sci_gateway/cpp/libscifileio_la-sci_mget.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
+sci_gateway/cpp/libscifileio_la-sci_mgeti.lo:  \
+       sci_gateway/cpp/$(am__dirstamp) \
+       sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
 sci_gateway/cpp/libscifileio_la-sci_mput.lo:  \
        sci_gateway/cpp/$(am__dirstamp) \
        sci_gateway/cpp/$(DEPDIR)/$(am__dirstamp)
@@ -1409,6 +1415,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfprintf.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfscanf.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mget.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetl.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetstr.Plo@am__quote@ # am--include-marker
 @AMDEP_TRUE@@am__include@ @am__quote@sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mopen.Plo@am__quote@ # am--include-marker
@@ -1977,6 +1984,13 @@ sci_gateway/cpp/libscifileio_la-sci_mget.lo: sci_gateway/cpp/sci_mget.cpp
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscifileio_la-sci_mget.lo `test -f 'sci_gateway/cpp/sci_mget.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_mget.cpp
 
+sci_gateway/cpp/libscifileio_la-sci_mgeti.lo: sci_gateway/cpp/sci_mgeti.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscifileio_la-sci_mgeti.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Tpo -c -o sci_gateway/cpp/libscifileio_la-sci_mgeti.lo `test -f 'sci_gateway/cpp/sci_mgeti.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_mgeti.cpp
+@am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Tpo sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     $(AM_V_CXX)source='sci_gateway/cpp/sci_mgeti.cpp' object='sci_gateway/cpp/libscifileio_la-sci_mgeti.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o sci_gateway/cpp/libscifileio_la-sci_mgeti.lo `test -f 'sci_gateway/cpp/sci_mgeti.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_mgeti.cpp
+
 sci_gateway/cpp/libscifileio_la-sci_mput.lo: sci_gateway/cpp/sci_mput.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libscifileio_la_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT sci_gateway/cpp/libscifileio_la-sci_mput.lo -MD -MP -MF sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mput.Tpo -c -o sci_gateway/cpp/libscifileio_la-sci_mput.lo `test -f 'sci_gateway/cpp/sci_mput.cpp' || echo '$(srcdir)/'`sci_gateway/cpp/sci_mput.cpp
 @am__fastdepCXX_TRUE@  $(AM_V_at)$(am__mv) sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mput.Tpo sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mput.Plo
@@ -2458,6 +2472,7 @@ distclean: distclean-am
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfprintf.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfscanf.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mget.Plo
+       -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetl.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetstr.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mopen.Plo
@@ -2603,6 +2618,7 @@ maintainer-clean: maintainer-clean-am
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfprintf.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mfscanf.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mget.Plo
+       -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgeti.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetl.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mgetstr.Plo
        -rm -f sci_gateway/cpp/$(DEPDIR)/libscifileio_la-sci_mopen.Plo
index 19a2444..2262938 100644 (file)
@@ -3,8 +3,8 @@
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
  * ...
- *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2016 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="mget" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
+    xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+    xmlns:scilab="http://www.scilab.org" xml:id="mget" xml:lang="en">
     <refnamediv>
         <refname>mget</refname>
-        <refpurpose>reads byte or word in a given binary format and converts to
-            a double type
+        <refpurpose>
+            parses numbers in a binary file and returns them as decimals
         </refpurpose>
     </refnamediv>
+    <refsynopsisdiv>
+        <title>Syntax</title>
+        <synopsis>
+            D = mget(nNumb)
+            D = mget(nNumb, binFormat)
+            D = mget(nNumb, binFormat, fileID)
+        </synopsis>
+    </refsynopsisdiv>
     <refnamediv xml:id="mgeti">
         <refname>mgeti</refname>
         <refpurpose>
-            reads byte or word in a given binary format and returns an int type
+            parses numbers in a binary file and returns them as encoded integers
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Syntax</title>
         <synopsis>
-            x = mget([n, type, fd])
-            x = mgeti([n, type, fd])
+            I = mgeti(nNumb)
+            I = mgeti(nNumb, binFormat)
+            I = mgeti(nNumb, binFormat, fileID)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Arguments</title>
         <variablelist>
             <varlistentry>
-                <term>n</term>
-                <listitem>
-                    <para>a positive integer scalar: the number of items to be read.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>fd</term>
+                <term>fileID</term>
                 <listitem>
                     <para>
-                        a scalar: a file descriptor returned by the function <function>mopen</function>. <literal>-1</literal>
-                        stands for last opened file. Default value is
-                        <literal>-1</literal>.
+                        file identifier (single integer) returned by
+                        <function>mopen</function> when opening the file.
+                        By default, the last opened file is considered.
+                    <important>
+                        The file must be priorly opened in
+                        <emphasis role="bold">r</emphasis>ead
+                        <emphasis role="bold">b</emphasis>inary mode with
+                        <code>fileID = mopen(filename,'rb')</code>.
+                    </important>
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>type</term>
+                <term>nNumb</term>
                 <listitem>
                     <para>
-                        a string: the binary format used to write all the entries of
-                        <varname>x</varname>.
+                        Single integer > 0: number of numbers to be
+                        parsed and returned. Each number is encoded over one or
+                        several bytes, according to the used <varname>binFormat</varname>.
+                        <note>To read all numbers remaining in the file, use a
+                        value <varname>nNumb</varname> big enough.
+                        </note>
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>x</term>
-                <listitem>
-                    <para>a vector of floating point or integer numbers.</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Description</title>
-        <para>
-            The <function>mget</function> function reads data in the input
-            specified by the stream parameter <varname>fd</varname> and returns a
-            vector of floating point data.
-        </para>
-        <para>
-            The <function>mgeti</function> function reads data in the input
-            specified by the stream parameter <varname>fd</varname> and returns a
-            vector of integer data.
-        </para>
-        <para>
-            Data is read at the position at which the file pointer is currently
-            pointing and advances the indicator appropriately.
-        </para>
-        <para>
-            The <varname>type</varname> parameter is a conversion specifier
-            which may be set to any of the following flag characters (with default
-            value <literal>"l"</literal>):
-        </para>
-        <para>
-            <note>
-                On Windows, default behavior is to skip byte 13 (<literal>0x0D</literal>).
-                <function>mopen</function> should be called with the
-                <literal>'b'</literal> option, e.g.
-                <code>fd1 = mopen(file1,'rb')</code>, so that all bytes will be read
-                without exception.
-            </note>
-        </para>
-        <para>Data type:</para>
-        <variablelist>
-            <varlistentry>
-                <term>d</term>
-                <listitem>
-                    <para>double</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>f</term>
-                <listitem>
-                    <para>float</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>l</term>
-                <listitem>
-                    <para>long long int</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>i</term>
-                <listitem>
-                    <para>int or long int</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>s</term>
-                <listitem>
-                    <para>short</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>c</term>
+                <term>binFormat</term>
                 <listitem>
-                    <para>character</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-        <para>Optional flag:</para>
-        <variablelist>
-            <varlistentry>
-                <term>u..</term>
-                <listitem>
-                    <para>unsigned (in combination with one of the above types)</para>
+                    <para>
+                        a text word made of one, 2 or 3 character codes: the binary
+                        format used to parse numbers in the binary file.
+                        Available binary codes are the following:
+                    <table>
+                        <tr valign="top">
+                            <td align="right">c</td>
+                            <td>: individual bytes parsed as
+                                <literal>int8</literal> integers
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">uc</td>
+                            <td>: individual bytes parsed as
+                                <literal>uint8</literal> unsigned integers >0
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">s</td>
+                            <td>: 2-byte blocks parsed as
+                                <literal>int16</literal> integers
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">us</td>
+                            <td>: 2-byte blocks parsed as
+                                <literal>uint16</literal> unsigned integers >0
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">i</td>
+                            <td>: 4-byte blocks parsed as
+                                <literal>int32</literal> integers
+                                (<emphasis role="bold">default mode</emphasis>).
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">ui</td>
+                            <td>: 4-byte blocks parsed as
+                                <literal>uint32</literal> unsigned integers >0
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">l</td>
+                            <td>: 8-byte blocks parsed as
+                                <literal>int64</literal> integers
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">ul</td>
+                            <td>: 8-byte blocks parsed as
+                                <literal>uint64</literal> unsigned integers >0
+                            </td>
+                        </tr>
+                        <tr>
+                            <td/>
+                            <td>
+                                Only with <function>mget()</function> :
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">f</td>
+                            <td>: 4-byte blocks parsed as
+                                "single precision" decimal numbers
+                                (so-called "<emphasis role="bold">f</emphasis>loats"
+                                in oldies)
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">d</td>
+                            <td>: 8-byte blocks parsed as
+                                <emphasis role="bold">d</emphasis>ecimal numbers
+                            </td>
+                        </tr>
+                    </table>
+                    </para>
+                    <para>
+                        The default order of bytes in a block can be set using
+                        a <function>mopen</function> option when opening the file.
+                        This order may be forced afterwards using an optional
+                        <function>mget</function> or <function>mgeti</function>
+                        flag to be appended to <varname>binFormat</varname>:
+                        <table>
+                            <tr valign="top">
+                                <td align="right">..l :</td>
+                                <td><emphasis role="bold">l</emphasis>ittle endian
+                                (first byte in the block = low power byte)
+                                </td>
+                            </tr>
+                            <tr valign="top">
+                                <td align="right">..b :</td>
+                                <td><emphasis role="bold">b</emphasis>ig endian
+                                (first byte in the block = high power byte)
+                                </td>
+                            </tr>
+                        </table>
+                    </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>..l</term>
+                <term>D</term>
                 <listitem>
                     <para>
-                        little endian (in combination with one of the above types)
+                        Row of <varname>nNumb</varname> Decimal numbers
+                        (or available ones if the End Of File has been reached).
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>..b</term>
+                <term>I</term>
                 <listitem>
                     <para>
-                        big endian (in combination with one of the above types)
+                        Row of <varname>nNumb</varname> encoded Integers
+                        (or available ones if the End Of File has been reached).
+                        The <function>inttype</function> of returned integers
+                        depends on the used <varname>binFormat</varname>.
                     </para>
                 </listitem>
             </varlistentry>
         </variablelist>
+    </refsection>
+    <refsection>
+        <title>Description</title>
         <para>
-            Bytes read is automatically swapped if necessary (by checking
-            <literal>little=endian</literal> status).
+            <function>mget</function> and <function>mgeti</function> start reading
+            bytes in the specified file from the current position of the inner
+            file pointer. After reading a block of N bytes (N==1,2,4,8 according
+            to the chosen <varname>binFormat</varname>),
+            <itemizedlist>
+                <listitem>
+                    the file pointer is increased by N bytes and set to the
+                    beginning of next block.
+                </listitem>
+                <listitem>
+                    the read block is ordered according to the default or chosen
+                    swapping endian mode. The parsed block is then stored to
+                    be returned.
+                </listitem>
+            </itemizedlist>
+            This is iterated <varname>nNumb</varname> times, unless
+            the End Of File is reached: In this case, parsing the file is
+            stopped, the uncomplete block is left (if any), the EOF status is set,
+            and already parsed numbers are returned.
         </para>
         <para>
-            This default swapping behavior can be suppressed by adding a flag in
-            the <function>mopen</function> function.
+            When <function>mgeti()</function> is used, parsed numbers are
+            converted into the <function>inttype</function> corresponding to
+            the chosen <varname>binFormat</varname> and then returned.
         </para>
         <para>
-            Formats <literal>"l"</literal>, <literal>"d"</literal> and
-            <literal>"f"</literal> are only valid with the
-            <function>mget</function> function.
+            When <function>mget()</function> is used, binary numbers are
+            parsed according to <varname>binFormat</varname> but are finally
+            converted into 8-byte decimal numbers and then returned.
+            <warning>
+            If <literal>int64</literal> or <literal>uint64</literal>
+            integers > 2<superscript>53</superscript> were parsed thanks
+            to the <literal>"ul*"</literal> or <literal>"l*"</literal> format,
+            their final conversion into decimal numbers
+            truncates their mantissa to their 53 highest bits.
+            </warning>
         </para>
     </refsection>
     <refsection>
         <title>Examples</title>
         <programlisting role="example"><![CDATA[
-file1 = fullfile(TMPDIR,'test1.bin');
-file2 = fullfile(TMPDIR,'test2.bin');
-fd1=mopen(file1,'wb');
-fd2=mopen(file2,'wb');
-mput(1996,'ull',fd1);
-mput(1996,'ull',fd2);
-mclose(fd1);
-mclose(fd2);
+binfile = TMPDIR+"/mgetest.bin";
+idF = mopen(binfile, "w+b");
+mput(int8(0:16),"uc");
 
-fd1=mopen(file1,'rb');
-if 1996<>mget(1,'ull',fd1)
-  write(%io(2),'Bug');
-end
+ mseek(0);
+ mgeti(1,"uc")  // 0 expected
+ mgeti(2,"uc")  // 1, 2 expected
+[mgeti(1,"us"),  uint16(3 + 4*256)]
+ mseek(3);      // back to the previous position on "3"
+[mgeti(1,"usb"), uint16(4 + 3*256)] // swapped bytes (big endian)
+ mseek(0);
+[mgeti(1,"ui") , uint32(0 + 256*(1 + 256*(2 + 256*3)))]
+ mseek(0);
+[mgeti(1,"uib"), uint32(3 + 256*(2 + 256*(1 + 256*0)))]
+mclose(idF);
 
-fd2=mopen(file2,'rb');
-if 1996<>mget(1,'ull',fd2)
-  write(%io(2),'Bug');
-end
+// uint64 and int64 integers with a relative accuracy of 1/2^64 = %eps/2^12
+// better than decimals one are well handled:
+    // Generating n 64-bit long integers with bits #0-#63 set randomly:
+n = 5;
+b = grand(64,n,"uin",0,1);
+p = uint64(2).^ndgrid(0:63,1:n);
+x0 = sum(b.*p, "r");
 
-mclose(fd1);
-mclose(fd2);
+    // We write them in a file, and then re-read them with mgeti():
+for usign = ["u" ""]
+    for endian = ["l" "b"]
+        binfile = TMPDIR+"/mgetiTestInt64.dat";
+        idF = mopen(binfile, "w+b");
+        x = x0;
+        if usign==""
+            x = int64(x);
+        end
+        mput(x,usign+"l"+endian)   // "l" is mandatory to manage all the 64 bits
+
+        // Now, read them in the same mode:
+        mseek(0);
+        xr = mgeti(n, usign+"l"+endian);
+        mclose(idF);
+
+        // Display:
+        wrParse = usign + "l" + endian;
+        printf("    Write as  ""%s""       Read as ""%s""\n", wrParse, wrParse);
+        [x' xr']
+    end
+end
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>See also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="mclose">mclose</link>
-            </member>
-            <member>
-                <link linkend="meof">meof</link>
-            </member>
-            <member>
-                <link linkend="mfprintf">mfprintf</link>
-            </member>
-            <member>
-                <link linkend="fprintfMat">fprintfMat</link>
-            </member>
-            <member>
-                <link linkend="mfscanf">mfscanf</link>
-            </member>
-            <member>
-                <link linkend="fscanfMat">fscanfMat</link>
-            </member>
-            <member>
-                <link linkend="mgetl">mgetl</link>
-            </member>
-            <member>
-                <link linkend="mgetstr">mgetstr</link>
-            </member>
-            <member>
                 <link linkend="mopen">mopen</link>
             </member>
             <member>
-                <link linkend="mprintf">mprintf</link>
+                <link linkend="mclose">mclose</link>
             </member>
             <member>
                 <link linkend="mput">mput</link>
             </member>
             <member>
-                <link linkend="mputl">mputl</link>
+                <link linkend="mseek">mseek</link>
+            </member>
+            <member>
+                <link linkend="mtell">mtell</link>
             </member>
             <member>
-                <link linkend="mputstr">mputstr</link>
+                <link linkend="meof">meof</link>
             </member>
             <member>
-                <link linkend="mseek">mseek</link>
+                <link linkend="readb">readb</link>
             </member>
             <member>
-                <link linkend="mtell">mtell</link>
+                <link linkend="read4b">read4b</link>
             </member>
             <member>
-                <link linkend="mdelete">mdelete</link>
+                <link linkend="inttype">inttype</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>mgeti(,"ul*"|"l*") is implemented
+                 to read uint64 or int64 integers > 2<superscript>52</superscript>.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
diff --git a/scilab/modules/fileio/help/ja_JP/mget.xml b/scilab/modules/fileio/help/ja_JP/mget.xml
deleted file mode 100644 (file)
index 967933c..0000000
+++ /dev/null
@@ -1,488 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
- * Copyright (C) 2008 - INRIA
- * ...
- *
- * Copyright (C) 2012 - 2016 - Scilab Enterprises
- *
- * This file is hereby licensed under the terms of the GNU GPL v2.0,
- * pursuant to article 5.3.4 of the CeCILL v.2.1.
- * This file was originally licensed under the terms of the CeCILL v2.1,
- * and continues to be available under such terms.
- * For more information, see the COPYING file which you should have received
- * along with this program.
- *
- -->
-
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="mget" xml:lang="ja">
-
-    <refnamediv>
-
-        <refname>mget</refname>
-
-        <refpurpose>
-
-            指定したバイナリ形式で
-
-            バイトまたはワードを読み込み, double に変換
-
-        </refpurpose>
-
-    </refnamediv>
-
-    <refnamediv xml:id="mgeti">
-
-        <refname>mgeti</refname>
-
-        <refpurpose>
-
-            指定したバイナリ形式で
-
-            バイトまたはワードを読み込み, int型に変換
-
-        </refpurpose>
-
-    </refnamediv>
-
-    <refsynopsisdiv>
-
-        <title>呼び出し手順</title>
-
-        <synopsis>
-
-            x = mget([n, type, fd])
-
-            x = mgeti([n, type, fd])
-
-        </synopsis>
-
-    </refsynopsisdiv>
-
-    <refsection>
-
-        <title>引数</title>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>n</term>
-
-                <listitem>
-
-                    <para>正のスカラー: 読み込むデータの数.</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>fd</term>
-
-                <listitem>
-
-                    <para>
-
-                        スカラー:
-
-                        <function>mopen</function>により返されたファイル記述子.
-
-                        <literal>-1</literal>は直近にオープンされたファイルを意味します.
-
-                        デフォルト値は<literal>-1</literal>です.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>type</term>
-
-                <listitem>
-
-                    <para>
-
-                        文字列: <varname>x</varname>の全エントリを書き込むために使用する
-
-                        バイナリフォーマットを指定.
-
-                    </para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>x</term>
-
-                <listitem>
-
-                    <para>浮動小数点数または整数値のベクトル</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-    </refsection>
-
-    <refsection>
-
-        <title>説明</title>
-
-        <para>
-
-            <function>mget</function> 関数は,
-
-            ストリームパラメータ<varname>fd</varname>により指定された入力の
-
-            データを読み込み,浮動小数点数データのベクトルを返します.
-
-        </para>
-
-        <para>
-
-            <function>mgeti</function> 関数は,
-
-            ストリームパラメータ<varname>fd</varname>により指定された入力の
-
-            データを読み込み,整数データのベクトルを返します.
-
-        </para>
-
-        <para>
-
-            ファイルポインタが現在指している場所からデータが読み込まれ,
-
-            適当にインジケータが進まされます.
-
-        </para>
-
-        <para>
-
-            <varname>type</varname>パラメータは変換指定子で,
-
-            以下のフラグ文字のどれか (デフォルト値は<literal>"l"</literal>)を設定できます:
-
-        </para>
-
-        <para>
-
-            <note>
-
-                Windowsにおけるデフォルトの動作では,バイト13
-
-                (<literal>0x0D</literal>)をスキップします.
-
-                <literal>'b'</literal>を指定して<function>mopen</function>を
-
-                コールする必要があります.
-
-                例えば, 例外なく全てのバイトを読み込むには,
-
-                <code>fd1 = mopen(file1,'rb')</code> とします.
-
-            </note>
-
-        </para>
-
-        <para>データ型:</para>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>d</term>
-
-                <listitem>
-
-                    <para>double</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>f</term>
-
-                <listitem>
-
-                    <para>float</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>l</term>
-
-                <listitem>
-
-                    <para>long</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>i</term>
-
-                <listitem>
-
-                    <para>int</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>s</term>
-
-                <listitem>
-
-                    <para>short</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>c</term>
-
-                <listitem>
-
-                    <para>character</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-        <para>オプションのフラグ:</para>
-
-        <variablelist>
-
-            <varlistentry>
-
-                <term>u..</term>
-
-                <listitem>
-
-                    <para>符号なし (上記の型のどれかと組み合わせます)</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>..l</term>
-
-                <listitem>
-
-                    <para>リトルインディアン (上記の型のどれかと組み合わせます)</para>
-
-                </listitem>
-
-            </varlistentry>
-
-            <varlistentry>
-
-                <term>..b</term>
-
-                <listitem>
-
-                    <para>ビッグインディアン (上記の型のどれかと組み合わせます)</para>
-
-                </listitem>
-
-            </varlistentry>
-
-        </variablelist>
-
-        <para>
-
-            (<literal>little=endian</literal>ステータスをチェックすることにより)
-
-            読み込まれたバイトは必要に応じて自動的にスワップされます.
-
-        </para>
-
-        <para>
-
-            このデフォルトのスワップ動作は
-
-            <function>mopen</function>関数にフラグを追加することにより抑制することが
-
-            できます.
-
-        </para>
-
-        <para>
-            フォーマット <literal>"l"</literal>, <literal>"d"</literal>
-
-            および <literal>"f"</literal> は, <function>mget</function>
-
-            関数でのみ有効です.
-
-        </para>
-
-    </refsection>
-
-    <refsection>
-
-        <title>例</title>
-
-        <programlisting role="example"><![CDATA[
-file1 = fullfile(TMPDIR,'test1.bin');
-file2 = fullfile(TMPDIR,'test2.bin');
-fd1=mopen(file1,'wb');
-fd2=mopen(file2,'wb');
-mput(1996,'ull',fd1);
-mput(1996,'ull',fd2);
-mclose(fd1);
-mclose(fd2);
-fd1=mopen(file1,'rb');
-if 1996<>mget(1,'ull',fd1)
-  write(%io(2),'Bug');
-end
-
-fd2=mopen(file2,'rb');
-if 1996<>mget(1,'ull',fd2)
-  write(%io(2),'Bug');
-end
-
-mclose(fd1);
-mclose(fd2);
- ]]></programlisting>
-
-    </refsection>
-
-    <refsection role="see also">
-
-        <title>参照</title>
-
-        <simplelist type="inline">
-
-            <member>
-
-                <link linkend="mclose">mclose</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="meof">meof</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mfprintf">mfprintf</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="fprintfMat">fprintfMat</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mfscanf">mfscanf</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="fscanfMat">fscanfMat</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mgetl">mgetl</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mgetstr">mgetstr</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mopen">mopen</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mprintf">mprintf</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mput">mput</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mputl">mputl</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mputstr">mputstr</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mscanf">mscanf</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mseek">mseek</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mtell">mtell</link>
-
-            </member>
-
-            <member>
-
-                <link linkend="mdelete">mdelete</link>
-
-            </member>
-
-        </simplelist>
-
-    </refsection>
-
-</refentry>
-
index 58e3e4a..55069f2 100644 (file)
@@ -2,9 +2,8 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) 2008 - INRIA
- * ...
- *
  * Copyright (C) 2012 - 2016 - Scilab Enterprises
+ * Copyright (C) 2016 - Samuel GOUGEON
  *
  * This file is hereby licensed under the terms of the GNU GPL v2.0,
  * pursuant to article 5.3.4 of the CeCILL v.2.1.
  * along with this program.
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="mget" xml:lang="ru">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"
+    xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns5="http://www.w3.org/1999/xhtml"
+    xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook"
+    xmlns:scilab="http://www.scilab.org" xml:id="mget" xml:lang="ru">
     <refnamediv>
         <refname>mget</refname>
         <refpurpose>
-            считывает байт или слово в заданном двоичном формате и преобразует в
-            число удвоенной точности
+            проверяет числа в двоичом файле и возвращает их в виде десятичных чисел
         </refpurpose>
     </refnamediv>
+    <refsynopsisdiv>
+        <title>Синтаксис</title>
+        <synopsis>
+            D = mget(nNumb)
+            D = mget(nNumb, binFormat)
+            D = mget(nNumb, binFormat, fileID)
+        </synopsis>
+    </refsynopsisdiv>
     <refnamediv xml:id="mgeti">
         <refname>mgeti</refname>
         <refpurpose>
-            считывает байт или слово в заданном двоичном формате и возвращает
-            целочисленное значение типа int
+            проверяет числа в двоичом файле и возвращает их в виде кодированных целых чисел
         </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Синтаксис</title>
         <synopsis>
-            x = mget([n, type, fd])
-            x = mgeti([n, type, fd])
+            I = mgeti(nNumb)
+            I = mgeti(nNumb, binFormat)
+            I = mgeti(nNumb, binFormat, fileID)
         </synopsis>
     </refsynopsisdiv>
     <refsection>
         <title>Аргументы</title>
         <variablelist>
             <varlistentry>
-                <term>n</term>
-                <listitem>
-                    <para>положительный скаляр: количество считываемых данных.</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>fd</term>
+                <term>fileID</term>
                 <listitem>
                     <para>
-                        скаляр: параметр <varname>fd</varname>, возращённый функцией <function>mopen</function>. Для последнего открытого файла ставится -1. Значение по умолчанию -1.
+                        идентификатор файла (целое число типа single), возвращаемое
+                        функцией <function>mopen</function> при открытии файла.
+                        По умолчанию используется последний открытый файл.
+                    <important>
+                        Файл должен быть открыт в режиме чтения двоичных данных
+                        с помощью инструкции <code>fileID = mopen(filename,'rb')</code>.
+                    </important>
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>type</term>
+                <term>nNumb</term>
                 <listitem>
                     <para>
-                        строка: двоичный формат, используемый для записи всех элементов
-                        <varname>x</varname>.
+                        Целое положительное число типа single: количество чисел,
+                        которые следует проверить и вернуть. Каждое число
+                        закодировано одним или несколькими байтами, в соответствии
+                        с используемым форматом <varname>binFormat</varname>.
+                        <note>
+                        Чтобы прочитать все числа, оставшиеся в файле, используйте
+                        достаточно большое значение <varname>nNumb</varname>.
+                        </note>
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>x</term>
+                <term>binFormat</term>
                 <listitem>
                     <para>
-                        вектор целых чисел или чисел с плавающей запятой.
+                        текстовое значение составленное из одного, двух или трёх
+                        символов-кодов: двоичный формат, используемый для проверки
+                        чисел в двоичном файле. Доступны следующие двоичные коды:
+                    <table>
+                        <tr valign="top">
+                            <td align="right">c</td>
+                            <td>: индивидуальные байты проверяются как целые числа
+                                типа <literal>int8</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">uc</td>
+                            <td>: индивидуальные байты проверяются как целые
+                                беззнаковые положительные числа типа <literal>uint8</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">s</td>
+                            <td>: двухбайтные блоки проверяются как целые числа типа
+                                <literal>int16</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">us</td>
+                            <td>: двухбайтные блоки проверяются как целые беззнаковые
+                                положительные числа типа <literal>uint16</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">i</td>
+                            <td>: четырёхбайтные блоки проверяются как целые числа
+                                типа <literal>int32</literal>
+                                (<emphasis role="bold">режим по умолчанию</emphasis>).
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">ui</td>
+                            <td>: четырёхбайтные блоки проверяются как целые
+                                беззнаковые положительные числа типа <literal>uint32</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">l</td>
+                            <td>: восьми байтные блоки проверяются как целые числа
+                                типа <literal>int64</literal>;
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">ul</td>
+                            <td>: восьмибайтные блоки проверяются как целые
+                                беззнаковые положительные числа типа
+                                <literal>uint64</literal>;
+                            </td>
+                        </tr>
+                        <tr>
+                            <td/>
+                            <td>
+                                Только с <function>mget()</function> :
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">f</td>
+                            <td>: четырёхбайтные блоки проверяются как десятичные
+                                числа "одинарной точности" (так называемые "числа
+                                с плавающей запятой", "<emphasis role="bold">f</emphasis>loats")
+                            </td>
+                        </tr>
+                        <tr valign="top">
+                            <td align="right">d</td>
+                            <td>: восьмибайтные блоки проверяются как десятичные
+                                ("<emphasis role="bold">d</emphasis>ecimal") числа.
+                            </td>
+                        </tr>
+                    </table>
                     </para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-    </refsection>
-    <refsection>
-        <title>Описание</title>
-        <para>
-            Функция <function>mget</function> считывает данные со входа, определённого параметром потока <varname>fd</varname> и возвращает вектор данных с плавающей запятой.
-        </para>
-
-        <para>
-            Функция <function>mgeti</function> считывает данные со входа, определённого параметром потока <varname>fd</varname> и возвращает вектор целочисленных данных.
-        </para>
-        <para>
-            Данные считываются в положении, на которое в данный момент указывает указатель файла и передвигает индикатор далее соответствующим образом.
-        </para>
-        <para>
-            Параметр <varname>type</varname> является указателем преобразования, который может быть установлен в любой из следующих символов-флагов (со значением по умолчанию <literal>"l"</literal>):
-        </para>
-        <para>
-            <note>
-                В Windows, поведение по умолчанию состоит в пропуске байта 13 (<literal>0x0D</literal>).
-                Функцию <function>mopen</function> следует вызывать с опцией
-                <literal>'b'</literal>, например, <code>fd1 = mopen(file1,'rb')</code>, так что все байты без исключения будут прочитаны.
-            </note>
-        </para>
-        <para>Тип данных:</para>
-        <variablelist>
-            <varlistentry>
-                <term>d</term>
-                <listitem>
-                    <para>удвоенная точность, double</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>f</term>
-                <listitem>
-                    <para>плавающая запятая, float</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>l</term>
-                <listitem>
-                    <para>длинное, long long</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>i</term>
-                <listitem>
-                    <para>целочисленное, int (long int)</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>s</term>
-                <listitem>
-                    <para>короткое, short</para>
-                </listitem>
-            </varlistentry>
-            <varlistentry>
-                <term>c</term>
-                <listitem>
-                    <para>символ, character</para>
-                </listitem>
-            </varlistentry>
-        </variablelist>
-        <para>Необязательный флаг:</para>
-        <variablelist>
-            <varlistentry>
-                <term>u..</term>
-                <listitem>
                     <para>
-                        беззнаковый (в сочетании с одним из вышеперечисленных типов)
+                        По умолчанию порядок байтов в блоке может быть установлен
+                        с помощью опции функции <function>mopen</function> при
+                        открытии файла. Этот порядок затем может принудительно
+                        быть использован с помощью настроечного флага функции
+                        <function>mget</function> или <function>mgeti</function>,
+                        который добавляется к <varname>binFormat</varname>:
+                        <table>
+                            <tr valign="top">
+                                <td align="right">..l :</td>
+                                <td>прямой порядок байтов (
+                                <emphasis role="bold">l</emphasis>ittle endian
+                                (младший байт идёт в начале блока);
+                                </td>
+                            </tr>
+                            <tr valign="top">
+                                <td align="right">..b :</td>
+                                <td>обратный порядок байтов (
+                                <emphasis role="bold">b</emphasis>ig endian
+                                (старший байт идёт в начале блока).
+                                </td>
+                            </tr>
+                        </table>
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>..l</term>
+                <term>D</term>
                 <listitem>
                     <para>
-                        прямой порядок байтов (в сочетании с одним из вышеперечисленных
-                        типов)
+                        Ряд из <varname>nNumb</varname> десятичных чисел
+                        (или имеющихся чисел, если достигнут конец файла).
                     </para>
                 </listitem>
             </varlistentry>
             <varlistentry>
-                <term>..b</term>
+                <term>I</term>
                 <listitem>
                     <para>
-                        обратный порядок байтов (в сочетании с одним из вышеперечисленных
-                        типов)
+                        Ряд из <varname>nNumb</varname> закодированных целых чисел
+                        (или имеющихся чисел, если достигнут конец файла).
+                        Функция <function>inttype</function> возвращённых целых чисел
+                        зависит от используемого формата <varname>binFormat</varname>.
                     </para>
                 </listitem>
             </varlistentry>
         </variablelist>
+    </refsection>
+    <refsection>
+        <title>Описание</title>
         <para>
-            Чтение байтов автоматически переключается при необходимости (с помощью проверки статуса <literal>little=endian</literal>).
-        </para>
+            Функции <function>mget</function> и <function>mgeti</function> начинают
+            чтение байтов в указанном файле с текущей позиции внутреннего файлового
+            указателя. После чтения блока из <literal>N</literal> байтов
+            (<literal>N==1,2,4,8</literal> в соответствии с выбранным форматом
+            <varname>binFormat</varname>),
+            <itemizedlist>
+                <listitem>
+                    файловый указатель увеличивается на <literal>N</literal>
+                    байтов и устанавливается в начало следующего блока;
+                </listitem>
+                <listitem>
+                    блоки чтения идут в порядке, соответствующем выбранному или
+                    установленному по умолчанию режиму порядка байтов.
+                    Проверяемый блок затем сохраняется для возврата.
+                </listitem>
+            </itemizedlist>
+            Эти действия повторяются <varname>nNumb</varname> раз до тех пор,
+            пока не будет достигнут конец файла: в этом случае проверка файла
+            прекращается, неполный блок остаётся (если он есть), взводится статус
+            <literal>EOF</literal> и уже проверенные числа возвращаются.
+       </para>
         <para>
-            Такое поведение переключения можно подавить, если добавить флаг в функцию <function>mopen</function>.
+            Когда используется функция <function>mgeti()</function>, проверяемые
+            числа преобразуются в тип целого числа <function>inttype</function>
+            в соответствии с выбранным форматом <varname>binFormat</varname>, а
+            затем возвращаются.
+            is used, parsed numbers are
+            converted into the <function>inttype</function> corresponding to
+            the chosen <varname>binFormat</varname> and then returned.
         </para>
         <para>
-            Форматы <literal>"l"</literal>, <literal>"d"</literal> и
-            <literal>"f"</literal> корректны только с функцией
-            <function>mget</function>.
+            Когда используется функция <function>mget()</function>, двоичные числа
+            проверяются в соответствии с форматом <varname>binFormat</varname>, то
+            в конце преобразуюся в восьмибайтные десятичные числа и затем возвращаются.
+            <warning>
+            Если, благодаря формату <literal>"ul*"</literal> или <literal>"l*"</literal>,
+            проверялись целые числа <literal>int64</literal> или <literal>uint64</literal>,
+            то их конечное преобразование в десятичные числа усекает их мантиссу
+            до 53 старших битов.
+            </warning>
         </para>
     </refsection>
     <refsection>
         <title>Примеры</title>
         <programlisting role="example"><![CDATA[
-file1 = fullfile(TMPDIR,'test1.bin');
-file2 = fullfile(TMPDIR,'test2.bin');
-fd1=mopen(file1,'wb');
-fd2=mopen(file2,'wb');
-mput(1996,'ull',fd1);
-mput(1996,'ull',fd2);
-mclose(fd1);
-mclose(fd2);
-
-fd1=mopen(file1,'rb');
-if 1996<>mget(1,'ull',fd1)
-  write(%io(2),'Bug');
-end
-
-fd2=mopen(file2,'rb');
-if 1996<>mget(1,'ull',fd2)
-  write(%io(2),'Bug');
+binfile = TMPDIR+"/mgetest.bin";
+idF = mopen(binfile, "w+b");
+mput(int8(0:16),"uc");
+mseek(0);
+mgeti(1,"uc")  // ожидается 0
+mgeti(2,"uc")  // ожидается 1, 2
+[mgeti(1,"us"),  uint16(3 + 4*256)]
+mseek(3);      // возврат к предыдущей позиции на "3"
+[mgeti(1,"usb"), uint16(4 + 3*256)] // байты с изменёным порядком (прямой порядок)
+mseek(0);
+[mgeti(1,"ui") , uint32(0 + 256*(1 + 256*(2 + 256*3)))]
+mseek(0);
+[mgeti(1,"uib"), uint32(3 + 256*(2 + 256*(1 + 256*0)))]
+mclose(idF);
+// целые числа uint64 и int64 iс относительной точностью 1/2^64 = %eps/2^12
+// обрабатываются лучше, чем десятичные:
+    // Формирование n 64-битных чисел с битами №0-№63, установленными случайным образом:
+n = 5;
+b = grand(64,n,"uin",0,1);
+p = uint64(2).^ndgrid(0:63,1:n);
+x0 = sum(b.*p, "r");
+    // Запишем их в файл, а затем вновь прочитем их с помощью mgeti():
+for usign = ["u" ""]
+    for endian = ["l" "b"]
+        binfile = TMPDIR+"/mgetiTestInt64.dat";
+        idF = mopen(binfile, "w+b");
+        x = x0;
+        if usign==""
+            x = int64(x);
+        end
+        mput(x,usign+"l"+endian)   // "l" принудительно управляет всеми 64 битами
+        // Теперь прочитаем их в том же режиме:
+        mseek(0);
+        xr = mgeti(n, usign+"l"+endian);
+        mclose(idF);
+        // Отобразим:
+        wrParse = usign + "l" + endian;
+        printf("    Запись в виде  ""%s""       Чтение в виде ""%s""\n", wrParse, wrParse);
+        [x' xr']
+    end
 end
-
-mclose(fd1);
-mclose(fd2);
  ]]></programlisting>
     </refsection>
     <refsection role="see also">
         <title>Смотрите также</title>
         <simplelist type="inline">
             <member>
-                <link linkend="mclose">mclose</link>
-            </member>
-            <member>
-                <link linkend="meof">meof</link>
-            </member>
-            <member>
-                <link linkend="mfprintf">mfprintf</link>
-            </member>
-            <member>
-                <link linkend="fprintfMat">fprintfMat</link>
-            </member>
-            <member>
-                <link linkend="mfscanf">mfscanf</link>
-            </member>
-            <member>
-                <link linkend="fscanfMat">fscanfMat</link>
-            </member>
-            <member>
-                <link linkend="mgetl">mgetl</link>
-            </member>
-            <member>
-                <link linkend="mgetstr">mgetstr</link>
-            </member>
-            <member>
                 <link linkend="mopen">mopen</link>
             </member>
             <member>
-                <link linkend="mprintf">mprintf</link>
+                <link linkend="mclose">mclose</link>
             </member>
             <member>
                 <link linkend="mput">mput</link>
             </member>
             <member>
-                <link linkend="mputl">mputl</link>
+                <link linkend="mseek">mseek</link>
             </member>
             <member>
-                <link linkend="mputstr">mputstr</link>
+                <link linkend="mtell">mtell</link>
             </member>
             <member>
-                <link linkend="mseek">mseek</link>
+                <link linkend="meof">meof</link>
             </member>
             <member>
-                <link linkend="mtell">mtell</link>
+                <link linkend="readb">readb</link>
             </member>
             <member>
-                <link linkend="mdelete">mdelete</link>
+                <link linkend="read4b">read4b</link>
+            </member>
+            <member>
+                <link linkend="inttype">inttype</link>
             </member>
         </simplelist>
     </refsection>
+    <refsection role="history">
+        <title>История</title>
+        <revhistory>
+            <revision>
+                <revnumber>6.1.0</revnumber>
+                <revdescription>
+                внедрена mgeti(,"ul*"|"l*") для чтения чисел типа uint64 или int64 больше 2<superscript>52</superscript>.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
-
index 991a2a3..8b7e06c 100644 (file)
@@ -46,6 +46,7 @@ CPP_GATEWAY_PROTOTYPE(sci_mopen);
 CPP_GATEWAY_PROTOTYPE(sci_mclose);
 CPP_GATEWAY_PROTOTYPE(sci_mput);
 CPP_GATEWAY_PROTOTYPE(sci_mget);
+CPP_GATEWAY_PROTOTYPE(sci_mgeti);
 CPP_GATEWAY_PROTOTYPE(sci_mputl);
 CPP_GATEWAY_PROTOTYPE(sci_mgetl);
 CPP_GATEWAY_PROTOTYPE(sci_pathconvert);
index 94f4e32..baf5a95 100644 (file)
@@ -38,6 +38,7 @@ int FileioModule::Load()
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mclose", &sci_mclose, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mput", &sci_mput, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mget", &sci_mget, MODULE_NAME));
+    symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mgeti", &sci_mgeti, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mputl", &sci_mputl, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"mgetl", &sci_mgetl, MODULE_NAME));
     symbol::Context::getInstance()->addFunction(types::Function::createFunction(L"pathconvert", &sci_pathconvert, MODULE_NAME));
index e23fadc..2a3d07b 100644 (file)
     <ClCompile Include="sci_mfprintf.cpp" />
     <ClCompile Include="sci_mfscanf.cpp" />
     <ClCompile Include="sci_mget.cpp" />
+    <ClCompile Include="sci_mgeti.cpp" />
     <ClCompile Include="sci_mgetl.cpp" />
     <ClCompile Include="sci_mgetstr.cpp" />
     <ClCompile Include="sci_mopen.cpp" />
index 08dbc96..adb6ec1 100644 (file)
@@ -78,6 +78,9 @@
     <ClCompile Include="sci_mget.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
+    <ClCompile Include="sci_mgeti.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
     <ClCompile Include="sci_mgetl.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_mgeti.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_mgeti.cpp
new file mode 100644 (file)
index 0000000..87c70ae
--- /dev/null
@@ -0,0 +1,212 @@
+/*
+* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+* Copyright (C) 2021 - ESI Group - Clément DAVID
+*
+*
+* Copyright (C) 2012 - 2016 - Scilab Enterprises
+*
+* This file is hereby licensed under the terms of the GNU GPL v2.0,
+* pursuant to article 5.3.4 of the CeCILL v.2.1.
+* This file was originally licensed under the terms of the CeCILL v2.1,
+* and continues to be available under such terms.
+* For more information, see the COPYING file which you should have received
+* along with this program.
+*
+*/
+/*--------------------------------------------------------------------------*/
+#include "filemanager.hxx"
+#include "fileio_gw.hxx"
+#include "string.hxx"
+#include "double.hxx"
+#include "int.hxx"
+#include "file.hxx"
+#include "function.hxx"
+
+#include <memory>
+
+extern "C"
+{
+#include "mget.h"
+#include "localization.h"
+#include "Scierror.h"
+#include "charEncoding.h"
+#include "os_string.h"
+}
+
+/*--------------------------------------------------------------------------*/
+types::Function::ReturnValue sci_mgeti(types::typed_list &in, int _iRetCount, types::typed_list &out)
+{
+    std::wstring stType(L"i");
+    const wchar_t* pstType = stType.data();
+    int iSize       = 0;
+    int iFile       = -1; //default file : last opened file
+    int iErr        = 0;
+
+    if (in.size() < 1 || in.size() > 3)
+    {
+        Scierror(77, _("%s: Wrong number of input argument(s): %d to %d expected.\n"), "mgeti", 1, 3);
+        return types::Function::Error;
+    }
+
+    //check parameter 1
+    if (in[0]->isDouble() == false || in[0]->getAs<types::Double>()->getSize() != 1)
+    {
+        Scierror(999, _("%s: Wrong type for input argument #%d: A positive integer value expected.\n"), "mgeti", 1);
+        return types::Function::Error;
+    }
+
+    types::Double* pDoubleTest = in[0]->getAs<types::Double>();
+    if ((pDoubleTest->get(0) != (int)pDoubleTest->get(0)) || (pDoubleTest->get(0) < 0))
+    {
+        Scierror(999, _("%s: Wrong value for input argument #%d: A positive integer value expected.\n"), "mgeti", 1);
+        return types::Function::Error;
+    }
+
+    iSize = static_cast<int>(in[0]->getAs<types::Double>()->get(0));
+
+    if (in.size() >= 2)
+    {
+        //export format
+        if (in[1]->isString() == false || in[1]->getAs<types::String>()->getSize() != 1)
+        {
+            Scierror(999, _("%s: Wrong type for input argument #%d: string expected.\n"), "mgeti", 2);
+            return types::Function::Error;
+        }
+
+        pstType = in[1]->getAs<types::String>()->get(0);
+    }
+
+    if (in.size() == 3)
+    {
+        if (in[2]->isDouble() == false || in[2]->getAs<types::Double>()->getSize() != 1)
+        {
+            Scierror(999, _("%s: Wrong type for input argument #%d: A integer expected.\n"), "mgeti", 3);
+            return types::Function::Error;
+        }
+
+        iFile = static_cast<int>(in[2]->getAs<types::Double>()->get(0));
+    }
+
+    switch (iFile)
+    {
+        case 0: // stderr
+        case 6: // stdout
+            Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mgeti", iFile);
+            return types::Function::Error;
+    }
+
+    types::File* pFile = FileManager::getFile(iFile);
+    // file opened with fortran open function
+    if (pFile == NULL || pFile->getFileType() == 1)
+    {
+        Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mgeti", iFile);
+        return types::Function::Error;
+    }
+
+    types::GenericType* pGT;
+    void* pData;
+    char* pType = wide_string_to_UTF8(pstType);
+    switch (pType[0])
+    {
+        case 'u':
+            switch (pType[1])
+            {
+                case 'l':
+                {
+                    auto* pIT = new types::UInt64(1, iSize);
+                    pData = pIT->get();
+                    pGT = pIT;
+                    break;
+                }
+                case 'i':
+                {
+                    auto* pIT = new types::UInt32(1, iSize);
+                    pData = pIT->get();
+                    pGT = pIT;
+                    break;
+                }
+                case 's':
+                {
+                    auto* pIT = new types::UInt16(1, iSize);
+                    pData = pIT->get();
+                    pGT = pIT;
+                    break;
+                }
+                case 'c':
+                {
+                    auto* pIT = new types::UInt8(1, iSize);
+                    pData = pIT->get();
+                    pGT = pIT;
+                    break;
+                }
+            }
+            break;
+        case 'd':
+        {
+            auto* pIT = new types::Double(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        case 'f':
+        {
+            auto* pIT = new types::Double(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        case 'l':
+        {
+            auto* pIT = new types::Int64(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        case 'i':
+        {
+            auto* pIT = new types::Int32(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        case 's':
+        {
+            auto* pIT = new types::Int16(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        case 'c':
+        {
+            auto* pIT = new types::Int8(1, iSize);
+            pData = pIT->get();
+            pGT = pIT;
+            break;
+        }
+        default:
+            FREE(pType);
+            Scierror(999, _("%s: Wrong value for input argument #%d: Incorrect conversion code; ""c"", ""s"", ""i"" or ""l"" expected.\n"), "mgeti", 3);
+            return types::Function::Error;
+    }
+
+    C2F(mgetnc)(&iFile, pData, &iSize, pType, &iErr);
+    FREE(pType);
+    if (iErr > 0)
+    {
+        pGT->killMe();
+        return types::Function::Error;
+    }
+
+    if (iErr < 0) //no error
+    {
+        int iNewSize = (-iErr) - 1;
+        if (iNewSize < iSize)
+        {
+            //read data are smaller then expected size, shrink
+            pGT->resize(1, iNewSize);
+        }
+    }
+    out.push_back(pGT);
+    return types::Function::OK;
+}
+/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/fileio/tests/nonreg_tests/bug_14397.tst b/scilab/modules/fileio/tests/nonreg_tests/bug_14397.tst
new file mode 100644 (file)
index 0000000..7ba7cc1
--- /dev/null
@@ -0,0 +1,41 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2016 - Samuel GOUGEON
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- CLI SHELL MODE -->
+
+// <-- Non-regression test for bug 14397 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/14397
+//
+// <-- Short Description -->
+// mgeti() did not read correctly uint64 or int64 integers > 2^52
+//
+
+// Read/Write int64 & uint64 with relative accuracy better than %eps = 1/2^52
+// --------------------------------------------------------------------------
+n = 10;
+b = grand(64,n,"uin",0,1);
+p = uint64(2).^ndgrid(0:63,1:n);
+x0 = sum(b.*p, "r");
+
+for endian = ["l" "b"]
+    for usign = ["u" ""]
+        // usign+"l"+endian
+        binfile = TMPDIR+"/mgetiTestInt64.dat";
+        idF = mopen(binfile, "w+b");
+        x = x0;
+        if usign==""
+            x = int64(x);
+        end
+        mput(x,usign+"l"+endian)
+
+        mseek(0);
+        xr = mgeti(n, usign+"l"+endian);
+        mclose(idF);
+        assert_checkequal(xr, x);
+    end
+end
index edb48cf..0997231 100644 (file)
@@ -1,12 +1,42 @@
 // =============================================================================
 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 // Copyright (C) 2013 - Scilab Enterprises - Antoine ELIAS
+// Copyright (C) 2016 - Samuel GOUGEON
 //
 //  This file is distributed under the same license as the Scilab package.
 // =============================================================================
 
 // <-- CLI SHELL MODE -->
-
+// <-- NO CHECK REF -->
+
+// Read/Write int64 & uint64 with relative accuracy better than %eps = 1/2^52
+// --------------------------------------------------------------------------
+n = 10;
+b = grand(64,n,"uin",0,1);
+p = uint64(2).^ndgrid(0:63,1:n);
+x0 = sum(b.*p, "r");
+
+for endian = ["l" "b"]
+    for usign = ["u" ""]
+        // usign+"l"+endian
+        binfile = TMPDIR+"/mgetiTestInt64.dat";
+        idF = mopen(binfile, "w+b");
+        x = x0;
+        if usign==""
+            x = int64(x);
+        end
+        mput(x,usign+"l"+endian)
+
+        mseek(0);
+        xr = mgeti(n, usign+"l"+endian);
+        mclose(idF);
+        assert_checkequal(xr, x);
+    end
+end
+
+
+// Other tests
+// -----------
 function writedata(name, str)
     f = mopen(TMPDIR + "/" + name + ".dat", "wb");
     data = hex2dec(str);
@@ -113,3 +143,4 @@ fd1=mopen(file1,'rb');
 a=mgeti(1);
 assert_checkequal(typeof(a), "int32");
 assert_checkequal(a, int32(1996));
+mclose(fd1);
diff --git a/scilab/modules/integer/macros/mgeti.sci b/scilab/modules/integer/macros/mgeti.sci
deleted file mode 100644 (file)
index 7f49f86..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
-// Copyright (C) 2013 - Scilab Enterprises - Cedric Delamarre
-//
-// Copyright (C) 2012 - 2016 - Scilab Enterprises
-//
-// This file is hereby licensed under the terms of the GNU GPL v2.0,
-// pursuant to article 5.3.4 of the CeCILL v.2.1.
-// This file was originally licensed under the terms of the CeCILL v2.1,
-// and continues to be available under such terms.
-// For more information, see the COPYING file which you should have received
-// along with this program.
-
-function x = mgeti(varargin)
-
-    rhs=argn(2);
-    if rhs == 0 | rhs > 3 then
-        error(msprintf(_("%s: Wrong number of input argument(s): %d to %d expected.\n"), "mgeti", 1, 3));
-    end
-
-    if rhs == 1 then
-        typeToConvert = 4;
-    else
-        type = varargin(2);
-
-        if typeof(type) <> "string" then
-            error(msprintf(_("%s: Wrong type for argument #%d: string expected.\n"), "mgeti", 2));
-        end
-
-        if size(type, '*') <> 1 then
-            error(msprintf(_("%s: Wrong size for argument #%d: A single string expected.\n"), "mgeti", 2));
-        end
-
-        typeToConvert = 0;
-        len = length(type);
-        partPos = 1;
-
-        if len == 0 | len > 3 then
-            error(msprintf(_("%s: Wrong size for argument #%d: A single string of size %d to %d expected.\n"), "mgeti", 2, 1, 3));
-        end
-
-        // unsigne
-        if part(type, partPos) == 'u'
-            typeToConvert = 10;
-            partPos = 2;
-        end
-
-        // type to convert
-        select part(type, partPos)
-        case 'l'
-            typeToConvert = typeToConvert + 8;
-        case 'i'
-            typeToConvert = typeToConvert + 4;
-        case 's'
-            typeToConvert = typeToConvert + 2;
-        case 'c'
-            typeToConvert = typeToConvert + 1;
-        else
-            error(msprintf(_("%s: Incorrect integer type: %s .\n"), "mgeti", part(type, partPos)));
-        end
-    end
-
-    x = iconvert(mget(varargin(:)), typeToConvert);
-endfunction