Compare commits

...

9 Commits

Author SHA1 Message Date
Dmitri Chudinov 1704758e79 elua: move err label to ENABLE_LUA_OLD defined branch 2023-12-19 04:26:58 -08:00
Dmitri Chudinov 53d18f0409 elua: solve discarded 'const' qualifier warning 2023-12-19 04:26:58 -08:00
Dmitri Chudinov c0e260d308 examples: solve EFL_BETA_API_SUPPORT redefinition warning 2023-12-19 04:25:44 -08:00
Dmitri Chudinov c260bcbd33 ecore_evas_sdl: add attribute to unused parameter
Test with -Dsdl=true
2023-12-19 04:24:42 -08:00
Vincent Torri 8272318d71 Eina: introduce API eina_file_path_relative() to uniformize this check 2023-12-19 12:20:42 +00:00
Dmitri Chudinov cc66b5d011 elm-config: correct wrong "if" statement
If nothing is selected then nothing to disable.
"If" statement did not work here until now.

Test:
1. Run elementary_config from terminal.
2. Select Profile menu item (make no clicks on any item).
4. Close the app.
3. Verify the error log messages before to and following the patch.

@fixed
2023-12-19 04:08:46 -08:00
Dmitri Chudinov 58ccd1031a elm-config: add icons to menu
Some menu items of elementary_config have no icons. So add some. Not the best design solution, but better than nothing.

Activated i-utilities icon. Only the icons that were already in efl were used.

@fixed
2023-12-19 04:03:31 -08:00
Dmitri Chudinov 472cee52b2 ecore: solve error with gsource = null
Compiling using -Dglib=true and -Dg-mainloop=true causes glib errors every time when efreet_icon_cache_create is invoked (ex., run and stop elementary_config and observe the terminal output).

So, i added error message in place where ecore_glib_source may be undefined. The issue was with undefined ecore_glib_source variable in _ecore_main_loop_setup function. Here _ecore_main_fdh_poll_add was used before actual ecore_glib_source definition.

@fixed
2023-12-19 03:56:53 -08:00
Carsten Haitzler 9447fb6bad eet - fix write denied - no seg on dict free + check on open
@fix
2023-12-19 11:02:29 +00:00
31 changed files with 137 additions and 237 deletions

View File

@ -889,6 +889,7 @@ ICON("preferences-desktop-screensaver", "i-screen")
ICON("preferences-desktop-wallpaper", "i-picture-landscape")
ICON("preferences-system", "i-gear")
ICON("preferences-other", "i-gear-spanner")
ICON("preferences-etc", "i-utilities")
ICON("system-file-manager", "i-folder")
ICON("applications-accessories", "i-scissor-rule")
ICON("applications-development", "i-gear-curly-braces")

View File

@ -360,7 +360,7 @@ I160("i-monitor-speakers", "monitor-speakers")
I160("i-briefcase", "briefcase")
I160("i-app-window", "app-window")
I160("i-beaker", "beaker")
// not used yet I160("i-utilities", "utilities")
I160("i-utilities", "utilities")
I160("i-sun", "sun")
I160("i-moon", "moon")
I160("i-moon-clouds", "moon-clouds")

View File

@ -3376,7 +3376,7 @@ _profiles_list_unselect_cb(void *data EINA_UNUSED,
Evas_Object *obj,
void *event_info EINA_UNUSED)
{
if (elm_list_selected_item_get(obj)) return;
if (!elm_list_selected_item_get(obj)) return;
elm_object_disabled_set(evas_object_data_get(obj, "prof_del_btn"),
EINA_TRUE);
elm_object_disabled_set(evas_object_data_get(obj, "prof_reset_btn"),
@ -4383,11 +4383,16 @@ _status_config_full(Evas_Object *win,
"Audio", _cf_audio, win);
elm_toolbar_item_append(tb, "preferences-profile",
"Profiles", _cf_profiles, win);
elm_toolbar_item_append(tb, NULL, "Scrolling", _cf_scrolling, win);
elm_toolbar_item_append(tb, NULL, "Rendering", _cf_rendering, win);
elm_toolbar_item_append(tb, NULL, "Caches", _cf_caches, win);
elm_toolbar_item_append(tb, NULL, "Focus", _cf_focus, win);
elm_toolbar_item_append(tb, NULL, "Etc", _cf_etc, win);
elm_toolbar_item_append(tb, "system-run",
"Scrolling", _cf_scrolling, win);
elm_toolbar_item_append(tb, "preferences-desktop",
"Rendering", _cf_rendering, win);
elm_toolbar_item_append(tb, "appointment-new",
"Caches", _cf_caches, win);
elm_toolbar_item_append(tb, "magnifying-glass",
"Focus", _cf_focus, win);
elm_toolbar_item_append(tb, "preferences-etc",
"Etc", _cf_etc, win);
elm_box_pack_end(bx0, tb);
evas_object_show(tb);

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_custom ecore_audio_custom.c `pkg-config --libs --cflags ecore ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <sys/types.h>

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_playback ecore_audio_playback.c `pkg-config --libs --cflags ecore eina ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <string.h>

View File

@ -1,6 +1,8 @@
// Compile with:
// gcc -o ecore_audio_to_ogg ecore_audio_to_ogg.c `pkg-config --libs --cflags ecore eina ecore-audio`
#define EFL_BETA_API_SUPPORT
#ifndef EFL_BETA_API_SUPPORT
# define EFL_BETA_API_SUPPORT
#endif
#include <stdio.h>
#include <libgen.h>

View File

@ -447,7 +447,11 @@ _ecore_main_fdh_poll_add(Efl_Loop_Data *pd EINA_UNUSED, Ecore_Fd_Handler *fdh)
fdh->gfd.events = _gfd_events_from_fdh(fdh);
fdh->gfd.revents = 0;
DBG("adding gpoll on %d %08x", fdh->fd, fdh->gfd.events);
g_source_add_poll(ecore_glib_source, &fdh->gfd);
if (ecore_glib_source)
g_source_add_poll(ecore_glib_source, &fdh->gfd);
else
ERR("Failed to add gpoll on %d %08x. GSource is NULL",
fdh->fd, fdh->gfd.events);
#endif
}
return r;
@ -939,29 +943,6 @@ quit:
static void
_ecore_main_loop_setup(Eo *obj, Efl_Loop_Data *pd)
{
// Please note that this function is being also called in case of a bad
// fd to reset the main loop.
#ifdef HAVE_SYS_EPOLL_H
pd->epoll_fd = epoll_create(1);
if (pd->epoll_fd < 0) WRN("Failed to create epoll fd!");
else
{
eina_file_close_on_exec(pd->epoll_fd, EINA_TRUE);
pd->epoll_pid = getpid();
// add polls on all our file descriptors
Ecore_Fd_Handler *fdh;
EINA_INLIST_FOREACH(pd->fd_handlers, fdh)
{
if (fdh->delete_me) continue;
_ecore_epoll_add(pd->epoll_fd, fdh->fd,
_ecore_poll_events_from_fdh(fdh), fdh);
_ecore_main_fdh_poll_add(pd, fdh);
}
}
#endif
if (obj == ML_OBJ)
{
#ifdef HAVE_LIBUV
@ -1072,6 +1053,30 @@ _ecore_main_loop_setup(Eo *obj, Efl_Loop_Data *pd)
}
#endif
}
// Please note that this function is being also called in case of a bad
// fd to reset the main loop.
#ifdef HAVE_SYS_EPOLL_H
pd->epoll_fd = epoll_create(1);
if (pd->epoll_fd < 0) WRN("Failed to create epoll fd!");
else
{
eina_file_close_on_exec(pd->epoll_fd, EINA_TRUE);
pd->epoll_pid = getpid();
// add polls on all our file descriptors
Ecore_Fd_Handler *fdh;
EINA_INLIST_FOREACH(pd->fd_handlers, fdh)
{
if (fdh->delete_me) continue;
_ecore_epoll_add(pd->epoll_fd, fdh->fd,
_ecore_poll_events_from_fdh(fdh), fdh);
_ecore_main_fdh_poll_add(pd, fdh);
}
}
#endif
_ecore_main_timechanges_start(obj);
}

View File

@ -31,11 +31,14 @@ eet_dictionary_free(Eet_Dictionary *ed)
if (!ed) return;
eina_rwlock_free(&ed->rwlock);
for (i = 0; i < ed->count; i++)
if ((ed->all_allocated) && (ed->all))
{
if (ed->all_allocated[i >> 3] & (1 << (i & 0x7)))
for (i = 0; i < ed->count; i++)
{
eina_stringshare_del(ed->all[i].str);
if (ed->all_allocated[i >> 3] & (1 << (i & 0x7)))
{
eina_stringshare_del(ed->all[i].str);
}
}
}
free(ed->all);

View File

@ -1527,7 +1527,7 @@ eet_open(const char *file,
{
Eina_File *fp;
Eet_File *ef;
int file_len;
int file_len, ret;
unsigned long int size;
if (!file)
@ -1566,6 +1566,11 @@ eet_open(const char *file,
/* try open the file based on mode */
if ((mode == EET_FILE_MODE_READ) || (mode == EET_FILE_MODE_READ_WRITE))
{
if (mode == EET_FILE_MODE_READ_WRITE)
{
ret = access(file, W_OK);
if ((ret != 0) && (errno != ENOENT)) return NULL;
}
/* Prevent garbage in futur comparison. */
fp = eina_file_open(file, EINA_FALSE);
if (!fp)
@ -1601,6 +1606,8 @@ open_error:
size = 0;
fp = NULL;
ret = access(file, W_OK);
if ((ret != 0) && (errno != ENOENT)) return NULL;
}
/* We found one */

View File

@ -833,7 +833,7 @@ efreet_desktop_command_path_absolute(const char *path)
int len = 0;
/* relative url */
if (path[0] != '/')
if (eina_file_path_relative(path))
{
if (!(buf = malloc(size))) return NULL;
if (!getcwd(buf, size))

View File

@ -3125,7 +3125,7 @@ efreet_menu_path_get(Efreet_Menu_Internal *internal, const char *suffix)
size_t len;
/* see if we've got an absolute or relative path */
if (suffix[0] == '/')
if (!eina_file_path_relative(suffix))
snprintf(path, sizeof(path), "%s", suffix);
else

View File

@ -245,6 +245,19 @@ struct _Eina_File_Line
*/
#define EINA_FILE_DIR_LIST_CB(function) ((Eina_File_Dir_List_Cb)function)
/**
* @brief Determines if a path is relative or absolute.
*
* @param[in] path The path to check.
*
* @return #EINA_TRUE if the path is relative, #EINA_FALSE otherwise.
*
* The implementation simply checks if the first char in the path is
* '/' on POSIX systems. On Windows, absolute paths begin with '\' or
* 'C:\' (or other letter). If it is not, the path is considered relative.
* If @p path is @c NULL, this function returns #EINA_FALSE.
*/
EINA_API Eina_Bool eina_file_path_relative(const char *path);
/**
* @brief Lists all the files on the directory by calling the function for every file found.

View File

@ -178,18 +178,6 @@ struct _Eina_Lines_Iterator
/** Macro for logging Eina debug messages */
#define DBG(...) EINA_LOG_DOM_DBG(_eina_file_log_dom, __VA_ARGS__)
/**
* @brief Determines if a path is relative or absolute.
* The implementation simply checks if the first char in the path is '/'. If it
* is not, the path is considered relative.
*
* @param[in] path The path to check.
*
* @return EINA_TRUE if the path is relative, EINA_FALSE otherwise.
*
*/
Eina_Bool eina_file_path_relative(const char *path);
/**
* @brief Gets the current directory and optionally appends a path to it.
* If a string was passed in via the @p path parameter, it will

View File

@ -521,13 +521,6 @@ eina_file_mmap_faulty(void *addr, long page_size)
* Simplified logic for portability layer with eina_file_common *
* ================================================================ */
Eina_Bool
eina_file_path_relative(const char *path)
{
if (*path != '/') return EINA_TRUE;
return EINA_FALSE;
}
Eina_Tmpstr *
eina_file_current_directory_get(const char *path, size_t len)
{
@ -562,6 +555,15 @@ eina_file_cleanup(Eina_Tmpstr *path)
EINA_API Eina_Bool
eina_file_path_relative(const char *path)
{
if (!path)
return EINA_FALSE;
return *path != '/';
}
EINA_API Eina_Bool
eina_file_dir_list(const char *dir,
Eina_Bool recursive,

View File

@ -515,12 +515,6 @@ _eina_file_mkdtemp(char *__template)
* Simplified logic for portability layer with eina_file_common *
* ================================================================ */
Eina_Bool
eina_file_path_relative(const char *path)
{
return !evil_path_is_absolute(path);
}
Eina_Tmpstr *
eina_file_current_directory_get(const char *path, size_t len)
{
@ -559,6 +553,29 @@ eina_file_cleanup(Eina_Tmpstr *path)
* API *
*============================================================================*/
EINA_API Eina_Bool
eina_file_path_relative(const char *path)
{
/* see
* https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#paths
* absolute path if:
* - is an UNC path (begins with \\)
* - has a drive letter (C:\). \ is important here, otherwise it is relative
* - begins with \
*/
if (!path || *path == '\\')
return EINA_FALSE;
if ((((*path >= 'a') && (*path <= 'z')) ||
((*path >= 'A') && (*path <= 'Z'))) &&
(path[1] == ':') &&
((path[2] == '\\') || (path[2] == '/')))
return EINA_FALSE;
return EINA_TRUE;
}
EINA_API Eina_Bool
eina_file_dir_list(const char *dir,
Eina_Bool recursive,

View File

@ -43,7 +43,7 @@
#ifdef _WIN32
# include <direct.h> /* getcwd */
# include <evil_private.h> /* path_is_absolute realpath dladdr */
# include <evil_private.h> /* realpath dladdr */
#endif
#include "eina_config.h"
@ -166,16 +166,6 @@ _path_sep_fix(char *buf)
#endif
}
static Eina_Bool
_path_absolute_check(const char *path)
{
#ifdef _WIN32
return evil_path_is_absolute(path);
#else
return (path[0] == EINA_PATH_SEP_C);
#endif
}
static int
_fallback(Eina_Prefix *pfx, const char *pkg_bin, const char *pkg_lib,
const char *pkg_data, const char *pkg_locale, const char *envprefix)
@ -284,7 +274,7 @@ _try_argv(Eina_Prefix *pfx, const char *argv0)
char buf[PATH_MAX], buf2[PATH_MAX];
/* 1. is argv0 abs path? */
if (_path_absolute_check(argv0))
if (!eina_file_path_relative(argv0))
{
if (access(argv0, X_OK) == 0)
{
@ -579,7 +569,7 @@ eina_prefix_new(const char *argv0, void *symbol, const char *envprefix,
{
if (info_dl.dli_fname)
{
if (_path_absolute_check(info_dl.dli_fname))
if (!eina_file_path_relative(info_dl.dli_fname))
{
INF("dladdr for symbol=%p: %s", symbol, info_dl.dli_fname);
char *rlink = realpath(info_dl.dli_fname, NULL);

View File

@ -2164,25 +2164,6 @@ _icon_size_min_get(Evas_Object *image)
return MAX(16, MIN(w, h));
}
/* FIXME: move this code to ecore */
#ifdef _WIN32
static Eina_Bool
_path_is_absolute(const char *path)
{
//TODO: Check if this works with all absolute paths in windows
return (isalpha(*path)) && (*(path + 1) == ':') &&
((*(path + 2) == '\\') || (*(path + 2) == '/'));
}
#else
static Eina_Bool
_path_is_absolute(const char *path)
{
return *path == '/';
}
#endif
static Eina_Bool
_internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *fdo)
{
@ -2217,7 +2198,7 @@ _internal_efl_ui_image_icon_set(Evas_Object *obj, const char *name, Eina_Bool *f
else
eina_stringshare_replace(&sd->stdicon, NULL);
if (_path_is_absolute(name))
if (!eina_file_path_relative(name))
{
if (fdo)
*fdo = EINA_FALSE;

View File

@ -2903,25 +2903,6 @@ _icon_size_min_get(Evas_Object *image)
return MAX(16, MIN(w, h));
}
/* FIXME: move this code to ecore */
#ifdef _WIN32
static Eina_Bool
_path_is_absolute(const char *path)
{
//TODO: Check if this works with all absolute paths in windows
return (isalpha(*path)) && (*(path + 1) == ':') &&
((*(path + 2) == '\\') || (*(path + 2) == '/'));
}
#else
static Eina_Bool
_path_is_absolute(const char *path)
{
return *path == '/';
}
#endif
static Eina_Bool
_internal_efl_ui_image_zoomable_icon_set(Evas_Object *obj, const char *name, Eina_Bool *fdo, Eina_Bool resize)
{
@ -2956,7 +2937,7 @@ _internal_efl_ui_image_zoomable_icon_set(Evas_Object *obj, const char *name, Ein
else
eina_stringshare_replace(&sd->stdicon, NULL);
if (_path_is_absolute(name))
if (!eina_file_path_relative(name))
{
if (fdo)
*fdo = EINA_FALSE;

View File

@ -28,25 +28,6 @@ static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{NULL, NULL}
};
/* FIXME: move this code to ecore */
#ifdef _WIN32
static Eina_Bool
_path_is_absolute(const char *path)
{
//TODO: Check if this works with all absolute paths in windows
return (isalpha(*path)) && (*(path + 1) == ':') &&
((*(path + 2) == '\\') || (*(path + 2) == '/'));
}
#else
static Eina_Bool
_path_is_absolute(const char *path)
{
return *path == '/';
}
#endif
static inline int
_icon_size_min_get(Evas_Object *icon)
{
@ -462,7 +443,7 @@ _internal_elm_icon_standard_set(Evas_Object *obj,
return EINA_TRUE;
}
if (_path_is_absolute(name))
if (!eina_file_path_relative(name))
{
if (fdo)
*fdo = EINA_FALSE;

View File

@ -1308,7 +1308,7 @@ elm_quicklaunch_exe_path_get(const char *exe, const char *cwd)
const char *pathitr;
const Eina_List *l;
char buf[PATH_MAX];
if (exe[0] == '/') return strdup(exe);
if (!eina_file_path_relative(exe)) return strdup(exe);
if (cwd)
pathlist = eina_list_append(pathlist, eina_stringshare_add(cwd));
else

View File

@ -203,7 +203,7 @@ _elm_module_add(const char *name, const char *as)
{
Elm_Module *m;
if (name[0] == '/') return NULL;
if (!eina_file_path_relative(name)) return NULL;
m = eina_hash_find(modules, name);
if (m)

View File

@ -3,7 +3,7 @@
#endif
#ifdef _WIN32
# include <evil_private.h> /* strsep evil_path_absolute */
# include <evil_private.h> /* strsep */
#endif
#define EFL_ACCESS_OBJECT_PROTECTED
@ -1816,11 +1816,7 @@ elm_prefs_file_set(Eo *obj, const char *file, const char *page)
sd->file = eina_stringshare_printf("%s/%s", prefix, "preferences.epb");
else
{
#ifndef _WIN32
if (*file != '/') /* relative */
#else
if (!evil_path_is_absolute(file)) /* relative */
#endif
if (eina_file_path_relative(file))
sd->file = eina_stringshare_printf("%s/%s", prefix, file);
else
sd->file = eina_stringshare_add(file);

View File

@ -107,10 +107,9 @@ _elm_theme_file_item_add(Eina_Inlist **files, const char *item, Eina_Bool prepen
home = eina_environment_home_get();
buf = eina_strbuf_new();
if ((item[0] == '/') ||
if (!eina_file_path_relative(item) ||
((item[0] == '.') && (item[1] == '/')) ||
((item[0] == '.') && (item[1] == '.') && (item[2] == '/')) ||
((isalpha(item[0])) && (item[1] == ':')))
((item[0] == '.') && (item[1] == '.') && (item[2] == '/')))
{
f = eina_file_open(item, EINA_FALSE);
if (!f) goto on_error;
@ -898,9 +897,9 @@ elm_theme_list_item_path_get(const char *f, Eina_Bool *in_search_path)
if (!home) home = "";
}
if ((f[0] == '/') || ((f[0] == '.') && (f[1] == '/')) ||
((f[0] == '.') && (f[1] == '.') && (f[2] == '/')) ||
((isalpha(f[0])) && (f[1] == ':')))
if (!eina_file_path_relative(f) ||
((f[0] == '.') && (f[1] == '/')) ||
((f[0] == '.') && (f[1] == '.') && (f[2] == '/')))
{
if (in_search_path) *in_search_path = EINA_FALSE;
return strdup(f);

View File

@ -193,11 +193,13 @@ elua_state_new(const char *progname)
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr1");
lua_setfield(L, LUA_REGISTRYINDEX, "elua_ptr2");
return ret;
#ifdef ENABLE_LUA_OLD
err:
lua_close(L);
eina_stringshare_del(ret->progname);
free(ret);
return NULL;
#endif
}
EAPI void

View File

@ -2,10 +2,6 @@
# include <config.h>
#endif
#ifdef _WIN32
# include <evil_private.h> /* evil_path_is_absolute */
#endif
#include <Eet.h>
#ifdef HAVE_FONTCONFIG
@ -67,17 +63,6 @@ static FcConfig *fc_config = NULL;
/* get the casefold feature! */
#include <unistd.h>
#include <sys/param.h>
int
_file_path_is_full_path(const char *path)
{
if (!path) return 0;
#ifdef _WIN32
if (evil_path_is_absolute(path)) return 1;
#else
if (path[0] == '/') return 1;
#endif
return 0;
}
static DATA64
_file_modified_time(const char *file)
@ -787,7 +772,7 @@ evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *
}
if (!font) /* Source load failed */
{
if (_file_path_is_full_path((char *)nm)) /* Try filename */
if (!eina_file_path_relative((char *)nm)) /* Try filename */
font = (Evas_Font_Set *)evas_common_font_load((char *)nm, size, wanted_rend, bitmap_scalable);
else /* search font path */
{
@ -856,7 +841,7 @@ evas_font_load(const Eina_List *font_paths, int hinting, Evas_Font_Description *
}
if (!ok)
{
if (_file_path_is_full_path((char *)nm))
if (!eina_file_path_relative((char *)nm))
evas_common_font_add((RGBA_Font *)font, (char *)nm, size, wanted_rend, bitmap_scalable);
else
{

View File

@ -15,10 +15,6 @@
#include <unistd.h>
#include <sys/param.h>
#ifdef _WIN32
# include <evil_private.h> /* evil_path_is_absolute */
#endif
#include "evas_common_private.h"
#include "evas_private.h"
@ -28,18 +24,6 @@
# define EVAS_PATH_SEPARATOR "/"
#endif
int
evas_file_path_is_full_path(const char *path)
{
if (!path) return 0;
#ifdef _WIN32
if (evil_path_is_absolute(path)) return 1;
#else
if (path[0] == '/') return 1;
#endif
return 0;
}
char *
evas_file_path_join(const char *path, const char *end)
{

View File

@ -2,7 +2,6 @@
#define _EVAS_PATH_H
int evas_file_path_is_full_path (const char *path);
char *evas_file_path_join (const char *path, const char *end);
int evas_file_path_exists (const char *path);
int evas_file_path_is_file (const char *path);

View File

@ -188,25 +188,3 @@ _evil_last_error_display(const char *fct)
{
fprintf(stderr, "[Evil] [%s] ERROR: %s\n", fct, evil_last_error_get());
}
EVIL_API int
evil_path_is_absolute(const char *path)
{
size_t length;
if (!path)
return 0;
if (*path == '/' || *path == '\\') return 1;
length = strlen(path);
if (length < 3) return 0;
if ((((*path >= 'a') && (*path <= 'z')) ||
((*path >= 'A') && (*path <= 'Z'))) &&
(path[1] == ':') &&
((path[2] == '/') || (path[2] == '\\')))
return 1;
return 0;
}

View File

@ -81,27 +81,4 @@ EVIL_API const char *evil_format_message(long err);
EVIL_API const char *evil_last_error_get(void);
/**
* @brief check if the given path is absolute.
*
* @param path The path to check.
* @return 1 if the given path is absolute, 0 otherwise.
*
* Check if the path @p path is absolute or not. An absolute path must
* begin with a letter (upper or lower case), followed by by the char
* ':', followed by the char '/' or '\'. If @p path is absolute this
* function returns 1, otherwise it returns 0. If @p path is @c NULL,
* it returns 0.
*
* Conformity: Non applicable.
*
* Supported OS: Windows 95, Windows 98, Windows Me, Windows NT, Windows 2000,
* Windows XP.
*
* @since 1.7
*
* @ingroup Evil
*/
EVIL_API int evil_path_is_absolute(const char *path);
#endif /* __EVIL_UTIL_H__ */

View File

@ -458,7 +458,7 @@ static Ecore_Evas_Engine_Func _ecore_sdl_engine_func =
};
static Ecore_Evas*
_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fullscreen, int hwsurface, int noframe, int alpha)
_ecore_evas_internal_sdl_new(int rmethod, const char* name, int w, int h, int fullscreen, int hwsurface, int noframe EINA_UNUSED, int alpha)
{
Ecore_Evas_SDL_Switch_Data *swd;
Ecore_Evas *ee;

View File

@ -21,9 +21,9 @@ EFL_START_TEST(elua_api)
lua_State *lst;
FILE *f;
int fd;
char *cargv[2];
char arg1[] = "test";
char arg2[] = "test";
const char *cargv[2];
const char arg1[] = "test";
const char arg2[] = "test";
int quit = 0;
cargv[0] = arg1;
cargv[1] = arg2;
@ -106,14 +106,14 @@ EFL_START_TEST(elua_api)
fprintf(f, "return true");
fclose(f);
cargv[1] = tmpf;
fail_if(!elua_util_script_run(st, 2, cargv, 1, &quit));
fail_if(!elua_util_script_run(st, 2, (char **)cargv, 1, &quit));
fail_if(quit != 1);
f = fopen(tmpf, "wb");
fail_if(!f);
fprintf(f, "return false");
fclose(f);
fail_if(!elua_util_script_run(st, 2, cargv, 1, &quit));
fail_if(!elua_util_script_run(st, 2, (char **)cargv, 1, &quit));
fail_if(quit != 0);
fail_if(remove(tmpf));