Rebuild all GIWS files with the version 2.0.1 33/9033/5
Sylvestre Ledru [Mon, 17 Sep 2012 16:04:58 +0000 (18:04 +0200)]
Change-Id: Id361c5f8db19fab990fe028128b502b3348718bb

41 files changed:
scilab/modules/action_binding/src/jni/Signal.hxx
scilab/modules/commons/src/jni/GiwsException.hxx
scilab/modules/console/src/jni/CallScilabBridge.hxx
scilab/modules/graphic_export/graphic_export.vcxproj
scilab/modules/graphic_export/sci_gateway/cpp/sci_driver.cpp
scilab/modules/graphic_export/sci_gateway/cpp/sci_xend.cpp
scilab/modules/graphic_export/sci_gateway/cpp/sci_xinit.cpp
scilab/modules/graphic_export/src/jni/Driver.hxx
scilab/modules/graphic_export/src/jni/FileExporter.hxx
scilab/modules/graphic_export/src/jni/JOGLConstant.hxx
scilab/modules/graphic_objects/src/jni/CallGraphicController.hxx
scilab/modules/gui/Makefile.am
scilab/modules/gui/Makefile.in
scilab/modules/gui/sci_gateway/cpp/sci_displaytree.cpp
scilab/modules/gui/src/jni/CallScilabBridge.cpp
scilab/modules/gui/src/jni/CallScilabBridge.hxx
scilab/modules/gui/src/jni/Juigetfile.hxx
scilab/modules/gui/src/jni/Jxclick.hxx
scilab/modules/gui/src/jni/Jxgetmouse.hxx
scilab/modules/gui/src/jni/LookAndFeelManager.hxx
scilab/modules/gui/src/jni/ScilabDisplayTree.hxx
scilab/modules/gui/src/jni/SwingView.cpp
scilab/modules/gui/src/jni/SwingView.hxx
scilab/modules/gui/src/jni/UIElementMapper.hxx
scilab/modules/helptools/src/jni/BuildDocObject.hxx
scilab/modules/helptools/src/jni/SciDocMain.hxx
scilab/modules/history_browser/src/jni/CommandHistory.cpp
scilab/modules/history_browser/src/jni/CommandHistory.hxx
scilab/modules/preferences/src/jni/ScilabPreferences.hxx
scilab/modules/renderer/src/jni/CallRenderer.hxx
scilab/modules/renderer/src/jni/XlFontManager.hxx
scilab/modules/scicos_blocks/src/jni/AfficheBlock.hxx
scilab/modules/scinotes/src/jni/SciNotes.hxx
scilab/modules/types/src/jni/ScilabVariables.hxx
scilab/modules/types/src/jni/ScilabVariablesRefresh.hxx
scilab/modules/ui_data/src/jni/BrowseVar.hxx
scilab/modules/ui_data/src/jni/EditVar.hxx
scilab/modules/ui_data/src/jni/FileBrowser.hxx
scilab/modules/xcos/src/jni/Modelica.hxx
scilab/modules/xcos/src/jni/Palette.hxx
scilab/modules/xcos/src/jni/Xcos.hxx

index e0b3836..ead1ee6 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 7100557..9839ff7 100644 (file)
@@ -42,10 +42,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 #include <stdlib.h>
 #include <jni.h>
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 #include <exception>
 
index ca56810..9d546ff 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 34f432c..62f14f0 100644 (file)
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;../windows_tools/includes/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -110,7 +110,7 @@ lib /DEF:"$(ProjectDir)graphics_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     </Midl>
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;../windows_tools/includes/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;_DEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <WarningLevel>Level3</WarningLevel>
@@ -138,7 +138,7 @@ lib /DEF:"$(ProjectDir)graphics_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;../windows_tools/includes/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -172,7 +172,7 @@ lib /DEF:"$(ProjectDir)graphics_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
     <ClCompile>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
-      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>includes;../jvm/includes;../localization/includes;../fileio/includes;../graphics/includes;../graphics/includes/handleDrawing;src/cpp;../../libs/doublylinkedlist/includes;../../libs/MALLOC/includes;../core/includes;../output_stream/includes;../../java/jdk/include;../../java/jdk/include/win32;src/jni;../../libs/intl;../renderer/includes;src/c;../api_scilab/includes;../commons/src/jni;../graphic_objects/includes;../gui/src/jni;../windows_tools/includes/;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;FORDLL;NDEBUG;_WINDOWS;_USRDLL;GRAPHIC_EXPORT_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -275,6 +275,9 @@ lib /DEF:"$(ProjectDir)graphics_Import.def" /SUBSYSTEM:WINDOWS /MACHINE:$(Platfo
       <Project>{a5911cd7-f8e8-440c-a23e-4843a0636f3a}</Project>
       <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
     </ProjectReference>
+    <ProjectReference Include="..\windows_tools\src\c\scilab_windows\scilab_windows.vcxproj">
+      <Project>{8028f371-6a94-4a26-8804-6e7f05f1d1aa}</Project>
+    </ProjectReference>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
index 8299b4e..f33c7bb 100644 (file)
 
 #include <string.h>
 
+#include "ScilabView.hxx"
+#include "SwingView.hxx"
+#include "Driver.hxx"
+
 extern "C"
 {
 #include "getScilabJavaVM.h"
@@ -23,9 +27,6 @@ extern "C"
 #include "gw_graphic_export.h"
 }
 
-#include "ScilabView.hxx"
-#include "SwingView.hxx"
-#include "Driver.hxx"
 
 #if _MSC_VER
 #define strcasecmp _stricmp
index e5c10e2..de641cc 100644 (file)
  *
  */
 
+#include "ScilabView.hxx"
+#include "SwingView.hxx"
+#include "Driver.hxx"
+
 extern "C"
 {
 #include "getScilabJavaVM.h"
@@ -19,12 +23,11 @@ extern "C"
 #include "deleteGraphicObject.h"
 
 #include "gw_graphic_export.h"
+#ifdef _MSC_VER
+#include "strdup_windows.h"
+#endif
 }
 
-#include "ScilabView.hxx"
-#include "SwingView.hxx"
-#include "Driver.hxx"
-
 /*--------------------------------------------------------------------------*/
 int sci_xend(char * fname, unsigned long fname_len)
 {
index 65aeed9..75abd5f 100644 (file)
@@ -10,6 +10,9 @@
  *
  */
 
+
+#include "Driver.hxx"
+
 extern "C"
 {
 #include "getScilabJavaVM.h"
@@ -22,8 +25,6 @@ extern "C"
 #include "gw_graphic_export.h"
 }
 
-#include "Driver.hxx"
-
 /*--------------------------------------------------------------------------*/
 int sci_xinit(char * fname, unsigned long fname_len)
 {
index 0062bab..8e77013 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index c7163f3..7d706be 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index a57881b..8af232b 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 6a45651..b89f095 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 4ee1c88..e66a04b 100644 (file)
@@ -133,6 +133,7 @@ src/cpp/displaytree.cpp \
 src/jni/ScilabDisplayTree.cpp
 
 GIWS_WRAPPERS = \
+src/jni/SwingView.giws.xml \
 src/jni/CallScilabBridge.giws.xml \
 src/jni/Jxclick.giws.xml \
 src/jni/Jxgetmouse.giws.xml \
index ef08849..05b2215 100644 (file)
@@ -670,6 +670,7 @@ src/cpp/displaytree.cpp \
 src/jni/ScilabDisplayTree.cpp
 
 GIWS_WRAPPERS = \
+src/jni/SwingView.giws.xml \
 src/jni/CallScilabBridge.giws.xml \
 src/jni/Jxclick.giws.xml \
 src/jni/Jxgetmouse.giws.xml \
index 512d0c1..67378d8 100644 (file)
 #include <iostream>
 #include <string>
 
+#ifdef _MSC_VER
+#include "strdup_windows.h"
+#endif
+#include "displaytree.hxx"
+#include "ScilabDisplayTree.hxx"
+#include "GiwsException.hxx"
+
 extern "C"
 {
 #include "stack-c.h"
@@ -27,12 +34,6 @@ extern "C"
 #include "MALLOC.h"
 #include "getScilabJavaVM.h"
 }
-#ifdef _MSC_VER
-#include "strdup_windows.h"
-#endif
-#include "displaytree.hxx"
-#include "ScilabDisplayTree.hxx"
-#include "GiwsException.hxx"
 
 using namespace std;
 
index fa1e8ca..4a84d18 100644 (file)
@@ -1,6 +1,6 @@
 #include "CallScilabBridge.hxx"
 /* Generated by GIWS (version 2.0.1) with command:
-giws -e -r -f CallScilabBridge.giws.xml 
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/CallScilabBridge.giws.xml 
 */
 /*
 
index 6e7b484..3aa550e 100644 (file)
@@ -1,5 +1,5 @@
 /* Generated by GIWS (version 2.0.1) with command:
-giws -e -r -f CallScilabBridge.giws.xml 
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/CallScilabBridge.giws.xml 
 */
 /*
 
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index c1d248c..3d4bb7b 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 1fb9422..01a0643 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 6b88f2b..69d9045 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 6b917bf..a502d94 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 1aecb73..c7fc2aa 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 4843566..cfe958c 100644 (file)
@@ -1,15 +1,9 @@
 #include "SwingView.hxx"
-/* Generated by GIWS (version 2.0.0) with command:
-giws -e -r -f SwingView.giws.xml 
+/* Generated by GIWS (version 2.0.1) with command:
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/SwingView.giws.xml 
 */
 /*
 
-Copyright 2007-2008 INRIA
-Copyright 2008-2011 DIGITEO
-Copyright 2011-2012 Scilab Enterprises
-
-Author : Sylvestre Ledru & others
-
 This is generated code.
 
 This software is a computer program whose purpose is to hide the complexity
index 287fd9b..3b7d0d0 100644 (file)
@@ -1,14 +1,8 @@
-/* Generated by GIWS (version 2.0.0) with command:
-giws -e -r -f SwingView.giws.xml 
+/* Generated by GIWS (version 2.0.1) with command:
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/SwingView.giws.xml 
 */
 /*
 
-Copyright 2007-2008 INRIA
-Copyright 2008-2011 DIGITEO
-Copyright 2011-2012 Scilab Enterprises
-
-Author : Sylvestre Ledru & others
-
 This is generated code.
 
 This software is a computer program whose purpose is to hide the complexity
@@ -52,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 688161d..b21a42e 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 9836542..ab08f6a 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index a6f3239..9e06284 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 8899306..d647fbf 100644 (file)
@@ -1,6 +1,6 @@
 #include "CommandHistory.hxx"
 /* Generated by GIWS (version 2.0.1) with command:
-giws -e -r -f CommandHistory.giws.xml
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/CommandHistory.giws.xml 
 */
 /*
 
@@ -10,16 +10,16 @@ This software is a computer program whose purpose is to hide the complexity
 of accessing Java objects/methods from C++ code.
 
 This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use,
+abiding by the rules of distribution of free software.  You can  use, 
 modify and/ or redistribute the software under the terms of the CeCILL-B
 license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info".
+"http://www.cecill.info". 
 
 As a counterpart to the access to the source code and  rights to copy,
 modify and redistribute granted by the license, users are provided only
 with a limited warranty  and the software's author,  the holder of the
 economic rights,  and the successive licensors  have only  limited
-liability.
+liability. 
 
 In this respect, the user's attention is drawn to the risks associated
 with loading,  using,  modifying and/or developing or reproducing the
@@ -28,307 +28,269 @@ that may mean  that it is complicated to manipulate,  and  that  also
 therefore means  that it is reserved for developers  and  experienced
 professionals having in-depth computer knowledge. Users are therefore
 encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or
-data to be ensured and,  more generally, to use and operate it in the
-same conditions as regards security.
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
 
 The fact that you are presently reading this means that you have had
 knowledge of the CeCILL-B license and that you accept its terms.
 */
 
-namespace org_scilab_modules_history_browser
-{
-
-// Static declarations (if any)
+namespace org_scilab_modules_history_browser {
 
+                // Static declarations (if any)
+                
 // Returns the current env
 
-JNIEnv * CommandHistory::getCurrentEnv()
-{
-    JNIEnv * curEnv = NULL;
-    jint res = this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    if (res != JNI_OK)
-    {
-        throw GiwsException::JniException(getCurrentEnv());
-    }
-    return curEnv;
+JNIEnv * CommandHistory::getCurrentEnv() {
+JNIEnv * curEnv = NULL;
+jint res=this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+if (res != JNI_OK) {
+throw GiwsException::JniException(getCurrentEnv());
+}
+return curEnv;
 }
 // Destructor
 
-CommandHistory::~CommandHistory()
-{
-    JNIEnv * curEnv = NULL;
-    this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+CommandHistory::~CommandHistory() {
+JNIEnv * curEnv = NULL;
+this->jvm->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
 
-    curEnv->DeleteGlobalRef(this->instance);
-    curEnv->DeleteGlobalRef(this->instanceClass);
+curEnv->DeleteGlobalRef(this->instance);
+curEnv->DeleteGlobalRef(this->instanceClass);
 }
 // Constructors
-CommandHistory::CommandHistory(JavaVM * jvm_)
-{
-    jmethodID constructObject = NULL ;
-    jobject localInstance ;
-    jclass localClass ;
+CommandHistory::CommandHistory(JavaVM * jvm_) {
+jmethodID constructObject = NULL ;
+jobject localInstance ;
+jclass localClass ;
 
-    const std::string construct = "<init>";
-    const std::string param = "()V";
-    jvm = jvm_;
+const std::string construct="<init>";
+const std::string param="()V";
+jvm=jvm_;
 
-    JNIEnv * curEnv = getCurrentEnv();
+JNIEnv * curEnv = getCurrentEnv();
 
-    localClass = curEnv->FindClass( this->className().c_str() ) ;
-    if (localClass == NULL)
-    {
-        throw GiwsException::JniClassNotFoundException(curEnv, this->className());
-    }
-
-    this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+localClass = curEnv->FindClass( this->className().c_str() ) ;
+if (localClass == NULL) {
+  throw GiwsException::JniClassNotFoundException(curEnv, this->className());
+}
 
-    /* localClass is not needed anymore */
-    curEnv->DeleteLocalRef(localClass);
+this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
 
-    if (this->instanceClass == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
+/* localClass is not needed anymore */
+curEnv->DeleteLocalRef(localClass);
 
+if (this->instanceClass == NULL) {
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
 
-    constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ;
-    if (constructObject == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
 
-    localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ;
-    if (localInstance == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
+constructObject = curEnv->GetMethodID( this->instanceClass, construct.c_str() , param.c_str() ) ;
+if(constructObject == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
 
-    this->instance = curEnv->NewGlobalRef(localInstance) ;
-    if (this->instance == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
-    /* localInstance not needed anymore */
-    curEnv->DeleteLocalRef(localInstance);
+localInstance = curEnv->NewObject( this->instanceClass, constructObject ) ;
+if(localInstance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+this->instance = curEnv->NewGlobalRef(localInstance) ;
+if(this->instance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+}
+/* localInstance not needed anymore */
+curEnv->DeleteLocalRef(localInstance);
 
-    /* Methods ID set to NULL */
-    voidappendLinejstringjava_lang_StringID = NULL;
-    voidloadFromFileID = NULL;
-    voidinitializeID = NULL;
-    voidresetID = NULL;
-    voidexpandAllID = NULL;
-    voiddeleteLinejintintID = NULL;
-    voidlaunchHistoryBrowserID = NULL;
+                /* Methods ID set to NULL */
+voidappendLinejstringjava_lang_StringID=NULL;
+voidloadFromFileID=NULL;
+voidinitializeID=NULL;
+voidresetID=NULL;
+voidexpandAllID=NULL;
+voiddeleteLinejintintID=NULL;
+voidlaunchHistoryBrowserID=NULL;
 
 
 }
 
-CommandHistory::CommandHistory(JavaVM * jvm_, jobject JObj)
-{
-    jvm = jvm_;
+CommandHistory::CommandHistory(JavaVM * jvm_, jobject JObj) {
+        jvm=jvm_;
 
-    JNIEnv * curEnv = getCurrentEnv();
+        JNIEnv * curEnv = getCurrentEnv();
 
-    jclass localClass = curEnv->GetObjectClass(JObj);
-    this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
-    curEnv->DeleteLocalRef(localClass);
+jclass localClass = curEnv->GetObjectClass(JObj);
+        this->instanceClass = static_cast<jclass>(curEnv->NewGlobalRef(localClass));
+        curEnv->DeleteLocalRef(localClass);
 
-    if (this->instanceClass == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
+        if (this->instanceClass == NULL) {
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+        }
 
-    this->instance = curEnv->NewGlobalRef(JObj) ;
-    if (this->instance == NULL)
-    {
-        throw GiwsException::JniObjectCreationException(curEnv, this->className());
-    }
-    /* Methods ID set to NULL */
-    voidappendLinejstringjava_lang_StringID = NULL;
-    voidloadFromFileID = NULL;
-    voidinitializeID = NULL;
-    voidresetID = NULL;
-    voidexpandAllID = NULL;
-    voiddeleteLinejintintID = NULL;
-    voidlaunchHistoryBrowserID = NULL;
+        this->instance = curEnv->NewGlobalRef(JObj) ;
+        if(this->instance == NULL){
+throw GiwsException::JniObjectCreationException(curEnv, this->className());
+        }
+        /* Methods ID set to NULL */
+        voidappendLinejstringjava_lang_StringID=NULL;
+voidloadFromFileID=NULL;
+voidinitializeID=NULL;
+voidresetID=NULL;
+voidexpandAllID=NULL;
+voiddeleteLinejintintID=NULL;
+voidlaunchHistoryBrowserID=NULL;
 
 
 }
 
 // Generic methods
 
-void CommandHistory::synchronize()
-{
-    if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK)
-    {
-        throw GiwsException::JniMonitorException(getCurrentEnv(), "CommandHistory");
-    }
+void CommandHistory::synchronize() {
+if (getCurrentEnv()->MonitorEnter(instance) != JNI_OK) {
+throw GiwsException::JniMonitorException(getCurrentEnv(), "CommandHistory");
+}
 }
 
-void CommandHistory::endSynchronize()
-{
-    if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK)
-    {
-        throw GiwsException::JniMonitorException(getCurrentEnv(), "CommandHistory");
-    }
+void CommandHistory::endSynchronize() {
+if ( getCurrentEnv()->MonitorExit(instance) != JNI_OK) {
+throw GiwsException::JniMonitorException(getCurrentEnv(), "CommandHistory");
+}
 }
 // Method(s)
 
-void CommandHistory::appendLine (JavaVM * jvm_, char const* lineToAppend)
-{
+void CommandHistory::appendLine (JavaVM * jvm_, char const* lineToAppend){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voidappendLinejstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "appendLine", "(Ljava/lang/String;)V" ) ;
-    if (voidappendLinejstringjava_lang_StringID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "appendLine");
-    }
+jmethodID voidappendLinejstringjava_lang_StringID = curEnv->GetStaticMethodID(cls, "appendLine", "(Ljava/lang/String;)V" ) ;
+if (voidappendLinejstringjava_lang_StringID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "appendLine");
+}
 
-    jstring lineToAppend_ = curEnv->NewStringUTF( lineToAppend );
-    if (lineToAppend != NULL && lineToAppend_ == NULL)
-    {
-        throw GiwsException::JniBadAllocException(curEnv);
-    }
+jstring lineToAppend_ = curEnv->NewStringUTF( lineToAppend );
+if (lineToAppend != NULL && lineToAppend_ == NULL)
+{
+throw GiwsException::JniBadAllocException(curEnv);
+}
 
 
-    curEnv->CallStaticVoidMethod(cls, voidappendLinejstringjava_lang_StringID , lineToAppend_);
-    curEnv->DeleteLocalRef(lineToAppend_);
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voidappendLinejstringjava_lang_StringID ,lineToAppend_);
+                        curEnv->DeleteLocalRef(lineToAppend_);
+curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::loadFromFile (JavaVM * jvm_)
-{
+void CommandHistory::loadFromFile (JavaVM * jvm_){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voidloadFromFileID = curEnv->GetStaticMethodID(cls, "loadFromFile", "()V" ) ;
-    if (voidloadFromFileID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "loadFromFile");
-    }
+jmethodID voidloadFromFileID = curEnv->GetStaticMethodID(cls, "loadFromFile", "()V" ) ;
+if (voidloadFromFileID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "loadFromFile");
+}
 
-    curEnv->CallStaticVoidMethod(cls, voidloadFromFileID );
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voidloadFromFileID );
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::initialize (JavaVM * jvm_)
-{
+void CommandHistory::initialize (JavaVM * jvm_){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voidinitializeID = curEnv->GetStaticMethodID(cls, "initialize", "()V" ) ;
-    if (voidinitializeID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "initialize");
-    }
+jmethodID voidinitializeID = curEnv->GetStaticMethodID(cls, "initialize", "()V" ) ;
+if (voidinitializeID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "initialize");
+}
 
-    curEnv->CallStaticVoidMethod(cls, voidinitializeID );
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voidinitializeID );
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::reset (JavaVM * jvm_)
-{
+void CommandHistory::reset (JavaVM * jvm_){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voidresetID = curEnv->GetStaticMethodID(cls, "reset", "()V" ) ;
-    if (voidresetID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "reset");
-    }
+jmethodID voidresetID = curEnv->GetStaticMethodID(cls, "reset", "()V" ) ;
+if (voidresetID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "reset");
+}
 
-    curEnv->CallStaticVoidMethod(cls, voidresetID );
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voidresetID );
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::expandAll (JavaVM * jvm_)
-{
+void CommandHistory::expandAll (JavaVM * jvm_){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voidexpandAllID = curEnv->GetStaticMethodID(cls, "expandAll", "()V" ) ;
-    if (voidexpandAllID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "expandAll");
-    }
+jmethodID voidexpandAllID = curEnv->GetStaticMethodID(cls, "expandAll", "()V" ) ;
+if (voidexpandAllID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "expandAll");
+}
 
-    curEnv->CallStaticVoidMethod(cls, voidexpandAllID );
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voidexpandAllID );
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::deleteLine (JavaVM * jvm_, int lineNumber)
-{
+void CommandHistory::deleteLine (JavaVM * jvm_, int lineNumber){
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    jmethodID voiddeleteLinejintintID = curEnv->GetStaticMethodID(cls, "deleteLine", "(I)V" ) ;
-    if (voiddeleteLinejintintID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "deleteLine");
-    }
+jmethodID voiddeleteLinejintintID = curEnv->GetStaticMethodID(cls, "deleteLine", "(I)V" ) ;
+if (voiddeleteLinejintintID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "deleteLine");
+}
 
-    curEnv->CallStaticVoidMethod(cls, voiddeleteLinejintintID , lineNumber);
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+                         curEnv->CallStaticVoidMethod(cls, voiddeleteLinejintintID ,lineNumber);
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
-void CommandHistory::launchHistoryBrowser (JavaVM * jvm_)
-{
+void CommandHistory::launchHistoryBrowser (JavaVM * jvm_){
+
+JNIEnv * curEnv = NULL;
+jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
+jclass cls = curEnv->FindClass( className().c_str() );
 
-    JNIEnv * curEnv = NULL;
-    jvm_->AttachCurrentThread(reinterpret_cast<void **>(&curEnv), NULL);
-    jclass cls = curEnv->FindClass( className().c_str() );
-
-    jmethodID voidlaunchHistoryBrowserID = curEnv->GetStaticMethodID(cls, "launchHistoryBrowser", "()V" ) ;
-    if (voidlaunchHistoryBrowserID == NULL)
-    {
-        throw GiwsException::JniMethodNotFoundException(curEnv, "launchHistoryBrowser");
-    }
-
-    curEnv->CallStaticVoidMethod(cls, voidlaunchHistoryBrowserID );
-    curEnv->DeleteLocalRef(cls);
-    if (curEnv->ExceptionCheck())
-    {
-        throw GiwsException::JniCallMethodException(curEnv);
-    }
+jmethodID voidlaunchHistoryBrowserID = curEnv->GetStaticMethodID(cls, "launchHistoryBrowser", "()V" ) ;
+if (voidlaunchHistoryBrowserID == NULL) {
+throw GiwsException::JniMethodNotFoundException(curEnv, "launchHistoryBrowser");
+}
+
+                         curEnv->CallStaticVoidMethod(cls, voidlaunchHistoryBrowserID );
+                        curEnv->DeleteLocalRef(cls);
+if (curEnv->ExceptionCheck()) {
+throw GiwsException::JniCallMethodException(curEnv);
+}
 }
 
 }
index 5fc3069..e9a1402 100644 (file)
@@ -1,5 +1,5 @@
 /* Generated by GIWS (version 2.0.1) with command:
-giws -e -r -f CommandHistory.giws.xml
+giws --disable-return-size-array --output-dir src/jni/ --throws-exception-on-error --description-file src/jni/CommandHistory.giws.xml 
 */
 /*
 
@@ -9,16 +9,16 @@ This software is a computer program whose purpose is to hide the complexity
 of accessing Java objects/methods from C++ code.
 
 This software is governed by the CeCILL-B license under French law and
-abiding by the rules of distribution of free software.  You can  use,
+abiding by the rules of distribution of free software.  You can  use, 
 modify and/ or redistribute the software under the terms of the CeCILL-B
 license as circulated by CEA, CNRS and INRIA at the following URL
-"http://www.cecill.info".
+"http://www.cecill.info". 
 
 As a counterpart to the access to the source code and  rights to copy,
 modify and redistribute granted by the license, users are provided only
 with a limited warranty  and the software's author,  the holder of the
 economic rights,  and the successive licensors  have only  limited
-liability.
+liability. 
 
 In this respect, the user's attention is drawn to the risks associated
 with loading,  using,  modifying and/or developing or reproducing the
@@ -27,9 +27,9 @@ that may mean  that it is complicated to manipulate,  and  that  also
 therefore means  that it is reserved for developers  and  experienced
 professionals having in-depth computer knowledge. Users are therefore
 encouraged to load and test the software's suitability as regards their
-requirements in conditions enabling the security of their systems and/or
-data to be ensured and,  more generally, to use and operate it in the
-same conditions as regards security.
+requirements in conditions enabling the security of their systems and/or 
+data to be ensured and,  more generally, to use and operate it in the 
+same conditions as regards security. 
 
 The fact that you are presently reading this means that you have had
 knowledge of the CeCILL-B license and that you accept its terms.
@@ -46,11 +46,11 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-#if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-typedef signed char byte;
-#else
-#pragma message("Byte has been redefined elsewhere. Some problems can happen")
-#endif
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
+        #else
+            typedef signed char byte;
+        #endif
 
 
 #ifndef GIWSEXPORT
@@ -69,106 +69,104 @@ typedef signed char byte;
 # endif
 #endif
 
-namespace org_scilab_modules_history_browser
-{
-class GIWSEXPORT CommandHistory
-{
+namespace org_scilab_modules_history_browser {
+class GIWSEXPORT CommandHistory {
 
 private:
-    JavaVM * jvm;
+JavaVM * jvm;
 
 protected:
-    jmethodID voidappendLinejstringjava_lang_StringID; // cache method id
-    jmethodID voidloadFromFileID; // cache method id
-    jmethodID voidinitializeID; // cache method id
-    jmethodID voidresetID; // cache method id
-    jmethodID voidexpandAllID; // cache method id
-    jmethodID voiddeleteLinejintintID; // cache method id
-    jmethodID voidlaunchHistoryBrowserID; // cache method id
-
+jmethodID voidappendLinejstringjava_lang_StringID; // cache method id
+jmethodID voidloadFromFileID; // cache method id
+jmethodID voidinitializeID; // cache method id
+jmethodID voidresetID; // cache method id
+jmethodID voidexpandAllID; // cache method id
+jmethodID voiddeleteLinejintintID; // cache method id
+jmethodID voidlaunchHistoryBrowserID; // cache method id
 
 
-    jobject instance;
-    jclass instanceClass; // cache class
 
+jobject instance;
+jclass instanceClass; // cache class
 
-    // Caching (if any)
+                       
+// Caching (if any)
 
 
-    /**
-    * Get the environment matching to the current thread.
-    */
-    virtual JNIEnv * getCurrentEnv();
+/**
+* Get the environment matching to the current thread.
+*/
+virtual JNIEnv * getCurrentEnv();
 
 public:
-    // Constructor
-    /**
-    * Create a wrapping of the object from a JNIEnv.
-    * It will call the default constructor
-    * @param JEnv_ the Java Env
-    */
-    CommandHistory(JavaVM * jvm_);
-
-    /**
-    * Create a wrapping of an already existing object from a JNIEnv.
-    * The object must have already been instantiated
-    * @param JEnv_ the Java Env
-    * @param JObj the object
-    */
-    CommandHistory(JavaVM * jvm_, jobject JObj);
-
-
-    /**
-    * This is a fake constructor to avoid the constructor
-    * chaining when dealing with extended giws classes
-    */
-#ifdef FAKEGIWSDATATYPE
-    CommandHistory(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
-#endif
+// Constructor
+/**
+* Create a wrapping of the object from a JNIEnv.
+* It will call the default constructor
+* @param JEnv_ the Java Env
+*/
+CommandHistory(JavaVM * jvm_);
 
-    // Destructor
-    ~CommandHistory();
+/**
+* Create a wrapping of an already existing object from a JNIEnv.
+* The object must have already been instantiated
+* @param JEnv_ the Java Env
+* @param JObj the object
+*/
+CommandHistory(JavaVM * jvm_, jobject JObj);
 
-    // Generic method
-    // Synchronization methods
-    /**
-    * Enter monitor associated with the object.
-    * Equivalent of creating a "synchronized(obj)" scope in Java.
-    */
-    void synchronize();
 
-    /**
-    * Exit monitor associated with the object.
-    * Equivalent of ending a "synchronized(obj)" scope.
-    */
-    void endSynchronize();
+/** 
+* This is a fake constructor to avoid the constructor
+* chaining when dealing with extended giws classes 
+*/
+#ifdef FAKEGIWSDATATYPE
+CommandHistory(fakeGiwsDataType::fakeGiwsDataType /* unused */) {}
+#endif
 
-    // Methods
-    static void appendLine(JavaVM * jvm_, char const* lineToAppend);
+// Destructor
+~CommandHistory();
 
-    static void loadFromFile(JavaVM * jvm_);
+// Generic method
+// Synchronization methods
+/**
+* Enter monitor associated with the object.
+* Equivalent of creating a "synchronized(obj)" scope in Java.
+*/
+void synchronize();
+
+/**
+* Exit monitor associated with the object.
+* Equivalent of ending a "synchronized(obj)" scope.
+*/
+void endSynchronize();
 
-    static void initialize(JavaVM * jvm_);
+// Methods
+static void appendLine(JavaVM * jvm_, char const* lineToAppend);
 
-    static void reset(JavaVM * jvm_);
+static void loadFromFile(JavaVM * jvm_);
 
-    static void expandAll(JavaVM * jvm_);
+static void initialize(JavaVM * jvm_);
 
-    static void deleteLine(JavaVM * jvm_, int lineNumber);
+static void reset(JavaVM * jvm_);
 
-    static void launchHistoryBrowser(JavaVM * jvm_);
+static void expandAll(JavaVM * jvm_);
 
+static void deleteLine(JavaVM * jvm_, int lineNumber);
 
-    /**
-    * Get class name to use for static methods
-    * @return class name to use for static methods
-    */
+static void launchHistoryBrowser(JavaVM * jvm_);
 
-    static const std::string className()
-    {
-        return "org/scilab/modules/history_browser/CommandHistory";
-    }
 
+                        /**
+                        * Get class name to use for static methods
+                        * @return class name to use for static methods
+                        */
+                        
+                static const std::string className()
+                {
+                return "org/scilab/modules/history_browser/CommandHistory";
+                }
+                
 };
 
 
index 3ddb7b5..8170f0e 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 4028778..9c3b8f8 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 12dd0a2..4d3cfa5 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 02e6d5f..db21e2f 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 90b5e0b..534aad2 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index eef8b18..67a29a8 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index f70c707..e0758ea 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 804f38f..1ea802b 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 8b9e709..ab42394 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 93fc279..ef5e0fe 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 784fd3e..d614725 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index b9cc0e1..866af1c 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif
 
 
index 8ddc950..e7b5113 100644 (file)
@@ -46,10 +46,10 @@ knowledge of the CeCILL-B license and that you accept its terms.
 
 #include "GiwsException.hxx"
 
-        #if !defined(byte) | !defined(_MSC_VER) /* Defined anyway with Visual */
-                typedef signed char byte;
+        #if defined(_MSC_VER) /* Defined anyway with Visual */
+            #include <Windows.h>
         #else
-                #pragma message("Byte has been redefined elsewhere. Some problems can happen")
+            typedef signed char byte;
         #endif