summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-10 08:27:39 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-10 08:27:39 +0100
commit2ded3117215ff751fbd27fe4708313e7258431df (patch)
tree23f61d351727782fbf6145f0355ed8ba8825e590
parent4ad1c509e77194b3b3d16c6d756659ad8d587ff9 (diff)
downloadscilab-2ded3117215ff751fbd27fe4708313e7258431df.zip
scilab-2ded3117215ff751fbd27fe4708313e7258431df.tar.gz
utf: core 3
Change-Id: Ic8bc3f1f437ce6ce715bbe53463fa45718bf8122
-rw-r--r--scilab/modules/core/includes/timer.hxx2
-rw-r--r--scilab/modules/core/includes/version.h.vc3
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_debug.cpp10
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_global.cpp2
-rw-r--r--scilab/modules/core/sci_gateway/cpp/sci_newfun.cpp2
-rw-r--r--scilab/modules/core/src/cpp/InitScilab.cpp4
-rw-r--r--scilab/modules/startup/src/cpp/scilab.cpp2
7 files changed, 11 insertions, 14 deletions
diff --git a/scilab/modules/core/includes/timer.hxx b/scilab/modules/core/includes/timer.hxx
index fa3fb91..1c52ac0 100644
--- a/scilab/modules/core/includes/timer.hxx
+++ b/scilab/modules/core/includes/timer.hxx
@@ -127,7 +127,7 @@ public:
127 double t = elapsed_time(); 127 double t = elapsed_time();
128 if (_msg.empty() == false) 128 if (_msg.empty() == false)
129 { 129 {
130 std::cerr << "[" << _msg << "]" << L" : "; 130 std::cerr << "[" << _msg << "]" << " : ";
131 } 131 }
132 std::cerr << "Elapsed time [" 132 std::cerr << "Elapsed time ["
133 << std::setiosflags(std::ios::fixed) 133 << std::setiosflags(std::ios::fixed)
diff --git a/scilab/modules/core/includes/version.h.vc b/scilab/modules/core/includes/version.h.vc
index 648a7eb..d146f10 100644
--- a/scilab/modules/core/includes/version.h.vc
+++ b/scilab/modules/core/includes/version.h.vc
@@ -16,7 +16,6 @@
16#define SCI_VERSION_MINOR 0 16#define SCI_VERSION_MINOR 0
17#define SCI_VERSION_MAINTENANCE 0 17#define SCI_VERSION_MAINTENANCE 0
18#define SCI_VERSION_STRING "scilab-branch-master" 18#define SCI_VERSION_STRING "scilab-branch-master"
19#define SCI_VERSION_WIDE_STRING L"scilab-branch-master"
20/* SCI_VERSION_REVISION --> hash key commit */ 19/* SCI_VERSION_REVISION --> hash key commit */
21#define SCI_VERSION_REVISION 0 20#define SCI_VERSION_REVISION 0
22#define SCI_VERSION_TIMESTAMP 0 21#define SCI_VERSION_TIMESTAMP 0
@@ -26,7 +25,7 @@ void disp_scilab_version(void);
26/* for compatibility */ 25/* for compatibility */
27/* Deprecated */ 26/* Deprecated */
28#define SCI_VERSION SCI_VERSION_STRING 27#define SCI_VERSION SCI_VERSION_STRING
29#define DEFAULT_SCI_VERSION_MESSAGE L"scilab-branch-master" 28#define DEFAULT_SCI_VERSION_MESSAGE "scilab-branch-master"
30 29
31#endif 30#endif
32/*--------------------------------------------------------------------------*/ 31/*--------------------------------------------------------------------------*/
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_debug.cpp b/scilab/modules/core/sci_gateway/cpp/sci_debug.cpp
index 500bf16..dc9f492 100644
--- a/scilab/modules/core/sci_gateway/cpp/sci_debug.cpp
+++ b/scilab/modules/core/sci_gateway/cpp/sci_debug.cpp
@@ -325,7 +325,7 @@ types::Function::ReturnValue sci_debug(types::typed_list &in, int _iRetCount, ty
325 std::ostringstream ostr; 325 std::ostringstream ostr;
326 ast::PrintVisitor pp(ostr, true, true, true); 326 ast::PrintVisitor pp(ostr, true, true, true);
327 manager->getExp()->accept(pp); 327 manager->getExp()->accept(pp);
328 sciprint(_("%ls"), ostr.str().data()); 328 sciprint(_("%s"), ostr.str().data());
329 } 329 }
330 else 330 else
331 { 331 {
@@ -479,8 +479,8 @@ types::Function::ReturnValue sci_debug(types::typed_list &in, int _iRetCount, ty
479 std::ostringstream ostr; 479 std::ostringstream ostr;
480 ast::PrintVisitor pp(ostr, true, true, true); 480 ast::PrintVisitor pp(ostr, true, true, true);
481 manager->getExp()->accept(pp); 481 manager->getExp()->accept(pp);
482#define BT_PRINT "#%-5d%ls (line %d)\n" 482#define BT_PRINT "#%-5d%s (line %d)\n"
483 sciprint("#%-5d%ls\n", 0, ostr.str().data()); 483 sciprint("#%-5d%s\n", 0, ostr.str().data());
484 484
485 ConfigVariable::WhereVector where = ConfigVariable::getWhere(); 485 ConfigVariable::WhereVector where = ConfigVariable::getWhere();
486 auto it1 = where.rbegin(); 486 auto it1 = where.rbegin();
@@ -502,7 +502,7 @@ types::Function::ReturnValue sci_debug(types::typed_list &in, int _iRetCount, ty
502 break; 502 break;
503 } 503 }
504 504
505 sciprint("Unknown command \"%ls\".\n\n", command.c_str()); 505 sciprint("Unknown command \"%s\".\n\n", command.c_str());
506 sciprint("use 'h' for more information\n\n"); 506 sciprint("use 'h' for more information\n\n");
507 return types::Function::OK; 507 return types::Function::OK;
508} 508}
@@ -545,7 +545,7 @@ void print_help()
545 545
546EnumCommand getCommand(const std::string& command) 546EnumCommand getCommand(const std::string& command)
547{ 547{
548 wchar_t c = command[0]; 548 char c = command[0];
549 549
550 switch (c) 550 switch (c)
551 { 551 {
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_global.cpp b/scilab/modules/core/sci_gateway/cpp/sci_global.cpp
index 502666f..37aef69 100644
--- a/scilab/modules/core/sci_gateway/cpp/sci_global.cpp
+++ b/scilab/modules/core/sci_gateway/cpp/sci_global.cpp
@@ -21,7 +21,7 @@ extern "C"
21#include "Scierror.h" 21#include "Scierror.h"
22} 22}
23 23
24#define FORBIDDEN_CHARS L" */\\.,;:^@><!=+-&|()~\n\t'\"" 24#define FORBIDDEN_CHARS " */\\.,;:^@><!=+-&|()~\n\t'\""
25 25
26types::Function::ReturnValue sci_global(types::typed_list &in, int _iRetCount, types::typed_list &out) 26types::Function::ReturnValue sci_global(types::typed_list &in, int _iRetCount, types::typed_list &out)
27{ 27{
diff --git a/scilab/modules/core/sci_gateway/cpp/sci_newfun.cpp b/scilab/modules/core/sci_gateway/cpp/sci_newfun.cpp
index ac609e8..7b1cf23 100644
--- a/scilab/modules/core/sci_gateway/cpp/sci_newfun.cpp
+++ b/scilab/modules/core/sci_gateway/cpp/sci_newfun.cpp
@@ -39,7 +39,7 @@ bool isValidName(const char* _pstName)
39 int size = (int)strlen(_pstName); 39 int size = (int)strlen(_pstName);
40 for (int i = 1 ; i < size ; ++i) 40 for (int i = 1 ; i < size ; ++i)
41 { 41 {
42 wchar_t c = _pstName[i]; 42 char c = _pstName[i];
43 if (c != '_' && c != '?' && c != '!' && isalnum(c) == false) 43 if (c != '_' && c != '?' && c != '!' && isalnum(c) == false)
44 { 44 {
45 return false; 45 return false;
diff --git a/scilab/modules/core/src/cpp/InitScilab.cpp b/scilab/modules/core/src/cpp/InitScilab.cpp
index a0ed0ba..10da8a7 100644
--- a/scilab/modules/core/src/cpp/InitScilab.cpp
+++ b/scilab/modules/core/src/cpp/InitScilab.cpp
@@ -221,9 +221,7 @@ int StartScilabEngine(ScilabEngineInfo* _pSEI)
221 221
222 if (_pSEI->pstLang) 222 if (_pSEI->pstLang)
223 { 223 {
224 wchar_t *pwstLang = to_wide_string(_pSEI->pstLang); 224 setlanguage(_pSEI->pstLang);
225 setlanguage(pwstLang);
226 FREE(pwstLang);
227 } 225 }
228 226
229#ifdef _MSC_VER 227#ifdef _MSC_VER
diff --git a/scilab/modules/startup/src/cpp/scilab.cpp b/scilab/modules/startup/src/cpp/scilab.cpp
index 975fd4c..96e63d1 100644
--- a/scilab/modules/startup/src/cpp/scilab.cpp
+++ b/scilab/modules/startup/src/cpp/scilab.cpp
@@ -334,7 +334,7 @@ int main(int argc, char *argv[])
334 else 334 else
335 { 335 {
336 // We probably had a segfault so print error 336 // We probably had a segfault so print error
337 std::wcerr << getLastErrorMessage() << std::endl; 337 std::cerr << getLastErrorMessage() << std::endl;
338 return val; 338 return val;
339 } 339 }
340} 340}