diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-05-22 13:50:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2022-05-22 13:50:20 +0000 |
commit | 91dc576ef38d612ba872a2d47e5298c27e4318fc (patch) | |
tree | 9919285d046ca04a09de853be1c0f24039370db3 /app/xterm | |
parent | d1fd344a3b9b634a51cc214b94435695cf041d82 (diff) |
A few support functions can be hidden using OPT_EXEC_XTERM, because
the top-level features are disabled because our xterm uses pledge
without "exec" support.
ok matthieu
Diffstat (limited to 'app/xterm')
-rw-r--r-- | app/xterm/button.c | 2 | ||||
-rw-r--r-- | app/xterm/charproc.c | 2 | ||||
-rw-r--r-- | app/xterm/misc.c | 4 |
3 files changed, 8 insertions, 0 deletions
diff --git a/app/xterm/button.c b/app/xterm/button.c index f10092a10..1a24f177a 100644 --- a/app/xterm/button.c +++ b/app/xterm/button.c @@ -5935,6 +5935,7 @@ expandFormat(XtermWidget xw, return result; } +#if OPT_EXEC_XTERM /* execute the command after forking. The main process frees its data */ static void executeCommand(pid_t pid, char **argv) @@ -6038,6 +6039,7 @@ HandleExecSelectable(Widget w, } } } +#endif /* OPT_EXEC_XTERM */ static void reallyInsertFormatted(Widget w, char *format, char *data, CELL *start, CELL *finish) diff --git a/app/xterm/charproc.c b/app/xterm/charproc.c index 422a28b8b..07dd84902 100644 --- a/app/xterm/charproc.c +++ b/app/xterm/charproc.c @@ -384,8 +384,10 @@ static XtActionsRec actionsList[] = { { "scroll-lock", HandleScrollLock }, #endif #if OPT_SELECTION_OPS +#if OPT_EXEC_XTERM { "exec-formatted", HandleExecFormatted }, { "exec-selectable", HandleExecSelectable }, +#endif /* OPT_EXEC_XTERM */ { "insert-formatted", HandleInsertFormatted }, { "insert-selectable", HandleInsertSelectable }, #endif diff --git a/app/xterm/misc.c b/app/xterm/misc.c index 89eee4880..0369ff4a4 100644 --- a/app/xterm/misc.c +++ b/app/xterm/misc.c @@ -2140,6 +2140,7 @@ timestamp_filename(char *dst, const char *src) tstruct->tm_sec); } +#if OPT_SCREEN_DUMPS FILE * create_printfile(XtermWidget xw, const char *suffix) { @@ -2171,7 +2172,9 @@ create_printfile(XtermWidget xw, const char *suffix) fp = (fd >= 0) ? fdopen(fd, "wb") : NULL; return fp; } +#endif /* OPT_SCREEN_DUMPS */ +#if OPT_SCREEN_DUMPS || defined(ALLOWLOGGING) int open_userfile(uid_t uid, gid_t gid, char *path, Bool append) { @@ -2319,6 +2322,7 @@ creat_as(uid_t uid, gid_t gid, Bool append, char *pathname, unsigned mode) } } #endif /* !VMS */ +#endif /* OPT_SCREEN_DUMPS || defined(ALLOWLOGGING) */ int xtermResetIds(TScreen *screen) |