aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnmol Sethi <anmol@aubble.com>2016-08-14 04:58:55 -0400
committerAnmol Sethi <anmol@aubble.com>2016-08-24 11:51:59 -0400
commitf5d3f3da6f7b42783bccebebafe5e1c00d368bfa (patch)
tree4799a0033ded0efb8bfb790b465c399d3bfa39f1
parent10b014ca7bbf72d68f82803bc58f35127ff904f6 (diff)
downloadrneovim-f5d3f3da6f7b42783bccebebafe5e1c00d368bfa.tar.gz
rneovim-f5d3f3da6f7b42783bccebebafe5e1c00d368bfa.tar.bz2
rneovim-f5d3f3da6f7b42783bccebebafe5e1c00d368bfa.zip
use bool type for flag mod_entry_T members
-rw-r--r--src/nvim/ex_cmds_defs.h24
-rw-r--r--src/nvim/ex_docmd.c28
2 files changed, 26 insertions, 26 deletions
diff --git a/src/nvim/ex_cmds_defs.h b/src/nvim/ex_cmds_defs.h
index 421c14b495..c2e7add287 100644
--- a/src/nvim/ex_cmds_defs.h
+++ b/src/nvim/ex_cmds_defs.h
@@ -164,18 +164,18 @@ typedef struct expand {
/// flag. This needs to be saved for recursive commands, put them in a
/// structure for easy manipulation.
typedef struct {
- int hide; ///< TRUE when ":hide" was used
- int split; ///< flags for win_split()
- int tab; ///< > 0 when ":tab" was used
- int confirm; ///< TRUE to invoke yes/no dialog
- int keepalt; ///< TRUE when ":keepalt" was used
- int keepmarks; ///< TRUE when ":keepmarks" was used
- int keepjumps; ///< TRUE when ":keepjumps" was used
- int lockmarks; ///< TRUE when ":lockmarks" was used
- int keeppatterns; ///< TRUE when ":keeppatterns" was used
- bool noswapfile; ///< true when ":noswapfile" was used
- bool browse; ///< TRUE to invoke file dialog
- char_u *save_ei; ///< saved value of 'eventignore'
+ int split; ///< flags for win_split()
+ int tab; ///< > 0 when ":tab" was used
+ bool browse; ///< true to invoke file dialog
+ bool confirm; ///< true to invoke yes/no dialog
+ bool hide; ///< true when ":hide" was used
+ bool keepalt; ///< true when ":keepalt" was used
+ bool keepjumps; ///< true when ":keepjumps" was used
+ bool keepmarks; ///< true when ":keepmarks" was used
+ bool keeppatterns; ///< true when ":keeppatterns" was used
+ bool lockmarks; ///< true when ":lockmarks" was used
+ bool noswapfile; ///< true when ":noswapfile" was used
+ char_u *save_ei; ///< saved value of 'eventignore'
} cmdmod_T;
#endif // NVIM_EX_CMDS_DEFS_H
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 001ac404e9..0a20f540b4 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -1325,24 +1325,24 @@ static char_u * do_one_cmd(char_u **cmdlinep,
case 'c': if (!checkforcmd(&ea.cmd, "confirm", 4))
break;
- cmdmod.confirm = TRUE;
+ cmdmod.confirm = true;
continue;
case 'k': if (checkforcmd(&ea.cmd, "keepmarks", 3)) {
- cmdmod.keepmarks = TRUE;
+ cmdmod.keepmarks = true;
continue;
}
if (checkforcmd(&ea.cmd, "keepalt", 5)) {
- cmdmod.keepalt = TRUE;
+ cmdmod.keepalt = true;
continue;
}
if (checkforcmd(&ea.cmd, "keeppatterns", 5)) {
- cmdmod.keeppatterns = TRUE;
+ cmdmod.keeppatterns = true;
continue;
}
if (!checkforcmd(&ea.cmd, "keepjumps", 5))
break;
- cmdmod.keepjumps = TRUE;
+ cmdmod.keepjumps = true;
continue;
/* ":hide" and ":hide | cmd" are not modifiers */
@@ -1350,11 +1350,11 @@ static char_u * do_one_cmd(char_u **cmdlinep,
|| *p == NUL || ends_excmd(*p))
break;
ea.cmd = p;
- cmdmod.hide = TRUE;
+ cmdmod.hide = true;
continue;
case 'l': if (checkforcmd(&ea.cmd, "lockmarks", 3)) {
- cmdmod.lockmarks = TRUE;
+ cmdmod.lockmarks = true;
continue;
}
@@ -5363,13 +5363,13 @@ uc_check_code (
} mod_entry_T;
static mod_entry_T mod_entries[] = {
{ &cmdmod.browse, "browse" },
- { (bool *)&cmdmod.confirm, "confirm" },
- { (bool *)&cmdmod.hide, "hide" },
- { (bool *)&cmdmod.keepalt, "keepalt" },
- { (bool *)&cmdmod.keepjumps, "keepjumps" },
- { (bool *)&cmdmod.keepmarks, "keepmarks" },
- { (bool *)&cmdmod.keeppatterns, "keeppatterns" },
- { (bool *)&cmdmod.lockmarks, "lockmarks" },
+ { &cmdmod.confirm, "confirm" },
+ { &cmdmod.hide, "hide" },
+ { &cmdmod.keepalt, "keepalt" },
+ { &cmdmod.keepjumps, "keepjumps" },
+ { &cmdmod.keepmarks, "keepmarks" },
+ { &cmdmod.keeppatterns, "keeppatterns" },
+ { &cmdmod.lockmarks, "lockmarks" },
{ &cmdmod.noswapfile, "noswapfile" }
};
// the modifiers that are simple flags