mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 12:58:08 +01:00
try to fix open menus, hope it worx.
This commit is contained in:
10
src/misc.c
10
src/misc.c
@@ -155,9 +155,15 @@ MakeCPPArgs(char *path)
|
|||||||
* search path */
|
* search path */
|
||||||
if (path) {
|
if (path) {
|
||||||
tmp = wstrdup(path);
|
tmp = wstrdup(path);
|
||||||
|
buf = strchr(tmp+1, ' ');
|
||||||
|
if (buf) {
|
||||||
|
*buf = 0;
|
||||||
|
}
|
||||||
buf = strrchr(tmp, '/');
|
buf = strrchr(tmp, '/');
|
||||||
if (buf) *buf = 0; /* trunc filename */
|
if (buf) {
|
||||||
putdef(line, " -I", tmp);
|
*buf = 0; /* trunc filename */
|
||||||
|
putdef(line, " -I", tmp);
|
||||||
|
}
|
||||||
free(tmp);
|
free(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -623,12 +623,12 @@ separateCommand(char *line, char ***file, char **command)
|
|||||||
|
|
||||||
count = WMGetBagItemCount(bag);
|
count = WMGetBagItemCount(bag);
|
||||||
if (count>0) {
|
if (count>0) {
|
||||||
int j;
|
int j;
|
||||||
*file = wmalloc(sizeof(char*)*(count+1));
|
*file = wmalloc(sizeof(char*)*(count+1));
|
||||||
i = count;
|
i = count;
|
||||||
(*file)[count] = NULL;
|
(*file)[count] = NULL;
|
||||||
for (j = 0; j < count; j++) {
|
for (j = 0; j < count; j++) {
|
||||||
(*file)[--i] = WMGetFromBag(bag, j);
|
(*file)[j] = WMGetFromBag(bag, j);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMFreeBag(bag);
|
WMFreeBag(bag);
|
||||||
|
|||||||
Reference in New Issue
Block a user