aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/ecore/src/lib/ecore_file
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ecore/src/lib/ecore_file')
-rw-r--r--libraries/ecore/src/lib/ecore_file/Makefile.in14
-rw-r--r--libraries/ecore/src/lib/ecore_file/ecore_file.c17
-rw-r--r--libraries/ecore/src/lib/ecore_file/ecore_file_download.c3
-rw-r--r--libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c1
-rw-r--r--libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c1
-rw-r--r--libraries/ecore/src/lib/ecore_file/ecore_file_path.c3
6 files changed, 26 insertions, 13 deletions
diff --git a/libraries/ecore/src/lib/ecore_file/Makefile.in b/libraries/ecore/src/lib/ecore_file/Makefile.in
index 34945b3..04e0bf1 100644
--- a/libraries/ecore/src/lib/ecore_file/Makefile.in
+++ b/libraries/ecore/src/lib/ecore_file/Makefile.in
@@ -250,10 +250,10 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
250PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ 250PIXMAN_CFLAGS = @PIXMAN_CFLAGS@
251PIXMAN_LIBS = @PIXMAN_LIBS@ 251PIXMAN_LIBS = @PIXMAN_LIBS@
252PKG_CONFIG = @PKG_CONFIG@ 252PKG_CONFIG = @PKG_CONFIG@
253PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
254PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
255POSUB = @POSUB@ 253POSUB = @POSUB@
256RANLIB = @RANLIB@ 254RANLIB = @RANLIB@
255SCIM_CFLAGS = @SCIM_CFLAGS@
256SCIM_LIBS = @SCIM_LIBS@
257SDL_CFLAGS = @SDL_CFLAGS@ 257SDL_CFLAGS = @SDL_CFLAGS@
258SDL_CONFIG = @SDL_CONFIG@ 258SDL_CONFIG = @SDL_CONFIG@
259SDL_LIBS = @SDL_LIBS@ 259SDL_LIBS = @SDL_LIBS@
@@ -272,6 +272,10 @@ TSLIB_LIBS = @TSLIB_LIBS@
272USE_NLS = @USE_NLS@ 272USE_NLS = @USE_NLS@
273VERSION = @VERSION@ 273VERSION = @VERSION@
274VMAJ = @VMAJ@ 274VMAJ = @VMAJ@
275WAYLAND_CFLAGS = @WAYLAND_CFLAGS@
276WAYLAND_EGL_CFLAGS = @WAYLAND_EGL_CFLAGS@
277WAYLAND_EGL_LIBS = @WAYLAND_EGL_LIBS@
278WAYLAND_LIBS = @WAYLAND_LIBS@
275WIN32_CFLAGS = @WIN32_CFLAGS@ 279WIN32_CFLAGS = @WIN32_CFLAGS@
276WIN32_CPPFLAGS = @WIN32_CPPFLAGS@ 280WIN32_CPPFLAGS = @WIN32_CPPFLAGS@
277WIN32_LIBS = @WIN32_LIBS@ 281WIN32_LIBS = @WIN32_LIBS@
@@ -385,6 +389,8 @@ ecore_imf_cflags = @ecore_imf_cflags@
385ecore_imf_evas_cflags = @ecore_imf_evas_cflags@ 389ecore_imf_evas_cflags = @ecore_imf_evas_cflags@
386ecore_imf_evas_libs = @ecore_imf_evas_libs@ 390ecore_imf_evas_libs = @ecore_imf_evas_libs@
387ecore_imf_libs = @ecore_imf_libs@ 391ecore_imf_libs = @ecore_imf_libs@
392ecore_imf_scim_cflags = @ecore_imf_scim_cflags@
393ecore_imf_scim_libs = @ecore_imf_scim_libs@
388ecore_imf_xim_cflags = @ecore_imf_xim_cflags@ 394ecore_imf_xim_cflags = @ecore_imf_xim_cflags@
389ecore_imf_xim_libs = @ecore_imf_xim_libs@ 395ecore_imf_xim_libs = @ecore_imf_xim_libs@
390ecore_input_cflags = @ecore_input_cflags@ 396ecore_input_cflags = @ecore_input_cflags@
@@ -397,6 +403,8 @@ ecore_psl1ght_cflags = @ecore_psl1ght_cflags@
397ecore_psl1ght_libs = @ecore_psl1ght_libs@ 403ecore_psl1ght_libs = @ecore_psl1ght_libs@
398ecore_sdl_cflags = @ecore_sdl_cflags@ 404ecore_sdl_cflags = @ecore_sdl_cflags@
399ecore_sdl_libs = @ecore_sdl_libs@ 405ecore_sdl_libs = @ecore_sdl_libs@
406ecore_wayland_cflags = @ecore_wayland_cflags@
407ecore_wayland_libs = @ecore_wayland_libs@
400ecore_win32_cflags = @ecore_win32_cflags@ 408ecore_win32_cflags = @ecore_win32_cflags@
401ecore_win32_libs = @ecore_win32_libs@ 409ecore_win32_libs = @ecore_win32_libs@
402ecore_wince_cflags = @ecore_wince_cflags@ 410ecore_wince_cflags = @ecore_wince_cflags@
@@ -441,12 +449,14 @@ requirements_ecore_fb = @requirements_ecore_fb@
441requirements_ecore_file = @requirements_ecore_file@ 449requirements_ecore_file = @requirements_ecore_file@
442requirements_ecore_imf = @requirements_ecore_imf@ 450requirements_ecore_imf = @requirements_ecore_imf@
443requirements_ecore_imf_evas = @requirements_ecore_imf_evas@ 451requirements_ecore_imf_evas = @requirements_ecore_imf_evas@
452requirements_ecore_imf_scim = @requirements_ecore_imf_scim@
444requirements_ecore_imf_xim = @requirements_ecore_imf_xim@ 453requirements_ecore_imf_xim = @requirements_ecore_imf_xim@
445requirements_ecore_input = @requirements_ecore_input@ 454requirements_ecore_input = @requirements_ecore_input@
446requirements_ecore_input_evas = @requirements_ecore_input_evas@ 455requirements_ecore_input_evas = @requirements_ecore_input_evas@
447requirements_ecore_ipc = @requirements_ecore_ipc@ 456requirements_ecore_ipc = @requirements_ecore_ipc@
448requirements_ecore_psl1ght = @requirements_ecore_psl1ght@ 457requirements_ecore_psl1ght = @requirements_ecore_psl1ght@
449requirements_ecore_sdl = @requirements_ecore_sdl@ 458requirements_ecore_sdl = @requirements_ecore_sdl@
459requirements_ecore_wayland = @requirements_ecore_wayland@
450requirements_ecore_win32 = @requirements_ecore_win32@ 460requirements_ecore_win32 = @requirements_ecore_win32@
451requirements_ecore_wince = @requirements_ecore_wince@ 461requirements_ecore_wince = @requirements_ecore_wince@
452requirements_ecore_x = @requirements_ecore_x@ 462requirements_ecore_x = @requirements_ecore_x@
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;
861restart: 858restart:
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
diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_download.c b/libraries/ecore/src/lib/ecore_file/ecore_file_download.c
index c7efc4d..c5e56bd 100644
--- a/libraries/ecore/src/lib/ecore_file/ecore_file_download.c
+++ b/libraries/ecore/src/lib/ecore_file/ecore_file_download.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
@@ -14,6 +15,7 @@
14#ifdef BUILD_ECORE_CON 15#ifdef BUILD_ECORE_CON
15 16
16#define ECORE_MAGIC_FILE_DOWNLOAD_JOB 0xf7427cb8 17#define ECORE_MAGIC_FILE_DOWNLOAD_JOB 0xf7427cb8
18#define ECORE_FILE_DOWNLOAD_TIMEOUT 30
17 19
18struct _Ecore_File_Download_Job 20struct _Ecore_File_Download_Job
19{ 21{
@@ -360,6 +362,7 @@ _ecore_file_download_curl(const char *url, const char *dst,
360 } 362 }
361 363
362 if (headers) eina_hash_foreach(headers, _ecore_file_download_headers_foreach_cb, job); 364 if (headers) eina_hash_foreach(headers, _ecore_file_download_headers_foreach_cb, job);
365 ecore_con_url_timeout_set(job->url_con, ECORE_FILE_DOWNLOAD_TIMEOUT);
363 ecore_con_url_fd_set(job->url_con, fileno(job->file)); 366 ecore_con_url_fd_set(job->url_con, fileno(job->file));
364 ecore_con_url_data_set(job->url_con, data); 367 ecore_con_url_data_set(job->url_con, data);
365 368
diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
index c3533ad..efdd8c2 100644
--- a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.c
+++ b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_inotify.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#include <sys/types.h> 8#include <sys/types.h>
diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c
index 1f71b55..49bfcb6 100644
--- a/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.c
+++ b/libraries/ecore/src/lib/ecore_file/ecore_file_monitor_poll.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
diff --git a/libraries/ecore/src/lib/ecore_file/ecore_file_path.c b/libraries/ecore/src/lib/ecore_file/ecore_file_path.c
index ade3bc6..f5294b7 100644
--- a/libraries/ecore/src/lib/ecore_file/ecore_file_path.c
+++ b/libraries/ecore/src/lib/ecore_file/ecore_file_path.c
@@ -20,6 +20,7 @@ extern "C"
20void *alloca (size_t); 20void *alloca (size_t);
21#endif 21#endif
22 22
23#include <stdlib.h>
23#include <stdio.h> 24#include <stdio.h>
24#include <string.h> 25#include <string.h>
25 26
@@ -85,7 +86,7 @@ _ecore_file_path_from_env(const char *env)
85/** 86/**
86 * @brief Check if the given directory is in PATH. 87 * @brief Check if the given directory is in PATH.
87 * 88 *
88 * @param The name of the directory to search in PATH. 89 * @param in_dir The name of the directory to search in PATH.
89 * @return EINA_TRUE if the directory exist in PATH, EINA_FALSE otherwise. 90 * @return EINA_TRUE if the directory exist in PATH, EINA_FALSE otherwise.
90 * 91 *
91 * This function checks if @p in_dir is in the environment variable 92 * This function checks if @p in_dir is in the environment variable