verb_msg: remove char_u

This commit is contained in:
Justin M. Keyes
2019-04-29 19:18:40 +02:00
parent 3033b5a70a
commit 8cf7daaaa8
3 changed files with 13 additions and 23 deletions

View File

@@ -5221,7 +5221,7 @@ bool garbage_collect(bool testing)
(void)garbage_collect(testing); (void)garbage_collect(testing);
} }
} else if (p_verbose > 0) { } else if (p_verbose > 0) {
verb_msg((char_u *)_( verb_msg(_(
"Not enough memory to set references, garbage collection aborted!")); "Not enough memory to set references, garbage collection aborted!"));
} }
#undef ABORTING #undef ABORTING
@@ -11474,25 +11474,21 @@ static void f_inputlist(typval_T *argvars, typval_T *rettv, FunPtr fptr)
static garray_T ga_userinput = {0, 0, sizeof(tasave_T), 4, NULL}; static garray_T ga_userinput = {0, 0, sizeof(tasave_T), 4, NULL};
/* /// "inputrestore()" function
* "inputrestore()" function
*/
static void f_inputrestore(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void f_inputrestore(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{ {
if (!GA_EMPTY(&ga_userinput)) { if (!GA_EMPTY(&ga_userinput)) {
--ga_userinput.ga_len; ga_userinput.ga_len--;
restore_typeahead((tasave_T *)(ga_userinput.ga_data) restore_typeahead((tasave_T *)(ga_userinput.ga_data)
+ ga_userinput.ga_len); + ga_userinput.ga_len);
/* default return is zero == OK */ // default return is zero == OK
} else if (p_verbose > 1) { } else if (p_verbose > 1) {
verb_msg((char_u *)_("called inputrestore() more often than inputsave()")); verb_msg(_("called inputrestore() more often than inputsave()"));
rettv->vval.v_number = 1; /* Failed */ rettv->vval.v_number = 1; // Failed
} }
} }
/* /// "inputsave()" function
* "inputsave()" function
*/
static void f_inputsave(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void f_inputsave(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{ {
// Add an entry to the stack of typeahead storage. // Add an entry to the stack of typeahead storage.
@@ -11500,9 +11496,7 @@ static void f_inputsave(typval_T *argvars, typval_T *rettv, FunPtr fptr)
save_typeahead(p); save_typeahead(p);
} }
/* /// "inputsecret()" function
* "inputsecret()" function
*/
static void f_inputsecret(typval_T *argvars, typval_T *rettv, FunPtr fptr) static void f_inputsecret(typval_T *argvars, typval_T *rettv, FunPtr fptr)
{ {
cmdline_star++; cmdline_star++;

View File

@@ -133,15 +133,11 @@ int msg(char_u *s)
return msg_attr_keep(s, 0, false, false); return msg_attr_keep(s, 0, false, false);
} }
/* /// Like msg() but keep it silent when 'verbosefile' is set.
* Like msg() but keep it silent when 'verbosefile' is set. int verb_msg(char *s)
*/
int verb_msg(char_u *s)
{ {
int n;
verbose_enter(); verbose_enter();
n = msg_attr_keep(s, 0, false, false); int n = msg_attr_keep((char_u *)s, 0, false, false);
verbose_leave(); verbose_leave();
return n; return n;

View File

@@ -1132,7 +1132,7 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
* existing undo file. */ * existing undo file. */
if (buf->b_u_numhead == 0 && buf->b_u_line_ptr == NULL) { if (buf->b_u_numhead == 0 && buf->b_u_line_ptr == NULL) {
if (p_verbose > 0) if (p_verbose > 0)
verb_msg((char_u *)_("Skipping undo file write, nothing to undo")); verb_msg(_("Skipping undo file write, nothing to undo"));
goto theend; goto theend;
} }