Use (v)snprintf from libc when available + assiociated fixups.
SVN revision: 8063
This commit is contained in:
parent
28791644cf
commit
ee61d0f209
|
@ -54,6 +54,7 @@ AC_C_BIGENDIAN
|
|||
AC_CHECK_FUNCS(getcwd)
|
||||
AC_CHECK_FUNCS(mkdir)
|
||||
AC_CHECK_FUNCS(snprintf)
|
||||
AM_CONDITIONAL(USE_ESNPRINTF, test "x$ac_cv_func_snprintf" != "xyes")
|
||||
AC_CHECK_FUNCS(strcasecmp)
|
||||
AC_CHECK_FUNCS(setenv)
|
||||
|
||||
|
|
6
src/E.h
6
src/E.h
|
@ -344,6 +344,10 @@ extern char *call_stack[1024];
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SNPRINTF
|
||||
#define Evsnprintf vsnprintf
|
||||
#define Esnprintf snprintf
|
||||
#else /* HAVE_SNPRINTF */
|
||||
int Evsnprintf(char *str, size_t count, const char *fmt,
|
||||
va_list args);
|
||||
|
||||
|
@ -352,8 +356,8 @@ int Esnprintf(char *str, size_t count, const char *fmt, ...);
|
|||
|
||||
#else
|
||||
int Esnprintf(va_alist);
|
||||
|
||||
#endif
|
||||
#endif /* HAVE_SNPRINTF */
|
||||
|
||||
#define Esetenv(var, val, overwrite) \
|
||||
{ \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
SUBDIRS = themes
|
||||
|
||||
EXTRA_DIST = README ChangeLog ewmh.c gnome.c
|
||||
EXTRA_DIST = README ChangeLog ewmh.c gnome.c snprintf.c
|
||||
|
||||
bin_PROGRAMS = enlightenment
|
||||
|
||||
|
@ -10,6 +10,9 @@ endif
|
|||
if ENABLE_GNOME
|
||||
SRCS_GNOME = gnome.c
|
||||
endif
|
||||
if USE_ESNPRINTF
|
||||
SRCS_SNPRINTF = snprintf.c
|
||||
endif
|
||||
enlightenment_SOURCES = \
|
||||
E.h \
|
||||
timestamp.h \
|
||||
|
@ -68,7 +71,6 @@ enlightenment_SOURCES = \
|
|||
size.c \
|
||||
slideout.c \
|
||||
snaps.c \
|
||||
snprintf.c \
|
||||
sound.c \
|
||||
startup.c \
|
||||
sticky.c \
|
||||
|
@ -83,7 +85,8 @@ enlightenment_SOURCES = \
|
|||
windowmatch.c \
|
||||
x.c \
|
||||
zoom.c \
|
||||
$(SRCS_EWMH) $(SRCS_GNOME)
|
||||
$(SRCS_EWMH) $(SRCS_GNOME) \
|
||||
$(SRCS_SNPRINTF)
|
||||
|
||||
|
||||
LDADD = \
|
||||
|
|
76
src/comms.c
76
src/comms.c
|
@ -686,7 +686,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
if (a->action->params)
|
||||
Esnprintf(buf2, sizeof(buf2), "%s %i %i %s\n",
|
||||
key, mod, a->action->Type,
|
||||
a->action->params);
|
||||
(char *)a->action->params);
|
||||
else
|
||||
Esnprintf(buf2, sizeof(buf2), "%s %i %i\n", key,
|
||||
mod, a->action->Type);
|
||||
|
@ -1652,8 +1652,9 @@ HandleComms(XClientMessageEvent * ev)
|
|||
"MWM_MENU: %5i\n"
|
||||
"MWM_MINIMIZE: %5i\n"
|
||||
"MWM_MAXIMIZE: %5i\n"
|
||||
"APP_STATE: %5i\n", ewin->client.win,
|
||||
ewin->win, ewin->x, ewin->y, ewin->w, ewin->h,
|
||||
"APP_STATE: %5i\n",
|
||||
(unsigned)ewin->client.win, (unsigned)ewin->win,
|
||||
ewin->x, ewin->y, ewin->w, ewin->h,
|
||||
ewin->border->name, ewin->border->border.left,
|
||||
ewin->border->border.right,
|
||||
ewin->border->border.top,
|
||||
|
@ -1662,8 +1663,10 @@ HandleComms(XClientMessageEvent * ev)
|
|||
ewin->visible, ewin->iconified, ewin->shaded,
|
||||
ewin->active, ewin->layer, ewin->never_use_area,
|
||||
ewin->floating, ewin->client.w, ewin->client.h,
|
||||
ewin->client.icon_win, ewin->client.icon_pmap,
|
||||
ewin->client.icon_mask, ewin->client.group,
|
||||
(unsigned)ewin->client.icon_win,
|
||||
(unsigned)ewin->client.icon_pmap,
|
||||
(unsigned)ewin->client.icon_mask,
|
||||
(unsigned)ewin->client.group,
|
||||
ewin->client.need_input, ewin->client.transient,
|
||||
ewin->client.title, ewin->client.class,
|
||||
ewin->client.name, ewin->client.command,
|
||||
|
@ -1731,15 +1734,18 @@ HandleComms(XClientMessageEvent * ev)
|
|||
"MWM_MENU: %5i\n"
|
||||
"MWM_MINIMIZE: %5i\n"
|
||||
"MWM_MAXIMIZE: %5i\n"
|
||||
"APP_STATE: %5i\n", ewin->client.win,
|
||||
ewin->win, ewin->x, ewin->y, ewin->w, ewin->h, none,
|
||||
0, 0, 0, 0, ewin->desktop, ewin->num_groups,
|
||||
ewin->docked, ewin->sticky, ewin->visible,
|
||||
ewin->iconified, ewin->shaded, ewin->active,
|
||||
ewin->layer, ewin->never_use_area, ewin->floating,
|
||||
"APP_STATE: %5i\n",
|
||||
(unsigned)ewin->client.win, (unsigned)ewin->win,
|
||||
ewin->x, ewin->y, ewin->w, ewin->h, none, 0, 0, 0,
|
||||
0, ewin->desktop, ewin->num_groups, ewin->docked,
|
||||
ewin->sticky, ewin->visible, ewin->iconified,
|
||||
ewin->shaded, ewin->active, ewin->layer,
|
||||
ewin->never_use_area, ewin->floating,
|
||||
ewin->client.w, ewin->client.h,
|
||||
ewin->client.icon_win, ewin->client.icon_pmap,
|
||||
ewin->client.icon_mask, ewin->client.group,
|
||||
(unsigned)ewin->client.icon_win,
|
||||
(unsigned)ewin->client.icon_pmap,
|
||||
(unsigned)ewin->client.icon_mask,
|
||||
(unsigned)ewin->client.group,
|
||||
ewin->client.need_input, ewin->client.transient,
|
||||
ewin->client.title, ewin->client.class,
|
||||
ewin->client.name, ewin->client.command,
|
||||
|
@ -1795,19 +1801,19 @@ HandleComms(XClientMessageEvent * ev)
|
|||
if (mode.ewin)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "mode.ewin - %8x\n",
|
||||
mode.ewin->client.win);
|
||||
(unsigned)mode.ewin->client.win);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
if (mode.focuswin)
|
||||
{
|
||||
Esnprintf(buf3, sizeof(buf3), "mode.focuswin - %8x\n",
|
||||
mode.focuswin->client.win);
|
||||
(unsigned)mode.focuswin->client.win);
|
||||
strcat(buf, buf3);
|
||||
}
|
||||
if (mode.realfocuswin)
|
||||
{
|
||||
Esnprintf(buf4, sizeof(buf4), "mode.realfocuswin - %8x\n",
|
||||
mode.realfocuswin->client.win);
|
||||
(unsigned)mode.realfocuswin->client.win);
|
||||
strcat(buf, buf4);
|
||||
}
|
||||
if (mode.cur_menu_mode)
|
||||
|
@ -1817,7 +1823,7 @@ HandleComms(XClientMessageEvent * ev)
|
|||
if (mode.context_ewin)
|
||||
{
|
||||
Esnprintf(buf5, sizeof(buf5), "context_ewin - %8x\n",
|
||||
mode.context_ewin->client.win);
|
||||
(unsigned)mode.context_ewin->client.win);
|
||||
strcat(buf, buf5);
|
||||
}
|
||||
CommsSend(c, buf);
|
||||
|
@ -1891,10 +1897,10 @@ HandleComms(XClientMessageEvent * ev)
|
|||
"MWM_MENU: %5i\n"
|
||||
"MWM_MINIMIZE: %5i\n"
|
||||
"MWM_MAXIMIZE: %5i\n"
|
||||
"APP_STATE: %5i\n", lst[i]->client.win,
|
||||
lst[i]->win, lst[i]->x, lst[i]->y, lst[i]->w,
|
||||
lst[i]->h, lst[i]->border->name,
|
||||
lst[i]->border->border.left,
|
||||
"APP_STATE: %5i\n",
|
||||
(unsigned)lst[i]->client.win, (unsigned)lst[i]->win,
|
||||
lst[i]->x, lst[i]->y, lst[i]->w, lst[i]->h,
|
||||
lst[i]->border->name, lst[i]->border->border.left,
|
||||
lst[i]->border->border.right,
|
||||
lst[i]->border->border.top,
|
||||
lst[i]->border->border.bottom, lst[i]->desktop,
|
||||
|
@ -1903,8 +1909,10 @@ HandleComms(XClientMessageEvent * ev)
|
|||
lst[i]->active, lst[i]->layer,
|
||||
lst[i]->never_use_area, lst[i]->floating,
|
||||
lst[i]->client.w, lst[i]->client.h,
|
||||
lst[i]->client.icon_win, lst[i]->client.icon_pmap,
|
||||
lst[i]->client.icon_mask, lst[i]->client.group,
|
||||
(unsigned)lst[i]->client.icon_win,
|
||||
(unsigned)lst[i]->client.icon_pmap,
|
||||
(unsigned)lst[i]->client.icon_mask,
|
||||
(unsigned)lst[i]->client.group,
|
||||
lst[i]->client.need_input, lst[i]->client.transient,
|
||||
lst[i]->client.title, lst[i]->client.class,
|
||||
lst[i]->client.name, lst[i]->client.command,
|
||||
|
@ -1973,16 +1981,18 @@ HandleComms(XClientMessageEvent * ev)
|
|||
"MWM_MENU: %5i\n"
|
||||
"MWM_MINIMIZE: %5i\n"
|
||||
"MWM_MAXIMIZE: %5i\n"
|
||||
"APP_STATE: %5i\n", lst[i]->client.win,
|
||||
lst[i]->win, lst[i]->x, lst[i]->y, lst[i]->w,
|
||||
lst[i]->h, none, 0, 0, 0, 0, lst[i]->desktop,
|
||||
lst[i]->num_groups, lst[i]->docked, lst[i]->sticky,
|
||||
lst[i]->visible, lst[i]->iconified, lst[i]->shaded,
|
||||
lst[i]->active, lst[i]->layer,
|
||||
lst[i]->never_use_area, lst[i]->floating,
|
||||
lst[i]->client.w, lst[i]->client.h,
|
||||
lst[i]->client.icon_win, lst[i]->client.icon_pmap,
|
||||
lst[i]->client.icon_mask, lst[i]->client.group,
|
||||
"APP_STATE: %5i\n",
|
||||
(unsigned)lst[i]->client.win, (unsigned)lst[i]->win,
|
||||
lst[i]->x, lst[i]->y, lst[i]->w, lst[i]->h, none, 0,
|
||||
0, 0, 0, lst[i]->desktop, lst[i]->num_groups,
|
||||
lst[i]->docked, lst[i]->sticky, lst[i]->visible,
|
||||
lst[i]->iconified, lst[i]->shaded, lst[i]->active,
|
||||
lst[i]->layer, lst[i]->never_use_area,
|
||||
lst[i]->floating, lst[i]->client.w,
|
||||
lst[i]->client.h, (unsigned)lst[i]->client.icon_win,
|
||||
(unsigned)lst[i]->client.icon_pmap,
|
||||
(unsigned)lst[i]->client.icon_mask,
|
||||
(unsigned)lst[i]->client.group,
|
||||
lst[i]->client.need_input, lst[i]->client.transient,
|
||||
lst[i]->client.title, lst[i]->client.class,
|
||||
lst[i]->client.name, lst[i]->client.command,
|
||||
|
|
|
@ -31,7 +31,7 @@ DockIt(EWin * ewin)
|
|||
char id[32];
|
||||
|
||||
EDBUG(3, "DockIt");
|
||||
Esnprintf(id, sizeof(id), "%i", ewin->client.win);
|
||||
Esnprintf(id, sizeof(id), "%i", (unsigned)ewin->client.win);
|
||||
ac = 0;
|
||||
ic = FindItem("DEFAULT_DOCK_BUTTON", 0, LIST_FINDBY_NAME, LIST_TYPE_ICLASS);
|
||||
if (mode.dockstartx >= 0)
|
||||
|
|
|
@ -53,7 +53,7 @@ Etmp(char *s)
|
|||
EDBUG(9, "Etmp");
|
||||
if (!n_calls)
|
||||
n_calls = (unsigned long)time(NULL) + (unsigned long)getpid();
|
||||
Esnprintf(s, 1024, "%s/TMP_%Xl", UserEDir(), n_calls);
|
||||
Esnprintf(s, 1024, "%s/TMP_%lX", UserEDir(), n_calls);
|
||||
n_calls++;
|
||||
EDBUG_RETURN_;
|
||||
}
|
||||
|
|
22
src/ipc.c
22
src/ipc.c
|
@ -792,10 +792,12 @@ IPC_Modules(char *params, Client * c)
|
|||
if ((returncode = UnloadModule(param2)))
|
||||
{
|
||||
strcat(buf, ModuleErrorCodeToString(returncode));
|
||||
#if 0 /* What ?!? */
|
||||
if (!buf[0])
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1859,7 +1861,7 @@ IPC_ImageClass(char *params, Client * c)
|
|||
1);
|
||||
queue_up = pq;
|
||||
Esnprintf(buf, sizeof(buf), "0x%08x 0x%08x",
|
||||
pmm.pmap, pmm.mask);
|
||||
(unsigned)pmm.pmap, (unsigned)pmm.mask);
|
||||
/* FreePmapMask(&pmm); ??? */
|
||||
}
|
||||
}
|
||||
|
@ -2221,7 +2223,7 @@ IPC_SetFocus(char *params, Client * c)
|
|||
if (my_focused_win)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "focused: %8x",
|
||||
my_focused_win->client.win);
|
||||
(unsigned)my_focused_win->client.win);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -2655,7 +2657,7 @@ IPC_InternalList(char *params, Client * c)
|
|||
if (lst[i]->pager)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "%8x\n",
|
||||
lst[i]->client.win);
|
||||
(unsigned)lst[i]->client.win);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
}
|
||||
|
@ -2667,7 +2669,7 @@ IPC_InternalList(char *params, Client * c)
|
|||
if (lst[i]->menu)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "%8x\n",
|
||||
lst[i]->client.win);
|
||||
(unsigned)lst[i]->client.win);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
}
|
||||
|
@ -2679,7 +2681,7 @@ IPC_InternalList(char *params, Client * c)
|
|||
if (lst[i]->dialog)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "%8x\n",
|
||||
lst[i]->client.win);
|
||||
(unsigned)lst[i]->client.win);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
}
|
||||
|
@ -2691,7 +2693,7 @@ IPC_InternalList(char *params, Client * c)
|
|||
if (lst[i]->internal)
|
||||
{
|
||||
Esnprintf(buf2, sizeof(buf2), "%8x\n",
|
||||
lst[i]->client.win);
|
||||
(unsigned)lst[i]->client.win);
|
||||
strcat(buf, buf2);
|
||||
}
|
||||
}
|
||||
|
@ -3623,14 +3625,14 @@ IPC_WinList(char *params, Client * c)
|
|||
{
|
||||
Esnprintf(buf, sizeof(buf),
|
||||
"0x%x : %s :: %d : %d %d : %d %d %dx%d\n",
|
||||
e->client.win, e->client.title,
|
||||
(unsigned)e->client.win, e->client.title,
|
||||
(e->sticky) ? -1 : e->desktop, e->area_x, e->area_y,
|
||||
e->x, e->y, e->w, e->h);
|
||||
}
|
||||
else
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf), "0x%x : %s\n", e->client.win,
|
||||
e->client.title);
|
||||
Esnprintf(buf, sizeof(buf), "0x%x : %s\n",
|
||||
(unsigned)e->client.win, e->client.title);
|
||||
}
|
||||
if (!ret)
|
||||
{
|
||||
|
@ -4913,7 +4915,7 @@ IPC_GroupInfo(char *params, Client * c)
|
|||
" iconify: %d\n" " kill: %d\n"
|
||||
" move: %d\n" " raise: %d\n"
|
||||
" set_border: %d\n" " stick: %d\n"
|
||||
" shade: %d\n", " mirror: %d\n",
|
||||
" shade: %d\n" " mirror: %d\n",
|
||||
groups[i]->index, groups[i]->num_members,
|
||||
groups[i]->cfg.iconify, groups[i]->cfg.kill,
|
||||
groups[i]->cfg.move, groups[i]->cfg.raise,
|
||||
|
|
|
@ -2024,7 +2024,8 @@ CreateMenuFromGroups(char *name, MenuStyle * ms)
|
|||
mm = CreateMenu();
|
||||
mm->name = duplicate("__SUBMENUGROUP_E");
|
||||
mm->style = ms;
|
||||
Esnprintf(s, sizeof(s), "%i", lst[i]->members[0]->client.win);
|
||||
Esnprintf(s, sizeof(s), "%i",
|
||||
(unsigned)lst[i]->members[0]->client.win);
|
||||
mi = CreateMenuItem(_("Show/Hide this group"), NULL,
|
||||
ACTION_SHOW_HIDE_GROUP, s, NULL);
|
||||
AddItemToMenu(mm, mi);
|
||||
|
@ -2034,7 +2035,8 @@ CreateMenuFromGroups(char *name, MenuStyle * ms)
|
|||
|
||||
for (j = 0; j < lst[i]->num_members; j++)
|
||||
{
|
||||
Esnprintf(s, sizeof(s), "%i", lst[i]->members[j]->client.win);
|
||||
Esnprintf(s, sizeof(s), "%i",
|
||||
(unsigned)lst[i]->members[j]->client.win);
|
||||
mi = CreateMenuItem(lst[i]->members[j]->client.title, NULL,
|
||||
ACTION_FOCUS_SET, s, NULL);
|
||||
AddItemToMenu(mm, mi);
|
||||
|
|
10
src/pager.c
10
src/pager.c
|
@ -45,7 +45,7 @@ PagerUpdateTimeout(int val, void *data)
|
|||
static int offsets[8] = { 0, 4, 2, 6, 1, 5, 3, 7 };
|
||||
|
||||
p = (Pager *) data;
|
||||
Esnprintf(s, sizeof(s), "__.%x", p->win);
|
||||
Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
|
||||
/* prevent runaway pager timeouts - dont knwo how it happens - but hack */
|
||||
/* around to stop it */
|
||||
cur_time = GetTime();
|
||||
|
@ -327,7 +327,7 @@ PagerShow(Pager * p)
|
|||
RememberImportantInfoForEwin(ewin);
|
||||
if (mode.pager_snap)
|
||||
{
|
||||
Esnprintf(s, sizeof(s), "__.%x", p->win);
|
||||
Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
|
||||
if (mode.pager_scanspeed > 0)
|
||||
DoIn(s, 1 / ((double)mode.pager_scanspeed), PagerUpdateTimeout,
|
||||
0, p);
|
||||
|
@ -344,7 +344,7 @@ PagerDestroy(Pager * p)
|
|||
char s[4096];
|
||||
|
||||
RemoveItem("PAGER", p->win, LIST_FINDBY_ID, LIST_TYPE_PAGER);
|
||||
Esnprintf(s, sizeof(s), "__.%x", p->win);
|
||||
Esnprintf(s, sizeof(s), "__.%x", (unsigned)p->win);
|
||||
RemoveTimerEvent(s);
|
||||
if (p->name)
|
||||
Efree(p->name);
|
||||
|
@ -885,7 +885,7 @@ PagerShowMenu(Pager * p, int x, int y)
|
|||
pw_menu->style =
|
||||
FindItem("DEFAULT", 0, LIST_FINDBY_NAME, LIST_TYPE_MENU_STYLE);
|
||||
|
||||
Esnprintf(s, sizeof(s), "%i", ewin->client.win);
|
||||
Esnprintf(s, sizeof(s), "%i", (unsigned)ewin->client.win);
|
||||
mi = CreateMenuItem(_("Iconify"), NULL, ACTION_ICONIFY, s, NULL);
|
||||
AddItemToMenu(pw_menu, mi);
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ PagerSetSnap(char onoff)
|
|||
PagerForceUpdate(pl[i]);
|
||||
if (mode.pager_snap)
|
||||
{
|
||||
Esnprintf(s, sizeof(s), "__.%x", pl[i]->win);
|
||||
Esnprintf(s, sizeof(s), "__.%x", (unsigned)pl[i]->win);
|
||||
if (mode.pager_scanspeed > 0)
|
||||
DoIn(s, 1 / ((double)mode.pager_scanspeed),
|
||||
PagerUpdateTimeout, 0, pl[i]);
|
||||
|
|
|
@ -758,7 +758,7 @@ set_save_props(SmcConn smc_conn, int master_flag)
|
|||
|
||||
#if USE_DISCARD_PROPERTY
|
||||
/* Tell session manager how to clean up our old data */
|
||||
Esnprintf(buf, sizeof(buf) / sizeof(char), "rm %s*.clients.*", sm_file);
|
||||
Esnprintf(buf, sizeof(buf), "rm %s*.clients.*", sm_file);
|
||||
|
||||
discardVal[0].length = strlen(sh);
|
||||
discardVal[0].value = sh;
|
||||
|
@ -778,7 +778,7 @@ set_save_props(SmcConn smc_conn, int master_flag)
|
|||
}
|
||||
if (restarting)
|
||||
{
|
||||
Esnprintf(buf, sizeof(buf) / sizeof(char), "%i", init_win_ext);
|
||||
Esnprintf(buf, sizeof(buf), "%i", (unsigned)init_win_ext);
|
||||
|
||||
restartVal[n].length = strlen(extinitwin);
|
||||
restartVal[n++].value = extinitwin;
|
||||
|
@ -1202,13 +1202,13 @@ doSMExit(void *params)
|
|||
"exec %s -single -ext_init_win %i -theme %s "
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s -smid %s", command,
|
||||
init_win_ext, themename, UserEDir(), UserCacheDir(),
|
||||
sm_file, sm_client_id);
|
||||
(unsigned)init_win_ext, themename, UserEDir(),
|
||||
UserCacheDir(), sm_file, sm_client_id);
|
||||
else
|
||||
Esnprintf(s, sizeof(s),
|
||||
"exec %s -single -ext_init_win %i -theme %s "
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s", command, init_win_ext,
|
||||
"-smfile %s", command, (unsigned)init_win_ext,
|
||||
themename, UserEDir(), UserCacheDir(), sm_file);
|
||||
execl(DEFAULT_SH_PATH, DEFAULT_SH_PATH, "-c", s, NULL);
|
||||
}
|
||||
|
@ -1219,13 +1219,13 @@ doSMExit(void *params)
|
|||
"exec %s -single -ext_init_win %i "
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s -smid %s", command,
|
||||
init_win_ext, UserEDir(), UserCacheDir(), sm_file,
|
||||
sm_client_id);
|
||||
(unsigned)init_win_ext, UserEDir(), UserCacheDir(),
|
||||
sm_file, sm_client_id);
|
||||
else
|
||||
Esnprintf(s, sizeof(s),
|
||||
"exec %s -single -ext_init_win %i"
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s", command, init_win_ext,
|
||||
"-smfile %s", command, (unsigned)init_win_ext,
|
||||
UserEDir(), UserCacheDir(), sm_file);
|
||||
execl(DEFAULT_SH_PATH, DEFAULT_SH_PATH, "-c", s, NULL);
|
||||
}
|
||||
|
@ -1248,14 +1248,14 @@ doSMExit(void *params)
|
|||
Esnprintf(s, sizeof(s),
|
||||
"exec %s -single -ext_init_win %i -theme %s "
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s -smid %s", command, init_win_ext,
|
||||
"-smfile %s -smid %s", command, (unsigned)init_win_ext,
|
||||
userthemepath, UserEDir(), UserCacheDir(), sm_file,
|
||||
sm_client_id);
|
||||
else
|
||||
Esnprintf(s, sizeof(s),
|
||||
"exec %s -ext_init_win %i -theme %s "
|
||||
"-econfdir %s -ecachedir %s "
|
||||
"-smfile %s -single", command, init_win_ext,
|
||||
"-smfile %s -single", command, (unsigned)init_win_ext,
|
||||
userthemepath, UserEDir(), UserCacheDir(), sm_file);
|
||||
execl(DEFAULT_SH_PATH, DEFAULT_SH_PATH, "-c", s, NULL);
|
||||
}
|
||||
|
|
|
@ -2658,7 +2658,7 @@ CB_ConfigureNewBG(int val, void *data)
|
|||
Background *bg;
|
||||
int lower, upper;
|
||||
|
||||
Esnprintf(s, sizeof(s), "__NEWBG_%i\n", time(NULL));
|
||||
Esnprintf(s, sizeof(s), "__NEWBG_%i\n", (unsigned)time(NULL));
|
||||
ESetColor(&xclr, tmp_bg_r, tmp_bg_g, tmp_bg_b);
|
||||
bg = CreateDesktopBG(s, &xclr, tmp_bg->bg.file, tmp_bg_tile,
|
||||
tmp_bg_keep_aspect, tmp_bg_xjust, 1024 - tmp_bg_yjust,
|
||||
|
@ -3275,7 +3275,7 @@ SettingsBackground(Background * bg)
|
|||
{
|
||||
char s[1024];
|
||||
|
||||
Esnprintf(s, sizeof(s), "__NEWBG_%i\n", time(NULL));
|
||||
Esnprintf(s, sizeof(s), "__NEWBG_%i\n", (unsigned)time(NULL));
|
||||
bg = CreateDesktopBG(s, NULL, NULL, 1, 1, 0, 0, 0, 0, NULL, 1, 512, 512,
|
||||
0, 0);
|
||||
AddItem(bg, bg->name, 0, LIST_TYPE_BACKGROUND);
|
||||
|
|
|
@ -50,7 +50,7 @@ AddEToFile(char *file)
|
|||
|
||||
Esnprintf(tmp, 2048, "%s/estrt_%i",
|
||||
(getenv("TMPDIR") == NULL) ? "/tmp" : getenv("TMPDIR"),
|
||||
time(NULL));
|
||||
(unsigned)time(NULL));
|
||||
f1 = fopen(file, "r");
|
||||
if (!f1)
|
||||
EDBUG_RETURN(0);
|
||||
|
|
Loading…
Reference in New Issue