mirror of
https://github.com/MidnightCommander/mc
synced 2024-12-23 12:56:51 +03:00
Ticket #1591: Master don't build with --disable-charset oprion.
* Fixed build on master. * Refactoring: avoid compiler warnings. * Remove unneeded code from mcviewer.c. Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
parent
b44191cd02
commit
5c629cafda
@ -208,6 +208,7 @@ mcview_done (mcview_t * view)
|
|||||||
void
|
void
|
||||||
mcview_set_codeset (mcview_t * view)
|
mcview_set_codeset (mcview_t * view)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_CHARSET
|
||||||
const char *cp_id = NULL;
|
const char *cp_id = NULL;
|
||||||
|
|
||||||
view->utf8 = TRUE;
|
view->utf8 = TRUE;
|
||||||
@ -222,7 +223,9 @@ mcview_set_codeset (mcview_t * view)
|
|||||||
}
|
}
|
||||||
view->utf8 = (gboolean) str_isutf8 (cp_id);
|
view->utf8 = (gboolean) str_isutf8 (cp_id);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void) view;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
@ -234,9 +237,9 @@ mcview_select_encoding (mcview_t * view)
|
|||||||
if (do_select_codepage ()) {
|
if (do_select_codepage ()) {
|
||||||
mcview_set_codeset (view);
|
mcview_set_codeset (view);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
(void) view;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* --------------------------------------------------------------------------------------------- */
|
/* --------------------------------------------------------------------------------------------- */
|
||||||
|
@ -210,9 +210,7 @@ mcview_new (int y, int x, int cols, int lines, int is_panel)
|
|||||||
view->cursor_row = 0;
|
view->cursor_row = 0;
|
||||||
view->change_list = NULL;
|
view->change_list = NULL;
|
||||||
view->converter = str_cnv_from_term;
|
view->converter = str_cnv_from_term;
|
||||||
#ifdef HAVE_CHARSET
|
|
||||||
mcview_set_codeset (view);
|
mcview_set_codeset (view);
|
||||||
#endif
|
|
||||||
/* {status,ruler,data}_area are left uninitialized */
|
/* {status,ruler,data}_area are left uninitialized */
|
||||||
|
|
||||||
view->dirty = 0;
|
view->dirty = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user