From d7c917ea63e0374fc03622d4f21df8ac4c574fae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 14 Apr 2016 21:03:28 +0200 Subject: vis: add #defines to ease overriding of utility names This should ease packaging for systems with an existing vis(1) binary. --- vis-cmds.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 2277ffe..0ef6139 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -1,5 +1,9 @@ /* this file is included from sam.c */ +#ifndef VIS_OPEN +#define VIS_OPEN "vis-open" +#endif + static void windows_arrange(Vis *vis, enum UiLayout layout) { vis->ui->arrange(vis->ui, layout); } @@ -262,7 +266,7 @@ static const char *file_open_dialog(Vis *vis, const char *pattern) { buffer_init(&bufout); buffer_init(&buferr); - if (!buffer_put0(&bufcmd, "vis-open ") || !buffer_append0(&bufcmd, pattern ? pattern : "")) + if (!buffer_put0(&bufcmd, VIS_OPEN " ") || !buffer_append0(&bufcmd, pattern ? pattern : "")) return NULL; Filerange empty = text_range_empty(); -- cgit v1.2.3