[Pkg-mc-commits] r65 - in trunk/debian: . patches proposed-patches
winnie at alioth.debian.org
winnie at alioth.debian.org
Tue Feb 26 18:34:07 UTC 2008
Author: winnie
Date: 2008-02-26 18:34:04 +0000 (Tue, 26 Feb 2008)
New Revision: 65
Added:
trunk/debian/proposed-patches/
trunk/debian/proposed-patches/12_main.c.patch
Removed:
trunk/debian/patches/12_main.c.patch
Modified:
trunk/debian/patches/29_mc-28-fix.patch
Log:
Add folder with patches which should be integrated sometimes...
atm the switch to a better utf8 is more important than hostname in the xtermtitle...
this patch has to be rewritten for the new utf8 patch
Deleted: trunk/debian/patches/12_main.c.patch
===================================================================
--- trunk/debian/patches/12_main.c.patch 2008-02-26 18:14:39 UTC (rev 64)
+++ trunk/debian/patches/12_main.c.patch 2008-02-26 18:34:04 UTC (rev 65)
@@ -1,50 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/src/main.c mc-4.6.2~pre1.patched/src/main.c
---- mc-4.6.2~pre1/src/main.c 2006-09-22 17:14:58.000000000 +0200
-+++ mc-4.6.2~pre1/src/main.c 2008-01-25 00:20:36.000000000 +0100
-@@ -1601,21 +1601,43 @@
- }
- }
-
--/* Show current directory in the xterm title */
-+/* Show hostname and current directory in the xterm title */
- void
- update_xterm_title_path (void)
- {
- char *p, *s;
-+ char *pvp;
-+ size_t pvlen;
-+ int pvresult;
-
- if (xterm_flag && xterm_title) {
-+ //current path
- p = s = g_strdup (strip_home_and_password (current_panel->cwd));
-+ // hostname
-+ pvlen = strlen(p);
-+ pvp = g_malloc (pvlen + 64); //approach - max hostname length
-+ pvresult = gethostname(pvp, 63);
-+ if (pvresult) { // print just current path
-+ g_free (pvp);
-+ pvp = p;
-+ } else {
-+ s = pvp;
-+ do { // merge hostname with path
-+ if (!is_printable (*s))
-+ *s = '?';
-+ } while (*++s!=0x00);
-+ *s++=':';
-+ strcpy (s, p);
-+ g_free (p);
-+ }
- do {
- if (!is_printable ((unsigned char) *s))
- *s = '?';
- } while (*++s);
-- fprintf (stdout, "\33]0;mc - %s\7", p);
-+// fprintf (stdout, "\33]0;mc - %s\7", p);
-+ fprintf (stdout, "\33]0;mc - %s\7", pvp);
- fflush (stdout);
-- g_free (p);
-+ g_free (pvp);
- }
- }
-
Modified: trunk/debian/patches/29_mc-28-fix.patch
===================================================================
--- trunk/debian/patches/29_mc-28-fix.patch 2008-02-26 18:14:39 UTC (rev 64)
+++ trunk/debian/patches/29_mc-28-fix.patch 2008-02-26 18:34:04 UTC (rev 65)
@@ -1,7 +1,7 @@
-diff -Nurwd mc-4.6.2~pre1.orig/src/cmd.c mc-4.6.2~pre1/src/cmd.c
---- mc-4.6.2~pre1.orig/src/cmd.c 2008-02-16 12:59:50.000000000 +0100
-+++ mc-4.6.2~pre1/src/cmd.c 2008-02-16 13:00:12.000000000 +0100
-@@ -903,7 +903,7 @@
+diff -rupbBN mc.orig/src/cmd.c mc/src/cmd.c
+--- mc.orig/src/cmd.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/cmd.c 2007-12-07 11:37:51.000000000 +0100
+@@ -903,7 +903,7 @@ do_link (int symbolic_link, const char *
char *dest = NULL, *src = NULL;
if (!symbolic_link) {
@@ -10,7 +10,7 @@
dest = input_expand_dialog (_(" Link "), src, "");
if (!dest || !*dest)
goto cleanup;
-@@ -968,7 +968,7 @@
+@@ -968,7 +968,7 @@ void edit_symlink_cmd (void)
p = selection (current_panel)->fname;
@@ -19,10 +19,10 @@
i = readlink (p, buffer, MC_MAXPATHLEN - 1);
if (i > 0) {
-diff -Nurwd mc-4.6.2~pre1.orig/src/main.c mc-4.6.2~pre1/src/main.c
---- mc-4.6.2~pre1.orig/src/main.c 2008-02-16 12:59:50.000000000 +0100
-+++ mc-4.6.2~pre1/src/main.c 2008-02-16 13:10:40.000000000 +0100
-@@ -705,7 +705,7 @@
+diff -rupbBN mc.orig/src/main.c mc/src/main.c
+--- mc.orig/src/main.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/main.c 2007-12-07 11:37:51.000000000 +0100
+@@ -706,7 +706,7 @@ load_prompt (int fd, void *unused)
int prompt_len;
tmp_prompt = strip_ctrl_codes (subshell_prompt);
@@ -31,39 +31,28 @@
/* Check for prompts too big */
if (COLS > 8 && prompt_len > COLS - 8) {
-@@ -1606,14 +1606,15 @@
+@@ -1607,17 +1607,12 @@ midnight_callback (struct Dlg_head *h, d
void
update_xterm_title_path (void)
{
- char *p, *s;
-+ char *p, *s;
- char *pvp;
- size_t pvlen;
- int pvresult;
++ const char *p;
if (xterm_flag && xterm_title) {
- //current path
- p = s = g_strdup (strip_home_and_password (current_panel->cwd));
-+ p = strip_home_and_password (current_panel->cwd);
-+ fprintf (stdout, "\33]0;mc - %s\7", str_term_form (p));
- // hostname
- pvlen = strlen(p);
- pvp = g_malloc (pvlen + 64); //approach - max hostname length
-@@ -1631,12 +1632,7 @@
- strcpy (s, p);
- g_free (p);
- }
- do {
- if (!is_printable ((unsigned char) *s))
- *s = '?';
- } while (*++s);
--// fprintf (stdout, "\33]0;mc - %s\7", p);
-- fprintf (stdout, "\33]0;mc - %s\7", pvp);
-+ fprintf (stdout, "\33]0;mc - %s\7", str_term_form (pvp));
+- fprintf (stdout, "\33]0;mc - %s\7", p);
++ p = strip_home_and_password (current_panel->cwd);
++ fprintf (stdout, "\33]0;mc - %s\7", str_term_form (p));
fflush (stdout);
- g_free (pvp);
+- g_free (p);
}
-@@ -2077,7 +2073,7 @@
+ }
+
+@@ -2056,7 +2051,7 @@ handle_args (int argc, char *argv[])
if (!STRNCOMP (base, "mce", 3) || !STRCOMP (base, "vi")) {
edit_one_file = "";
if (tmp) {
@@ -72,10 +61,10 @@
int start_line = atoi (tmp);
if (start_line > 0) {
char *file = poptGetArg (ctx);
-diff -Nurwd mc-4.6.2~pre1.orig/src/panelize.c mc-4.6.2~pre1/src/panelize.c
---- mc-4.6.2~pre1.orig/src/panelize.c 2008-02-16 12:59:50.000000000 +0100
-+++ mc-4.6.2~pre1/src/panelize.c 2008-02-16 13:00:12.000000000 +0100
-@@ -42,6 +42,7 @@
+diff -rupbBN mc.orig/src/panelize.c mc/src/panelize.c
+--- mc.orig/src/panelize.c 2007-12-07 11:37:48.000000000 +0100
++++ mc/src/panelize.c 2007-12-07 11:37:51.000000000 +0100
+@@ -43,6 +43,7 @@
#include "panel.h" /* current_panel */
#include "main.h" /* repaint_screen */
#include "panelize.h"
@@ -83,7 +72,7 @@
#define UX 5
#define UY 2
-@@ -127,7 +128,7 @@
+@@ -128,7 +129,7 @@ init_panelize (void)
i = sizeof (panelize_but) / sizeof (panelize_but[0]);
while (i--) {
panelize_but[i].text = _(panelize_but[i].text);
@@ -92,7 +81,7 @@
}
maxlen += 10;
-@@ -136,11 +137,11 @@
+@@ -137,11 +138,11 @@ init_panelize (void)
panelize_cols = max (panelize_cols, maxlen);
panelize_but[2].x =
@@ -107,10 +96,10 @@
#endif /* ENABLE_NLS */
-diff -Nurwd mc-4.6.2~pre1.orig/src/subshell.c mc-4.6.2~pre1/src/subshell.c
---- mc-4.6.2~pre1.orig/src/subshell.c 2008-02-16 12:58:57.000000000 +0100
-+++ mc-4.6.2~pre1/src/subshell.c 2008-02-16 13:00:12.000000000 +0100
-@@ -51,6 +51,7 @@
+diff -rupbBN mc.orig/src/subshell.c mc/src/subshell.c
+--- mc.orig/src/subshell.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/subshell.c 2007-12-07 11:37:51.000000000 +0100
+@@ -52,6 +52,7 @@
#include "cons.saver.h" /* handle_console() */
#include "key.h" /* XCTRL */
#include "subshell.h"
@@ -118,7 +107,7 @@
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-@@ -699,8 +700,10 @@
+@@ -700,8 +701,10 @@ static char *
subshell_name_quote (const char *s)
{
char *ret, *d;
@@ -129,7 +118,7 @@
/* Factor 5 because we need \, 0 and 3 other digits per character. */
d = ret = g_malloc (1 + (5 * strlen (s)) + (sizeof(quote_cmd_start) - 1)
-@@ -723,14 +726,20 @@
+@@ -724,14 +727,20 @@ subshell_name_quote (const char *s)
* sequence of the form \0nnn, where "nnn" is the numeric value of the
* character converted to octal number.
*/
@@ -154,10 +143,10 @@
strcpy (d, quote_cmd_end);
-diff -Nurwd mc-4.6.2~pre1.orig/src/tree.c mc-4.6.2~pre1/src/tree.c
---- mc-4.6.2~pre1.orig/src/tree.c 2008-02-16 12:58:56.000000000 +0100
-+++ mc-4.6.2~pre1/src/tree.c 2008-02-16 13:00:12.000000000 +0100
-@@ -48,6 +48,7 @@
+diff -rupbBN mc.orig/src/tree.c mc/src/tree.c
+--- mc.orig/src/tree.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/tree.c 2007-12-07 11:37:51.000000000 +0100
+@@ -49,6 +49,7 @@
#include "tree.h"
#include "treestore.h"
#include "cmd.h"
@@ -165,7 +154,7 @@
#define tlines(t) (t->is_panel ? t->widget.lines-2 - (show_mini_info ? 2 : 0) : t->widget.lines)
-@@ -175,12 +176,14 @@
+@@ -176,12 +177,14 @@ static void tree_show_mini_info (WTree *
attrset (DLG_FOCUSC (h));
addch (PATH_SEP);
@@ -182,7 +171,7 @@
}
}
-@@ -266,7 +269,7 @@
+@@ -267,7 +270,7 @@ static void show_tree (WTree *tree)
}
/* Show full name */
@@ -191,7 +180,7 @@
} else{
/* Sub level directory */
-@@ -300,8 +303,8 @@
+@@ -301,8 +304,8 @@ static void show_tree (WTree *tree)
/* Show sub-name */
addch (' ');
@@ -202,7 +191,7 @@
}
addch (' ');
-@@ -596,7 +599,7 @@
+@@ -597,7 +600,7 @@ static void tree_copy (WTree *tree, cons
if (!tree->selected_ptr)
return;
g_snprintf (cmd_buf, sizeof(cmd_buf), _("Copy \"%s\" directory to:"),
@@ -211,7 +200,7 @@
dest = input_expand_dialog (_(" Copy "), cmd_buf, default_dest);
if (!dest)
-@@ -639,7 +642,7 @@
+@@ -640,7 +643,7 @@ static void tree_move (WTree *tree, cons
if (!tree->selected_ptr)
return;
g_snprintf (cmd_buf, sizeof (cmd_buf), _("Move \"%s\" directory to:"),
@@ -220,9 +209,9 @@
dest = input_expand_dialog (_(" Move "), cmd_buf, default_dest);
if (!dest)
return;
-diff -Nurwd mc-4.6.2~pre1.orig/src/tty.c mc-4.6.2~pre1/src/tty.c
---- mc-4.6.2~pre1.orig/src/tty.c 2008-02-16 12:58:57.000000000 +0100
-+++ mc-4.6.2~pre1/src/tty.c 2008-02-16 13:00:12.000000000 +0100
+diff -rupbBN mc.orig/src/tty.c mc/src/tty.c
+--- mc.orig/src/tty.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/tty.c 2007-12-07 11:37:51.000000000 +0100
@@ -32,6 +32,7 @@
#include "global.h"
#include "color.h"
@@ -231,7 +220,7 @@
#ifdef USE_NCURSES
#define WANT_TERM_H
-@@ -159,9 +160,9 @@
+@@ -159,9 +160,9 @@ extern void
tty_print_string(const char *s)
{
#ifdef HAVE_SLANG
@@ -243,10 +232,10 @@
#endif
}
-diff -Nurwd mc-4.6.2~pre1.orig/src/user.c mc-4.6.2~pre1/src/user.c
---- mc-4.6.2~pre1.orig/src/user.c 2008-02-16 12:58:56.000000000 +0100
-+++ mc-4.6.2~pre1/src/user.c 2008-02-16 13:00:12.000000000 +0100
-@@ -32,6 +32,7 @@
+diff -rupbBN mc.orig/src/user.c mc/src/user.c
+--- mc.orig/src/user.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/user.c 2007-12-07 11:37:51.000000000 +0100
+@@ -33,6 +33,7 @@
#include "layout.h"
#include "execute.h"
#include "setup.h"
@@ -254,7 +243,7 @@
#include "../edit/edit.h" /* BLOCK_FILE */
#include "../edit/edit-widget.h" /* WEdit */
-@@ -182,7 +183,7 @@
+@@ -183,7 +184,7 @@ expand_format (struct WEdit *edit_widget
if (edit_one_file != NULL)
fname = edit_widget->filename;
else {
@@ -263,7 +252,7 @@
panel = current_panel;
else {
if (get_other_type () != view_listing)
-@@ -197,7 +198,7 @@
+@@ -198,7 +199,7 @@ expand_format (struct WEdit *edit_widget
else
quote_func = fake_name_quote;
@@ -272,7 +261,7 @@
switch (c_lc) {
case 'f':
-@@ -322,16 +323,22 @@
+@@ -323,16 +324,22 @@ check_patterns (char *p)
point after argument. */
static char *extract_arg (char *p, char *arg, int size)
{
@@ -299,7 +288,7 @@
return p;
}
-@@ -408,7 +415,7 @@
+@@ -409,7 +416,7 @@ static char *test_condition (WEdit *edit
case '!':
p = test_condition (edit_widget, p, condition);
*condition = ! *condition;
@@ -308,7 +297,7 @@
break;
case 'f': /* file name pattern */
p = extract_arg (p, arg, sizeof (arg));
-@@ -552,7 +559,7 @@
+@@ -553,7 +560,7 @@ static char *test_line (WEdit *edit_widg
debug_out (NULL, NULL, 1);
if (!*p || *p == '\n')
@@ -317,7 +306,7 @@
return p;
}
-@@ -625,9 +632,9 @@
+@@ -626,9 +633,9 @@ execute_menu_command (WEdit *edit_widget
}
} else if (expand_prefix_found){
expand_prefix_found = 0;
@@ -329,7 +318,7 @@
commands++;
}
if (*commands == '{')
-@@ -744,7 +751,7 @@
+@@ -745,7 +752,7 @@ user_menu_cmd (struct WEdit *edit_widget
/* Parse the menu file */
old_patterns = easy_patterns;
p = check_patterns (data);
@@ -338,7 +327,7 @@
if (menu_lines >= menu_limit){
char ** new_entries;
-@@ -787,7 +794,7 @@
+@@ -788,7 +795,7 @@ user_menu_cmd (struct WEdit *edit_widget
selected = menu_lines;
}
}
@@ -347,10 +336,10 @@
/* A menu entry title line */
if (accept_entry)
entries [menu_lines] = p;
-diff -Nurwd mc-4.6.2~pre1.orig/src/util.c mc-4.6.2~pre1/src/util.c
---- mc-4.6.2~pre1.orig/src/util.c 2008-02-16 12:59:50.000000000 +0100
-+++ mc-4.6.2~pre1/src/util.c 2008-02-16 13:00:12.000000000 +0100
-@@ -228,27 +228,7 @@
+diff -rupbBN mc.orig/src/util.c mc/src/util.c
+--- mc.orig/src/util.c 2007-12-07 11:37:48.000000000 +0100
++++ mc/src/util.c 2007-12-07 16:19:45.000000000 +0100
+@@ -229,27 +229,7 @@ fake_name_quote (const char *s, int quot
const char *
name_trunc (const char *txt, int trunc_len)
{
@@ -379,7 +368,7 @@
}
/*
-@@ -258,12 +238,9 @@
+@@ -259,12 +239,9 @@ name_trunc (const char *txt, int trunc_l
*/
const char *
path_trunc (const char *path, int trunc_len) {
@@ -393,7 +382,7 @@
return ret;
}
-@@ -809,7 +786,7 @@
+@@ -810,7 +787,7 @@ _icase_search (const char *text, const c
e += 2;
dlng += 2;
}
@@ -402,7 +391,7 @@
d++;
else {
e -= d - text;
-@@ -855,19 +832,23 @@
+@@ -856,19 +833,23 @@ unix_error_string (int error_num)
const char *
skip_separators (const char *s)
{
@@ -434,7 +423,7 @@
}
/* Remove all control sequences from the argument string. We define
-@@ -888,6 +869,7 @@
+@@ -889,6 +870,7 @@ strip_ctrl_codes (char *s)
{
char *w; /* Current position where the stripped data is written */
char *r; /* Current position where the original data is read */
@@ -442,7 +431,7 @@
if (!s)
return 0;
-@@ -909,9 +891,12 @@
+@@ -910,9 +892,12 @@ strip_ctrl_codes (char *s)
continue;
}
@@ -458,7 +447,7 @@
}
*w = 0;
return s;
-@@ -1472,21 +1457,10 @@
+@@ -1473,21 +1458,10 @@ save_file_position (const char *filename
extern const char *
cstrcasestr (const char *haystack, const char *needle)
{
@@ -484,10 +473,10 @@
}
const char *
-diff -Nurwd mc-4.6.2~pre1.orig/src/win.c mc-4.6.2~pre1/src/win.c
---- mc-4.6.2~pre1.orig/src/win.c 2008-02-16 12:58:56.000000000 +0100
-+++ mc-4.6.2~pre1/src/win.c 2008-02-16 13:00:12.000000000 +0100
-@@ -33,6 +33,7 @@
+diff -rupbBN mc.orig/src/win.c mc/src/win.c
+--- mc.orig/src/win.c 2007-12-07 11:37:49.000000000 +0100
++++ mc/src/win.c 2007-12-07 11:37:51.000000000 +0100
+@@ -34,6 +34,7 @@
#include "win.h"
#include "key.h" /* XCTRL and ALT macros */
#include "layout.h"
@@ -495,7 +484,7 @@
/*
* Common handler for standard movement keys in a text area. Provided
-@@ -216,7 +217,7 @@
+@@ -217,7 +218,7 @@ int lookup_key (char *keyname)
int i;
for (i = 0; key_name_conv_tab [i].code; i++){
Copied: trunk/debian/proposed-patches/12_main.c.patch (from rev 60, trunk/debian/patches/12_main.c.patch)
===================================================================
--- trunk/debian/proposed-patches/12_main.c.patch (rev 0)
+++ trunk/debian/proposed-patches/12_main.c.patch 2008-02-26 18:34:04 UTC (rev 65)
@@ -0,0 +1,50 @@
+diff -Nurwd mc-4.6.2~pre1/src/main.c mc-4.6.2~pre1.patched/src/main.c
+--- mc-4.6.2~pre1/src/main.c 2006-09-22 17:14:58.000000000 +0200
++++ mc-4.6.2~pre1/src/main.c 2008-01-25 00:20:36.000000000 +0100
+@@ -1601,21 +1601,43 @@
+ }
+ }
+
+-/* Show current directory in the xterm title */
++/* Show hostname and current directory in the xterm title */
+ void
+ update_xterm_title_path (void)
+ {
+ char *p, *s;
++ char *pvp;
++ size_t pvlen;
++ int pvresult;
+
+ if (xterm_flag && xterm_title) {
++ //current path
+ p = s = g_strdup (strip_home_and_password (current_panel->cwd));
++ // hostname
++ pvlen = strlen(p);
++ pvp = g_malloc (pvlen + 64); //approach - max hostname length
++ pvresult = gethostname(pvp, 63);
++ if (pvresult) { // print just current path
++ g_free (pvp);
++ pvp = p;
++ } else {
++ s = pvp;
++ do { // merge hostname with path
++ if (!is_printable (*s))
++ *s = '?';
++ } while (*++s!=0x00);
++ *s++=':';
++ strcpy (s, p);
++ g_free (p);
++ }
+ do {
+ if (!is_printable ((unsigned char) *s))
+ *s = '?';
+ } while (*++s);
+- fprintf (stdout, "\33]0;mc - %s\7", p);
++// fprintf (stdout, "\33]0;mc - %s\7", p);
++ fprintf (stdout, "\33]0;mc - %s\7", pvp);
+ fflush (stdout);
+- g_free (p);
++ g_free (pvp);
+ }
+ }
+
More information about the Pkg-mc-commits
mailing list