move to eina's new fnmatch

devs/bu5hm4n/pointer-fix
Carsten Haitzler 1 year ago
parent 835221e29a
commit 3faf1a4627
  1. 6
      meson.build
  2. 1
      src/bin/e.h
  3. 4
      src/bin/e_actions.c
  4. 1
      src/bin/e_fm/e_fm_ipc.c
  5. 1
      src/bin/e_fm/e_fm_main.c
  6. 7
      src/bin/e_sys_main.c
  7. 4
      src/bin/e_utils.c
  8. 1
      src/bin/meson.build
  9. 1
      src/bin/system/e_system.h
  10. 8
      src/bin/system/e_system_main.c
  11. 2
      src/modules/mixer/emixer.c

@ -192,12 +192,6 @@ if cc.has_function('mlock') == true
config_h.set('HAVE_MLOCK' , '1')
endif
if cc.has_header('fnmatch.h') == false
error('fnmatch.h not found')
endif
dep_fnmatch = cc.find_library('fnmatch', required: false)
code = '''#define _GNU_SOURCE 1
#include <unistd.h>
#include <stdio.h>

@ -78,7 +78,6 @@ void *alloca (size_t);
# include <dlfcn.h>
# include <math.h>
# include <fcntl.h>
# include <fnmatch.h>
# include <limits.h>
# include <ctype.h>
# include <time.h>

@ -2718,7 +2718,7 @@ ACT_FN_GO(shelf_show, )
EINA_LIST_FOREACH(e_shelf_list(), l, es)
{
if ((!params) || (params && (fnmatch(params, es->name, 0) == 0)))
if ((!params) || (params && (eina_fnmatch(params, es->name, 0))))
{
e_shelf_toggle(es, 1);
e_shelf_toggle(es, 0);
@ -2727,7 +2727,7 @@ ACT_FN_GO(shelf_show, )
}
/***************************************************************************/
#define ACT_SHELF_SHOW(params, es) \
if ((!params) || (params && (fnmatch(params, es->name, 0) == 0))) \
if ((!params) || (params && (eina_fnmatch(params, es->name, 0)))) \
{ \
e_shelf_toggle(es, 1); \
e_shelf_toggle(es, 0); \

@ -20,7 +20,6 @@
#include <sys/param.h>
#include <utime.h>
#include <math.h>
#include <fnmatch.h>
#include <limits.h>
#include <ctype.h>
#include <time.h>

@ -32,7 +32,6 @@ void *alloca (size_t);
#include <sys/param.h>
#include <utime.h>
#include <math.h>
#include <fnmatch.h>
#include <limits.h>
#include <ctype.h>
#include <time.h>

@ -20,7 +20,6 @@
#include <sys/wait.h>
#include <pwd.h>
#include <grp.h>
#include <fnmatch.h>
#include <ctype.h>
#ifdef HAVE_ALLOCA_H
#include <alloca.h>
@ -598,7 +597,7 @@ auth_etc_enlightenment_sysactions(char *a,
deny = 0;
if (!strcmp(id, "user:"))
{
if (!fnmatch(ugname, u, 0))
if (eina_fnmatch(ugname, u, 0))
{
if (!strcmp(perm, "allow:")) allow = 1;
else if (!strcmp(perm, "deny:"))
@ -615,7 +614,7 @@ auth_etc_enlightenment_sysactions(char *a,
for (gp = g; *gp; gp++)
{
if (!fnmatch(ugname, *gp, 0))
if (eina_fnmatch(ugname, *gp, 0))
{
matched = EINA_TRUE;
if (!strcmp(perm, "allow:")) allow = 1;
@ -646,7 +645,7 @@ auth_etc_enlightenment_sysactions(char *a,
{
p = get_word(p, act);
if (act[0] == 0) break;
if (!fnmatch(act, a, 0))
if (eina_fnmatch(act, a, 0))
{
if (allow) ok = 1;
else if (deny)

@ -62,7 +62,7 @@ e_util_glob_match(const char *str, const char *pattern)
}
if (str == pattern) return 1;
if (!strcmp(pattern, "*")) return 1;
if (!fnmatch(pattern, str, 0)) return 1;
if (eina_fnmatch(pattern, str, 0)) return 1;
return 0;
}
@ -87,7 +87,7 @@ e_util_glob_case_match(const char *str, const char *pattern)
for (tp = tglob, p = pattern; *p != 0; p++, tp++)
*tp = tolower(*p);
*tp = 0;
if (!fnmatch(tglob, tstr, 0)) return 1;
if (eina_fnmatch(tglob, tstr, 0)) return 1;
return 0;
}

@ -16,7 +16,6 @@ deps_e = [
dep_m,
dep_dl,
dep_execinfo,
dep_fnmatch,
dep_eina,
dep_eet,
dep_eeze,

@ -52,7 +52,6 @@ void *alloca (size_t);
# include <dlfcn.h>
# include <math.h>
# include <fcntl.h>
# include <fnmatch.h>
# include <limits.h>
# include <ctype.h>
# include <time.h>

@ -15,12 +15,12 @@ _conf_allow_deny(const char *cmd, const char *glob, const char *sys)
if (!strcmp(cmd, "allow:"))
{
if (!strcmp(glob, "*")) return 1; // allow
if (!fnmatch(glob, sys, 0)) return 1; // allow this sys
if (eina_fnmatch(glob, sys, 0)) return 1; // allow this sys
}
else if (!strcmp(cmd, "deny:"))
{
if (!strcmp(glob, "*")) return -1; // deny
if (!fnmatch(glob, sys, 0)) return -1; // deny this sys
if (eina_fnmatch(glob, sys, 0)) return -1; // deny this sys
}
return 0; // unknown
}
@ -58,7 +58,7 @@ _etc_enlightenment_system_conf_check(const char *sys)
in_usergroup = EINA_FALSE;
if (pw)
{
if (!fnmatch(usergroup, pw->pw_name, 0))
if (eina_fnmatch(usergroup, pw->pw_name, 0))
{
in_usergroup = EINA_TRUE;
}
@ -87,7 +87,7 @@ _etc_enlightenment_system_conf_check(const char *sys)
gp = getgrgid(gl[i]);
if (gp)
{
if (!fnmatch(usergroup, gp->gr_name, 0))
if (eina_fnmatch(usergroup, gp->gr_name, 0))
{
in_usergroup = EINA_TRUE;
break;

@ -42,7 +42,7 @@ _glob_case_match(const char *str, const char *pattern)
for (tp = tglob, p = pattern; *p != 0; p++, tp++)
*tp = tolower(*p);
*tp = 0;
if (!fnmatch(tglob, tstr, 0)) return 1;
if (eina_fnmatch(tglob, tstr, 0)) return 1;
return 0;
}

Loading…
Cancel
Save