From ff84fd632e1f1ea85de05e8796af12408407783f Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Wed, 13 Jun 2001 22:12:04 +0000 Subject: [PATCH] * screen.c (display_mini_info): Avoid nested i18n calls. (parse_panel_size): Warning fix. * user.c [HAVE_X]: Warning fix. (check_format_var): Avoid nested i18n calls. Improve messages. --- src/ChangeLog | 5 +++++ src/screen.c | 7 ++++--- src/user.c | 6 ++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 58ba989d0..49b5755bb 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,10 @@ 2001-06-13 Pavel Roskin + * screen.c (display_mini_info): Avoid nested i18n calls. + (parse_panel_size): Warning fix. + * user.c [HAVE_X]: Warning fix. + (check_format_var): Avoid nested i18n calls. Improve messages. + * screen.c (user_file_menu_cmd) [HAVE_X]: Disable. (panel_callback) [HAVE_X]: Don't define labels, they are unused. * user.c [HAVE_X]: Disable all user meny code. diff --git a/src/screen.c b/src/screen.c index 99900a9d9..7fee3b84c 100644 --- a/src/screen.c +++ b/src/screen.c @@ -659,8 +659,9 @@ display_mini_info (WPanel *panel) attrset (MARKED_COLOR); printw ("%*s", cols, " "); widget_move (&panel->widget, llines (panel)+3, 1); - g_snprintf (buffer, sizeof (buffer), _((panel->marked == 1) ? - N_("%s bytes in %d file") : N_("%s bytes in %d files")), + /* FIXME: use ngettext() here when gettext-0.10.35 becomes history */ + g_snprintf (buffer, sizeof (buffer), (panel->marked == 1) ? + _("%s bytes in %d file") : _("%s bytes in %d files"), size_trunc_sep (panel->total), panel->marked); if (strlen (buffer) > cols-2){ buffer [cols] = 0; @@ -1190,7 +1191,7 @@ parse_panel_size (WPanel *panel, char *format, int isstatus) static format_e * parse_display_format (WPanel *panel, char *format, char **error, int isstatus, int *res_total_cols) { - format_e *darr, *old, *home = 0; /* The formats we return */ + format_e *darr, *old = 0, *home = 0; /* The formats we return */ int total_cols = 0; /* Used columns by the format */ int set_justify; /* flag: set justification mode? */ int justify = 0; /* Which mode. */ diff --git a/src/user.c b/src/user.c index a3b7c9c2f..7c904a795 100644 --- a/src/user.c +++ b/src/user.c @@ -49,8 +49,10 @@ #define MAX_ENTRIES 16 #define MAX_ENTRY_LEN 60 +#ifndef HAVE_X static int debug_flag = 0; static int debug_error = 0; +#endif /* !HAVE_X */ static WEdit *s_editwidget; static char *menu = NULL; @@ -135,8 +137,8 @@ int check_format_var (const char *p, char **v) if (!dots || dots == q+5){ message (1, _(" Format error on file Extensions File "), - _(!dots ? N_(" The %%var macro does not have a default ") - : N_(" The %%var macros does not have a variable "))); + !dots ? _(" The %%var macro has no default ") + : _(" The %%var macro has no variable ")); return 0; }