mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 04:46:55 +03:00
* cmd.c (guess_message_value): Remove the argument. Adjust all
callers.
This commit is contained in:
parent
e94ec737ad
commit
7fe30fff07
@ -1,5 +1,8 @@
|
|||||||
2001-09-15 Pavel Roskin <proski@gnu.org>
|
2001-09-15 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
|
* cmd.c (guess_message_value): Remove the argument. Adjust all
|
||||||
|
callers.
|
||||||
|
|
||||||
* textconf.c (features): Remove "edition", minor fixes.
|
* textconf.c (features): Remove "edition", minor fixes.
|
||||||
(version): Don't report the current locale - it's meaningless,
|
(version): Don't report the current locale - it's meaningless,
|
||||||
especially if ENABLE_NLS is not defined.
|
especially if ENABLE_NLS is not defined.
|
||||||
|
14
src/cmd.c
14
src/cmd.c
@ -1191,7 +1191,7 @@ void mkdir_panel_cmd (void)
|
|||||||
|
|
||||||
/* partly taken from dcigettext.c, returns "" for default locale */
|
/* partly taken from dcigettext.c, returns "" for default locale */
|
||||||
/* value should be freed by calling function g_free() */
|
/* value should be freed by calling function g_free() */
|
||||||
char *guess_message_value (unsigned want_info)
|
char *guess_message_value (void)
|
||||||
{
|
{
|
||||||
const char *var[] = {
|
const char *var[] = {
|
||||||
/* The highest priority value is the `LANGUAGE' environment
|
/* The highest priority value is the `LANGUAGE' environment
|
||||||
@ -1219,18 +1219,10 @@ char *guess_message_value (unsigned want_info)
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (var[i] == NULL)
|
if (locale == NULL)
|
||||||
locale = "";
|
locale = "";
|
||||||
|
|
||||||
if (want_info == 0)
|
return g_strdup (locale);
|
||||||
retval = g_strdup (locale);
|
|
||||||
else
|
|
||||||
if (var[i] == NULL)
|
|
||||||
retval = g_strdup (_("Using default locale"));
|
|
||||||
else
|
|
||||||
retval = g_strdup_printf (_("Using locale \"%s\" (from environment variable %s)"), locale, var[i]);
|
|
||||||
|
|
||||||
return retval;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Returns a random hint */
|
/* Returns a random hint */
|
||||||
|
@ -63,7 +63,7 @@ void save_setup_cmd (void);
|
|||||||
char *get_random_hint (void);
|
char *get_random_hint (void);
|
||||||
void source_routing (void);
|
void source_routing (void);
|
||||||
void user_file_menu_cmd (void);
|
void user_file_menu_cmd (void);
|
||||||
char *guess_message_value (unsigned want_info);
|
char *guess_message_value (void);
|
||||||
int check_for_default(char *default_file, char *file);
|
int check_for_default(char *default_file, char *file);
|
||||||
|
|
||||||
/* Display mode code */
|
/* Display mode code */
|
||||||
|
@ -628,7 +628,7 @@ char *load_mc_home_file (const char *filename, char ** allocated_filename)
|
|||||||
char *data;
|
char *data;
|
||||||
|
|
||||||
hintfile_base = concat_dir_and_file (mc_home, filename);
|
hintfile_base = concat_dir_and_file (mc_home, filename);
|
||||||
lang = guess_message_value (0);
|
lang = guess_message_value ();
|
||||||
|
|
||||||
hintfile = g_strdup_printf ("%s.%s", hintfile_base, lang);
|
hintfile = g_strdup_printf ("%s.%s", hintfile_base, lang);
|
||||||
data = load_file (hintfile);
|
data = load_file (hintfile);
|
||||||
|
Loading…
Reference in New Issue
Block a user