Merge remote-tracking branch 'origin/master' into windows
[scilab.git] / scilab / modules / completion / sci_gateway / cpp / sci_completion.cpp
index 8b01fa6..ec95ca8 100644 (file)
@@ -60,7 +60,7 @@ types::Function::ReturnValue sci_completion(types::typed_list &in, int _iRetCoun
         return types::Function::Error;
     }
 
-    pcSomechars = wide_string_to_UTF8(pStrSomechars->get(0));
+    pcSomechars = pStrSomechars->get(0);
 
     if (in.size() == 1)
     {
@@ -113,28 +113,28 @@ types::Function::ReturnValue sci_completion(types::typed_list &in, int _iRetCoun
             return types::Function::Error;
         }
 
-        wchar_t* wcsDictionary = pStrDictionary->get(0);
-        if ( wcscmp(wcsDictionary, L"functions") == 0 )
+        char* dictionary = pStrDictionary->get(0);
+        if (strcmp(dictionary, "functions") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnFunctions));
         }
-        else if ( wcscmp(wcsDictionary, L"commands") == 0 )
+        else if (strcmp(dictionary, "commands") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnCommandWords));
         }
-        else if ( wcscmp(wcsDictionary, L"variables") == 0 )
+        else if (strcmp(dictionary, "variables") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnVariables));
         }
-        else if ( wcscmp(wcsDictionary, L"macros") == 0 )
+        else if (strcmp(dictionary, "macros") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnMacros));
         }
-        else if ( wcscmp(wcsDictionary, L"graphic_properties") == 0 )
+        else if (strcmp(dictionary, "graphic_properties") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnHandleGraphicsProperties));
         }
-        else if ( wcscmp(wcsDictionary, L"files") == 0 )
+        else if (strcmp(dictionary, "files") == 0)
         {
             out.push_back(doCompletion(pcSomechars, &completionOnFiles));
         }
@@ -147,7 +147,6 @@ types::Function::ReturnValue sci_completion(types::typed_list &in, int _iRetCoun
         }
     }
 
-    FREE(pcSomechars);
     return types::Function::OK;
 }
 /*--------------------------------------------------------------------------*/