summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-10 08:29:44 +0100
committerAntoine ELIAS <antoine.elias@scilab-enterprises.com>2016-11-10 08:29:44 +0100
commitc5473fda805b8a58c7b1f4f52f6adaaa3ded09ec (patch)
tree4ac68209742b953963d026cedbba556976f66841
parent120e12f8b2c85db5b513e9f4ef1c9c4fc58fedb4 (diff)
downloadscilab-c5473fda805b8a58c7b1f4f52f6adaaa3ded09ec.zip
scilab-c5473fda805b8a58c7b1f4f52f6adaaa3ded09ec.tar.gz
utf: fileio 2
Change-Id: I4bf30a724eba96af85d45d9c3fafc7d83648e17e
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp2
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp2
-rw-r--r--scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp2
-rw-r--r--scilab/modules/fileio/src/c/FindFileExtension.c8
-rw-r--r--scilab/modules/fileio/src/c/getlongpathname.h11
5 files changed, 4 insertions, 21 deletions
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp
index e6b64cb..e99a709 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_createdir.cpp
@@ -54,7 +54,7 @@ types::Function::ReturnValue sci_createdir(types::typed_list &in, int _iRetCount
54 { 54 {
55 if (getWarningMode()) 55 if (getWarningMode())
56 { 56 {
57 sciprint(_("%ls: Warning: Directory '%ls' already exists.\n"), L"createdir", pstPath); 57 sciprint(_("%s: Warning: Directory '%s' already exists.\n"), "createdir", pstPath);
58 } 58 }
59 iRet = 1; 59 iRet = 1;
60 } 60 }
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp
index debcc2e..ad1af38 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_meof.cpp
@@ -68,7 +68,7 @@ types::Function::ReturnValue sci_meof(types::typed_list &in, int _iRetCount, typ
68 { 68 {
69 if (getWarningMode()) 69 if (getWarningMode())
70 { 70 {
71 sciprint(_("%ls: Cannot check the end of file whose descriptor is %d: File is not active.\n"), "meof", iFile); 71 sciprint(_("%s: Cannot check the end of file whose descriptor is %d: File is not active.\n"), "meof", iFile);
72 } 72 }
73 return types::Function::OK; 73 return types::Function::OK;
74 } 74 }
diff --git a/scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp b/scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp
index fffa23b..96a8275 100644
--- a/scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp
+++ b/scilab/modules/fileio/sci_gateway/cpp/sci_removedir.cpp
@@ -50,7 +50,7 @@ types::Function::ReturnValue sci_removedir(types::typed_list &in, int _iRetCount
50 { 50 {
51 if (getWarningMode()) 51 if (getWarningMode())
52 { 52 {
53 sciprint(_("%s: Warning: Directory '%ls' does not exist.\n"), "removedir", pstPath); 53 sciprint(_("%s: Warning: Directory '%s' does not exist.\n"), "removedir", pstPath);
54 } 54 }
55 } 55 }
56 else 56 else
diff --git a/scilab/modules/fileio/src/c/FindFileExtension.c b/scilab/modules/fileio/src/c/FindFileExtension.c
index 7c43c1e..169a0da 100644
--- a/scilab/modules/fileio/src/c/FindFileExtension.c
+++ b/scilab/modules/fileio/src/c/FindFileExtension.c
@@ -49,13 +49,7 @@ char *FindFileExtension(char *filename)
49 } 49 }
50#else 50#else
51 { 51 {
52 wchar_t *wcFilename = to_wide_string(filename); 52 extension = PathFindExtensionA(filename);
53 if (wcFilename)
54 {
55 extension = wide_string_to_UTF8(PathFindExtensionW(wcFilename));
56 FREE(wcFilename);
57 wcFilename = NULL;
58 }
59 } 53 }
60#endif 54#endif
61 } 55 }
diff --git a/scilab/modules/fileio/src/c/getlongpathname.h b/scilab/modules/fileio/src/c/getlongpathname.h
index 725aaa5..e211da9 100644
--- a/scilab/modules/fileio/src/c/getlongpathname.h
+++ b/scilab/modules/fileio/src/c/getlongpathname.h
@@ -27,16 +27,5 @@
27*/ 27*/
28FILEIO_IMPEXP char *getlongpathname(char *shortpathname, BOOL *convertok); 28FILEIO_IMPEXP char *getlongpathname(char *shortpathname, BOOL *convertok);
29 29
30/**
31* Retrieves the long path form of the specified path (wide string)
32* @param[in] short path name
33* @param[out] TRUE if conversion is ok
34* @return long path name
35* on Linux returns same path name
36* used for Windows
37*/
38FILEIO_IMPEXP wchar_t *getlongpathnameW(wchar_t *wcshortpathname, BOOL *convertok);
39
40
41#endif /* __GETLONGPATHNAME_H__ */ 30#endif /* __GETLONGPATHNAME_H__ */
42/*--------------------------------------------------------------------------*/ 31/*--------------------------------------------------------------------------*/