mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-30 02:12:30 +01:00
patch to add binary mode on opening files (for Windows+Cygwin compatibility).
This commit is contained in:
@@ -1739,7 +1739,7 @@ connectKFM(WScreen *scr)
|
||||
wfree(buffer);
|
||||
|
||||
/* pid file */
|
||||
f = fopen(path, "r");
|
||||
f = fopen(path, "rb");
|
||||
wfree(path);
|
||||
if (!f)
|
||||
return -1;
|
||||
@@ -1771,7 +1771,7 @@ connectKFM(WScreen *scr)
|
||||
}
|
||||
|
||||
path = wstrconcat(wgethomedir(), "/.kde/share/apps/kfm/magic");
|
||||
f = fopen(path, "r");
|
||||
f = fopen(path, "rb");
|
||||
wfree(path);
|
||||
if (!f) {
|
||||
return -1;
|
||||
|
||||
@@ -202,7 +202,7 @@ static WRootMenuData *text_openMenuFile(char *path)
|
||||
data = wmalloc(sizeof(TextMenuReaderData));
|
||||
data->reader = TextMenuReader;
|
||||
|
||||
data->file = fopen(path, "r");
|
||||
data->file = fopen(path, "rb");
|
||||
if (!data->file) {
|
||||
|
||||
return NULL;
|
||||
|
||||
@@ -1207,7 +1207,7 @@ readMenuFile(WScreen *scr, char *file_name)
|
||||
#endif /* USECPP */
|
||||
|
||||
if (!file) {
|
||||
file = fopen(file_name, "r");
|
||||
file = fopen(file_name, "rb");
|
||||
if (!file) {
|
||||
wsyserror(_("%s:could not open menu file"), file_name);
|
||||
return NULL;
|
||||
@@ -1309,7 +1309,7 @@ readMenuPipe(WScreen *scr, char **file_name)
|
||||
#endif /* USECPP */
|
||||
|
||||
if (!file) {
|
||||
file = popen(filename, "r");
|
||||
file = popen(filename, "rb");
|
||||
|
||||
if (!file) {
|
||||
wsyserror(_("%s:could not open menu file"), filename);
|
||||
|
||||
@@ -492,7 +492,7 @@ loadData(WScreen *scr)
|
||||
RImage *image;
|
||||
Pixmap d[12];
|
||||
|
||||
f = fopen(PKGDATADIR"/xtree.dat", "r");
|
||||
f = fopen(PKGDATADIR"/xtree.dat", "rb");
|
||||
if (!f)
|
||||
return False;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user