OBS User unknown 2009-02-26 17:05:25 +00:00 committed by Git OBS Bridge
parent 06476b29bc
commit 6f5761eaf6
4 changed files with 120 additions and 8 deletions

View File

@ -0,0 +1,55 @@
http://www.midnight-commander.org/ticket/287
Index: mc-4.6.2/src/key.c
===================================================================
--- mc-4.6.2.orig/src/key.c 2009-02-01 19:30:21.000000000 +0000
+++ mc-4.6.2/src/key.c 2009-02-25 20:16:46.000000000 +0000
@@ -694,6 +694,8 @@
/* F0 is the same as F10 for out purposes */
if (c == KEY_F (0))
c = KEY_F (10);
+ if (c == KEY_F_IMMUTABLE (0))
+ c = KEY_F_IMMUTABLE (10);
/*
* We are not interested if Ctrl was pressed when entering control
@@ -765,6 +767,16 @@
mod &= ~KEY_M_SHIFT;
}
+ /*
+ * Numerals may require modifilers with some keymaps or on obscure
+ * keyboards (e. g. F4 = Esc Shift+4). We have to ignore all
+ * modifiers while interpreting Esc + Numeral.
+ */
+ if (c >= KEY_F_IMMUTABLE (1) && c <= KEY_F_IMMUTABLE (10)) {
+ c += KEY_F (0) - KEY_F_IMMUTABLE (0);
+ mod &= ~KEY_M_MASK;
+ }
+
if (!alternate_plus_minus)
switch (c) {
case KEY_KP_ADD:
@@ -917,10 +929,9 @@
this = this->next;
else {
if (parent != NULL && parent->action == MCKEY_ESCAPE) {
-
/* Convert escape-digits to F-keys */
if (isdigit(c))
- c = KEY_F (c - '0');
+ c = KEY_F_IMMUTABLE (c - '0');
else if (c == ' ')
c = ESC_CHAR;
else
Index: mc-4.6.2/src/myslang.h
===================================================================
--- mc-4.6.2.orig/src/myslang.h 2009-02-25 18:25:29.000000000 +0000
+++ mc-4.6.2/src/myslang.h 2009-02-25 18:25:31.000000000 +0000
@@ -29,6 +29,7 @@
};
#define KEY_F(x) (1000+x)
+#define KEY_F_IMMUTABLE(x) (970+x)
#define ACS_VLINE SLSMG_VLINE_CHAR
#define ACS_HLINE SLSMG_HLINE_CHAR

View File

@ -0,0 +1,20 @@
--- mc-4.6.2/slang/slcommon.c
+++ mc-4.6.2/slang/slcommon.c
@@ -31,7 +31,7 @@
# include <locale.h>
#endif
-#ifdef HAVE_LANGINFO_H
+#ifdef HAVE_LANGINFO_CODESET
# include <langinfo.h>
#endif
@@ -87,7 +87,7 @@
(void) setlocale (LC_ALL, "");
-#ifdef HAVE_NL_LANGINFO_CODESET
+#ifdef HAVE_LANGINFO_CODESET
locale = nl_langinfo (CODESET);
if ((locale != NULL) && (*locale))
{

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Wed Feb 25 16:45:41 CET 2009 - sbrabec@suse.cz
- Fixed Esc + Numeral F-key emulation (mc#287).
- Convert Serbian files to UTF-8.
- UTF-8 conversion moved to %prep.
- Locale specific files moved to -lang package.
-------------------------------------------------------------------
Thu Feb 12 14:42:05 CET 2009 - nadvornik@suse.cz

45
mc.spec
View File

@ -26,7 +26,7 @@ Group: Productivity/File utilities
PreReq: permissions
AutoReqProv: on
Version: 4.6.2
Release: 1
Release: 2
Summary: Midnight Commander
Source: mc-4.6.2.tar.bz2
Source1: x11_browser
@ -62,6 +62,10 @@ Patch33: 09_choose_correct_urar.patch
#other debian fixes
Patch38: 99b_fix-regex-pattern-lengths.patch
Patch40: 99_regexp-replace-fixed.patch
# PATCH-FIX-UPSTREAM mc-multi-press-f-keys.patch mc287 sbrabec@suse.cz - Fixed Esc + Numeral F-key emulation.
Patch41: mc-multi-press-f-keys.patch
# PATCH-FIX-OPENSUSE mc-utf8-slang-codeset.patch sbrabec@suse.cz - Guess UTF-8 locale from codeset, not from locale variables (not needed for openSUSE, valuable for upstream).
Patch42: mc-utf8-slang-codeset.patch
#
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Url: http://www.ibiblio.org/mc/
@ -153,8 +157,8 @@ Authors:
%patch33 -p1
%patch38 -p1
%patch40 -p1
%build
%patch41 -p1
%patch42 -p1
pushd po
rename no nb no.*
popd
@ -166,9 +170,11 @@ iconv -f iso8859-1 -t utf-8 -o mc.hint.nl.tmp mc.hint.nl && mv mc.hint.nl.tmp mc
iconv -f iso8859-2 -t utf-8 -o mc.hint.cs.tmp mc.hint.cs && mv mc.hint.cs.tmp mc.hint.cs
iconv -f iso8859-2 -t utf-8 -o mc.hint.hu.tmp mc.hint.hu && mv mc.hint.hu.tmp mc.hint.hu
iconv -f iso8859-2 -t utf-8 -o mc.hint.pl.tmp mc.hint.pl && mv mc.hint.pl.tmp mc.hint.pl
iconv -f iso8859-5 -t utf-8 -o mc.hint.sr.tmp mc.hint.sr && mv mc.hint.sr.tmp mc.hint.sr
iconv -f koi8-r -t utf8 -o mc.hint.ru.tmp mc.hint.ru && mv mc.hint.ru.tmp mc.hint.ru
iconv -f koi8-u -t utf8 -o mc.hint.uk.tmp mc.hint.uk && mv mc.hint.uk.tmp mc.hint.uk
iconv -f big5 -t utf8 -o mc.hint.zh.tmp mc.hint.zh && mv mc.hint.zh.tmp mc.hint.zh
iconv -f iso8859-5 -t utf-8 -o mc.menu.sr.tmp mc.menu.sr && mv mc.menu.sr.tmp mc.menu.sr
popd
# convert docs to utf-8
pushd doc
@ -192,7 +198,14 @@ pushd ru
iconv -f koi8-r -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f koi8-r -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
popd
pushd sr
iconv -f iso8859-5 -t utf-8 -o mc.1.in.tmp mc.1.in && mv mc.1.in.tmp mc.1.in
iconv -f iso8859-5 -t utf-8 -o xnc.hlp.tmp xnc.hlp && mv xnc.hlp.tmp xnc.hlp
iconv -f iso8859-5 -t utf-8 -o mcserv.8.in.tmp mcserv.8.in && mv mcserv.8.in.tmp mcserv.8.in
popd
popd
%build
autoreconf --force --install
%define warn_flags -W -Wall -Wstrict-prototypes -Wpointer-arith -Wformat-security -Wno-unused-parameter
export CFLAGS="$RPM_OPT_FLAGS %{warn_flags}"
@ -240,19 +253,35 @@ rm -rf %{buildroot}
%verify(not mode) %{_prefix}/%{_lib}/mc/cons.saver
%{_mandir}/man1/*
#%{_mandir}/man3/*
%{_datadir}/mc
%exclude %{_datadir}/mc/mc.hint.*
%exclude %{_datadir}/mc/mc.hlp.*
%exclude %{_datadir}/mc/mc.menu.*
/usr/share/applications/%name.desktop
/usr/share/pixmaps/%name.png
%files lang -f %{name}.lang
%defattr(-, root, root)
%lang(es) %doc %{_mandir}/es
%lang(hu) %doc %{_mandir}/hu
%lang(it) %doc %{_mandir}/it
%lang(pl) %doc %{_mandir}/pl
%lang(ru) %doc %{_mandir}/ru
%lang(sr) %doc %{_mandir}/sr
%{_datadir}/mc
/usr/share/applications/%name.desktop
/usr/share/pixmaps/%name.png
%files lang -f %{name}.lang
%lang(cs) %doc %{_datadir}/mc/mc.*.cs
%lang(es) %doc %{_datadir}/mc/mc.*.es
%lang(hu) %doc %{_datadir}/mc/mc.*.hu
%lang(it) %doc %{_datadir}/mc/mc.*.it
%lang(nl) %doc %{_datadir}/mc/mc.*.nl
%lang(pl) %doc %{_datadir}/mc/mc.*.pl
%lang(sr) %doc %{_datadir}/mc/mc.*.sr
%changelog
* Wed Feb 25 2009 sbrabec@suse.cz
- Fixed Esc + Numeral F-key emulation (mc#287).
- Convert Serbian files to UTF-8.
- UTF-8 conversion moved to %%prep.
- Locale specific files moved to -lang package.
* Thu Feb 12 2009 nadvornik@suse.cz
- updated to final 4.6.2:
* many patches mentioned bellow were included upstream