ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/doc/wcwidth.patch
(Generate patch)

Comparing rxvt-unicode/doc/wcwidth.patch (file contents):
Revision 1.6 by sf-exg, Sun Sep 9 12:27:02 2012 UTC vs.
Revision 1.7 by sf-exg, Sun Nov 7 10:08:57 2021 UTC

1diff --git a/src/Makefile.in b/src/Makefile.in 1diff --git a/src/Makefile.in b/src/Makefile.in
2index defe61d..cbbacd1 100644 2index d374ae83..08a26e65 100644
3--- a/src/Makefile.in 3--- a/src/Makefile.in
4+++ b/src/Makefile.in 4+++ b/src/Makefile.in
5@@ -35,7 +35,7 @@ COMMON = \ 5@@ -40,7 +40,7 @@ COMMON = \
6 screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \ 6 screen.o scrollbar.o scrollbar-next.o scrollbar-rxvt.o \
7 scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o \ 7 scrollbar-xterm.o scrollbar-plain.o xdefaults.o encoding.o \
8 rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o \ 8 rxvttoolkit.o rxvtutil.o keyboard.o rxvtimg.o \
9- ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o @PERL_O@ 9- ev_cpp.o @PERL_O@
10+ ev_cpp.o fdpass_wrapper.o ptytty_wrapper.o wcwidth.o @PERL_O@ 10+ ev_cpp.o @PERL_O@ wcwidth.o
11 11
12 COMMON_DAEMON = rxvtdaemon.o 12 COMMON_DAEMON = rxvtdaemon.o
13 13
14diff --git a/src/rxvt.h b/src/rxvt.h 14diff --git a/src/rxvt.h b/src/rxvt.h
15index 5be4391..152bf64 100644 15index 043b7c18..5bcfdb01 100644
16--- a/src/rxvt.h 16--- a/src/rxvt.h
17+++ b/src/rxvt.h 17+++ b/src/rxvt.h
18@@ -706,6 +706,12 @@ typedef struct _mwmhints 18@@ -652,6 +652,12 @@ typedef struct _mwmhints
19 // speed hack, copy some member variable into a local variable of the same name 19 // speed hack, copy some member variable into a local variable of the same name
20 #define dLocal(type,name) type const name = this->name 20 #define dLocal(type,name) type const name = this->name
21 21
22+int mk_wcwidth(wchar_t c); 22+int mk_wcwidth(wchar_t c);
23+int mk_wcswidth(const wchar_t *s, size_t n); 23+int mk_wcswidth(const wchar_t *s, size_t n);
28 // for speed reasons, we assume that all codepoints 32 to 126 are 28 // for speed reasons, we assume that all codepoints 32 to 126 are
29 // single-width. 29 // single-width.
30 #define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) 30 #define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c))
31diff --git a/src/wcwidth.C b/src/wcwidth.C 31diff --git a/src/wcwidth.C b/src/wcwidth.C
32new file mode 100644 32new file mode 100644
33index 0000000..c3d90a6 33index 00000000..c3d90a6a
34--- /dev/null 34--- /dev/null
35+++ b/src/wcwidth.C 35+++ b/src/wcwidth.C
36@@ -0,0 +1,218 @@ 36@@ -0,0 +1,218 @@
37+/* 37+/*
38+ * This is an implementation of wcwidth() and wcswidth() (defined in 38+ * This is an implementation of wcwidth() and wcswidth() (defined in

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines