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:
Slava Zanko 2009-09-18 10:46:02 +03:00
parent b44191cd02
commit 5c629cafda
2 changed files with 6 additions and 5 deletions

View File

@ -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
} }
/* --------------------------------------------------------------------------------------------- */ /* --------------------------------------------------------------------------------------------- */

View File

@ -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;