remove e_util_head_exec()

This commit is contained in:
Mike Blumenkrantz 2015-03-20 15:04:58 -04:00
parent 736b6e587f
commit 85376125e0
2 changed files with 0 additions and 46 deletions

View File

@ -91,51 +91,6 @@ e_util_glob_case_match(const char *str, const char *pattern)
return 0;
}
EAPI int
e_util_head_exec(int head, const char *cmd)
{
char *penv_display;
char *p1, *p2;
char buf[4096];
int ok = 0;
Ecore_Exe *exe;
penv_display = getenv("DISPLAY");
if (!penv_display) return 0;
penv_display = strdup(penv_display);
if (!penv_display) return 0;
/* set env vars */
p1 = strrchr(penv_display, ':');
p2 = strrchr(penv_display, '.');
if ((p1) && (p2) && (p2 > p1)) /* "blah:x.y" */
{
*p2 = 0;
snprintf(buf, sizeof(buf), "%s.%i", penv_display, head);
*p2 = '.';
}
else if (p1) /* "blah:x */
snprintf(buf, sizeof(buf), "%s.%i", penv_display, head);
else
eina_strlcpy(buf, penv_display, sizeof(buf));
ok = 1;
exe = ecore_exe_run(cmd, NULL);
if (!exe)
{
e_util_dialog_show(_("Run Error"),
_("Enlightenment was unable to fork a child process:<br>"
"<br>"
"%s<br>"),
cmd);
ok = 0;
}
/* reset env vars */
e_util_env_set("DISPLAY", penv_display);
free(penv_display);
return ok;
}
EAPI int
e_util_strcmp(const char *s1, const char *s2)
{

View File

@ -16,7 +16,6 @@ EAPI void e_util_wakeup(void);
EAPI void e_util_env_set(const char *var, const char *val);
EAPI int e_util_glob_match(const char *str, const char *glob);
EAPI int e_util_glob_case_match(const char *str, const char *glob);
EAPI int e_util_head_exec(int head, const char *cmd);
EAPI int e_util_strcasecmp(const char *s1, const char *s2);
EAPI int e_util_strcmp(const char *s1, const char *s2);
EAPI int e_util_both_str_empty(const char *s1, const char *s2);