utf: optimization 2 71/18671/1
Antoine ELIAS [Thu, 10 Nov 2016 07:34:05 +0000 (08:34 +0100)]
Change-Id: I77cee4270844963228ead97225e965d1a9820bfb

scilab/modules/optimization/sci_gateway/cpp/sci_readmps.cpp
scilab/modules/optimization/src/cpp/optimizationfunctions.cpp

index 1f81064..1ab1059 100644 (file)
@@ -54,7 +54,6 @@ types::Function::ReturnValue sci_readmps(types::typed_list &in, int _iRetCount,
     int line        = 0;
     char typrow[2];
 
-    wchar_t* wcsFileName = NULL;
     char* strErrorBuf = new char[bsiz];
 
     double big = NumericConstants::double_max;
index 78b3117..303f2c0 100644 (file)
@@ -112,7 +112,7 @@ void OptimizationFunctions::execCostf(int *ind, int *n, double *x, double *f, do
         ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringOptimCostfFunctionDyn->get(0));
         if (func == NULL)
         {
-            sprintf(errorMsg, _("Undefined function '%ls'.\n"), m_pStringOptimCostfFunctionDyn->get(0));
+            sprintf(errorMsg, _("Undefined function '%s'.\n"), m_pStringOptimCostfFunctionDyn->get(0));
             throw ast::InternalError(errorMsg);
         }
         ((costf_t)(func->functionPtr))(ind, n, x, f, g, ti, tr, td);
@@ -141,7 +141,7 @@ void OptimizationFunctions::execFsolveFct(int* n, double* x, double* v, int* ifl
         ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringFsolveFctFunctionDyn->get(0));
         if (func == NULL)
         {
-            sprintf(errorMsg, _("Undefined function '%ls'.\n"), m_pStringFsolveFctFunctionDyn->get(0));
+            sprintf(errorMsg, _("Undefined function '%s'.\n"), m_pStringFsolveFctFunctionDyn->get(0));
             throw ast::InternalError(errorMsg);
         }
         ((fct_t)(func->functionPtr))(n, x, v, iflag);
@@ -168,7 +168,7 @@ void OptimizationFunctions::execFsolveJac(int* n, double* x, double* v, double*
         ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringFsolveJacFunctionDyn->get(0));
         if (func == NULL)
         {
-            sprintf(errorMsg, _("Undefined function '%ls'.\n"), m_pStringFsolveJacFunctionDyn->get(0));
+            sprintf(errorMsg, _("Undefined function '%s'.\n"), m_pStringFsolveJacFunctionDyn->get(0));
             throw ast::InternalError(errorMsg);
         }
         // c or fortran jac fuction are the same proto as fct
@@ -199,7 +199,7 @@ void OptimizationFunctions::execLsqrsolveFct(int* m, int* n, double* x, double*
         ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringFsolveFctFunctionDyn->get(0));
         if (func == NULL)
         {
-            sprintf(errorMsg, _("Undefined function '%ls'.\n"), m_pStringFsolveFctFunctionDyn->get(0));
+            sprintf(errorMsg, _("Undefined function '%s'.\n"), m_pStringFsolveFctFunctionDyn->get(0));
             throw ast::InternalError(errorMsg);
         }
         ((lsqrfct_t)(func->functionPtr))(m, n, x, v, iflag);
@@ -226,7 +226,7 @@ void OptimizationFunctions::execLsqrsolveJac(int* m, int* n, double* x, double*
         ConfigVariable::EntryPointStr* func = ConfigVariable::getEntryPoint(m_pStringFsolveJacFunctionDyn->get(0));
         if (func == NULL)
         {
-            sprintf(errorMsg, _("Undefined function '%ls'.\n"), m_pStringFsolveJacFunctionDyn->get(0));
+            sprintf(errorMsg, _("Undefined function '%s'.\n"), m_pStringFsolveJacFunctionDyn->get(0));
             throw ast::InternalError(errorMsg);
         }
         // c or fortran jac fuction are the same proto as fct