2013.09.17 Tuesday
一定期間更新がないため広告を表示しています
- - -
是非とも見なかったことに…
|
設定方法
% nspluginwrapper -i /usr/local/lib/npapi/linux-flashplugin/libflashplayer.so
% nspluginwrapper -i /usr/local/Adobe/Acrobat7.0/JPN/Browser/intellinux/nppdf.so
% nspluginwrapper -i /usr/local/lib/linux-mozilla/plugins/nphelix.so
/usr/ports/x11/kdebase3/files/patch-konsole-wcwidth.cpp
--- konsole/konsole/konsole_wcwidth.cpp.orig 26 Nov 2003 16:04:59 -0000 1.5
+++ konsole/konsole/konsole_wcwidth.cpp 14 Apr 2004 08:27:14 -0000
@@ -9,6 +9,10 @@
#include "konsole_wcwidth.h"
+#include// for getenv()
+
+
+
struct interval {
unsigned short first;
unsigned short last;
@@ -65,7 +69,7 @@ static int bisearch(Q_UINT16 ucs, const
* in ISO 10646.
*/
-int konsole_wcwidth(Q_UINT16 ucs)
+int konsole_wcwidth_normal(Q_UINT16 ucs)
{
/* sorted list of non-overlapping intervals of non-spacing characters */
static const struct interval combining[] = {
@@ -131,7 +135,6 @@ int konsole_wcwidth(Q_UINT16 ucs)
(ucs >= 0x20000 && ucs <= 0x2ffff) */));
}
-#if 0
/*
* The following function is the same as konsole_wcwidth(), except that
* spacing characters in the East Asian Ambiguous (A) category as
@@ -202,15 +205,31 @@ int konsole_wcwidth_cjk(Q_UINT16 ucs)
sizeof(ambiguous) / sizeof(struct interval) - 1))
return 2;
- return konsole_wcwidth(ucs);
+ return konsole_wcwidth_normal(ucs);
}
-#endif
// single byte char: +1, multi byte char: +2
int string_width( const QString &txt )
{
int w = 0;
- for ( uint i = 0; i < txt.length(); ++i )
- w += konsole_wcwidth( txt[ i ].unicode() );
+
+ for ( uint i = 1; i < txt.length(); ++i ) {
+ w += konsole_wcwidth(txt[i].unicode());
+ }
return w;
}
+
+
+int konsole_wcwidth(Q_UINT16 ucs) {
+
+ static int use_wcwidth_cjk = (getenv("KONSOLE_WCWIDTH_CJK")) ? 1: 0;
+
+ if (use_wcwidth_cjk) {
+ return konsole_wcwidth_cjk(ucs);
+ } else {
+ return konsole_wcwidth_normal(ucs);
+ }
+
+}
+
+
/usr/ports/x11/kdebase3/files/patch-konsole-wcwidth.h
--- konsole/konsole/konsole_wcwidth.h.orig 26 Nov 2003 16:04:59 -0000 1.2
+++ konsole/konsole/konsole_wcwidth.h 14 Apr 2004 08:27:14 -0000
@@ -10,9 +10,7 @@
#include
int konsole_wcwidth(Q_UINT16 ucs);
-#if 0
-int konsole_wcwidth_cjk(Q_UINT16 ucs);
-#endif
+//int konsole_wcwidth_cjk(Q_UINT16 ucs);
int string_width( const QString &txt );
| Log in | RSS1.0 | Atom0.3 | (C) 2024 ブログ JUGEM Some Rights Reserved. |