rpms/mc/devel .cvsignore, 1.34, 1.35 mc-utf8.patch, 1.26, 1.27 mc.spec, 1.130, 1.131 sources, 1.42, 1.43

Jindrich Novy (jnovy) fedora-extras-commits at redhat.com
Mon Feb 25 15:01:55 UTC 2008


Author: jnovy

Update of /cvs/extras/rpms/mc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29318

Modified Files:
	.cvsignore mc-utf8.patch mc.spec sources 
Log Message:
* Mon Feb 25 2008 Jindrich Novy <jnovy at redhat.com> 4.6.2-1.pre1
- update to 4.6.2-pre1
- forwardport the UTF-8 patch to 4.6.2-pre1 and convert new
  functionality to support UTF-8



Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/mc/devel/.cvsignore,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- .cvsignore	12 Jun 2007 14:49:42 -0000	1.34
+++ .cvsignore	25 Feb 2008 15:01:14 -0000	1.35
@@ -9,3 +9,4 @@
 mc-2007-01-22-13.tar.gz
 mc-2007-01-24-03.tar.gz
 mc-2007-06-04-22.tar.gz
+mc-4.6.2-pre1.tar.gz

mc-utf8.patch:

View full diff with command:
/usr/bin/cvs -f diff  -kk -u -N -r 1.26 -r 1.27 mc-utf8.patch
Index: mc-utf8.patch
===================================================================
RCS file: /cvs/extras/rpms/mc/devel/mc-utf8.patch,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- mc-utf8.patch	12 Jun 2007 14:49:42 -0000	1.26
+++ mc-utf8.patch	25 Feb 2008 15:01:14 -0000	1.27
@@ -1,1117 +1,884 @@
---- mc/acinclude.m4.utf8	2006-09-09 00:35:29.000000000 +0200
-+++ mc/acinclude.m4	2007-01-04 16:20:56.000000000 +0100
-@@ -399,14 +399,14 @@ AC_DEFUN([MC_WITH_SLANG], [
-     fi
+diff -up mc-4.6.2-pre1/src/filegui.c.utf8 mc-4.6.2-pre1/src/filegui.c
+--- mc-4.6.2-pre1/src/filegui.c.utf8	2007-08-23 15:16:39.000000000 +0200
++++ mc-4.6.2-pre1/src/filegui.c	2008-02-25 14:56:22.000000000 +0100
+@@ -65,6 +65,7 @@
+ #include "filegui.h"
+ #include "key.h"		/* get_event */
+ #include "util.h"               /* strip_password() */
++#include "tty.h"
  
-     dnl Unless external S-Lang was requested, reject S-Lang with UTF-8 hacks
--    if test x$with_screen = xslang; then
--	:
--	m4_if([$1], strict, ,
--	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
--	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
--it's not fully supported yet])
--	      with_screen=mcslang])])
--    fi
-+dnl    if test x$with_screen = xslang; then
-+dnl	:
-+dnl	m4_if([$1], strict, ,
-+dnl	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
-+dnl	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
-+dnl it's not fully supported yet])
-+dnl	      with_screen=mcslang])])
-+dnl    fi
+ /* }}} */
  
-     if test x$with_screen = xslang; then
- 	AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
---- mc/src/layout.c.utf8	2006-11-10 01:22:30.000000000 +0100
-+++ mc/src/layout.c	2007-01-04 16:20:56.000000000 +0100
-@@ -366,36 +366,36 @@ init_layout (void)
+@@ -563,8 +564,8 @@ init_replace (FileOpContext *ctx, enum O
+ 	 * longest of "Overwrite..." labels 
+ 	 * (assume "Target date..." are short enough)
+ 	 */
+-	l1 = max (strlen (rd_widgets[6].text),
+-		  strlen (rd_widgets[11].text));
++	l1 = max (mbstrlen (rd_widgets[6].text),
++		  mbstrlen (rd_widgets[11].text));
  
- 	while (i--) {
- 	    s_split_direction[i] = _(s_split_direction[i]);
--	    l1 = strlen (s_split_direction[i]) + 7;
-+	    l1 = mbstrlen (s_split_direction[i]) + 7;
- 	    if (l1 > first_width)
- 		first_width = l1;
+ 	/* longest of button rows */
+ 	i = sizeof (rd_widgets) / sizeof (rd_widgets[0]);
+@@ -575,7 +576,7 @@ init_replace (FileOpContext *ctx, enum O
+ 		    l2 = max (l2, l);
+ 		    l = 0;
+ 		}
+-		l += strlen (rd_widgets[i].text) + 4;
++		l += mbstrlen (rd_widgets[i].text) + 4;
+ 	    }
  	}
- 
- 	for (i = 0; i <= 8; i++) {
- 	    check_options[i].text = _(check_options[i].text);
--	    l1 = strlen (check_options[i].text) + 7;
-+	    l1 = mbstrlen (check_options[i].text) + 7;
- 	    if (l1 > first_width)
- 		first_width = l1;
+ 	l2 = max (l2, l);	/* last row */
+@@ -593,12 +594,12 @@ init_replace (FileOpContext *ctx, enum O
+ 		    l = l1;
+ 		}
+ 		rd_widgets[i].xpos = l;
+-		l += strlen (rd_widgets[i].text) + 4;
++		l += mbstrlen (rd_widgets[i].text) + 4;
+ 	    }
  	}
+ 	/* Abort button is centered */
+ 	rd_widgets[1].xpos =
+-	    (rd_xlen - strlen (rd_widgets[1].text) - 3) / 2;
++	    (rd_xlen - mbstrlen (rd_widgets[1].text) - 3) / 2;
+     }
+ #endif				/* ENABLE_NLS */
  
--	l1 = strlen (title1) + 1;
-+	l1 = mbstrlen (title1) + 1;
- 	if (l1 > first_width)
- 	    first_width = l1;
- 
--	l1 = strlen (title2) + 1;
-+	l1 = mbstrlen (title2) + 1;
- 	if (l1 > first_width)
- 	    first_width = l1;
- 
+@@ -617,7 +618,7 @@ init_replace (FileOpContext *ctx, enum O
  
--	second_width = strlen (title3) + 1;
-+	second_width = mbstrlen (title3) + 1;
- 	for (i = 0; i < 6; i++) {
- 	    check_options[i].text = _(check_options[i].text);
--	    l1 = strlen (check_options[i].text) + 7;
-+	    l1 = mbstrlen (check_options[i].text) + 7;
- 	    if (l1 > second_width)
- 		second_width = l1;
- 	}
- 	if (console_flag) {
--	    l1 = strlen (output_lines_label) + 13;
-+	    l1 = mbstrlen (output_lines_label) + 13;
- 	    if (l1 > second_width)
- 		second_width = l1;
- 	}
-@@ -409,14 +409,14 @@ init_layout (void)
- 	 *
- 	 * Now the last thing to do - properly space buttons...
- 	 */
--	l1 = 11 + strlen (ok_button)	/* 14 - all brackets and inner space */
--	    +strlen (save_button)	/* notice: it is 3 char less because */
--	    +strlen (cancel_button);	/* of '&' char in button text */
-+	l1 = 11 + mbstrlen (ok_button)	/* 14 - all brackets and inner space */
-+	    +mbstrlen (save_button)	/* notice: it is 3 char less because */
-+	    +mbstrlen (cancel_button);	/* of '&' char in button text */
+     ADD_RD_LABEL (ui, 0,
+ 		  name_trunc (ui->replace_filename,
+-			      rd_trunc - strlen (rd_widgets[0].text)), 0);
++			      rd_trunc - mbstrlen (rd_widgets[0].text)), 0);
+     ADD_RD_BUTTON (1);
  
- 	i = (first_width + second_width - l1) / 4;
- 	b1 = 5 + i;
--	b2 = b1 + strlen (ok_button) + i + 6;
--	b3 = b2 + strlen (save_button) + i + 4;
-+	b2 = b1 + mbstrlen (ok_button) + i + 6;
-+	b3 = b2 + mbstrlen (save_button) + i + 4;
+     ADD_RD_BUTTON (2);
+@@ -804,36 +805,36 @@ fmd_init_i18n (int force)
+ 	if (fmd_widgets[i].text[0] != '\0')
+ 	    fmd_widgets[i].text = _(fmd_widgets[i].text);
  
- 	i18n_layt_flag = 1;
-     }
-@@ -684,7 +684,7 @@ setup_panels (void)
-     panel_do_cols (0);
-     panel_do_cols (1);
+-    len = strlen (fmd_widgets[FMCB11].text)
+-	+ strlen (fmd_widgets[FMCB21].text) + 15;
++    len = mbstrlen (fmd_widgets[FMCB11].text)
++	+ mbstrlen (fmd_widgets[FMCB21].text) + 15;
+     fmd_xlen = max (fmd_xlen, len);
  
--    promptl = strlen (prompt);
-+    promptl = mbstrlen (prompt);
+-    len = strlen (fmd_widgets[FMCB12].text)
+-	+ strlen (fmd_widgets[FMCB22].text) + 15;
++    len = mbstrlen (fmd_widgets[FMCB12].text)
++	+ mbstrlen (fmd_widgets[FMCB22].text) + 15;
+     fmd_xlen = max (fmd_xlen, len);
  
-     widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
+-    len = strlen (fmd_widgets[FMBRGT].text)
+-	+ strlen (fmd_widgets[FMBLFT].text) + 11;
++    len = mbstrlen (fmd_widgets[FMBRGT].text)
++	+ mbstrlen (fmd_widgets[FMBLFT].text) + 11;
  
---- mc/src/tty.c.utf8	2006-05-23 16:20:39.000000000 +0200
-+++ mc/src/tty.c	2007-01-04 16:20:56.000000000 +0100
-@@ -134,10 +134,12 @@ tty_print_char(int c)
-      * defined or not. Congratulations! At least, they left the API call
-      * for SLsmg_write_nchars as it has always been.
-      */
--    char ch;
--
--    ch = c;
--    SLsmg_write_nchars(&ch, 1);
-+     
-+    /* The above comment is a nonsense, SLsmg_write_char(c) works pretty
-+     * good for me. So please don't mess with Red Hat people.
-+     * 					Jindrich Novy (jnovy at redhat.com)
-+     */
-+    SLsmg_write_char(c);
- #else
-     addch(c);
+ #ifdef FMBMID
+-    len += strlen (fmd_widgets[FMBMID].text) + 6;
++    len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
  #endif
---- mc/src/option.c.utf8	2006-02-28 18:44:28.000000000 +0100
-+++ mc/src/option.c	2007-01-04 16:20:56.000000000 +0100
-@@ -123,12 +123,12 @@ init_configure (void)
- 	title2 = _(" Pause after run... ");
- 	title3 = _(" Other options ");
[...8707 lines suppressed...]
++	if (edit->charpoint >= MB_CUR_MAX) edit->charpoint = 0;
++
++	edit->charbuf[edit->charpoint++] = c;
++
++	res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs);
++	if (res < 0) {
++	    if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */
++    	    return 0;
++        }
++	edit->charpoint = 0;
++
++	if (iswprint (wc)) {
++	    char_for_insertion = wc;
++#else 
+ 	if (is_printable (c)) {
+ 	    char_for_insertion = c;
++#endif /* UTF8 */
+ 	    goto fin;
  	}
- 	if (count++)
- 	    edit->force |= REDRAW_PAGE;		/* more than one pop usually means something big */
      }
+@@ -283,7 +304,7 @@ edit_translate_key (WEdit *edit, long x_
+     *cmd = command;
+     *ch = char_for_insertion;
  
--    if (edit->start_display > ac - KEY_PRESS) {
--	edit->start_line -= edit_count_lines (edit, ac - KEY_PRESS, edit->start_display);
-+    if (edit->start_display > ac.flags - KEY_PRESS) {
-+	edit->start_line -= edit_count_lines (edit, ac.flags - KEY_PRESS, edit->start_display);
- 	edit->force |= REDRAW_PAGE;
--    } else if (edit->start_display < ac - KEY_PRESS) {
--	edit->start_line += edit_count_lines (edit, edit->start_display, ac - KEY_PRESS);
-+    } else if (edit->start_display < ac.flags - KEY_PRESS) {
-+	edit->start_line += edit_count_lines (edit, edit->start_display, ac.flags - KEY_PRESS);
- 	edit->force |= REDRAW_PAGE;
+-    if (command == CK_Insert_Char && char_for_insertion == -1) {
++    if (command == CK_Insert_Char && char_for_insertion == (mc_wint_t)-1) {
+ 	/* unchanged, key has no function here */
+ 	return 0;
      }
--    edit->start_display = ac - KEY_PRESS;	/* see push and pop above */
-+    edit->start_display = ac.flags - KEY_PRESS;	/* see push and pop above */
-     edit_update_curs_row (edit);
- 
-   done_undo:;
-@@ -2102,7 +2226,7 @@ static void edit_goto_matching_bracket (
-  * passed as -1.  Commands are executed, and char_for_insertion is
-  * inserted at the cursor.
-  */
--void edit_execute_key_command (WEdit *edit, int command, int char_for_insertion)
-+void edit_execute_key_command (WEdit *edit, int command, mc_wint_t char_for_insertion)
- {
-     if (command == CK_Begin_Record_Macro) {
- 	edit->macro_i = 0;
-@@ -2137,7 +2261,7 @@ static const char * const shell_cmd[] = 
-    all of them. It also does not check for the Undo command.
-  */
- void
--edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
-+edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion)
- {
-     edit->force |= REDRAW_LINE;
+diff -up mc-4.6.2-pre1/acinclude.m4.utf8 mc-4.6.2-pre1/acinclude.m4
+--- mc-4.6.2-pre1/acinclude.m4.utf8	2006-09-07 17:59:51.000000000 +0200
++++ mc-4.6.2-pre1/acinclude.m4	2008-02-25 14:56:22.000000000 +0100
+@@ -399,14 +399,14 @@ AC_DEFUN([MC_WITH_SLANG], [
+     fi
  
-@@ -2170,7 +2294,7 @@ edit_execute_cmd (WEdit *edit, int comma
-     }
+     dnl Unless external S-Lang was requested, reject S-Lang with UTF-8 hacks
+-    if test x$with_screen = xslang; then
+-	:
+-	m4_if([$1], strict, ,
+-	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
+-	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
+-it's not fully supported yet])
+-	      with_screen=mcslang])])
+-    fi
++dnl    if test x$with_screen = xslang; then
++dnl	:
++dnl	m4_if([$1], strict, ,
++dnl	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
++dnl	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
++dnl it's not fully supported yet])
++dnl	      with_screen=mcslang])])
++dnl    fi
  
-     /* An ordinary key press */
--    if (char_for_insertion >= 0) {
-+    if (char_for_insertion != (mc_wint_t) -1) {
- 	if (edit->overwrite) {
- 	    if (edit_get_byte (edit, edit->curs1) != '\n')
- 		edit_delete (edit);
---- mc/edit/edit.c.jn	2007-04-16 18:14:22.000000000 +0200
-+++ mc/edit/edit.c	2007-04-16 18:26:25.000000000 +0200
-@@ -1526,7 +1526,11 @@
-     f = edit_eol (edit, offset) - 1;
-     while (s <= f) {
- 	c = edit_get_byte (edit, s++);
-+#ifndef UTF8
- 	if (!isspace (c))
-+#else
-+	if (!iswspace (c))
-+#endif /* UTF8 */
- 	    return 0;
-     }
-     return 1;
-@@ -1781,6 +1785,7 @@
- 	    return 2;
- 	return 0x80000000UL;
-     }
-+#ifndef UTF8
-     if (isupper (c))
- 	c = 'A';
-     else if (islower (c))
-@@ -1791,6 +1796,18 @@
- 	c = '0';
-     else if (isspace (c))
- 	c = ' ';
-+#else
-+    if (iswupper (c))
-+	c = 'A';
-+    else if (iswlower (c))
-+	c = 'a';
-+    else if (iswalpha (c))
-+	c = 'a';
-+    else if (iswdigit (c))
-+	c = '0';
-+    else if (iswspace (c))
-+	c = ' ';
-+#endif /* UTF8 */
-     q = strchr (option_chars_move_whole_word, c);
-     if (!q)
- 	return 0xFFFFFFFFUL;
-@@ -1815,10 +1832,18 @@
- 	c2 = edit_get_byte (edit, edit->curs1);
- 	if (!(my_type_of (c1) & my_type_of (c2)))
- 	    break;
-+#ifndef UTF8
- 	if (isspace (c1) && !isspace (c2))
-+#else
-+	if (iswspace (c1) && !iswspace (c2))
-+#endif /* UTF8 */
- 	    break;
- 	if (s)
-+#ifndef UTF8
- 	    if (!isspace (c1) && isspace (c2))
-+#else
-+	    if (!iswspace (c1) && iswspace (c2))
-+#endif /* UTF8 */
- 		break;
-     }
- }
-@@ -1841,10 +1866,18 @@
- 	c2 = edit_get_byte (edit, edit->curs1);
- 	if (!(my_type_of (c1) & my_type_of (c2)))
- 	    break;
-+#ifndef UTF8
- 	if (isspace (c1) && !isspace (c2))
-+#else
-+	if (iswspace (c1) && !iswspace (c2))
-+#endif /* UTF8 */
- 	    break;
- 	if (s)
-+#ifndef UTF8
- 	    if (!isspace (c1) && isspace (c2))
-+#else
-+	    if (!iswspace (c1) && iswspace (c2))
-+#endif /* UTF8 */
- 		break;
-     }
- }
-@@ -1864,7 +1897,11 @@
- 	    break;
- 	c1 = edit_delete (edit);
- 	c2 = edit_get_byte (edit, edit->curs1);
-+#ifndef UTF8
- 	if ((isspace (c1) == 0) != (isspace (c2) == 0))
-+#else
-+	if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
-+#endif /* UTF8 */
- 	    break;
- 	if (!(my_type_of (c1) & my_type_of (c2)))
- 	    break;
-@@ -1879,7 +1916,11 @@
- 	    break;
- 	c1 = edit_backspace (edit);
- 	c2 = edit_get_byte (edit, edit->curs1 - 1);
-+#ifndef UTF8
- 	if ((isspace (c1) == 0) != (isspace (c2) == 0))
-+#else
-+	if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
-+#endif /* UTF8 */
- 	    break;
- 	if (!(my_type_of (c1) & my_type_of (c2)))
- 	    break;
+     if test x$with_screen = xslang; then
+ 	AC_DEFINE(HAVE_SYSTEM_SLANG, 1,


Index: mc.spec
===================================================================
RCS file: /cvs/extras/rpms/mc/devel/mc.spec,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- mc.spec	19 Feb 2008 06:51:09 -0000	1.130
+++ mc.spec	25 Feb 2008 15:01:14 -0000	1.131
@@ -1,13 +1,11 @@
-%define date 2007-06-04-22
-
 Summary:	User-friendly text console file manager and visual shell
 Name:		mc
-Version:	4.6.1a
-Release:	52.20070604cvs%{?dist}
+Version:	4.6.2
+Release:	1.pre1%{?dist}
 Epoch:		1
 License:	GPLv2
 Group:		System Environment/Shells
-Source0:	http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/snapshots/mc-%{date}.tar.gz
+Source0:	http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/snapshots/mc-%{version}-pre1.tar.gz
 URL:		http://www.ibiblio.org/mc/
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires:	glib2-devel e2fsprogs-devel slang-devel
@@ -40,8 +38,7 @@
 specific files.
 
 %prep
-%setup -q -n %{name}-%{date}
-
+%setup -q -n %{name}-%{version}-pre1
 %patch0 -p1 -b .utf8
 %patch1 -p1 -b .extensions
 %patch2 -p1 -b .userhost
@@ -198,6 +195,11 @@
 %dir %{_libexecdir}/mc
 
 %changelog
+* Mon Feb 25 2008 Jindrich Novy <jnovy at redhat.com> 4.6.2-1.pre1
+- update to 4.6.2-pre1
+- forwardport the UTF-8 patch to 4.6.2-pre1 and convert new
+  functionality to support UTF-8
+
 * Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 1:4.6.1a-52.20070604cvs
 - Autorebuild for GCC 4.3
 


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/mc/devel/sources,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- sources	12 Jun 2007 14:49:42 -0000	1.42
+++ sources	25 Feb 2008 15:01:14 -0000	1.43
@@ -1 +1,2 @@
 f5b70d9409ac7885c50cdf388b15721e  mc-2007-06-04-22.tar.gz
+7626c446f016b09fd1210f00b9d0c292  mc-4.6.2-pre1.tar.gz




More information about the fedora-extras-commits mailing list