* global.h [!ENABLE_NLS]: Provide replacement for ngettext.

* screen.c (display_mini_info): Cast panel->total to unsigned
long before passing it to ngettext() to avoid warnings.
This commit is contained in:
Pavel Roskin 2005-11-11 03:32:39 +00:00
parent ebc197834e
commit dd8b442df5
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-11-10 Pavel Roskin <proski@gnu.org>
* global.h [!ENABLE_NLS]: Provide replacement for ngettext.
* screen.c (display_mini_info): Cast panel->total to unsigned
long before passing it to ngettext() to avoid warnings.
2005-11-02 Pavel Roskin <proski@gnu.org> 2005-11-02 Pavel Roskin <proski@gnu.org>
* glibcompat.c: Move Q_ back ... * glibcompat.c: Move Q_ back ...

View File

@ -139,6 +139,7 @@ struct timeval {
#else /* Stubs that do something close enough. */ #else /* Stubs that do something close enough. */
# define textdomain(String) # define textdomain(String)
# define gettext(String) (String) # define gettext(String) (String)
# define ngettext(String1,String2,Num) (((Num) == 1) ? (String1) : (String2))
# define dgettext(Domain,Message) (Message) # define dgettext(Domain,Message) (Message)
# define dcgettext(Domain,Message,Type) (Message) # define dcgettext(Domain,Message,Type) (Message)
# define bindtextdomain(Domain,Directory) # define bindtextdomain(Domain,Directory)

View File

@ -685,7 +685,8 @@ display_mini_info (WPanel *panel)
* First make "N bytes", then insert it into "X in M files". * First make "N bytes", then insert it into "X in M files".
*/ */
g_snprintf(b_bytes, sizeof (b_bytes), g_snprintf(b_bytes, sizeof (b_bytes),
ngettext("%s byte", "%s bytes", panel->total), ngettext("%s byte", "%s bytes",
(unsigned long)panel->total),
size_trunc_sep(panel->total)); size_trunc_sep(panel->total));
g_snprintf(buffer, sizeof (buffer), g_snprintf(buffer, sizeof (buffer),
ngettext("%s in %d file", "%s in %d files", panel->marked), ngettext("%s in %d file", "%s in %d files", panel->marked),