termux-packages/x11-packages/xboard/xaw-xboard.c.patch
2022-04-30 03:37:32 +09:00

32 lines
1.3 KiB
Diff

--- a/xaw/xboard.c
+++ b/xaw/xboard.c
@@ -1048,7 +1048,7 @@
appData.boardSize = "";
InitAppData(ConvertToLine(argc, argv));
p = getenv("HOME");
- if (p == NULL) p = "/tmp";
+ if (p == NULL) p = "@TERMUX_PREFIX@/tmp";
i = strlen(p) + strlen("/.xboardXXXXXx.pgn") + 1;
gameCopyFilename = (char*) malloc(i);
gamePasteFilename = (char*) malloc(i);
@@ -1296,7 +1296,7 @@
if(appData.logoSize)
{ // locate and read user logo
char buf[MSG_SIZ], name[MSG_SIZ];
- snprintf(name, MSG_SIZ, "/home/%s", UserName());
+ snprintf(name, MSG_SIZ, "@TERMUX_HOME@");
if(!FindLogo(name, ".logo", buf))
FindLogo(appData.logoDir, name + 6, buf);
ASSIGN(userLogo, buf);
@@ -2535,8 +2535,8 @@
} else { // engine; cascade
if(!FindLogo(appData.logoDir, cps->tidy, buf) && // first try user log folder
!FindLogo(appData.directory[n], "logo", buf) && // then engine directory
- !FindLogo("/usr/local/share/games/plugins/logos", cps->tidy, buf) ) // then system folders
- FindLogo("/usr/share/games/plugins/logos", cps->tidy, buf);
+ !FindLogo("@TERMUX_PREFIX@/local/share/games/plugins/logos", cps->tidy, buf) ) // then system folders
+ FindLogo("@TERMUX_PREFIX@/share/games/plugins/logos", cps->tidy, buf);
}
}
if(logoName[0])