refactor(message): smsg_attr -> smsg

This commit is contained in:
bfredl 2023-09-29 16:10:54 +02:00
parent 8e11c18d49
commit bc13bc154a
31 changed files with 161 additions and 178 deletions

View File

@ -372,7 +372,7 @@ void aubuflocal_remove(buf_T *buf)
if (p_verbose >= 6) { if (p_verbose >= 6) {
verbose_enter(); verbose_enter();
smsg(_("auto-removing autocommand: %s <buffer=%d>"), event_nr2name(event), buf->b_fnum); smsg(0, _("auto-removing autocommand: %s <buffer=%d>"), event_nr2name(event), buf->b_fnum);
verbose_leave(); verbose_leave();
} }
} }
@ -1150,7 +1150,7 @@ int do_doautocmd(char *arg_start, bool do_msg, bool *did_something)
} }
if (nothing_done && do_msg && !aborting()) { if (nothing_done && do_msg && !aborting()) {
smsg(_("No matching autocommands: %s"), arg_start); smsg(0, _("No matching autocommands: %s"), arg_start);
} }
if (did_something != NULL) { if (did_something != NULL) {
*did_something = !nothing_done; *did_something = !nothing_done;
@ -1946,7 +1946,7 @@ static void aucmd_next(AutoPatCmd *apc)
snprintf(namep, sourcing_name_len, s, name, ap->pat); snprintf(namep, sourcing_name_len, s, name, ap->pat);
if (p_verbose >= 8) { if (p_verbose >= 8) {
verbose_enter(); verbose_enter();
smsg(_("Executing %s"), namep); smsg(0, _("Executing %s"), namep);
verbose_leave(); verbose_leave();
} }
@ -2045,7 +2045,7 @@ char *getnextac(int c, void *cookie, int indent, bool do_concat)
if (p_verbose >= 9) { if (p_verbose >= 9) {
verbose_enter_scroll(); verbose_enter_scroll();
char *exec_to_string = aucmd_exec_to_string(ac, ac->exec); char *exec_to_string = aucmd_exec_to_string(ac, ac->exec);
smsg(_("autocommand %s"), exec_to_string); smsg(0, _("autocommand %s"), exec_to_string);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
XFREE_CLEAR(exec_to_string); XFREE_CLEAR(exec_to_string);
verbose_leave_scroll(); verbose_leave_scroll();

View File

@ -1106,13 +1106,13 @@ char *do_bufdel(int command, char *arg, int addr_count, int start_bnr, int end_b
errormsg = IObuff; errormsg = IObuff;
} else if (deleted >= p_report) { } else if (deleted >= p_report) {
if (command == DOBUF_UNLOAD) { if (command == DOBUF_UNLOAD) {
smsg(NGETTEXT("%d buffer unloaded", "%d buffers unloaded", deleted), smsg(0, NGETTEXT("%d buffer unloaded", "%d buffers unloaded", deleted),
deleted); deleted);
} else if (command == DOBUF_DEL) { } else if (command == DOBUF_DEL) {
smsg(NGETTEXT("%d buffer deleted", "%d buffers deleted", deleted), smsg(0, NGETTEXT("%d buffer deleted", "%d buffers deleted", deleted),
deleted); deleted);
} else { } else {
smsg(NGETTEXT("%d buffer wiped out", "%d buffers wiped out", deleted), smsg(0, NGETTEXT("%d buffer wiped out", "%d buffers wiped out", deleted),
deleted); deleted);
} }
} }

View File

@ -105,12 +105,12 @@ void do_debug(char *cmd)
msg(_("Entering Debug mode. Type \"cont\" to continue."), 0); msg(_("Entering Debug mode. Type \"cont\" to continue."), 0);
} }
if (debug_oldval != NULL) { if (debug_oldval != NULL) {
smsg(_("Oldval = \"%s\""), debug_oldval); smsg(0, _("Oldval = \"%s\""), debug_oldval);
xfree(debug_oldval); xfree(debug_oldval);
debug_oldval = NULL; debug_oldval = NULL;
} }
if (debug_newval != NULL) { if (debug_newval != NULL) {
smsg(_("Newval = \"%s\""), debug_newval); smsg(0, _("Newval = \"%s\""), debug_newval);
xfree(debug_newval); xfree(debug_newval);
debug_newval = NULL; debug_newval = NULL;
} }
@ -120,9 +120,9 @@ void do_debug(char *cmd)
} }
xfree(sname); xfree(sname);
if (SOURCING_LNUM != 0) { if (SOURCING_LNUM != 0) {
smsg(_("line %" PRId64 ": %s"), (int64_t)SOURCING_LNUM, cmd); smsg(0, _("line %" PRId64 ": %s"), (int64_t)SOURCING_LNUM, cmd);
} else { } else {
smsg(_("cmd: %s"), cmd); smsg(0, _("cmd: %s"), cmd);
} }
// Repeat getting a command and executing it. // Repeat getting a command and executing it.
@ -352,7 +352,7 @@ static void do_checkbacktracelevel(void)
if (debug_backtrace_level > max) { if (debug_backtrace_level > max) {
debug_backtrace_level = max; debug_backtrace_level = max;
smsg(_("frame at highest level: %d"), max); smsg(0, _("frame at highest level: %d"), max);
} }
xfree(sname); xfree(sname);
} }
@ -371,9 +371,9 @@ static void do_showbacktrace(char *cmd)
*next = NUL; *next = NUL;
} }
if (i == max - debug_backtrace_level) { if (i == max - debug_backtrace_level) {
smsg("->%d %s", max - i, cur); smsg(0, "->%d %s", max - i, cur);
} else { } else {
smsg(" %d %s", max - i, cur); smsg(0, " %d %s", max - i, cur);
} }
i++; i++;
if (next == NULL) { if (next == NULL) {
@ -386,9 +386,9 @@ static void do_showbacktrace(char *cmd)
} }
if (SOURCING_LNUM != 0) { if (SOURCING_LNUM != 0) {
smsg(_("line %" PRId64 ": %s"), (int64_t)SOURCING_LNUM, cmd); smsg(0, _("line %" PRId64 ": %s"), (int64_t)SOURCING_LNUM, cmd);
} else { } else {
smsg(_("cmd: %s"), cmd); smsg(0, _("cmd: %s"), cmd);
} }
} }
@ -432,7 +432,7 @@ void dbg_check_breakpoint(exarg_T *eap)
} else { } else {
p = ""; p = "";
} }
smsg(_("Breakpoint in \"%s%s\" line %" PRId64), smsg(0, _("Breakpoint in \"%s%s\" line %" PRId64),
p, p,
debug_breakpoint_name + (*p == NUL ? 0 : 3), debug_breakpoint_name + (*p == NUL ? 0 : 3),
(int64_t)debug_breakpoint_lnum); (int64_t)debug_breakpoint_lnum);
@ -729,13 +729,13 @@ void ex_breaklist(exarg_T *eap)
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, true); home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, true);
} }
if (bp->dbg_type != DBG_EXPR) { if (bp->dbg_type != DBG_EXPR) {
smsg(_("%3d %s %s line %" PRId64), smsg(0, _("%3d %s %s line %" PRId64),
bp->dbg_nr, bp->dbg_nr,
bp->dbg_type == DBG_FUNC ? "func" : "file", bp->dbg_type == DBG_FUNC ? "func" : "file",
bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff, bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
(int64_t)bp->dbg_lnum); (int64_t)bp->dbg_lnum);
} else { } else {
smsg(_("%3d expr %s"), bp->dbg_nr, bp->dbg_name); smsg(0, _("%3d expr %s"), bp->dbg_nr, bp->dbg_name);
} }
} }
} }

View File

@ -764,7 +764,7 @@ static int diff_write_buffer(buf_T *buf, mmfile_t *m, linenr_T start, linenr_T e
buf->b_diff_failed = true; buf->b_diff_failed = true;
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg(_("Not enough memory to use internal diff for buffer \"%s\""), smsg(0, _("Not enough memory to use internal diff for buffer \"%s\""),
buf->b_fname); buf->b_fname);
verbose_leave(); verbose_leave();
} }

View File

@ -5922,7 +5922,7 @@ void get_system_output_as_rettv(typval_T *argvars, typval_T *rettv, bool retlist
if (p_verbose > 3) { if (p_verbose > 3) {
char *cmdstr = shell_argv_to_str(argv); char *cmdstr = shell_argv_to_str(argv);
verbose_enter_scroll(); verbose_enter_scroll();
smsg(_("Executing command: \"%s\""), cmdstr); smsg(0, _("Executing command: \"%s\""), cmdstr);
msg_puts("\n\n"); msg_puts("\n\n");
verbose_leave_scroll(); verbose_leave_scroll();
xfree(cmdstr); xfree(cmdstr);

View File

@ -1117,7 +1117,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
no_wait_return++; no_wait_return++;
verbose_enter_scroll(); verbose_enter_scroll();
smsg(_("calling %s"), SOURCING_NAME); smsg(0, _("calling %s"), SOURCING_NAME);
if (p_verbose >= 14) { if (p_verbose >= 14) {
msg_puts("("); msg_puts("(");
for (int i = 0; i < argcount; i++) { for (int i = 0; i < argcount; i++) {
@ -1235,9 +1235,9 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
verbose_enter_scroll(); verbose_enter_scroll();
if (aborting()) { if (aborting()) {
smsg(_("%s aborted"), SOURCING_NAME); smsg(0, _("%s aborted"), SOURCING_NAME);
} else if (fc->fc_rettv->v_type == VAR_NUMBER) { } else if (fc->fc_rettv->v_type == VAR_NUMBER) {
smsg(_("%s returning #%" PRId64 ""), smsg(0, _("%s returning #%" PRId64 ""),
SOURCING_NAME, (int64_t)fc->fc_rettv->vval.v_number); SOURCING_NAME, (int64_t)fc->fc_rettv->vval.v_number);
} else { } else {
char buf[MSG_BUF_LEN]; char buf[MSG_BUF_LEN];
@ -1254,7 +1254,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN); trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
s = buf; s = buf;
} }
smsg(_("%s returning %s"), SOURCING_NAME, s); smsg(0, _("%s returning %s"), SOURCING_NAME, s);
xfree(tofree); xfree(tofree);
} }
} }
@ -1277,7 +1277,7 @@ void call_user_func(ufunc_T *fp, int argcount, typval_T *argvars, typval_T *rett
no_wait_return++; no_wait_return++;
verbose_enter_scroll(); verbose_enter_scroll();
smsg(_("continuing in %s"), SOURCING_NAME); smsg(0, _("continuing in %s"), SOURCING_NAME);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();

View File

@ -836,8 +836,8 @@ int do_move(linenr_T line1, linenr_T line2, linenr_T dest)
ml_delete(line1 + extra, true); ml_delete(line1 + extra, true);
} }
if (!global_busy && num_lines > p_report) { if (!global_busy && num_lines > p_report) {
smsg(NGETTEXT("%" PRId64 " line moved", smsg(0, NGETTEXT("%" PRId64 " line moved",
"%" PRId64 " lines moved", num_lines), "%" PRId64 " lines moved", num_lines),
(int64_t)num_lines); (int64_t)num_lines);
} }
@ -3800,8 +3800,8 @@ static int do_sub(exarg_T *eap, const proftime_T timeout, const long cmdpreview_
// needed // needed
msg_no_more = true; msg_no_more = true;
msg_ext_set_kind("confirm_sub"); msg_ext_set_kind("confirm_sub");
smsg_attr(HL_ATTR(HLF_R), // Same highlight as wait_return(). // Same highlight as wait_return().
_("replace with %s (y/n/a/q/l/^E/^Y)?"), sub); smsg(HL_ATTR(HLF_R), _("replace with %s (y/n/a/q/l/^E/^Y)?"), sub);
msg_no_more = false; msg_no_more = false;
msg_scroll = (int)i; msg_scroll = (int)i;
if (!ui_has(kUIMessages)) { if (!ui_has(kUIMessages)) {
@ -4470,9 +4470,9 @@ void ex_global(exarg_T *eap)
msg(_(e_interr), 0); msg(_(e_interr), 0);
} else if (ndone == 0) { } else if (ndone == 0) {
if (type == 'v') { if (type == 'v') {
smsg(_("Pattern found in every line: %s"), used_pat); smsg(0, _("Pattern found in every line: %s"), used_pat);
} else { } else {
smsg(_("Pattern not found: %s"), used_pat); smsg(0, _("Pattern not found: %s"), used_pat);
} }
} else { } else {
global_exe(cmd); global_exe(cmd);

View File

@ -273,9 +273,9 @@ static void msg_verbose_cmd(linenr_T lnum, char *cmd)
verbose_enter_scroll(); verbose_enter_scroll();
if (lnum == 0) { if (lnum == 0) {
smsg(_("Executing: %s"), cmd); smsg(0, _("Executing: %s"), cmd);
} else { } else {
smsg(_("line %" PRIdLINENR ": %s"), lnum, cmd); smsg(0, _("line %" PRIdLINENR ": %s"), lnum, cmd);
} }
if (msg_silent == 0) { if (msg_silent == 0) {
msg_puts("\n"); // don't overwrite this msg_puts("\n"); // don't overwrite this
@ -5692,7 +5692,7 @@ static void ex_pwd(exarg_T *eap)
} else if (curtab->tp_localdir != NULL) { } else if (curtab->tp_localdir != NULL) {
context = "tabpage"; context = "tabpage";
} }
smsg("[%s] %s", context, NameBuff); smsg(0, "[%s] %s", context, NameBuff);
} else { } else {
msg(NameBuff, 0); msg(NameBuff, 0);
} }
@ -5709,7 +5709,7 @@ static void ex_equal(exarg_T *eap)
ex_lua(eap); ex_lua(eap);
} else { } else {
eap->nextcmd = find_nextcmd(eap->arg); eap->nextcmd = find_nextcmd(eap->arg);
smsg("%" PRId64, (int64_t)eap->line2); smsg(0, "%" PRId64, (int64_t)eap->line2);
} }
} }
@ -7121,7 +7121,7 @@ static void ex_filetype(exarg_T *eap)
{ {
if (*eap->arg == NUL) { if (*eap->arg == NUL) {
// Print current status. // Print current status.
smsg("filetype detection:%s plugin:%s indent:%s", smsg(0, "filetype detection:%s plugin:%s indent:%s",
filetype_detect == kTrue ? "ON" : "OFF", filetype_detect == kTrue ? "ON" : "OFF",
filetype_plugin == kTrue ? (filetype_detect == kTrue ? "ON" : "(on)") : "OFF", filetype_plugin == kTrue ? (filetype_detect == kTrue ? "ON" : "(on)") : "OFF",
filetype_indent == kTrue ? (filetype_detect == kTrue ? "ON" : "(on)") : "OFF"); filetype_indent == kTrue ? (filetype_detect == kTrue ? "ON" : "(on)") : "OFF");

View File

@ -497,7 +497,7 @@ static int throw_exception(void *value, except_type_T type, char *cmdname)
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
msg_scroll = true; // always scroll up, don't overwrite msg_scroll = true; // always scroll up, don't overwrite
} }
smsg(_("Exception thrown: %s"), excp->value); smsg(0, _("Exception thrown: %s"), excp->value);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
@ -548,7 +548,7 @@ static void discard_exception(except_T *excp, bool was_finished)
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
msg_scroll = true; // always scroll up, don't overwrite msg_scroll = true; // always scroll up, don't overwrite
} }
smsg(was_finished ? _("Exception finished: %s") : _("Exception discarded: %s"), excp->value); smsg(0, was_finished ? _("Exception finished: %s") : _("Exception discarded: %s"), excp->value);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
cmdline_row = msg_row; cmdline_row = msg_row;
@ -615,7 +615,7 @@ static void catch_exception(except_T *excp)
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
msg_scroll = true; // always scroll up, don't overwrite msg_scroll = true; // always scroll up, don't overwrite
} }
smsg(_("Exception caught: %s"), excp->value); smsg(0, _("Exception caught: %s"), excp->value);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
if (debug_break_level > 0 || *p_vfile == NUL) { if (debug_break_level > 0 || *p_vfile == NUL) {
@ -732,7 +732,7 @@ static void report_pending(int action, int pending, void *value)
} }
no_wait_return++; no_wait_return++;
msg_scroll = true; // always scroll up, don't overwrite msg_scroll = true; // always scroll up, don't overwrite
smsg(mesg, s); smsg(0, mesg, s);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
cmdline_row = msg_row; cmdline_row = msg_row;
no_wait_return--; no_wait_return--;

View File

@ -615,7 +615,7 @@ char *vim_findfile(void *search_ctx_arg)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("Already Searched: %s (%s)", smsg(0, "Already Searched: %s (%s)",
stackp->ffs_fix_path, stackp->ffs_wc_path); stackp->ffs_fix_path, stackp->ffs_wc_path);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
@ -626,7 +626,7 @@ char *vim_findfile(void *search_ctx_arg)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
} else if (p_verbose >= 5) { } else if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("Searching: %s (%s)", smsg(0, "Searching: %s (%s)",
stackp->ffs_fix_path, stackp->ffs_wc_path); stackp->ffs_fix_path, stackp->ffs_wc_path);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
@ -798,7 +798,7 @@ char *vim_findfile(void *search_ctx_arg)
file_path, "") == FAIL) { file_path, "") == FAIL) {
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("Already: %s", file_path); smsg(0, "Already: %s", file_path);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
} }
@ -823,7 +823,7 @@ char *vim_findfile(void *search_ctx_arg)
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("HIT: %s", file_path); smsg(0, "HIT: %s", file_path);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
} }
@ -986,7 +986,7 @@ static ff_visited_list_hdr_T *ff_get_visited_list(char *filename,
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("ff_get_visited_list: FOUND list for %s", filename); smsg(0, "ff_get_visited_list: FOUND list for %s", filename);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
} }
@ -1000,7 +1000,7 @@ static ff_visited_list_hdr_T *ff_get_visited_list(char *filename,
#ifdef FF_VERBOSE #ifdef FF_VERBOSE
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter_scroll(); verbose_enter_scroll();
smsg("ff_get_visited_list: new list for %s", filename); smsg(0, "ff_get_visited_list: new list for %s", filename);
msg_puts("\n"); // don't overwrite this either msg_puts("\n"); // don't overwrite this either
verbose_leave_scroll(); verbose_leave_scroll();
} }

View File

@ -3363,7 +3363,7 @@ int readdir_core(garray_T *gap, const char *path, void *context, CheckItem check
Directory dir; Directory dir;
if (!os_scandir(&dir, path)) { if (!os_scandir(&dir, path)) {
smsg(_(e_notopen), path); smsg(0, _(e_notopen), path);
return FAIL; return FAIL;
} }

View File

@ -148,7 +148,7 @@ void ex_help(exarg_T *eap)
// There is no help window yet. // There is no help window yet.
// Try to open the file specified by the "helpfile" option. // Try to open the file specified by the "helpfile" option.
if ((helpfd = os_fopen(p_hf, READBIN)) == NULL) { if ((helpfd = os_fopen(p_hf, READBIN)) == NULL) {
smsg(_("Sorry, help file \"%s\" not found"), p_hf); smsg(0, _("Sorry, help file \"%s\" not found"), p_hf);
goto erret; goto erret;
} }
fclose(helpfd); fclose(helpfd);

View File

@ -56,7 +56,7 @@ int ask_yesno(const char *const str, const bool direct)
int r = ' '; int r = ' ';
while (r != 'y' && r != 'n') { while (r != 'y' && r != 'n') {
// same highlighting as for wait_return() // same highlighting as for wait_return()
smsg_attr(HL_ATTR(HLF_R), "%s (y/n)?", str); smsg(HL_ATTR(HLF_R), "%s (y/n)?", str);
if (direct) { if (direct) {
r = get_keystroke(NULL); r = get_keystroke(NULL);
} else { } else {

View File

@ -76,11 +76,11 @@ static bool nlua_trust(const char *action, const char *path)
if (msg != NULL) { if (msg != NULL) {
if (success) { if (success) {
if (strcmp(action, "allow") == 0) { if (strcmp(action, "allow") == 0) {
smsg("Allowed \"%s\" in trust database.", msg); smsg(0, "Allowed \"%s\" in trust database.", msg);
} else if (strcmp(action, "deny") == 0) { } else if (strcmp(action, "deny") == 0) {
smsg("Denied \"%s\" in trust database.", msg); smsg(0, "Denied \"%s\" in trust database.", msg);
} else if (strcmp(action, "remove") == 0) { } else if (strcmp(action, "remove") == 0) {
smsg("Removed \"%s\" from trust database.", msg); smsg(0, "Removed \"%s\" from trust database.", msg);
} }
} else { } else {
semsg(e_trustfile, msg); semsg(e_trustfile, msg);

View File

@ -918,14 +918,14 @@ void ml_recover(bool checkext)
} }
home_replace(NULL, mfp->mf_fname, NameBuff, MAXPATHL, true); home_replace(NULL, mfp->mf_fname, NameBuff, MAXPATHL, true);
smsg(_("Using swap file \"%s\""), NameBuff); smsg(0, _("Using swap file \"%s\""), NameBuff);
if (buf_spname(curbuf) != NULL) { if (buf_spname(curbuf) != NULL) {
xstrlcpy(NameBuff, buf_spname(curbuf), MAXPATHL); xstrlcpy(NameBuff, buf_spname(curbuf), MAXPATHL);
} else { } else {
home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, true); home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, true);
} }
smsg(_("Original file \"%s\""), NameBuff); smsg(0, _("Original file \"%s\""), NameBuff);
msg_putchar('\n'); msg_putchar('\n');
// check date of swap file and original file // check date of swap file and original file

View File

@ -474,22 +474,8 @@ void trunc_string(const char *s, char *buf, int room_in, int buflen)
} }
} }
// Note: Caller of smsg() and smsg_attr() must check the resulting string is // Note: Caller of smsg() must check the resulting string is shorter than IOSIZE!!!
// shorter than IOSIZE!!! int smsg(int attr, const char *s, ...)
int smsg(const char *s, ...)
FUNC_ATTR_PRINTF(1, 2)
{
va_list arglist;
va_start(arglist, s);
vim_vsnprintf(IObuff, IOSIZE, s, arglist);
va_end(arglist);
return msg(IObuff, 0);
}
int smsg_attr(int attr, const char *s, ...)
FUNC_ATTR_PRINTF(2, 3) FUNC_ATTR_PRINTF(2, 3)
{ {
va_list arglist; va_list arglist;

View File

@ -656,7 +656,7 @@ void op_reindent(oparg_T *oap, Indenter how)
if (i > 1 if (i > 1
&& (i % 50 == 0 || i == oap->line_count - 1) && (i % 50 == 0 || i == oap->line_count - 1)
&& oap->line_count > p_report) { && oap->line_count > p_report) {
smsg(_("%" PRId64 " lines to indent... "), (int64_t)i); smsg(0, _("%" PRId64 " lines to indent... "), (int64_t)i);
} }
// Be vi-compatible: For lisp indenting the first line is not // Be vi-compatible: For lisp indenting the first line is not
@ -699,9 +699,7 @@ void op_reindent(oparg_T *oap, Indenter how)
if (oap->line_count > p_report) { if (oap->line_count > p_report) {
i = oap->line_count - (i + 1); i = oap->line_count - (i + 1);
smsg(NGETTEXT("%" PRId64 " line indented ", smsg(0, NGETTEXT("%" PRId64 " line indented ", "%" PRId64 " lines indented ", i), (int64_t)i);
"%" PRId64 " lines indented ", i),
(int64_t)i);
} }
if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) { if ((cmdmod.cmod_flags & CMOD_LOCKMARKS) == 0) {
// set '[ and '] marks // set '[ and '] marks
@ -2109,8 +2107,7 @@ void op_tilde(oparg_T *oap)
} }
if (oap->line_count > p_report) { if (oap->line_count > p_report) {
smsg(NGETTEXT("%" PRId64 " line changed", smsg(0, NGETTEXT("%" PRId64 " line changed", "%" PRId64 " lines changed", oap->line_count),
"%" PRId64 " lines changed", oap->line_count),
(int64_t)oap->line_count); (int64_t)oap->line_count);
} }
} }
@ -2783,12 +2780,12 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
update_screen(); update_screen();
} }
if (yank_type == kMTBlockWise) { if (yank_type == kMTBlockWise) {
smsg(NGETTEXT("block of %" PRId64 " line yanked%s", smsg(0, NGETTEXT("block of %" PRId64 " line yanked%s",
"block of %" PRId64 " lines yanked%s", yanklines), "block of %" PRId64 " lines yanked%s", yanklines),
(int64_t)yanklines, namebuf); (int64_t)yanklines, namebuf);
} else { } else {
smsg(NGETTEXT("%" PRId64 " line yanked%s", smsg(0, NGETTEXT("%" PRId64 " line yanked%s",
"%" PRId64 " lines yanked%s", yanklines), "%" PRId64 " lines yanked%s", yanklines),
(int64_t)yanklines, namebuf); (int64_t)yanklines, namebuf);
} }
} }
@ -4452,8 +4449,7 @@ void op_addsub(oparg_T *oap, linenr_T Prenum1, bool g_cmd)
} }
if (change_cnt > p_report) { if (change_cnt > p_report) {
smsg(NGETTEXT("%" PRId64 " lines changed", smsg(0, NGETTEXT("%" PRId64 " lines changed", "%" PRId64 " lines changed", change_cnt),
"%" PRId64 " lines changed", change_cnt),
(int64_t)change_cnt); (int64_t)change_cnt);
} }
} }

View File

@ -76,7 +76,7 @@ int os_chdir(const char *path)
{ {
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter(); verbose_enter();
smsg("chdir(%s)", path); smsg(0, "chdir(%s)", path);
verbose_leave(); verbose_leave();
} }
return uv_chdir(path); return uv_chdir(path);

View File

@ -197,7 +197,7 @@ void ex_language(exarg_T *eap)
if (p == NULL || *p == NUL) { if (p == NULL || *p == NUL) {
p = "Unknown"; p = "Unknown";
} }
smsg(_("Current %slanguage: \"%s\""), whatstr, p); smsg(0, _("Current %slanguage: \"%s\""), whatstr, p);
} else { } else {
# ifndef LC_MESSAGES # ifndef LC_MESSAGES
if (what == VIM_LC_MESSAGES) { if (what == VIM_LC_MESSAGES) {

View File

@ -732,7 +732,7 @@ int call_shell(char *cmd, ShellOpts opts, char *extra_shell_arg)
if (p_verbose > 3) { if (p_verbose > 3) {
verbose_enter(); verbose_enter();
smsg(_("Executing command: \"%s\""), cmd == NULL ? p_sh : cmd); smsg(0, _("Executing command: \"%s\""), cmd == NULL ? p_sh : cmd);
msg_putchar('\n'); msg_putchar('\n');
verbose_leave(); verbose_leave();
} }

View File

@ -5458,7 +5458,7 @@ static int vgr_process_files(win_T *wp, qf_info_T *qi, vgr_args_T *cmd_args, boo
if (buf == NULL) { if (buf == NULL) {
if (!got_int) { if (!got_int) {
smsg(_("Cannot open file \"%s\""), fname); smsg(0, _("Cannot open file \"%s\""), fname);
} }
} else { } else {
// Try for a match in all lines of the buffer. // Try for a match in all lines of the buffer.

View File

@ -2319,7 +2319,7 @@ regprog_T *vim_regcomp(const char *expr_arg, int re_flags)
regexp_engine = expr[4] - '0'; regexp_engine = expr[4] - '0';
expr += 5; expr += 5;
#ifdef REGEXP_DEBUG #ifdef REGEXP_DEBUG
smsg("New regexp mode selected (%d): %s", smsg(0, "New regexp mode selected (%d): %s",
regexp_engine, regexp_engine,
regname[newengine]); regname[newengine]);
#endif #endif

View File

@ -353,9 +353,9 @@ int do_in_path(const char *path, const char *prefix, char *name, int flags,
if (p_verbose > 10 && name != NULL) { if (p_verbose > 10 && name != NULL) {
verbose_enter(); verbose_enter();
if (*prefix != NUL) { if (*prefix != NUL) {
smsg(_("Searching for \"%s\" under \"%s\" in \"%s\""), name, prefix, path); smsg(0, _("Searching for \"%s\" under \"%s\" in \"%s\""), name, prefix, path);
} else { } else {
smsg(_("Searching for \"%s\" in \"%s\""), name, path); smsg(0, _("Searching for \"%s\" in \"%s\""), name, path);
} }
verbose_leave(); verbose_leave();
} }
@ -396,7 +396,7 @@ int do_in_path(const char *path, const char *prefix, char *name, int flags,
if (p_verbose > 10) { if (p_verbose > 10) {
verbose_enter(); verbose_enter();
smsg(_("Searching for \"%s\""), buf); smsg(0, _("Searching for \"%s\""), buf);
verbose_leave(); verbose_leave();
} }
@ -418,7 +418,7 @@ int do_in_path(const char *path, const char *prefix, char *name, int flags,
semsg(_(e_dirnotf), basepath, name); semsg(_(e_dirnotf), basepath, name);
} else if (p_verbose > 1) { } else if (p_verbose > 1) {
verbose_enter(); verbose_enter();
smsg(_("not found in '%s': \"%s\""), basepath, name); smsg(0, _("not found in '%s': \"%s\""), basepath, name);
verbose_leave(); verbose_leave();
} }
} }
@ -481,7 +481,7 @@ int do_in_cached_path(char *name, int flags, DoInRuntimepathCB callback, void *c
if (p_verbose > 10 && name != NULL) { if (p_verbose > 10 && name != NULL) {
verbose_enter(); verbose_enter();
smsg(_("Searching for \"%s\" in runtime path"), name); smsg(0, _("Searching for \"%s\" in runtime path"), name);
verbose_leave(); verbose_leave();
} }
@ -520,7 +520,7 @@ int do_in_cached_path(char *name, int flags, DoInRuntimepathCB callback, void *c
if (p_verbose > 10) { if (p_verbose > 10) {
verbose_enter(); verbose_enter();
smsg(_("Searching for \"%s\""), buf); smsg(0, _("Searching for \"%s\""), buf);
verbose_leave(); verbose_leave();
} }
@ -540,7 +540,7 @@ int do_in_cached_path(char *name, int flags, DoInRuntimepathCB callback, void *c
semsg(_(e_dirnotf), "runtime path", name); semsg(_(e_dirnotf), "runtime path", name);
} else if (p_verbose > 1) { } else if (p_verbose > 1) {
verbose_enter(); verbose_enter();
smsg(_("not found in runtime path: \"%s\""), name); smsg(0, _("not found in runtime path: \"%s\""), name);
verbose_leave(); verbose_leave();
} }
} }
@ -2047,7 +2047,7 @@ int do_source(char *fname, int check_other, int is_vimrc, int *ret_sid)
return retval; return retval;
} }
if (os_isdir(fname_exp)) { if (os_isdir(fname_exp)) {
smsg(_("Cannot source a directory: \"%s\""), fname); smsg(0, _("Cannot source a directory: \"%s\""), fname);
goto theend; goto theend;
} }
@ -2091,9 +2091,9 @@ int do_source(char *fname, int check_other, int is_vimrc, int *ret_sid)
if (p_verbose > 1) { if (p_verbose > 1) {
verbose_enter(); verbose_enter();
if (SOURCING_NAME == NULL) { if (SOURCING_NAME == NULL) {
smsg(_("could not source \"%s\""), fname); smsg(0, _("could not source \"%s\""), fname);
} else { } else {
smsg(_("line %" PRId64 ": could not source \"%s\""), smsg(0, _("line %" PRId64 ": could not source \"%s\""),
(int64_t)SOURCING_LNUM, fname); (int64_t)SOURCING_LNUM, fname);
} }
verbose_leave(); verbose_leave();
@ -2107,9 +2107,9 @@ int do_source(char *fname, int check_other, int is_vimrc, int *ret_sid)
if (p_verbose > 1) { if (p_verbose > 1) {
verbose_enter(); verbose_enter();
if (SOURCING_NAME == NULL) { if (SOURCING_NAME == NULL) {
smsg(_("sourcing \"%s\""), fname); smsg(0, _("sourcing \"%s\""), fname);
} else { } else {
smsg(_("line %" PRId64 ": sourcing \"%s\""), (int64_t)SOURCING_LNUM, fname); smsg(0, _("line %" PRId64 ": sourcing \"%s\""), (int64_t)SOURCING_LNUM, fname);
} }
verbose_leave(); verbose_leave();
} }
@ -2242,9 +2242,9 @@ int do_source(char *fname, int check_other, int is_vimrc, int *ret_sid)
estack_pop(); estack_pop();
if (p_verbose > 1) { if (p_verbose > 1) {
verbose_enter(); verbose_enter();
smsg(_("finished sourcing %s"), fname); smsg(0, _("finished sourcing %s"), fname);
if (SOURCING_NAME != NULL) { if (SOURCING_NAME != NULL) {
smsg(_("continuing in %s"), SOURCING_NAME); smsg(0, _("continuing in %s"), SOURCING_NAME);
} }
verbose_leave(); verbose_leave();
} }

View File

@ -3798,7 +3798,7 @@ void find_pattern_in_path(char *ptr, Direction dir, size_t len, bool whole, bool
msg_trunc(IObuff, true, HL_ATTR(HLF_R)); msg_trunc(IObuff, true, HL_ATTR(HLF_R));
} else if (p_verbose >= 5) { } else if (p_verbose >= 5) {
verbose_enter(); verbose_enter();
smsg(_("Searching included file %s"), new_fname); smsg(0, _("Searching included file %s"), new_fname);
verbose_leave(); verbose_leave();
} }
} }

View File

@ -795,7 +795,7 @@ static int shada_read_file(const char *const file, const int flags)
if (p_verbose > 1) { if (p_verbose > 1) {
verbose_enter(); verbose_enter();
smsg(_("Reading ShaDa file \"%s\"%s%s%s%s"), smsg(0, _("Reading ShaDa file \"%s\"%s%s%s%s"),
fname, fname,
(flags & kShaDaWantInfo) ? _(" info") : "", (flags & kShaDaWantInfo) ? _(" info") : "",
(flags & kShaDaWantMarks) ? _(" marks") : "", (flags & kShaDaWantMarks) ? _(" marks") : "",
@ -3049,7 +3049,7 @@ shada_write_file_nomerge: {}
if (p_verbose > 1) { if (p_verbose > 1) {
verbose_enter(); verbose_enter();
smsg(_("Writing ShaDa file \"%s\""), fname); smsg(0, _("Writing ShaDa file \"%s\""), fname);
verbose_leave(); verbose_leave();
} }

View File

@ -1660,7 +1660,7 @@ static void sign_get_placed(buf_T *buf, linenr_T lnum, int sign_id, const char *
/// List one sign. /// List one sign.
static void sign_list_defined(sign_T *sp) static void sign_list_defined(sign_T *sp)
{ {
smsg("sign %s", sp->sn_name); smsg(0, "sign %s", sp->sn_name);
if (sp->sn_icon != NULL) { if (sp->sn_icon != NULL) {
msg_puts(" icon="); msg_puts(" icon=");
msg_outtrans(sp->sn_icon, 0); msg_outtrans(sp->sn_icon, 0);

View File

@ -1626,7 +1626,7 @@ static void spell_load_lang(char *lang)
lang); lang);
do_cmdline_cmd(autocmd_buf); do_cmdline_cmd(autocmd_buf);
} else { } else {
smsg(_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""), smsg(0, _("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
lang, spell_enc(), lang); lang, spell_enc(), lang);
} }
} else if (sl.sl_slang != NULL) { } else if (sl.sl_slang != NULL) {
@ -2076,7 +2076,7 @@ char *parse_spelllang(win_T *wp)
} else { } else {
// This is probably an error. Give a warning and // This is probably an error. Give a warning and
// accept the words anyway. // accept the words anyway.
smsg(_("Warning: region %s not supported"), smsg(0, _("Warning: region %s not supported"),
region); region);
} }
} else { } else {

View File

@ -612,14 +612,14 @@ slang_T *spell_load_file(char *fname, char *lang, slang_T *old_lp, bool silent)
semsg(_(e_notopen), fname); semsg(_(e_notopen), fname);
} else if (p_verbose > 2) { } else if (p_verbose > 2) {
verbose_enter(); verbose_enter();
smsg(e_notopen, fname); smsg(0, e_notopen, fname);
verbose_leave(); verbose_leave();
} }
goto endFAIL; goto endFAIL;
} }
if (p_verbose > 2) { if (p_verbose > 2) {
verbose_enter(); verbose_enter();
smsg(_("Reading spell file \"%s\""), fname); smsg(0, _("Reading spell file \"%s\""), fname);
verbose_leave(); verbose_leave();
} }
@ -2097,7 +2097,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (spin->si_conv.vc_type != CONV_NONE) { if (spin->si_conv.vc_type != CONV_NONE) {
pc = string_convert(&spin->si_conv, rline, NULL); pc = string_convert(&spin->si_conv, rline, NULL);
if (pc == NULL) { if (pc == NULL) {
smsg(_("Conversion failure for word in %s line %d: %s"), smsg(0, _("Conversion failure for word in %s line %d: %s"),
fname, lnum, rline); fname, lnum, rline);
continue; continue;
} }
@ -2144,7 +2144,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
aff->af_enc = enc_canonize(items[1]); aff->af_enc = enc_canonize(items[1]);
if (!spin->si_ascii if (!spin->si_ascii
&& convert_setup(&spin->si_conv, aff->af_enc, p_enc) == FAIL) { && convert_setup(&spin->si_conv, aff->af_enc, p_enc) == FAIL) {
smsg(_("Conversion in %s not supported: from %s to %s"), smsg(0, _("Conversion in %s not supported: from %s to %s"),
fname, aff->af_enc, p_enc); fname, aff->af_enc, p_enc);
} }
spin->si_conv.vc_fail = true; spin->si_conv.vc_fail = true;
@ -2157,7 +2157,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
} else if (strcmp(items[1], "caplong") == 0) { } else if (strcmp(items[1], "caplong") == 0) {
aff->af_flagtype = AFT_CAPLONG; aff->af_flagtype = AFT_CAPLONG;
} else { } else {
smsg(_("Invalid value for FLAG in %s line %d: %s"), smsg(0, _("Invalid value for FLAG in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
if (aff->af_rare != 0 if (aff->af_rare != 0
@ -2171,7 +2171,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
|| compflags != NULL || compflags != NULL
|| aff->af_suff.ht_used > 0 || aff->af_suff.ht_used > 0
|| aff->af_pref.ht_used > 0) { || aff->af_pref.ht_used > 0) {
smsg(_("FLAG after using flags in %s line %d: %s"), smsg(0, _("FLAG after using flags in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (spell_info_item(items[0]) && itemcnt > 1) { } else if (spell_info_item(items[0]) && itemcnt > 1) {
@ -2223,14 +2223,16 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
&& aff->af_compforbid == 0) { && aff->af_compforbid == 0) {
aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1], fname, lnum); aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1], fname, lnum);
if (aff->af_pref.ht_used > 0) { if (aff->af_pref.ht_used > 0) {
smsg(_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"), smsg(0,
_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
fname, lnum); fname, lnum);
} }
} else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2) } else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2)
&& aff->af_comppermit == 0) { && aff->af_comppermit == 0) {
aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1], fname, lnum); aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1], fname, lnum);
if (aff->af_pref.ht_used > 0) { if (aff->af_pref.ht_used > 0) {
smsg(_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"), smsg(0,
_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
fname, lnum); fname, lnum);
} }
} else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2) } else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2)
@ -2245,7 +2247,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
// We don't use the count, but do check that it's a number and // We don't use the count, but do check that it's a number and
// not COMPOUNDRULE mistyped. // not COMPOUNDRULE mistyped.
if (atoi(items[1]) == 0) { if (atoi(items[1]) == 0) {
smsg(_("Wrong COMPOUNDRULES value in %s line %d: %s"), smsg(0, _("Wrong COMPOUNDRULES value in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) { } else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) {
@ -2269,21 +2271,21 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
&& compmax == 0) { && compmax == 0) {
compmax = atoi(items[1]); compmax = atoi(items[1]);
if (compmax == 0) { if (compmax == 0) {
smsg(_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"), smsg(0, _("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2) } else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2)
&& compminlen == 0) { && compminlen == 0) {
compminlen = atoi(items[1]); compminlen = atoi(items[1]);
if (compminlen == 0) { if (compminlen == 0) {
smsg(_("Wrong COMPOUNDMIN value in %s line %d: %s"), smsg(0, _("Wrong COMPOUNDMIN value in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2) } else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2)
&& compsylmax == 0) { && compsylmax == 0) {
compsylmax = atoi(items[1]); compsylmax = atoi(items[1]);
if (compsylmax == 0) { if (compsylmax == 0) {
smsg(_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"), smsg(0, _("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1)) { } else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1)) {
@ -2296,7 +2298,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
compoptions |= COMP_CHECKTRIPLE; compoptions |= COMP_CHECKTRIPLE;
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2)) { } else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2)) {
if (atoi(items[1]) == 0) { if (atoi(items[1]) == 0) {
smsg(_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"), smsg(0, _("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3)) { } else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3)) {
@ -2352,11 +2354,11 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (!HASHITEM_EMPTY(hi)) { if (!HASHITEM_EMPTY(hi)) {
cur_aff = HI2AH(hi); cur_aff = HI2AH(hi);
if (cur_aff->ah_combine != (*items[2] == 'Y')) { if (cur_aff->ah_combine != (*items[2] == 'Y')) {
smsg(_("Different combining flag in continued affix block in %s line %d: %s"), smsg(0, _("Different combining flag in continued affix block in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
if (!cur_aff->ah_follows) { if (!cur_aff->ah_follows) {
smsg(_("Duplicate affix in %s line %d: %s"), smsg(0, _("Duplicate affix in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
} else { } else {
@ -2374,9 +2376,8 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
|| cur_aff->ah_flag == aff->af_nosuggest || cur_aff->ah_flag == aff->af_nosuggest
|| cur_aff->ah_flag == aff->af_needcomp || cur_aff->ah_flag == aff->af_needcomp
|| cur_aff->ah_flag == aff->af_comproot) { || cur_aff->ah_flag == aff->af_comproot) {
smsg(_("Affix also used for " smsg(0, _("Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST "
"BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST " "in %s line %d: %s"),
"in %s line %d: %s"),
fname, lnum, items[1]); fname, lnum, items[1]);
} }
STRCPY(cur_aff->ah_key, items[1]); STRCPY(cur_aff->ah_key, items[1]);
@ -2400,11 +2401,11 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (itemcnt > lasti if (itemcnt > lasti
&& !aff->af_ignoreextra && !aff->af_ignoreextra
&& *items[lasti] != '#') { && *items[lasti] != '#') {
smsg(_(e_afftrailing), fname, lnum, items[lasti]); smsg(0, _(e_afftrailing), fname, lnum, items[lasti]);
} }
if (strcmp(items[2], "Y") != 0 && strcmp(items[2], "N") != 0) { if (strcmp(items[2], "Y") != 0 && strcmp(items[2], "N") != 0) {
smsg(_("Expected Y or N in %s line %d: %s"), smsg(0, _("Expected Y or N in %s line %d: %s"),
fname, lnum, items[2]); fname, lnum, items[2]);
} }
@ -2440,7 +2441,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (itemcnt > lasti && *items[lasti] != '#' if (itemcnt > lasti && *items[lasti] != '#'
&& (strcmp(items[lasti], "-") != 0 && (strcmp(items[lasti], "-") != 0
|| itemcnt != lasti + 1)) { || itemcnt != lasti + 1)) {
smsg(_(e_afftrailing), fname, lnum, items[lasti]); smsg(0, _(e_afftrailing), fname, lnum, items[lasti]);
} }
// New item for an affix letter. // New item for an affix letter.
@ -2475,7 +2476,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
snprintf(buf, sizeof(buf), *items[0] == 'P' ? "^%s" : "%s$", items[4]); snprintf(buf, sizeof(buf), *items[0] == 'P' ? "^%s" : "%s$", items[4]);
aff_entry->ae_prog = vim_regcomp(buf, RE_MAGIC + RE_STRING + RE_STRICT); aff_entry->ae_prog = vim_regcomp(buf, RE_MAGIC + RE_STRING + RE_STRICT);
if (aff_entry->ae_prog == NULL) { if (aff_entry->ae_prog == NULL) {
smsg(_("Broken condition in %s line %d: %s"), smsg(0, _("Broken condition in %s line %d: %s"),
fname, lnum, items[4]); fname, lnum, items[4]);
} }
} }
@ -2587,7 +2588,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
|| is_aff_rule(items, itemcnt, "REPSAL", 2)) { || is_aff_rule(items, itemcnt, "REPSAL", 2)) {
// Ignore REP/REPSAL count // Ignore REP/REPSAL count
if (!isdigit((uint8_t)(*items[1]))) { if (!isdigit((uint8_t)(*items[1]))) {
smsg(_("Expected REP(SAL) count in %s line %d"), smsg(0, _("Expected REP(SAL) count in %s line %d"),
fname, lnum); fname, lnum);
} }
} else if ((strcmp(items[0], "REP") == 0 } else if ((strcmp(items[0], "REP") == 0
@ -2597,7 +2598,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
// Myspell ignores extra arguments, we require it starts with // Myspell ignores extra arguments, we require it starts with
// # to detect mistakes. // # to detect mistakes.
if (itemcnt > 3 && items[3][0] != '#') { if (itemcnt > 3 && items[3][0] != '#') {
smsg(_(e_afftrailing), fname, lnum, items[3]); smsg(0, _(e_afftrailing), fname, lnum, items[3]);
} }
if (items[0][3] == 'S' ? do_repsal : do_rep) { if (items[0][3] == 'S' ? do_repsal : do_rep) {
// Replace underscore with space (can't include a space // Replace underscore with space (can't include a space
@ -2622,7 +2623,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
// First line contains the count. // First line contains the count.
found_map = true; found_map = true;
if (!isdigit((uint8_t)(*items[1]))) { if (!isdigit((uint8_t)(*items[1]))) {
smsg(_("Expected MAP count in %s line %d"), smsg(0, _("Expected MAP count in %s line %d"),
fname, lnum); fname, lnum);
} }
} else if (do_mapline) { } else if (do_mapline) {
@ -2633,7 +2634,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
&& vim_strchr(spin->si_map.ga_data, c) && vim_strchr(spin->si_map.ga_data, c)
!= NULL) != NULL)
|| vim_strchr(p, c) != NULL) { || vim_strchr(p, c) != NULL) {
smsg(_("Duplicate character in MAP in %s line %d"), smsg(0, _("Duplicate character in MAP in %s line %d"),
fname, lnum); fname, lnum);
} }
} }
@ -2676,7 +2677,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
} }
} }
} else { } else {
smsg(_("Unrecognized or duplicate item in %s line %d: %s"), smsg(0, _("Unrecognized or duplicate item in %s line %d: %s"),
fname, lnum, items[0]); fname, lnum, items[0]);
} }
} }
@ -2708,7 +2709,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (compsylmax != 0) { if (compsylmax != 0) {
if (syllable == NULL) { if (syllable == NULL) {
smsg("%s", _("COMPOUNDSYLMAX used without SYLLABLE")); smsg(0, "%s", _("COMPOUNDSYLMAX used without SYLLABLE"));
} }
aff_check_number(spin->si_compsylmax, compsylmax, "COMPOUNDSYLMAX"); aff_check_number(spin->si_compsylmax, compsylmax, "COMPOUNDSYLMAX");
spin->si_compsylmax = compsylmax; spin->si_compsylmax = compsylmax;
@ -2741,10 +2742,10 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char *fname)
if (sofofrom != NULL || sofoto != NULL) { if (sofofrom != NULL || sofoto != NULL) {
if (sofofrom == NULL || sofoto == NULL) { if (sofofrom == NULL || sofoto == NULL) {
smsg(_("Missing SOFO%s line in %s"), smsg(0, _("Missing SOFO%s line in %s"),
sofofrom == NULL ? "FROM" : "TO", fname); sofofrom == NULL ? "FROM" : "TO", fname);
} else if (!GA_EMPTY(&spin->si_sal)) { } else if (!GA_EMPTY(&spin->si_sal)) {
smsg(_("Both SAL and SOFO lines in %s"), fname); smsg(0, _("Both SAL and SOFO lines in %s"), fname);
} else { } else {
aff_check_string(spin->si_sofofr, sofofrom, "SOFOFROM"); aff_check_string(spin->si_sofofr, sofofrom, "SOFOFROM");
aff_check_string(spin->si_sofoto, sofoto, "SOFOTO"); aff_check_string(spin->si_sofoto, sofoto, "SOFOTO");
@ -2822,15 +2823,15 @@ static unsigned affitem2flag(int flagtype, char *item, char *fname, int lnum)
unsigned res = get_affitem(flagtype, &p); unsigned res = get_affitem(flagtype, &p);
if (res == 0) { if (res == 0) {
if (flagtype == AFT_NUM) { if (flagtype == AFT_NUM) {
smsg(_("Flag is not a number in %s line %d: %s"), smsg(0, _("Flag is not a number in %s line %d: %s"),
fname, lnum, item); fname, lnum, item);
} else { } else {
smsg(_("Illegal flag in %s line %d: %s"), smsg(0, _("Illegal flag in %s line %d: %s"),
fname, lnum, item); fname, lnum, item);
} }
} }
if (*p != NUL) { if (*p != NUL) {
smsg(_(e_affname), fname, lnum, item); smsg(0, _(e_affname), fname, lnum, item);
return 0; return 0;
} }
@ -2993,7 +2994,7 @@ static bool flag_in_afflist(int flagtype, char *afflist, unsigned flag)
static void aff_check_number(int spinval, int affval, char *name) static void aff_check_number(int spinval, int affval, char *name)
{ {
if (spinval != 0 && spinval != affval) { if (spinval != 0 && spinval != affval) {
smsg(_("%s value differs from what is used in another .aff file"), smsg(0, _("%s value differs from what is used in another .aff file"),
name); name);
} }
} }
@ -3002,7 +3003,7 @@ static void aff_check_number(int spinval, int affval, char *name)
static void aff_check_string(char *spinval, char *affval, char *name) static void aff_check_string(char *spinval, char *affval, char *name)
{ {
if (spinval != NULL && strcmp(spinval, affval) != 0) { if (spinval != NULL && strcmp(spinval, affval) != 0) {
smsg(_("%s value differs from what is used in another .aff file"), smsg(0, _("%s value differs from what is used in another .aff file"),
name); name);
} }
} }
@ -3139,7 +3140,7 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
if (spin->si_conv.vc_type != CONV_NONE) { if (spin->si_conv.vc_type != CONV_NONE) {
pc = string_convert(&spin->si_conv, line, NULL); pc = string_convert(&spin->si_conv, line, NULL);
if (pc == NULL) { if (pc == NULL) {
smsg(_("Conversion failure for word in %s line %d: %s"), smsg(0, _("Conversion failure for word in %s line %d: %s"),
fname, lnum, line); fname, lnum, line);
continue; continue;
} }
@ -3199,10 +3200,10 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
hi = hash_lookup(&ht, dw, strlen(dw), hash); hi = hash_lookup(&ht, dw, strlen(dw), hash);
if (!HASHITEM_EMPTY(hi)) { if (!HASHITEM_EMPTY(hi)) {
if (p_verbose > 0) { if (p_verbose > 0) {
smsg(_("Duplicate word in %s line %d: %s"), smsg(0, _("Duplicate word in %s line %d: %s"),
fname, lnum, dw); fname, lnum, dw);
} else if (duplicate == 0) { } else if (duplicate == 0) {
smsg(_("First duplicate word in %s line %d: %s"), smsg(0, _("First duplicate word in %s line %d: %s"),
fname, lnum, dw); fname, lnum, dw);
} }
duplicate++; duplicate++;
@ -3263,10 +3264,10 @@ static int spell_read_dic(spellinfo_T *spin, char *fname, afffile_T *affile)
} }
if (duplicate > 0) { if (duplicate > 0) {
smsg(_("%d duplicate word(s) in %s"), duplicate, fname); smsg(0, _("%d duplicate word(s) in %s"), duplicate, fname);
} }
if (spin->si_ascii && non_ascii > 0) { if (spin->si_ascii && non_ascii > 0) {
smsg(_("Ignored %d word(s) with non-ASCII characters in %s"), smsg(0, _("Ignored %d word(s) with non-ASCII characters in %s"),
non_ascii, fname); non_ascii, fname);
} }
hash_clear(&ht); hash_clear(&ht);
@ -3681,7 +3682,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
if (spin->si_conv.vc_type != CONV_NONE) { if (spin->si_conv.vc_type != CONV_NONE) {
pc = string_convert(&spin->si_conv, rline, NULL); pc = string_convert(&spin->si_conv, rline, NULL);
if (pc == NULL) { if (pc == NULL) {
smsg(_("Conversion failure for word in %s line %ld: %s"), smsg(0, _("Conversion failure for word in %s line %ld: %s"),
fname, lnum, rline); fname, lnum, rline);
continue; continue;
} }
@ -3695,10 +3696,10 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
line++; line++;
if (strncmp(line, "encoding=", 9) == 0) { if (strncmp(line, "encoding=", 9) == 0) {
if (spin->si_conv.vc_type != CONV_NONE) { if (spin->si_conv.vc_type != CONV_NONE) {
smsg(_("Duplicate /encoding= line ignored in %s line %ld: %s"), smsg(0, _("Duplicate /encoding= line ignored in %s line %ld: %s"),
fname, lnum, line - 1); fname, lnum, line - 1);
} else if (did_word) { } else if (did_word) {
smsg(_("/encoding= line after word ignored in %s line %ld: %s"), smsg(0, _("/encoding= line after word ignored in %s line %ld: %s"),
fname, lnum, line - 1); fname, lnum, line - 1);
} else { } else {
char *enc; char *enc;
@ -3708,7 +3709,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
enc = enc_canonize(line); enc = enc_canonize(line);
if (!spin->si_ascii if (!spin->si_ascii
&& convert_setup(&spin->si_conv, enc, p_enc) == FAIL) { && convert_setup(&spin->si_conv, enc, p_enc) == FAIL) {
smsg(_("Conversion in %s not supported: from %s to %s"), smsg(0, _("Conversion in %s not supported: from %s to %s"),
fname, line, p_enc); fname, line, p_enc);
} }
xfree(enc); xfree(enc);
@ -3719,12 +3720,12 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
if (strncmp(line, "regions=", 8) == 0) { if (strncmp(line, "regions=", 8) == 0) {
if (spin->si_region_count > 1) { if (spin->si_region_count > 1) {
smsg(_("Duplicate /regions= line ignored in %s line %ld: %s"), smsg(0, _("Duplicate /regions= line ignored in %s line %ld: %s"),
fname, lnum, line); fname, lnum, line);
} else { } else {
line += 8; line += 8;
if (strlen(line) > MAXREGIONS * 2) { if (strlen(line) > MAXREGIONS * 2) {
smsg(_("Too many regions in %s line %ld: %s"), smsg(0, _("Too many regions in %s line %ld: %s"),
fname, lnum, line); fname, lnum, line);
} else { } else {
spin->si_region_count = (int)strlen(line) / 2; spin->si_region_count = (int)strlen(line) / 2;
@ -3737,7 +3738,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
continue; continue;
} }
smsg(_("/ line ignored in %s line %ld: %s"), smsg(0, _("/ line ignored in %s line %ld: %s"),
fname, lnum, line - 1); fname, lnum, line - 1);
continue; continue;
} }
@ -3764,13 +3765,13 @@ static int spell_read_wordfile(spellinfo_T *spin, char *fname)
l = (uint8_t)(*p) - '0'; l = (uint8_t)(*p) - '0';
if (l == 0 || l > spin->si_region_count) { if (l == 0 || l > spin->si_region_count) {
smsg(_("Invalid region nr in %s line %ld: %s"), smsg(0, _("Invalid region nr in %s line %ld: %s"),
fname, lnum, p); fname, lnum, p);
break; break;
} }
regionmask |= 1 << (l - 1); regionmask |= 1 << (l - 1);
} else { } else {
smsg(_("Unrecognized flags in %s line %ld: %s"), smsg(0, _("Unrecognized flags in %s line %ld: %s"),
fname, lnum, p); fname, lnum, p);
break; break;
} }
@ -4047,7 +4048,7 @@ static int tree_add_word(spellinfo_T *spin, const char *word, wordnode_T *root,
node = *prev; node = *prev;
} }
#ifdef SPELL_PRINTTREE #ifdef SPELL_PRINTTREE
smsg("Added \"%s\"", word); smsg(0, "Added \"%s\"", word);
spell_print_tree(root->wn_sibling); spell_print_tree(root->wn_sibling);
#endif #endif
@ -4924,7 +4925,7 @@ static void spell_make_sugfile(spellinfo_T *spin, char *wfname)
goto theend; goto theend;
} }
smsg(_("Number of words after soundfolding: %" PRId64), smsg(0, _("Number of words after soundfolding: %" PRId64),
(int64_t)spin->si_spellbuf->b_ml.ml_line_count); (int64_t)spin->si_spellbuf->b_ml.ml_line_count);
// Compress the soundfold trie. // Compress the soundfold trie.
@ -5035,7 +5036,7 @@ static int sug_filltree(spellinfo_T *spin, slang_T *slang)
} }
} }
smsg(_("Total number of words: %d"), words_done); smsg(0, _("Total number of words: %d"), words_done);
return OK; return OK;
} }
@ -5584,7 +5585,7 @@ void spell_add_word(char *word, int len, SpellAddType what, int idx, bool undo)
fputc('#', fd); fputc('#', fd);
if (undo) { if (undo) {
home_replace(NULL, fname, NameBuff, MAXPATHL, true); home_replace(NULL, fname, NameBuff, MAXPATHL, true);
smsg(_("Word '%.*s' removed from %s"), len, word, NameBuff); smsg(0, _("Word '%.*s' removed from %s"), len, word, NameBuff);
} }
} }
if (fseek(fd, fpos_next, SEEK_SET) != 0) { if (fseek(fd, fpos_next, SEEK_SET) != 0) {
@ -5634,7 +5635,7 @@ void spell_add_word(char *word, int len, SpellAddType what, int idx, bool undo)
fclose(fd); fclose(fd);
home_replace(NULL, fname, NameBuff, MAXPATHL, true); home_replace(NULL, fname, NameBuff, MAXPATHL, true);
smsg(_("Word '%.*s' added to %s"), len, word, NameBuff); smsg(0, _("Word '%.*s' added to %s"), len, word, NameBuff);
} }
} }

View File

@ -529,7 +529,7 @@ void spell_suggest(int count)
msg(_("Sorry, no suggestions"), 0); msg(_("Sorry, no suggestions"), 0);
} else if (count > 0) { } else if (count > 0) {
if (count > sug.su_ga.ga_len) { if (count > sug.su_ga.ga_len) {
smsg(_("Sorry, only %" PRId64 " suggestions"), smsg(0, _("Sorry, only %" PRId64 " suggestions"),
(int64_t)sug.su_ga.ga_len); (int64_t)sug.su_ga.ga_len);
} }
} else { } else {
@ -1480,9 +1480,9 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char *fword, bool soun
int j; int j;
// print the stack of changes that brought us here // print the stack of changes that brought us here
smsg("------ %s -------", fword); smsg(0, "------ %s -------", fword);
for (j = 0; j < depth; j++) { for (j = 0; j < depth; j++) {
smsg("%s", changename[j]); smsg(0, "%s", changename[j]);
} }
} }
#endif #endif

View File

@ -719,7 +719,7 @@ void do_tag(char *tag, int type, int count, int forceit, int verbose)
// Only when going to try the next match, report that the previous // Only when going to try the next match, report that the previous
// file didn't exist. Otherwise an emsg() is given below. // file didn't exist. Otherwise an emsg() is given below.
if (nofile_fname != NULL && error_cur_match != cur_match) { if (nofile_fname != NULL && error_cur_match != cur_match) {
smsg(_("File \"%s\" does not exist"), nofile_fname); smsg(0, _("File \"%s\" does not exist"), nofile_fname);
} }
ic = (matches[cur_match][0] & MT_IC_OFF); ic = (matches[cur_match][0] & MT_IC_OFF);
@ -2211,7 +2211,7 @@ static void findtags_in_file(findtags_state_T *st, int flags, char *buf_ffname)
if (p_verbose >= 5) { if (p_verbose >= 5) {
verbose_enter(); verbose_enter();
smsg(_("Searching tags file %s"), st->tag_fname); smsg(0, _("Searching tags file %s"), st->tag_fname);
verbose_leave(); verbose_leave();
} }
st->did_open = true; // remember that we found at least one file st->did_open = true; // remember that we found at least one file
@ -3279,7 +3279,7 @@ static int add_tag_field(dict_T *dict, const char *field_name, const char *start
if (tv_dict_find(dict, field_name, -1) != NULL) { if (tv_dict_find(dict, field_name, -1) != NULL) {
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg(_("Duplicate field name: %s"), field_name); smsg(0, _("Duplicate field name: %s"), field_name);
verbose_leave(); verbose_leave();
} }
return FAIL; return FAIL;

View File

@ -183,12 +183,12 @@ static void u_check_tree(u_header_T *uhp, u_header_T *exp_uh_next, u_header_T *e
// Check pointers back are correct. // Check pointers back are correct.
if (uhp->uh_next.ptr != exp_uh_next) { if (uhp->uh_next.ptr != exp_uh_next) {
emsg("uh_next wrong"); emsg("uh_next wrong");
smsg("expected: 0x%x, actual: 0x%x", smsg(0, "expected: 0x%x, actual: 0x%x",
exp_uh_next, uhp->uh_next.ptr); exp_uh_next, uhp->uh_next.ptr);
} }
if (uhp->uh_alt_prev.ptr != exp_uh_alt_prev) { if (uhp->uh_alt_prev.ptr != exp_uh_alt_prev) {
emsg("uh_alt_prev wrong"); emsg("uh_alt_prev wrong");
smsg("expected: 0x%x, actual: 0x%x", smsg(0, "expected: 0x%x, actual: 0x%x",
exp_uh_alt_prev, uhp->uh_alt_prev.ptr); exp_uh_alt_prev, uhp->uh_alt_prev.ptr);
} }
@ -225,7 +225,7 @@ static void u_check(int newhead_may_be_NULL)
} }
if (header_count != curbuf->b_u_numhead) { if (header_count != curbuf->b_u_numhead) {
emsg("b_u_numhead invalid"); emsg("b_u_numhead invalid");
smsg("expected: %" PRId64 ", actual: %" PRId64, smsg(0, "expected: %" PRId64 ", actual: %" PRId64,
(int64_t)header_count, (int64_t)curbuf->b_u_numhead); (int64_t)header_count, (int64_t)curbuf->b_u_numhead);
} }
} }
@ -1179,7 +1179,7 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
if (file_name == NULL) { if (file_name == NULL) {
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg("%s", _("Cannot write undo file in any directory in 'undodir'")); smsg(0, "%s", _("Cannot write undo file in any directory in 'undodir'"));
verbose_leave(); verbose_leave();
} }
return; return;
@ -1215,7 +1215,7 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
if (name == NULL) { if (name == NULL) {
verbose_enter(); verbose_enter();
} }
smsg(_("Will not overwrite with undo file, cannot read: %s"), smsg(0, _("Will not overwrite with undo file, cannot read: %s"),
file_name); file_name);
if (name == NULL) { if (name == NULL) {
verbose_leave(); verbose_leave();
@ -1232,7 +1232,7 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
if (name == NULL) { if (name == NULL) {
verbose_enter(); verbose_enter();
} }
smsg(_("Will not overwrite, this is not an undo file: %s"), smsg(0, _("Will not overwrite, this is not an undo file: %s"),
file_name); file_name);
if (name == NULL) { if (name == NULL) {
verbose_leave(); verbose_leave();
@ -1262,7 +1262,7 @@ void u_write_undo(const char *const name, const bool forceit, buf_T *const buf,
(void)os_setperm(file_name, perm); (void)os_setperm(file_name, perm);
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg(_("Writing undo file: %s"), file_name); smsg(0, _("Writing undo file: %s"), file_name);
verbose_leave(); verbose_leave();
} }
@ -1399,7 +1399,7 @@ void u_read_undo(char *name, const uint8_t *hash, const char *orig_name FUNC_ATT
&& file_info_undo.stat.st_uid != getuid()) { && file_info_undo.stat.st_uid != getuid()) {
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg(_("Not reading undo file, owner differs: %s"), smsg(0, _("Not reading undo file, owner differs: %s"),
file_name); file_name);
verbose_leave(); verbose_leave();
} }
@ -1412,7 +1412,7 @@ void u_read_undo(char *name, const uint8_t *hash, const char *orig_name FUNC_ATT
if (p_verbose > 0) { if (p_verbose > 0) {
verbose_enter(); verbose_enter();
smsg(_("Reading undo file: %s"), file_name); smsg(0, _("Reading undo file: %s"), file_name);
verbose_leave(); verbose_leave();
} }
@ -1648,7 +1648,7 @@ void u_read_undo(char *name, const uint8_t *hash, const char *orig_name FUNC_ATT
#endif #endif
if (name != NULL) { if (name != NULL) {
smsg(_("Finished reading undo file %s"), file_name); smsg(0, _("Finished reading undo file %s"), file_name);
} }
goto theend; goto theend;