aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-11-29 02:54:19 +0100
committerJustin M. Keyes <justinkz@gmail.com>2017-12-05 01:46:40 +0100
commit5de1eae4f2353de1dc4cdeb3e5bad0a908faf9c8 (patch)
treee6f999974ee20d58f7d3b342d62f6ba055267325
parent586dafee2f4824b6cd4e0be80d597fbb810a647e (diff)
downloadrneovim-5de1eae4f2353de1dc4cdeb3e5bad0a908faf9c8.tar.gz
rneovim-5de1eae4f2353de1dc4cdeb3e5bad0a908faf9c8.tar.bz2
rneovim-5de1eae4f2353de1dc4cdeb3e5bad0a908faf9c8.zip
msg_outtrans_special(): `const` some strings
-rw-r--r--src/nvim/message.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/src/nvim/message.c b/src/nvim/message.c
index 806de5e116..907a2472c8 100644
--- a/src/nvim/message.c
+++ b/src/nvim/message.c
@@ -1237,27 +1237,24 @@ void msg_make(char_u *arg)
}
}
-/*
- * Output the string 'str' upto a NUL character.
- * Return the number of characters it takes on the screen.
- *
- * If K_SPECIAL is encountered, then it is taken in conjunction with the
- * following character and shown as <F1>, <S-Up> etc. Any other character
- * which is not printable shown in <> form.
- * If 'from' is TRUE (lhs of a mapping), a space is shown as <Space>.
- * If a character is displayed in one of these special ways, is also
- * highlighted (its highlight name is '8' in the p_hl variable).
- * Otherwise characters are not highlighted.
- * This function is used to show mappings, where we want to see how to type
- * the character/string -- webb
- */
-int
-msg_outtrans_special (
- char_u *strstart,
- int from /* TRUE for lhs of a mapping */
+/// Output the string 'str' upto a NUL character.
+/// Return the number of characters it takes on the screen.
+///
+/// If K_SPECIAL is encountered, then it is taken in conjunction with the
+/// following character and shown as <F1>, <S-Up> etc. Any other character
+/// which is not printable shown in <> form.
+/// If 'from' is TRUE (lhs of a mapping), a space is shown as <Space>.
+/// If a character is displayed in one of these special ways, is also
+/// highlighted (its highlight name is '8' in the p_hl variable).
+/// Otherwise characters are not highlighted.
+/// This function is used to show mappings, where we want to see how to type
+/// the character/string -- webb
+int msg_outtrans_special(
+ const char_u *strstart,
+ int from ///< true for LHS of a mapping
)
{
- char_u *str = strstart;
+ const char_u *str = strstart;
int retval = 0;
int attr;