mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
committed by
Carlos R. Mafra
parent
14863cd3b1
commit
7859e2d59f
@@ -74,7 +74,7 @@ static char *checkFile(char *path, char *folder, char *ext, char *resource)
|
|||||||
slen = strlen(path) + strlen(resource) + 1 + extralen;
|
slen = strlen(path) + strlen(resource) + 1 + extralen;
|
||||||
ret = wmalloc(slen);
|
ret = wmalloc(slen);
|
||||||
|
|
||||||
if (strlcpy(ret, path, slen) >= slen)
|
if (wstrlcpy(ret, path, slen) >= slen)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (folder &&
|
if (folder &&
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ static void dumpRImage(char *path, RImage * image)
|
|||||||
|
|
||||||
f = fopen(path, "wb");
|
f = fopen(path, "wb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
werror(path);
|
werror("%s", path);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
fprintf(f, "%02x%02x%1x", image->width, image->height, channels);
|
fprintf(f, "%02x%02x%1x", image->width, image->height, channels);
|
||||||
@@ -404,7 +404,7 @@ static void dumpRImage(char *path, RImage * image)
|
|||||||
|
|
||||||
fsync(fileno(f));
|
fsync(fileno(f));
|
||||||
if (fclose(f) < 0) {
|
if (fclose(f) < 0) {
|
||||||
werror(path);
|
werror("%s", path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1572,7 +1572,7 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||||
werror(panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1582,7 +1582,7 @@ static void createPanel(Panel * p)
|
|||||||
panel->fprefix = tmp;
|
panel->fprefix = tmp;
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
if (mkdir(panel->fprefix, 0755) < 0) {
|
||||||
werror(panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1646,7 +1646,7 @@ static WMPropList *processSubmenu(WEditMenu * menu)
|
|||||||
pmenu = WMCreatePLArray(pl, NULL);
|
pmenu = WMCreatePLArray(pl, NULL);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while (item = WGetEditMenuItem(menu, i++)) {
|
while ((item = WGetEditMenuItem(menu, i++))) {
|
||||||
WEditMenu *submenu;
|
WEditMenu *submenu;
|
||||||
|
|
||||||
s = WGetEditMenuItemTitle(item);
|
s = WGetEditMenuItemTitle(item);
|
||||||
|
|||||||
@@ -674,7 +674,7 @@ WScreen *wScreenInit(int screen_number)
|
|||||||
scr->rcontext = RCreateContext(dpy, screen_number, &rattr);
|
scr->rcontext = RCreateContext(dpy, screen_number, &rattr);
|
||||||
|
|
||||||
if (!scr->rcontext && RErrorCode == RERR_STDCMAPFAIL) {
|
if (!scr->rcontext && RErrorCode == RERR_STDCMAPFAIL) {
|
||||||
wwarning(RMessageForError(RErrorCode));
|
wwarning("%s", RMessageForError(RErrorCode));
|
||||||
|
|
||||||
rattr.flags &= ~RC_StandardColormap;
|
rattr.flags &= ~RC_StandardColormap;
|
||||||
rattr.standard_colormap_mode = RUseStdColormap;
|
rattr.standard_colormap_mode = RUseStdColormap;
|
||||||
|
|||||||
Reference in New Issue
Block a user