summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlastair Tse <liquidx@gentoo.org>2006-02-25 19:13:29 +0000
committerAlastair Tse <liquidx@gentoo.org>2006-02-25 19:13:29 +0000
commitf30dca4875d292d3315aa2e7cab13579768c8444 (patch)
tree0c99225c94e2d896721138dc4d62075d3e3347fb
parentnew version. stable release due to potential DoS issue (#122323) (diff)
downloadgentoo-2-f30dca4875d292d3315aa2e7cab13579768c8444.tar.gz
gentoo-2-f30dca4875d292d3315aa2e7cab13579768c8444.tar.bz2
gentoo-2-f30dca4875d292d3315aa2e7cab13579768c8444.zip
patches moved to gentoo mirror. stable bump for x86
(Portage version: 2.1_pre4-r1)
-rw-r--r--sys-libs/slang/ChangeLog10
-rw-r--r--sys-libs/slang/Manifest37
-rw-r--r--sys-libs/slang/files/digest-slang-1.4.9-r15
-rw-r--r--sys-libs/slang/files/digest-slang-1.4.9-r25
-rw-r--r--sys-libs/slang/files/slang-1.4.9-autoconf.patch149
-rw-r--r--sys-libs/slang/files/slang-1.4.9-fsuid.patch66
-rw-r--r--sys-libs/slang/files/slang-1.4.9.patch48
-rw-r--r--sys-libs/slang/files/slang-debian-utf8.patch917
-rw-r--r--sys-libs/slang/files/slang-utf8-acs.patch417
-rw-r--r--sys-libs/slang/files/slang-utf8-fix.patch34
-rw-r--r--sys-libs/slang/files/slang-utf8-fix2.patch15
-rw-r--r--sys-libs/slang/slang-1.4.9-r1.ebuild23
-rw-r--r--sys-libs/slang/slang-1.4.9-r2.ebuild21
13 files changed, 58 insertions, 1689 deletions
diff --git a/sys-libs/slang/ChangeLog b/sys-libs/slang/ChangeLog
index dde8200ec60e..348ba70cb3fe 100644
--- a/sys-libs/slang/ChangeLog
+++ b/sys-libs/slang/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for sys-libs/slang
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/ChangeLog,v 1.42 2006/02/16 19:48:57 liquidx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/ChangeLog,v 1.43 2006/02/25 19:13:29 liquidx Exp $
+
+ 25 Feb 2006; Alastair Tse <liquidx@gentoo.org>
+ -files/slang-utf8-acs.patch, -files/slang-utf8-fix.patch,
+ -files/slang-1.4.9-autoconf.patch, -files/slang-utf8-fix2.patch,
+ -files/slang-1.4.9-fsuid.patch, -files/slang-1.4.9.patch,
+ -files/slang-debian-utf8.patch, slang-1.4.9-r1.ebuild,
+ slang-1.4.9-r2.ebuild:
+ patches moved to gentoo mirror. stable bump for x86
16 Feb 2006; Alastair Tse <liquidx@gentoo.org> slang-1.4.9-r2.ebuild:
workaround build problems for LANG=et_EE (#122713)
diff --git a/sys-libs/slang/Manifest b/sys-libs/slang/Manifest
index 61b7206c00db..0eb31f1fcfb4 100644
--- a/sys-libs/slang/Manifest
+++ b/sys-libs/slang/Manifest
@@ -1,21 +1,21 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 e67e87bbc2336a819942c664f2c46a7f ChangeLog 5620
RMD160 a187e4c2d84384955924b70e475366b46a0dfde7 ChangeLog 5620
SHA256 110ef56297548fc27c88b0f8a359eaa1f85756177d036b40fcd0ad082f3ccf19 ChangeLog 5620
-MD5 074ddbf39cb8b9708ca9de2b1fb24366 files/digest-slang-1.4.9-r1 64
-RMD160 0fcc5d38f8f819ad388cfdf2279a7ef55ecc2869 files/digest-slang-1.4.9-r1 64
-SHA256 d016ff62758a9ae6f93793f3cc0e614949412d29095e1073c2d7a11fce3401cf files/digest-slang-1.4.9-r1 64
-MD5 074ddbf39cb8b9708ca9de2b1fb24366 files/digest-slang-1.4.9-r2 64
-RMD160 0fcc5d38f8f819ad388cfdf2279a7ef55ecc2869 files/digest-slang-1.4.9-r2 64
-SHA256 d016ff62758a9ae6f93793f3cc0e614949412d29095e1073c2d7a11fce3401cf files/digest-slang-1.4.9-r2 64
+MD5 b5f98b4cf87ea619127e661ae4a35556 files/digest-slang-1.4.9-r1 494
+RMD160 6dbac91c514e2635369b6a9cb25ee6bc31992a54 files/digest-slang-1.4.9-r1 494
+SHA256 c9f9566aec42fda74490eb91710d5630b85bcf5c6a25e5c6a56b6af5638e6c4a files/digest-slang-1.4.9-r1 494
+MD5 b5f98b4cf87ea619127e661ae4a35556 files/digest-slang-1.4.9-r2 494
+RMD160 6dbac91c514e2635369b6a9cb25ee6bc31992a54 files/digest-slang-1.4.9-r2 494
+SHA256 c9f9566aec42fda74490eb91710d5630b85bcf5c6a25e5c6a56b6af5638e6c4a files/digest-slang-1.4.9-r2 494
MD5 11daf6d137e1d6ec0e3475e55522cd06 files/slang-1.4.9-autoconf.patch 4143
RMD160 37962611ffc5c4ed3d3931ca0fdcabe350375c15 files/slang-1.4.9-autoconf.patch 4143
SHA256 43af573129d7d08a0c5b184b667f871f656d9126f296088bfa0fbfab5cf6623f files/slang-1.4.9-autoconf.patch 4143
MD5 7ba45dd45645107adc167e543634b8eb files/slang-1.4.9-fsuid.patch 1661
RMD160 9a7cf62d43185bfcf20a671c9e1ca9b0fc6dbd21 files/slang-1.4.9-fsuid.patch 1661
SHA256 9f82345946423708864373e3a8593980dedad33f66e0d427f450e1c39268c98e files/slang-1.4.9-fsuid.patch 1661
+MD5 a69e4f7558e727decb3efa8d9a9e77b6 files/slang-1.4.9-r2.tar.gz 12132
+RMD160 02c7df8f7d51c39c0bf9e729606aa1b94c3e6aaf files/slang-1.4.9-r2.tar.gz 12132
+SHA256 487174a2b5df8564b99589e789319b37ee75c52d09ce98bfb12656414cdca3fb files/slang-1.4.9-r2.tar.gz 12132
MD5 7f9b0cb76e754575d54b6ea8f5de59f4 files/slang-1.4.9.patch 1367
RMD160 19faebcad11394b283bd212ebd6b5e1e5bab5ef5 files/slang-1.4.9.patch 1367
SHA256 1881233d22dfa9c69671215835fb559972f5e80a144bfdd326a067848631c273 files/slang-1.4.9.patch 1367
@@ -34,16 +34,9 @@ SHA256 9fa01b76d41790f0821da6430ea6758195d86eb9726ca43a8fc7ce2b585326ca files/sl
MD5 bc00f0356947154d3250243bd5ec08f5 metadata.xml 219
RMD160 355a59738ac2c3bb2de2c5cdf45b5a15a91fe4aa metadata.xml 219
SHA256 2dd88647b8f46df7519fe3a112dba84d9af4c7933908984766cf3a25d2e30e3d metadata.xml 219
-MD5 aa05b5e6a399e3db621b204b914913ea slang-1.4.9-r1.ebuild 1792
-RMD160 4267db54799e11954b5a7877820f988ab77ae2c9 slang-1.4.9-r1.ebuild 1792
-SHA256 919843c31875cac5711fdbf2be8af11412fae7a1a50b59f919490ef0a2d9b310 slang-1.4.9-r1.ebuild 1792
-MD5 fa097ee8ef4995aeee6585a0336646da slang-1.4.9-r2.ebuild 1879
-RMD160 8f96ae3e9e9d269c9e2f72556ee90427b0ae3e11 slang-1.4.9-r2.ebuild 1879
-SHA256 3d82f4e41a0570104c9519ed566718faa0f5f1f91970dd2d5151a1f151f238ce slang-1.4.9-r2.ebuild 1879
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFD9Nc69ZFPrqoILX8RAp8sAJ0R2XPmBXFAMrsC7GxOsnWugM5LygCgx/WX
-oiTdtFUq/QyctUB5DtYdlsc=
-=Ymgp
------END PGP SIGNATURE-----
+MD5 5ed19a1a8a2f44fe685b81ce6f3eb48d slang-1.4.9-r1.ebuild 1892
+RMD160 c485297c34ecae6ca5d6789e7909bee6357d2093 slang-1.4.9-r1.ebuild 1892
+SHA256 d15c98272053c7074b749bb4476d51fe752625abfbc2d0a03374f28a987fd045 slang-1.4.9-r1.ebuild 1892
+MD5 e67b8efc33dfd52c93fb139203195a98 slang-1.4.9-r2.ebuild 1905
+RMD160 b1e58b45faed0477fba92ce1eec0c19b5674d444 slang-1.4.9-r2.ebuild 1905
+SHA256 57c093f972e31fc55940e9f8f85f84ad0429626243893367c84cfe2820dd4f07 slang-1.4.9-r2.ebuild 1905
diff --git a/sys-libs/slang/files/digest-slang-1.4.9-r1 b/sys-libs/slang/files/digest-slang-1.4.9-r1
index 7e9a9175d8b3..c0ec75f257a8 100644
--- a/sys-libs/slang/files/digest-slang-1.4.9-r1
+++ b/sys-libs/slang/files/digest-slang-1.4.9-r1
@@ -1 +1,6 @@
+MD5 a69e4f7558e727decb3efa8d9a9e77b6 slang-1.4.9-patches.tar.gz 12132
+RMD160 02c7df8f7d51c39c0bf9e729606aa1b94c3e6aaf slang-1.4.9-patches.tar.gz 12132
+SHA256 487174a2b5df8564b99589e789319b37ee75c52d09ce98bfb12656414cdca3fb slang-1.4.9-patches.tar.gz 12132
MD5 4fbb1a7f1257e065ca830deefe13d350 slang-1.4.9.tar.bz2 631079
+RMD160 bd2c37554129134e4e874502af0ebcb6fc7e151b slang-1.4.9.tar.bz2 631079
+SHA256 fa42e57e902f2161dc2b297e0dcb24ca180024770afa379027db582803ffa2fa slang-1.4.9.tar.bz2 631079
diff --git a/sys-libs/slang/files/digest-slang-1.4.9-r2 b/sys-libs/slang/files/digest-slang-1.4.9-r2
index 7e9a9175d8b3..c0ec75f257a8 100644
--- a/sys-libs/slang/files/digest-slang-1.4.9-r2
+++ b/sys-libs/slang/files/digest-slang-1.4.9-r2
@@ -1 +1,6 @@
+MD5 a69e4f7558e727decb3efa8d9a9e77b6 slang-1.4.9-patches.tar.gz 12132
+RMD160 02c7df8f7d51c39c0bf9e729606aa1b94c3e6aaf slang-1.4.9-patches.tar.gz 12132
+SHA256 487174a2b5df8564b99589e789319b37ee75c52d09ce98bfb12656414cdca3fb slang-1.4.9-patches.tar.gz 12132
MD5 4fbb1a7f1257e065ca830deefe13d350 slang-1.4.9.tar.bz2 631079
+RMD160 bd2c37554129134e4e874502af0ebcb6fc7e151b slang-1.4.9.tar.bz2 631079
+SHA256 fa42e57e902f2161dc2b297e0dcb24ca180024770afa379027db582803ffa2fa slang-1.4.9.tar.bz2 631079
diff --git a/sys-libs/slang/files/slang-1.4.9-autoconf.patch b/sys-libs/slang/files/slang-1.4.9-autoconf.patch
deleted file mode 100644
index db3d2a934833..000000000000
--- a/sys-libs/slang/files/slang-1.4.9-autoconf.patch
+++ /dev/null
@@ -1,149 +0,0 @@
---- autoconf/configure.in.old 2002-09-13 13:53:56.000000000 +0200
-+++ autoconf/configure.in 2002-09-13 14:01:44.000000000 +0200
-@@ -17,6 +17,62 @@
- AC_CONFIG_AUX_DIR(autoconf)
- AC_CANONICAL_HOST
-
-+AH_TOP([
-+/* -*- c -*- */
-+/* Note: this is for unix only. */
-+
-+#ifndef SL_CONFIG_H
-+#define SL_CONFIG_H
-+])
-+
-+AH_BOTTOM([
-+#if defined(HAVE_SIGADDSET) && defined(HAVE_SIGEMPTYSET)
-+# if defined(HAVE_SIGACTION) && defined(HAVE_SIGPROCMASK)
-+# define SLANG_POSIX_SIGNALS
-+# endif
-+#endif
-+
-+/* Define if you need to in order for stat and other things to work. */
-+#undef _POSIX_SOURCE
-+
-+#ifdef _AIX
-+# ifndef _POSIX_SOURCE
-+# define _POSIX_SOURCE 1
-+# endif
-+# ifndef _ALL_SOURCE
-+# define _ALL_SOURCE
-+# endif
-+/* This may generate warnings but the fact is that without it, xlc will
-+ * INCORRECTLY inline many str* functions. */
-+# undef __STR__
-+#endif
-+
-+/* define USE_TERMCAP if you want to use it instead of terminfo. */
-+#if defined(sequent) || defined(NeXT)
-+# ifndef USE_TERMCAP
-+# define USE_TERMCAP
-+# endif
-+#endif
-+
-+#if defined(ultrix) && !defined(__GNUC__)
-+# ifndef NO_PROTOTYPES
-+# define NO_PROTOTYPES
-+# endif
-+#endif
-+
-+#ifndef unix
-+# define unix 1
-+#endif
-+
-+#ifndef __unix__
-+# define __unix__ 1
-+#endif
-+
-+#define _SLANG_SOURCE_ 1
-+#endif /* SL_CONFIG_H */
-+])
-+
-+
- JD_INIT
- JD_ANSI_CC
-
-@@ -69,9 +125,9 @@
- times gmtime \
- )
-
--AC_CHECK_LIB(m, acosh, [AC_DEFINE(HAVE_ACOSH)])
--AC_CHECK_LIB(m, asinh, [AC_DEFINE(HAVE_ASINH)])
--AC_CHECK_LIB(m, atanh, [AC_DEFINE(HAVE_ATANH)])
-+AC_CHECK_LIB(m, acosh, [AC_DEFINE(HAVE_ACOSH,1,[Define to 1 if you have the `acosh' function])])
-+AC_CHECK_LIB(m, asinh, [AC_DEFINE(HAVE_ASINH,1,[Define to 1 if you have the `asinh' function])])
-+AC_CHECK_LIB(m, atanh, [AC_DEFINE(HAVE_ATANH,1,[Define to 1 if you have the `atanh' function])])
-
- JD_ELF_COMPILER
- JD_IEEE_CFLAGS
---- autoconf/aclocal.m4.old 2002-09-13 13:35:17.000000000 +0200
-+++ autoconf/aclocal.m4 2002-09-13 14:16:10.000000000 +0200
-@@ -258,18 +258,18 @@
- AC_DEFUN(JD_GCC_WARNINGS,
- [
- AC_ARG_ENABLE(warnings,
-- [ --enable-warnings turn on GCC compiler warnings],
-+ AC_HELP_STRING([--enable-warnings],[turn on GCC compiler warnings]),
- [gcc_warnings=$enableval])
--if test -n "$GCC"
-+if test -n "$GCC" && test -n "$gcc_warnings"
- then
-- CFLAGS="$CFLAGS -fno-strength-reduce"
-- if test -n "$gcc_warnings"
-- then
-- CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
-- -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes"
-- # Now trim excess whitespace
-- CFLAGS=`echo $CFLAGS`
-- fi
-+ CFLAGS="$CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
-+ -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
-+ -Wformat -Wformat-security"
-+ ELF_CFLAGS="$ELF_CFLAGS -Wall -W -pedantic -Winline -Wmissing-prototypes \
-+ -Wnested-externs -Wpointer-arith -Wcast-align -Wshadow -Wstrict-prototypes \
-+ -Wformat -Wformat-security"
-+ # Now trim excess whitespace
-+ CFLAGS=`echo $CFLAGS`
- fi
- ])
-
-@@ -415,7 +415,7 @@
- done
- if test "$TERMCAP"; then
- AC_MSG_RESULT(no)
-- AC_DEFINE(USE_TERMCAP)
-+ AC_DEFINE(USE_TERMCAP,1,[Define to use termcap])
- fi
- AC_SUBST(TERMCAP)dnl
- AC_SUBST(MISC_TERMINFO_DIRS)dnl
-@@ -439,7 +439,7 @@
- yes
- #endif
- ], [
--AC_DEFINE(_HPUX_SOURCE)
-+AC_DEFINE(_HPUX_SOURCE,1,[Special define needed for HPUX])
- if test "$CC" = cc; then CC="cc -Ae"; fi
- ])dnl
- dnl
-@@ -462,8 +462,11 @@
- dnl # Check for dynamic linker
- dnl #-------------------------------------------------------------------------
- DYNAMIC_LINK_LIB=""
-+
-+AH_TEMPLATE([HAVE_DLOPEN],[Define if you have dlopen])
-+
- AC_CHECK_HEADER(dlfcn.h,[
-- AC_DEFINE(HAVE_DLFCN_H)
-+ AC_DEFINE(HAVE_DLFCN_H,1,[Define if you have the dlfcn.h header])
- AC_CHECK_LIB(dl,dlopen,[
- DYNAMIC_LINK_LIB="-ldl"
- AC_DEFINE(HAVE_DLOPEN)
-@@ -484,7 +487,7 @@
- *linux* )
- DYNAMIC_LINK_FLAGS="-Wl,-export-dynamic"
- ELF_CC="gcc"
-- ELF_CFLAGS="-O2 -fno-strength-reduce -fPIC"
-+ ELF_CFLAGS="$ELF_CFLAGS -fPIC"
- ELF_LINK="gcc -shared -Wl,-soname#"
- ELF_LINK_CMD="\$(ELF_LINK),\$(ELFLIB_MAJOR)"
- ELF_DEP_LIBS="\$(DL_LIB) -lm -lc"
diff --git a/sys-libs/slang/files/slang-1.4.9-fsuid.patch b/sys-libs/slang/files/slang-1.4.9-fsuid.patch
deleted file mode 100644
index c7c38c756e37..000000000000
--- a/sys-libs/slang/files/slang-1.4.9-fsuid.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- autoconf/configure.in.setfsuid 2002-09-13 15:30:56.000000000 +0200
-+++ autoconf/configure.in 2002-09-13 15:35:56.000000000 +0200
-@@ -94,8 +94,17 @@
- sys/wait.h \
- sys/utsname.h \
- sys/times.h \
-+sys/fsuid.h \
- )
-
-+AC_CHECK_FUNCS(setfsuid setfsgid)
-+
-+if test "${ac_cv_func_setfsuid}" != "yes" || test "${ac_cv_func_setfsgid}" != "yes"; then
-+ AC_MSG_ERROR([
-+*** setfsguid and setfsgid cannot be found!!!
-+ These are needed to support setuid/setgid applications ***])
-+fi
-+
- AC_TYPE_MODE_T
- AC_TYPE_PID_T
- AC_TYPE_UID_T
---- src.old/slinclud.h 2002-09-13 14:17:04.000000000 +0200
-+++ src/slinclud.h 2002-09-13 15:39:38.000000000 +0200
-@@ -30,4 +30,8 @@
- #include <wchar.h>
- #include <limits.h>
-
-+#ifdef HAVE_SYS_FSUID_H
-+# include <sys/fsuid.h>
-+#endif
-+
- #endif /* _SLANG_INCLUDE_H_ */
---- src/sltermin.c
-+++ src/sltermin.c
-@@ -105,7 +105,32 @@
- * I will also look into the use of setreuid, seteuid and setregid, setegid.
- * FIXME: Priority=medium
- */
-+ /* If your system lacks setfsuid/getfsuid either write
-+ equivalent support or dont use slang to build setuid/setgid
-+ apps like Mutt */
-+
-+ if(setfsuid(getuid())==-1)
-+ {
-+ perror("setfsuid");
-+ return NULL;
-+ }
-+ if(setfsgid(getgid())==-1)
-+ {
-+ perror("setfsgid");
-+ return NULL;
-+ }
- fp = fopen (file, "rb");
-+ if(setfsuid(geteuid())==-1)
-+ {
-+ perror("setfsuid");
-+ return NULL;
-+ }
-+ if(setfsgid(getegid())==-1)
-+ {
-+ perror("setfsgid");
-+ return NULL;
-+ }
-+
- if (fp == NULL) return NULL;
-
- if ((12 == fread ((char *) buf, 1, 12, fp) && (MAGIC == make_integer (buf))))
diff --git a/sys-libs/slang/files/slang-1.4.9.patch b/sys-libs/slang/files/slang-1.4.9.patch
deleted file mode 100644
index 05da2f74664c..000000000000
--- a/sys-libs/slang/files/slang-1.4.9.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- src/sldisply.c
-+++ src/sldisply.c
-@@ -2156,6 +2156,13 @@
- Term_Init_Str = SLtt_tgetstr ("ti");
- Term_Reset_Str = SLtt_tgetstr ("te");
-
-+# ifndef USE_TERMCAP
-+ /* Use the given terminal specification of the terminfo entries
-+ * even if we have almost vtxxx.
-+ */
-+ Keypad_Init_Str = SLtt_tgetstr ("ks");
-+ Keypad_Reset_Str = SLtt_tgetstr ("ke");
-+# else
- /* If I do this for vtxxx terminals, arrow keys start sending ESC O A,
- * which I do not want. This is mainly for HP terminals.
- */
-@@ -2164,6 +2171,7 @@
- Keypad_Init_Str = SLtt_tgetstr ("ks");
- Keypad_Reset_Str = SLtt_tgetstr ("ke");
- }
-+#endif
-
- /* Make up for defective termcap/terminfo databases */
- if ((Vt100_Like && (term[2] != '1'))
-@@ -2351,10 +2359,12 @@
- /* specific to vtxxx only */
- void SLtt_enable_cursor_keys (void)
- {
-+#if 0
- #ifdef __unix__
- if (Vt100_Like)
- #endif
- tt_write_string("\033=\033[?1l");
-+#endif
- }
-
- #ifdef VMS
---- src/slmisc.c.mps 2003-03-23 08:06:40.000000000 +0100
-+++ src/slmisc.c 2004-09-17 12:28:44.000000000 +0200
-@@ -565,7 +565,7 @@
- return (int) SLatol (s);
- }
-
--#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2)
-+#if !defined(HAVE_ISSETUGID) && defined(__GLIBC__) && (__GLIBC__ >= 2) && !defined(__UCLIBC__)
- extern int __libc_enable_secure;
- # define HAVE___LIBC_ENABLE_SECURE 1
- #endif
diff --git a/sys-libs/slang/files/slang-debian-utf8.patch b/sys-libs/slang/files/slang-debian-utf8.patch
deleted file mode 100644
index 62eb67056bf7..000000000000
--- a/sys-libs/slang/files/slang-debian-utf8.patch
+++ /dev/null
@@ -1,917 +0,0 @@
---- slang-1.4.4.orig/src/slinclud.h
-+++ slang-1.4.4/src/slinclud.h
-@@ -23,4 +23,12 @@
- # include <memory.h>
- #endif
-
-+#define UTF8 1
-+
-+#ifdef UTF8
-+#include <wchar.h>
-+#include <limits.h>
-+#endif /* UTF8 */
-+
-+
- #endif /* _SLANG_INCLUDE_H_ */
---- slang-1.4.4.orig/src/slang.h
-+++ slang-1.4.4/src/slang.h
-@@ -1239,10 +1239,20 @@
- extern int SLtt_Msdos_Cheap_Video;
- #endif
-
-+#define UTF8 1
-+
-+#ifdef UTF8
-+typedef int SLsmg_Char_Type;
-+#define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFFFFFF)
-+#define SLSMG_EXTRACT_COLOR(x) (((x)>>24)&0xFF)
-+#define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(wchar_t)(ch))|((color)<<24))
-+#define SLSMG_NOCHAR 1
-+#else
- typedef unsigned short SLsmg_Char_Type;
- #define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFF)
- #define SLSMG_EXTRACT_COLOR(x) (((x)>>8)&0xFF)
- #define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(unsigned char)(ch))|((color)<<8))
-+#endif /* UTF8 */
-
- extern int SLtt_flush_output (void);
- extern void SLtt_set_scroll_region(int, int);
-@@ -1334,7 +1342,11 @@
-
- /*{{{ SLsmg Screen Management Functions */
-
-+#ifdef UTF8
-+extern void SLsmg_fill_region (int, int, unsigned int, unsigned int, wchar_t);
-+#else
- extern void SLsmg_fill_region (int, int, unsigned int, unsigned int, unsigned char);
-+#endif /* UTF8 */
- extern void SLsmg_set_char_set (int);
- #ifndef IBMPC_SYSTEM
- extern int SLsmg_Scroll_Hash_Border;
-@@ -1351,7 +1363,12 @@
- extern void SLsmg_vprintf (char *, va_list);
- extern void SLsmg_write_string (char *);
- extern void SLsmg_write_nstring (char *, unsigned int);
-+#ifdef UTF8
-+extern void SLsmg_write_char (wchar_t);
-+extern void SLsmg_write_nwchars (wchar_t *, unsigned int);
-+#else
- extern void SLsmg_write_char (char);
-+#endif /* UTF8 */
- extern void SLsmg_write_nchars (char *, unsigned int);
- extern void SLsmg_write_wrapped_string (char *, int, int, unsigned int, unsigned int, int);
- extern void SLsmg_cls (void);
---- slang-1.4.4.orig/src/slcurses.c
-+++ slang-1.4.4/src/slcurses.c
-@@ -440,20 +440,130 @@
-
- static int do_newline (SLcurses_Window_Type *w)
- {
-- w->_curx = 0;
-+ /* w->_curx = 0; */
- w->_cury += 1;
- if (w->_cury >= w->scroll_max)
- {
- w->_cury = w->scroll_max - 1;
-- if (w->scroll_ok)
-+ if (w->scroll_ok) {
-+ w->_curx = 0;
- SLcurses_wscrl (w, 1);
-+ }
- }
-+ else
-+ w->_curx = 0;
-+
-+ return 0;
-+}
-+
-+#ifdef UTF8
-+static int SLcurses_waddch1 (SLcurses_Window_Type *win,
-+ wchar_t ch, int color)
-+{
-+ SLsmg_Char_Type *b, *bmin, *bmax, *c;
-+ int k;
-+
-+ if (win == NULL) return -1;
-+
-+ if (win->_cury >= win->nrows)
-+ {
-+ /* Curses seems to move current postion to top of window. */
-+ win->_cury = win->_curx = 0;
-+ return -1;
-+ }
-+
-+ win->modified = 1;
-+
-+ if (ch < ' ')
-+ {
-+ if (ch == '\n')
-+ {
-+ SLcurses_wclrtoeol (win);
-+ return do_newline (win);
-+ }
-+
-+ if (ch == '\r')
-+ {
-+ win->_curx = 0;
-+ return 0;
-+ }
-+
-+ if (ch == '\b')
-+ {
-+ if (win->_curx > 0)
-+ win->_curx--;
-+
-+ return 0;
-+ }
-+
-+ /* HACK HACK!!!! */
-+ if (ch == '\t') ch = ' ';
-+ }
-+
-+ k = wcwidth(ch);
-+
-+ if (!k)
-+ return 0; /* ignore combining characters for now */
-+
-+ if (k > win->ncols)
-+ return 0; /* character wider than window */
-+
-+ if (win->_curx + k > win->ncols) {
-+ if (win->_curx < win->ncols)
-+ SLcurses_wclrtoeol(win);
-+ do_newline (win);
-+ }
-+
-+ bmin = win->lines[win->_cury];
-+ b = bmin + win->_curx;
-+ bmax = bmin + win->ncols;
-+
-+ /* Remove overwritten chars to left */
-+ if (*b == SLSMG_NOCHAR) {
-+ for (c = b - 1; c >= bmin && *c == SLSMG_NOCHAR; c--)
-+ *c = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*c));
-+ if (c >= bmin)
-+ *c = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*c));
-+ }
-+
-+ *b = SLSMG_BUILD_CHAR(ch,color);
-+ win->_curx += k;
-+ while (--k > 0)
-+ *++b = SLSMG_NOCHAR;
-+
-+ /* Remove overwritten chars to right */
-+ for (c = b + 1; c < bmax && *c == SLSMG_NOCHAR; c++)
-+ *c = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*c));
-
- return 0;
- }
-
- int SLcurses_waddch (SLcurses_Window_Type *win, SLtt_Char_Type attr)
- {
-+ SLsmg_Char_Type ch, color;
-+
-+ if (win == NULL) return -1;
-+
-+ ch = SLSMG_EXTRACT_CHAR(attr);
-+
-+ if (attr == ch)
-+ color = win->color;
-+ else
-+ {
-+ /* hack to pick up the default color for graphics chars */
-+ if (((attr & A_COLOR) == 0) && ((attr & A_ALTCHARSET) != 0))
-+ {
-+ /* FIXME: priority=medium: Use SLSMG_?? instead of << */
-+ attr |= win->color << 8;
-+ }
-+ color = map_attr_to_object (attr);
-+ }
-+
-+ return SLcurses_waddch1 (win, ch, color);
-+}
-+#else
-+int SLcurses_waddch (SLcurses_Window_Type *win, SLtt_Char_Type attr)
-+{
- SLsmg_Char_Type *b, ch;
- SLsmg_Char_Type color;
-
-@@ -518,6 +628,7 @@
-
- return 0;
- }
-+#endif /* UTF8 */
-
- int SLcurses_wnoutrefresh (SLcurses_Window_Type *w)
- {
-@@ -577,7 +688,11 @@
-
- int SLcurses_wclrtoeol (SLcurses_Window_Type *w)
- {
-+#ifdef UTF8
-+ SLsmg_Char_Type *b, *bmin, *bmax, *c;
-+#else
- SLsmg_Char_Type *b, *bmax;
-+#endif /* UTF8 */
- SLsmg_Char_Type blank;
-
- if (w == NULL) return -1;
-@@ -588,9 +703,23 @@
-
- blank = SLSMG_BUILD_CHAR(' ',w->color);
-
-+#ifdef UTF8
-+ bmin = w->lines[w->_cury];
-+ b = bmin + w->_curx;
-+ bmax = bmin + w->ncols;
-+
-+ /* Remove overwritten chars to left */
-+ if (b < bmax && *b == SLSMG_NOCHAR) {
-+ for (c = b - 1; c >= bmin && *c == SLSMG_NOCHAR; c--)
-+ *c = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*c));
-+ if (c >= bmin)
-+ *c = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*c));
-+ }
-+#else
- b = w->lines[w->_cury];
- bmax = b + w->ncols;
- b += w->_curx;
-+#endif /* UTF8 */
-
- while (b < bmax) *b++ = blank;
- return 0;
-@@ -677,6 +806,34 @@
- return 0;
- }
-
-+#ifdef UTF8
-+/* Note: if len is < 0, entire string will be used.
-+ */
-+int SLcurses_waddnstr (SLcurses_Window_Type *w, char *str, int len)
-+{
-+ size_t k;
-+ wchar_t wc;
-+ mbstate_t mbstate;
-+
-+ if ((w == NULL)
-+ || (str == NULL))
-+ return -1;
-+
-+ if (len < 0)
-+ len = (char *)(-1) - str;
-+
-+ memset (&mbstate, 0, sizeof (mbstate));
-+ while ((k = mbrtowc (&wc, str, len, &mbstate)) &&
-+ k != (size_t)(-1) &&
-+ k != (size_t)(-2))
-+ {
-+ SLcurses_waddch1 (w, wc, w->color);
-+ str += k;
-+ len -= k;
-+ }
-+ return k;
-+}
-+#else
- /* Note: if len is < 0, entire string will be used.
- */
- int SLcurses_waddnstr (SLcurses_Window_Type *w, char *str, int len)
-@@ -758,6 +915,7 @@
-
- return 0;
- }
-+#endif /* UTF8 */
-
- /* This routine IS NOT CORRECT. It needs to compute the proper overlap
- * and copy accordingly. Here, I just assume windows are same size.
-@@ -852,12 +1010,36 @@
-
- int SLcurses_wdelch (SLcurses_Window_Type *w)
- {
-+#ifdef UTF8
-+ SLsmg_Char_Type *p, *p1, *pmin, *pmax, *q;
-+#else
- SLsmg_Char_Type *p, *p1, *pmax;
-+#endif /* UTF8 */
-
-+#ifdef UTF8
-+ pmin = w->lines[w->_cury];
-+ p = pmin + w->_curx;
-+ pmax = pmin + w->ncols;
-+
-+ /* Remove overwritten chars to left */
-+ if (p < pmax && *p == SLSMG_NOCHAR) {
-+ for (q = p - 1; q >= pmin && *q == SLSMG_NOCHAR; q--)
-+ *q = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*q));
-+ if (q >= pmin)
-+ *q = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*q));
-+ }
-+
-+ /* Remove overwritten chars to right */
-+ for (q = p + 1; q < pmax && *q == SLSMG_NOCHAR; q++)
-+ *q = SLSMG_BUILD_CHAR(' ',SLSMG_EXTRACT_COLOR(*q));
-+
-+ p1 = p + 1;
-+#else
- p = w->lines[w->_cury];
- pmax = p + w->ncols;
- p += w->_curx;
- p1 = p + 1;
-+#endif /* UTF8 */
-
- while (p1 < pmax)
- {
-@@ -884,12 +1066,12 @@
-
- while (pmax > p)
- {
-- *pmax = *p1;
-+ *pmax = *p1; /* Doesn't this assign beyond the end of the line? */
- pmax = p1;
- p1--;
- }
-
-- if (p < pmax)
-+ if (p < pmax) /* How could it be? */
- *p = SLSMG_BUILD_CHAR(ch, w->color);
-
- w->modified = 1;
---- slang-1.4.4.orig/src/slsmg.c
-+++ slang-1.4.4/src/slsmg.c
-@@ -225,6 +225,38 @@
- SLsmg_write_nchars (str, strlen (str));
- }
-
-+#ifdef UTF8
-+void SLsmg_write_nstring (char *str, unsigned int n)
-+{
-+ char blank = ' ';
-+ mbstate_t mbstate;
-+
-+ /* Avoid a problem if a user accidently passes a negative value */
-+ if ((int) n < 0)
-+ return;
-+
-+ if (str != NULL)
-+ {
-+ wchar_t wc;
-+ size_t k;
-+ int w;
-+
-+ memset (&mbstate, 0, sizeof (mbstate));
-+ while ((k = mbrtowc (&wc, str, MB_LEN_MAX, &mbstate)) &&
-+ k != (size_t)(-1) &&
-+ k != (size_t)(-2))
-+ {
-+ w = wcwidth(wc);
-+ if (w < 0 || w > n)
-+ break;
-+ SLsmg_write_nwchars (&wc, 1);
-+ str += k;
-+ n -= w;
-+ }
-+ }
-+ while (n-- > 0) SLsmg_write_nchars (&blank, 1);
-+}
-+#else
- void SLsmg_write_nstring (char *str, unsigned int n)
- {
- unsigned int width;
-@@ -243,7 +275,11 @@
- }
- while (width++ < n) SLsmg_write_nchars (&blank, 1);
- }
-+#endif /* UTF8 */
-
-+#ifdef UTF8
-+/* FIXME: This function not UTF8'd yet - Edmund */
-+#endif /* UTF8 */
- void SLsmg_write_wrapped_string (char *s, int r, int c,
- unsigned int dr, unsigned int dc,
- int fill)
-@@ -302,6 +338,123 @@
- int SLsmg_Display_Eight_Bit = 128;
- #endif
-
-+#ifdef UTF8
-+void SLsmg_write_nwchars (wchar_t *str, unsigned int n)
-+{
-+ SLsmg_Char_Type *p, *prev, *q;
-+ int len, max_len, w, i;
-+ wchar_t ch;
-+
-+#ifndef IBMPC_SYSTEM
-+ int alt_char_set_flag;
-+
-+ alt_char_set_flag = ((This_Color & ALT_CHAR_FLAG)
-+ && ((tt_Use_Blink_For_ACS == NULL)
-+ || (*tt_Use_Blink_For_ACS == 0)));
-+#endif
-+
-+ if (Smg_Inited == 0)
-+ return;
-+ if (This_Row < Start_Row || This_Row >= Start_Row + Screen_Rows)
-+ return;
-+
-+ max_len = Start_Col + Screen_Cols;
-+ len = This_Col;
-+ p = SL_Screen[This_Row - Start_Row].neew + len - Start_Col;
-+ prev = 0;
-+
-+ for (i = 0; i < n; i++, str) {
-+ ch = *str++;
-+#ifndef IBMPC_SYSTEM
-+ if (alt_char_set_flag)
-+ ch = Alt_Char_Set[ch & 0x7F];
-+#endif
-+ w = wcwidth(ch);
-+
-+ if (w > 0) {
-+ if (len + w <= max_len) {
-+ if (!prev) {
-+ for (q = p; *q == SLSMG_NOCHAR; q--)
-+ *q = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*q));
-+ *q = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*q));
-+ }
-+ prev = p;
-+ *p++ = SLSMG_BUILD_CHAR(ch, This_Color), ++len;
-+ for (; --w; len++, p++)
-+ *p = SLSMG_NOCHAR;
-+ }
-+ else if (len < max_len) {
-+ for (; len < max_len; len++, p++)
-+ *p = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*p));
-+ prev = 0;
-+ }
-+ }
-+ else if (ch == '\n' &&
-+ SLsmg_Newline_Behavior != SLSMG_NEWLINE_PRINTABLE) {
-+ SL_Screen[This_Row - Start_Row].flags |= TOUCHED;
-+ for (; len < max_len && *p == SLSMG_NOCHAR; len++, p++)
-+ *p = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*p));
-+ if (!SLsmg_Newline_Behavior)
-+ break;
-+ ++This_Row;
-+ len = 0;
-+ if (This_Row == Start_Row + Screen_Rows) {
-+ if (SLsmg_Newline_Behavior == SLSMG_NEWLINE_SCROLLS)
-+ scroll_up();
-+ else
-+ break;
-+ }
-+ p = SL_Screen[This_Row - Start_Row].neew;
-+ prev = 0;
-+ }
-+ else if (ch == '\t' && (SLsmg_Tab_Width > 0)) {
-+ while (len < max_len) {
-+ *p = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*p));
-+ ++p, ++len;
-+ if (len % SLsmg_Tab_Width == 0)
-+ break;
-+ }
-+ }
-+ else if ((ch == 0x8) && SLsmg_Backspace_Moves) {
-+ /* not implemented */
-+ }
-+ else if (!w && ch) {
-+ /* we could handle combining characters here, using prev */
-+ }
-+ else {
-+ /* we should convert control characters to printable form here */
-+ }
-+ }
-+ This_Col = len;
-+ if (i == n) {
-+ SL_Screen[This_Row - Start_Row].flags |= TOUCHED;
-+ for (; len < max_len && *p == SLSMG_NOCHAR; len++, p++)
-+ *p = SLSMG_BUILD_CHAR(' ', SLSMG_EXTRACT_COLOR(*p));
-+ }
-+}
-+
-+void SLsmg_write_char (wchar_t wc)
-+{
-+ SLsmg_write_nwchars (&wc, 1);
-+}
-+
-+void SLsmg_write_nchars (char *str, unsigned int n)
-+{
-+ wchar_t wc;
-+ size_t k;
-+ mbstate_t mbstate;
-+
-+ memset (&mbstate, 0, sizeof (mbstate));
-+ while ((k = mbrtowc (&wc, str, n, &mbstate)) &&
-+ k != (size_t)(-1) &&
-+ k != (size_t)(-2))
-+ {
-+ SLsmg_write_nwchars (&wc, 1);
-+ str += k;
-+ n -= k;
-+ }
-+}
-+#else
- void SLsmg_write_nchars (char *str, unsigned int n)
- {
- register SLsmg_Char_Type *p, old, neew, color;
-@@ -475,6 +628,7 @@
- {
- SLsmg_write_nchars (&ch, 1);
- }
-+#endif /* UTF8 */
-
- static int Cls_Flag;
-
-@@ -891,6 +1045,10 @@
- This_Color = color;
- }
-
-+#ifdef UTF8
-+ /* FIXME: We should convert broken wide characters to spaces
-+ before calling smart_puts */
-+#endif /* UTF8 */
- SL_Screen[i].old[Screen_Cols] = 0;
- SL_Screen[i].neew[Screen_Cols] = 0;
-
-@@ -1334,9 +1492,16 @@
- This_Row = r; This_Col = c;
- }
-
-+#ifdef UTF8
-+void SLsmg_fill_region (int r, int c, unsigned int dr, unsigned int dc, wchar_t ch)
-+{
-+ static wchar_t hbuf[16];
-+ int i;
-+#else
- void SLsmg_fill_region (int r, int c, unsigned int dr, unsigned int dc, unsigned char ch)
- {
- static unsigned char hbuf[16];
-+#endif /* UTF8 */
- int count;
- int dcmax, rmax;
-
-@@ -1357,16 +1522,30 @@
- #if 0
- ch = Alt_Char_Set[ch];
- #endif
-+#ifdef UTF8
-+ if (ch != hbuf[0])
-+ for (i = 0; i < 16; i++)
-+ hbuf[i] = ch;
-+#else
- if (ch != hbuf[0]) SLMEMSET ((char *) hbuf, (char) ch, 16);
-+#endif /* UTF8 */
-
- for (This_Row = r; This_Row < rmax; This_Row++)
- {
- This_Col = c;
- count = dc / 16;
-+#ifdef UTF8
-+ SLsmg_write_nwchars (hbuf, dc % 16);
-+#else
- SLsmg_write_nchars ((char *) hbuf, dc % 16);
-+#endif /* UTF8 */
- while (count-- > 0)
- {
-+#ifdef UTF8
-+ SLsmg_write_nwchars (hbuf, 16);
-+#else
- SLsmg_write_nchars ((char *) hbuf, 16);
-+#endif /* UTF8 */
- }
- }
-
-@@ -1381,14 +1560,22 @@
- void SLsmg_write_color_chars (SLsmg_Char_Type *s, unsigned int len)
- {
- SLsmg_Char_Type *smax, sh;
-+#ifdef UTF8
-+ wchar_t buf[32], *b, *bmax;
-+#else
- char buf[32], *b, *bmax;
-+#endif /* UTF8 */
- int color, save_color;
-
- if (Smg_Inited == 0) return;
-
- smax = s + len;
- b = buf;
-+#ifdef UTF8
-+ bmax = b + sizeof (buf) / sizeof (SLsmg_Char_Type);
-+#else
- bmax = b + sizeof (buf);
-+#endif /* UTF8 */
-
- save_color = This_Color;
-
-@@ -1412,16 +1599,28 @@
- {
- if (b != buf)
- {
-+#ifdef UTF8
-+ SLsmg_write_nwchars (buf, (int) (b - buf));
-+#else
- SLsmg_write_nchars (buf, (int) (b - buf));
-+#endif /* UTF8 */
- b = buf;
- }
- This_Color = color;
- }
-+#ifdef UTF8
-+ *b++ = SLSMG_EXTRACT_CHAR(sh);
-+#else
- *b++ = (char) SLSMG_EXTRACT_CHAR(sh);
-+#endif /* UTF8 */
- }
-
- if (b != buf)
-+#ifdef UTF8
-+ SLsmg_write_nwchars (buf, (unsigned int) (b - buf));
-+#else
- SLsmg_write_nchars (buf, (unsigned int) (b - buf));
-+#endif /* UTF8 */
-
- This_Color = save_color;
- }
-@@ -1473,7 +1672,11 @@
- SLsmg_set_color_in_region (int color, int r, int c, unsigned int dr, unsigned int dc)
- {
- int cmax, rmax;
-+#ifdef UTF8
-+ int color_mask;
-+#else
- SLsmg_Char_Type char_mask;
-+#endif /* UTF8 */
-
- if (Smg_Inited == 0) return;
-
-@@ -1498,14 +1701,22 @@
- color = ((color & 0x7F) + Bce_Color_Offset) & 0x7F;
- }
- #endif
-+#ifdef UTF8
-+ color_mask = 0;
-+#else
- color = color << 8;
-
- char_mask = 0xFF;
-+#endif /* UTF8 */
-
- #ifndef IBMPC_SYSTEM
- if ((tt_Use_Blink_For_ACS == NULL)
- || (0 == *tt_Use_Blink_For_ACS))
-+#ifdef UTF8
-+ color_mask = 0x80;
-+#else
- char_mask = 0x80FF;
-+#endif /* UTF8 */
- #endif
-
- while (r < rmax)
-@@ -1519,7 +1730,13 @@
-
- while (s < smax)
- {
-+#ifdef UTF8
-+ *s = SLSMG_BUILD_CHAR(SLSMG_EXTRACT_CHAR(*s),
-+ (SLSMG_EXTRACT_COLOR(*s) & color_mask)
-+ | color);
-+#else
- *s = (*s & char_mask) | color;
-+#endif /* UTF8 */
- s++;
- }
- r++;
---- slang-1.4.5/src/Makefile.in.foo 2002-06-12 19:30:09.000000000 -0400
-+++ slang-1.4.5/src/Makefile.in 2002-06-12 19:31:13.000000000 -0400
-@@ -67,7 +67,7 @@
- #---------------------------------------------------------------------------
- # There should be no need to change anything below here.
- #---------------------------------------------------------------------------
--THIS_LIB = slang#
-+THIS_LIB = slang-utf8#
- OTHERSTUFF =
- THIS_LIB_DEFINES = -DSLANG
- ELF_MAJOR_VERSION = @slang_major_version@#
---- slang-1.4.9/src/sldisply.c.orig 2003-10-27 17:24:15.000000000 -0500
-+++ slang-1.4.9/src/sldisply.c 2003-10-27 17:56:25.000000000 -0500
-@@ -9,6 +9,7 @@
-
- #include <time.h>
- #include <ctype.h>
-+#include <limits.h>
-
- #if !defined(VMS) || (__VMS_VER >= 70000000)
- # include <sys/time.h>
-@@ -1426,14 +1427,25 @@
-
- /* Highest bit represents the character set. */
- #define COLOR_MASK 0x7F00
-+#ifdef UTF8
-+# define COLOR_OF(x) (SLSMG_EXTRACT_COLOR(x) & 0x7F)
-+#else
- #define COLOR_OF(x) (((x)&COLOR_MASK)>>8)
-+#endif
- #define CHAR_OF(x) ((x)&0x80FF)
-
- #if SLTT_HAS_NON_BCE_SUPPORT
-+#ifdef UTF8
-+static int bce_color_eqs (SLsmg_Char_Type a, SLsmg_Char_Type b)
-+{
-+ a = SLSMG_EXTRACT_COLOR(a) & 0x7F;
-+ b = SLSMG_EXTRACT_COLOR(b) & 0x7F;
-+#else
- static int bce_color_eqs (unsigned int a, unsigned int b)
- {
- a = COLOR_OF(a);
- b = COLOR_OF(b);
-+#endif
-
- if (a == b)
- return 1;
-@@ -1459,8 +1471,14 @@
- : (Ansi_Color_Map[COLOR_OF(a)].mono == Ansi_Color_Map[COLOR_OF(b)].mono))
- #endif
-
-+#ifdef UTF8
-+#define CHAR_EQS(a, b) ((a) == (b)\
-+ || (SLSMG_EXTRACT_CHAR(a) == SLSMG_EXTRACT_CHAR(b)\
-+ && COLOR_EQS((a), (b))))
-+#else
- #define CHAR_EQS(a, b) (((a) == (b))\
- || ((CHAR_OF(a)==CHAR_OF(b)) && COLOR_EQS(a,b)))
-+#endif
-
- /* The whole point of this routine is to prevent writing to the last column
- * and last row on terminals with automatic margins.
-@@ -1488,9 +1506,58 @@
- tt_write (str, len);
- }
-
-+#ifdef UTF8
-+/* FIXME: This duplicates the function above
-+ */
-+static void write_wstring_with_care (SLsmg_Char_Type *str, unsigned int len)
-+{
-+ mbstate_t mbstate;
-+
-+ if (str == NULL) return;
-+
-+ if (Automatic_Margins && (Cursor_r + 1 == SLtt_Screen_Rows))
-+ {
-+ if (len + (unsigned int) Cursor_c >= (unsigned int) SLtt_Screen_Cols)
-+ {
-+ /* For now, just do not write there. Later, something more
-+ * sophisticated will be implemented.
-+ */
-+ if (SLtt_Screen_Cols > Cursor_c)
-+ {
-+ len = SLtt_Screen_Cols - Cursor_c - 1;
-+ while (len > 0 && str[len] == SLSMG_NOCHAR)
-+ --len;
-+ }
-+ else len = 0;
-+ }
-+ }
-+
-+ memset (&mbstate, 0, sizeof (mbstate));
-+ while (len--)
-+ {
-+ SLsmg_Char_Type c = *str++;
-+ char buf[MB_LEN_MAX];
-+ size_t n;
-+
-+ if (c == SLSMG_NOCHAR)
-+ continue;
-+
-+ n = wcrtomb (buf, c, &mbstate);
-+ if (n == (size_t)(-1))
-+ break;
-+
-+ tt_write(buf, n);
-+ }
-+}
-+#endif /* UTF8 */
-+
- static void send_attr_str (SLsmg_Char_Type *s)
- {
-+#ifdef UTF8
-+ SLsmg_Char_Type out[SLTT_MAX_SCREEN_COLS], ch, *p;
-+#else
- unsigned char out[SLTT_MAX_SCREEN_COLS], ch, *p;
-+#endif /* UTF8 */
- register SLtt_Char_Type attr;
- register SLsmg_Char_Type sh;
- int color, last_color = -1;
-@@ -1498,8 +1565,13 @@
- p = out;
- while (0 != (sh = *s++))
- {
-+#ifdef UTF8
-+ ch = SLSMG_EXTRACT_CHAR(sh);
-+ color = SLSMG_EXTRACT_COLOR(sh);
-+#else
- ch = sh & 0xFF;
- color = ((int) sh & 0xFF00) >> 8;
-+#endif
-
- #if SLTT_HAS_NON_BCE_SUPPORT
- if (Bce_Color_Offset
-@@ -1511,8 +1583,12 @@
- {
- if (SLtt_Use_Ansi_Colors) attr = Ansi_Color_Map[color & 0x7F].fgbg;
- else attr = Ansi_Color_Map[color & 0x7F].mono;
--
-+
-+#ifdef UTF8
-+ if (SLSMG_EXTRACT_COLOR(sh) & 0x80) /* alternate char set */
-+#else
- if (sh & 0x8000) /* alternate char set */
-+#endif
- {
- if (SLtt_Use_Blink_For_ACS)
- {
-@@ -1534,8 +1610,12 @@
- {
- if (p != out)
- {
-+#ifdef UTF8
-+ write_wstring_with_care (out, p-out);
-+#else
- *p = 0;
- write_string_with_care ((char *) out);
-+#endif
- Cursor_c += (int) (p - out);
- p = out;
- }
-@@ -1558,8 +1638,12 @@
- }
- *p++ = ch;
- }
-+#ifdef UTF8
-+ if (p != out) write_wstring_with_care (out, p-out);
-+#else
- *p = 0;
- if (p != out) write_string_with_care ((char *) out);
-+#endif
- Cursor_c += (int) (p - out);
- }
-
-@@ -1686,7 +1770,11 @@
-
- while (qq < qmax)
- {
-+#ifdef UTF8
-+ if (SLSMG_EXTRACT_COLOR(*qq))
-+#else
- if (*qq & 0xFF00)
-+#endif
- {
- SLtt_normal_video ();
- SLtt_del_eol ();
-@@ -1701,7 +1789,11 @@
- /* Find where the last non-blank character on old/new screen is */
-
- space_char = ' ';
-+#ifdef UTF8
-+ if (SLSMG_EXTRACT_CHAR(*(pmax-1)) == ' ')
-+#else
- if (CHAR_EQS(*(pmax-1), ' '))
-+#endif
- {
- /* If we get here, then we can erase to the end of the line to create
- * the final space. However, this will only work _if_ erasing will
-@@ -1752,7 +1844,11 @@
- {
- #endif
- /* Try use use erase to bol if possible */
-+#ifdef UTF8
-+ if ((Del_Bol_Str != NULL) && (SLSMG_EXTRACT_CHAR(*neww) == ' '))
-+#else
- if ((Del_Bol_Str != NULL) && (CHAR_OF(*neww) == ' '))
-+#endif
- {
- SLsmg_Char_Type *p1;
- SLsmg_Char_Type blank;
-@@ -1781,7 +1877,11 @@
- q = oldd + ofs;
- p = p1;
- SLtt_goto_rc (row, ofs - 1);
-+#ifdef UTF8
-+ SLtt_reverse_video (SLSMG_EXTRACT_COLOR (blank));
-+#else
- SLtt_reverse_video (COLOR_OF(blank));
-+#endif
- tt_write_string (Del_Bol_Str);
- tt_write (" ", 1);
- Cursor_c += 1;
-@@ -1978,7 +2078,11 @@
-
- if (q < qmax)
- {
-+#ifdef UTF8
-+ SLtt_reverse_video (SLSMG_EXTRACT_COLOR (space_char));
-+#else
- SLtt_reverse_video (COLOR_OF(space_char));
-+#endif
- del_eol ();
- }
-
diff --git a/sys-libs/slang/files/slang-utf8-acs.patch b/sys-libs/slang/files/slang-utf8-acs.patch
deleted file mode 100644
index dc8a8519a989..000000000000
--- a/sys-libs/slang/files/slang-utf8-acs.patch
+++ /dev/null
@@ -1,417 +0,0 @@
---- slang-1.4.5/src/slang.h.acs 2002-07-09 00:03:57.000000000 -0400
-+++ slang-1.4.5/src/slang.h 2002-07-09 00:11:06.000000000 -0400
-@@ -1255,6 +1255,8 @@
-
- #ifdef UTF8
- typedef int SLsmg_Char_Type;
-+extern SLtt_Char_Type SLcurses_Acs_Map [128];
-+#define acs_map SLcurses_Acs_Map
- #define SLSMG_EXTRACT_CHAR(x) ((x) & 0xFFFFFF)
- #define SLSMG_EXTRACT_COLOR(x) (((x)>>24)&0xFF)
- #define SLSMG_BUILD_CHAR(ch,color) (((SLsmg_Char_Type)(wchar_t)(ch))|((color)<<24))
-@@ -1396,7 +1398,11 @@
- extern void SLsmg_set_screen_start (int *, int *);
- extern void SLsmg_draw_hline (unsigned int);
- extern void SLsmg_draw_vline (int);
-+#ifdef UTF8
-+extern void SLsmg_draw_object (int, int, SLsmg_Char_Type);
-+#else
- extern void SLsmg_draw_object (int, int, unsigned char);
-+#endif
- extern void SLsmg_draw_box (int, int, unsigned int, unsigned int);
- extern int SLsmg_get_column(void);
- extern int SLsmg_get_row(void);
-@@ -1408,6 +1414,9 @@
- extern int SLsmg_Display_Eight_Bit;
- extern int SLsmg_Tab_Width;
-
-+extern int SLsmg_Is_Unicode;
-+extern int SLsmg_Setlocale;
-+
- #define SLSMG_NEWLINE_IGNORED 0 /* default */
- #define SLSMG_NEWLINE_MOVES 1 /* moves to next line, column 0 */
- #define SLSMG_NEWLINE_SCROLLS 2 /* moves but scrolls at bottom of screen */
-@@ -1465,31 +1474,79 @@
- # define SLSMG_BOARD_CHAR '#'
- # define SLSMG_BLOCK_CHAR '#'
- # else
--# define SLSMG_HLINE_CHAR 'q'
--# define SLSMG_VLINE_CHAR 'x'
--# define SLSMG_ULCORN_CHAR 'l'
--# define SLSMG_URCORN_CHAR 'k'
--# define SLSMG_LLCORN_CHAR 'm'
--# define SLSMG_LRCORN_CHAR 'j'
--# define SLSMG_CKBRD_CHAR 'a'
--# define SLSMG_RTEE_CHAR 'u'
--# define SLSMG_LTEE_CHAR 't'
--# define SLSMG_UTEE_CHAR 'w'
--# define SLSMG_DTEE_CHAR 'v'
--# define SLSMG_PLUS_CHAR 'n'
--# define SLSMG_DIAMOND_CHAR '`'
--# define SLSMG_DEGREE_CHAR 'f'
--# define SLSMG_PLMINUS_CHAR 'g'
--# define SLSMG_BULLET_CHAR '~'
--# define SLSMG_LARROW_CHAR ','
--# define SLSMG_RARROW_CHAR '+'
--# define SLSMG_DARROW_CHAR '.'
--# define SLSMG_UARROW_CHAR '-'
--# define SLSMG_BOARD_CHAR 'h'
--# define SLSMG_BLOCK_CHAR '0'
-+# define SLSMG_HLINE_CHAR (acs_map['q'])
-+# define SLSMG_VLINE_CHAR (acs_map['x'])
-+# define SLSMG_ULCORN_CHAR (acs_map['l'])
-+# define SLSMG_URCORN_CHAR (acs_map['k'])
-+# define SLSMG_LLCORN_CHAR (acs_map['m'])
-+# define SLSMG_LRCORN_CHAR (acs_map['j'])
-+# define SLSMG_CKBRD_CHAR (acs_map['a'])
-+# define SLSMG_RTEE_CHAR (acs_map['u'])
-+# define SLSMG_LTEE_CHAR (acs_map['t'])
-+# define SLSMG_UTEE_CHAR (acs_map['v'])
-+# define SLSMG_DTEE_CHAR (acs_map['w'])
-+# define SLSMG_PLUS_CHAR (acs_map['n'])
-+# define SLSMG_DIAMOND_CHAR (acs_map['`'])
-+# define SLSMG_DEGREE_CHAR (acs_map['f'])
-+# define SLSMG_PLMINUS_CHAR (acs_map['g'])
-+# define SLSMG_BULLET_CHAR (acs_map['~'])
-+# define SLSMG_LARROW_CHAR (acs_map[','])
-+# define SLSMG_RARROW_CHAR (acs_map['+'])
-+# define SLSMG_DARROW_CHAR (acs_map['.'])
-+# define SLSMG_UARROW_CHAR (acs_map['-'])
-+# define SLSMG_BOARD_CHAR (acs_map['h'])
-+# define SLSMG_BLOCK_CHAR (acs_map['0'])
-+#
-+# define SLSMG_HLINE_CHAR_TERM 'q'
-+# define SLSMG_VLINE_CHAR_TERM 'x'
-+# define SLSMG_ULCORN_CHAR_TERM 'l'
-+# define SLSMG_URCORN_CHAR_TERM 'k'
-+# define SLSMG_LLCORN_CHAR_TERM 'm'
-+# define SLSMG_LRCORN_CHAR_TERM 'j'
-+# define SLSMG_CKBRD_CHAR_TERM 'a'
-+# define SLSMG_RTEE_CHAR_TERM 'u'
-+# define SLSMG_LTEE_CHAR_TERM 't'
-+# define SLSMG_UTEE_CHAR_TERM 'v'
-+# define SLSMG_DTEE_CHAR_TERM 'w'
-+# define SLSMG_PLUS_CHAR_TERM 'n'
-+# define SLSMG_DIAMOND_CHAR_TERM '`'
-+# define SLSMG_DEGREE_CHAR_TERM 'f'
-+# define SLSMG_PLMINUS_CHAR_TERM 'g'
-+# define SLSMG_BULLET_CHAR_TERM '~'
-+# define SLSMG_LARROW_CHAR_TERM ','
-+# define SLSMG_RARROW_CHAR_TERM '+'
-+# define SLSMG_DARROW_CHAR_TERM '.'
-+# define SLSMG_UARROW_CHAR_TERM '-'
-+# define SLSMG_BOARD_CHAR_TERM 'h'
-+# define SLSMG_BLOCK_CHAR_TERM '0'
- # endif /* AMIGA */
- #endif /* IBMPC_SYSTEM */
-
-+#ifdef UTF8
-+# define SLSMG_HLINE_CHAR_UNICODE 0x2500
-+# define SLSMG_VLINE_CHAR_UNICODE 0x2502
-+# define SLSMG_ULCORN_CHAR_UNICODE 0x250c
-+# define SLSMG_URCORN_CHAR_UNICODE 0x2510
-+# define SLSMG_LLCORN_CHAR_UNICODE 0x2514
-+# define SLSMG_LRCORN_CHAR_UNICODE 0x2518
-+# define SLSMG_RTEE_CHAR_UNICODE 0x2524
-+# define SLSMG_LTEE_CHAR_UNICODE 0x251c
-+# define SLSMG_UTEE_CHAR_UNICODE 0x2534
-+# define SLSMG_DTEE_CHAR_UNICODE 0x252c
-+# define SLSMG_PLUS_CHAR_UNICODE 0x253c
-+# define SLSMG_CKBRD_CHAR_UNICODE 0x2592
-+# define SLSMG_DIAMOND_CHAR_UNICODE 0x25c6
-+# define SLSMG_DEGREE_CHAR_UNICODE 0x00b0
-+# define SLSMG_PLMINUS_CHAR_UNICODE 0x00b1
-+# define SLSMG_BULLET_CHAR_UNICODE 0x00b7
-+# define SLSMG_LARROW_CHAR_UNICODE 0x2190
-+# define SLSMG_RARROW_CHAR_UNICODE 0x2192
-+# define SLSMG_DARROW_CHAR_UNICODE 0x2193
-+# define SLSMG_UARROW_CHAR_UNICODE 0x2191
-+# define SLSMG_BOARD_CHAR_UNICODE 0x2592
-+# define SLSMG_BLOCK_CHAR_UNICODE 0x25ae
-+#endif
-+
- #ifndef IBMPC_SYSTEM
- # define SLSMG_COLOR_BLACK 0x000000
- # define SLSMG_COLOR_RED 0x000001
---- slang-1.4.5/src/slcurses.c.acs 2002-07-09 00:03:57.000000000 -0400
-+++ slang-1.4.5/src/slcurses.c 2002-07-09 00:09:03.000000000 -0400
-@@ -331,40 +331,63 @@
- /* SLtt_set_mono (A_BLINK >> 8, NULL, SLTT_BLINK_MASK); */
- SLtt_set_mono ((A_BOLD|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_BOLD_MASK);
- SLtt_set_mono ((A_REVERSE|A_UNDERLINE) >> 8, NULL, SLTT_ULINE_MASK|SLTT_REV_MASK);
-+
-+ SLcurses_init_acs_map();
-+
-+ return SLcurses_Stdscr;
-+}
-
-+void SLcurses_init_acs_map()
-+{
- if (SLtt_Has_Alt_Charset)
- {
-- SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = SLSMG_ULCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = SLSMG_URCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = SLSMG_LLCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = SLSMG_LRCORN_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = SLSMG_UTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = SLSMG_DTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = SLSMG_LTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = SLSMG_RTEE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = SLSMG_VLINE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = SLSMG_HLINE_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = SLSMG_PLUS_CHAR | A_ALTCHARSET;
-- SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = SLSMG_CKBRD_CHAR | A_ALTCHARSET;
-+ if (SLsmg_Is_Unicode)
-+ {
-+ SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_UNICODE;
-+ SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_UNICODE;
-+ SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_UNICODE;
-+ SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_UNICODE;
-+ }
-+ else
-+ {
-+ SLcurses_Acs_Map['l'] = SLSMG_ULCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['k'] = SLSMG_URCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['m'] = SLSMG_LLCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['j'] = SLSMG_LRCORN_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['v'] = SLSMG_UTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['w'] = SLSMG_DTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['t'] = SLSMG_LTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['u'] = SLSMG_RTEE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['x'] = SLSMG_VLINE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['q'] = SLSMG_HLINE_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['n'] = SLSMG_PLUS_CHAR_TERM | A_ALTCHARSET;
-+ SLcurses_Acs_Map['a'] = SLSMG_CKBRD_CHAR_TERM | A_ALTCHARSET;
-+ }
- }
- else
- {
- /* ugly defaults to use on terminals which don't support graphics */
-- SLcurses_Acs_Map[SLSMG_ULCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_URCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LLCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LRCORN_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_UTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_DTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_LTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_RTEE_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_VLINE_CHAR] = '|';
-- SLcurses_Acs_Map[SLSMG_HLINE_CHAR] = '-';
-- SLcurses_Acs_Map[SLSMG_PLUS_CHAR] = '+';
-- SLcurses_Acs_Map[SLSMG_CKBRD_CHAR] = '#';
-+ SLcurses_Acs_Map['l'] = '+';
-+ SLcurses_Acs_Map['k'] = '+';
-+ SLcurses_Acs_Map['m'] = '+';
-+ SLcurses_Acs_Map['j'] = '+';
-+ SLcurses_Acs_Map['v'] = '+';
-+ SLcurses_Acs_Map['w'] = '+';
-+ SLcurses_Acs_Map['t'] = '+';
-+ SLcurses_Acs_Map['u'] = '+';
-+ SLcurses_Acs_Map['x'] = '|';
-+ SLcurses_Acs_Map['q'] = '-';
-+ SLcurses_Acs_Map['n'] = '+';
-+ SLcurses_Acs_Map['a'] = '#';
- }
--
-- return SLcurses_Stdscr;
- }
-
- int SLcurses_wattrset (SLcurses_Window_Type *w, SLtt_Char_Type ch)
---- slang-1.4.5/src/slcurses.h.acs 2002-02-10 02:39:19.000000000 -0500
-+++ slang-1.4.5/src/slcurses.h 2002-07-09 00:03:57.000000000 -0400
-@@ -141,6 +141,7 @@
-
- extern int SLcurses_nodelay (SLcurses_Window_Type *, int);
- extern SLcurses_Window_Type *SLcurses_initscr (void);
-+extern void SLcurses_init_acs_map (void);
- #define initscr SLcurses_initscr
-
- extern int SLcurses_cbreak (void);
-@@ -222,21 +222,21 @@
- extern SLtt_Char_Type SLcurses_Acs_Map [128];
- #define acs_map SLcurses_Acs_Map
-
--#define ACS_ULCORNER (acs_map[SLSMG_ULCORN_CHAR])
--#define ACS_URCORNER (acs_map[SLSMG_URCORN_CHAR])
--#define ACS_LRCORNER (acs_map[SLSMG_LRCORN_CHAR])
--#define ACS_LLCORNER (acs_map[SLSMG_LLCORN_CHAR])
--#define ACS_TTEE (acs_map[SLSMG_UTEE_CHAR])
--#define ACS_LTEE (acs_map[SLSMG_LTEE_CHAR])
--#define ACS_RTEE (acs_map[SLSMG_RTEE_CHAR])
--#define ACS_BTEE (acs_map[SLSMG_DTEE_CHAR])
--#define ACS_PLUS (acs_map[SLSMG_PLUS_CHAR])
--#define ACS_VLINE (acs_map[SLSMG_VLINE_CHAR])
--#define ACS_HLINE (acs_map[SLSMG_HLINE_CHAR])
-+#define ACS_ULCORNER SLSMG_ULCORN_CHAR
-+#define ACS_URCORNER SLSMG_URCORN_CHAR
-+#define ACS_LRCORNER SLSMG_LRCORN_CHAR
-+#define ACS_LLCORNER SLSMG_LLCORN_CHAR
-+#define ACS_TTEE SLSMG_UTEE_CHAR
-+#define ACS_LTEE SLSMG_LTEE_CHAR
-+#define ACS_RTEE SLSMG_RTEE_CHAR
-+#define ACS_BTEE SLSMG_DTEE_CHAR
-+#define ACS_PLUS SLSMG_PLUS_CHAR
-+#define ACS_VLINE SLSMG_VLINE_CHAR
-+#define ACS_HLINE SLSMG_HLINE_CHAR
- #define ACS_S1 '-'
- #define ACS_S9 '-'
- #define ACS_DIAMOND '&'
--#define ACS_CKBOARD (acs_map[SLSMG_CKBRD_CHAR])
-+#define ACS_CKBOARD SLSMG_CKBRD_CHAR
- #define ACS_DEGREE 'o'
- #define ACS_PLMINUS '+'
- #define ACS_BULLET '*'
---- slang-1.4.5/src/slsmg.c.acs 2002-07-09 00:03:57.000000000 -0400
-+++ slang-1.4.5/src/slsmg.c 2002-07-09 00:03:57.000000000 -0400
-@@ -10,6 +10,9 @@
-
- #include "slang.h"
- #include "_slang.h"
-+#include "slcurses.h"
-+
-+#include <locale.h>
-
- typedef struct Screen_Type
- {
-@@ -44,9 +47,9 @@
- */
-
- #ifndef IBMPC_SYSTEM
--#define ALT_CHAR_FLAG 0x80
-+static int ALT_CHAR_FLAG=0x80;
- #else
--#define ALT_CHAR_FLAG 0x00
-+static int ALT_CHAR_FLAG=0x00;
- #endif
-
- #if SLTT_HAS_NON_BCE_SUPPORT && !defined(IBMPC_SYSTEM)
-@@ -54,6 +57,8 @@
- static int Bce_Color_Offset;
- #endif
-
-+int SLsmg_Is_Unicode = 0;
-+int SLsmg_Setlocale = 1;
- int SLsmg_Newline_Behavior = 0;
- int SLsmg_Backspace_Moves = 0;
- /* Backward compatibility. Not used. */
-@@ -184,6 +189,8 @@
- return;/* alt chars not used and the alt bit
- * is used to indicate a blink.
- */
-+ if (SLsmg_Is_Unicode)
-+ ALT_CHAR_FLAG=0x00;
-
- if (i) This_Alt_Char = ALT_CHAR_FLAG;
- else This_Alt_Char = 0;
-@@ -348,6 +355,8 @@
- #ifndef IBMPC_SYSTEM
- int alt_char_set_flag;
-
-+ if (SLsmg_Is_Unicode)
-+ ALT_CHAR_FLAG = 0x00;
- alt_char_set_flag = ((This_Color & ALT_CHAR_FLAG)
- && ((tt_Use_Blink_For_ACS == NULL)
- || (*tt_Use_Blink_For_ACS == 0)));
-@@ -1221,6 +1230,20 @@
- Smg_Inited = 0;
- }
-
-+static void SLsmg_check_unicode(void)
-+{
-+ char *s,*t;
-+
-+ if (SLsmg_Setlocale)
-+ s = setlocale(LC_ALL, "");
-+ else
-+ s = setlocale(LC_ALL, NULL);
-+ if (s && (strstr(s,"UTF-8") || strstr(s,"utf8"))) {
-+ SLsmg_Is_Unicode = 1;
-+ return;
-+ }
-+ SLsmg_Is_Unicode = 0;
-+}
-
- static int init_smg (void)
- {
-@@ -1242,6 +1265,8 @@
- This_Col = This_Row = Start_Col = Start_Row = 0;
-
- This_Alt_Char = 0;
-+ SLsmg_check_unicode ();
-+ SLcurses_init_acs_map ();
- SLsmg_set_color (0);
- Cls_Flag = 1;
- #ifndef IBMPC_SYSTEM
-@@ -1386,7 +1411,11 @@
- }
- }
-
-+#ifdef UTF8
-+void SLsmg_draw_object (int r, int c, SLsmg_Char_Type object)
-+#else
- void SLsmg_draw_object (int r, int c, unsigned char object)
-+#endif
- {
- This_Row = r; This_Col = c;
-
-@@ -1405,7 +1434,7 @@
-
- void SLsmg_draw_hline (unsigned int n)
- {
-- static unsigned char hbuf[16];
-+ SLsmg_Char_Type ch = SLSMG_HLINE_CHAR;
- int count;
- int cmin, cmax;
- int final_col = This_Col + (int) n;
-@@ -1421,11 +1450,6 @@
- return;
- }
-
-- if (hbuf[0] == 0)
-- {
-- SLMEMSET ((char *) hbuf, SLSMG_HLINE_CHAR, 16);
-- }
--
- n = (unsigned int)(cmax - cmin);
- count = n / 16;
-
-@@ -1433,10 +1457,10 @@
- This_Color |= ALT_CHAR_FLAG;
- This_Col = cmin;
-
-- SLsmg_write_nchars ((char *) hbuf, n % 16);
-- while (count-- > 0)
-+ SLsmg_draw_object(This_Row, This_Col, ch);
-+ while (n-- > 0)
- {
-- SLsmg_write_nchars ((char *) hbuf, 16);
-+ SLsmg_draw_object(This_Row, This_Col, ch);
- }
-
- This_Color = save_color;
-@@ -1445,7 +1469,7 @@
-
- void SLsmg_draw_vline (int n)
- {
-- unsigned char ch = SLSMG_VLINE_CHAR;
-+ SLsmg_Char_Type ch = SLSMG_VLINE_CHAR;
- int c = This_Col, rmin, rmax;
- int final_row = This_Row + n;
- int save_color;
-@@ -1466,7 +1490,7 @@
- for (This_Row = rmin; This_Row < rmax; This_Row++)
- {
- This_Col = c;
-- SLsmg_write_nchars ((char *) &ch, 1);
-+ SLsmg_draw_object (This_Row, This_Col, ch);
- }
-
- This_Col = c; This_Row = final_row;
diff --git a/sys-libs/slang/files/slang-utf8-fix.patch b/sys-libs/slang/files/slang-utf8-fix.patch
deleted file mode 100644
index 6c0a80f1ea1e..000000000000
--- a/sys-libs/slang/files/slang-utf8-fix.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- slang-1.4.5/src/slsmg.c.jj 2003-02-21 12:11:37.000000000 -0500
-+++ slang-1.4.5/src/slsmg.c 2003-02-21 14:09:28.000000000 -0500
-@@ -378,8 +378,10 @@ void SLsmg_write_nwchars (wchar_t *str,
- for (i = 0; i < n; i++, str) {
- ch = *str++;
- #ifndef IBMPC_SYSTEM
-- if (alt_char_set_flag)
-+ if (alt_char_set_flag) {
- ch = Alt_Char_Set[ch & 0x7F];
-+ w = 1;
-+ } else
- #endif
- w = wcwidth(ch);
-
---- slang-1.4.5/src/sldisply.c.jj 2003-02-21 12:11:37.000000000 -0500
-+++ slang-1.4.5/src/sldisply.c 2003-02-21 15:51:43.000000000 -0500
-@@ -1498,6 +1498,17 @@ static void write_wstring_with_care (SLs
- }
- }
-
-+ if (Current_Fgbg & SLTT_ALTC_MASK)
-+ {
-+ char c;
-+ while (len--)
-+ {
-+ c = *str++;
-+ tt_write(&c, 1);
-+ }
-+ return;
-+ }
-+
- memset (&mbstate, 0, sizeof (mbstate));
- while (len--)
- {
diff --git a/sys-libs/slang/files/slang-utf8-fix2.patch b/sys-libs/slang/files/slang-utf8-fix2.patch
deleted file mode 100644
index f8df90a4e9b7..000000000000
--- a/sys-libs/slang/files/slang-utf8-fix2.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ru slang-1.4.5/src/slsmg.c slang-1.4.5-new/src/slsmg.c
---- slang-1.4.5/src/slsmg.c 2002-07-25 00:09:00.000000000 -0400
-+++ slang-1.4.5-new/src/slsmg.c 2002-07-25 00:04:02.000000000 -0400
-@@ -369,7 +369,10 @@
-
- max_len = Start_Col + Screen_Cols;
- len = This_Col;
-- p = SL_Screen[This_Row - Start_Row].neew + len - Start_Col;
-+
-+
-+ p = SL_Screen[This_Row - Start_Row].neew;
-+ if (len > Start_Col) p += len - Start_Col;
- prev = 0;
-
- for (i = 0; i < n; i++, str) {
diff --git a/sys-libs/slang/slang-1.4.9-r1.ebuild b/sys-libs/slang/slang-1.4.9-r1.ebuild
index b3a80498a179..f01a7257fed3 100644
--- a/sys-libs/slang/slang-1.4.9-r1.ebuild
+++ b/sys-libs/slang/slang-1.4.9-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-1.4.9-r1.ebuild,v 1.20 2005/01/03 00:27:27 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-1.4.9-r1.ebuild,v 1.21 2006/02/25 19:13:29 liquidx Exp $
inherit eutils
@@ -9,26 +9,27 @@ inherit eutils
DESCRIPTION="Console display library used by most text viewer"
HOMEPAGE="http://www.s-lang.org/"
-SRC_URI="ftp://space.mit.edu/pub/davis/slang/v1.4/${P}.tar.bz2"
+SRC_URI="ftp://space.mit.edu/pub/davis/slang/v1.4/${P}.tar.bz2
+ mirror://gentoo/${P}-patches.tar.gz"
LICENSE="|| ( GPL-2 Artistic )"
SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 ppc-macos s390 sh sparc x86"
+KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc-macos ppc64 s390 sh sparc x86"
IUSE="cjk unicode"
DEPEND=">=sys-libs/ncurses-5.2-r2"
src_unpack() {
- unpack ${P}.tar.bz2
+ unpack ${A}
cd ${S}
- epatch ${FILESDIR}/${P}.patch
+ epatch ${WORKDIR}/${P}.patch
use ppc-macos || epatch ${FILESDIR}/${P}-fsuid.patch
- epatch ${FILESDIR}/${P}-autoconf.patch
+ epatch ${WORKDIR}/${P}-autoconf.patch
if use unicode ; then
- epatch ${FILESDIR}/slang-debian-utf8.patch
- epatch ${FILESDIR}/slang-utf8-acs.patch
- epatch ${FILESDIR}/slang-utf8-fix.patch
+ epatch ${WORKDIR}/slang-debian-utf8.patch
+ epatch ${WORKDIR}/slang-utf8-acs.patch
+ epatch ${WORKDIR}/slang-utf8-fix.patch
fi
if use cjk ; then
sed -i \
@@ -38,6 +39,8 @@ src_unpack() {
}
src_compile() {
+ export LANG=C
+ export LC_ALL=C
econf || die "econf failed"
emake -j1 all elf || die "make failed"
}
diff --git a/sys-libs/slang/slang-1.4.9-r2.ebuild b/sys-libs/slang/slang-1.4.9-r2.ebuild
index fca1a8dac8ad..da50a434580f 100644
--- a/sys-libs/slang/slang-1.4.9-r2.ebuild
+++ b/sys-libs/slang/slang-1.4.9-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-1.4.9-r2.ebuild,v 1.2 2006/02/16 19:48:57 liquidx Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/slang/slang-1.4.9-r2.ebuild,v 1.3 2006/02/25 19:13:29 liquidx Exp $
inherit eutils
@@ -9,27 +9,28 @@ inherit eutils
DESCRIPTION="Console display library used by most text viewer"
HOMEPAGE="http://www.s-lang.org/"
-SRC_URI="ftp://space.mit.edu/pub/davis/slang/v1.4/${P}.tar.bz2"
+SRC_URI="ftp://space.mit.edu/pub/davis/slang/v1.4/${P}.tar.bz2
+ mirror://gentoo/${P}-patches.tar.gz"
LICENSE="|| ( GPL-2 Artistic )"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~ppc-macos ~s390 ~sh ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc x86"
IUSE="cjk unicode"
DEPEND=">=sys-libs/ncurses-5.2-r2"
src_unpack() {
- unpack ${P}.tar.bz2
+ unpack ${A}
cd ${S}
- epatch ${FILESDIR}/${P}.patch
+ epatch ${WORKDIR}/${P}.patch
use ppc-macos || epatch ${FILESDIR}/${P}-fsuid.patch
- epatch ${FILESDIR}/${P}-autoconf.patch
+ epatch ${WORKDIR}/${P}-autoconf.patch
if use unicode ; then
- epatch ${FILESDIR}/slang-debian-utf8.patch
- epatch ${FILESDIR}/slang-utf8-acs.patch
- epatch ${FILESDIR}/slang-utf8-fix.patch
- epatch ${FILESDIR}/slang-utf8-fix2.patch
+ epatch ${WORKDIR}/slang-debian-utf8.patch
+ epatch ${WORKDIR}/slang-utf8-acs.patch
+ epatch ${WORKDIR}/slang-utf8-fix.patch
+ epatch ${WORKDIR}/slang-utf8-fix2.patch
fi
if use cjk ; then
sed -i \