* charsets.c (load_codepages_list): Print a warning if
mc.charset cannot be opened. * setup.c (load_setup) [HAVE_CHARSET]: Remove all popup messages because it's to early to use them - ncurses would crash.
Этот коммит содержится в:
родитель
e6a07c778a
Коммит
849fecec4c
@ -1,3 +1,10 @@
|
||||
2001-08-16 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* charsets.c (load_codepages_list): Print a warning if
|
||||
mc.charset cannot be opened.
|
||||
* setup.c (load_setup) [HAVE_CHARSET]: Remove all popup messages
|
||||
because it's to early to use them - ncurses would crash.
|
||||
|
||||
2001-08-15 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* util.c (strip_ctrl_codes): Rewrite using pointers. Fix
|
||||
|
@ -30,6 +30,7 @@ int load_codepages_list(void)
|
||||
|
||||
fname = concat_dir_and_file (mc_home, CHARSETS_INDEX);
|
||||
if ( !( f = fopen( fname, "r" ) ) ) {
|
||||
fprintf (stderr, _("Warning: file %s not found\n"), fname);
|
||||
g_free (fname);
|
||||
return -1;
|
||||
}
|
||||
|
12
src/setup.c
12
src/setup.c
@ -55,7 +55,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
#include "dialog.h"
|
||||
#include "charsets.h"
|
||||
#endif
|
||||
|
||||
@ -650,9 +649,7 @@ load_setup (void)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CHARSET
|
||||
if ( load_codepages_list() <= 0 ) {
|
||||
message( 1, MSG_ERROR, _("Cannot load %s/%s"), mc_home, CHARSETS_INDEX );
|
||||
} else {
|
||||
if ( load_codepages_list() > 0 ) {
|
||||
char cpname[128];
|
||||
load_string( "Misc", "display_codepage", "",
|
||||
cpname, sizeof(cpname) );
|
||||
@ -661,12 +658,7 @@ load_setup (void)
|
||||
}
|
||||
|
||||
init_printable_table( display_codepage );
|
||||
{
|
||||
char *errmsg = init_translation_table( source_codepage,
|
||||
display_codepage );
|
||||
if (errmsg)
|
||||
message( 1, MSG_ERROR, "%s", errmsg );
|
||||
}
|
||||
init_translation_table( source_codepage, display_codepage );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user