summaryrefslogtreecommitdiffstats
path: root/scilab
diff options
context:
space:
mode:
authorCedric Delamarre <cedric.delamarre@scilab-enterprises.com>2016-11-10 19:03:33 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-11 18:06:46 +0100
commita7015d45ff3ac2f10c1564d14fb0f6669478a806 (patch)
treea1f5f965bf01f0e7d577887d2c71bf23585a24f0 /scilab
parent2bf463f20b0e43d934052463b03ffc382736522e (diff)
downloadscilab-a7015d45ff3ac2f10c1564d14fb0f6669478a806.zip
scilab-a7015d45ff3ac2f10c1564d14fb0f6669478a806.tar.gz
utf: linux compilation
Change-Id: Ifa5ede051ecb4eee2c93b649c843807b2c3f678e
Diffstat (limited to 'scilab')
-rw-r--r--scilab/modules/ast/includes/operations/types_addition.hxx16
-rw-r--r--scilab/modules/ast/includes/types/arrayof.hxx6
-rw-r--r--scilab/modules/ast/includes/types/tostring_common.hxx8
-rw-r--r--scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp2
-rw-r--r--scilab/modules/ast/src/cpp/ast/run_CallExp.hpp4
-rw-r--r--scilab/modules/ast/src/cpp/ast/runvisitor.cpp24
-rw-r--r--scilab/modules/ast/src/cpp/ast/visitor_common.cpp2
-rw-r--r--scilab/modules/ast/src/cpp/operations/types_addition.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/operations/types_subtraction.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/parse/parser.cpp6
-rw-r--r--scilab/modules/ast/src/cpp/symbol/context.cpp10
-rw-r--r--scilab/modules/ast/src/cpp/system_env/configvariable.cpp6
-rw-r--r--scilab/modules/ast/src/cpp/system_env/sci_home.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp6
-rw-r--r--scilab/modules/ast/src/cpp/types/function.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/library.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/overload.cpp16
-rw-r--r--scilab/modules/ast/src/cpp/types/polynom.cpp2
-rw-r--r--scilab/modules/ast/src/cpp/types/singlepoly.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/string.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/struct.cpp4
-rw-r--r--scilab/modules/ast/src/cpp/types/tostring_common.cpp20
-rw-r--r--scilab/modules/ast/src/cpp/types/types_tools.cpp6
-rw-r--r--scilab/modules/completion/src/c/completeLine.c2
-rw-r--r--scilab/modules/completion/src/c/completion_generic.c2
-rw-r--r--scilab/modules/console/src/c/dropFiles.c20
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_intppty.cpp4
-rw-r--r--scilab/modules/core/src/c/InitializePreferences.c10
-rw-r--r--scilab/modules/core/src/c/getmodules.c4
-rw-r--r--scilab/modules/core/src/c/loadversion.c3
-rw-r--r--scilab/modules/core/src/c/saveCWDInPreferences.c2
-rw-r--r--scilab/modules/core/src/cpp/InitScilab.cpp14
-rw-r--r--scilab/modules/core/src/cpp/runner.cpp2
-rw-r--r--scilab/modules/coverage/src/cpp/CoverModule.cpp3
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_bvode.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_daskr.cpp8
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_dasrt.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_dassl.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_feval.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_impl.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_int2d.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_int3d.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_intg.cpp2
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_ode.cpp4
-rw-r--r--scilab/modules/differential_equations/sci_gateway/cpp/sci_odedc.cpp8
-rw-r--r--scilab/modules/dynamic_link/src/cpp/dynamic_link.cpp4
-rw-r--r--scilab/modules/fileio/sci_gateway/c/sci_copyfile.c3
-rw-r--r--scilab/modules/fileio/sci_gateway/c/sci_movefile.c3
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp2
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp4
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp2
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp2
-rw-r--r--scilab/modules/fileio/src/c/copyfile_others.c80
-rw-r--r--scilab/modules/fileio/src/c/copyfile_windows.c4
-rw-r--r--scilab/modules/fileio/src/c/createdirectory.c18
-rw-r--r--scilab/modules/fileio/src/c/dlManager.c2
-rw-r--r--scilab/modules/fileio/src/c/findfiles.c4
-rw-r--r--scilab/modules/fileio/src/c/scicurdir.c11
-rw-r--r--scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp6
-rw-r--r--scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp8
-rw-r--r--scilab/modules/functions_manager/src/cpp/funcmanager.cpp4
-rw-r--r--scilab/modules/graphics/sci_gateway/c/sci_light.c8
-rw-r--r--scilab/modules/graphics/sci_gateway/c/sci_set.c14
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c12
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/setGetHashTable.c2
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_alignment_property.c6
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c10
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_arc_drawing_method_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_border_property.c30
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_box_property.c14
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_cdata_mapping_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_clip_state_property.c6
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c36
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_data_mapping_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_grid_position_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_image_type_property.c26
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_layout_property.c8
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_unit_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_menubar_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c8
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_text_box_mode_property.c6
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c8
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_tics_style_property.c6
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_toolbar_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c4
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c8
-rw-r--r--scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c8
-rw-r--r--scilab/modules/graphics/src/c/name2rgb.c2
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_figure.c90
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_messagebox.c2
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_uicontrol.c2
-rw-r--r--scilab/modules/gui/sci_gateway/c/sci_uimenu.c4
-rw-r--r--scilab/modules/gui/sci_gateway/cpp/sci_datatip_set_orient.cpp18
-rw-r--r--scilab/modules/gui/src/c/messageboxoptions.c16
-rw-r--r--scilab/modules/gui/src/cpp/GetScreenProperty.cpp14
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolFontAngle.cpp6
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolFontWeight.cpp8
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolHorizontalAlignment.cpp6
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolRelief.cpp14
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolUnits.cpp10
-rw-r--r--scilab/modules/gui/src/cpp/SetUicontrolVerticalAlignment.cpp2
-rw-r--r--scilab/modules/io/sci_gateway/cpp/sci_genlib.cpp13
-rw-r--r--scilab/modules/io/src/cpp/loadlib.cpp2
-rw-r--r--scilab/modules/jvm/src/c/JVM_Unix.c2
-rw-r--r--scilab/modules/jvm/src/c/getJvmOptions.c3
-rw-r--r--scilab/modules/jvm/src/c/loadClasspath.c6
-rw-r--r--scilab/modules/jvm/src/c/loadLibrarypath.c2
-rw-r--r--scilab/modules/localization/Makefile.am1
-rw-r--r--scilab/modules/localization/Makefile.in18
-rw-r--r--scilab/modules/output_stream/sci_gateway/cpp/sci_diary.cpp15
-rw-r--r--scilab/modules/output_stream/src/cpp/diary_manager.cpp23
-rw-r--r--scilab/modules/output_stream/src/cpp/diary_manager.hxx4
-rw-r--r--scilab/modules/preferences/src/c/getScilabPreference.c2
-rw-r--r--scilab/modules/scicos/src/cpp/LoggerView.cpp1
-rw-r--r--scilab/modules/slint/src/cpp/PCREMatcher.cpp1
-rw-r--r--scilab/modules/string/Makefile.in15
-rw-r--r--scilab/modules/string/includes/os_string.h28
-rw-r--r--scilab/modules/string/sci_gateway/cpp/sci_strtok.cpp7
-rw-r--r--scilab/modules/string/src/c/os_wcstok.c4
-rw-r--r--scilab/modules/string/src/c/stringToComplex.c24
-rw-r--r--scilab/modules/string/src/c/stringToDouble.c31
-rw-r--r--scilab/modules/string/src/c/stringsCompare.c2
-rw-r--r--scilab/modules/string/src/c/stristr.c2
-rw-r--r--scilab/modules/string/src/c/strsplit.c3
-rw-r--r--scilab/modules/windows_tools/sci_gateway/cpp/sci_mcisendstring.cpp2
-rw-r--r--scilab/modules/windows_tools/src/c/scilab_windows/console.c2
-rw-r--r--scilab/modules/xml/sci_gateway/cpp/sci_htmlWrite.cpp2
130 files changed, 485 insertions, 609 deletions
diff --git a/scilab/modules/ast/includes/operations/types_addition.hxx b/scilab/modules/ast/includes/operations/types_addition.hxx
index 7843190..34f098e 100644
--- a/scilab/modules/ast/includes/operations/types_addition.hxx
+++ b/scilab/modules/ast/includes/operations/types_addition.hxx
@@ -134,11 +134,7 @@ inline static void add(char** l, size_t size, char** r, int* length , char** o)
134{ 134{
135 for (size_t i = 0; i < size ; ++i) 135 for (size_t i = 0; i < size ; ++i)
136 { 136 {
137#ifdef _MSC_VER
138 os_sprintf(o[i], length[i], "%s%s", l[i], r[i]); 137 os_sprintf(o[i], length[i], "%s%s", l[i], r[i]);
139#else
140 os_sprintf(o[i], "%s%s", l[i], r[i]);
141#endif
142 } 138 }
143} 139}
144 140
@@ -216,11 +212,7 @@ inline static void add(char** l, size_t size, char* r, int* length , char** o)
216{ 212{
217 for (size_t i = 0; i < size ; ++i) 213 for (size_t i = 0; i < size ; ++i)
218 { 214 {
219#ifdef _MSC_VER
220 os_sprintf(o[i], length[i], "%s%s", l[i], r); 215 os_sprintf(o[i], length[i], "%s%s", l[i], r);
221#else
222 os_sprintf(o[i], "%s%s", l[i], r);
223#endif
224 } 216 }
225} 217}
226 218
@@ -269,11 +261,7 @@ inline static void add(char* l, size_t size, char** r, int* length , char** o)
269{ 261{
270 for (size_t i = 0; i < size ; ++i) 262 for (size_t i = 0; i < size ; ++i)
271 { 263 {
272#ifdef _MSC_VER
273 os_sprintf(o[i], length[i], "%s%s", l, r[i]); 264 os_sprintf(o[i], length[i], "%s%s", l, r[i]);
274#else
275 os_sprintf(o[i], "%s%s", l, r[i]);
276#endif
277 } 265 }
278} 266}
279 267
@@ -323,11 +311,7 @@ template<typename T, typename U, typename O> inline static void add(T l, U r, O*
323//string version 311//string version
324inline static void add(char* l, char* r, int length , char* o) 312inline static void add(char* l, char* r, int length , char* o)
325{ 313{
326#ifdef _MSC_VER
327 os_sprintf(o, length, "%s%s", l, r); 314 os_sprintf(o, length, "%s%s", l, r);
328#else
329 os_sprintf(o, "%s%s", l, r);
330#endif
331} 315}
332 316
333//x1C + x1C 317//x1C + x1C
diff --git a/scilab/modules/ast/includes/types/arrayof.hxx b/scilab/modules/ast/includes/types/arrayof.hxx
index 715215e..9aa7c6e 100644
--- a/scilab/modules/ast/includes/types/arrayof.hxx
+++ b/scilab/modules/ast/includes/types/arrayof.hxx
@@ -117,7 +117,7 @@ protected :
117 if (m_iSize != 0 && iTmpSize / m_iSize != m_piDims[i]) 117 if (m_iSize != 0 && iTmpSize / m_iSize != m_piDims[i])
118 { 118 {
119 char message[bsiz]; 119 char message[bsiz];
120 os_sprintf(message, _("Can not allocate %.2f MB memory.\n"), (double) ((double) m_iSize * (double) m_piDims[i] * sizeof(T)) / 1.e6); 120 os_sprintf(message, bsiz, _("Can not allocate %.2f MB memory.\n"), (double) ((double) m_iSize * (double) m_piDims[i] * sizeof(T)) / 1.e6);
121 throw ast::InternalError(message); 121 throw ast::InternalError(message);
122 } 122 }
123 123
@@ -129,7 +129,7 @@ protected :
129 m_pRealData = NULL; 129 m_pRealData = NULL;
130 m_pImgData = NULL; 130 m_pImgData = NULL;
131 char message[bsiz]; 131 char message[bsiz];
132 os_sprintf(message, _("Can not allocate negative size (%d).\n"), m_iSize); 132 os_sprintf(message, bsiz, _("Can not allocate negative size (%d).\n"), m_iSize);
133 throw ast::InternalError(message); 133 throw ast::InternalError(message);
134 } 134 }
135 135
@@ -161,7 +161,7 @@ protected :
161 catch (std::bad_alloc & /*e*/) 161 catch (std::bad_alloc & /*e*/)
162 { 162 {
163 char message[bsiz]; 163 char message[bsiz];
164 os_sprintf(message, _("Can not allocate %.2f MB memory.\n"), (double)(m_iSize * sizeof(T)) / 1.e6); 164 os_sprintf(message, bsiz, _("Can not allocate %.2f MB memory.\n"), (double)(m_iSize * sizeof(T)) / 1.e6);
165 throw ast::InternalError(message); 165 throw ast::InternalError(message);
166 } 166 }
167 167
diff --git a/scilab/modules/ast/includes/types/tostring_common.hxx b/scilab/modules/ast/includes/types/tostring_common.hxx
index 1a6b09a..3338b03 100644
--- a/scilab/modules/ast/includes/types/tostring_common.hxx
+++ b/scilab/modules/ast/includes/types/tostring_common.hxx
@@ -118,8 +118,8 @@ void addUnsignedIntValue(std::ostringstream *_postr, T _TVal, int _iWidth, bool
118 118
119 if (bPrintOne == true || _TVal != 1) 119 if (bPrintOne == true || _TVal != 1)
120 { 120 {
121 os_sprintf(pstFormat, " %s%llu", pstSign, (unsigned long long)(_TVal)); 121 os_sprintf(pstFormat, 32, " %s%llu", pstSign, (unsigned long long)(_TVal));
122 os_sprintf(pstOutput, "%*s", _iWidth + 1, pstFormat);//+1 for blank 122 os_sprintf(pstOutput, 32, "%*s", _iWidth + 1, pstFormat);//+1 for blank
123 *_postr << pstOutput; 123 *_postr << pstOutput;
124 } 124 }
125} 125}
@@ -142,8 +142,8 @@ void addSignedIntValue(std::ostringstream *_postr, T _TVal, int _iWidth, bool bP
142 if (bPrintOne == true || _TVal != 1) 142 if (bPrintOne == true || _TVal != 1)
143 { 143 {
144 unsigned long long a = _abs64(_TVal); 144 unsigned long long a = _abs64(_TVal);
145 os_sprintf(pstFormat, " %s%llu", pstSign, a); 145 os_sprintf(pstFormat, 32, " %s%llu", pstSign, a);
146 os_sprintf(pstOutput, "%*s", _iWidth + 1, pstFormat);//+1 for blank 146 os_sprintf(pstOutput, 32, "%*s", _iWidth + 1, pstFormat);//+1 for blank
147 *_postr << pstOutput; 147 *_postr << pstOutput;
148 } 148 }
149} 149}
diff --git a/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp b/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
index 115d521..308e73c 100644
--- a/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
+++ b/scilab/modules/ast/src/cpp/ast/run_AssignExp.hpp
@@ -100,7 +100,7 @@ void RunVisitorT<T>::visitprivate(const AssignExp &e)
100 { 100 {
101 char pstError[1024]; 101 char pstError[1024];
102 const char* pstFuncName = pVar->getSymbol().getName().data(); 102 const char* pstFuncName = pVar->getSymbol().getName().data();
103 os_sprintf(pstError, _("It is not possible to redefine the %s primitive this way (see clearfun).\n"), pstFuncName); 103 os_sprintf(pstError, 1024,_("It is not possible to redefine the %s primitive this way (see clearfun).\n"), pstFuncName);
104 pIT->killMe(); 104 pIT->killMe();
105 CoverageInstance::stopChrono((void*)&e); 105 CoverageInstance::stopChrono((void*)&e);
106 throw InternalError(pstError, 999, e.getLocation()); 106 throw InternalError(pstError, 999, e.getLocation());
diff --git a/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp b/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp
index 3a0a3034..b206165 100644
--- a/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp
+++ b/scilab/modules/ast/src/cpp/ast/run_CallExp.hpp
@@ -285,11 +285,11 @@ void RunVisitorT<T>::visitprivate(const CallExp &e)
285 if (pIT->isCallable()) 285 if (pIT->isCallable())
286 { 286 {
287 const char* strFName = pIT->getAs<types::Callable>()->getName().c_str(); 287 const char* strFName = pIT->getAs<types::Callable>()->getName().c_str();
288 os_sprintf(szError, _("%s: Wrong number of output argument(s): %d expected.\n"), strFName, out.size()); 288 os_sprintf(szError, bsiz, _("%s: Wrong number of output argument(s): %d expected.\n"), strFName, out.size());
289 } 289 }
290 else 290 else
291 { 291 {
292 os_sprintf(szError, _("%s: Wrong number of output argument(s): %d expected.\n"), "extract", out.size()); 292 os_sprintf(szError, bsiz, _("%s: Wrong number of output argument(s): %d expected.\n"), "extract", out.size());
293 } 293 }
294 294
295 throw InternalError(szError, 999, e.getLocation()); 295 throw InternalError(szError, 999, e.getLocation());
diff --git a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
index bdb4779..7326f69 100644
--- a/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
+++ b/scilab/modules/ast/src/cpp/ast/runvisitor.cpp
@@ -33,7 +33,7 @@
33#include "generic_operations.hxx" 33#include "generic_operations.hxx"
34#include "types_or.hxx" 34#include "types_or.hxx"
35#include "types_and.hxx" 35#include "types_and.hxx"
36 36
37#include "macrofile.hxx" 37#include "macrofile.hxx"
38#include "macro.hxx" 38#include "macro.hxx"
39#include "cell.hxx" 39#include "cell.hxx"
@@ -146,7 +146,7 @@ void RunVisitorT<T>::visitprivate(const SimpleVar & e)
146 { 146 {
147 char pstError[bsiz]; 147 char pstError[bsiz];
148 const char* strErr = e.getSymbol().getName().c_str(); 148 const char* strErr = e.getSymbol().getName().c_str();
149 os_sprintf(pstError, _("Undefined variable: %s\n"), strErr); 149 os_sprintf(pstError, bsiz, _("Undefined variable: %s\n"), strErr);
150 150
151 CoverageInstance::stopChrono((void*)&e); 151 CoverageInstance::stopChrono((void*)&e);
152 throw InternalError(pstError, 999, e.getLocation()); 152 throw InternalError(pstError, 999, e.getLocation());
@@ -313,7 +313,7 @@ void RunVisitorT<T>::visitprivate(const FieldExp &e)
313 if (!e.getTail()->isSimpleVar()) 313 if (!e.getTail()->isSimpleVar())
314 { 314 {
315 char szError[bsiz]; 315 char szError[bsiz];
316 os_sprintf(szError, _("/!\\ Unmanaged FieldExp.\n")); 316 os_sprintf(szError, bsiz, _("/!\\ Unmanaged FieldExp.\n"));
317 CoverageInstance::stopChrono((void*)&e); 317 CoverageInstance::stopChrono((void*)&e);
318 throw InternalError(szError, 999, e.getLocation()); 318 throw InternalError(szError, 999, e.getLocation());
319 } 319 }
@@ -331,7 +331,7 @@ void RunVisitorT<T>::visitprivate(const FieldExp &e)
331 if (getResult() == NULL) 331 if (getResult() == NULL)
332 { 332 {
333 char szError[bsiz]; 333 char szError[bsiz];
334 os_sprintf(szError, _("Attempt to reference field of non-structure array.\n")); 334 os_sprintf(szError, bsiz, _("Attempt to reference field of non-structure array.\n"));
335 CoverageInstance::stopChrono((void*)&e); 335 CoverageInstance::stopChrono((void*)&e);
336 throw InternalError(szError, 999, e.getLocation()); 336 throw InternalError(szError, 999, e.getLocation());
337 } 337 }
@@ -343,7 +343,7 @@ void RunVisitorT<T>::visitprivate(const FieldExp &e)
343 { 343 {
344 clearResult(); 344 clearResult();
345 char szError[bsiz]; 345 char szError[bsiz];
346 os_sprintf(szError, _("Not yet implemented in Scilab.\n")); 346 os_sprintf(szError, bsiz, _("Not yet implemented in Scilab.\n"));
347 CoverageInstance::stopChrono((void*)&e); 347 CoverageInstance::stopChrono((void*)&e);
348 throw InternalError(szError, 999, e.getLocation()); 348 throw InternalError(szError, 999, e.getLocation());
349 } 349 }
@@ -463,7 +463,7 @@ void RunVisitorT<T>::visitprivate(const FieldExp &e)
463 { 463 {
464 pValue->killMe(); 464 pValue->killMe();
465 char szError[bsiz]; 465 char szError[bsiz];
466 os_sprintf(szError, _("Attempt to reference field of non-structure array.\n")); 466 os_sprintf(szError, bsiz, _("Attempt to reference field of non-structure array.\n"));
467 CoverageInstance::stopChrono((void*)&e); 467 CoverageInstance::stopChrono((void*)&e);
468 throw InternalError(szError, 999, e.getLocation()); 468 throw InternalError(szError, 999, e.getLocation());
469 } 469 }
@@ -1524,7 +1524,7 @@ void RunVisitorT<T>::visitprivate(const TransposeExp &e)
1524 { 1524 {
1525 clearResult(); 1525 clearResult();
1526 char szError[bsiz]; 1526 char szError[bsiz];
1527 os_sprintf(szError, _("%s: Can not transpose multiple elements.\n"), "Transpose"); 1527 os_sprintf(szError, bsiz, _("%s: Can not transpose multiple elements.\n"), "Transpose");
1528 CoverageInstance::stopChrono((void*)&e); 1528 CoverageInstance::stopChrono((void*)&e);
1529 throw InternalError(szError, 999, e.getLocation()); 1529 throw InternalError(szError, 999, e.getLocation());
1530 } 1530 }
@@ -1623,7 +1623,7 @@ void RunVisitorT<T>::visitprivate(const FunctionDec & e)
1623 { 1623 {
1624 char pstError[1024]; 1624 char pstError[1024];
1625 const char* pstFuncName = e.getSymbol().getName().c_str(); 1625 const char* pstFuncName = e.getSymbol().getName().c_str();
1626 os_sprintf(pstError, _("It is not possible to redefine the %s primitive this way (see clearfun).\n"), pstFuncName); 1626 os_sprintf(pstError, 1024, _("It is not possible to redefine the %s primitive this way (see clearfun).\n"), pstFuncName);
1627 pMacro->killMe(); 1627 pMacro->killMe();
1628 CoverageInstance::stopChrono((void*)&e); 1628 CoverageInstance::stopChrono((void*)&e);
1629 throw InternalError(pstError, 999, e.getLocation()); 1629 throw InternalError(pstError, 999, e.getLocation());
@@ -1652,7 +1652,7 @@ void RunVisitorT<T>::visitprivate(const ListExp &e)
1652 pITStart->killMe(); 1652 pITStart->killMe();
1653 setResult(NULL); 1653 setResult(NULL);
1654 char szError[bsiz]; 1654 char szError[bsiz];
1655 os_sprintf(szError, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 1); 1655 os_sprintf(szError, bsiz, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 1);
1656 CoverageInstance::stopChrono((void*)&e); 1656 CoverageInstance::stopChrono((void*)&e);
1657 throw InternalError(szError, 999, e.getLocation()); 1657 throw InternalError(szError, 999, e.getLocation());
1658 } 1658 }
@@ -1676,7 +1676,7 @@ void RunVisitorT<T>::visitprivate(const ListExp &e)
1676 pITStep->killMe(); 1676 pITStep->killMe();
1677 setResult(NULL); 1677 setResult(NULL);
1678 char szError[bsiz]; 1678 char szError[bsiz];
1679 os_sprintf(szError, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 2); 1679 os_sprintf(szError, bsiz, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 2);
1680 CoverageInstance::stopChrono((void*)&e); 1680 CoverageInstance::stopChrono((void*)&e);
1681 throw InternalError(szError, 999, e.getLocation()); 1681 throw InternalError(szError, 999, e.getLocation());
1682 } 1682 }
@@ -1702,7 +1702,7 @@ void RunVisitorT<T>::visitprivate(const ListExp &e)
1702 pITEnd->killMe(); 1702 pITEnd->killMe();
1703 setResult(NULL); 1703 setResult(NULL);
1704 char szError[bsiz]; 1704 char szError[bsiz];
1705 os_sprintf(szError, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 3); 1705 os_sprintf(szError, bsiz, _("%s: Wrong type for argument %d: Real scalar expected.\n"), "':'", 3);
1706 CoverageInstance::stopChrono((void*)&e); 1706 CoverageInstance::stopChrono((void*)&e);
1707 throw InternalError(szError, 999, e.getLocation()); 1707 throw InternalError(szError, 999, e.getLocation());
1708 } 1708 }
@@ -2144,7 +2144,7 @@ void RunVisitorT<T>::visitprivate(const TryCatchExp &e)
2144 2144
2145 //print msg about recursion limit and trigger an error 2145 //print msg about recursion limit and trigger an error
2146 char sz[1024]; 2146 char sz[1024];
2147 os_sprintf(sz, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit()); 2147 os_sprintf(sz, 1024, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit());
2148 CoverageInstance::stopChrono((void*)&e); 2148 CoverageInstance::stopChrono((void*)&e);
2149 throw ast::InternalError(sz); 2149 throw ast::InternalError(sz);
2150 } 2150 }
diff --git a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
index ba73570..3691a4c 100644
--- a/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
+++ b/scilab/modules/ast/src/cpp/ast/visitor_common.cpp
@@ -1497,7 +1497,7 @@ types::InternalType* evaluateFields(const ast::Exp* _pExp, std::list<ExpHistory*
1497 { 1497 {
1498 char szError[bsiz]; 1498 char szError[bsiz];
1499 const char* strFName = pITCurrent->getAs<types::Callable>()->getName().c_str(); 1499 const char* strFName = pITCurrent->getAs<types::Callable>()->getName().c_str();
1500 os_sprintf(szError, _("Wrong insertion: insertion in output of '%s' is not allowed.\n"), strFName); 1500 os_sprintf(szError, bsiz, _("Wrong insertion: insertion in output of '%s' is not allowed.\n"), strFName);
1501 1501
1502 throw ast::InternalError(szError, 999, pEH->getExp()->getLocation()); 1502 throw ast::InternalError(szError, 999, pEH->getExp()->getLocation());
1503 } 1503 }
diff --git a/scilab/modules/ast/src/cpp/operations/types_addition.cpp b/scilab/modules/ast/src/cpp/operations/types_addition.cpp
index fbaefa4..180e23b 100644
--- a/scilab/modules/ast/src/cpp/operations/types_addition.cpp
+++ b/scilab/modules/ast/src/cpp/operations/types_addition.cpp
@@ -1977,7 +1977,7 @@ template<> InternalType* add_M_M<Polynom, Polynom, Polynom>(Polynom* _pL, Polyno
1977 } 1977 }
1978 1978
1979 char pMsg[bsiz]; 1979 char pMsg[bsiz];
1980 os_sprintf(pMsg, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str()); 1980 os_sprintf(pMsg, bsiz, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str());
1981 throw ast::InternalError(pMsg); 1981 throw ast::InternalError(pMsg);
1982 } 1982 }
1983 } 1983 }
@@ -2193,7 +2193,7 @@ template<> InternalType* add_M_M<Double, Polynom, Polynom>(Double* _pL, Polynom*
2193 if (piDims1[i] != piDims2[i]) 2193 if (piDims1[i] != piDims2[i])
2194 { 2194 {
2195 char pMsg[bsiz]; 2195 char pMsg[bsiz];
2196 os_sprintf(pMsg, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str()); 2196 os_sprintf(pMsg, bsiz, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str());
2197 throw ast::InternalError(pMsg); 2197 throw ast::InternalError(pMsg);
2198 } 2198 }
2199 } 2199 }
diff --git a/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp b/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
index 53be948..86048c7 100644
--- a/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
+++ b/scilab/modules/ast/src/cpp/operations/types_subtraction.cpp
@@ -1936,7 +1936,7 @@ template<> InternalType* sub_M_M<Polynom, Double, Polynom>(Polynom* _pL, Double*
1936 if (piDims1[i] != piDims2[i]) 1936 if (piDims1[i] != piDims2[i])
1937 { 1937 {
1938 char pMsg[bsiz]; 1938 char pMsg[bsiz];
1939 os_sprintf(pMsg, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "-", _pL->DimToString().c_str(), _pR->DimToString().c_str()); 1939 os_sprintf(pMsg, bsiz, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "-", _pL->DimToString().c_str(), _pR->DimToString().c_str());
1940 throw ast::InternalError(pMsg); 1940 throw ast::InternalError(pMsg);
1941 } 1941 }
1942 } 1942 }
@@ -2277,7 +2277,7 @@ template<> InternalType* sub_M_M<Double, Polynom, Polynom>(Double* _pL, Polynom*
2277 if (piDims1[i] != piDims2[i]) 2277 if (piDims1[i] != piDims2[i])
2278 { 2278 {
2279 char pMsg[bsiz]; 2279 char pMsg[bsiz];
2280 os_sprintf(pMsg, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str()); 2280 os_sprintf(pMsg, bsiz, _("Error: operator %s: Matrix dimensions must agree (op1 is %s, op2 is %s).\n"), "+", _pL->DimToString().c_str(), _pR->DimToString().c_str());
2281 throw ast::InternalError(pMsg); 2281 throw ast::InternalError(pMsg);
2282 } 2282 }
2283 } 2283 }
diff --git a/scilab/modules/ast/src/cpp/parse/parser.cpp b/scilab/modules/ast/src/cpp/parse/parser.cpp
index 32ea664..d30bfe1 100644
--- a/scilab/modules/ast/src/cpp/parse/parser.cpp
+++ b/scilab/modules/ast/src/cpp/parse/parser.cpp
@@ -93,7 +93,7 @@ void ParserSingleInstance::parseFile(const std::string& fileName, const std::str
93 if (!yyin) 93 if (!yyin)
94 { 94 {
95 char szError[bsiz]; 95 char szError[bsiz];
96 os_sprintf(szError, _("%s: Cannot open file %s.\n"), "parser", fileName.c_str()); 96 os_sprintf(szError, bsiz, _("%s: Cannot open file %s.\n"), "parser", fileName.c_str());
97 throw ast::InternalError(szError); 97 throw ast::InternalError(szError);
98 } 98 }
99 99
@@ -162,7 +162,7 @@ void ParserSingleInstance::parse(const char *command)
162#ifdef _MSC_VER 162#ifdef _MSC_VER
163 char szFile[MAX_PATH]; 163 char szFile[MAX_PATH];
164 char* pstTmpDIr = getTMPDIR(); 164 char* pstTmpDIr = getTMPDIR();
165 os_sprintf(szFile, "%s\\%s", pstTmpDIr, "command.temp"); 165 os_sprintf(szFile, MAX_PATH, "%s\\%s", pstTmpDIr, "command.temp");
166 FREE(pstTmpDIr); 166 FREE(pstTmpDIr);
167 if (fileLocker) 167 if (fileLocker)
168 { 168 {
@@ -177,7 +177,7 @@ void ParserSingleInstance::parse(const char *command)
177 ParserSingleInstance::setExitStatus(Parser::Failed); 177 ParserSingleInstance::setExitStatus(Parser::Failed);
178 ParserSingleInstance::resetErrorMessage(); 178 ParserSingleInstance::resetErrorMessage();
179 char szError[bsiz]; 179 char szError[bsiz];
180 os_sprintf(szError, _("%s: Cannot open file %s.\n"), "parser", szFile); 180 os_sprintf(szError, bsiz, _("%s: Cannot open file %s.\n"), "parser", szFile);
181 appendErrorMessage(szError); 181 appendErrorMessage(szError);
182 return; 182 return;
183 } 183 }
diff --git a/scilab/modules/ast/src/cpp/symbol/context.cpp b/scilab/modules/ast/src/cpp/symbol/context.cpp
index d219183..13b0ed9 100644
--- a/scilab/modules/ast/src/cpp/symbol/context.cpp
+++ b/scilab/modules/ast/src/cpp/symbol/context.cpp
@@ -276,7 +276,7 @@ int Context::getConsoleVarsName(std::list<std::string>& lst)
276{ 276{
277 if (console) 277 if (console)
278 { 278 {
279 for (const auto& var : *console) 279 for (const auto & var : *console)
280 { 280 {
281 lst.push_back(var.first.getName()); 281 lst.push_back(var.first.getName());
282 } 282 }
@@ -513,10 +513,10 @@ void Context::print(std::ostream& ostr, bool sorted) const
513 iCurrentWidth += iVarLenMax + 1; 513 iCurrentWidth += iVarLenMax + 1;
514 } 514 }
515 515
516 os_sprintf(varElem, _(" using %10d elements out of %10d.\n"), iMemUsed, iMemTotal); 516 os_sprintf(varElem, strSize, _(" using %10d elements out of %10d.\n"), iMemUsed, iMemTotal);
517 ostr << std::endl << varElem; 517 ostr << std::endl << varElem;
518 518
519 os_sprintf(varVariable, _(" and %10d variables out of %10d.\n"), lstVar.size(), nbMaxVar); 519 os_sprintf(varVariable, strSize, _(" and %10d variables out of %10d.\n"), lstVar.size(), nbMaxVar);
520 ostr << varVariable << std::endl; 520 ostr << varVariable << std::endl;
521 521
522 ostr << std::endl << _("Your global variables are:") << std::endl << std::endl; 522 ostr << std::endl << _("Your global variables are:") << std::endl << std::endl;
@@ -532,10 +532,10 @@ void Context::print(std::ostream& ostr, bool sorted) const
532 532
533 ostr << std::endl; 533 ostr << std::endl;
534 534
535 os_sprintf(globalElem, _(" using %10d elements out of %10d.\n"), iMemUsed, iMemTotal); 535 os_sprintf(globalElem, strSize, _(" using %10d elements out of %10d.\n"), iMemUsed, iMemTotal);
536 ostr << std::endl << globalElem; 536 ostr << std::endl << globalElem;
537 537
538 os_sprintf(globalVariable, _(" and %10d variables out of %10d.\n"), lstGlobal.size(), nbMaxVar); 538 os_sprintf(globalVariable, strSize, _(" and %10d variables out of %10d.\n"), lstGlobal.size(), nbMaxVar);
539 ostr << globalVariable; 539 ostr << globalVariable;
540} 540}
541 541
diff --git a/scilab/modules/ast/src/cpp/system_env/configvariable.cpp b/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
index c8fed5f..81933a8 100644
--- a/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
+++ b/scilab/modules/ast/src/cpp/system_env/configvariable.cpp
@@ -1257,19 +1257,19 @@ void ConfigVariable::whereErrorToString(std::ostringstream &ostr)
1257 if (where.m_name == "execstr") 1257 if (where.m_name == "execstr")
1258 { 1258 {
1259 isExecstr = true; 1259 isExecstr = true;
1260 os_sprintf(csTmp, strExecStr.c_str(), where.m_line); 1260 os_sprintf(csTmp, bsiz, strExecStr.c_str(), where.m_line);
1261 ostr << csTmp << std::endl; 1261 ostr << csTmp << std::endl;
1262 continue; 1262 continue;
1263 } 1263 }
1264 else if (where.m_name == "exec") 1264 else if (where.m_name == "exec")
1265 { 1265 {
1266 os_sprintf(csTmp, strExecFile.c_str(), where.m_line); 1266 os_sprintf(csTmp, bsiz, strExecFile.c_str(), where.m_line);
1267 ostr << csTmp << where.m_file_name << std::endl; 1267 ostr << csTmp << where.m_file_name << std::endl;
1268 continue; 1268 continue;
1269 } 1269 }
1270 else 1270 else
1271 { 1271 {
1272 os_sprintf(csTmp, strAtLine.c_str(), where.m_line); 1272 os_sprintf(csTmp, bsiz, strAtLine.c_str(), where.m_line);
1273 ostr << csTmp; 1273 ostr << csTmp;
1274 } 1274 }
1275 } 1275 }
diff --git a/scilab/modules/ast/src/cpp/system_env/sci_home.cpp b/scilab/modules/ast/src/cpp/system_env/sci_home.cpp
index bf9acce..28c9b02 100644
--- a/scilab/modules/ast/src/cpp/system_env/sci_home.cpp
+++ b/scilab/modules/ast/src/cpp/system_env/sci_home.cpp
@@ -119,8 +119,8 @@ char* computeSCIHOME(void)
119 } 119 }
120 120
121 /* Set SCIHOME environment variable */ 121 /* Set SCIHOME environment variable */
122 os_sprintf(USERPATHSCILAB, "%s%s%s", USERHOMESYSTEM, DIR_SEPARATOR, BASEDIR); 122 os_sprintf(USERPATHSCILAB, PATH_MAX, "%s%s%s", USERHOMESYSTEM, DIR_SEPARATOR, BASEDIR);
123 os_sprintf(SCIHOMEPATH, "%s%s%s", USERPATHSCILAB, DIR_SEPARATOR, SCI_VERSION_STRING); 123 os_sprintf(SCIHOMEPATH, PATH_MAX * 2, "%s%s%s", USERPATHSCILAB, DIR_SEPARATOR, SCI_VERSION_STRING);
124 124
125 /* creates directory if it does not exists */ 125 /* creates directory if it does not exists */
126 if (!isdir(SCIHOMEPATH)) 126 if (!isdir(SCIHOMEPATH))
diff --git a/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp b/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
index 98ab9e9..594321a 100644
--- a/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
+++ b/scilab/modules/ast/src/cpp/system_env/sci_tmpdir.cpp
@@ -108,7 +108,7 @@ char* computeTMPDIR()
108 char tmp_dir[PATH_MAX + FILENAME_MAX + 1]; 108 char tmp_dir[PATH_MAX + FILENAME_MAX + 1];
109 static char bufenv[PATH_MAX + 16]; 109 static char bufenv[PATH_MAX + 16];
110 char *TmpDir = NULL; 110 char *TmpDir = NULL;
111 os_sprintf(tmp_dir, "%sSCI_TMP_%d_", tmpDirDefault, _getpid()); 111 os_sprintf(tmp_dir, PATH_MAX + FILENAME_MAX + 1, "%sSCI_TMP_%d_", tmpDirDefault, _getpid());
112 if (CreateDirectoryA(tmp_dir, NULL) == FALSE) 112 if (CreateDirectoryA(tmp_dir, NULL) == FALSE)
113 { 113 {
114 DWORD attribs = GetFileAttributesA(tmp_dir); 114 DWORD attribs = GetFileAttributesA(tmp_dir);
@@ -121,7 +121,7 @@ char* computeTMPDIR()
121#ifdef _DEBUG 121#ifdef _DEBUG
122 { 122 {
123 char MsgErr[1024]; 123 char MsgErr[1024];
124 os_sprintf(MsgErr, _("Impossible to create : %s"), tmp_dir); 124 os_sprintf(MsgErr, 1024, _("Impossible to create : %s"), tmp_dir);
125 MessageBoxA(NULL, MsgErr, _("Error"), MB_ICONERROR); 125 MessageBoxA(NULL, MsgErr, _("Error"), MB_ICONERROR);
126 exit(1); 126 exit(1);
127 } 127 }
@@ -135,7 +135,7 @@ char* computeTMPDIR()
135 } 135 }
136 } 136 }
137 137
138 os_sprintf(bufenv, "TMPDIR=%s", tmp_dir); 138 os_sprintf(bufenv, PATH_MAX + 16, "TMPDIR=%s", tmp_dir);
139 _putenv(bufenv); 139 _putenv(bufenv);
140 140
141 return os_strdup(tmp_dir); 141 return os_strdup(tmp_dir);
diff --git a/scilab/modules/ast/src/cpp/types/function.cpp b/scilab/modules/ast/src/cpp/types/function.cpp
index ea1755a..4e68246 100644
--- a/scilab/modules/ast/src/cpp/types/function.cpp
+++ b/scilab/modules/ast/src/cpp/types/function.cpp
@@ -576,11 +576,7 @@ Callable::ReturnValue DynamicFunction::Init()
576 /* Build the full path to the library */ 576 /* Build the full path to the library */
577 int iPathToLibLen = (strlen(pstScilabPath) + strlen(pstModulesPath) + strlen(m_stModule.c_str()) + strlen("/") + strlen(pstLTDir) + strlen(m_libName.c_str()) + 1); 577 int iPathToLibLen = (strlen(pstScilabPath) + strlen(pstModulesPath) + strlen(m_stModule.c_str()) + strlen("/") + strlen(pstLTDir) + strlen(m_libName.c_str()) + 1);
578 char* pstPathToLib = (char*)MALLOC(iPathToLibLen * sizeof(char)); 578 char* pstPathToLib = (char*)MALLOC(iPathToLibLen * sizeof(char));
579#ifdef _MSC_VER
580 os_sprintf(pstPathToLib, iPathToLibLen, "%s%s%s/%s%s", pstScilabPath, pstModulesPath, m_stModule.c_str(), pstLTDir, m_libName.c_str()); 579 os_sprintf(pstPathToLib, iPathToLibLen, "%s%s%s/%s%s", pstScilabPath, pstModulesPath, m_stModule.c_str(), pstLTDir, m_libName.c_str());
581#else
582 os_sprintf(pstPathToLib, "%s%s%s/%s%s", pstScilabPath, pstModulesPath, m_stModule.c_str(), pstLTDir, m_libName.c_str());
583#endif
584 FREE(pstScilabPath); 580 FREE(pstScilabPath);
585 hLib = LoadDynLibrary(pstPathToLib); 581 hLib = LoadDynLibrary(pstPathToLib);
586 582
diff --git a/scilab/modules/ast/src/cpp/types/library.cpp b/scilab/modules/ast/src/cpp/types/library.cpp
index 7ba5646..20a0e46 100644
--- a/scilab/modules/ast/src/cpp/types/library.cpp
+++ b/scilab/modules/ast/src/cpp/types/library.cpp
@@ -54,7 +54,7 @@ Library::~Library()
54bool Library::toString(std::ostringstream& ostr) 54bool Library::toString(std::ostringstream& ostr)
55{ 55{
56 char output[1024] = {0}; 56 char output[1024] = {0};
57 os_sprintf(output, _("Functions files location : %s.\n"), m_path.c_str()); 57 os_sprintf(output, 1024, _("Functions files location : %s.\n"), m_path.c_str());
58 58
59 ostr << output << std::endl; 59 ostr << output << std::endl;
60 60
@@ -89,7 +89,7 @@ bool Library::extract(const std::string & name, InternalType *& out)
89 if (out == NULL) 89 if (out == NULL)
90 { 90 {
91 char szError[bsiz]; 91 char szError[bsiz];
92 os_sprintf(szError, _("Unknown field : %s.\n"), name.c_str()); 92 os_sprintf(szError, bsiz, _("Unknown field : %s.\n"), name.c_str());
93 throw std::string(szError); 93 throw std::string(szError);
94 } 94 }
95 95
diff --git a/scilab/modules/ast/src/cpp/types/overload.cpp b/scilab/modules/ast/src/cpp/types/overload.cpp
index 4ae2075..cdb60b0 100644
--- a/scilab/modules/ast/src/cpp/types/overload.cpp
+++ b/scilab/modules/ast/src/cpp/types/overload.cpp
@@ -85,13 +85,13 @@ types::Function::ReturnValue Overload::call(const std::string& _stOverloadingFun
85 char pstError2[512]; 85 char pstError2[512];
86 if (_isOperator) 86 if (_isOperator)
87 { 87 {
88 os_sprintf(pstError2, _("check or define function %s for overloading.\n"), _stOverloadingFunctionName.c_str()); 88 os_sprintf(pstError2, 512, _("check or define function %s for overloading.\n"), _stOverloadingFunctionName.c_str());
89 os_sprintf(pstError1, "%s%s", _("Undefined operation for the given operands.\n"), pstError2); 89 os_sprintf(pstError1, 512, "%s%s", _("Undefined operation for the given operands.\n"), pstError2);
90 } 90 }
91 else 91 else
92 { 92 {
93 os_sprintf(pstError2, _(" check arguments or define function %s for overloading.\n"), _stOverloadingFunctionName.c_str()); 93 os_sprintf(pstError2, 512, _(" check arguments or define function %s for overloading.\n"), _stOverloadingFunctionName.c_str());
94 os_sprintf(pstError1, "%s%s", _("Function not defined for given argument type(s),\n"), pstError2); 94 os_sprintf(pstError1, 512, "%s%s", _("Function not defined for given argument type(s),\n"), pstError2);
95 } 95 }
96 96
97 ast::InternalError ie(pstError1); 97 ast::InternalError ie(pstError1);
@@ -145,7 +145,7 @@ std::string Overload::getNameFromOper(const int _oper)
145{ 145{
146 switch (_oper) 146 switch (_oper)
147 { 147 {
148 /* standard operators */ 148 /* standard operators */
149 case ast::OpExp::plus : 149 case ast::OpExp::plus :
150 return "a"; 150 return "a";
151 case ast::OpExp::unaryMinus : 151 case ast::OpExp::unaryMinus :
@@ -159,7 +159,7 @@ std::string Overload::getNameFromOper(const int _oper)
159 return "l"; 159 return "l";
160 case ast::OpExp::power : 160 case ast::OpExp::power :
161 return "p"; 161 return "p";
162 /* dot operators */ 162 /* dot operators */
163 case ast::OpExp::dottimes : 163 case ast::OpExp::dottimes :
164 return "x"; 164 return "x";
165 case ast::OpExp::dotrdivide : 165 case ast::OpExp::dotrdivide :
@@ -168,14 +168,14 @@ std::string Overload::getNameFromOper(const int _oper)
168 return "q"; 168 return "q";
169 case ast::OpExp::dotpower : 169 case ast::OpExp::dotpower :
170 return "j"; 170 return "j";
171 /* Kron operators */ 171 /* Kron operators */
172 case ast::OpExp::krontimes : 172 case ast::OpExp::krontimes :
173 return "k"; 173 return "k";
174 case ast::OpExp::kronrdivide : 174 case ast::OpExp::kronrdivide :
175 return "y"; 175 return "y";
176 case ast::OpExp::kronldivide : 176 case ast::OpExp::kronldivide :
177 return "z"; 177 return "z";
178 /* Control Operators ??? */ 178 /* Control Operators ??? */
179 case ast::OpExp::controltimes : 179 case ast::OpExp::controltimes :
180 return "u"; 180 return "u";
181 case ast::OpExp::controlrdivide : 181 case ast::OpExp::controlrdivide :
diff --git a/scilab/modules/ast/src/cpp/types/polynom.cpp b/scilab/modules/ast/src/cpp/types/polynom.cpp
index 872b60d..ad71e7b 100644
--- a/scilab/modules/ast/src/cpp/types/polynom.cpp
+++ b/scilab/modules/ast/src/cpp/types/polynom.cpp
@@ -1026,7 +1026,7 @@ Polynom* Polynom::insert(typed_list* _pArgs, InternalType* _pSource)
1026 if (p->getVariableName() != getVariableName()) 1026 if (p->getVariableName() != getVariableName())
1027 { 1027 {
1028 char szError[512]; 1028 char szError[512];
1029 os_sprintf(szError, _("Input arguments should have the same formal variable name.\n")); 1029 os_sprintf(szError, 512, _("Input arguments should have the same formal variable name.\n"));
1030 throw ast::InternalError(szError); 1030 throw ast::InternalError(szError);
1031 } 1031 }
1032 1032
diff --git a/scilab/modules/ast/src/cpp/types/singlepoly.cpp b/scilab/modules/ast/src/cpp/types/singlepoly.cpp
index 00dd6ef..ef3d5ac 100644
--- a/scilab/modules/ast/src/cpp/types/singlepoly.cpp
+++ b/scilab/modules/ast/src/cpp/types/singlepoly.cpp
@@ -103,7 +103,7 @@ double* SinglePoly::allocData(int _iSize)
103 m_pRealData = NULL; 103 m_pRealData = NULL;
104 m_pImgData = NULL; 104 m_pImgData = NULL;
105 char message[bsiz]; 105 char message[bsiz];
106 os_sprintf(message, _("Can not allocate negative size (%d).\n"), _iSize); 106 os_sprintf(message, bsiz, _("Can not allocate negative size (%d).\n"), _iSize);
107 throw ast::InternalError(message); 107 throw ast::InternalError(message);
108 } 108 }
109 else 109 else
@@ -114,7 +114,7 @@ double* SinglePoly::allocData(int _iSize)
114 catch (std::bad_alloc &/*e*/) 114 catch (std::bad_alloc &/*e*/)
115 { 115 {
116 char message[bsiz]; 116 char message[bsiz];
117 os_sprintf(message, _("Can not allocate %.2f MB memory.\n"), (double) (_iSize * sizeof(double)) / 1.e6); 117 os_sprintf(message, bsiz, _("Can not allocate %.2f MB memory.\n"), (double) (_iSize * sizeof(double)) / 1.e6);
118 throw ast::InternalError(message); 118 throw ast::InternalError(message);
119 } 119 }
120 120
diff --git a/scilab/modules/ast/src/cpp/types/string.cpp b/scilab/modules/ast/src/cpp/types/string.cpp
index c0a733f..c6e2886 100644
--- a/scilab/modules/ast/src/cpp/types/string.cpp
+++ b/scilab/modules/ast/src/cpp/types/string.cpp
@@ -544,7 +544,7 @@ char* String::copyValue(char* _pstData)
544 catch (std::bad_alloc & /*e*/) 544 catch (std::bad_alloc & /*e*/)
545 { 545 {
546 char message[bsiz]; 546 char message[bsiz];
547 os_sprintf(message, _("Can not allocate data.\n")); 547 os_sprintf(message, bsiz, _("Can not allocate data.\n"));
548 throw ast::InternalError(message); 548 throw ast::InternalError(message);
549 } 549 }
550 550
@@ -623,7 +623,7 @@ char** String::allocData(int _iSize)
623 catch (std::bad_alloc & /*e*/) 623 catch (std::bad_alloc & /*e*/)
624 { 624 {
625 char message[bsiz]; 625 char message[bsiz];
626 os_sprintf(message, _("Can not allocate %.2f MB memory.\n"), (double)(_iSize * sizeof(char*)) / 1.e6); 626 os_sprintf(message, bsiz, _("Can not allocate %.2f MB memory.\n"), (double)(_iSize * sizeof(char*)) / 1.e6);
627 throw ast::InternalError(message); 627 throw ast::InternalError(message);
628 } 628 }
629 return pStr; 629 return pStr;
diff --git a/scilab/modules/ast/src/cpp/types/struct.cpp b/scilab/modules/ast/src/cpp/types/struct.cpp
index 7965aad..6526cf6 100644
--- a/scilab/modules/ast/src/cpp/types/struct.cpp
+++ b/scilab/modules/ast/src/cpp/types/struct.cpp
@@ -143,7 +143,7 @@ bool Struct::extract(const std::string & name, InternalType *& out)
143 else 143 else
144 { 144 {
145 char szError[bsiz]; 145 char szError[bsiz];
146 os_sprintf(szError, _("Unknown field : %s.\n"), name.c_str()); 146 os_sprintf(szError, bsiz, _("Unknown field : %s.\n"), name.c_str());
147 throw std::string(szError); 147 throw std::string(szError);
148 } 148 }
149 149
@@ -175,7 +175,7 @@ bool Struct::invoke(typed_list & in, optional_list & opt, int _iRetCount, typed_
175 else 175 else
176 { 176 {
177 char szError[bsiz]; 177 char szError[bsiz];
178 os_sprintf(szError, _("Field \"%s\" does not exists\n"), stField.c_str()); 178 os_sprintf(szError, bsiz, _("Field \"%s\" does not exists\n"), stField.c_str());
179 throw ast::InternalError(szError, 999, e.getLocation()); 179 throw ast::InternalError(szError, 999, e.getLocation());
180 } 180 }
181 } 181 }
diff --git a/scilab/modules/ast/src/cpp/types/tostring_common.cpp b/scilab/modules/ast/src/cpp/types/tostring_common.cpp
index 62719e2..377371b 100644
--- a/scilab/modules/ast/src/cpp/types/tostring_common.cpp
+++ b/scilab/modules/ast/src/cpp/types/tostring_common.cpp
@@ -243,17 +243,17 @@ void addDoubleValue(std::ostringstream * _postr, double _dblVal, DoubleFormat *
243 } 243 }
244 } 244 }
245 245
246 os_sprintf(pstSign, "%s%s%s", pBlank, pSign, pBlank); 246 os_sprintf(pstSign, 32, "%s%s%s", pBlank, pSign, pBlank);
247 247
248 if (ISNAN(_dblVal)) 248 if (ISNAN(_dblVal))
249 { 249 {
250 //NaN 250 //NaN
251 os_sprintf(pstOutput, "%s%*s", pstSign, _pDF->iPrec, "Nan"); 251 os_sprintf(pstOutput, 32, "%s%*s", pstSign, _pDF->iPrec, "Nan");
252 } 252 }
253 else if (!finite(_dblVal)) 253 else if (!finite(_dblVal))
254 { 254 {
255 //Inf 255 //Inf
256 os_sprintf(pstOutput, "%s%*s", pstSign, _pDF->iPrec, "Inf"); 256 os_sprintf(pstOutput, 32, "%s%*s", pstSign, _pDF->iPrec, "Inf");
257 } 257 }
258 else if (_pDF->bExp) 258 else if (_pDF->bExp)
259 { 259 {
@@ -277,11 +277,11 @@ void addDoubleValue(std::ostringstream * _postr, double _dblVal, DoubleFormat *
277 277
278 if (_pDF->bPrintPoint) 278 if (_pDF->bPrintPoint)
279 { 279 {
280 os_sprintf(pstFormat, "%s%%#d.%%0%ddD%%+.02d", pstSign, _pDF->iPrec); 280 os_sprintf(pstFormat, 32, "%s%%#d.%%0%ddD%%+.02d", pstSign, _pDF->iPrec);
281 } 281 }
282 else 282 else
283 { 283 {
284 os_sprintf(pstFormat, "%s%%d%%0%ddD%%+.02d", pstSign, _pDF->iPrec); 284 os_sprintf(pstFormat, 32, "%s%%d%%0%ddD%%+.02d", pstSign, _pDF->iPrec);
285 } 285 }
286 286
287 if ((int)std::round(dblDec) != (int)dblDec) 287 if ((int)std::round(dblDec) != (int)dblDec)
@@ -297,25 +297,25 @@ void addDoubleValue(std::ostringstream * _postr, double _dblVal, DoubleFormat *
297 dblDec = d1; 297 dblDec = d1;
298 } 298 }
299 299
300 os_sprintf(pstOutput, pstFormat, (int)dblEnt, (int)dblDec, (int)dblTemp); 300 os_sprintf(pstOutput, 32, pstFormat, (int)dblEnt, (int)dblDec, (int)dblTemp);
301 } 301 }
302 else if ((_pDF->bPrintOne == true) || (isEqual(fabs(_dblVal), 1)) == false) 302 else if ((_pDF->bPrintOne == true) || (isEqual(fabs(_dblVal), 1)) == false)
303 { 303 {
304 //do not print if _bPrintOne == false && _dblVal == 1 304 //do not print if _bPrintOne == false && _dblVal == 1
305 if (_pDF->bPrintPoint) 305 if (_pDF->bPrintPoint)
306 { 306 {
307 os_sprintf(pstFormat, "%s%%#-%d.%df", pstSign, _pDF->iWidth - 1, _pDF->iPrec); 307 os_sprintf(pstFormat, 32, "%s%%#-%d.%df", pstSign, _pDF->iWidth - 1, _pDF->iPrec);
308 } 308 }
309 else 309 else
310 { 310 {
311 os_sprintf(pstFormat, "%s%%-%d.%df", pstSign, _pDF->iWidth - 2, _pDF->iPrec); //-2 no point needed 311 os_sprintf(pstFormat, 32, "%s%%-%d.%df", pstSign, _pDF->iWidth - 2, _pDF->iPrec); //-2 no point needed
312 } 312 }
313 313
314 os_sprintf(pstOutput, pstFormat, fabs(_dblVal)); 314 os_sprintf(pstOutput, 32, pstFormat, fabs(_dblVal));
315 } 315 }
316 else if (strlen(pstSign) != 0) 316 else if (strlen(pstSign) != 0)
317 { 317 {
318 os_sprintf(pstOutput, "%s", pstSign); 318 os_sprintf(pstOutput, 32, "%s", pstSign);
319 } 319 }
320 320
321 *_postr << pstOutput; 321 *_postr << pstOutput;
diff --git a/scilab/modules/ast/src/cpp/types/types_tools.cpp b/scilab/modules/ast/src/cpp/types/types_tools.cpp
index 479cdfc..1663b63 100644
--- a/scilab/modules/ast/src/cpp/types/types_tools.cpp
+++ b/scilab/modules/ast/src/cpp/types/types_tools.cpp
@@ -62,7 +62,7 @@ double getIndex(InternalType* val)
62{ 62{
63 switch (val->getType()) 63 switch (val->getType())
64 { 64 {
65 //scalar 65 //scalar
66 case InternalType::ScilabDouble: 66 case InternalType::ScilabDouble:
67 { 67 {
68 return getIndex(val->getAs<Double>()); 68 return getIndex(val->getAs<Double>());
@@ -669,7 +669,7 @@ int checkIndexesArguments(InternalType* _pRef, typed_list* _pArgsIn, typed_list*
669 if (pCurrentArg->get(j) >= INT_MAX) 669 if (pCurrentArg->get(j) >= INT_MAX)
670 { 670 {
671 char szError[bsiz]; 671 char szError[bsiz];
672 os_sprintf(szError, _("variable size exceeded : less than %d expected.\n"), INT_MAX); 672 os_sprintf(szError, bsiz, _("variable size exceeded : less than %d expected.\n"), INT_MAX);
673 throw ast::InternalError(szError); 673 throw ast::InternalError(szError);
674 } 674 }
675 675
@@ -689,7 +689,7 @@ int checkIndexesArguments(InternalType* _pRef, typed_list* _pArgsIn, typed_list*
689 else 689 else
690 { 690 {
691 char szError[bsiz]; 691 char szError[bsiz];
692 os_sprintf(szError, _("Invalid index.\n")); 692 os_sprintf(szError, bsiz, _("Invalid index.\n"));
693 693
694 delete[] _piMaxDim; 694 delete[] _piMaxDim;
695 delete[] _piCountDim; 695 delete[] _piCountDim;
diff --git a/scilab/modules/completion/src/c/completeLine.c b/scilab/modules/completion/src/c/completeLine.c
index c61dd03..60f5e89 100644
--- a/scilab/modules/completion/src/c/completeLine.c
+++ b/scilab/modules/completion/src/c/completeLine.c
@@ -68,7 +68,7 @@ static int findMatchingPrefixSuffix(const char* string, const char* find, BOOL s
68 movingPointerOnFindCopy[0] = '\0'; 68 movingPointerOnFindCopy[0] = '\0';
69 //Check if the cutted tmpfind match with the suffix of string that has adequat length 69 //Check if the cutted tmpfind match with the suffix of string that has adequat length
70 pointerOnString = (char*)(string + stringLength - 1 - strlen(pointerOnFindCopy)); 70 pointerOnString = (char*)(string + stringLength - 1 - strlen(pointerOnFindCopy));
71 if ( !strnicmp(pointerOnFindCopy, pointerOnString, strlen(pointerOnFindCopy)) ) 71 if ( !os_strnicmp(pointerOnFindCopy, pointerOnString, strlen(pointerOnFindCopy)) )
72 { 72 {
73 FREE(pointerOnFindCopy); 73 FREE(pointerOnFindCopy);
74 pointerOnFindCopy = NULL; 74 pointerOnFindCopy = NULL;
diff --git a/scilab/modules/completion/src/c/completion_generic.c b/scilab/modules/completion/src/c/completion_generic.c
index cdeefa5..262cba3 100644
--- a/scilab/modules/completion/src/c/completion_generic.c
+++ b/scilab/modules/completion/src/c/completion_generic.c
@@ -25,7 +25,7 @@ char **completion_generic(char **dictionary, int sizedictionary,
25 { 25 {
26 if (dictionary[i]) 26 if (dictionary[i])
27 { 27 {
28 if ( strnicmp(dictionary[i], somechars, strlen(somechars)) == 0) 28 if ( os_strnicmp(dictionary[i], somechars, strlen(somechars)) == 0)
29 { 29 {
30 nbElements++; 30 nbElements++;
31 /* +1 in MALLOC because a NULL element is inserted at the end of the array */ 31 /* +1 in MALLOC because a NULL element is inserted at the end of the array */
diff --git a/scilab/modules/console/src/c/dropFiles.c b/scilab/modules/console/src/c/dropFiles.c
index e4d9e4f..50a7ed7 100644
--- a/scilab/modules/console/src/c/dropFiles.c
+++ b/scilab/modules/console/src/c/dropFiles.c
@@ -109,16 +109,16 @@ static char *getCommandByFileExtension(char *File, char *FileExtension)
109 109
110 if (FileExtension) 110 if (FileExtension)
111 { 111 {
112 if ( (stricmp(FileExtension, BIN_EXTENSION_FILE) == 0) || 112 if ( (os_stricmp(FileExtension, BIN_EXTENSION_FILE) == 0) ||
113 (stricmp(FileExtension, SAV_EXTENSION_FILE) == 0) || 113 (os_stricmp(FileExtension, SAV_EXTENSION_FILE) == 0) ||
114 (stricmp(FileExtension, SOD_EXTENSION_FILE) == 0)) 114 (os_stricmp(FileExtension, SOD_EXTENSION_FILE) == 0))
115 { 115 {
116 command = buildCommand(FORMAT_BIN_SCE_EXTENSION_FILES, File); 116 command = buildCommand(FORMAT_BIN_SCE_EXTENSION_FILES, File);
117 } 117 }
118 else if ( (stricmp(FileExtension, COS_EXTENSION_FILE) == 0) || 118 else if ( (os_stricmp(FileExtension, COS_EXTENSION_FILE) == 0) ||
119 (stricmp(FileExtension, COSF_EXTENSION_FILE) == 0) || 119 (os_stricmp(FileExtension, COSF_EXTENSION_FILE) == 0) ||
120 (stricmp(FileExtension, ZCOS_EXTENSION_FILE) == 0) || 120 (os_stricmp(FileExtension, ZCOS_EXTENSION_FILE) == 0) ||
121 (stricmp(FileExtension, XCOS_EXTENSION_FILE) == 0)) 121 (os_stricmp(FileExtension, XCOS_EXTENSION_FILE) == 0))
122 { 122 {
123 if (with_module("xcos")) 123 if (with_module("xcos"))
124 { 124 {
@@ -129,15 +129,15 @@ static char *getCommandByFileExtension(char *File, char *FileExtension)
129 command = os_strdup(XCOS_NOT_INSTALLED); 129 command = os_strdup(XCOS_NOT_INSTALLED);
130 } 130 }
131 } 131 }
132 else if (stricmp(FileExtension, SCI_EXTENSION_FILE) == 0) 132 else if (os_stricmp(FileExtension, SCI_EXTENSION_FILE) == 0)
133 { 133 {
134 command = buildCommand(FORMAT_SCI_EXTENSION_FILES, File); 134 command = buildCommand(FORMAT_SCI_EXTENSION_FILES, File);
135 } 135 }
136 else if ( (stricmp(FileExtension, SCE_EXTENSION_FILE) == 0) || (stricmp(FileExtension, TST_EXTENSION_FILE) == 0) || (stricmp(FileExtension, DEM_EXTENSION_FILE) == 0) ) 136 else if ( (os_stricmp(FileExtension, SCE_EXTENSION_FILE) == 0) || (os_stricmp(FileExtension, TST_EXTENSION_FILE) == 0) || (os_stricmp(FileExtension, DEM_EXTENSION_FILE) == 0) )
137 { 137 {
138 command = buildCommand(FORMAT_SCE_TST_EXTENSION_FILES, File); 138 command = buildCommand(FORMAT_SCE_TST_EXTENSION_FILES, File);
139 } 139 }
140 else if (stricmp(FileExtension, SCG_EXTENSION_FILE) == 0) 140 else if (os_stricmp(FileExtension, SCG_EXTENSION_FILE) == 0)
141 { 141 {
142 command = buildCommand(FORMAT_SCG_EXTENSION_FILES, File); 142 command = buildCommand(FORMAT_SCG_EXTENSION_FILES, File);
143 } 143 }
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_intppty.cpp b/scilab/modules/core/sci_gateway/cpp/sci_intppty.cpp
index 61d4170..80273ac 100644
--- a/scilab/modules/core/sci_gateway/cpp/sci_intppty.cpp
+++ b/scilab/modules/core/sci_gateway/cpp/sci_intppty.cpp
@@ -42,11 +42,11 @@ types::Function::ReturnValue sci_intppty(types::typed_list &in, int _iRetCount,
42 } 42 }
43 43
44 types::String* pMode = in[1]->getAs<types::String>(); 44 types::String* pMode = in[1]->getAs<types::String>();
45 if (stricmp(pMode->get(0), "add") == 0) 45 if (os_stricmp(pMode->get(0), "add") == 0)
46 { 46 {
47 bAdd = true; 47 bAdd = true;
48 } 48 }
49 else if (stricmp(pMode->get(0), "remove") == 0) 49 else if (os_stricmp(pMode->get(0), "remove") == 0)
50 { 50 {
51 bAdd = false; 51 bAdd = false;
52 } 52 }
diff --git a/scilab/modules/core/src/c/InitializePreferences.c b/scilab/modules/core/src/c/InitializePreferences.c
index 3dbd8aa..9ed65ff 100644
--- a/scilab/modules/core/src/c/InitializePreferences.c
+++ b/scilab/modules/core/src/c/InitializePreferences.c
@@ -46,7 +46,7 @@ void InitializePreferences(int useCWD)
46 // Set history 46 // Set history
47 if (prefs->historyEnable) 47 if (prefs->historyEnable)
48 { 48 {
49 if (!stricmp(prefs->historyEnable, "true")) 49 if (!os_stricmp(prefs->historyEnable, "true"))
50 { 50 {
51 if (prefs->historyFile && prefs->historyLines) 51 if (prefs->historyFile && prefs->historyLines)
52 { 52 {
@@ -69,7 +69,7 @@ void InitializePreferences(int useCWD)
69 // Set lines 69 // Set lines
70 if (prefs->adaptToDisplay && prefs->columnsToDisplay && prefs->linesToDisplay) 70 if (prefs->adaptToDisplay && prefs->columnsToDisplay && prefs->linesToDisplay)
71 { 71 {
72 if (stricmp(prefs->adaptToDisplay, "true")) 72 if (os_stricmp(prefs->adaptToDisplay, "true"))
73 { 73 {
74 // it is not true so ... 74 // it is not true so ...
75 int lines = (int)atof(prefs->linesToDisplay); 75 int lines = (int)atof(prefs->linesToDisplay);
@@ -82,14 +82,14 @@ void InitializePreferences(int useCWD)
82 // Set current directory 82 // Set current directory
83 if (!useCWD && prefs->startup_dir_use) 83 if (!useCWD && prefs->startup_dir_use)
84 { 84 {
85 if (stricmp(prefs->startup_dir_use, "current")) 85 if (os_stricmp(prefs->startup_dir_use, "current"))
86 { 86 {
87 // Not in cwd 87 // Not in cwd
88 if (stricmp(prefs->startup_dir_use, "previous") == 0 && prefs->startup_dir_previous && *prefs->startup_dir_previous) 88 if (os_stricmp(prefs->startup_dir_use, "previous") == 0 && prefs->startup_dir_previous && *prefs->startup_dir_previous)
89 { 89 {
90 scichdir((char*)prefs->startup_dir_previous); 90 scichdir((char*)prefs->startup_dir_previous);
91 } 91 }
92 else if (stricmp(prefs->startup_dir_use, "default") == 0 && prefs->startup_dir_default && *prefs->startup_dir_default) 92 else if (os_stricmp(prefs->startup_dir_use, "default") == 0 && prefs->startup_dir_default && *prefs->startup_dir_default)
93 { 93 {
94 scichdir((char*)prefs->startup_dir_default); 94 scichdir((char*)prefs->startup_dir_default);
95 } 95 }
diff --git a/scilab/modules/core/src/c/getmodules.c b/scilab/modules/core/src/c/getmodules.c
index 2845d63..4e89182 100644
--- a/scilab/modules/core/src/c/getmodules.c
+++ b/scilab/modules/core/src/c/getmodules.c
@@ -145,7 +145,7 @@ static BOOL AppendModules(char *xmlfilename)
145 /* Don't care about line return / empty line */ 145 /* Don't care about line return / empty line */
146 xmlKeepBlanksDefault(0); 146 xmlKeepBlanksDefault(0);
147 /* check if the XML file has been encoded with utf8 (unicode) or not */ 147 /* check if the XML file has been encoded with utf8 (unicode) or not */
148 if (stricmp("utf-8", encoding) == 0) 148 if (os_stricmp("utf-8", encoding) == 0)
149 { 149 {
150 xmlDocPtr doc = NULL; 150 xmlDocPtr doc = NULL;
151 xmlXPathContextPtr xpathCtxt = NULL; 151 xmlXPathContextPtr xpathCtxt = NULL;
@@ -200,7 +200,7 @@ static BOOL AppendModules(char *xmlfilename)
200 { 200 {
201 /* we found the tag activate */ 201 /* we found the tag activate */
202 const char *str = (const char*)attrib->children->content; 202 const char *str = (const char*)attrib->children->content;
203 if (stricmp(str, "yes") == 0 || strcmp(str, "1") == 0) 203 if (os_stricmp(str, "yes") == 0 || strcmp(str, "1") == 0)
204 { 204 {
205 activate = 1; 205 activate = 1;
206 } 206 }
diff --git a/scilab/modules/core/src/c/loadversion.c b/scilab/modules/core/src/c/loadversion.c
index 06fdf94..2f44d26 100644
--- a/scilab/modules/core/src/c/loadversion.c
+++ b/scilab/modules/core/src/c/loadversion.c
@@ -27,6 +27,7 @@
27#include "getshortpathname.h" 27#include "getshortpathname.h"
28#include "charEncoding.h" 28#include "charEncoding.h"
29#include "version.h" 29#include "version.h"
30#include "os_string.h"
30/*--------------------------------------------------------------------------*/ 31/*--------------------------------------------------------------------------*/
31BOOL getversionmodule(const char* _pstModule, 32BOOL getversionmodule(const char* _pstModule,
32 int *sci_version_major, 33 int *sci_version_major,
@@ -61,7 +62,7 @@ BOOL getversionmodule(const char* _pstModule,
61 xmlKeepBlanksDefault(0); 62 xmlKeepBlanksDefault(0);
62 63
63 /* check if the XML file has been encoded with utf8 (unicode) or not */ 64 /* check if the XML file has been encoded with utf8 (unicode) or not */
64 if (stricmp("utf-8", encoding) == 0) 65 if (os_stricmp("utf-8", encoding) == 0)
65 { 66 {
66 xmlDocPtr doc = NULL; 67 xmlDocPtr doc = NULL;
67 xmlXPathContextPtr xpathCtxt = NULL; 68 xmlXPathContextPtr xpathCtxt = NULL;
diff --git a/scilab/modules/core/src/c/saveCWDInPreferences.c b/scilab/modules/core/src/c/saveCWDInPreferences.c
index 3d0d6da..edd2a69 100644
--- a/scilab/modules/core/src/c/saveCWDInPreferences.c
+++ b/scilab/modules/core/src/c/saveCWDInPreferences.c
@@ -24,7 +24,7 @@ void saveCWDInPreferences()
24 24
25 if (values) 25 if (values)
26 { 26 {
27 if (values[0] && stricmp(values[0], "previous") == 0) 27 if (values[0] && os_stricmp(values[0], "previous") == 0)
28 { 28 {
29 int err; 29 int err;
30 char * cwd = scigetcwd(&err); 30 char * cwd = scigetcwd(&err);
diff --git a/scilab/modules/core/src/cpp/InitScilab.cpp b/scilab/modules/core/src/cpp/InitScilab.cpp
index 10da8a7..5866e88 100644
--- a/scilab/modules/core/src/cpp/InitScilab.cpp
+++ b/scilab/modules/core/src/cpp/InitScilab.cpp
@@ -718,11 +718,11 @@ void* scilabReadAndStore(void* param)
718 } 718 }
719 else if (commandsize > 1 && command[0] == 'p' && command[1] == ' ') 719 else if (commandsize > 1 && command[0] == 'p' && command[1] == ' ')
720 { 720 {
721 std::string s("disp("); 721 std::string s("disp(");
722 s += command + 2; 722 s += command + 2;
723 s += ")"; 723 s += ")";
724 tmpCommand = os_strdup(s.data()); 724 tmpCommand = os_strdup(s.data());
725 disableDebug = true; 725 disableDebug = true;
726 } 726 }
727 else if (commandsize > 6 && strncmp(command, "print ", 6) == 0) 727 else if (commandsize > 6 && strncmp(command, "print ", 6) == 0)
728 { 728 {
@@ -736,11 +736,7 @@ void* scilabReadAndStore(void* param)
736 { 736 {
737 int iLen = (int)strlen(command) + (int)strlen("debug ") + 1; 737 int iLen = (int)strlen(command) + (int)strlen("debug ") + 1;
738 tmpCommand = (char*)MALLOC(sizeof(char) * iLen); 738 tmpCommand = (char*)MALLOC(sizeof(char) * iLen);
739#ifdef _MSC_VER
740 os_sprintf(tmpCommand, iLen, "%s %s", "debug", command); 739 os_sprintf(tmpCommand, iLen, "%s %s", "debug", command);
741#else
742 os_sprintf(tmpCommand, "%s %s", "debug", command);
743#endif
744 disableDebug = true; 740 disableDebug = true;
745 } 741 }
746 742
diff --git a/scilab/modules/core/src/cpp/runner.cpp b/scilab/modules/core/src/cpp/runner.cpp
index 0a42da6..c1d4445 100644
--- a/scilab/modules/core/src/cpp/runner.cpp
+++ b/scilab/modules/core/src/cpp/runner.cpp
@@ -100,7 +100,7 @@ int StaticRunner::launch()
100 100
101 //print msg about recursion limit and trigger an error 101 //print msg about recursion limit and trigger an error
102 char sz[1024]; 102 char sz[1024];
103 os_sprintf(sz, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit()); 103 os_sprintf(sz, 1024, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit());
104 throw ast::InternalError(sz); 104 throw ast::InternalError(sz);
105 } 105 }
106 } 106 }
diff --git a/scilab/modules/coverage/src/cpp/CoverModule.cpp b/scilab/modules/coverage/src/cpp/CoverModule.cpp
index d7e8d6d..39e86a9 100644
--- a/scilab/modules/coverage/src/cpp/CoverModule.cpp
+++ b/scilab/modules/coverage/src/cpp/CoverModule.cpp
@@ -184,7 +184,6 @@ void CoverModule::getMacros(const std::string & path, const std::string & module
184 } 184 }
185 } 185 }
186 } 186 }
187 FREE(libFile);
188} 187}
189 188
190void CoverModule::getBuiltins(const std::vector<std::pair<std::string, std::string>> & paths_mods) 189void CoverModule::getBuiltins(const std::vector<std::pair<std::string, std::string>> & paths_mods)
@@ -274,7 +273,7 @@ bool CoverModule::getStringFromXPath(const char * filePath, const char * xpquery
274 return false; 273 return false;
275 } 274 }
276 275
277 if (!doc->encoding || stricmp((const char *)doc->encoding, "utf-8") != 0) 276 if (!doc->encoding || os_stricmp((const char *)doc->encoding, "utf-8") != 0)
278 { 277 {
279 xmlFreeDoc(doc); 278 xmlFreeDoc(doc);
280 return false; 279 return false;
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_bvode.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_bvode.cpp
index 52759c8..9d91ac2 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_bvode.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_bvode.cpp
@@ -571,7 +571,7 @@ types::Function::ReturnValue sci_bvode(types::typed_list &in, int _iRetCount, ty
571 DifferentialEquation::removeDifferentialEquationFunctions(); 571 DifferentialEquation::removeDifferentialEquationFunctions();
572 572
573 char szError[bsiz]; 573 char szError[bsiz];
574 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "bvode", "bvode"); 574 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "bvode", "bvode");
575 os << szError; 575 os << szError;
576 throw ast::InternalError(os.str()); 576 throw ast::InternalError(os.str());
577 } 577 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_daskr.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_daskr.cpp
index 446f267..09cef37 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_daskr.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_daskr.cpp
@@ -343,7 +343,7 @@ types::Function::ReturnValue sci_daskr(types::typed_list &in, int _iRetCount, ty
343 343
344 if (bOK == false) 344 if (bOK == false)
345 { 345 {
346 const char* pst = pStr->get(0); 346 char* pst = pStr->get(0);
347 Scierror(50, _("%s: Subroutine not found: %s\n"), "daskr", pst); 347 Scierror(50, _("%s: Subroutine not found: %s\n"), "daskr", pst);
348 FREE(pst); 348 FREE(pst);
349 DifferentialEquation::removeDifferentialEquationFunctions(); 349 DifferentialEquation::removeDifferentialEquationFunctions();
@@ -850,8 +850,8 @@ types::Function::ReturnValue sci_daskr(types::typed_list &in, int _iRetCount, ty
850 850
851 LENWP = pDblX0->getRows() * pDblX0->getRows(); 851 LENWP = pDblX0->getRows() * pDblX0->getRows();
852 rworksize += (maxord + 5) * pDblX0->getRows() + 3 * ng 852 rworksize += (maxord + 5) * pDblX0->getRows() + 3 * ng
853 + (maxl + 3 + std::min(1, maxl - kmp)) * pDblX0->getRows() 853 + (maxl + 3 + std::min(1, maxl - kmp)) * pDblX0->getRows()
854 + (maxl + 3) * maxl + 1 + LENWP; 854 + (maxl + 3) * maxl + 1 + LENWP;
855 } 855 }
856 856
857 if (info[15] == 1) 857 if (info[15] == 1)
@@ -1092,7 +1092,7 @@ types::Function::ReturnValue sci_daskr(types::typed_list &in, int _iRetCount, ty
1092 if (bCatch) 1092 if (bCatch)
1093 { 1093 {
1094 char szError[bsiz]; 1094 char szError[bsiz];
1095 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "daskr", "ddaskr"); 1095 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "daskr", "ddaskr");
1096 os << szError; 1096 os << szError;
1097 throw ast::InternalError(os.str()); 1097 throw ast::InternalError(os.str());
1098 } 1098 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_dasrt.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_dasrt.cpp
index 30276f6..7d63ffd 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_dasrt.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_dasrt.cpp
@@ -781,7 +781,7 @@ types::Function::ReturnValue sci_dasrt(types::typed_list &in, int _iRetCount, ty
781 if (bCatch) 781 if (bCatch)
782 { 782 {
783 char szError[bsiz]; 783 char szError[bsiz];
784 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "dasrt", "ddasrt"); 784 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "dasrt", "ddasrt");
785 os << szError; 785 os << szError;
786 throw ast::InternalError(os.str()); 786 throw ast::InternalError(os.str());
787 } 787 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_dassl.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_dassl.cpp
index 82d2571..35345ec 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_dassl.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_dassl.cpp
@@ -716,7 +716,7 @@ types::Function::ReturnValue sci_dassl(types::typed_list &in, int _iRetCount, ty
716 if (bCatch) 716 if (bCatch)
717 { 717 {
718 char szError[bsiz]; 718 char szError[bsiz];
719 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "dassl", "dassl"); 719 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "dassl", "dassl");
720 os << szError; 720 os << szError;
721 throw ast::InternalError(os.str()); 721 throw ast::InternalError(os.str());
722 } 722 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_feval.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_feval.cpp
index 50589b4..7467993 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_feval.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_feval.cpp
@@ -189,7 +189,7 @@ types::Function::ReturnValue sci_feval(types::typed_list &in, int _iRetCount, ty
189 delete pDblOut; 189 delete pDblOut;
190 190
191 char szError[bsiz]; 191 char szError[bsiz];
192 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "feval", "execFevalF"); 192 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "feval", "execFevalF");
193 os << szError; 193 os << szError;
194 throw ast::InternalError(os.str()); 194 throw ast::InternalError(os.str());
195 } 195 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_impl.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_impl.cpp
index 8cbebf4..0bf77d0 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_impl.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_impl.cpp
@@ -685,7 +685,7 @@ types::Function::ReturnValue sci_impl(types::typed_list &in, int _iRetCount, typ
685 if (bCatch) 685 if (bCatch)
686 { 686 {
687 char szError[bsiz]; 687 char szError[bsiz];
688 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "impl", "lsodi"); 688 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "impl", "lsodi");
689 os << szError; 689 os << szError;
690 throw ast::InternalError(os.str()); 690 throw ast::InternalError(os.str());
691 } 691 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_int2d.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_int2d.cpp
index 6d80c17..540d898 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_int2d.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_int2d.cpp
@@ -254,7 +254,7 @@ types::Function::ReturnValue sci_int2d(types::typed_list &in, int _iRetCount, ty
254 if (bCatch) 254 if (bCatch)
255 { 255 {
256 char szError[bsiz]; 256 char szError[bsiz];
257 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "int2d", "twodq"); 257 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "int2d", "twodq");
258 os << szError; 258 os << szError;
259 throw ast::InternalError(os.str()); 259 throw ast::InternalError(os.str());
260 } 260 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_int3d.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_int3d.cpp
index 56714ef..14160be 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_int3d.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_int3d.cpp
@@ -332,7 +332,7 @@ types::Function::ReturnValue sci_int3d(types::typed_list &in, int _iRetCount, ty
332 if (bCatch) 332 if (bCatch)
333 { 333 {
334 char szError[bsiz]; 334 char szError[bsiz];
335 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "int3d", "dcutet"); 335 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "int3d", "dcutet");
336 os << szError; 336 os << szError;
337 throw ast::InternalError(os.str()); 337 throw ast::InternalError(os.str());
338 } 338 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_intg.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_intg.cpp
index 9549cc4..77aee77 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_intg.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_intg.cpp
@@ -250,7 +250,7 @@ types::Function::ReturnValue sci_intg(types::typed_list &in, int _iRetCount, typ
250 if (bCatch) 250 if (bCatch)
251 { 251 {
252 char szError[bsiz]; 252 char szError[bsiz];
253 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "intg", "dqags"); 253 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "intg", "dqags");
254 os << szError; 254 os << szError;
255 throw ast::InternalError(os.str()); 255 throw ast::InternalError(os.str());
256 } 256 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_ode.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_ode.cpp
index 005fc78..e466c92 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_ode.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_ode.cpp
@@ -1136,7 +1136,7 @@ types::Function::ReturnValue sci_ode(types::typed_list &in, int _iRetCount, type
1136 if (bCatch) 1136 if (bCatch)
1137 { 1137 {
1138 char szError[bsiz]; 1138 char szError[bsiz];
1139 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "ode", strMeth.c_str()); 1139 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "ode", strMeth.c_str());
1140 os << szError; 1140 os << szError;
1141 throw ast::InternalError(os.str()); 1141 throw ast::InternalError(os.str());
1142 } 1142 }
@@ -1356,7 +1356,7 @@ types::Function::ReturnValue sci_ode(types::typed_list &in, int _iRetCount, type
1356 if (bCatch) 1356 if (bCatch)
1357 { 1357 {
1358 char szError[bsiz]; 1358 char szError[bsiz];
1359 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "ode", strMeth.c_str()); 1359 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "ode", strMeth.c_str());
1360 os << szError; 1360 os << szError;
1361 throw ast::InternalError(os.str()); 1361 throw ast::InternalError(os.str());
1362 } 1362 }
diff --git a/scilab/modules/differential_equations/sci_gateway/cpp/sci_odedc.cpp b/scilab/modules/differential_equations/sci_gateway/cpp/sci_odedc.cpp
index 6c0c33b..672b5e7 100644
--- a/scilab/modules/differential_equations/sci_gateway/cpp/sci_odedc.cpp
+++ b/scilab/modules/differential_equations/sci_gateway/cpp/sci_odedc.cpp
@@ -1130,7 +1130,7 @@ types::Function::ReturnValue sci_odedc(types::typed_list &in, int _iRetCount, ty
1130 } 1130 }
1131 1131
1132 char szError[bsiz]; 1132 char szError[bsiz];
1133 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "odedc", "tright"); 1133 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "odedc", "tright");
1134 os << szError; 1134 os << szError;
1135 throw ast::InternalError(os.str()); 1135 throw ast::InternalError(os.str());
1136 } 1136 }
@@ -1247,7 +1247,7 @@ types::Function::ReturnValue sci_odedc(types::typed_list &in, int _iRetCount, ty
1247 if (bCatch) 1247 if (bCatch)
1248 { 1248 {
1249 char szError[bsiz]; 1249 char szError[bsiz];
1250 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "odedc", strMeth.c_str()); 1250 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "odedc", strMeth.c_str());
1251 os << szError; 1251 os << szError;
1252 throw ast::InternalError(os.str()); 1252 throw ast::InternalError(os.str());
1253 } 1253 }
@@ -1442,7 +1442,7 @@ types::Function::ReturnValue sci_odedc(types::typed_list &in, int _iRetCount, ty
1442 if (bCatch) 1442 if (bCatch)
1443 { 1443 {
1444 char szError[bsiz]; 1444 char szError[bsiz];
1445 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "odedc", strMeth.c_str()); 1445 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "odedc", strMeth.c_str());
1446 os << szError; 1446 os << szError;
1447 throw ast::InternalError(os.str()); 1447 throw ast::InternalError(os.str());
1448 } 1448 }
@@ -1496,7 +1496,7 @@ types::Function::ReturnValue sci_odedc(types::typed_list &in, int _iRetCount, ty
1496 } 1496 }
1497 1497
1498 char szError[bsiz]; 1498 char szError[bsiz];
1499 os_sprintf(szError, _("%s: An error occured in '%s' subroutine.\n"), "odedc", tright); 1499 os_sprintf(szError, bsiz, _("%s: An error occured in '%s' subroutine.\n"), "odedc", tright);
1500 os << szError; 1500 os << szError;
1501 throw ast::InternalError(os.str()); 1501 throw ast::InternalError(os.str());
1502 } 1502 }
diff --git a/scilab/modules/dynamic_link/src/cpp/dynamic_link.cpp b/scilab/modules/dynamic_link/src/cpp/dynamic_link.cpp
index 4a2b729..6a139f9 100644
--- a/scilab/modules/dynamic_link/src/cpp/dynamic_link.cpp
+++ b/scilab/modules/dynamic_link/src/cpp/dynamic_link.cpp
@@ -159,9 +159,7 @@ int Sci_dlopen(const char* _pstDynLibPath)
159 } 159 }
160#else 160#else
161 { 161 {
162 char* pstDynLibPath = wide_string_to_UTF8(_pstDynLibPath); 162 hLib = LoadDynLibrary (_pstDynLibPath);
163 hLib = LoadDynLibrary (pstDynLibPath);
164 FREE(pstDynLibPath);
165 } 163 }
166#endif 164#endif
167 165
diff --git a/scilab/modules/fileio/sci_gateway/c/sci_copyfile.c b/scilab/modules/fileio/sci_gateway/c/sci_copyfile.c
index 85e3f9d..18aa4dc 100644
--- a/scilab/modules/fileio/sci_gateway/c/sci_copyfile.c
+++ b/scilab/modules/fileio/sci_gateway/c/sci_copyfile.c
@@ -29,6 +29,7 @@
29#include "freeArrayOfString.h" 29#include "freeArrayOfString.h"
30#include "charEncoding.h" 30#include "charEncoding.h"
31#include "expandPathVariable.h" 31#include "expandPathVariable.h"
32#include "os_string.h"
32/*--------------------------------------------------------------------------*/ 33/*--------------------------------------------------------------------------*/
33static char *getFilenameWithExtension(char* fullFilename); 34static char *getFilenameWithExtension(char* fullFilename);
34static int returnCopyFileResultOnStack(int ierr, char *fname , void* pvApiCtx); 35static int returnCopyFileResultOnStack(int ierr, char *fname , void* pvApiCtx);
@@ -290,7 +291,7 @@ static int returnCopyFileResultOnStack(int ierr, char *fname, void* pvApiCtx)
290 Scierror(999, _("%s: Memory allocation error.\n"), fname); 291 Scierror(999, _("%s: Memory allocation error.\n"), fname);
291 return 0; 292 return 0;
292 } 293 }
293 294
294 strcpy(sciError, ""); 295 strcpy(sciError, "");
295 } 296 }
296#else 297#else
diff --git a/scilab/modules/fileio/sci_gateway/c/sci_movefile.c b/scilab/modules/fileio/sci_gateway/c/sci_movefile.c
index e49cb5d..3cfc9de 100644
--- a/scilab/modules/fileio/sci_gateway/c/sci_movefile.c
+++ b/scilab/modules/fileio/sci_gateway/c/sci_movefile.c
@@ -29,6 +29,7 @@
29#include "freeArrayOfString.h" 29#include "freeArrayOfString.h"
30#include "charEncoding.h" 30#include "charEncoding.h"
31#include "expandPathVariable.h" 31#include "expandPathVariable.h"
32#include "os_string.h"
32/*--------------------------------------------------------------------------*/ 33/*--------------------------------------------------------------------------*/
33static char* getFilenameWithExtensionForMove(char* fullFilename); 34static char* getFilenameWithExtensionForMove(char* fullFilename);
34static int returnMoveFileResultOnStack(int ierr, char *fname, void* pvApiCtx); 35static int returnMoveFileResultOnStack(int ierr, char *fname, void* pvApiCtx);
@@ -254,7 +255,7 @@ static int returnMoveFileResultOnStack(int ierr, char *fname, void* pvApiCtx)
254 Scierror(999, _("%s: Memory allocation error.\n"), fname); 255 Scierror(999, _("%s: Memory allocation error.\n"), fname);
255 return 0; 256 return 0;
256 } 257 }
257 258
258 strcpy(sciError, ""); 259 strcpy(sciError, "");
259 } 260 }
260#else 261#else
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp
index e4f037b..a1a04b1 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_mclose.cpp
@@ -55,7 +55,7 @@ types::Function::ReturnValue sci_mclose(types::typed_list &in, int _iRetCount, t
55 } 55 }
56 iRet = mclose(iFileID); 56 iRet = mclose(iFileID);
57 } 57 }
58 else if (stricmp(pS->get(0), "all") == 0) 58 else if (os_stricmp(pS->get(0), "all") == 0)
59 { 59 {
60 iRet = mcloseAll(); 60 iRet = mcloseAll();
61 } 61 }
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp
index d417f37..b3b2b17 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_mget.cpp
@@ -31,7 +31,7 @@ extern "C"
31/*--------------------------------------------------------------------------*/ 31/*--------------------------------------------------------------------------*/
32types::Function::ReturnValue sci_mget(types::typed_list &in, int _iRetCount, types::typed_list &out) 32types::Function::ReturnValue sci_mget(types::typed_list &in, int _iRetCount, types::typed_list &out)
33{ 33{
34 char* pstType = "l";//default type value : long 34 const char* pstType = "l";//default type value : long
35 int iSize = 0; 35 int iSize = 0;
36 int iFile = -1; //default file : last opened file 36 int iFile = -1; //default file : last opened file
37 int iErr = 0; 37 int iErr = 0;
@@ -85,7 +85,6 @@ types::Function::ReturnValue sci_mget(types::typed_list &in, int _iRetCount, typ
85 { 85 {
86 case 0: // stderr 86 case 0: // stderr
87 case 6: // stdout 87 case 6: // stdout
88 FREE(pstType);
89 Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mget", iFile); 88 Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mget", iFile);
90 return types::Function::Error; 89 return types::Function::Error;
91 } 90 }
@@ -94,7 +93,6 @@ types::Function::ReturnValue sci_mget(types::typed_list &in, int _iRetCount, typ
94 // file opened with fortran open function 93 // file opened with fortran open function
95 if (pFile == NULL || pFile->getFileType() == 1) 94 if (pFile == NULL || pFile->getFileType() == 1)
96 { 95 {
97 FREE(pstType);
98 Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mget", iFile); 96 Scierror(999, _("%s: Wrong file descriptor: %d.\n"), "mget", iFile);
99 return types::Function::Error; 97 return types::Function::Error;
100 } 98 }
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp
index 6c54eac..f317dc7 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_mopen.cpp
@@ -33,7 +33,7 @@ types::Function::ReturnValue sci_mopen(types::typed_list &in, int _iRetCount, ty
33 int iErr = 0; 33 int iErr = 0;
34 int iID = 0; 34 int iID = 0;
35 char* pstFilename = NULL; 35 char* pstFilename = NULL;
36 char* pstMode = "rb"; 36 const char* pstMode = "rb";
37 int iSwap = 0; 37 int iSwap = 0;
38 38
39 //check output parameters 39 //check output parameters
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp
index 2c9d864..c8513f6 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_mput.cpp
@@ -32,7 +32,7 @@ extern "C"
32/*--------------------------------------------------------------------------*/ 32/*--------------------------------------------------------------------------*/
33types::Function::ReturnValue sci_mput(types::typed_list &in, int _iRetCount, types::typed_list &out) 33types::Function::ReturnValue sci_mput(types::typed_list &in, int _iRetCount, types::typed_list &out)
34{ 34{
35 char* pstType = "l";//default type value : long 35 char* pstType = (char*)"l";//default type value : long
36 int iSize = 0; 36 int iSize = 0;
37 int iFile = -1; //default file : last opened file 37 int iFile = -1; //default file : last opened file
38 double* pData = NULL; 38 double* pData = NULL;
diff --git a/scilab/modules/fileio/src/c/copyfile_others.c b/scilab/modules/fileio/src/c/copyfile_others.c
index 22e67b0..a44af37 100644
--- a/scilab/modules/fileio/src/c/copyfile_others.c
+++ b/scilab/modules/fileio/src/c/copyfile_others.c
@@ -32,33 +32,33 @@
32#include "fullpath.h" 32#include "fullpath.h"
33#include "os_string.h" 33#include "os_string.h"
34/*--------------------------------------------------------------------------*/ 34/*--------------------------------------------------------------------------*/
35static int CopyFileFunction_others(wchar_t *DestinationFilename, wchar_t *SourceFilename); 35static int CopyFileFunction_others(char* DestinationFilename, char* SourceFilename);
36static int CopyDirectoryFunction_others(wchar_t *DestinationDirectory, wchar_t *SourceDirectory); 36static int CopyDirectoryFunction_others(char* DestinationDirectory, char* SourceDirectory);
37static int RecursiveCopyDirectory(char *DestinationDir, char *SourceDir); 37static int RecursiveCopyDirectory(char *DestinationDir, char *SourceDir);
38/*--------------------------------------------------------------------------*/ 38/*--------------------------------------------------------------------------*/
39int CopyFileFunction(wchar_t *DestinationFilename, wchar_t *SourceFilename) 39int CopyFileFunction(char* DestinationFilename, char* SourceFilename)
40{ 40{
41 if (os_wcsicmp(DestinationFilename, SourceFilename) == 0) 41 if (os_stricmp(DestinationFilename, SourceFilename) == 0)
42 { 42 {
43 return EPERM; 43 return EPERM;
44 } 44 }
45 return CopyFileFunction_others(DestinationFilename, SourceFilename); 45 return CopyFileFunction_others(DestinationFilename, SourceFilename);
46} 46}
47/*--------------------------------------------------------------------------*/ 47/*--------------------------------------------------------------------------*/
48int CopyDirectoryFunction(wchar_t *DestinationDirectory, wchar_t *SourceDirectory) 48int CopyDirectoryFunction(char* DestinationDirectory, char* SourceDirectory)
49{ 49{
50 /* remove last file separator if it does not exists */ 50 /* remove last file separator if it does not exists */
51 if ( (SourceDirectory[wcslen(SourceDirectory) - 1] == L'\\') || 51 if ( (SourceDirectory[strlen(SourceDirectory) - 1] == '\\') ||
52 (SourceDirectory[wcslen(SourceDirectory) - 1] == L'/') ) 52 (SourceDirectory[strlen(SourceDirectory) - 1] == '/') )
53 { 53 {
54 SourceDirectory[wcslen(SourceDirectory) - 1] = L'\0'; 54 SourceDirectory[strlen(SourceDirectory) - 1] = '\0';
55 } 55 }
56 56
57 /* remove last file separator if it does not exists */ 57 /* remove last file separator if it does not exists */
58 if ( (DestinationDirectory[wcslen(DestinationDirectory) - 1] == L'\\') || 58 if ( (DestinationDirectory[strlen(DestinationDirectory) - 1] == '\\') ||
59 (DestinationDirectory[wcslen(DestinationDirectory) - 1] == L'/') ) 59 (DestinationDirectory[strlen(DestinationDirectory) - 1] == '/') )
60 { 60 {
61 DestinationDirectory[wcslen(DestinationDirectory) - 1] = L'\0'; 61 DestinationDirectory[strlen(DestinationDirectory) - 1] = '\0';
62 } 62 }
63 63
64 return CopyDirectoryFunction_others(DestinationDirectory, SourceDirectory); 64 return CopyDirectoryFunction_others(DestinationDirectory, SourceDirectory);
@@ -66,10 +66,10 @@ int CopyDirectoryFunction(wchar_t *DestinationDirectory, wchar_t *SourceDirector
66} 66}
67/*--------------------------------------------------------------------------*/ 67/*--------------------------------------------------------------------------*/
68/* Copy file with all attributes */ 68/* Copy file with all attributes */
69static int CopyFileFunction_others(wchar_t *DestinationFilename, wchar_t *SourceFilename) 69static int CopyFileFunction_others(char* DestinationFilename, char* SourceFilename)
70{ 70{
71 char *pStrDest = wide_string_to_UTF8(DestinationFilename); 71 char *pStrDest = DestinationFilename;
72 char *pStrSrc = wide_string_to_UTF8(SourceFilename); 72 char *pStrSrc = SourceFilename;
73 73
74 char strDestFullPath[PATH_MAX * 2 + 1]; 74 char strDestFullPath[PATH_MAX * 2 + 1];
75 char strSrcFullPath[PATH_MAX * 2 + 1]; 75 char strSrcFullPath[PATH_MAX * 2 + 1];
@@ -139,16 +139,6 @@ static int CopyFileFunction_others(wchar_t *DestinationFilename, wchar_t *Source
139 139
140 fchmod (dfd, st.st_mode & 0777); 140 fchmod (dfd, st.st_mode & 0777);
141 close (sfd); 141 close (sfd);
142 if (pStrDest)
143 {
144 FREE(pStrDest);
145 pStrDest = NULL;
146 }
147 if (pStrSrc)
148 {
149 FREE(pStrSrc);
150 pStrSrc = NULL;
151 }
152 return 0; 142 return 0;
153 143
154err: 144err:
@@ -162,63 +152,39 @@ err:
162 unlink (pStrDest); 152 unlink (pStrDest);
163 } 153 }
164 154
165 if (pStrDest)
166 {
167 FREE(pStrDest);
168 pStrDest = NULL;
169 }
170 if (pStrSrc)
171 {
172 FREE(pStrSrc);
173 pStrSrc = NULL;
174 }
175 return status; 155 return status;
176} 156}
177/*--------------------------------------------------------------------------*/ 157/*--------------------------------------------------------------------------*/
178static int CopyDirectoryFunction_others(wchar_t *DestinationDirectory, wchar_t *SourceDirectory) 158static int CopyDirectoryFunction_others(char* DestinationDirectory, char* SourceDirectory)
179{ 159{
180 char *pStrDest = wide_string_to_UTF8(DestinationDirectory); 160 char *pStrDest = DestinationDirectory;
181 char *pStrSrc = wide_string_to_UTF8(SourceDirectory); 161 char *pStrSrc = SourceDirectory;
182 162
183 int ierr = 0; 163 int ierr = 0;
184 164
185 /* we check directory source exists */ 165 /* we check directory source exists */
186 if (!isdir(pStrSrc)) 166 if (!isdir(pStrSrc))
187 { 167 {
188 if (pStrDest)
189 {
190 FREE(pStrDest);
191 pStrDest = NULL;
192 }
193 FREE(pStrSrc);
194 return ENOTDIR; 168 return ENOTDIR;
195 } 169 }
196 170
197 /* we check destination directory exists */ 171 /* we check destination directory exists */
198 if (!isdir(pStrDest)) 172 if (!isdir(pStrDest))
199 { 173 {
200 if (FileExistW(DestinationDirectory)) 174 if (FileExist(pStrDest))
201 { 175 {
202 FREE(pStrDest);
203 FREE(pStrSrc);
204 return ENOTDIR; 176 return ENOTDIR;
205 } 177 }
206 else 178 else
207 { 179 {
208 if (!createdirectoryW(DestinationDirectory)) 180 if (!createdirectory(pStrDest))
209 { 181 {
210 FREE(pStrDest);
211 FREE(pStrSrc);
212 return ENOTDIR; 182 return ENOTDIR;
213 } 183 }
214 } 184 }
215 } 185 }
216 186
217 ierr = RecursiveCopyDirectory(pStrDest, pStrSrc); 187 ierr = RecursiveCopyDirectory(pStrDest, pStrSrc);
218
219 FREE(pStrDest);
220 FREE(pStrSrc);
221
222 if (ierr) 188 if (ierr)
223 { 189 {
224 return errno; 190 return errno;
@@ -286,13 +252,7 @@ static int RecursiveCopyDirectory(char *DestinationDir, char *SourceDir)
286 } 252 }
287 else 253 else
288 { 254 {
289 wchar_t* wcfileDest = to_wide_string(filenameDST); 255 int ierr = CopyFileFunction_others(filenameDST, filenameSRC);
290 wchar_t* wcfileSrc = to_wide_string(filenameSRC);
291
292 int ierr = CopyFileFunction_others(wcfileDest, wcfileSrc);
293 FREE(wcfileDest);
294 FREE(wcfileSrc);
295
296 if (ierr) 256 if (ierr)
297 { 257 {
298 FREE(filenameDST); 258 FREE(filenameDST);
diff --git a/scilab/modules/fileio/src/c/copyfile_windows.c b/scilab/modules/fileio/src/c/copyfile_windows.c
index 9ac4e9b..13d87c8 100644
--- a/scilab/modules/fileio/src/c/copyfile_windows.c
+++ b/scilab/modules/fileio/src/c/copyfile_windows.c
@@ -28,7 +28,7 @@ static int CopyDirectoryFunction_windows(char* DestinationDirectory, char* Sourc
28/*--------------------------------------------------------------------------*/ 28/*--------------------------------------------------------------------------*/
29int CopyFileFunction(char* DestinationFilename, char* SourceFilename) 29int CopyFileFunction(char* DestinationFilename, char* SourceFilename)
30{ 30{
31 if (stricmp(DestinationFilename, SourceFilename) == 0) 31 if (os_stricmp(DestinationFilename, SourceFilename) == 0)
32 { 32 {
33 SetLastError(ERROR_ACCESS_DENIED); 33 SetLastError(ERROR_ACCESS_DENIED);
34 return 1; 34 return 1;
@@ -54,7 +54,7 @@ int CopyDirectoryFunction(char* DestinationDirectory, char* SourceDirectory)
54 DestinationDirectory[dstlen - 1] = '\0'; 54 DestinationDirectory[dstlen - 1] = '\0';
55 } 55 }
56 56
57 if (stricmp(DestinationDirectory, SourceDirectory) == 0) 57 if (os_stricmp(DestinationDirectory, SourceDirectory) == 0)
58 { 58 {
59 SetLastError(ERROR_ACCESS_DENIED); 59 SetLastError(ERROR_ACCESS_DENIED);
60 return 1; 60 return 1;
diff --git a/scilab/modules/fileio/src/c/createdirectory.c b/scilab/modules/fileio/src/c/createdirectory.c
index 3b4779d..8a069a6 100644
--- a/scilab/modules/fileio/src/c/createdirectory.c
+++ b/scilab/modules/fileio/src/c/createdirectory.c
@@ -27,6 +27,10 @@
27#include "isdir.h" 27#include "isdir.h"
28#include "splitpath.h" 28#include "splitpath.h"
29#include "scicurdir.h" 29#include "scicurdir.h"
30#include "os_string.h"
31#ifndef _MSC_VER
32#define MAX_PATH PATH_MAX
33#endif
30/*--------------------------------------------------------------------------*/ 34/*--------------------------------------------------------------------------*/
31#define DIRMODE 0777 35#define DIRMODE 0777
32/*--------------------------------------------------------------------------*/ 36/*--------------------------------------------------------------------------*/
@@ -37,12 +41,18 @@ BOOL createdirectory(const char *path)
37 { 41 {
38 if (!isdir(path)) 42 if (!isdir(path))
39 { 43 {
44#ifndef _MCS_VER
45 if (mkdir(path, DIRMODE) == 0)
46 {
47 bOK = TRUE;
48 }
49#else
40 char path_out[MAX_PATH]; 50 char path_out[MAX_PATH];
41 char drv[MAX_PATH]; 51 char drv[MAX_PATH];
42 char dir[MAX_PATH]; 52 char dir[MAX_PATH];
43 splitpath(path, TRUE, drv, dir, NULL, NULL); 53 splitpath(path, TRUE, drv, dir, NULL, NULL);
44 54
45 strcpy(path_out, drv); 55 os_strcpy(path_out, drv);
46 strcat(path_out, dir); 56 strcat(path_out, dir);
47 57
48 //if there is no path_out, get current dir as reference. 58 //if there is no path_out, get current dir as reference.
@@ -56,7 +66,7 @@ BOOL createdirectory(const char *path)
56 } 66 }
57 67
58 cur = scigetcwd(&err); 68 cur = scigetcwd(&err);
59 strcpy(path_out, cur); 69 os_strcpy(path_out, cur);
60 FREE(cur); 70 FREE(cur);
61 } 71 }
62 72
@@ -64,8 +74,10 @@ BOOL createdirectory(const char *path)
64 { 74 {
65 bOK = TRUE; 75 bOK = TRUE;
66 } 76 }
77#endif // _MCS_VER
78
67 } 79 }
68 } 80 }
69 return bOK; 81 return bOK;
70} 82}
71/*--------------------------------------------------------------------------*/ \ No newline at end of file 83/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/fileio/src/c/dlManager.c b/scilab/modules/fileio/src/c/dlManager.c
index d7d924d..f604d25 100644
--- a/scilab/modules/fileio/src/c/dlManager.c
+++ b/scilab/modules/fileio/src/c/dlManager.c
@@ -122,7 +122,7 @@ int getProxyValues(char **proxyHost, long *proxyPort, char **proxyUserPwd)
122 return 0; 122 return 0;
123 } 123 }
124 124
125 if (stricmp(values[0]/*enabled*/, "true") == 0) 125 if (os_stricmp(values[0]/*enabled*/, "true") == 0)
126 { 126 {
127 const unsigned int ulen = (const unsigned int)strlen(values[3]); 127 const unsigned int ulen = (const unsigned int)strlen(values[3]);
128 const unsigned int plen = (const unsigned int)strlen(values[4]); 128 const unsigned int plen = (const unsigned int)strlen(values[4]);
diff --git a/scilab/modules/fileio/src/c/findfiles.c b/scilab/modules/fileio/src/c/findfiles.c
index c20f1c1..efc644f 100644
--- a/scilab/modules/fileio/src/c/findfiles.c
+++ b/scilab/modules/fileio/src/c/findfiles.c
@@ -28,7 +28,7 @@
28#include "Sciwarning.h" 28#include "Sciwarning.h"
29/*--------------------------------------------------------------------------*/ 29/*--------------------------------------------------------------------------*/
30#ifndef _MSC_VER 30#ifndef _MSC_VER
31static BOOL find_spec( char *filename , char *filespec); 31static BOOL find_spec(const char *filename , const char *filespec);
32#endif 32#endif
33/*--------------------------------------------------------------------------*/ 33/*--------------------------------------------------------------------------*/
34#ifdef _MSC_VER 34#ifdef _MSC_VER
@@ -138,7 +138,7 @@ char **findfiles(const char *path, const char *filespec, int *sizeListReturned,
138 * @param filename the filename 138 * @param filename the filename
139 * @param filespec the mask 139 * @param filespec the mask
140 */ 140 */
141static BOOL find_spec( char *filename , char *filespec) 141static BOOL find_spec(const char *filename , const char *filespec)
142{ 142{
143 char *any = NULL; 143 char *any = NULL;
144 144
diff --git a/scilab/modules/fileio/src/c/scicurdir.c b/scilab/modules/fileio/src/c/scicurdir.c
index 35c733e..aed1ff1 100644
--- a/scilab/modules/fileio/src/c/scicurdir.c
+++ b/scilab/modules/fileio/src/c/scicurdir.c
@@ -45,20 +45,9 @@ int scichdir(const char *path)
45 { 45 {
46 sciprint(_("Can't go to directory %s: %s\n"), path, strerror(errno)); 46 sciprint(_("Can't go to directory %s: %s\n"), path, strerror(errno));
47 } 47 }
48 if (path)
49 {
50 FREE(path);
51 path = NULL;
52 }
53 return 1; 48 return 1;
54 } 49 }
55 50
56 if (path)
57 {
58 FREE(path);
59 path = NULL;
60 }
61
62#else 51#else
63 if (_chdir(path) ) 52 if (_chdir(path) )
64 { 53 {
diff --git a/scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp b/scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp
index 31b2be2..9edb8d7 100644
--- a/scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp
+++ b/scilab/modules/functions/sci_gateway/cpp/sci_exec.cpp
@@ -111,7 +111,7 @@ types::Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, typ
111 { 111 {
112 //errcatch 112 //errcatch
113 types::String* pS = in[1]->getAs<types::String>(); 113 types::String* pS = in[1]->getAs<types::String>();
114 if (stricmp(pS->get(0), "errcatch") == 0) 114 if (os_stricmp(pS->get(0), "errcatch") == 0)
115 { 115 {
116 bErrCatch = true; 116 bErrCatch = true;
117 } 117 }
@@ -314,7 +314,7 @@ types::Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, typ
314 314
315 //print msg about recursion limit and trigger an error 315 //print msg about recursion limit and trigger an error
316 char sz[1024]; 316 char sz[1024];
317 os_sprintf(sz, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit()); 317 os_sprintf(sz, 1024, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit());
318 throw ast::InternalError(sz); 318 throw ast::InternalError(sz);
319 } 319 }
320 } 320 }
@@ -418,7 +418,7 @@ types::Function::ReturnValue sci_exec(types::typed_list &in, int _iRetCount, typ
418 418
419 //print msg about recursion limit and trigger an error 419 //print msg about recursion limit and trigger an error
420 char sz[1024]; 420 char sz[1024];
421 os_sprintf(sz, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit()); 421 os_sprintf(sz, 1024, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit());
422 throw ast::InternalError(sz); 422 throw ast::InternalError(sz);
423 } 423 }
424 } 424 }
diff --git a/scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp b/scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp
index b715c37..b40ccdf 100644
--- a/scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp
+++ b/scilab/modules/functions/sci_gateway/cpp/sci_execstr.cpp
@@ -64,7 +64,7 @@ types::Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount,
64 } 64 }
65 65
66 types::String* pS = in[1]->getAs<types::String>(); 66 types::String* pS = in[1]->getAs<types::String>();
67 if (stricmp(pS->get(0), "errcatch") == 0) 67 if (os_stricmp(pS->get(0), "errcatch") == 0)
68 { 68 {
69 bErrCatch = true; 69 bErrCatch = true;
70 } 70 }
@@ -86,11 +86,11 @@ types::Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount,
86 return types::Function::Error; 86 return types::Function::Error;
87 } 87 }
88 88
89 if (stricmp(in[2]->getAs<types::String>()->get(0), MUTE_FLAG) == 0) 89 if (os_stricmp(in[2]->getAs<types::String>()->get(0), MUTE_FLAG) == 0)
90 { 90 {
91 bMute = true; 91 bMute = true;
92 } 92 }
93 else if (stricmp(in[2]->getAs<types::String>()->get(0), NO_MUTE_FLAG) == 0) 93 else if (os_stricmp(in[2]->getAs<types::String>()->get(0), NO_MUTE_FLAG) == 0)
94 { 94 {
95 bMute = false; 95 bMute = false;
96 } 96 }
@@ -227,7 +227,7 @@ types::Function::ReturnValue sci_execstr(types::typed_list &in, int _iRetCount,
227 227
228 //print msg about recursion limit and trigger an error 228 //print msg about recursion limit and trigger an error
229 char sz[1024]; 229 char sz[1024];
230 os_sprintf(sz, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit()); 230 os_sprintf(sz, 1024, _("Recursion limit reached (%d).\n"), ConfigVariable::getRecursionLimit());
231 throw ast::InternalError(sz); 231 throw ast::InternalError(sz);
232 } 232 }
233 } 233 }
diff --git a/scilab/modules/functions_manager/src/cpp/funcmanager.cpp b/scilab/modules/functions_manager/src/cpp/funcmanager.cpp
index a631d23..1b9478e 100644
--- a/scilab/modules/functions_manager/src/cpp/funcmanager.cpp
+++ b/scilab/modules/functions_manager/src/cpp/funcmanager.cpp
@@ -120,7 +120,7 @@ bool FuncManager::AppendModules()
120 /* Don't care about line return / empty line */ 120 /* Don't care about line return / empty line */
121 xmlKeepBlanksDefault(0); 121 xmlKeepBlanksDefault(0);
122 /* check if the XML file has been encoded with utf8 (unicode) or not */ 122 /* check if the XML file has been encoded with utf8 (unicode) or not */
123 if (stricmp("utf-8", encoding) == 0) 123 if (os_stricmp("utf-8", encoding) == 0)
124 { 124 {
125 xmlDocPtr doc; 125 xmlDocPtr doc;
126 xmlXPathContextPtr xpathCtxt = NULL; 126 xmlXPathContextPtr xpathCtxt = NULL;
@@ -165,7 +165,7 @@ bool FuncManager::AppendModules()
165 { 165 {
166 /* we found the tag activate */ 166 /* we found the tag activate */
167 const char *str = (const char*)attrib->children->content; 167 const char *str = (const char*)attrib->children->content;
168 if (stricmp(str, "yes") == 0 || strcmp(str, "1") == 0) 168 if (os_stricmp(str, "yes") == 0 || strcmp(str, "1") == 0)
169 { 169 {
170 activate = 1; 170 activate = 1;
171 } 171 }
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_light.c b/scilab/modules/graphics/sci_gateway/c/sci_light.c
index d0dcb02..298ab7a 100644
--- a/scilab/modules/graphics/sci_gateway/c/sci_light.c
+++ b/scilab/modules/graphics/sci_gateway/c/sci_light.c
@@ -76,11 +76,11 @@ int sci_light(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt opt, in
76 return 0; 76 return 0;
77 } 77 }
78 78
79 if (stricmp(str, "on") == 0) 79 if (os_stricmp(str, "on") == 0)
80 { 80 {
81 visible = 1; 81 visible = 1;
82 } 82 }
83 else if (stricmp(str, "off") == 0) 83 else if (os_stricmp(str, "off") == 0)
84 { 84 {
85 visible = 0; 85 visible = 0;
86 } 86 }
@@ -96,11 +96,11 @@ int sci_light(scilabEnv env, int nin, scilabVar* in, int nopt, scilabOpt opt, in
96 return 0; 96 return 0;
97 } 97 }
98 98
99 if (stricmp(str, "directional") == 0) 99 if (os_stricmp(str, "directional") == 0)
100 { 100 {
101 type = 0; 101 type = 0;
102 } 102 }
103 else if (stricmp(str, "point") == 0) 103 else if (os_stricmp(str, "point") == 0)
104 { 104 {
105 type = 1; 105 type = 1;
106 } 106 }
diff --git a/scilab/modules/graphics/sci_gateway/c/sci_set.c b/scilab/modules/graphics/sci_gateway/c/sci_set.c
index fe947f1..129c093 100644
--- a/scilab/modules/graphics/sci_gateway/c/sci_set.c
+++ b/scilab/modules/graphics/sci_gateway/c/sci_set.c
@@ -341,16 +341,16 @@ int sci_set(char *fname, void *pvApiCtx)
341 return 1; 341 return 1;
342 } 342 }
343 343
344 if ((pstProperty[0] == 'd' || pstProperty[0] == 'D') && stricmp("data", pstProperty) == 0) 344 if ((pstProperty[0] == 'd' || pstProperty[0] == 'D') && os_stricmp("data", pstProperty) == 0)
345 { 345 {
346 //send to datamodel 346 //send to datamodel
347 isData = 1; 347 isData = 1;
348 } 348 }
349 349
350 if (stricmp(pstProperty, "user_data") == 0 || 350 if (os_stricmp(pstProperty, "user_data") == 0 ||
351 stricmp(pstProperty, "userdata") == 0 || 351 os_stricmp(pstProperty, "userdata") == 0 ||
352 stricmp(pstProperty, "display_function_data") == 0 || 352 os_stricmp(pstProperty, "display_function_data") == 0 ||
353 stricmp(pstProperty, "data") == 0) 353 os_stricmp(pstProperty, "data") == 0)
354 { 354 {
355 /* in this case set_user_data_property 355 /* in this case set_user_data_property
356 * directly uses the third position in the stack 356 * directly uses the third position in the stack
@@ -385,8 +385,8 @@ int sci_set(char *fname, void *pvApiCtx)
385 case sci_strings : 385 case sci_strings :
386 if (strcmp(pstProperty, "tics_labels") != 0 && strcmp(pstProperty, "auto_ticks") != 0 && strcmp(pstProperty, "tight_limits") != 0 && 386 if (strcmp(pstProperty, "tics_labels") != 0 && strcmp(pstProperty, "auto_ticks") != 0 && strcmp(pstProperty, "tight_limits") != 0 &&
387 strcmp(pstProperty, "axes_visible") != 0 && strcmp(pstProperty, "axes_reverse") != 0 && 387 strcmp(pstProperty, "axes_visible") != 0 && strcmp(pstProperty, "axes_reverse") != 0 &&
388 strcmp(pstProperty, "text") != 0 && stricmp(pstProperty, "string") != 0 && 388 strcmp(pstProperty, "text") != 0 && os_stricmp(pstProperty, "string") != 0 &&
389 stricmp(pstProperty, "tooltipstring") != 0 && stricmp(pstProperty, "ticks_format") != 0) /* Added for uicontrols */ 389 os_stricmp(pstProperty, "tooltipstring") != 0 && os_stricmp(pstProperty, "ticks_format") != 0) /* Added for uicontrols */
390 { 390 {
391 if (isScalar(pvApiCtx, piAddr3) == 0) 391 if (isScalar(pvApiCtx, piAddr3) == 0)
392 { 392 {
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c b/scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c
index 8e4c940..d98ab33 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/getPropertyAssignedValue.c
@@ -59,27 +59,27 @@ int tryGetBooleanValueFromStack(void* _pvData, int _iType, int _iRows, int _iCol
59{ 59{
60 if (_iType == sci_strings) 60 if (_iType == sci_strings)
61 { 61 {
62 if (stricmp((char*)_pvData, "on") == 0) 62 if (os_stricmp((char*)_pvData, "on") == 0)
63 { 63 {
64 return TRUE; 64 return TRUE;
65 } 65 }
66 if (stricmp((char*)_pvData, "off") == 0) 66 if (os_stricmp((char*)_pvData, "off") == 0)
67 { 67 {
68 return FALSE; 68 return FALSE;
69 } 69 }
70 if (stricmp((char*)_pvData, "1") == 0) 70 if (os_stricmp((char*)_pvData, "1") == 0)
71 { 71 {
72 return TRUE; 72 return TRUE;
73 } 73 }
74 if (stricmp((char*)_pvData, "0") == 0) 74 if (os_stricmp((char*)_pvData, "0") == 0)
75 { 75 {
76 return FALSE; 76 return FALSE;
77 } 77 }
78 if (stricmp((char*)_pvData, "T") == 0) 78 if (os_stricmp((char*)_pvData, "T") == 0)
79 { 79 {
80 return TRUE; 80 return TRUE;
81 } 81 }
82 if (stricmp((char*)_pvData, "F") == 0) 82 if (os_stricmp((char*)_pvData, "F") == 0)
83 { 83 {
84 return FALSE; 84 return FALSE;
85 } 85 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/setGetHashTable.c b/scilab/modules/graphics/src/c/getHandleProperty/setGetHashTable.c
index b615e43..5231f3b 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/setGetHashTable.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/setGetHashTable.c
@@ -43,7 +43,7 @@ static unsigned int setGetHashTableHash(void * key)
43/*--------------------------------------------------------------------------*/ 43/*--------------------------------------------------------------------------*/
44static int setGetHashTableEqualKeys(void * k1, void * k2) 44static int setGetHashTableEqualKeys(void * k1, void * k2)
45{ 45{
46 if (stricmp((char *)k1, (char *)k2) == 0) 46 if (os_stricmp((char *)k1, (char *)k2) == 0)
47 { 47 {
48 return 1; 48 return 1;
49 } 49 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_alignment_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_alignment_property.c
index 8e69a89..6704e55 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_alignment_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_alignment_property.c
@@ -42,15 +42,15 @@ int set_alignment_property(void* _pvCtx, int iObjUID, void* _pvData, int valueTy
42 return SET_PROPERTY_ERROR; 42 return SET_PROPERTY_ERROR;
43 } 43 }
44 44
45 if (stricmp((char*)_pvData, "left") == 0) 45 if (os_stricmp((char*)_pvData, "left") == 0)
46 { 46 {
47 alignment = 0; 47 alignment = 0;
48 } 48 }
49 else if (stricmp((char*)_pvData, "center") == 0) 49 else if (os_stricmp((char*)_pvData, "center") == 0)
50 { 50 {
51 alignment = 1; 51 alignment = 1;
52 } 52 }
53 else if (stricmp((char*)_pvData, "right") == 0) 53 else if (os_stricmp((char*)_pvData, "right") == 0)
54 { 54 {
55 alignment = 2; 55 alignment = 2;
56 } 56 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c
index 1ab53ec..596a409 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_anti_aliasing_property.c
@@ -44,23 +44,23 @@ int set_anti_aliasing_property(void* _pvCtx, int iObjUID, void* _pvData, int val
44 return SET_PROPERTY_ERROR; 44 return SET_PROPERTY_ERROR;
45 } 45 }
46 46
47 if (stricmp((char*)_pvData, "off") == 0) 47 if (os_stricmp((char*)_pvData, "off") == 0)
48 { 48 {
49 quality = 0; 49 quality = 0;
50 } 50 }
51 else if (stricmp((char*)_pvData, "2x") == 0) 51 else if (os_stricmp((char*)_pvData, "2x") == 0)
52 { 52 {
53 quality = 1; 53 quality = 1;
54 } 54 }
55 else if (stricmp((char*)_pvData, "4x") == 0) 55 else if (os_stricmp((char*)_pvData, "4x") == 0)
56 { 56 {
57 quality = 2; 57 quality = 2;
58 } 58 }
59 else if (stricmp((char*)_pvData, "8x") == 0) 59 else if (os_stricmp((char*)_pvData, "8x") == 0)
60 { 60 {
61 quality = 3; 61 quality = 3;
62 } 62 }
63 else if (stricmp((char*)_pvData, "16x") == 0) 63 else if (os_stricmp((char*)_pvData, "16x") == 0)
64 { 64 {
65 quality = 4; 65 quality = 4;
66 } 66 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_arc_drawing_method_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_arc_drawing_method_property.c
index 17f2dc1..9587c7e 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_arc_drawing_method_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_arc_drawing_method_property.c
@@ -42,11 +42,11 @@ int set_arc_drawing_method_property(void* _pvCtx, int iObjUID, void* _pvData, in
42 return SET_PROPERTY_ERROR; 42 return SET_PROPERTY_ERROR;
43 } 43 }
44 44
45 if (stricmp((char*)_pvData, "nurbs") == 0) 45 if (os_stricmp((char*)_pvData, "nurbs") == 0)
46 { 46 {
47 arcDrawingMethod = 0; 47 arcDrawingMethod = 0;
48 } 48 }
49 else if (stricmp((char*)_pvData, "lines") == 0) 49 else if (os_stricmp((char*)_pvData, "lines") == 0)
50 { 50 {
51 arcDrawingMethod = 1; 51 arcDrawingMethod = 1;
52 } 52 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_border_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_border_property.c
index 8707d9e..721fa3a 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_border_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_border_property.c
@@ -316,11 +316,11 @@ int createCommonBevelBorder(void* _pvCtx, int* _piAddrList, int _iObjUID, int _i
316 return SET_PROPERTY_ERROR; 316 return SET_PROPERTY_ERROR;
317 } 317 }
318 318
319 if (stricmp(pstType, "raised") == 0) 319 if (os_stricmp(pstType, "raised") == 0)
320 { 320 {
321 iType = 0; 321 iType = 0;
322 } 322 }
323 else if (stricmp(pstType, "lowered") == 0) 323 else if (os_stricmp(pstType, "lowered") == 0)
324 { 324 {
325 iType = 1; 325 iType = 1;
326 } 326 }
@@ -466,11 +466,11 @@ int createEtchedBorder(void* _pvCtx, int* _piAddrList, int _iObjUID)
466 return SET_PROPERTY_ERROR; 466 return SET_PROPERTY_ERROR;
467 } 467 }
468 468
469 if (stricmp(pstType, "raised") == 0) 469 if (os_stricmp(pstType, "raised") == 0)
470 { 470 {
471 iType = 0; 471 iType = 0;
472 } 472 }
473 else if (stricmp(pstType, "lowered") == 0) 473 else if (os_stricmp(pstType, "lowered") == 0)
474 { 474 {
475 iType = 1; 475 iType = 1;
476 } 476 }
@@ -631,23 +631,23 @@ int createTitledBorder(void* _pvCtx, int* _piAddrList, int _iObjUID)
631 return SET_PROPERTY_ERROR; 631 return SET_PROPERTY_ERROR;
632 } 632 }
633 633
634 if (stricmp(pstJustification, "leading") == 0) 634 if (os_stricmp(pstJustification, "leading") == 0)
635 { 635 {
636 iJustification = 0; 636 iJustification = 0;
637 } 637 }
638 else if (stricmp(pstJustification, "left") == 0) 638 else if (os_stricmp(pstJustification, "left") == 0)
639 { 639 {
640 iJustification = 1; 640 iJustification = 1;
641 } 641 }
642 else if (stricmp(pstJustification, "center") == 0) 642 else if (os_stricmp(pstJustification, "center") == 0)
643 { 643 {
644 iJustification = 2; 644 iJustification = 2;
645 } 645 }
646 else if (stricmp(pstJustification, "right") == 0) 646 else if (os_stricmp(pstJustification, "right") == 0)
647 { 647 {
648 iJustification = 3; 648 iJustification = 3;
649 } 649 }
650 else if (stricmp(pstJustification, "trailing") == 0) 650 else if (os_stricmp(pstJustification, "trailing") == 0)
651 { 651 {
652 iJustification = 4; 652 iJustification = 4;
653 } 653 }
@@ -666,27 +666,27 @@ int createTitledBorder(void* _pvCtx, int* _piAddrList, int _iObjUID)
666 return SET_PROPERTY_ERROR; 666 return SET_PROPERTY_ERROR;
667 } 667 }
668 668
669 if (stricmp(pstPosition, "top") == 0) 669 if (os_stricmp(pstPosition, "top") == 0)
670 { 670 {
671 iPosition = 0; 671 iPosition = 0;
672 } 672 }
673 else if (stricmp(pstPosition, "above_top") == 0) 673 else if (os_stricmp(pstPosition, "above_top") == 0)
674 { 674 {
675 iPosition = 1; 675 iPosition = 1;
676 } 676 }
677 else if (stricmp(pstPosition, "below_top") == 0) 677 else if (os_stricmp(pstPosition, "below_top") == 0)
678 { 678 {
679 iPosition = 2; 679 iPosition = 2;
680 } 680 }
681 else if (stricmp(pstPosition, "bottom") == 0) 681 else if (os_stricmp(pstPosition, "bottom") == 0)
682 { 682 {
683 iPosition = 3; 683 iPosition = 3;
684 } 684 }
685 else if (stricmp(pstPosition, "above_bottom") == 0) 685 else if (os_stricmp(pstPosition, "above_bottom") == 0)
686 { 686 {
687 iPosition = 4; 687 iPosition = 4;
688 } 688 }
689 else if (stricmp(pstPosition, "below_bottom") == 0) 689 else if (os_stricmp(pstPosition, "below_bottom") == 0)
690 { 690 {
691 iPosition = 5; 691 iPosition = 5;
692 } 692 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_box_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_box_property.c
index 7d07381..bc3bdf3 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_box_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_box_property.c
@@ -60,23 +60,23 @@ int set_box_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, in
60 { 60 {
61 int boxType; 61 int boxType;
62 62
63 if (stricmp((char*)_pvData, "off") == 0) 63 if (os_stricmp((char*)_pvData, "off") == 0)
64 { 64 {
65 boxType = 0; 65 boxType = 0;
66 } 66 }
67 else if (stricmp((char*)_pvData, "on") == 0) 67 else if (os_stricmp((char*)_pvData, "on") == 0)
68 { 68 {
69 boxType = 1; 69 boxType = 1;
70 } 70 }
71 else if (stricmp((char*)_pvData, "hidden_axes") == 0) 71 else if (os_stricmp((char*)_pvData, "hidden_axes") == 0)
72 { 72 {
73 boxType = 2; 73 boxType = 2;
74 } 74 }
75 else if (stricmp((char*)_pvData, "back_half") == 0) 75 else if (os_stricmp((char*)_pvData, "back_half") == 0)
76 { 76 {
77 boxType = 3; 77 boxType = 3;
78 } 78 }
79 else if (stricmp((char*)_pvData, "hidden_axis") == 0) 79 else if (os_stricmp((char*)_pvData, "hidden_axis") == 0)
80 { 80 {
81 Sciwarning(_("WARNING !!!\nIn '%s' property: '%s' is deprecated use '%s' instead.\n"), "box", "hidden_axis", "hidden_axes"); 81 Sciwarning(_("WARNING !!!\nIn '%s' property: '%s' is deprecated use '%s' instead.\n"), "box", "hidden_axis", "hidden_axes");
82 boxType = 2; 82 boxType = 2;
@@ -104,11 +104,11 @@ int set_box_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, in
104 { 104 {
105 int box; 105 int box;
106 106
107 if (stricmp((char*)_pvData, "on") == 0) 107 if (os_stricmp((char*)_pvData, "on") == 0)
108 { 108 {
109 box = 1; 109 box = 1;
110 } 110 }
111 else if (stricmp((char*)_pvData, "off") == 0) 111 else if (os_stricmp((char*)_pvData, "off") == 0)
112 { 112 {
113 box = 0; 113 box = 0;
114 } 114 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_cdata_mapping_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_cdata_mapping_property.c
index ac427df..146e0e0 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_cdata_mapping_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_cdata_mapping_property.c
@@ -45,11 +45,11 @@ int set_cdata_mapping_property(void* _pvCtx, int iObjUID, void* _pvData, int val
45 return SET_PROPERTY_ERROR; 45 return SET_PROPERTY_ERROR;
46 } 46 }
47 47
48 if (stricmp((char*)_pvData, "scaled") == 0) 48 if (os_stricmp((char*)_pvData, "scaled") == 0)
49 { 49 {
50 cdataMapping = 0; 50 cdataMapping = 0;
51 } 51 }
52 else if (stricmp((char*)_pvData, "direct") == 0) 52 else if (os_stricmp((char*)_pvData, "direct") == 0)
53 { 53 {
54 cdataMapping = 1; 54 cdataMapping = 1;
55 } 55 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_clip_state_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_clip_state_property.c
index d065511..70b90af 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_clip_state_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_clip_state_property.c
@@ -44,15 +44,15 @@ int set_clip_state_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
44 return SET_PROPERTY_ERROR; 44 return SET_PROPERTY_ERROR;
45 } 45 }
46 46
47 if (stricmp((char*)_pvData, "clipgrf") == 0) 47 if (os_stricmp((char*)_pvData, "clipgrf") == 0)
48 { 48 {
49 clipState = 1; 49 clipState = 1;
50 } 50 }
51 else if (stricmp((char*)_pvData, "off") == 0) 51 else if (os_stricmp((char*)_pvData, "off") == 0)
52 { 52 {
53 clipState = 0; 53 clipState = 0;
54 } 54 }
55 else if (stricmp((char*)_pvData, "on") == 0) 55 else if (os_stricmp((char*)_pvData, "on") == 0)
56 { 56 {
57 clipState = 2; 57 clipState = 2;
58 } 58 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c
index 8d64f66..49d52e9 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_constraints_property.c
@@ -105,23 +105,23 @@ int set_constraints_property(void* _pvCtx, int iObjUID, void* _pvData, int value
105 } 105 }
106 106
107 //convert string value to enum 107 //convert string value to enum
108 if (stricmp(pstPos, "center") == 0) 108 if (os_stricmp(pstPos, "center") == 0)
109 { 109 {
110 iPos = BORDER_CENTER; 110 iPos = BORDER_CENTER;
111 } 111 }
112 else if (stricmp(pstPos, "bottom") == 0) 112 else if (os_stricmp(pstPos, "bottom") == 0)
113 { 113 {
114 iPos = BORDER_BOTTOM; 114 iPos = BORDER_BOTTOM;
115 } 115 }
116 else if (stricmp(pstPos, "top") == 0) 116 else if (os_stricmp(pstPos, "top") == 0)
117 { 117 {
118 iPos = BORDER_TOP; 118 iPos = BORDER_TOP;
119 } 119 }
120 else if (stricmp(pstPos, "left") == 0) 120 else if (os_stricmp(pstPos, "left") == 0)
121 { 121 {
122 iPos = BORDER_LEFT; 122 iPos = BORDER_LEFT;
123 } 123 }
124 else if (stricmp(pstPos, "right") == 0) 124 else if (os_stricmp(pstPos, "right") == 0)
125 { 125 {
126 iPos = BORDER_RIGHT; 126 iPos = BORDER_RIGHT;
127 } 127 }
@@ -232,19 +232,19 @@ int set_constraints_property(void* _pvCtx, int iObjUID, void* _pvData, int value
232 } 232 }
233 233
234 //convert string value to enum 234 //convert string value to enum
235 if (stricmp(pstFill, "none") == 0) 235 if (os_stricmp(pstFill, "none") == 0)
236 { 236 {
237 iFill = FILL_NONE; 237 iFill = FILL_NONE;
238 } 238 }
239 else if (stricmp(pstFill, "horizontal") == 0) 239 else if (os_stricmp(pstFill, "horizontal") == 0)
240 { 240 {
241 iFill = FILL_HORIZONTAL; 241 iFill = FILL_HORIZONTAL;
242 } 242 }
243 else if (stricmp(pstFill, "vertical") == 0) 243 else if (os_stricmp(pstFill, "vertical") == 0)
244 { 244 {
245 iFill = FILL_VERTICAL; 245 iFill = FILL_VERTICAL;
246 } 246 }
247 else if (stricmp(pstFill, "both") == 0) 247 else if (os_stricmp(pstFill, "both") == 0)
248 { 248 {
249 iFill = FILL_BOTH; 249 iFill = FILL_BOTH;
250 } 250 }
@@ -269,39 +269,39 @@ int set_constraints_property(void* _pvCtx, int iObjUID, void* _pvData, int value
269 } 269 }
270 270
271 //convert string value to enum 271 //convert string value to enum
272 if (stricmp(pstAnchor, "center") == 0) 272 if (os_stricmp(pstAnchor, "center") == 0)
273 { 273 {
274 iAnchor = ANCHOR_CENTER; 274 iAnchor = ANCHOR_CENTER;
275 } 275 }
276 else if (stricmp(pstAnchor, "upper") == 0) 276 else if (os_stricmp(pstAnchor, "upper") == 0)
277 { 277 {
278 iAnchor = ANCHOR_UPPER; 278 iAnchor = ANCHOR_UPPER;
279 } 279 }
280 else if (stricmp(pstAnchor, "lower") == 0) 280 else if (os_stricmp(pstAnchor, "lower") == 0)
281 { 281 {
282 iAnchor = ANCHOR_LOWER; 282 iAnchor = ANCHOR_LOWER;
283 } 283 }
284 else if (stricmp(pstAnchor, "right") == 0) 284 else if (os_stricmp(pstAnchor, "right") == 0)
285 { 285 {
286 iAnchor = ANCHOR_RIGHT; 286 iAnchor = ANCHOR_RIGHT;
287 } 287 }
288 else if (stricmp(pstAnchor, "left") == 0) 288 else if (os_stricmp(pstAnchor, "left") == 0)
289 { 289 {
290 iAnchor = ANCHOR_LEFT; 290 iAnchor = ANCHOR_LEFT;
291 } 291 }
292 else if (stricmp(pstAnchor, "upper_right") == 0) 292 else if (os_stricmp(pstAnchor, "upper_right") == 0)
293 { 293 {
294 iAnchor = ANCHOR_UPPER_RIGHT; 294 iAnchor = ANCHOR_UPPER_RIGHT;
295 } 295 }
296 else if (stricmp(pstAnchor, "upper_left") == 0) 296 else if (os_stricmp(pstAnchor, "upper_left") == 0)
297 { 297 {
298 iAnchor = ANCHOR_UPPER_LEFT; 298 iAnchor = ANCHOR_UPPER_LEFT;
299 } 299 }
300 else if (stricmp(pstAnchor, "lower_right") == 0) 300 else if (os_stricmp(pstAnchor, "lower_right") == 0)
301 { 301 {
302 iAnchor = ANCHOR_LOWER_RIGHT; 302 iAnchor = ANCHOR_LOWER_RIGHT;
303 } 303 }
304 else if (stricmp(pstAnchor, "lower_left") == 0) 304 else if (os_stricmp(pstAnchor, "lower_left") == 0)
305 { 305 {
306 iAnchor = ANCHOR_LOWER_LEFT; 306 iAnchor = ANCHOR_LOWER_LEFT;
307 } 307 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_data_mapping_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_data_mapping_property.c
index 334cf25..678bda8 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_data_mapping_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_data_mapping_property.c
@@ -47,11 +47,11 @@ int set_data_mapping_property(void* _pvCtx, int iObjUID, void* _pvData, int valu
47 return SET_PROPERTY_ERROR; 47 return SET_PROPERTY_ERROR;
48 } 48 }
49 49
50 if (stricmp((char*)_pvData, "scaled") == 0) 50 if (os_stricmp((char*)_pvData, "scaled") == 0)
51 { 51 {
52 dataMapping = 0; 52 dataMapping = 0;
53 } 53 }
54 else if (stricmp((char*)_pvData, "direct") == 0) 54 else if (os_stricmp((char*)_pvData, "direct") == 0)
55 { 55 {
56 dataMapping = 1; 56 dataMapping = 1;
57 } 57 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c
index bb1be18..da00b1e 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_figure_style_property.c
@@ -37,12 +37,12 @@ int set_figure_style_property(void* _pvCtx, int iObjUID, void* _pvData, int valu
37 return SET_PROPERTY_ERROR; 37 return SET_PROPERTY_ERROR;
38 } 38 }
39 39
40 if (stricmp((char*)_pvData, "old") == 0) 40 if (os_stricmp((char*)_pvData, "old") == 0)
41 { 41 {
42 Scierror(999, _("Old graphic mode is no longer available. Please refer to the set help page.\n")); 42 Scierror(999, _("Old graphic mode is no longer available. Please refer to the set help page.\n"));
43 return SET_PROPERTY_ERROR; 43 return SET_PROPERTY_ERROR;
44 } 44 }
45 else if (stricmp((char*)_pvData, "new") == 0) 45 else if (os_stricmp((char*)_pvData, "new") == 0)
46 { 46 {
47 /* graphic mode must be new */ 47 /* graphic mode must be new */
48 /* nothing to do */ 48 /* nothing to do */
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_grid_position_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_grid_position_property.c
index 9f7b52f..e9632f7 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_grid_position_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_grid_position_property.c
@@ -41,11 +41,11 @@ int set_grid_position_property(void* _pvCtx, int iObjUID, void* _pvData, int val
41 return SET_PROPERTY_ERROR; 41 return SET_PROPERTY_ERROR;
42 } 42 }
43 43
44 if (stricmp((char*)_pvData, "foreground") == 0) 44 if (os_stricmp((char*)_pvData, "foreground") == 0)
45 { 45 {
46 position = 1; 46 position = 1;
47 } 47 }
48 else if (stricmp((char*)_pvData, "background") == 0) 48 else if (os_stricmp((char*)_pvData, "background") == 0)
49 { 49 {
50 position = 0; 50 position = 0;
51 } 51 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_image_type_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_image_type_property.c
index 80defad..dc2f231 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_image_type_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_image_type_property.c
@@ -51,55 +51,55 @@ int set_image_type_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
51 return SET_PROPERTY_ERROR; 51 return SET_PROPERTY_ERROR;
52 } 52 }
53 53
54 if (stricmp((char*)_pvData, "rgb") == 0) 54 if (os_stricmp((char*)_pvData, "rgb") == 0)
55 { 55 {
56 imagetype = (int)MATPLOT_RGB; 56 imagetype = (int)MATPLOT_RGB;
57 } 57 }
58 else if (stricmp((char*)_pvData, "rgba") == 0) 58 else if (os_stricmp((char*)_pvData, "rgba") == 0)
59 { 59 {
60 imagetype = (int)MATPLOT_RGBA; 60 imagetype = (int)MATPLOT_RGBA;
61 } 61 }
62 else if (stricmp((char*)_pvData, "argb") == 0) 62 else if (os_stricmp((char*)_pvData, "argb") == 0)
63 { 63 {
64 imagetype = (int)MATPLOT_ARGB; 64 imagetype = (int)MATPLOT_ARGB;
65 } 65 }
66 else if (stricmp((char*)_pvData, "gray") == 0) 66 else if (os_stricmp((char*)_pvData, "gray") == 0)
67 { 67 {
68 imagetype = (int)MATPLOT_GRAY; 68 imagetype = (int)MATPLOT_GRAY;
69 } 69 }
70 else if (stricmp((char*)_pvData, "index") == 0) 70 else if (os_stricmp((char*)_pvData, "index") == 0)
71 { 71 {
72 imagetype = (int)MATPLOT_INDEX; 72 imagetype = (int)MATPLOT_INDEX;
73 } 73 }
74 else if (stricmp((char*)_pvData, "red") == 0) 74 else if (os_stricmp((char*)_pvData, "red") == 0)
75 { 75 {
76 imagetype = (int)MATPLOT_RED; 76 imagetype = (int)MATPLOT_RED;
77 } 77 }
78 else if (stricmp((char*)_pvData, "green") == 0) 78 else if (os_stricmp((char*)_pvData, "green") == 0)
79 { 79 {
80 imagetype = (int)MATPLOT_GREEN; 80 imagetype = (int)MATPLOT_GREEN;
81 } 81 }
82 else if (stricmp((char*)_pvData, "blue") == 0) 82 else if (os_stricmp((char*)_pvData, "blue") == 0)
83 { 83 {
84 imagetype = (int)MATPLOT_BLUE; 84 imagetype = (int)MATPLOT_BLUE;
85 } 85 }
86 else if (stricmp((char*)_pvData, "rgb332") == 0) 86 else if (os_stricmp((char*)_pvData, "rgb332") == 0)
87 { 87 {
88 imagetype = (int)MATPLOT_RGB_332; 88 imagetype = (int)MATPLOT_RGB_332;
89 } 89 }
90 else if (stricmp((char*)_pvData, "rgb444") == 0) 90 else if (os_stricmp((char*)_pvData, "rgb444") == 0)
91 { 91 {
92 imagetype = (int)MATPLOT_RGB_444; 92 imagetype = (int)MATPLOT_RGB_444;
93 } 93 }
94 else if (stricmp((char*)_pvData, "rgba4444") == 0) 94 else if (os_stricmp((char*)_pvData, "rgba4444") == 0)
95 { 95 {
96 imagetype = (int)MATPLOT_RGBA_4444; 96 imagetype = (int)MATPLOT_RGBA_4444;
97 } 97 }
98 else if (stricmp((char*)_pvData, "rgb555") == 0) 98 else if (os_stricmp((char*)_pvData, "rgb555") == 0)
99 { 99 {
100 imagetype = (int)MATPLOT_RGB_555; 100 imagetype = (int)MATPLOT_RGB_555;
101 } 101 }
102 else if (stricmp((char*)_pvData, "rgba5551") == 0) 102 else if (os_stricmp((char*)_pvData, "rgba5551") == 0)
103 { 103 {
104 imagetype = (int)MATPLOT_RGBA_5551; 104 imagetype = (int)MATPLOT_RGBA_5551;
105 } 105 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_layout_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_layout_property.c
index b7b3246..e5808e5 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_layout_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_layout_property.c
@@ -54,19 +54,19 @@ int set_layout_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType,
54 return SET_PROPERTY_ERROR; 54 return SET_PROPERTY_ERROR;
55 } 55 }
56 56
57 if (stricmp((char*)_pvData, "none") == 0) 57 if (os_stricmp((char*)_pvData, "none") == 0)
58 { 58 {
59 layout = LAYOUT_NONE; 59 layout = LAYOUT_NONE;
60 } 60 }
61 else if (stricmp((char*)_pvData, "gridbag") == 0) 61 else if (os_stricmp((char*)_pvData, "gridbag") == 0)
62 { 62 {
63 layout = LAYOUT_GRIDBAG; 63 layout = LAYOUT_GRIDBAG;
64 } 64 }
65 else if (stricmp((char*)_pvData, "grid") == 0) 65 else if (os_stricmp((char*)_pvData, "grid") == 0)
66 { 66 {
67 layout = LAYOUT_GRID; 67 layout = LAYOUT_GRID;
68 } 68 }
69 else if (stricmp((char*)_pvData, "border") == 0) 69 else if (os_stricmp((char*)_pvData, "border") == 0)
70 { 70 {
71 layout = LAYOUT_BORDER; 71 layout = LAYOUT_BORDER;
72 } 72 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c
index d075e50..7034d6f 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_light_type_property.c
@@ -36,11 +36,11 @@ int set_light_type_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
36 return SET_PROPERTY_ERROR; 36 return SET_PROPERTY_ERROR;
37 } 37 }
38 38
39 if (stricmp((char*)_pvData, "directional") == 0) 39 if (os_stricmp((char*)_pvData, "directional") == 0)
40 { 40 {
41 val = 0; 41 val = 0;
42 } 42 }
43 else if (stricmp((char*)_pvData, "point") == 0) 43 else if (os_stricmp((char*)_pvData, "point") == 0)
44 { 44 {
45 val = 1; 45 val = 1;
46 } 46 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_unit_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_unit_property.c
index 3744608..37f7230 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_unit_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_mark_size_unit_property.c
@@ -44,11 +44,11 @@ int set_mark_size_unit_property(void* _pvCtx, int iObjUID, void* _pvData, int va
44 } 44 }
45 45
46 /* 0 : point, 1 : tabulated */ 46 /* 0 : point, 1 : tabulated */
47 if (stricmp((char*)_pvData, "point") == 0) 47 if (os_stricmp((char*)_pvData, "point") == 0)
48 { 48 {
49 markSizeUnit = 0; 49 markSizeUnit = 0;
50 } 50 }
51 else if (stricmp((char*)_pvData, "tabulated") == 0) 51 else if (os_stricmp((char*)_pvData, "tabulated") == 0)
52 { 52 {
53 markSizeUnit = 1; 53 markSizeUnit = 1;
54 } 54 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_menubar_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_menubar_property.c
index 4a290b4..b057e1c 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_menubar_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_menubar_property.c
@@ -34,11 +34,11 @@ int set_menubar_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType
34 return SET_PROPERTY_ERROR; 34 return SET_PROPERTY_ERROR;
35 } 35 }
36 36
37 if (stricmp((char*)_pvData, "none") == 0) 37 if (os_stricmp((char*)_pvData, "none") == 0)
38 { 38 {
39 menu = NONE; 39 menu = NONE;
40 } 40 }
41 else if (stricmp((char*)_pvData, "figure") == 0) 41 else if (os_stricmp((char*)_pvData, "figure") == 0)
42 { 42 {
43 menu = FIGURE; 43 menu = FIGURE;
44 } 44 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c
index 6e68108..44f1ccb 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_rotation_style_property.c
@@ -42,11 +42,11 @@ int set_rotation_style_property(void* _pvCtx, int iObjUID, void* _pvData, int va
42 return SET_PROPERTY_ERROR; 42 return SET_PROPERTY_ERROR;
43 } 43 }
44 44
45 if (stricmp((char*)_pvData, "unary") == 0) 45 if (os_stricmp((char*)_pvData, "unary") == 0)
46 { 46 {
47 rotationStyle = 0; 47 rotationStyle = 0;
48 } 48 }
49 else if (stricmp((char*)_pvData, "multiple") == 0) 49 else if (os_stricmp((char*)_pvData, "multiple") == 0)
50 { 50 {
51 rotationStyle = 1; 51 rotationStyle = 1;
52 } 52 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c
index df4124f..5c77dd8 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_tabtitle_property.c
@@ -59,19 +59,19 @@ int set_title_position_property(void* _pvCtx, int iObjUID, void* _pvData, int va
59 return SET_PROPERTY_ERROR; 59 return SET_PROPERTY_ERROR;
60 } 60 }
61 61
62 if (stricmp((char*)_pvData, "top") == 0) 62 if (os_stricmp((char*)_pvData, "top") == 0)
63 { 63 {
64 pos = TITLE_TOP; 64 pos = TITLE_TOP;
65 } 65 }
66 else if (stricmp((char*)_pvData, "left") == 0) 66 else if (os_stricmp((char*)_pvData, "left") == 0)
67 { 67 {
68 pos = TITLE_LEFT; 68 pos = TITLE_LEFT;
69 } 69 }
70 else if (stricmp((char*)_pvData, "bottom") == 0) 70 else if (os_stricmp((char*)_pvData, "bottom") == 0)
71 { 71 {
72 pos = TITLE_BOTTOM; 72 pos = TITLE_BOTTOM;
73 } 73 }
74 else if (stricmp((char*)_pvData, "right") == 0) 74 else if (os_stricmp((char*)_pvData, "right") == 0)
75 { 75 {
76 pos = TITLE_RIGHT; 76 pos = TITLE_RIGHT;
77 } 77 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_text_box_mode_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_text_box_mode_property.c
index eded3be..6ef43b8 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_text_box_mode_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_text_box_mode_property.c
@@ -47,17 +47,17 @@ int set_text_box_mode_property(void* _pvCtx, int iObjUID, void* _pvData, int val
47 return SET_PROPERTY_ERROR; 47 return SET_PROPERTY_ERROR;
48 } 48 }
49 49
50 if (stricmp((char*)_pvData, "off") == 0) 50 if (os_stricmp((char*)_pvData, "off") == 0)
51 { 51 {
52 autoSize = 1; 52 autoSize = 1;
53 textBoxMode = 0; 53 textBoxMode = 0;
54 } 54 }
55 else if (stricmp((char*)_pvData, "centered") == 0) 55 else if (os_stricmp((char*)_pvData, "centered") == 0)
56 { 56 {
57 autoSize = 1; 57 autoSize = 1;
58 textBoxMode = 1; 58 textBoxMode = 1;
59 } 59 }
60 else if (stricmp((char*)_pvData, "filled") == 0) 60 else if (os_stricmp((char*)_pvData, "filled") == 0)
61 { 61 {
62 autoSize = 0; 62 autoSize = 0;
63 textBoxMode = 2; 63 textBoxMode = 2;
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c
index 2cfdc2d..56e1126 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_tics_direction_property.c
@@ -56,11 +56,11 @@ int set_tics_direction_property(void* _pvCtx, int iObjUID, void* _pvData, int va
56 56
57 if (yNumberTicks == 1) 57 if (yNumberTicks == 1)
58 { 58 {
59 if (stricmp((char*)_pvData, "top") == 0) 59 if (os_stricmp((char*)_pvData, "top") == 0)
60 { 60 {
61 ticksDirection = 0; 61 ticksDirection = 0;
62 } 62 }
63 else if (stricmp((char*)_pvData, "bottom") == 0) 63 else if (os_stricmp((char*)_pvData, "bottom") == 0)
64 { 64 {
65 ticksDirection = 1; 65 ticksDirection = 1;
66 } 66 }
@@ -72,11 +72,11 @@ int set_tics_direction_property(void* _pvCtx, int iObjUID, void* _pvData, int va
72 } 72 }
73 else 73 else
74 { 74 {
75 if (stricmp((char*)_pvData, "left") == 0) 75 if (os_stricmp((char*)_pvData, "left") == 0)
76 { 76 {
77 ticksDirection = 2; 77 ticksDirection = 2;
78 } 78 }
79 else if (stricmp((char*)_pvData, "right") == 0) 79 else if (os_stricmp((char*)_pvData, "right") == 0)
80 { 80 {
81 ticksDirection = 3; 81 ticksDirection = 3;
82 } 82 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_tics_style_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_tics_style_property.c
index 094dada..707823f 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_tics_style_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_tics_style_property.c
@@ -47,9 +47,9 @@ int set_tics_style_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
47 return SET_PROPERTY_ERROR; 47 return SET_PROPERTY_ERROR;
48 } 48 }
49 49
50 if ( stricmp((char*)_pvData, "v") != 0 && 50 if ( os_stricmp((char*)_pvData, "v") != 0 &&
51 stricmp((char*)_pvData, "r") != 0 && 51 os_stricmp((char*)_pvData, "r") != 0 &&
52 stricmp((char*)_pvData, "i") != 0) 52 os_stricmp((char*)_pvData, "i") != 0)
53 { 53 {
54 Scierror(999, _("Wrong value for '%s' property: Must be in the set {%s}.\n"), "tics_style", "v, r, i"); 54 Scierror(999, _("Wrong value for '%s' property: Must be in the set {%s}.\n"), "tics_style", "v, r, i");
55 return SET_PROPERTY_ERROR; 55 return SET_PROPERTY_ERROR;
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_toolbar_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_toolbar_property.c
index 1d262a1..64e4186 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_toolbar_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_toolbar_property.c
@@ -34,11 +34,11 @@ int set_toolbar_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType
34 return SET_PROPERTY_ERROR; 34 return SET_PROPERTY_ERROR;
35 } 35 }
36 36
37 if (stricmp((char*)_pvData, "none") == 0) 37 if (os_stricmp((char*)_pvData, "none") == 0)
38 { 38 {
39 tool = NONE; 39 tool = NONE;
40 } 40 }
41 else if (stricmp((char*)_pvData, "figure") == 0) 41 else if (os_stricmp((char*)_pvData, "figure") == 0)
42 { 42 {
43 tool = FIGURE; 43 tool = FIGURE;
44 } 44 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
index b10de1a..fdd9a17 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_view_property.c
@@ -43,11 +43,11 @@ int set_view_property(void* _pvCtx, int iObjUID, void* _pvData, int valueType, i
43 return SET_PROPERTY_ERROR; 43 return SET_PROPERTY_ERROR;
44 } 44 }
45 45
46 if (stricmp((char*)_pvData, "2d") == 0) 46 if (os_stricmp((char*)_pvData, "2d") == 0)
47 { 47 {
48 viewType = 0; 48 viewType = 0;
49 } 49 }
50 else if (stricmp((char*)_pvData, "3d") == 0) 50 else if (os_stricmp((char*)_pvData, "3d") == 0)
51 { 51 {
52 viewType = 1; 52 viewType = 1;
53 } 53 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c
index b504f98..401f391 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_x_location_property.c
@@ -43,19 +43,19 @@ int set_x_location_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
43 return SET_PROPERTY_ERROR; 43 return SET_PROPERTY_ERROR;
44 } 44 }
45 45
46 if (stricmp((char*)_pvData, "bottom") == 0) 46 if (os_stricmp((char*)_pvData, "bottom") == 0)
47 { 47 {
48 axisLocation = 0; 48 axisLocation = 0;
49 } 49 }
50 else if (stricmp((char*)_pvData, "top") == 0) 50 else if (os_stricmp((char*)_pvData, "top") == 0)
51 { 51 {
52 axisLocation = 1; 52 axisLocation = 1;
53 } 53 }
54 else if (stricmp((char*)_pvData, "middle") == 0) 54 else if (os_stricmp((char*)_pvData, "middle") == 0)
55 { 55 {
56 axisLocation = 2; 56 axisLocation = 2;
57 } 57 }
58 else if (stricmp((char*)_pvData, "origin") == 0) 58 else if (os_stricmp((char*)_pvData, "origin") == 0)
59 { 59 {
60 axisLocation = 3; 60 axisLocation = 3;
61 } 61 }
diff --git a/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c b/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c
index 746fe45..074daee 100644
--- a/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c
+++ b/scilab/modules/graphics/src/c/getHandleProperty/set_y_location_property.c
@@ -43,19 +43,19 @@ int set_y_location_property(void* _pvCtx, int iObjUID, void* _pvData, int valueT
43 return SET_PROPERTY_ERROR; 43 return SET_PROPERTY_ERROR;
44 } 44 }
45 45
46 if (stricmp((char*)_pvData, "left") == 0) 46 if (os_stricmp((char*)_pvData, "left") == 0)
47 { 47 {
48 axisLocation = 4; 48 axisLocation = 4;
49 } 49 }
50 else if (stricmp((char*)_pvData, "right") == 0) 50 else if (os_stricmp((char*)_pvData, "right") == 0)
51 { 51 {
52 axisLocation = 5; 52 axisLocation = 5;
53 } 53 }
54 else if (stricmp((char*)_pvData, "middle") == 0) 54 else if (os_stricmp((char*)_pvData, "middle") == 0)
55 { 55 {
56 axisLocation = 2; 56 axisLocation = 2;
57 } 57 }
58 else if (stricmp((char*)_pvData, "origin") == 0) 58 else if (os_stricmp((char*)_pvData, "origin") == 0)
59 { 59 {
60 axisLocation = 3; 60 axisLocation = 3;
61 } 61 }
diff --git a/scilab/modules/graphics/src/c/name2rgb.c b/scilab/modules/graphics/src/c/name2rgb.c
index a160dc6..a76bb5f 100644
--- a/scilab/modules/graphics/src/c/name2rgb.c
+++ b/scilab/modules/graphics/src/c/name2rgb.c
@@ -1619,7 +1619,7 @@ void name2rgb(char* color, double* _pdblRGB)
1619 int colorSize2 = sizeof(colorRGB) / (sizeof(int) * 3); 1619 int colorSize2 = sizeof(colorRGB) / (sizeof(int) * 3);
1620 for (i = 0 ; i < colorSize ; i++) 1620 for (i = 0 ; i < colorSize ; i++)
1621 { 1621 {
1622 if (stricmp(colorName[i], color) == 0) 1622 if (os_stricmp(colorName[i], color) == 0)
1623 { 1623 {
1624 _pdblRGB[0] = (double)colorRGB[i][0]; 1624 _pdblRGB[0] = (double)colorRGB[i][0];
1625 _pdblRGB[1] = (double)colorRGB[i][1]; 1625 _pdblRGB[1] = (double)colorRGB[i][1];
diff --git a/scilab/modules/gui/sci_gateway/c/sci_figure.c b/scilab/modules/gui/sci_gateway/c/sci_figure.c
index f6ee833..e56e994 100644
--- a/scilab/modules/gui/sci_gateway/c/sci_figure.c
+++ b/scilab/modules/gui/sci_gateway/c/sci_figure.c
@@ -186,18 +186,18 @@ int sci_figure(char * fname, void* pvApiCtx)
186 return 1; 186 return 1;
187 } 187 }
188 188
189 if (stricmp(pstProName, "dockable") != 0 && 189 if (os_stricmp(pstProName, "dockable") != 0 &&
190 stricmp(pstProName, "toolbar") != 0 && 190 os_stricmp(pstProName, "toolbar") != 0 &&
191 stricmp(pstProName, "menubar") != 0 && 191 os_stricmp(pstProName, "menubar") != 0 &&
192 stricmp(pstProName, "default_axes") != 0 && 192 os_stricmp(pstProName, "default_axes") != 0 &&
193 stricmp(pstProName, "visible") != 0 && 193 os_stricmp(pstProName, "visible") != 0 &&
194 stricmp(pstProName, "figure_size") != 0 && 194 os_stricmp(pstProName, "figure_size") != 0 &&
195 stricmp(pstProName, "axes_size") != 0 && 195 os_stricmp(pstProName, "axes_size") != 0 &&
196 stricmp(pstProName, "position") != 0 && 196 os_stricmp(pstProName, "position") != 0 &&
197 stricmp(pstProName, "menubar_visible") != 0 && 197 os_stricmp(pstProName, "menubar_visible") != 0 &&
198 stricmp(pstProName, "toolbar_visible") != 0 && 198 os_stricmp(pstProName, "toolbar_visible") != 0 &&
199 stricmp(pstProName, "resize") != 0 && 199 os_stricmp(pstProName, "resize") != 0 &&
200 stricmp(pstProName, "infobar_visible") != 0) 200 os_stricmp(pstProName, "infobar_visible") != 0)
201 { 201 {
202 freeAllocatedSingleString(pstProName); 202 freeAllocatedSingleString(pstProName);
203 continue; 203 continue;
@@ -212,7 +212,7 @@ int sci_figure(char * fname, void* pvApiCtx)
212 } 212 }
213 213
214 //check property value to compatibility 214 //check property value to compatibility
215 if (stricmp(pstProName, "dockable") == 0) 215 if (os_stricmp(pstProName, "dockable") == 0)
216 { 216 {
217 bDockable = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 217 bDockable = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
218 if (bDockable == -1) 218 if (bDockable == -1)
@@ -222,7 +222,7 @@ int sci_figure(char * fname, void* pvApiCtx)
222 return 1; 222 return 1;
223 } 223 }
224 } 224 }
225 else if (stricmp(pstProName, "toolbar") == 0) 225 else if (os_stricmp(pstProName, "toolbar") == 0)
226 { 226 {
227 char* pstVal = NULL; 227 char* pstVal = NULL;
228 if (isStringType(pvApiCtx, piAddrData) == FALSE || isScalar(pvApiCtx, piAddrData) == FALSE) 228 if (isStringType(pvApiCtx, piAddrData) == FALSE || isScalar(pvApiCtx, piAddrData) == FALSE)
@@ -233,11 +233,11 @@ int sci_figure(char * fname, void* pvApiCtx)
233 233
234 getAllocatedSingleString(pvApiCtx, piAddrData, &pstVal); 234 getAllocatedSingleString(pvApiCtx, piAddrData, &pstVal);
235 235
236 if (stricmp(pstVal, "none") == 0) 236 if (os_stricmp(pstVal, "none") == 0)
237 { 237 {
238 iToolbarType = 0; 238 iToolbarType = 0;
239 } 239 }
240 else if (stricmp(pstVal, "figure") == 0) 240 else if (os_stricmp(pstVal, "figure") == 0)
241 { 241 {
242 iToolbarType = 1; 242 iToolbarType = 1;
243 } 243 }
@@ -251,7 +251,7 @@ int sci_figure(char * fname, void* pvApiCtx)
251 251
252 freeAllocatedSingleString(pstVal); 252 freeAllocatedSingleString(pstVal);
253 } 253 }
254 else if (stricmp(pstProName, "menubar") == 0) 254 else if (os_stricmp(pstProName, "menubar") == 0)
255 { 255 {
256 char* pstVal = NULL; 256 char* pstVal = NULL;
257 if (isStringType(pvApiCtx, piAddrData) == FALSE || isScalar(pvApiCtx, piAddrData) == FALSE) 257 if (isStringType(pvApiCtx, piAddrData) == FALSE || isScalar(pvApiCtx, piAddrData) == FALSE)
@@ -263,11 +263,11 @@ int sci_figure(char * fname, void* pvApiCtx)
263 263
264 getAllocatedSingleString(pvApiCtx, piAddrData, &pstVal); 264 getAllocatedSingleString(pvApiCtx, piAddrData, &pstVal);
265 265
266 if (stricmp(pstVal, "none") == 0) 266 if (os_stricmp(pstVal, "none") == 0)
267 { 267 {
268 iMenubarType = 0; 268 iMenubarType = 0;
269 } 269 }
270 else if (stricmp(pstVal, "figure") == 0) 270 else if (os_stricmp(pstVal, "figure") == 0)
271 { 271 {
272 iMenubarType = 1; 272 iMenubarType = 1;
273 } 273 }
@@ -281,7 +281,7 @@ int sci_figure(char * fname, void* pvApiCtx)
281 281
282 freeAllocatedSingleString(pstVal); 282 freeAllocatedSingleString(pstVal);
283 } 283 }
284 else if (stricmp(pstProName, "default_axes") == 0) 284 else if (os_stricmp(pstProName, "default_axes") == 0)
285 { 285 {
286 bDefaultAxes = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 286 bDefaultAxes = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
287 if (bDefaultAxes == -1) 287 if (bDefaultAxes == -1)
@@ -291,7 +291,7 @@ int sci_figure(char * fname, void* pvApiCtx)
291 return 1; 291 return 1;
292 } 292 }
293 } 293 }
294 else if (stricmp(pstProName, "visible") == 0) 294 else if (os_stricmp(pstProName, "visible") == 0)
295 { 295 {
296 bVisible = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 296 bVisible = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
297 if (bVisible == -1) 297 if (bVisible == -1)
@@ -301,7 +301,7 @@ int sci_figure(char * fname, void* pvApiCtx)
301 return 1; 301 return 1;
302 } 302 }
303 } 303 }
304 else if (stricmp(pstProName, "figure_size") == 0) 304 else if (os_stricmp(pstProName, "figure_size") == 0)
305 { 305 {
306 int iRows = 0; 306 int iRows = 0;
307 int iCols = 0; 307 int iCols = 0;
@@ -318,7 +318,7 @@ int sci_figure(char * fname, void* pvApiCtx)
318 return 1; 318 return 1;
319 } 319 }
320 } 320 }
321 else if (stricmp(pstProName, "axes_size") == 0) 321 else if (os_stricmp(pstProName, "axes_size") == 0)
322 { 322 {
323 int iRows = 0; 323 int iRows = 0;
324 int iCols = 0; 324 int iCols = 0;
@@ -335,7 +335,7 @@ int sci_figure(char * fname, void* pvApiCtx)
335 return 1; 335 return 1;
336 } 336 }
337 } 337 }
338 else if (stricmp(pstProName, "position") == 0) 338 else if (os_stricmp(pstProName, "position") == 0)
339 { 339 {
340 int iRows = 0; 340 int iRows = 0;
341 int iCols = 0; 341 int iCols = 0;
@@ -376,7 +376,7 @@ int sci_figure(char * fname, void* pvApiCtx)
376 return 1; 376 return 1;
377 } 377 }
378 } 378 }
379 else if (stricmp(pstProName, "resize") == 0) 379 else if (os_stricmp(pstProName, "resize") == 0)
380 { 380 {
381 bResize = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 381 bResize = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
382 if (bResize == -1) 382 if (bResize == -1)
@@ -386,7 +386,7 @@ int sci_figure(char * fname, void* pvApiCtx)
386 return 1; 386 return 1;
387 } 387 }
388 } 388 }
389 else if (stricmp(pstProName, "menubar_visible") == 0) 389 else if (os_stricmp(pstProName, "menubar_visible") == 0)
390 { 390 {
391 bMenuBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 391 bMenuBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
392 if (bMenuBar == -1) 392 if (bMenuBar == -1)
@@ -396,7 +396,7 @@ int sci_figure(char * fname, void* pvApiCtx)
396 return 1; 396 return 1;
397 } 397 }
398 } 398 }
399 else if (stricmp(pstProName, "toolbar_visible") == 0) 399 else if (os_stricmp(pstProName, "toolbar_visible") == 0)
400 { 400 {
401 bToolBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 401 bToolBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
402 if (bToolBar == -1) 402 if (bToolBar == -1)
@@ -406,7 +406,7 @@ int sci_figure(char * fname, void* pvApiCtx)
406 return 1; 406 return 1;
407 } 407 }
408 } 408 }
409 else if (stricmp(pstProName, "infobar_visible") == 0) 409 else if (os_stricmp(pstProName, "infobar_visible") == 0)
410 { 410 {
411 bInfoBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData); 411 bInfoBar = getStackArgumentAsBoolean(pvApiCtx, piAddrData);
412 if (bInfoBar == -1) 412 if (bInfoBar == -1)
@@ -451,18 +451,18 @@ int sci_figure(char * fname, void* pvApiCtx)
451 } 451 }
452 452
453 if (bDoCreation && ( 453 if (bDoCreation && (
454 stricmp(pstProName, "dockable") == 0 || 454 os_stricmp(pstProName, "dockable") == 0 ||
455 stricmp(pstProName, "toolbar") == 0 || 455 os_stricmp(pstProName, "toolbar") == 0 ||
456 stricmp(pstProName, "menubar") == 0 || 456 os_stricmp(pstProName, "menubar") == 0 ||
457 stricmp(pstProName, "default_axes") == 0 || 457 os_stricmp(pstProName, "default_axes") == 0 ||
458 stricmp(pstProName, "visible") == 0 || 458 os_stricmp(pstProName, "visible") == 0 ||
459 stricmp(pstProName, "figure_size") == 0 || 459 os_stricmp(pstProName, "figure_size") == 0 ||
460 stricmp(pstProName, "axes_size") == 0 || 460 os_stricmp(pstProName, "axes_size") == 0 ||
461 stricmp(pstProName, "position") == 0 || 461 os_stricmp(pstProName, "position") == 0 ||
462 stricmp(pstProName, "resize") == 0 || 462 os_stricmp(pstProName, "resize") == 0 ||
463 stricmp(pstProName, "menubar_visible") == 0 || 463 os_stricmp(pstProName, "menubar_visible") == 0 ||
464 stricmp(pstProName, "toolbar_visible") == 0 || 464 os_stricmp(pstProName, "toolbar_visible") == 0 ||
465 stricmp(pstProName, "infobar_visible") == 0)) 465 os_stricmp(pstProName, "infobar_visible") == 0))
466 { 466 {
467 // Already set creating new figure 467 // Already set creating new figure
468 // but let the set_ function fail if figure already exists 468 // but let the set_ function fail if figure already exists
@@ -481,7 +481,7 @@ int sci_figure(char * fname, void* pvApiCtx)
481 481
482 getVarType(pvApiCtx, piAddrData, &iType); 482 getVarType(pvApiCtx, piAddrData, &iType);
483 483
484 if ((strcmp(pstProName, "user_data") == 0) || (stricmp(pstProName, "userdata") == 0)) 484 if ((strcmp(pstProName, "user_data") == 0) || (os_stricmp(pstProName, "userdata") == 0))
485 { 485 {
486 /* in this case set_user_data_property 486 /* in this case set_user_data_property
487 * directly uses the third position in the stack 487 * directly uses the third position in the stack
@@ -508,8 +508,8 @@ int sci_figure(char * fname, void* pvApiCtx)
508 case sci_strings : 508 case sci_strings :
509 if ( strcmp(pstProName, "tics_labels") != 0 && strcmp(pstProName, "auto_ticks") != 0 && 509 if ( strcmp(pstProName, "tics_labels") != 0 && strcmp(pstProName, "auto_ticks") != 0 &&
510 strcmp(pstProName, "axes_visible") != 0 && strcmp(pstProName, "axes_reverse") != 0 && 510 strcmp(pstProName, "axes_visible") != 0 && strcmp(pstProName, "axes_reverse") != 0 &&
511 strcmp(pstProName, "text") != 0 && stricmp(pstProName, "string") != 0 && 511 strcmp(pstProName, "text") != 0 && os_stricmp(pstProName, "string") != 0 &&
512 stricmp(pstProName, "tooltipstring") != 0) /* Added for uicontrols */ 512 os_stricmp(pstProName, "tooltipstring") != 0) /* Added for uicontrols */
513 { 513 {
514 if (getAllocatedSingleString(pvApiCtx, piAddrData, (char**)&_pvData)) 514 if (getAllocatedSingleString(pvApiCtx, piAddrData, (char**)&_pvData))
515 { 515 {
@@ -543,7 +543,7 @@ int sci_figure(char * fname, void* pvApiCtx)
543 // * add it to colormap => performed by callSetProperty 543 // * add it to colormap => performed by callSetProperty
544 // * set background to index => performed by callSetProperty 544 // * set background to index => performed by callSetProperty
545 // * copy value into axes background property 545 // * copy value into axes background property
546 if (stricmp(pstProName, "backgroundcolor") == 0 && iAxes > 0) 546 if (