tMerge remote-tracking branch 'upstream/master' - sacc - [fork] customized build of sacc, the simple console gopher client
(HTM) git clone git://src.adamsgaard.dk/sacc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) LICENSE
---
(DIR) commit a30cbd5f8ac0d29f2486513bddea67dde364f864
(DIR) parent 21c069de24d57e2604f34b96d0f74b7cbf86b8fb
(HTM) Author: Anders Damsgaard <anders@adamsgaard.dk>
Date: Sat, 23 May 2020 22:38:13 +0200
Merge remote-tracking branch 'upstream/master'
Diffstat:
M config.def.h | 4 ++--
M sacc.c | 2 +-
M ui_ti.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/config.def.h b/config.def.h
t@@ -25,8 +25,8 @@
/* default plumber */
static char *plumber = "xdg-open";
-/* temporary directory */
-static char *tmpdir = "/tmp/sacc";
+/* temporary directory template (must end with six 'X' characters) */
+static char tmpdir[] = "/tmp/sacc-XXXXXX";
/* command for writing to X selection (clipboard) */
static char *xselwrite = "xclip -i";
(DIR) diff --git a/sacc.c b/sacc.c
t@@ -976,7 +976,7 @@ setup(void)
sigaction(SIGHUP, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
- if (mkdir(tmpdir, S_IRWXU) < 0 && errno != EEXIST)
+ if (!mkdtemp(tmpdir))
die("mkdir: %s: %s", tmpdir, strerror(errno));
if(interactive = isatty(1)) {
uisetup();
(DIR) diff --git a/ui_ti.c b/ui_ti.c
t@@ -207,7 +207,7 @@ itemuri(Item *item)
break;
case 'h':
n = snprintf(bufout, sizeof(bufout), "%s",
- item->selector+4);
+ item->selector);
break;
case 'T':
n = snprintf(bufout, sizeof(bufout), "tn3270://%s@%s:%s",