diff options
author | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-23 23:30:42 +1000 |
commit | 825a3d837a33f226c879cd02ad15c3fba57e8b2c (patch) | |
tree | 75f57bd9c4253508d338dc79ba8e57a7abc42255 /libraries/ecore/src/lib/ecore_file/ecore_file.c | |
parent | Add ability to disable the test harness, or the Lua compile test. (diff) | |
download | SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.zip SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.gz SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.bz2 SledjHamr-825a3d837a33f226c879cd02ad15c3fba57e8b2c.tar.xz |
Update the EFL to what I'm actually using, coz I'm using some stuff not yet released.
Diffstat (limited to '')
-rw-r--r-- | libraries/ecore/src/lib/ecore_file/ecore_file.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file.c b/libraries/ecore/src/lib/ecore_file/ecore_file.c index 2546f2f..cfbf2b5 100644 --- a/libraries/ecore/src/lib/ecore_file/ecore_file.c +++ b/libraries/ecore/src/lib/ecore_file/ecore_file.c | |||
@@ -2,6 +2,7 @@ | |||
2 | # include <config.h> | 2 | # include <config.h> |
3 | #endif | 3 | #endif |
4 | 4 | ||
5 | #include <stdlib.h> | ||
5 | #include <stdio.h> | 6 | #include <stdio.h> |
6 | #include <string.h> | 7 | #include <string.h> |
7 | 8 | ||
@@ -597,11 +598,7 @@ ecore_file_mv(const char *src, const char *dst) | |||
597 | dir, ecore_file_file_get(dst)); | 598 | dir, ecore_file_file_get(dst)); |
598 | free(dir); | 599 | free(dir); |
599 | fd = mkstemp(buf); | 600 | fd = mkstemp(buf); |
600 | if (fd < 0) | 601 | if (fd < 0) goto FAIL; |
601 | { | ||
602 | perror("mkstemp"); | ||
603 | goto FAIL; | ||
604 | } | ||
605 | close(fd); | 602 | close(fd); |
606 | 603 | ||
607 | // Copy to temp file | 604 | // Copy to temp file |
@@ -761,7 +758,7 @@ ecore_file_can_write(const char *file) | |||
761 | } | 758 | } |
762 | 759 | ||
763 | /** | 760 | /** |
764 | * @bbrief Check if the given file can be executed. | 761 | * @brief Check if the given file can be executed. |
765 | * | 762 | * |
766 | * @param file The name of the file. | 763 | * @param file The name of the file. |
767 | * @return EINA_TRUE if the file can be executed, EINA_FALSE otherwise. | 764 | * @return EINA_TRUE if the file can be executed, EINA_FALSE otherwise. |
@@ -859,7 +856,7 @@ ecore_file_app_exe_get(const char *app) | |||
859 | 856 | ||
860 | p = (char *)app; | 857 | p = (char *)app; |
861 | restart: | 858 | restart: |
862 | while ((*p) && (isspace(*p))) p++; | 859 | while ((*p) && (isspace((unsigned char)*p))) p++; |
863 | exe1 = p; | 860 | exe1 = p; |
864 | while (*p) | 861 | while (*p) |
865 | { | 862 | { |
@@ -879,7 +876,7 @@ restart: | |||
879 | in_quot_sing = 1; | 876 | in_quot_sing = 1; |
880 | else if (*p == '\"') | 877 | else if (*p == '\"') |
881 | in_quot_dbl = 1; | 878 | in_quot_dbl = 1; |
882 | if ((isspace(*p)) && (!((p > app) && (p[-1] != '\\')))) | 879 | if ((isspace((unsigned char)*p)) && ((p <= app) || (p[-1] == '\\'))) |
883 | break; | 880 | break; |
884 | } | 881 | } |
885 | p++; | 882 | p++; |
@@ -974,7 +971,7 @@ restart: | |||
974 | in_quot_sing = 1; | 971 | in_quot_sing = 1; |
975 | else if (*p == '\"') | 972 | else if (*p == '\"') |
976 | in_quot_dbl = 1; | 973 | in_quot_dbl = 1; |
977 | else if (isspace(*p)) | 974 | else if (isspace((unsigned char)*p)) |
978 | { | 975 | { |
979 | if (restart) | 976 | if (restart) |
980 | goto restart; | 977 | goto restart; |
@@ -1040,7 +1037,7 @@ ecore_file_escape_name(const char *filename) | |||
1040 | } | 1037 | } |
1041 | 1038 | ||
1042 | /** | 1039 | /** |
1043 | * @bried Remove the extension from the given file name. | 1040 | * @brief Remove the extension from the given file name. |
1044 | * | 1041 | * |
1045 | * @param path The name of the file. | 1042 | * @param path The name of the file. |
1046 | * @return A newly allocated string with the extension stripped out or | 1043 | * @return A newly allocated string with the extension stripped out or |