mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Remove char_u: message:smsg()
This commit is contained in:
parent
d666b0e48f
commit
3c5864772f
@ -778,17 +778,17 @@ do_bufdel (
|
||||
if (deleted == 1)
|
||||
MSG(_("1 buffer unloaded"));
|
||||
else
|
||||
smsg((char_u *)_("%d buffers unloaded"), deleted);
|
||||
smsg(_("%d buffers unloaded"), deleted);
|
||||
} else if (command == DOBUF_DEL) {
|
||||
if (deleted == 1)
|
||||
MSG(_("1 buffer deleted"));
|
||||
else
|
||||
smsg((char_u *)_("%d buffers deleted"), deleted);
|
||||
smsg(_("%d buffers deleted"), deleted);
|
||||
} else {
|
||||
if (deleted == 1)
|
||||
MSG(_("1 buffer wiped out"));
|
||||
else
|
||||
smsg((char_u *)_("%d buffers wiped out"), deleted);
|
||||
smsg(_("%d buffers wiped out"), deleted);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19105,7 +19105,7 @@ call_user_func (
|
||||
++no_wait_return;
|
||||
verbose_enter_scroll();
|
||||
|
||||
smsg((char_u *)_("calling %s"), sourcing_name);
|
||||
smsg(_("calling %s"), sourcing_name);
|
||||
if (p_verbose >= 14) {
|
||||
char_u buf[MSG_BUF_LEN];
|
||||
char_u numbuf2[NUMBUFLEN];
|
||||
@ -19203,9 +19203,9 @@ call_user_func (
|
||||
verbose_enter_scroll();
|
||||
|
||||
if (aborting())
|
||||
smsg((char_u *)_("%s aborted"), sourcing_name);
|
||||
smsg(_("%s aborted"), sourcing_name);
|
||||
else if (fc->rettv->v_type == VAR_NUMBER)
|
||||
smsg((char_u *)_("%s returning #%" PRId64 ""),
|
||||
smsg(_("%s returning #%" PRId64 ""),
|
||||
sourcing_name, (int64_t)fc->rettv->vval.v_number);
|
||||
else {
|
||||
char_u buf[MSG_BUF_LEN];
|
||||
@ -19224,7 +19224,7 @@ call_user_func (
|
||||
trunc_string(s, buf, MSG_BUF_CLEN, MSG_BUF_LEN);
|
||||
s = buf;
|
||||
}
|
||||
smsg((char_u *)_("%s returning %s"), sourcing_name, s);
|
||||
smsg(_("%s returning %s"), sourcing_name, s);
|
||||
xfree(tofree);
|
||||
}
|
||||
}
|
||||
@ -19245,7 +19245,7 @@ call_user_func (
|
||||
++no_wait_return;
|
||||
verbose_enter_scroll();
|
||||
|
||||
smsg((char_u *)_("continuing in %s"), sourcing_name);
|
||||
smsg(_("continuing in %s"), sourcing_name);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
|
||||
verbose_leave_scroll();
|
||||
|
@ -748,7 +748,7 @@ int do_move(linenr_T line1, linenr_T line2, linenr_T dest)
|
||||
if (num_lines == 1)
|
||||
MSG(_("1 line moved"));
|
||||
else
|
||||
smsg((char_u *)_("%" PRId64 " lines moved"), (int64_t)num_lines);
|
||||
smsg(_("%" PRId64 " lines moved"), (int64_t)num_lines);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -1439,7 +1439,7 @@ read_viminfo (
|
||||
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Reading viminfo file \"%s\"%s%s%s"),
|
||||
smsg(_("Reading viminfo file \"%s\"%s%s%s"),
|
||||
fname,
|
||||
(flags & VIF_WANT_INFO) ? _(" info") : "",
|
||||
(flags & VIF_WANT_MARKS) ? _(" marks") : "",
|
||||
@ -1616,7 +1616,7 @@ void write_viminfo(char_u *file, int forceit)
|
||||
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Writing viminfo file \"%s\""), fname);
|
||||
smsg(_("Writing viminfo file \"%s\""), fname);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -4440,9 +4440,9 @@ void ex_global(exarg_T *eap)
|
||||
MSG(_(e_interr));
|
||||
else if (ndone == 0) {
|
||||
if (type == 'v')
|
||||
smsg((char_u *)_("Pattern found in every line: %s"), pat);
|
||||
smsg(_("Pattern found in every line: %s"), pat);
|
||||
else
|
||||
smsg((char_u *)_("Pattern not found: %s"), pat);
|
||||
smsg(_("Pattern not found: %s"), pat);
|
||||
} else
|
||||
global_exe(cmd);
|
||||
|
||||
@ -4682,7 +4682,7 @@ void ex_help(exarg_T *eap)
|
||||
* Try to open the file specified by the "helpfile" option.
|
||||
*/
|
||||
if ((helpfd = mch_fopen((char *)p_hf, READBIN)) == NULL) {
|
||||
smsg((char_u *)_("Sorry, help file \"%s\" not found"), p_hf);
|
||||
smsg(_("Sorry, help file \"%s\" not found"), p_hf);
|
||||
goto erret;
|
||||
}
|
||||
fclose(helpfd);
|
||||
@ -6038,7 +6038,7 @@ static void sign_list_defined(sign_T *sp)
|
||||
{
|
||||
char_u *p;
|
||||
|
||||
smsg((char_u *)"sign %s", sp->sn_name);
|
||||
smsg("sign %s", sp->sn_name);
|
||||
if (sp->sn_icon != NULL) {
|
||||
MSG_PUTS(" icon=");
|
||||
msg_outtrans(sp->sn_icon);
|
||||
|
@ -169,9 +169,9 @@ void do_debug(char_u *cmd)
|
||||
if (sourcing_name != NULL)
|
||||
msg(sourcing_name);
|
||||
if (sourcing_lnum != 0)
|
||||
smsg((char_u *)_("line %" PRId64 ": %s"), (int64_t)sourcing_lnum, cmd);
|
||||
smsg(_("line %" PRId64 ": %s"), (int64_t)sourcing_lnum, cmd);
|
||||
else
|
||||
smsg((char_u *)_("cmd: %s"), cmd);
|
||||
smsg(_("cmd: %s"), cmd);
|
||||
|
||||
/*
|
||||
* Repeat getting a command and executing it.
|
||||
@ -348,7 +348,7 @@ void dbg_check_breakpoint(exarg_T *eap)
|
||||
p = (char_u *)"<SNR>";
|
||||
else
|
||||
p = (char_u *)"";
|
||||
smsg((char_u *)_("Breakpoint in \"%s%s\" line %" PRId64),
|
||||
smsg(_("Breakpoint in \"%s%s\" line %" PRId64),
|
||||
p,
|
||||
debug_breakpoint_name + (*p == NUL ? 0 : 3),
|
||||
(int64_t)debug_breakpoint_lnum);
|
||||
@ -637,7 +637,7 @@ void ex_breaklist(exarg_T *eap)
|
||||
bp = &BREAKP(i);
|
||||
if (bp->dbg_type == DBG_FILE)
|
||||
home_replace(NULL, bp->dbg_name, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("%3d %s %s line %" PRId64),
|
||||
smsg(_("%3d %s %s line %" PRId64),
|
||||
bp->dbg_nr,
|
||||
bp->dbg_type == DBG_FUNC ? "func" : "file",
|
||||
bp->dbg_type == DBG_FUNC ? bp->dbg_name : NameBuff,
|
||||
@ -2127,7 +2127,7 @@ int do_in_runtimepath(char_u *name, int all, DoInRuntimepathCB callback,
|
||||
{
|
||||
if (p_verbose > 1 && name != NULL) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Searching for \"%s\" in \"%s\""),
|
||||
smsg(_("Searching for \"%s\" in \"%s\""),
|
||||
(char *)name, (char *)p_rtp);
|
||||
verbose_leave();
|
||||
}
|
||||
@ -2155,7 +2155,7 @@ int do_in_runtimepath(char_u *name, int all, DoInRuntimepathCB callback,
|
||||
|
||||
if (p_verbose > 2) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Searching for \"%s\""), buf);
|
||||
smsg(_("Searching for \"%s\""), buf);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -2178,7 +2178,7 @@ int do_in_runtimepath(char_u *name, int all, DoInRuntimepathCB callback,
|
||||
xfree(rtp_copy);
|
||||
if (p_verbose > 0 && !did_one && name != NULL) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("not found in 'runtimepath': \"%s\""), name);
|
||||
smsg(_("not found in 'runtimepath': \"%s\""), name);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -2316,7 +2316,7 @@ do_source (
|
||||
if (fname_exp == NULL)
|
||||
return retval;
|
||||
if (os_isdir(fname_exp)) {
|
||||
smsg((char_u *)_("Cannot source a directory: \"%s\""), fname);
|
||||
smsg(_("Cannot source a directory: \"%s\""), fname);
|
||||
goto theend;
|
||||
}
|
||||
|
||||
@ -2362,9 +2362,9 @@ do_source (
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
if (sourcing_name == NULL)
|
||||
smsg((char_u *)_("could not source \"%s\""), fname);
|
||||
smsg(_("could not source \"%s\""), fname);
|
||||
else
|
||||
smsg((char_u *)_("line %" PRId64 ": could not source \"%s\""),
|
||||
smsg(_("line %" PRId64 ": could not source \"%s\""),
|
||||
(int64_t)sourcing_lnum, fname);
|
||||
verbose_leave();
|
||||
}
|
||||
@ -2379,9 +2379,9 @@ do_source (
|
||||
if (p_verbose > 1) {
|
||||
verbose_enter();
|
||||
if (sourcing_name == NULL)
|
||||
smsg((char_u *)_("sourcing \"%s\""), fname);
|
||||
smsg(_("sourcing \"%s\""), fname);
|
||||
else
|
||||
smsg((char_u *)_("line %" PRId64 ": sourcing \"%s\""),
|
||||
smsg(_("line %" PRId64 ": sourcing \"%s\""),
|
||||
(int64_t)sourcing_lnum, fname);
|
||||
verbose_leave();
|
||||
}
|
||||
@ -2532,9 +2532,9 @@ do_source (
|
||||
sourcing_lnum = save_sourcing_lnum;
|
||||
if (p_verbose > 1) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("finished sourcing %s"), fname);
|
||||
smsg(_("finished sourcing %s"), fname);
|
||||
if (sourcing_name != NULL)
|
||||
smsg((char_u *)_("continuing in %s"), sourcing_name);
|
||||
smsg(_("continuing in %s"), sourcing_name);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -2576,7 +2576,7 @@ void ex_scriptnames(exarg_T *eap)
|
||||
if (SCRIPT_ITEM(i).sn_name != NULL) {
|
||||
home_replace(NULL, SCRIPT_ITEM(i).sn_name,
|
||||
NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)"%3d: %s", i, NameBuff);
|
||||
smsg("%3d: %s", i, NameBuff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3141,7 +3141,7 @@ void ex_language(exarg_T *eap)
|
||||
p = (char_u *)setlocale(what, NULL);
|
||||
if (p == NULL || *p == NUL)
|
||||
p = (char_u *)"Unknown";
|
||||
smsg((char_u *)_("Current %slanguage: \"%s\""), whatstr, p);
|
||||
smsg(_("Current %slanguage: \"%s\""), whatstr, p);
|
||||
} else {
|
||||
#ifndef LC_MESSAGES
|
||||
if (what == VIM_LC_MESSAGES)
|
||||
|
@ -604,7 +604,7 @@ int do_cmdline(char_u *cmdline, LineGetter fgetline,
|
||||
++no_wait_return;
|
||||
verbose_enter_scroll();
|
||||
|
||||
smsg((char_u *)_("line %" PRId64 ": %s"),
|
||||
smsg(_("line %" PRId64 ": %s"),
|
||||
(int64_t)sourcing_lnum, cmdline_copy);
|
||||
if (msg_silent == 0)
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this */
|
||||
@ -6901,7 +6901,7 @@ static void ex_pwd(exarg_T *eap)
|
||||
*/
|
||||
static void ex_equal(exarg_T *eap)
|
||||
{
|
||||
smsg((char_u *)"%" PRId64, (int64_t)eap->line2);
|
||||
smsg("%" PRId64, (int64_t)eap->line2);
|
||||
ex_may_print(eap);
|
||||
}
|
||||
|
||||
@ -9221,7 +9221,7 @@ static void ex_filetype(exarg_T *eap)
|
||||
|
||||
if (*eap->arg == NUL) {
|
||||
/* Print current status. */
|
||||
smsg((char_u *)"filetype detection:%s plugin:%s indent:%s",
|
||||
smsg("filetype detection:%s plugin:%s indent:%s",
|
||||
filetype_detect ? "ON" : "OFF",
|
||||
filetype_plugin ? (filetype_detect ? "ON" : "(on)") : "OFF",
|
||||
filetype_indent ? (filetype_detect ? "ON" : "(on)") : "OFF");
|
||||
|
@ -489,7 +489,7 @@ static int throw_exception(void *value, int type, char_u *cmdname)
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
msg_scroll = TRUE; /* always scroll up, don't overwrite */
|
||||
|
||||
smsg((char_u *)_("Exception thrown: %s"), excp->value);
|
||||
smsg(_("Exception thrown: %s"), excp->value);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
@ -537,9 +537,8 @@ static void discard_exception(except_T *excp, int was_finished)
|
||||
++no_wait_return;
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
msg_scroll = TRUE; /* always scroll up, don't overwrite */
|
||||
smsg(was_finished
|
||||
? (char_u *)_("Exception finished: %s")
|
||||
: (char_u *)_("Exception discarded: %s"),
|
||||
smsg(was_finished ? _("Exception finished: %s")
|
||||
: _("Exception discarded: %s"),
|
||||
excp->value);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
@ -601,7 +600,7 @@ static void catch_exception(except_T *excp)
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
msg_scroll = TRUE; /* always scroll up, don't overwrite */
|
||||
|
||||
smsg((char_u *)_("Exception caught: %s"), excp->value);
|
||||
smsg(_("Exception caught: %s"), excp->value);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
|
||||
if (debug_break_level > 0 || *p_vfile == NUL)
|
||||
@ -662,7 +661,7 @@ static void finish_exception(except_T *excp)
|
||||
*/
|
||||
static void report_pending(int action, int pending, void *value)
|
||||
{
|
||||
char_u *mesg;
|
||||
char *mesg;
|
||||
char *s;
|
||||
int save_msg_silent;
|
||||
|
||||
@ -670,14 +669,14 @@ static void report_pending(int action, int pending, void *value)
|
||||
|
||||
switch (action) {
|
||||
case RP_MAKE:
|
||||
mesg = (char_u *)_("%s made pending");
|
||||
mesg = _("%s made pending");
|
||||
break;
|
||||
case RP_RESUME:
|
||||
mesg = (char_u *)_("%s resumed");
|
||||
mesg = _("%s resumed");
|
||||
break;
|
||||
/* case RP_DISCARD: */
|
||||
default:
|
||||
mesg = (char_u *)_("%s discarded");
|
||||
mesg = _("%s discarded");
|
||||
break;
|
||||
}
|
||||
|
||||
@ -702,9 +701,9 @@ static void report_pending(int action, int pending, void *value)
|
||||
default:
|
||||
if (pending & CSTP_THROW) {
|
||||
vim_snprintf((char *)IObuff, IOSIZE,
|
||||
(char *)mesg, _("Exception"));
|
||||
mesg = vim_strnsave(IObuff, STRLEN(IObuff) + 4);
|
||||
STRCAT(mesg, ": %s");
|
||||
mesg, _("Exception"));
|
||||
mesg = (char *)vim_strnsave(IObuff, STRLEN(IObuff) + 4);
|
||||
strcat(mesg, ": %s");
|
||||
s = (char *)((except_T *)value)->value;
|
||||
} else if ((pending & CSTP_ERROR) && (pending & CSTP_INTERRUPT))
|
||||
s = _("Error and interrupt");
|
||||
@ -719,7 +718,7 @@ static void report_pending(int action, int pending, void *value)
|
||||
msg_silent = FALSE; /* display messages */
|
||||
++no_wait_return;
|
||||
msg_scroll = TRUE; /* always scroll up, don't overwrite */
|
||||
smsg(mesg, (char_u *)s);
|
||||
smsg(mesg, s);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
cmdline_row = msg_row;
|
||||
--no_wait_return;
|
||||
|
@ -647,7 +647,7 @@ char_u *vim_findfile(void *search_ctx_arg)
|
||||
#ifdef FF_VERBOSE
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"Already Searched: %s (%s)",
|
||||
smsg("Already Searched: %s (%s)",
|
||||
stackp->ffs_fix_path, stackp->ffs_wc_path);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
@ -660,7 +660,7 @@ char_u *vim_findfile(void *search_ctx_arg)
|
||||
#ifdef FF_VERBOSE
|
||||
else if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"Searching: %s (%s)",
|
||||
smsg("Searching: %s (%s)",
|
||||
stackp->ffs_fix_path, stackp->ffs_wc_path);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
@ -821,7 +821,7 @@ char_u *vim_findfile(void *search_ctx_arg)
|
||||
) == FAIL) {
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"Already: %s",
|
||||
smsg("Already: %s",
|
||||
file_path);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
@ -848,7 +848,7 @@ char_u *vim_findfile(void *search_ctx_arg)
|
||||
#ifdef FF_VERBOSE
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"HIT: %s", file_path);
|
||||
smsg("HIT: %s", file_path);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
verbose_leave_scroll();
|
||||
@ -1011,7 +1011,7 @@ static ff_visited_list_hdr_T *ff_get_visited_list(char_u *filename, ff_visited_l
|
||||
#ifdef FF_VERBOSE
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"ff_get_visited_list: FOUND list for %s",
|
||||
smsg("ff_get_visited_list: FOUND list for %s",
|
||||
filename);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
@ -1027,7 +1027,7 @@ static ff_visited_list_hdr_T *ff_get_visited_list(char_u *filename, ff_visited_l
|
||||
#ifdef FF_VERBOSE
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)"ff_get_visited_list: new list for %s", filename);
|
||||
smsg("ff_get_visited_list: new list for %s", filename);
|
||||
/* don't overwrite this either */
|
||||
msg_puts((char_u *)"\n");
|
||||
verbose_leave_scroll();
|
||||
|
@ -5404,8 +5404,7 @@ void aubuflocal_remove(buf_T *buf)
|
||||
au_remove_pat(ap);
|
||||
if (p_verbose >= 6) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)
|
||||
_("auto-removing autocommand: %s <buffer=%d>"),
|
||||
smsg(_("auto-removing autocommand: %s <buffer=%d>"),
|
||||
event_nr2name(event), buf->b_fnum);
|
||||
verbose_leave();
|
||||
}
|
||||
@ -6835,7 +6834,7 @@ auto_next_pat (
|
||||
(char *)name, (char *)ap->pat);
|
||||
if (p_verbose >= 8) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Executing %s"), sourcing_name);
|
||||
smsg(_("Executing %s"), sourcing_name);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -6897,7 +6896,7 @@ char_u *getnextac(int c, void *cookie, int indent)
|
||||
|
||||
if (p_verbose >= 9) {
|
||||
verbose_enter_scroll();
|
||||
smsg((char_u *)_("autocommand %s"), ac->cmd);
|
||||
smsg(_("autocommand %s"), ac->cmd);
|
||||
msg_puts((char_u *)"\n"); /* don't overwrite this either */
|
||||
verbose_leave_scroll();
|
||||
}
|
||||
|
@ -1115,7 +1115,7 @@ static int cs_help(exarg_T *eap)
|
||||
/* Use %*s rather than %30s to ensure proper alignment in utf-8 */
|
||||
if (space_cnt < 0)
|
||||
space_cnt = 0;
|
||||
(void)smsg((char_u *)_("%-5s: %s%*s (Usage: %s)"),
|
||||
(void)smsg(_("%-5s: %s%*s (Usage: %s)"),
|
||||
cmdp->name,
|
||||
help, space_cnt, " ",
|
||||
cmdp->usage);
|
||||
@ -2083,10 +2083,10 @@ static int cs_show(exarg_T *eap)
|
||||
continue;
|
||||
|
||||
if (csinfo[i].ppath != NULL)
|
||||
(void)smsg((char_u *)"%2d %-5ld %-34s %-32s",
|
||||
(void)smsg("%2d %-5ld %-34s %-32s",
|
||||
i, (long)csinfo[i].pid, csinfo[i].fname, csinfo[i].ppath);
|
||||
else
|
||||
(void)smsg((char_u *)"%2d %-5ld %-34s <none>",
|
||||
(void)smsg("%2d %-5ld %-34s <none>",
|
||||
i, (long)csinfo[i].pid, csinfo[i].fname);
|
||||
}
|
||||
}
|
||||
|
@ -950,13 +950,13 @@ void ml_recover(void)
|
||||
}
|
||||
|
||||
home_replace(NULL, mfp->mf_fname, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("Using swap file \"%s\""), NameBuff);
|
||||
smsg(_("Using swap file \"%s\""), NameBuff);
|
||||
|
||||
if (buf_spname(curbuf) != NULL)
|
||||
STRLCPY(NameBuff, buf_spname(curbuf), MAXPATHL);
|
||||
else
|
||||
home_replace(NULL, curbuf->b_ffname, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("Original file \"%s\""), NameBuff);
|
||||
smsg(_("Original file \"%s\""), NameBuff);
|
||||
msg_putchar('\n');
|
||||
|
||||
/*
|
||||
|
@ -329,12 +329,12 @@ void trunc_string(char_u *s, char_u *buf, int room, int buflen)
|
||||
* shorter than IOSIZE!!!
|
||||
*/
|
||||
|
||||
int smsg(char_u *s, ...)
|
||||
int smsg(char *s, ...)
|
||||
{
|
||||
va_list arglist;
|
||||
|
||||
va_start(arglist, s);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, (char *)s, arglist, NULL);
|
||||
vim_vsnprintf((char *)IObuff, IOSIZE, s, arglist, NULL);
|
||||
va_end(arglist);
|
||||
return msg(IObuff);
|
||||
}
|
||||
|
@ -296,7 +296,7 @@ int call_shell(char_u *cmd, ShellOpts opts, char_u *extra_shell_arg)
|
||||
|
||||
if (p_verbose > 3) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Calling shell to execute: \"%s\""),
|
||||
smsg(_("Calling shell to execute: \"%s\""),
|
||||
cmd == NULL ? p_sh : cmd);
|
||||
ui_putc('\n');
|
||||
verbose_leave();
|
||||
|
@ -591,7 +591,7 @@ void op_reindent(oparg_T *oap, Indenter how)
|
||||
if (i > 1
|
||||
&& (i % 50 == 0 || i == oap->line_count - 1)
|
||||
&& oap->line_count > p_report)
|
||||
smsg((char_u *)_("%" PRId64 " lines to indent... "), (int64_t)i);
|
||||
smsg(_("%" PRId64 " lines to indent... "), (int64_t)i);
|
||||
|
||||
/*
|
||||
* Be vi-compatible: For lisp indenting the first line is not
|
||||
@ -635,7 +635,7 @@ void op_reindent(oparg_T *oap, Indenter how)
|
||||
if (i == 1)
|
||||
MSG(_("1 line indented "));
|
||||
else
|
||||
smsg((char_u *)_("%" PRId64 " lines indented "), (int64_t)i);
|
||||
smsg(_("%" PRId64 " lines indented "), (int64_t)i);
|
||||
}
|
||||
/* set '[ and '] marks */
|
||||
curbuf->b_op_start = oap->start;
|
||||
@ -1902,7 +1902,7 @@ void op_tilde(oparg_T *oap)
|
||||
if (oap->line_count == 1)
|
||||
MSG(_("1 line changed"));
|
||||
else
|
||||
smsg((char_u *)_("%" PRId64 " lines changed"), (int64_t)oap->line_count);
|
||||
smsg(_("%" PRId64 " lines changed"), (int64_t)oap->line_count);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2497,10 +2497,10 @@ static void op_yank_reg(oparg_T *oap, bool message, yankreg_T *reg, bool append)
|
||||
else
|
||||
MSG(_("1 line yanked"));
|
||||
} else if (oap->block_mode)
|
||||
smsg((char_u *)_("block of %" PRId64 " lines yanked"),
|
||||
smsg(_("block of %" PRId64 " lines yanked"),
|
||||
(int64_t)yanklines);
|
||||
else
|
||||
smsg((char_u *)_("%" PRId64 " lines yanked"), (int64_t)yanklines);
|
||||
smsg(_("%" PRId64 " lines yanked"), (int64_t)yanklines);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ int os_chdir(const char *path)
|
||||
{
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)"chdir(%s)", path);
|
||||
smsg("chdir(%s)", path);
|
||||
verbose_leave();
|
||||
}
|
||||
return uv_chdir(path);
|
||||
|
@ -1861,7 +1861,7 @@ void qf_age(exarg_T *eap)
|
||||
|
||||
static void qf_msg(qf_info_T *qi)
|
||||
{
|
||||
smsg((char_u *)_("error list %d of %d; %d errors"),
|
||||
smsg(_("error list %d of %d; %d errors"),
|
||||
qi->qf_curlist + 1, qi->qf_listcount,
|
||||
qi->qf_lists[qi->qf_curlist].qf_count);
|
||||
qf_update_buffer(qi);
|
||||
@ -2888,7 +2888,7 @@ void ex_vimgrep(exarg_T *eap)
|
||||
|
||||
if (buf == NULL) {
|
||||
if (!got_int)
|
||||
smsg((char_u *)_("Cannot open file \"%s\""), fname);
|
||||
smsg(_("Cannot open file \"%s\""), fname);
|
||||
} else {
|
||||
/* Try for a match in all lines of the buffer.
|
||||
* For ":1vimgrep" look for first match only. */
|
||||
|
@ -6968,7 +6968,7 @@ regprog_T *vim_regcomp(char_u *expr_arg, int re_flags)
|
||||
regexp_engine = expr[4] - '0';
|
||||
expr += 5;
|
||||
#ifdef REGEXP_DEBUG
|
||||
smsg((char_u *)"New regexp mode selected (%d): %s",
|
||||
smsg("New regexp mode selected (%d): %s",
|
||||
regexp_engine,
|
||||
regname[newengine]);
|
||||
#endif
|
||||
|
@ -4200,7 +4200,7 @@ find_pattern_in_path (
|
||||
msg_trunc_attr(IObuff, TRUE, hl_attr(HLF_R));
|
||||
} else if (p_verbose >= 5) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Searching included file %s"),
|
||||
smsg(_("Searching included file %s"),
|
||||
(char *)new_fname);
|
||||
verbose_leave();
|
||||
}
|
||||
|
125
src/nvim/spell.c
125
src/nvim/spell.c
@ -2327,8 +2327,7 @@ static void spell_load_lang(char_u *lang)
|
||||
}
|
||||
|
||||
if (r == FAIL) {
|
||||
smsg((char_u *)
|
||||
_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
|
||||
smsg(_("Warning: Cannot find word list \"%s.%s.spl\" or \"%s.ascii.spl\""),
|
||||
lang, spell_enc(), lang);
|
||||
} else if (sl.sl_slang != NULL) {
|
||||
// At least one file was loaded, now load ALL the additions.
|
||||
@ -2540,14 +2539,14 @@ spell_load_file (
|
||||
EMSG2(_(e_notopen), fname);
|
||||
else if (p_verbose > 2) {
|
||||
verbose_enter();
|
||||
smsg(e_notopen, fname);
|
||||
smsg((char *)e_notopen, fname);
|
||||
verbose_leave();
|
||||
}
|
||||
goto endFAIL;
|
||||
}
|
||||
if (p_verbose > 2) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Reading spell file \"%s\""), fname);
|
||||
smsg(_("Reading spell file \"%s\""), fname);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -3824,8 +3823,7 @@ char_u *did_set_spelllang(win_T *wp)
|
||||
} else
|
||||
// This is probably an error. Give a warning and
|
||||
// accept the words anyway.
|
||||
smsg((char_u *)
|
||||
_("Warning: region %s not supported"),
|
||||
smsg(_("Warning: region %s not supported"),
|
||||
region);
|
||||
} else
|
||||
region_mask = 1 << c;
|
||||
@ -4395,7 +4393,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
if (spin->si_conv.vc_type != CONV_NONE) {
|
||||
pc = string_convert(&spin->si_conv, rline, NULL);
|
||||
if (pc == NULL) {
|
||||
smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
|
||||
smsg(_("Conversion failure for word in %s line %d: %s"),
|
||||
fname, lnum, rline);
|
||||
continue;
|
||||
}
|
||||
@ -4436,7 +4434,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
if (!spin->si_ascii
|
||||
&& convert_setup(&spin->si_conv, aff->af_enc,
|
||||
p_enc) == FAIL)
|
||||
smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
|
||||
smsg(_("Conversion in %s not supported: from %s to %s"),
|
||||
fname, aff->af_enc, p_enc);
|
||||
spin->si_conv.vc_fail = true;
|
||||
} else if (is_aff_rule(items, itemcnt, "FLAG", 2)
|
||||
@ -4448,7 +4446,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
else if (STRCMP(items[1], "caplong") == 0)
|
||||
aff->af_flagtype = AFT_CAPLONG;
|
||||
else
|
||||
smsg((char_u *)_("Invalid value for FLAG in %s line %d: %s"),
|
||||
smsg(_("Invalid value for FLAG in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
if (aff->af_rare != 0
|
||||
|| aff->af_keepcase != 0
|
||||
@ -4461,7 +4459,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|| compflags != NULL
|
||||
|| aff->af_suff.ht_used > 0
|
||||
|| aff->af_pref.ht_used > 0)
|
||||
smsg((char_u *)_("FLAG after using flags in %s line %d: %s"),
|
||||
smsg(_("FLAG after using flags in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (spell_info_item(items[0]) && itemcnt > 1) {
|
||||
p = (char_u *)getroom(spin,
|
||||
@ -4528,16 +4526,14 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
aff->af_compforbid = affitem2flag(aff->af_flagtype, items[1],
|
||||
fname, lnum);
|
||||
if (aff->af_pref.ht_used > 0)
|
||||
smsg((char_u *)_(
|
||||
"Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
|
||||
smsg(_("Defining COMPOUNDFORBIDFLAG after PFX item may give wrong results in %s line %d"),
|
||||
fname, lnum);
|
||||
} else if (is_aff_rule(items, itemcnt, "COMPOUNDPERMITFLAG", 2)
|
||||
&& aff->af_comppermit == 0) {
|
||||
aff->af_comppermit = affitem2flag(aff->af_flagtype, items[1],
|
||||
fname, lnum);
|
||||
if (aff->af_pref.ht_used > 0)
|
||||
smsg((char_u *)_(
|
||||
"Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
|
||||
smsg(_("Defining COMPOUNDPERMITFLAG after PFX item may give wrong results in %s line %d"),
|
||||
fname, lnum);
|
||||
} else if (is_aff_rule(items, itemcnt, "COMPOUNDFLAG", 2)
|
||||
&& compflags == NULL) {
|
||||
@ -4551,7 +4547,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
// We don't use the count, but do check that it's a number and
|
||||
// not COMPOUNDRULE mistyped.
|
||||
if (atoi((char *)items[1]) == 0)
|
||||
smsg((char_u *)_("Wrong COMPOUNDRULES value in %s line %d: %s"),
|
||||
smsg(_("Wrong COMPOUNDRULES value in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "COMPOUNDRULE", 2)) {
|
||||
// Don't use the first rule if it is a number.
|
||||
@ -4573,19 +4569,19 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
&& compmax == 0) {
|
||||
compmax = atoi((char *)items[1]);
|
||||
if (compmax == 0)
|
||||
smsg((char_u *)_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
|
||||
smsg(_("Wrong COMPOUNDWORDMAX value in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "COMPOUNDMIN", 2)
|
||||
&& compminlen == 0) {
|
||||
compminlen = atoi((char *)items[1]);
|
||||
if (compminlen == 0)
|
||||
smsg((char_u *)_("Wrong COMPOUNDMIN value in %s line %d: %s"),
|
||||
smsg(_("Wrong COMPOUNDMIN value in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "COMPOUNDSYLMAX", 2)
|
||||
&& compsylmax == 0) {
|
||||
compsylmax = atoi((char *)items[1]);
|
||||
if (compsylmax == 0)
|
||||
smsg((char_u *)_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
|
||||
smsg(_("Wrong COMPOUNDSYLMAX value in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDDUP", 1)) {
|
||||
compoptions |= COMP_CHECKDUP;
|
||||
@ -4597,7 +4593,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
compoptions |= COMP_CHECKTRIPLE;
|
||||
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 2)) {
|
||||
if (atoi((char *)items[1]) == 0)
|
||||
smsg((char_u *)_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
|
||||
smsg(_("Wrong CHECKCOMPOUNDPATTERN value in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else if (is_aff_rule(items, itemcnt, "CHECKCOMPOUNDPATTERN", 3)) {
|
||||
garray_T *gap = &spin->si_comppat;
|
||||
@ -4650,11 +4646,10 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
if (!HASHITEM_EMPTY(hi)) {
|
||||
cur_aff = HI2AH(hi);
|
||||
if (cur_aff->ah_combine != (*items[2] == 'Y'))
|
||||
smsg((char_u *)_(
|
||||
"Different combining flag in continued affix block in %s line %d: %s"),
|
||||
smsg(_("Different combining flag in continued affix block in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
if (!cur_aff->ah_follows)
|
||||
smsg((char_u *)_("Duplicate affix in %s line %d: %s"),
|
||||
smsg(_("Duplicate affix in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
} else {
|
||||
// New affix letter.
|
||||
@ -4674,8 +4669,9 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|| cur_aff->ah_flag == aff->af_nosuggest
|
||||
|| cur_aff->ah_flag == aff->af_needcomp
|
||||
|| cur_aff->ah_flag == aff->af_comproot)
|
||||
smsg((char_u *)_(
|
||||
"Affix also used for BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST in %s line %d: %s"),
|
||||
smsg(_("Affix also used for "
|
||||
"BAD/RARE/KEEPCASE/NEEDAFFIX/NEEDCOMPOUND/NOSUGGEST"
|
||||
"in %s line %d: %s"),
|
||||
fname, lnum, items[1]);
|
||||
STRCPY(cur_aff->ah_key, items[1]);
|
||||
hash_add(tp, cur_aff->ah_key);
|
||||
@ -4697,10 +4693,10 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
if (itemcnt > lasti
|
||||
&& !aff->af_ignoreextra
|
||||
&& *items[lasti] != '#')
|
||||
smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
|
||||
smsg(_(e_afftrailing), fname, lnum, items[lasti]);
|
||||
|
||||
if (STRCMP(items[2], "Y") != 0 && STRCMP(items[2], "N") != 0)
|
||||
smsg((char_u *)_("Expected Y or N in %s line %d: %s"),
|
||||
smsg(_("Expected Y or N in %s line %d: %s"),
|
||||
fname, lnum, items[2]);
|
||||
|
||||
if (*items[0] == 'P' && aff->af_pfxpostpone) {
|
||||
@ -4735,7 +4731,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
if (itemcnt > lasti && *items[lasti] != '#'
|
||||
&& (STRCMP(items[lasti], "-") != 0
|
||||
|| itemcnt != lasti + 1))
|
||||
smsg((char_u *)_(e_afftrailing), fname, lnum, items[lasti]);
|
||||
smsg(_(e_afftrailing), fname, lnum, items[lasti]);
|
||||
|
||||
// New item for an affix letter.
|
||||
--aff_todo;
|
||||
@ -4775,7 +4771,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
aff_entry->ae_prog = vim_regcomp(buf,
|
||||
RE_MAGIC + RE_STRING + RE_STRICT);
|
||||
if (aff_entry->ae_prog == NULL)
|
||||
smsg((char_u *)_("Broken condition in %s line %d: %s"),
|
||||
smsg(_("Broken condition in %s line %d: %s"),
|
||||
fname, lnum, items[4]);
|
||||
}
|
||||
|
||||
@ -4893,7 +4889,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|| is_aff_rule(items, itemcnt, "REPSAL", 2)) {
|
||||
/* Ignore REP/REPSAL count */;
|
||||
if (!isdigit(*items[1]))
|
||||
smsg((char_u *)_("Expected REP(SAL) count in %s line %d"),
|
||||
smsg(_("Expected REP(SAL) count in %s line %d"),
|
||||
fname, lnum);
|
||||
} else if ((STRCMP(items[0], "REP") == 0
|
||||
|| STRCMP(items[0], "REPSAL") == 0)
|
||||
@ -4902,7 +4898,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
// Myspell ignores extra arguments, we require it starts with
|
||||
// # to detect mistakes.
|
||||
if (itemcnt > 3 && items[3][0] != '#')
|
||||
smsg((char_u *)_(e_afftrailing), fname, lnum, items[3]);
|
||||
smsg(_(e_afftrailing), fname, lnum, items[3]);
|
||||
if (items[0][3] == 'S' ? do_repsal : do_rep) {
|
||||
// Replace underscore with space (can't include a space
|
||||
// directly).
|
||||
@ -4922,7 +4918,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
// First line contains the count.
|
||||
found_map = true;
|
||||
if (!isdigit(*items[1]))
|
||||
smsg((char_u *)_("Expected MAP count in %s line %d"),
|
||||
smsg(_("Expected MAP count in %s line %d"),
|
||||
fname, lnum);
|
||||
} else if (do_mapline) {
|
||||
int c;
|
||||
@ -4934,7 +4930,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
&& vim_strchr(spin->si_map.ga_data, c)
|
||||
!= NULL)
|
||||
|| vim_strchr(p, c) != NULL)
|
||||
smsg((char_u *)_("Duplicate character in MAP in %s line %d"),
|
||||
smsg(_("Duplicate character in MAP in %s line %d"),
|
||||
fname, lnum);
|
||||
}
|
||||
|
||||
@ -4978,7 +4974,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
}
|
||||
}
|
||||
} else
|
||||
smsg((char_u *)_("Unrecognized or duplicate item in %s line %d: %s"),
|
||||
smsg(_("Unrecognized or duplicate item in %s line %d: %s"),
|
||||
fname, lnum, items[0]);
|
||||
}
|
||||
}
|
||||
@ -4999,7 +4995,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
&& !enc_utf8
|
||||
) {
|
||||
if (fol == NULL || low == NULL || upp == NULL)
|
||||
smsg((char_u *)_("Missing FOL/LOW/UPP line in %s"), fname);
|
||||
smsg(_("Missing FOL/LOW/UPP line in %s"), fname);
|
||||
else
|
||||
(void)set_spell_chartab(fol, low, upp);
|
||||
}
|
||||
@ -5022,7 +5018,7 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|
||||
if (compsylmax != 0) {
|
||||
if (syllable == NULL)
|
||||
smsg((char_u *)_("COMPOUNDSYLMAX used without SYLLABLE"));
|
||||
smsg(_("COMPOUNDSYLMAX used without SYLLABLE"));
|
||||
aff_check_number(spin->si_compsylmax, compsylmax, "COMPOUNDSYLMAX");
|
||||
spin->si_compsylmax = compsylmax;
|
||||
}
|
||||
@ -5052,10 +5048,10 @@ static afffile_T *spell_read_aff(spellinfo_T *spin, char_u *fname)
|
||||
|
||||
if (sofofrom != NULL || sofoto != NULL) {
|
||||
if (sofofrom == NULL || sofoto == NULL)
|
||||
smsg((char_u *)_("Missing SOFO%s line in %s"),
|
||||
smsg(_("Missing SOFO%s line in %s"),
|
||||
sofofrom == NULL ? "FROM" : "TO", fname);
|
||||
else if (!GA_EMPTY(&spin->si_sal))
|
||||
smsg((char_u *)_("Both SAL and SOFO lines in %s"), fname);
|
||||
smsg(_("Both SAL and SOFO lines in %s"), fname);
|
||||
else {
|
||||
aff_check_string(spin->si_sofofr, sofofrom, "SOFOFROM");
|
||||
aff_check_string(spin->si_sofoto, sofoto, "SOFOTO");
|
||||
@ -5133,14 +5129,14 @@ static unsigned affitem2flag(int flagtype, char_u *item, char_u *fname, int lnum
|
||||
res = get_affitem(flagtype, &p);
|
||||
if (res == 0) {
|
||||
if (flagtype == AFT_NUM)
|
||||
smsg((char_u *)_("Flag is not a number in %s line %d: %s"),
|
||||
smsg(_("Flag is not a number in %s line %d: %s"),
|
||||
fname, lnum, item);
|
||||
else
|
||||
smsg((char_u *)_("Illegal flag in %s line %d: %s"),
|
||||
smsg(_("Illegal flag in %s line %d: %s"),
|
||||
fname, lnum, item);
|
||||
}
|
||||
if (*p != NUL) {
|
||||
smsg((char_u *)_(e_affname), fname, lnum, item);
|
||||
smsg(_(e_affname), fname, lnum, item);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5294,16 +5290,16 @@ static bool flag_in_afflist(int flagtype, char_u *afflist, unsigned flag)
|
||||
static void aff_check_number(int spinval, int affval, char *name)
|
||||
{
|
||||
if (spinval != 0 && spinval != affval)
|
||||
smsg((char_u *)_(
|
||||
"%s value differs from what is used in another .aff file"), name);
|
||||
smsg(_("%s value differs from what is used in another .aff file"),
|
||||
name);
|
||||
}
|
||||
|
||||
// Give a warning when "spinval" and "affval" strings are set and not the same.
|
||||
static void aff_check_string(char_u *spinval, char_u *affval, char *name)
|
||||
{
|
||||
if (spinval != NULL && STRCMP(spinval, affval) != 0)
|
||||
smsg((char_u *)_(
|
||||
"%s value differs from what is used in another .aff file"), name);
|
||||
smsg(_("%s value differs from what is used in another .aff file"),
|
||||
name);
|
||||
}
|
||||
|
||||
// Returns true if strings "s1" and "s2" are equal. Also consider both being
|
||||
@ -5434,7 +5430,7 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
|
||||
if (spin->si_conv.vc_type != CONV_NONE) {
|
||||
pc = string_convert(&spin->si_conv, line, NULL);
|
||||
if (pc == NULL) {
|
||||
smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
|
||||
smsg(_("Conversion failure for word in %s line %d: %s"),
|
||||
fname, lnum, line);
|
||||
continue;
|
||||
}
|
||||
@ -5490,10 +5486,10 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
|
||||
hi = hash_lookup(&ht, dw, hash);
|
||||
if (!HASHITEM_EMPTY(hi)) {
|
||||
if (p_verbose > 0)
|
||||
smsg((char_u *)_("Duplicate word in %s line %d: %s"),
|
||||
smsg(_("Duplicate word in %s line %d: %s"),
|
||||
fname, lnum, dw);
|
||||
else if (duplicate == 0)
|
||||
smsg((char_u *)_("First duplicate word in %s line %d: %s"),
|
||||
smsg(_("First duplicate word in %s line %d: %s"),
|
||||
fname, lnum, dw);
|
||||
++duplicate;
|
||||
} else
|
||||
@ -5545,9 +5541,9 @@ static int spell_read_dic(spellinfo_T *spin, char_u *fname, afffile_T *affile)
|
||||
}
|
||||
|
||||
if (duplicate > 0)
|
||||
smsg((char_u *)_("%d duplicate word(s) in %s"), duplicate, fname);
|
||||
smsg(_("%d duplicate word(s) in %s"), duplicate, fname);
|
||||
if (spin->si_ascii && non_ascii > 0)
|
||||
smsg((char_u *)_("Ignored %d word(s) with non-ASCII characters in %s"),
|
||||
smsg(_("Ignored %d word(s) with non-ASCII characters in %s"),
|
||||
non_ascii, fname);
|
||||
hash_clear(&ht);
|
||||
|
||||
@ -5938,7 +5934,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
if (spin->si_conv.vc_type != CONV_NONE) {
|
||||
pc = string_convert(&spin->si_conv, rline, NULL);
|
||||
if (pc == NULL) {
|
||||
smsg((char_u *)_("Conversion failure for word in %s line %d: %s"),
|
||||
smsg(_("Conversion failure for word in %s line %d: %s"),
|
||||
fname, lnum, rline);
|
||||
continue;
|
||||
}
|
||||
@ -5952,12 +5948,10 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
++line;
|
||||
if (STRNCMP(line, "encoding=", 9) == 0) {
|
||||
if (spin->si_conv.vc_type != CONV_NONE)
|
||||
smsg((char_u *)_(
|
||||
"Duplicate /encoding= line ignored in %s line %d: %s"),
|
||||
smsg(_("Duplicate /encoding= line ignored in %s line %d: %s"),
|
||||
fname, lnum, line - 1);
|
||||
else if (did_word)
|
||||
smsg((char_u *)_(
|
||||
"/encoding= line after word ignored in %s line %d: %s"),
|
||||
smsg(_("/encoding= line after word ignored in %s line %d: %s"),
|
||||
fname, lnum, line - 1);
|
||||
else {
|
||||
char_u *enc;
|
||||
@ -5968,7 +5962,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
if (!spin->si_ascii
|
||||
&& convert_setup(&spin->si_conv, enc,
|
||||
p_enc) == FAIL)
|
||||
smsg((char_u *)_("Conversion in %s not supported: from %s to %s"),
|
||||
smsg(_("Conversion in %s not supported: from %s to %s"),
|
||||
fname, line, p_enc);
|
||||
xfree(enc);
|
||||
spin->si_conv.vc_fail = true;
|
||||
@ -5978,12 +5972,12 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
|
||||
if (STRNCMP(line, "regions=", 8) == 0) {
|
||||
if (spin->si_region_count > 1)
|
||||
smsg((char_u *)_("Duplicate /regions= line ignored in %s line %d: %s"),
|
||||
smsg(_("Duplicate /regions= line ignored in %s line %d: %s"),
|
||||
fname, lnum, line);
|
||||
else {
|
||||
line += 8;
|
||||
if (STRLEN(line) > 16)
|
||||
smsg((char_u *)_("Too many regions in %s line %d: %s"),
|
||||
smsg(_("Too many regions in %s line %d: %s"),
|
||||
fname, lnum, line);
|
||||
else {
|
||||
spin->si_region_count = (int)STRLEN(line) / 2;
|
||||
@ -5996,7 +5990,7 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
continue;
|
||||
}
|
||||
|
||||
smsg((char_u *)_("/ line ignored in %s line %d: %s"),
|
||||
smsg(_("/ line ignored in %s line %d: %s"),
|
||||
fname, lnum, line - 1);
|
||||
continue;
|
||||
}
|
||||
@ -6022,13 +6016,13 @@ static int spell_read_wordfile(spellinfo_T *spin, char_u *fname)
|
||||
|
||||
l = *p - '0';
|
||||
if (l > spin->si_region_count) {
|
||||
smsg((char_u *)_("Invalid region nr in %s line %d: %s"),
|
||||
smsg(_("Invalid region nr in %s line %d: %s"),
|
||||
fname, lnum, p);
|
||||
break;
|
||||
}
|
||||
regionmask |= 1 << (l - 1);
|
||||
} else {
|
||||
smsg((char_u *)_("Unrecognized flags in %s line %d: %s"),
|
||||
smsg(_("Unrecognized flags in %s line %d: %s"),
|
||||
fname, lnum, p);
|
||||
break;
|
||||
}
|
||||
@ -7146,7 +7140,7 @@ static void spell_make_sugfile(spellinfo_T *spin, char_u *wfname)
|
||||
if (sug_maketable(spin) == FAIL)
|
||||
goto theend;
|
||||
|
||||
smsg((char_u *)_("Number of words after soundfolding: %" PRId64),
|
||||
smsg(_("Number of words after soundfolding: %" PRId64),
|
||||
(int64_t)spin->si_spellbuf->b_ml.ml_line_count);
|
||||
|
||||
// Compress the soundfold trie.
|
||||
@ -7254,7 +7248,7 @@ static int sug_filltree(spellinfo_T *spin, slang_T *slang)
|
||||
}
|
||||
}
|
||||
|
||||
smsg((char_u *)_("Total number of words: %d"), words_done);
|
||||
smsg(_("Total number of words: %d"), words_done);
|
||||
|
||||
return OK;
|
||||
}
|
||||
@ -7847,7 +7841,7 @@ spell_add_word (
|
||||
fputc('#', fd);
|
||||
if (undo) {
|
||||
home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("Word '%.*s' removed from %s"),
|
||||
smsg(_("Word '%.*s' removed from %s"),
|
||||
len, word, NameBuff);
|
||||
}
|
||||
}
|
||||
@ -7890,7 +7884,7 @@ spell_add_word (
|
||||
fclose(fd);
|
||||
|
||||
home_replace(NULL, fname, NameBuff, MAXPATHL, TRUE);
|
||||
smsg((char_u *)_("Word '%.*s' added to %s"), len, word, NameBuff);
|
||||
smsg(_("Word '%.*s' added to %s"), len, word, NameBuff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -8457,7 +8451,7 @@ void spell_suggest(int count)
|
||||
MSG(_("Sorry, no suggestions"));
|
||||
else if (count > 0) {
|
||||
if (count > sug.su_ga.ga_len)
|
||||
smsg((char_u *)_("Sorry, only %" PRId64 " suggestions"),
|
||||
smsg(_("Sorry, only %" PRId64 " suggestions"),
|
||||
(int64_t)sug.su_ga.ga_len);
|
||||
} else {
|
||||
xfree(repl_from);
|
||||
@ -11190,7 +11184,6 @@ badword:
|
||||
}
|
||||
}
|
||||
}
|
||||
// smsg("word %s (%d): %s (%d)", sftword, sftnr, theword, orgnr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -856,7 +856,7 @@ do_tag (
|
||||
* file didn't exist. Otherwise an EMSG() is given below.
|
||||
*/
|
||||
if (nofile_fname != NULL && error_cur_match != cur_match)
|
||||
smsg((char_u *)_("File \"%s\" does not exist"), nofile_fname);
|
||||
smsg(_("File \"%s\" does not exist"), nofile_fname);
|
||||
|
||||
|
||||
ic = (matches[cur_match][0] & MT_IC_OFF);
|
||||
@ -1289,7 +1289,7 @@ find_tags (
|
||||
|
||||
if (p_verbose >= 5) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Searching tags file %s"), tag_fname);
|
||||
smsg(_("Searching tags file %s"), tag_fname);
|
||||
verbose_leave();
|
||||
}
|
||||
}
|
||||
@ -2742,7 +2742,7 @@ add_tag_field (
|
||||
if (dict_find(dict, (char_u *)field_name, -1) != NULL) {
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Duplicate field name: %s"), field_name);
|
||||
smsg(_("Duplicate field name: %s"), field_name);
|
||||
verbose_leave();
|
||||
}
|
||||
return FAIL;
|
||||
|
@ -159,12 +159,12 @@ static void u_check_tree(u_header_T *uhp,
|
||||
/* Check pointers back are correct. */
|
||||
if (uhp->uh_next.ptr != exp_uh_next) {
|
||||
EMSG("uh_next wrong");
|
||||
smsg((char_u *)"expected: 0x%x, actual: 0x%x",
|
||||
smsg("expected: 0x%x, actual: 0x%x",
|
||||
exp_uh_next, uhp->uh_next.ptr);
|
||||
}
|
||||
if (uhp->uh_alt_prev.ptr != exp_uh_alt_prev) {
|
||||
EMSG("uh_alt_prev wrong");
|
||||
smsg((char_u *)"expected: 0x%x, actual: 0x%x",
|
||||
smsg("expected: 0x%x, actual: 0x%x",
|
||||
exp_uh_alt_prev, uhp->uh_alt_prev.ptr);
|
||||
}
|
||||
|
||||
@ -198,7 +198,7 @@ static void u_check(int newhead_may_be_NULL) {
|
||||
EMSGN("b_u_curhead invalid: 0x%x", curbuf->b_u_curhead);
|
||||
if (header_count != curbuf->b_u_numhead) {
|
||||
EMSG("b_u_numhead invalid");
|
||||
smsg((char_u *)"expected: %" PRId64 ", actual: %" PRId64,
|
||||
smsg("expected: %" PRId64 ", actual: %" PRId64,
|
||||
(int64_t)header_count, (int64_t)curbuf->b_u_numhead);
|
||||
}
|
||||
}
|
||||
@ -1013,8 +1013,7 @@ void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash)
|
||||
if (file_name == NULL) {
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)
|
||||
_("Cannot write undo file in any directory in 'undodir'"));
|
||||
smsg(_("Cannot write undo file in any directory in 'undodir'"));
|
||||
verbose_leave();
|
||||
}
|
||||
return;
|
||||
@ -1048,8 +1047,7 @@ void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash)
|
||||
if (name != NULL || p_verbose > 0) {
|
||||
if (name == NULL)
|
||||
verbose_enter();
|
||||
smsg((char_u *)
|
||||
_("Will not overwrite with undo file, cannot read: %s"),
|
||||
smsg(_("Will not overwrite with undo file, cannot read: %s"),
|
||||
file_name);
|
||||
if (name == NULL)
|
||||
verbose_leave();
|
||||
@ -1064,8 +1062,7 @@ void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash)
|
||||
if (name != NULL || p_verbose > 0) {
|
||||
if (name == NULL)
|
||||
verbose_enter();
|
||||
smsg((char_u *)
|
||||
_("Will not overwrite, this is not an undo file: %s"),
|
||||
smsg(_("Will not overwrite, this is not an undo file: %s"),
|
||||
file_name);
|
||||
if (name == NULL)
|
||||
verbose_leave();
|
||||
@ -1094,7 +1091,7 @@ void u_write_undo(char_u *name, int forceit, buf_T *buf, char_u *hash)
|
||||
(void)os_setperm(file_name, perm);
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Writing undo file: %s"), file_name);
|
||||
smsg(_("Writing undo file: %s"), file_name);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -1236,7 +1233,7 @@ void u_read_undo(char_u *name, char_u *hash, char_u *orig_name)
|
||||
&& file_info_undo.stat.st_uid != getuid()) {
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Not reading undo file, owner differs: %s"),
|
||||
smsg(_("Not reading undo file, owner differs: %s"),
|
||||
file_name);
|
||||
verbose_leave();
|
||||
}
|
||||
@ -1249,7 +1246,7 @@ void u_read_undo(char_u *name, char_u *hash, char_u *orig_name)
|
||||
|
||||
if (p_verbose > 0) {
|
||||
verbose_enter();
|
||||
smsg((char_u *)_("Reading undo file: %s"), file_name);
|
||||
smsg(_("Reading undo file: %s"), file_name);
|
||||
verbose_leave();
|
||||
}
|
||||
|
||||
@ -1483,7 +1480,7 @@ void u_read_undo(char_u *name, char_u *hash, char_u *orig_name)
|
||||
#endif
|
||||
|
||||
if (name != NULL) {
|
||||
smsg((char_u *)_("Finished reading undo file %s"), file_name);
|
||||
smsg(_("Finished reading undo file %s"), file_name);
|
||||
}
|
||||
goto theend;
|
||||
|
||||
@ -2289,7 +2286,7 @@ u_undo_end (
|
||||
}
|
||||
}
|
||||
|
||||
smsg((char_u *)_("%" PRId64 " %s; %s #%" PRId64 " %s"),
|
||||
smsg(_("%" PRId64 " %s; %s #%" PRId64 " %s"),
|
||||
u_oldcount < 0 ? (int64_t)-u_oldcount : (int64_t)u_oldcount,
|
||||
_(msgstr),
|
||||
did_undo ? _("before") : _("after"),
|
||||
|
Loading…
Reference in New Issue
Block a user