SOURCES: mc-slang2.patch (NEW) - slang2 support for mc
arekm
arekm at pld-linux.org
Mon Sep 19 22:44:38 CEST 2005
Author: arekm Date: Mon Sep 19 20:44:38 2005 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- slang2 support for mc
---- Files affected:
SOURCES:
mc-slang2.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/mc-slang2.patch
diff -u /dev/null SOURCES/mc-slang2.patch:1.1
--- /dev/null Mon Sep 19 22:44:38 2005
+++ SOURCES/mc-slang2.patch Mon Sep 19 22:44:33 2005
@@ -0,0 +1,62 @@
+diff -urbB mc-4.6.1.org/src/global.h mc-4.6.1/src/global.h
+--- mc-4.6.1.org/src/global.h 2005-09-19 22:32:27.799047000 +0200
++++ mc-4.6.1/src/global.h 2005-09-19 22:37:41.188405176 +0200
+@@ -146,6 +146,13 @@
+ # define N_(String) (String)
+ #endif /* !ENABLE_NLS */
+
++#include <slang/slang.h>
++#if SLANG_VERSION >= 20000
++#define UTF8 1
++#define SLsmg_Is_Unicode SLsmg_is_utf8_mode()
++void SLsmg_write_nwchars(wchar_t *s, size_t n);
++#endif
++
+ #include "fs.h"
+ #include "util.h"
+
+Tylko w mc-4.6.1/src: global.h~
+diff -urbB mc-4.6.1.org/src/help.c mc-4.6.1/src/help.c
+--- mc-4.6.1.org/src/help.c 2005-09-19 22:32:27.941026000 +0200
++++ mc-4.6.1/src/help.c 2005-09-19 22:36:33.341719440 +0200
+@@ -445,7 +445,7 @@
+ #ifndef HAVE_SLANG
+ addch (acs_map [c]);
+ #else
+-#ifdef UTF8
++#if defined(UTF8) && SLANG_VERSION < 20000
+ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, acs_map [c]);
+ #else
+ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
+Tylko w mc-4.6.1/src: help.c~
+diff -urbB mc-4.6.1.org/src/slint.c mc-4.6.1/src/slint.c
+--- mc-4.6.1.org/src/slint.c 2005-05-27 16:19:18.000000000 +0200
++++ mc-4.6.1/src/slint.c 2005-09-19 22:34:33.333963392 +0200
+@@ -180,6 +180,9 @@
+ struct sigaction act, oact;
+
+ SLtt_get_terminfo ();
++#if SLANG_VERSION >= 20000
++ SLutf8_enable (-1);
++#endif
+
+ /*
+ * If the terminal in not in terminfo but begins with a well-known
+diff -urbB mc-4.6.1.org/src/util.c mc-4.6.1/src/util.c
+--- mc-4.6.1.org/src/util.c 2005-09-19 22:32:27.943025000 +0200
++++ mc-4.6.1/src/util.c 2005-09-19 22:37:11.447926416 +0200
+@@ -55,6 +55,14 @@
+ static const char app_text [] = "Midnight-Commander";
+ int easy_patterns = 1;
+
++#if SLANG_VERSION >= 20000
++void SLsmg_write_nwchars(wchar_t *s, size_t n)
++{
++ while(n--)
++ SLsmg_write_char(*s++);
++}
++#endif
++
+ extern void str_replace(char *s, char from, char to)
+ {
+ for (; *s != '\0'; s++) {
================================================================
More information about the pld-cvs-commit
mailing list