[Pkg-mc-commits] r240 - in trunk/debian/patches: . bugs
Patrick Winnertz
winnie at alioth.debian.org
Wed Aug 12 12:19:29 UTC 2009
Author: winnie
Date: 2009-08-12 12:19:29 +0000 (Wed, 12 Aug 2009)
New Revision: 240
Added:
trunk/debian/patches/bugs/1457_find_file_broken.patch
trunk/debian/patches/bugs/1478_add_kill_work_shortcut.patch
trunk/debian/patches/bugs/1485_extfs_doesnt_handle_certain_isos.patch
trunk/debian/patches/bugs/1496_search_backwards_broken.patch
trunk/debian/patches/bugs/1499_mcview_backwards_search_broken.patch
trunk/debian/patches/bugs/1520_eventx_unintialized.patch
trunk/debian/patches/bugs/1521_ctrl-z-doesnt_work.patch
trunk/debian/patches/bugs/1527_fix_heap_corruption_on_large_filenames.patch
trunk/debian/patches/bugs/330_menu_disappeared_on_resize.patch
trunk/debian/patches/bugs/82_save_as_retains_mode.patch
Modified:
trunk/debian/patches/series
Log:
Fix several problems fixed in git for 4.7.0-pre2 already..
Added: trunk/debian/patches/bugs/1457_find_file_broken.patch
===================================================================
--- trunk/debian/patches/bugs/1457_find_file_broken.patch (rev 0)
+++ trunk/debian/patches/bugs/1457_find_file_broken.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,150 @@
+diff --git a/src/find.c b/src/find.c
+index 451599a..68c771b 100644
+--- a/src/find.c
++++ b/src/find.c
+@@ -295,13 +295,14 @@ find_parameters (char **start_dir, char **pattern, char **content)
+ buts[i] = _(buts[i]);
+
+ file_case_label = _(file_case_label);
+- content_case_label = _(content_case_label);
++ file_pattern_label = _(file_pattern_label);
+ file_recurs_label = _(file_recurs_label);
+ file_skip_hidden_label = _(file_skip_hidden_label);
+ file_all_charsets_label = _(file_all_charsets_label);
+- content_all_charsets_label = _(content_all_charsets_label);
++ content_case_label = _(content_case_label);
+ content_regexp_label = _(content_regexp_label);
+- file_pattern_label = _(file_pattern_label);
++ content_first_hit_label = _(content_first_hit_label);
++ content_all_charsets_label = _(content_all_charsets_label);
+ }
+ #endif /* ENABLE_NLS */
+
+@@ -558,8 +559,8 @@ find_add_match (const char *dir, const char *file)
+ * has_newline - is there newline ?
+ */
+ static char *
+-get_line_at (int file_fd, char *buf, int *pos, int *n_read, int buf_size,
+- int *has_newline)
++get_line_at (int file_fd, char *buf, int buf_size, int *pos, int *n_read,
++ gboolean *has_newline)
+ {
+ char *buffer = NULL;
+ int buffer_size = 0;
+@@ -575,7 +576,7 @@ get_line_at (int file_fd, char *buf, int *pos, int *n_read, int buf_size,
+ }
+
+ ch = buf[(*pos)++];
+- if (ch == 0) {
++ if (ch == '\0') {
+ /* skip possible leading zero(s) */
+ if (i == 0)
+ continue;
+@@ -593,11 +594,10 @@ get_line_at (int file_fd, char *buf, int *pos, int *n_read, int buf_size,
+ buffer[i++] = ch;
+ }
+
+- *has_newline = ch ? 1 : 0;
++ *has_newline = (ch != '\0');
+
+- if (buffer) {
+- buffer[i] = 0;
+- }
++ if (buffer != NULL)
++ buffer[i] = '\0';
+
+ return buffer;
+ }
+@@ -630,20 +630,20 @@ check_find_events(Dlg_head *h)
+ /*
+ * search_content:
+ *
+- * Search the global (FIXME) regexp compiled content_pattern string in the
+- * DIRECTORY/FILE. It will add the found entries to the find listbox.
++ * Search the content_pattern string in the DIRECTORY/FILE.
++ * It will add the found entries to the find listbox.
+ *
+- * returns 0 if do_search should look for another file
+- * 1 if do_search should exit and proceed to the event handler
++ * returns FALSE if do_search should look for another file
++ * TRUE if do_search should exit and proceed to the event handler
+ */
+-static int
++static gboolean
+ search_content (Dlg_head *h, const char *directory, const char *filename)
+ {
+ struct stat s;
+ char buffer [BUF_4K];
+ char *fname = NULL;
+ int file_fd;
+- int ret_val = 0;
++ gboolean ret_val = FALSE;
+
+ fname = concat_dir_and_file (directory, filename);
+
+@@ -670,10 +670,11 @@ search_content (Dlg_head *h, const char *directory, const char *filename)
+ int line = 1;
+ int pos = 0;
+ int n_read = 0;
+- int has_newline;
++ gboolean has_newline;
+ char *p = NULL;
+ gboolean found = FALSE;
+ gsize found_len;
++ char result [BUF_MEDIUM];
+
+ if (resuming) {
+ /* We've been previously suspended, start from the previous position */
+@@ -681,23 +682,24 @@ search_content (Dlg_head *h, const char *directory, const char *filename)
+ line = last_line;
+ pos = last_pos;
+ }
+- while ((p = get_line_at (file_fd, buffer, &pos, &n_read, sizeof (buffer), &has_newline)) && (ret_val == 0)){
+- if (found == FALSE){ /* Search in binary line once */
+- if (mc_search_run (search_content_handle, (const void *) p, 0, strlen (p), &found_len))
+- {
+- char *fnd_info = g_strdup_printf ("%d:%s", line, filename);
+- find_add_match (directory, fnd_info);
+- g_free (fnd_info);
+- found = TRUE;
+- }
++ while (!ret_val
++ && (p = get_line_at (file_fd, buffer, sizeof (buffer),
++ &pos, &n_read, &has_newline)) != NULL) {
++ if (!found /* Search in binary line once */
++ && mc_search_run (search_content_handle,
++ (const void *) p, 0, strlen (p), &found_len)) {
++ g_snprintf (result, sizeof (result), "%d:%s", line, filename);
++ find_add_match (directory, result);
++ found = TRUE;
+ }
+ g_free (p);
+
++ if (found && content_first_hit_flag)
++ break;
++
+ if (has_newline) {
++ found = FALSE;
+ line++;
+-
+- if (!content_first_hit_flag)
+- found = FALSE;
+ }
+
+ if ((line & 0xff) == 0) {
+@@ -706,13 +708,13 @@ search_content (Dlg_head *h, const char *directory, const char *filename)
+ switch (res) {
+ case FIND_ABORT:
+ stop_idle (h);
+- ret_val = 1;
++ ret_val = TRUE;
+ break;
+ case FIND_SUSPEND:
+ resuming = 1;
+ last_line = line;
+ last_pos = pos;
+- ret_val = 1;
++ ret_val = TRUE;
+ break;
+ default:
+ break;
Added: trunk/debian/patches/bugs/1478_add_kill_work_shortcut.patch
===================================================================
--- trunk/debian/patches/bugs/1478_add_kill_work_shortcut.patch (rev 0)
+++ trunk/debian/patches/bugs/1478_add_kill_work_shortcut.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,20 @@
+commit 556089fc9ffc19f59a432d5849ae84895ddadde0
+Author: Daniel Borca <dborca at yahoo.com>
+Date: Sat Aug 8 12:36:24 2009 +0000
+
+ Ticket #1478 (kill word)
+
+ add: "kill word" (M-d) shortcut in editor;
+
+diff --git a/edit/editkeys.c b/edit/editkeys.c
+index e93f8fd..78942e0 100644
+--- a/edit/editkeys.c
++++ b/edit/editkeys.c
+@@ -116,6 +116,7 @@ static const edit_key_map_type common_key_map[] = {
+ { ALT ('>'), CK_End_Of_Text },
+ { ALT ('-'), CK_Load_Prev_File },
+ { ALT ('='), CK_Load_Next_File },
++ { ALT ('d'), CK_Delete_Word_Right },
+ { ALT (KEY_BACKSPACE), CK_Delete_Word_Left },
+ { ALT ('n'), CK_Toggle_Line_State },
+ { ALT ('_'), CK_Toggle_Tab_TWS },
Added: trunk/debian/patches/bugs/1485_extfs_doesnt_handle_certain_isos.patch
===================================================================
--- trunk/debian/patches/bugs/1485_extfs_doesnt_handle_certain_isos.patch (rev 0)
+++ trunk/debian/patches/bugs/1485_extfs_doesnt_handle_certain_isos.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,34 @@
+commit 96c0dc08d88763a4c107670b96208aa483d831ce
+Author: Stan. S. Krupoderov <pashelper at gmail.com>
+Date: Sat Aug 8 18:58:05 2009 +0400
+
+ Ticket #1485: iso9660 extfs does not handle certain isos
+
+ extfs/iso9660.in: add suport UCS l1, and fix ageinst new isoinfo
+
+ Original author: dborca
+
+ Signed-off-by: Stan. S. Krupoderov <pashelper at gmail.com>
+
+diff --git a/vfs/extfs/iso9660.in b/vfs/extfs/iso9660.in
+index 7b2ba70..e035740 100644
+--- a/vfs/extfs/iso9660.in
++++ b/vfs/extfs/iso9660.in
+@@ -15,7 +15,7 @@ test_iso () {
+ fi
+ if test -n "$CHARSET"; then
+ CHARSET=`echo "$CHARSET" | tr '[A-Z]' '[a-z]' | sed -e 's/^iso-/iso/'`
+- isoinfo -j $CHARSET -i /dev/null 2>&1 | grep "Unknown charset" >/dev/null && CHARSET=
++ isoinfo -j $CHARSET -i /dev/null 2>&1 | @AWK@ "/Iconv not yet supported|Unknown charset/" >/dev/null && CHARSET=
+ fi
+ if test -n "$CHARSET"; then
+ JOLIET_OPT="-j $CHARSET -J"
+@@ -23,7 +23,7 @@ test_iso () {
+ JOLIET_OPT="-J"
+ fi
+ ISOINFO="isoinfo -R"
+- isoinfo -d -i "$1" | grep "NO Joliet" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
++ isoinfo -d -i "$1" | @AWK@ "/UCS level 1|NO Joliet/" > /dev/null || ISOINFO="$ISOINFO $JOLIET_OPT"
+ }
+
+ mcisofs_list () {
Added: trunk/debian/patches/bugs/1496_search_backwards_broken.patch
===================================================================
--- trunk/debian/patches/bugs/1496_search_backwards_broken.patch (rev 0)
+++ trunk/debian/patches/bugs/1496_search_backwards_broken.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,37 @@
+diff --git a/edit/editcmd.c b/edit/editcmd.c
+index f21f0f0..a647fd5 100644
+--- a/edit/editcmd.c
++++ b/edit/editcmd.c
+@@ -1289,11 +1289,12 @@ editcmd_find (WEdit *edit, gsize *len)
+ gsize search_end;
+
+ if (edit->replace_backwards) {
+- search_end = edit->curs1-1;
++ search_end = edit->last_byte;
+ while ((int) search_start >= 0) {
+- if (search_end - search_start > edit->search->original_len && mc_search_is_fixed_search_str(edit->search))
+- search_end = search_start + edit->search->original_len +1;
+- if ( mc_search_run(edit->search, (void *) edit, search_start, search_end, len))
++ if (search_end > search_start + edit->search->original_len && mc_search_is_fixed_search_str(edit->search))
++ search_end = search_start + edit->search->original_len;
++ if ( mc_search_run(edit->search, (void *) edit, search_start, search_end, len)
++ && edit->search->normal_offset == search_start )
+ {
+ return TRUE;
+ }
+diff --git a/src/search/search.h b/src/search/search.h
+index faf7efc..383f82a 100644
+--- a/src/search/search.h
++++ b/src/search/search.h
+@@ -76,9 +76,9 @@ typedef struct mc_search_struct {
+ /* public output data */
+
+ /* some data for normal */
+- gsize normal_offset;
++ off_t normal_offset;
+
+- gsize start_buffer;
++ off_t start_buffer;
+ /* some data for regexp */
+ int num_rezults;
+ mc_search_matchinfo_t *regex_match_info;
Added: trunk/debian/patches/bugs/1499_mcview_backwards_search_broken.patch
===================================================================
--- trunk/debian/patches/bugs/1499_mcview_backwards_search_broken.patch (rev 0)
+++ trunk/debian/patches/bugs/1499_mcview_backwards_search_broken.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,30 @@
+commit 670d11fc73a8ce78c013aed8e9a497b8e750f3a6
+Author: Daniel Borca <dborca at yahoo.com>
+Date: Sat Aug 8 05:31:13 2009 +0000
+
+ Ticket #1499 (mcview: Search backwards is broken)
+
+ fix: src/view.c backward searck is broken
+
+ Signed-off-by: Ilia Maslakov <il.smind at gmail.com>
+
+diff --git a/src/view.c b/src/view.c
+index 266438a..924016e 100644
+--- a/src/view.c
++++ b/src/view.c
+@@ -3146,12 +3146,13 @@ view_find (WView *view, gsize search_start, gsize *len)
+ if (view->search_backwards) {
+ search_end = view_get_filesize (view);
+ while ((int) search_start >= 0) {
+- if (search_end - search_start > view->search->original_len && mc_search_is_fixed_search_str(view->search))
++ if (search_end > search_start + view->search->original_len && mc_search_is_fixed_search_str(view->search))
+ search_end = search_start + view->search->original_len;
+
+ view_read_start (view, &view->search_onechar_info, search_start);
+
+- if ( mc_search_run(view->search, (void *) view, search_start, search_end, len))
++ if ( mc_search_run(view->search, (void *) view, search_start, search_end, len)
++ && view->search->normal_offset == search_start )
+ return TRUE;
+
+ search_start--;
Added: trunk/debian/patches/bugs/1520_eventx_unintialized.patch
===================================================================
--- trunk/debian/patches/bugs/1520_eventx_unintialized.patch (rev 0)
+++ trunk/debian/patches/bugs/1520_eventx_unintialized.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,22 @@
+commit 02132ecaea5999f669b03d091d595b4552e320a0
+Author: dborca <dborca at yahoo.com>
+Date: Wed Aug 12 14:53:23 2009 +0300
+
+ Ticket #1520: Uninitialized event.x in find.c#check_find_events()
+
+ Fixed uninitialised member of structure.
+
+ Signed-off-by: Slava Zanko <slavazanko at gmail.com>
+
+diff --git a/src/find.c b/src/find.c
+index 68c771b..e212813 100644
+--- a/src/find.c
++++ b/src/find.c
+@@ -608,6 +608,7 @@ check_find_events(Dlg_head *h)
+ Gpm_Event event;
+ int c;
+
++ event.x = -1;
+ c = get_event (&event, h->mouse_status == MOU_REPEAT, 0);
+ if (c != EV_NONE) {
+ dlg_process_event (h, c, &event);
Added: trunk/debian/patches/bugs/1521_ctrl-z-doesnt_work.patch
===================================================================
--- trunk/debian/patches/bugs/1521_ctrl-z-doesnt_work.patch (rev 0)
+++ trunk/debian/patches/bugs/1521_ctrl-z-doesnt_work.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,23 @@
+commit 688d80cdb1ebc229a44df85be84b3f89427aec67
+Author: dborca <dborca at yahoo.com>
+Date: Wed Aug 12 14:37:22 2009 +0300
+
+ Ticket #1521: ctrl-z (aka suspend) does not work
+
+ Fix issue:
+ execute.c is missing #include <signal.h> and therefore #ifdef SIGTSTP fails miserably.
+
+ Signed-off-by: Slava Zanko <slavazanko at gmail.com>
+
+diff --git a/src/execute.c b/src/execute.c
+index 2c8bc71..e176593 100644
+--- a/src/execute.c
++++ b/src/execute.c
+@@ -21,6 +21,7 @@
+
+ #include <config.h>
+
++#include <signal.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+
Added: trunk/debian/patches/bugs/1527_fix_heap_corruption_on_large_filenames.patch
===================================================================
--- trunk/debian/patches/bugs/1527_fix_heap_corruption_on_large_filenames.patch (rev 0)
+++ trunk/debian/patches/bugs/1527_fix_heap_corruption_on_large_filenames.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,25 @@
+commit 5f1ad860b74a1117c612886872260ecf6e7ec36e
+Author: Sergei Trofimovich <st at anti-virus.by>
+Date: Wed Aug 12 12:37:32 2009 +0300
+
+ Ticket #1527: heap corruption detected on large filenames
+
+ Fix bug, introduced in 27fbf91c28f68a8fd6c8ebf358588e80e21452d3
+ commit. Really allocate 'dirent + NAME_MAX + 1', instead of
+ sizeof(void*) + NAME_MAX + 1.
+
+ Signed-off-by: Sergei Trofimovich <st at anti-virus.by>
+
+diff --git a/vfs/vfs.c b/vfs/vfs.c
+index d6f7bfc..d42599c 100644
+--- a/vfs/vfs.c
++++ b/vfs/vfs.c
+@@ -789,7 +789,7 @@ mc_readdir (DIR *dirp)
+ * structures, holding dirent size. But we don't use it in libc infrastructure.
+ * TODO: to make simpler homemade dirent-alike structure.
+ */
+- mc_readdir_result = (struct dirent *)malloc(sizeof(struct dirent *) + NAME_MAX + 1);
++ mc_readdir_result = (struct dirent *)malloc(sizeof(struct dirent) + NAME_MAX + 1);
+ }
+
+ if (!dirp) {
Added: trunk/debian/patches/bugs/330_menu_disappeared_on_resize.patch
===================================================================
--- trunk/debian/patches/bugs/330_menu_disappeared_on_resize.patch (rev 0)
+++ trunk/debian/patches/bugs/330_menu_disappeared_on_resize.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,37 @@
+commit 8a1c364ff0291beba2c2c6a1cb827ba167f8407d
+Author: Andrew Borodin <aborodin at vmail.ru>
+Date: Sun Aug 9 19:25:40 2009 +0400
+
+ Ticket #330: show dropped down menu is screen has been resized.
+
+ Now works for both values of "menuBar visible" option.
+
+ Signed-off-by: Andrew Borodin <aborodin at vmail.ru>
+
+diff --git a/src/menu.c b/src/menu.c
+index 5903157..7e4189a 100644
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -391,13 +391,17 @@ menubar_callback (Widget *w, widget_msg_t msg, int parm)
+ }
+
+ case WIDGET_DRAW:
+- if (menubar_visible)
++ if (menubar_visible) {
+ menubar_draw (menubar);
+- else
+- /* try show menu after screen resize */
+- send_message (w, WIDGET_FOCUS, 0);
+- return MSG_HANDLED;
++ return MSG_HANDLED;
++ }
++ /* fall through */
+
++ case WIDGET_RESIZED:
++ /* try show menu after screen resize */
++ send_message (w, WIDGET_FOCUS, 0);
++ return MSG_HANDLED;
++
+ default:
+ return default_proc (msg, parm);
+ }
Added: trunk/debian/patches/bugs/82_save_as_retains_mode.patch
===================================================================
--- trunk/debian/patches/bugs/82_save_as_retains_mode.patch (rev 0)
+++ trunk/debian/patches/bugs/82_save_as_retains_mode.patch 2009-08-12 12:19:29 UTC (rev 240)
@@ -0,0 +1,40 @@
+commit 65771004c4948dd664674e8dee2ddce11786d777
+Author: Sergei Trofimovich <slyfox at inbox.ru>
+Date: Sun Aug 9 19:05:52 2009 +0300
+
+ Ticket #82 (savannah: "save as" retains mode) patch by imdagger
+
+ Consider following scenario:
+ $ touch /tmp/foo_file
+ $ chmod 0444 /tmp/foo_file # readonly for owner
+ $ mcedit /tmp/foo_file
+ > 1. edit
+ > 2. try to save, fail. choose another name: /tmp/foo_file2
+ > 3. edit
+ > 4. try to save, fail again!
+
+ This patch adds owner write permissions for files, created in
+ step 2.
+
+ Signed-off-by: Sergei Trofimovich <slyfox at inbox.ru>
+
+diff --git a/edit/editcmd.c b/edit/editcmd.c
+index e421ac3..f21f0f0 100644
+--- a/edit/editcmd.c
++++ b/edit/editcmd.c
+@@ -497,6 +497,15 @@ edit_save_as_cmd (WEdit *edit)
+ save_lock = edit_lock_file (exp);
+ }
+
++ if (different_filename)
++ {
++ /*
++ * Allow user to write into saved (under another name) file
++ * even if original file had r/o user permissions.
++ */
++ edit->stat1.st_mode |= S_IWRITE;
++ }
++
+ rv = edit_save_file (edit, exp);
+ switch (rv) {
+ case 1:
Modified: trunk/debian/patches/series
===================================================================
--- trunk/debian/patches/series 2009-08-09 13:06:46 UTC (rev 239)
+++ trunk/debian/patches/series 2009-08-12 12:19:29 UTC (rev 240)
@@ -20,6 +20,16 @@
bugs/1461_line_feeds_info_panel.patch
bugs/1462_fix_wrong_path_to_wrapper_script_540238.patch
bugs/fish_no_report_on_failed_delete.patch
+bugs/1478_add_kill_work_shortcut.patch
+bugs/82_save_as_retains_mode.patch
+bugs/1499_mcview_backwards_search_broken.patch
+bugs/1520_eventx_unintialized.patch
+bugs/1457_find_file_broken.patch
+bugs/1485_extfs_doesnt_handle_certain_isos.patch
+bugs/330_menu_disappeared_on_resize.patch
+bugs/1496_search_backwards_broken.patch
+bugs/1527_fix_heap_corruption_on_large_filenames.patch
+bugs/1521_ctrl-z-doesnt_work.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