Sergey Alyoshin <[email protected]> wrote:

> On Sat, May 26, 2018 at 7:01 PM, Ken Takata <[email protected]>
wrote:
> > Hi,
> >
> > In ex_docmd.c:
> >
> >  #endif
> > -           if (n == 1)
> > -               EMSG(_("E173: 1 more file to edit"));
> > -           else
> > -               EMSGN(_("E173: %ld more files to edit"), n);
> > +           EMSGN(NGETTEXT("E173: %d more file to edit",
> > +                       "E173: %d more files to edit", n), n);
> >             quitmore = 2;           /* next try to quit is allowed */
> >         }
> >         return FAIL;
> >
> > Why you changed "%ld" to "%d" here?
> > Is it just a mistake or intentional?
> >

> It is intentional, n is int and in upper before&now n usage it is also
"%d":

EMSGN(...) calls emsgn(char_u *s, long n) which prints a 'long'
so the format in the message should definitely be "%ld":

vim.h:
1620 #define EMSGN(s, n)            emsgn((char_u *)(s), (long)(n))

message.c:
  742 /*
  743  * Print an error message with one "%ld" and one long int argument.
  744  * This is not in message.c to avoid a warning for prototypes.
  745  */
  746     int
  747 emsgn(char_u *s, long n)
  748 {
  749     if (emsg_not_now())
  750         return TRUE;            /* no error messages at the moment */
  751     vim_snprintf((char *)IObuff, IOSIZE, (char *)s, n);
  752     return emsg(IObuff);
  753 }

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui