From aec68349995584ad3403f340163f3b3866cd34ed Mon Sep 17 00:00:00 2001 From: cornet Date: Wed, 22 Apr 2009 12:09:03 +0000 Subject: add string project + build release mode TO DO add tests --- scilab2c.sln | 11 + scilab2c_f2c.sln | 11 + .../acosh/test_doubleacosh/test_doubleacosh.vcproj | 1 + src/elementaryFunctions/elementaryFunctions.vcproj | 80 ++- src/matrixOperations/matrixOperations.vcproj | 176 +++++++ src/string/disp/cdispa.c | 2 +- src/string/includes/disp.h | 25 +- src/string/includes/dynlib_string.h | 26 + src/string/includes/string.h | 24 +- src/string/string.vcproj | 543 +++++++++++++++++++++ .../test_floatComplex/test_floatComplex.vcproj | 8 + 11 files changed, 881 insertions(+), 26 deletions(-) create mode 100644 src/string/includes/dynlib_string.h create mode 100644 src/string/string.vcproj diff --git a/scilab2c.sln b/scilab2c.sln index f6e6c908..9bd6cebd 100644 --- a/scilab2c.sln +++ b/scilab2c.sln @@ -90,6 +90,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "statisticsFunctions", "src\ {9B622A66-546A-4B33-B947-0A189D259D37} = {9B622A66-546A-4B33-B947-0A189D259D37} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "string", "src\string\string.vcproj", "{38A141F2-DF77-4032-A17C-0901EA1A7AF1}" + ProjectSection(ProjectDependencies) = postProject + {9B1BD750-1FEF-4D6B-9422-782D16181CEE} = {9B1BD750-1FEF-4D6B-9422-782D16181CEE} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -192,6 +197,12 @@ Global {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|Win32.ActiveCfg = Release|Win32 {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|Win32.Build.0 = Release|Win32 {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|x64.ActiveCfg = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|Win32.Build.0 = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|x64.ActiveCfg = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|Win32.ActiveCfg = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|Win32.Build.0 = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/scilab2c_f2c.sln b/scilab2c_f2c.sln index 636d4bbb..2aee4e78 100644 --- a/scilab2c_f2c.sln +++ b/scilab2c_f2c.sln @@ -90,6 +90,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "statisticsFunctions", "src\ {9B622A66-546A-4B33-B947-0A189D259D37} = {9B622A66-546A-4B33-B947-0A189D259D37} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "string", "src\string\string.vcproj", "{38A141F2-DF77-4032-A17C-0901EA1A7AF1}" + ProjectSection(ProjectDependencies) = postProject + {9B1BD750-1FEF-4D6B-9422-782D16181CEE} = {9B1BD750-1FEF-4D6B-9422-782D16181CEE} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -192,6 +197,12 @@ Global {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|Win32.ActiveCfg = Release|Win32 {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|Win32.Build.0 = Release|Win32 {E11ED064-3BF2-4F70-B66E-3223C737EC60}.Release|x64.ActiveCfg = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|Win32.ActiveCfg = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|Win32.Build.0 = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Debug|x64.ActiveCfg = Debug|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|Win32.ActiveCfg = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|Win32.Build.0 = Release|Win32 + {38A141F2-DF77-4032-A17C-0901EA1A7AF1}.Release|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcproj b/src/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcproj index 247d8a79..3ccef521 100644 --- a/src/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcproj +++ b/src/elementaryFunctions/acosh/test_doubleacosh/test_doubleacosh.vcproj @@ -135,6 +135,7 @@ /> @@ -590,7 +590,7 @@ > @@ -612,7 +612,7 @@ > @@ -634,7 +634,7 @@ > @@ -660,7 +660,7 @@ > @@ -682,7 +682,7 @@ > @@ -704,7 +704,7 @@ > @@ -726,7 +726,7 @@ > @@ -1674,6 +1674,14 @@ CompileAs="2" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +#include "dynlib_string.h" #include "floatComplex.h" #include "doubleComplex.h" +#ifdef __cplusplus +extern "C" { +#endif /* ** \brief display of a float scalar */ -double sdisps (float in); +EXTERN_STRING double sdisps (float in); /* ** \brief display of a double scalar */ -double ddisps (double in); +EXTERN_STRING double ddisps (double in); /* ** \brief display of a float complex */ -double cdisps (floatComplex in); +EXTERN_STRING double cdisps (floatComplex in); /* ** \brief display of a double complex */ -double zdisps (doubleComplex in); +EXTERN_STRING double zdisps (doubleComplex in); /* ** \brief display of a float scalar array ** \param in the float scalar array to display ** \param size the size of the array */ -double sdispa (float* in, int rows, int columns); +EXTERN_STRING double sdispa (float* in, int rows, int columns); /* ** \brief display of a double scalar array ** \param in the double scalar array to display ** \param size the size of the array */ -double ddispa (double* in, int rows, int columns); +EXTERN_STRING double ddispa (double* in, int rows, int columns); /* ** \brief display of a float complex array ** \param in the float complex array to display ** \param size the size of the array */ -double cdispa (floatComplex* in, int rows, int columns); +EXTERN_STRING double cdispa (floatComplex* in, int rows, int columns); /* ** \brief display of a double complex array ** \param in the double complex array to display ** \param size the size of the array */ -double zdispa (doubleComplex* in, int rows, int columns); +EXTERN_STRING double zdispa (doubleComplex* in, int rows, int columns); -double g2dispd0(char *array,int* tmparraysize); +EXTERN_STRING double g2dispd0(char *array,int* tmparraysize); +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* !__DISP_H__ */ diff --git a/src/string/includes/dynlib_string.h b/src/string/includes/dynlib_string.h new file mode 100644 index 00000000..e061d7e7 --- /dev/null +++ b/src/string/includes/dynlib_string.h @@ -0,0 +1,26 @@ +/* +* Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +* Copyright (C) 2009 - DIGITEO - Allan CORNET +* +* This file must be used under the terms of the CeCILL. +* This source file is licensed as described in the file COPYING, which +* you should have received as part of this distribution. The terms +* are also available at +* http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +* +*/ + +#ifndef __DYNLIB_STRING_H__ +#define __DYNLIB_STRING_H__ + +#ifdef _MSC_VER + #if STRING_EXPORTS + #define EXTERN_STRING __declspec (dllexport) + #else + #define EXTERN_STRING __declspec (dllimport) + #endif +#else + #define EXTERN_MATOPS +#endif + +#endif /* __DYNLIB_STRING_H__ */ diff --git a/src/string/includes/string.h b/src/string/includes/string.h index 37ac2d09..9cd6b523 100644 --- a/src/string/includes/string.h +++ b/src/string/includes/string.h @@ -16,37 +16,41 @@ #define __STRING_H__ #include +#include "dynlib_string.h" #include "floatComplex.h" #include "doubleComplex.h" +#ifdef __cplusplus +extern "C" { +#endif /* ** \brief convert of a float scalar into a char array ** \param in the float scalar to convert ** \param out the output char array */ -void sstrings (float in, char* out); +EXTERN_STRING void sstrings (float in, char* out); /* ** \brief convert of a double scalar into a char array ** \param in the double scalar to convert ** \param out the output char array */ -void dstrings (double in, char* out); +EXTERN_STRING void dstrings (double in, char* out); /* ** \brief convert of a float complex into a char array ** \param in the float complex to convert ** \param out the output char array */ -void cstrings (floatComplex in, char* out); +EXTERN_STRING void cstrings (floatComplex in, char* out); /* ** \brief convert of a double complex into a char array ** \param in the double complex to convert ** \param out the output char array */ -void zstrings (doubleComplex in, char* out); +EXTERN_STRING void zstrings (doubleComplex in, char* out); /* @@ -54,27 +58,31 @@ void zstrings (doubleComplex in, char* out); ** \param in the float scalar array to convert ** \param out the output array of char arrays */ -void sstringa (float* in, int size, char** out); +EXTERN_STRING void sstringa (float* in, int size, char** out); /* ** \brief convert of a double scalar array into an array of char arrays ** \param in the double scalar array to convert ** \param out the output array of char arrays */ -void dstringa (double* in, int size, char** out); +EXTERN_STRING void dstringa (double* in, int size, char** out); /* ** \brief convert of a float complex array into an array of char arrays ** \param in the float complex array to convert ** \param out the output array of char arrays */ -void cstringa (floatComplex* in, int size, char** out ); +EXTERN_STRING void cstringa (floatComplex* in, int size, char** out ); /* ** \brief convert of a double complex array into an array of char arrays ** \param in the double complex array to convert ** \param out the output array of char arrays */ -void zstringa (doubleComplex* in, int size, char** out); +EXTERN_STRING void zstringa (doubleComplex* in, int size, char** out); + +#ifdef __cplusplus +} /* extern "C" */ +#endif #endif /* !__STRING_H__ */ diff --git a/src/string/string.vcproj b/src/string/string.vcproj new file mode 100644 index 00000000..94cbc3a7 --- /dev/null +++ b/src/string/string.vcproj @@ -0,0 +1,543 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/type/test_floatComplex/test_floatComplex.vcproj b/src/type/test_floatComplex/test_floatComplex.vcproj index d1fe7c58..fb9c8e9e 100644 --- a/src/type/test_floatComplex/test_floatComplex.vcproj +++ b/src/type/test_floatComplex/test_floatComplex.vcproj @@ -185,6 +185,14 @@ CompileAs="2" /> + + +