[Pkg-mc-commits] r248 - in trunk/debian: . patches patches/bugs patches/debian

Patrick Winnertz winnie at alioth.debian.org
Wed Aug 19 19:58:57 UTC 2009


Author: winnie
Date: 2009-08-19 19:58:57 +0000 (Wed, 19 Aug 2009)
New Revision: 248

Added:
   trunk/debian/patches/bugs/1529_remove_search_converter_overhead.patch
   trunk/debian/patches/bugs/1544_segfault_on_launch_into_info_panel.patch
   trunk/debian/patches/bugs/1549_xterm-256color.patch
   trunk/debian/patches/bugs/277_mc_hangs_on_konsole_256-color.patch
   trunk/debian/patches/bugs/74_resize_tui_without_mouse.patch
   trunk/debian/patches/debian/04_add_gem_extension.patch
Modified:
   trunk/debian/changelog
   trunk/debian/patches/series
Log:
Add some more patches from upstream to fix various bugs



Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-08-17 13:53:45 UTC (rev 247)
+++ trunk/debian/changelog	2009-08-19 19:58:57 UTC (rev 248)
@@ -7,11 +7,14 @@
   * Added patch to fix codejump if there is a number in the function name
   * Added patch to fix the broken german date in the mc panels
     (Closes: #541104)
+  * Added patch to enable .gem archives. (Closes: #541673)
+  * Added several bugfixes for crashes or malbehaviour which are fixed in 
+    upstreams git for 4.7.0-pre2.
 
   [ Denis Briand ]
   * Fit Debian watch file to the new upstream repository.
 
- -- Patrick Winnertz <winnie at debian.org>  Fri, 14 Aug 2009 14:04:37 +0200
+ -- Patrick Winnertz <winnie at debian.org>  Wed, 19 Aug 2009 21:52:58 +0200
 
 mc (2:4.7.0-pre1-3) unstable; urgency=low
 

Added: trunk/debian/patches/bugs/1529_remove_search_converter_overhead.patch
===================================================================
--- trunk/debian/patches/bugs/1529_remove_search_converter_overhead.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/1529_remove_search_converter_overhead.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,382 @@
+commit 4afee14f94355cdb0def18c5c7959d27c50a61e4
+Author: Ilia Maslakov <il.smind at google.com>
+Date:   Thu Aug 13 05:59:31 2009 +0000
+
+    Ticket #1529 (remove search converter overhead)
+    
+        * add: void tty_print_anychar (int c)
+        * remove superfluous search converter in convert_from_utf_to_current_c,
+          convert_from_8bit_to_utf_c add converter to WEdit struct
+        * fix: init defaulf codesets
+        * fix: segfault on replace if LANG=C
+    
+    Signed-off-by: Ilia Maslakov <il.smind at gmail.com>
+
+diff --git a/edit/edit-widget.h b/edit/edit-widget.h
+index 506312c..3a77711 100644
+--- a/edit/edit-widget.h
++++ b/edit/edit-widget.h
+@@ -132,6 +132,7 @@ struct WEdit {
+     /* user map stuff */
+     const edit_key_map_type *user_map;
+     const edit_key_map_type *ext_map;
++    GIConv converter;
+ 
+     int extmod;
+ 
+diff --git a/edit/edit.c b/edit/edit.c
+index 84df77e..98a8cfc 100644
+--- a/edit/edit.c
++++ b/edit/edit.c
+@@ -285,19 +285,9 @@ edit_load_file_fast (WEdit *edit, const char *filename)
+ {
+     long buf, buf2;
+     int file = -1;
+-#ifdef HAVE_CHARSET
+-    const char *cp_id;
+-#endif
+-
+     edit->curs2 = edit->last_byte;
+     buf2 = edit->curs2 >> S_EDIT_BUF_SIZE;
+     edit->utf8 = 0;
+-#ifdef HAVE_CHARSET
+-    cp_id = get_codepage_id (source_codepage);
+-
+-    if (cp_id != NULL)
+-        edit->utf8 = str_isutf8 (cp_id);
+-#endif
+     if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
+ 	GString *errmsg = g_string_new(NULL);
+ 	g_string_sprintf(errmsg, _(" Cannot open %s for reading "), filename);
+@@ -723,6 +713,26 @@ edit_init (WEdit *edit, int lines, int columns, const char *filename,
+ 	    g_free (edit);
+ 	return 0;
+     }
++    edit->utf8 = 0;
++    edit->converter = str_cnv_from_term;
++#ifdef HAVE_CHARSET
++    const char *cp_id = NULL;
++    cp_id = get_codepage_id (source_codepage >= 0 ?
++                            source_codepage : display_codepage);
++
++    if (cp_id != NULL) {
++        GIConv conv;
++        conv = str_crt_conv_from (cp_id);
++        if (conv != INVALID_CONV) {
++            if (edit->converter != str_cnv_from_term)
++                str_close_conv (edit->converter);
++            edit->converter = conv;
++        }
++    }
++    if (cp_id != NULL)
++        edit->utf8 = str_isutf8 (cp_id);
++#endif
++
+     edit->loading_done = 1;
+     edit->modified = 0;
+     edit->locked = 0;
+@@ -1092,7 +1102,9 @@ edit_insert (WEdit *edit, int c)
+ void
+ edit_insert_over (WEdit * edit)
+ {
+-    for (int i = 0; i < edit->over_col; i++ ) {
++    int i;
++
++    for ( i = 0; i < edit->over_col; i++ ) {
+         edit_insert (edit, ' ');
+     }
+     edit->over_col = 0;
+diff --git a/edit/editcmd.c b/edit/editcmd.c
+index 2146431..68deeb8 100644
+--- a/edit/editcmd.c
++++ b/edit/editcmd.c
+@@ -2393,12 +2393,22 @@ void
+ edit_select_codepage_cmd (WEdit *edit)
+ {
+ #ifdef HAVE_CHARSET
++    const char *cp_id = NULL;
+     if (do_select_codepage ()) {
+-	const char *cp_id;
+-
+ 	cp_id = get_codepage_id (source_codepage >= 0 ?
+ 				    source_codepage : display_codepage);
+ 
++        if (cp_id != NULL) {
++            GIConv conv;
++            conv = str_crt_conv_from (cp_id);
++            if (conv != INVALID_CONV) {
++                if (edit->converter != str_cnv_from_term)
++                    str_close_conv (edit->converter);
++                edit->converter = conv;
++            }
++        }
++
++
+ 	if (cp_id != NULL)
+ 	    edit->utf8 = str_isutf8 (cp_id);
+     }
+diff --git a/edit/editdraw.c b/edit/editdraw.c
+index 6ff5523..1243de0 100644
+--- a/edit/editdraw.c
++++ b/edit/editdraw.c
+@@ -332,18 +332,7 @@ print_to_widget (WEdit *edit, long row, int start_col, int start_col_real,
+ 		tty_lowlevel_setcolor (color);
+ 	    }
+ 	}
+-	if ( textchar > 255 ) {
+-            int res = g_unichar_to_utf8 (textchar, (char *)str);
+-            if ( res == 0 ) {
+-                str[0] = '.';
+-                str[1] = '\0';
+-            } else {
+-                str[res] = '\0';
+-            }
+-            tty_print_string ((char *) str);
+-        } else {
+-            tty_print_char (textchar);
+-        }
++	tty_print_anychar (textchar);
+ 	p++;
+     }
+ }
+@@ -497,11 +486,11 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
+ #ifdef HAVE_CHARSET
+ 		    if ( utf8_display ) {
+ 		        if ( !edit->utf8 ) {
+-		            c = convert_from_8bit_to_utf_c ((unsigned char) c);
++		            c = convert_from_8bit_to_utf_c ((unsigned char) c, edit->converter);
+ 		        }
+ 		    } else {
+ 		        if ( edit->utf8 ) {
+-		            c = convert_from_utf_to_current_c (c);
++		            c = convert_from_utf_to_current_c (c, edit->converter);
+ 		        } else {
+ #endif
+ 		            c = convert_to_display_c (c);
+diff --git a/src/charsets.c b/src/charsets.c
+index 774f37a..4b8c3bc 100644
+--- a/src/charsets.c
++++ b/src/charsets.c
+@@ -351,14 +351,12 @@ convert_from_utf_to_current (const char *str)
+ }
+ 
+ unsigned char
+-convert_from_utf_to_current_c (const int input_char)
++convert_from_utf_to_current_c (const int input_char, GIConv conv)
+ {
+     unsigned char str[6 + 1];
+     unsigned char buf_ch[6 + 1];
+     unsigned char ch = '.';
+-    const char *cp_from;
+ 
+-    GIConv conv;
+     int res = 0;
+ 
+     res = g_unichar_to_utf8 (input_char, (char *)str);
+@@ -367,59 +365,44 @@ convert_from_utf_to_current_c (const int input_char)
+     }
+     str[res] = '\0';
+ 
+-    cp_from =  get_codepage_id ( source_codepage );
+-    conv = str_crt_conv_from ( cp_from );
+-
+-    if (conv != INVALID_CONV) {
+-        switch (str_translate_char (conv, (char *)str, -1, (char *)buf_ch, sizeof(buf_ch))) {
+-        case ESTR_SUCCESS:
+-            ch = buf_ch[0];
+-            break;
+-        case ESTR_PROBLEM:
+-        case ESTR_FAILURE:
+-            ch = '.';
+-            break;
+-        }
+-        str_close_conv (conv);
++    switch (str_translate_char (conv, (char *)str, -1, (char *)buf_ch, sizeof(buf_ch))) {
++    case ESTR_SUCCESS:
++        ch = buf_ch[0];
++        break;
++    case ESTR_PROBLEM:
++    case ESTR_FAILURE:
++        ch = '.';
++        break;
+     }
+     return ch;
+ }
+ 
+ int
+-convert_from_8bit_to_utf_c (const char input_char)
++convert_from_8bit_to_utf_c (const char input_char, GIConv conv)
+ {
+     unsigned char str[2];
+     unsigned char buf_ch[6 + 1];
+     int ch = '.';
+     int res = 0;
+-    GIConv conv;
+-    const char *cp_from;
+ 
+     str[0] = (unsigned char) input_char;
+     str[1] = '\0';
+ 
+-    cp_from = get_codepage_id ( source_codepage );
+-    conv = str_crt_conv_from (cp_from);
+-
+-    if (conv != INVALID_CONV) {
+-        switch (str_translate_char (conv, (char *)str, -1, (char *)buf_ch, sizeof(buf_ch))) {
+-        case ESTR_SUCCESS:
+-            res = g_utf8_get_char_validated ((char *)buf_ch, -1);
+-            if ( res < 0 ) {
+-                ch = buf_ch[0];
+-            } else {
+-                ch = res;
+-            }
+-            break;
+-        case ESTR_PROBLEM:
+-        case ESTR_FAILURE:
+-            ch = '.';
+-            break;
++    switch (str_translate_char (conv, (char *)str, -1, (char *)buf_ch, sizeof(buf_ch))) {
++    case ESTR_SUCCESS:
++        res = g_utf8_get_char_validated ((char *)buf_ch, -1);
++        if ( res < 0 ) {
++            ch = buf_ch[0];
++        } else {
++            ch = res;
+         }
+-        str_close_conv (conv);
++        break;
++    case ESTR_PROBLEM:
++    case ESTR_FAILURE:
++        ch = '.';
++        break;
+     }
+     return ch;
+-
+ }
+ 
+ int
+diff --git a/src/charsets.h b/src/charsets.h
+index c69256b..96c2053 100644
+--- a/src/charsets.h
++++ b/src/charsets.h
+@@ -44,16 +44,16 @@ unsigned char convert_from_utf_to_current (const char *str);
+  * param input_char, gunichar
+  * return char in needle codepage (by global int source_codepage)
+ */
+-unsigned char convert_from_utf_to_current_c (const int input_char);
++unsigned char convert_from_utf_to_current_c (const int input_char, GIConv conv);
+ /*
+  * Converter from selected codepage 8-bit
+- * param char input_char
++ * param char input_char, GIConv converter
+  * return int utf char
+ */
+-int convert_from_8bit_to_utf_c (const char input_char);
++int convert_from_8bit_to_utf_c (const char input_char, GIConv conv);
+ /*
+  * Converter from display codepage 8-bit to utf-8
+- * param char input_char
++ * param char input_char, GIConv converter
+  * return int utf char
+ */
+ int convert_from_8bit_to_utf_c2 (const char input_char);
+diff --git a/src/main.c b/src/main.c
+index 9e7c8a8..2afcd1c 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1313,7 +1313,6 @@ static void check_codeset()
+         _system_codepage = str_detect_termencoding();
+         _source_codepage = get_codepage_id (source_codepage);
+         _display_codepage = get_codepage_id (display_codepage);
+-
+         if ( (strcmp (_system_codepage, _display_codepage)) ||
+              (strcmp (_system_codepage, _source_codepage)) ) {
+             if (quick_dialog (&ecs) == B_ENTER){
+@@ -1327,6 +1326,8 @@ static void check_codeset()
+                     source_codepage = display_codepage;
+                     cp_source = cp_display;
+                     profile_changed = 1;
++                } else {
++                    utf8_display = str_isutf8 (_system_codepage);
+                 }
+             } else {
+                 if ( skip_check_codeset ) {
+diff --git a/src/tty/tty-ncurses.c b/src/tty/tty-ncurses.c
+index 9608506..a698b9a 100644
+--- a/src/tty/tty-ncurses.c
++++ b/src/tty/tty-ncurses.c
+@@ -6,6 +6,7 @@
+ 
+    Written by:
+    Andrew Borodin <aborodin at vmail.ru>, 2009.
++   Ilia Maslakov <il.smind at gmail.com>, 2009.
+ 
+    This file is part of the Midnight Commander.
+ 
+@@ -285,6 +286,25 @@ tty_print_char (int c)
+ }
+ 
+ void
++tty_print_anychar (int c)
++{
++    unsigned char str[6 + 1];
++
++    if ( c > 255 ) {
++        int res = g_unichar_to_utf8 (c, (char *)str);
++        if ( res == 0 ) {
++            str[0] = '.';
++            str[1] = '\0';
++        } else {
++            str[res] = '\0';
++        }
++        addstr (str_term_form (s));
++    } else {
++        addch (c);
++    }
++}
++
++void
+ tty_print_alt_char (int c)
+ {
+     addch (c);
+diff --git a/src/tty/tty-slang.c b/src/tty/tty-slang.c
+index c7c9ad9..cee648e 100644
+--- a/src/tty/tty-slang.c
++++ b/src/tty/tty-slang.c
+@@ -472,6 +472,25 @@ tty_print_alt_char (int c)
+ }
+ 
+ void
++tty_print_anychar (int c)
++{
++    unsigned char str[6 + 1];
++
++    if ( c > 255 ) {
++        int res = g_unichar_to_utf8 (c, (char *)str);
++        if ( res == 0 ) {
++            str[0] = '.';
++            str[1] = '\0';
++        } else {
++            str[res] = '\0';
++        }
++        SLsmg_write_string ((char *) str_term_form (str));
++    } else {
++        SLsmg_write_char ((SLwchar_Type) ((unsigned int) c));
++    }
++}
++
++void
+ tty_print_string (const char *s)
+ {
+     SLsmg_write_string ((char *) str_term_form (s));
+diff --git a/src/tty/tty.h b/src/tty/tty.h
+index f72cdf1..4d1fcd0 100644
+--- a/src/tty/tty.h
++++ b/src/tty/tty.h
+@@ -65,6 +65,7 @@ extern void tty_set_alt_charset (gboolean alt_charset);
+ extern void tty_display_8bit (gboolean what);
+ extern void tty_print_char(int c);
+ extern void tty_print_alt_char(int c);
++extern void tty_print_anychar(int c);
+ extern void tty_print_string(const char *s);
+ extern void tty_printf(const char *s, ...);
+ 

Added: trunk/debian/patches/bugs/1544_segfault_on_launch_into_info_panel.patch
===================================================================
--- trunk/debian/patches/bugs/1544_segfault_on_launch_into_info_panel.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/1544_segfault_on_launch_into_info_panel.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,115 @@
+diff --git a/src/layout.c b/src/layout.c
+index 5b6e8a0..1c0babe 100644
+--- a/src/layout.c
++++ b/src/layout.c
+@@ -121,7 +121,11 @@ static struct {
+     int    type;
+     Widget *widget;
+     char *last_saved_dir;  /* last view_list working directory */
+-} panels [MAX_VIEWS];
++} panels [MAX_VIEWS] = {
++    /* init MAX_VIEWS items */
++    { view_listing, NULL, NULL },
++    { view_listing, NULL, NULL }
++};
+ 
+ /* These variables are used to avoid updating the information unless */
+ /* we need it */
+@@ -868,36 +872,32 @@ const char *get_nth_panel_name (int num)
+ /* Set the num-th panel to the view type: type */
+ /* This routine also keeps at least one WPanel object in the screen */
+ /* since a lot of routines depend on the current_panel variable */
+-void set_display_type (int num, int type)
++void
++set_display_type (int num, int type)
+ {
+-    int x, y, cols, lines;
+-    int    the_other;		/* Index to the other panel */
+-    const char   *file_name = NULL;	/* For Quick view */
+-    Widget *new_widget, *old_widget;
+-    WPanel  *the_other_panel;
+-
+-    x = y = cols = lines = 0;
+-    old_widget = 0;
++    int x = 0, y = 0, cols = 0, lines = 0;
++    int the_other = 0;		/* Index to the other panel */
++    const char *file_name = NULL;	/* For Quick view */
++    Widget *new_widget = NULL, *old_widget = NULL;
++    WPanel *the_other_panel = NULL;
++
+     if (num >= MAX_VIEWS){
+ 	fprintf (stderr, "Cannot allocate more that %d views\n", MAX_VIEWS);
+ 	abort ();
+     }
+-
+     /* Check that we will have a WPanel * at least */
+-    the_other = 0;
+     if (type != view_listing){
+ 	the_other = num == 0 ? 1 : 0;
+ 
+ 	if (panels [the_other].type != view_listing)
+ 	    return;
+-
+     }
+-    
++
+     /* Get rid of it */
+     if (panels [num].widget){
+ 	Widget *w = panels [num].widget;
+ 	WPanel *panel = (WPanel *) panels [num].widget;
+-	
++
+ 	x = w->x;
+ 	y = w->y;
+ 	cols  = w->cols;
+@@ -913,8 +913,6 @@ void set_display_type (int num, int type)
+ 	}
+     }
+ 
+-    new_widget = 0;
+-    
+     switch (type){
+     case view_listing:
+ 	new_widget = restore_into_right_dir_panel(num, old_widget);
+@@ -922,7 +920,6 @@ void set_display_type (int num, int type)
+ 	
+     case view_info:
+ 	new_widget = (Widget *) info_new ();
+-	
+ 	break;
+ 
+     case view_tree:
+@@ -948,11 +945,11 @@ void set_display_type (int num, int type)
+ 	save_panel_dir(num);
+ 
+     panels [num].type = type;
+-    panels [num].widget = (Widget *) new_widget;
+-    
++    panels [num].widget = new_widget;
++
+     /* We set the same size the old widget had */
+-    widget_set_size ((Widget *) new_widget, y, x, lines, cols);
+-    
++    widget_set_size (new_widget, y, x, lines, cols);
++
+     /* We use replace to keep the circular list of the dialog in the */
+     /* same state.  Maybe we could just kill it and then replace it  */
+     if (midnight_dlg && old_widget){
+@@ -1119,10 +1116,14 @@ int get_other_type (void)
+ }
+ 
+ /* Save current list_view widget directory into panel */
+-void save_panel_dir(int index)
++void
++save_panel_dir (int index)
+ {
+-    if (get_display_type(index) == view_listing) {
+-	WPanel *w = (WPanel *) get_panel_widget(index);
++    int type = get_display_type (index);
++    Widget *widget = get_panel_widget (index);
++
++    if ((type == view_listing) && (widget != NULL)) {
++	WPanel *w = (WPanel *) widget;
+ 	char *widget_work_dir = w->cwd;
+ 
+ 	g_free(panels [index].last_saved_dir);  /* last path no needed */

Added: trunk/debian/patches/bugs/1549_xterm-256color.patch
===================================================================
--- trunk/debian/patches/bugs/1549_xterm-256color.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/1549_xterm-256color.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,22 @@
+commit c080a3e2a53657115cc82d14bdb906da4e30bf60
+Author: Patrick Winnertz <winnie at debian.org>
+Date:   Wed Aug 19 19:38:44 2009 +0200
+
+    Add a xterm-256color entry to mc.lib
+    
+    Signed-off-by: Patrick Winnertz <winnie at debian.org>
+
+diff --git a/misc/mc.lib b/misc/mc.lib
+index 75c8f15..511c054 100644
+--- a/misc/mc.lib
++++ b/misc/mc.lib
+@@ -111,6 +111,9 @@ copy=xterm
+ [terminal:xterm-color]
+ copy=xterm
+ 
++[terminal:xterm-256color]
++copy=xterm
++
+ [terminal:ibmpc3]
+ f11=\\e[Y
+ f12=\\e[Z

Added: trunk/debian/patches/bugs/277_mc_hangs_on_konsole_256-color.patch
===================================================================
--- trunk/debian/patches/bugs/277_mc_hangs_on_konsole_256-color.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/277_mc_hangs_on_konsole_256-color.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,22 @@
+commit 678e10a3ed859ed4c311a9f812a2f6f298d0e8d8
+Author: Slava Zanko <slavazanko at gmail.com>
+Date:   Wed Aug 19 12:30:53 2009 +0300
+
+    Ticket #277: mc hangs if mouse support enabled on konsole-256color terminal
+    
+    Added recognize for 'konsole' terminal into init_xterm_support() function.
+    
+    Signed-off-by: Slava Zanko <slavazanko at gmail.com>
+
+diff --git a/src/main.c b/src/main.c
+index 2afcd1c..f88b185 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1219,6 +1219,7 @@ init_xterm_support (void)
+     }
+ 
+     if (force_xterm || strncmp (termvalue, "xterm", 5) == 0
++	|| strncmp (termvalue, "konsole", 7) == 0
+ 	|| strncmp (termvalue, "rxvt", 4) == 0
+ 	|| strcmp (termvalue, "Eterm") == 0
+ 	|| strcmp (termvalue, "dtterm") == 0) {

Added: trunk/debian/patches/bugs/74_resize_tui_without_mouse.patch
===================================================================
--- trunk/debian/patches/bugs/74_resize_tui_without_mouse.patch	                        (rev 0)
+++ trunk/debian/patches/bugs/74_resize_tui_without_mouse.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,91 @@
+commit 7c1e24525d940e4fd3a086f19584d2a1003c5bce
+Author: Andrew Borodin <aborodin at vmail.ru>
+Date:   Mon Aug 17 16:01:05 2009 +0400
+
+    Ticket #74: TUI is not resized if mouse is desabled.
+    
+    If you run without mouse support (mc -d), mc doesn't detect resizes.
+    
+    You need to press a key for mc to resize itself to new window after
+    window is maximized or resized (press up/down arrow, Ctrl-O, almost
+    anything will work).
+    
+    Signed-off-by: Andrew Borodin <aborodin at vmail.ru>
+
+diff --git a/src/tty/key.c b/src/tty/key.c
+index e7fe3e4..fde34bd 100644
+--- a/src/tty/key.c
++++ b/src/tty/key.c
+@@ -1500,7 +1500,7 @@ int
+ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+ {
+     int c;
+-    static int flag;		/* Return value from select */
++    static int flag = 0;	/* Return value from select */
+ #ifdef HAVE_LIBGPM
+     static struct Gpm_Event ev;	/* Mouse event */
+ #endif
+@@ -1527,7 +1527,7 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+     }
+ 
+     /* Repeat if using mouse */
+-    while (mouse_enabled && (pending_keys == NULL)) {
++    while (pending_keys == NULL) {
+ 	int maxfdp;
+ 	fd_set select_set;
+ 
+@@ -1536,7 +1536,7 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+ 	maxfdp = max (add_selects (&select_set), input_fd);
+ 
+ #ifdef HAVE_LIBGPM
+-	if (use_mouse_p == MOUSE_GPM) {
++	if (mouse_enabled && (use_mouse_p == MOUSE_GPM)) {
+ 	    if (gpm_fd < 0) {
+ 		/* Connection to gpm broken, possibly gpm has died */
+ 		mouse_enabled = FALSE;
+@@ -1577,6 +1577,7 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+ 	    timeout.tv_sec = 0;
+ 	    timeout.tv_usec = 0;
+ 	}
++
+ 	tty_enable_interrupt_key ();
+ 	flag = select (maxfdp + 1, &select_set, NULL, NULL, time_addr);
+ 	tty_disable_interrupt_key ();
+@@ -1601,7 +1602,8 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+ 	if (FD_ISSET (input_fd, &select_set))
+ 	    break;
+ #ifdef HAVE_LIBGPM
+-	if (use_mouse_p == MOUSE_GPM && gpm_fd > 0 && FD_ISSET (gpm_fd, &select_set)) {
++	if (mouse_enabled && use_mouse_p == MOUSE_GPM
++	    && gpm_fd > 0 && FD_ISSET (gpm_fd, &select_set)) {
+ 	    Gpm_GetEvent (&ev);
+ 	    Gpm_FitEvent (&ev);
+ 	    *event = ev;
+@@ -1609,6 +1611,7 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+ 	}
+ #endif				/* !HAVE_LIBGPM */
+     }
++
+ #ifndef HAVE_SLANG
+     flag = is_wintouched (stdscr);
+     untouchwin (stdscr);
+@@ -1616,15 +1619,15 @@ tty_get_event (struct Gpm_Event *event, gboolean redo_event, gboolean block)
+     c = block ? getch_with_delay () : get_key_code (1);
+ 
+ #ifndef HAVE_SLANG
+-    if (flag)
++    if (flag > 0)
+ 	tty_touch_screen ();
+ #endif				/* !HAVE_SLANG */
+ 
+-    if (c == MCKEY_MOUSE
++    if (mouse_enabled && (c == MCKEY_MOUSE
+ #ifdef KEY_MOUSE
+-	|| c == KEY_MOUSE
++			    || c == KEY_MOUSE
+ #endif				/* KEY_MOUSE */
+-	) {
++	)) {
+ 	/* Mouse event */
+ 	xmouse_get_event (event);
+ 	return (event->type != 0) ? EV_MOUSE : EV_NONE;

Added: trunk/debian/patches/debian/04_add_gem_extension.patch
===================================================================
--- trunk/debian/patches/debian/04_add_gem_extension.patch	                        (rev 0)
+++ trunk/debian/patches/debian/04_add_gem_extension.patch	2009-08-19 19:58:57 UTC (rev 248)
@@ -0,0 +1,13 @@
+diff --git a/misc/mc.ext.in b/misc/mc.ext.in
+index 493e8c5..33fbcb2 100644
+--- a/misc/mc.ext.in
++++ b/misc/mc.ext.in
+@@ -107,7 +107,7 @@
+ ### Archives ###
+ 
+ # .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
+-regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
++regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk|\.gem$
+ 	Open=%cd %p#utar
+ 	View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
+ 

Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series	2009-08-17 13:53:45 UTC (rev 247)
+++ trunk/debian/patches/series	2009-08-19 19:58:57 UTC (rev 248)
@@ -1,5 +1,6 @@
 debian/02_use_correct_smb_conf_path.patch
 debian/03_use_awk.patch
+debian/04_add_gem_extension.patch
 debian/05_disable_internal_editor.patch
 syntax/05_html-syntax.patch
 syntax/06_strace_syntax.patch
@@ -30,6 +31,11 @@
 bugs/1521_ctrl-z-doesnt_work.patch
 bugs/1533_german_date_cut_off.patch
 bugs/267_fix_codejump_on_functions_with_nums.patch
+bugs/74_resize_tui_without_mouse.patch
+bugs/1549_xterm-256color.patch
+bugs/1544_segfault_on_launch_into_info_panel.patch
+bugs/1529_remove_search_converter_overhead.patch
+bugs/277_mc_hangs_on_konsole_256-color.patch
 man/10_FSSTND_hu_man.patch
 man/11_FSSTND_it_man.patch
 man/12_FSSTND_man.patch




More information about the Pkg-mc-commits mailing list