From b3ff1f6b43f994312cb546d3f112d326e1e845fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 14 Jan 2016 19:02:49 +0100 Subject: vis-cmds: resolve conflict with BSD getmode(3) Closes #147 --- vis-cmds.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'vis-cmds.c') diff --git a/vis-cmds.c b/vis-cmds.c index 8cc704b..7c8c314 100644 --- a/vis-cmds.c +++ b/vis-cmds.c @@ -912,7 +912,7 @@ static bool cmd_help(Vis *vis, Filerange *range, enum CmdOpt opt, const char *ar return true; } -static enum VisMode getmode(const char *mode) { +static enum VisMode str2vismode(const char *mode) { const char *modes[] = { [VIS_MODE_NORMAL] = "normal", [VIS_MODE_OPERATOR_PENDING] = "operator-pending", @@ -931,7 +931,7 @@ static enum VisMode getmode(const char *mode) { static bool cmd_map(Vis *vis, Filerange *range, enum CmdOpt opt, const char *argv[]) { bool local = strstr(argv[0], "-") != NULL; - enum VisMode mode = getmode(argv[1]); + enum VisMode mode = str2vismode(argv[1]); const char *lhs = argv[2]; const char *rhs = argv[3]; @@ -988,7 +988,7 @@ static bool cmd_map(Vis *vis, Filerange *range, enum CmdOpt opt, const char *arg static bool cmd_unmap(Vis *vis, Filerange *range, enum CmdOpt opt, const char *argv[]) { bool local = strstr(argv[0], "-") != NULL; - enum VisMode mode = getmode(argv[1]); + enum VisMode mode = str2vismode(argv[1]); const char *lhs = argv[2]; if (mode == VIS_MODE_LAST || !lhs) { -- cgit v1.2.3