diff --git a/src/ChangeLog b/src/ChangeLog index a6799cd74..88db87cd1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,14 @@ 2002-08-01 Pavel Roskin + * charsets.c: Unconditionally enable finalization code that was + only used with HAVE_MAD. + * color.c: Likewise. + * color.h: Likewise. + * key.c: Likewise. + * main.c: Likewise. + * slint.c: Likewise. + * subshell.c (exit_subshell): Free subshell_prompt. + * mad.c: Remove. * mad.h: Likewise. * Makefile.am (SRCS): Remove mad.c and mad.h. diff --git a/src/charsets.c b/src/charsets.c index b188d6846..83a3f63ee 100644 --- a/src/charsets.c +++ b/src/charsets.c @@ -84,7 +84,6 @@ fail: return result; } -#ifdef HAVE_MAD void free_codepages_list (void) { if (n_codepages > 0) { @@ -98,7 +97,6 @@ void free_codepages_list (void) codepages = 0; } } -#endif /* HAVE_MAD */ #define OTHER_8BIT "Other_8_bit" diff --git a/src/color.c b/src/color.c index c4ef76fb3..5d06c4ba1 100644 --- a/src/color.c +++ b/src/color.c @@ -404,7 +404,6 @@ try_alloc_color_pair (char *fg, char *bg) } #endif /* !HAVE_SLANG */ -#ifdef HAVE_MAD void dealloc_color_pairs (void) { @@ -420,5 +419,4 @@ dealloc_color_pairs (void) } c.next = NULL; } -#endif /* HAVE_MAD */ diff --git a/src/color.h b/src/color.h index 1188393ce..30b20c6ed 100644 --- a/src/color.h +++ b/src/color.h @@ -93,8 +93,6 @@ extern int dialog_colors [4]; void mc_init_pair (int index, CTYPE foreground, CTYPE background); int try_alloc_color_pair (char *fg, char *bg); -#ifdef HAVE_MAD void dealloc_color_pairs (void); -#endif #endif /* __COLOR_H */ diff --git a/src/key.c b/src/key.c index f6d02a141..2a3b27df2 100644 --- a/src/key.c +++ b/src/key.c @@ -981,7 +981,6 @@ ctrl_pressed (void) return 0; } -#ifdef HAVE_MAD static void k_dispose (key_def *k) { if (!k) @@ -999,14 +998,11 @@ static void s_dispose (SelectList *sel) s_dispose (sel->next); g_free (sel); } -#endif /* HAVE_MAD */ void done_key () { -#ifdef HAVE_MAD k_dispose (keys); s_dispose (select_list); -#endif /* HAVE_MAD */ #ifdef HAVE_TEXTMODE_X11_SUPPORT if (x11_display) diff --git a/src/main.c b/src/main.c index 147d4e8e2..93628a243 100644 --- a/src/main.c +++ b/src/main.c @@ -2759,7 +2759,6 @@ main (int argc, char *argv []) g_free (last_wd_string); } -#ifdef HAVE_MAD #ifndef _OS_NT g_free (mc_home); #endif /* (_OS_NT) */ @@ -2771,7 +2770,6 @@ main (int argc, char *argv []) g_free (this_dir); if (other_dir) g_free (other_dir); -#endif return 0; } diff --git a/src/slint.c b/src/slint.c index 770f8e7d6..e27827a3b 100644 --- a/src/slint.c +++ b/src/slint.c @@ -257,9 +257,7 @@ slang_shutdown (void) slang_shell_mode (); do_exit_ca_mode (); SLang_reset_tty (); -#ifdef HAVE_MAD dealloc_color_pairs (); -#endif /* HAVE_MAD */ /* Load the op capability to reset the colors to those that were * active when the program was started up diff --git a/src/subshell.c b/src/subshell.c index 5e65dd7ff..81b2c3320 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -749,7 +749,10 @@ int exit_subshell (void) if (unlink (pty_buffer) == -1) perror (__FILE__": couldn't remove named pipe /tmp/mc.pipe.NNN"); } - + + g_free (subshell_prompt); + subshell_prompt = NULL; + return quit; }