aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-01-14 19:02:49 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-01-14 19:02:49 +0100
commitb3ff1f6b43f994312cb546d3f112d326e1e845fa (patch)
tree14b2d9b22474c78436aac46b7da8539005bc9cc5
parentc71b317966e42809a580664ce372743fcedd8a06 (diff)
downloadvis-b3ff1f6b43f994312cb546d3f112d326e1e845fa.tar.gz
vis-b3ff1f6b43f994312cb546d3f112d326e1e845fa.tar.xz
vis-cmds: resolve conflict with BSD getmode(3)
Closes #147
-rw-r--r--vis-cmds.c6
1 files changed, 3 insertions, 3 deletions
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) {