about summary refs log tree commit diff stats
path: root/src/LYStrings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/LYStrings.c')
-rw-r--r--src/LYStrings.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/LYStrings.c b/src/LYStrings.c
index 303ce922..8c207994 100644
--- a/src/LYStrings.c
+++ b/src/LYStrings.c
@@ -1,4 +1,4 @@
-/* $LynxId: LYStrings.c,v 1.160 2009/01/01 21:50:59 tom Exp $ */
+/* $LynxId: LYStrings.c,v 1.161 2009/01/20 01:05:11 tom Exp $ */
 #include <HTUtils.h>
 #include <HTCJK.h>
 #include <UCAux.h>
@@ -479,7 +479,7 @@ static int set_clicked_link(int x,
 		if (is_text)
 		    len = links[i].l_form->size;
 		else
-		    len = (int) strlen(text);
+		    len = (int) LYstrCells(text);
 		cur_err = XYdist(x, y, links[i].lx, links[i].ly, len);
 		/* Check the second line */
 		while (cur_err > 0
@@ -488,7 +488,7 @@ static int set_clicked_link(int x,
 		    int cur_err_2 = XYdist(x, y,
 					   LYGetHilitePos(i, count),
 					   links[i].ly + count,
-					   (int) strlen(text));
+					   (int) LYstrCells(text));
 
 		    cur_err = HTMIN(cur_err, cur_err_2);
 		}
@@ -3997,8 +3997,10 @@ static unsigned options_width(const char **list)
     int count = 0;
 
     while (list[count] != 0) {
-	if (strlen(list[count]) > width) {
-	    width = strlen(list[count]);
+	unsigned ncells = LYstrCells(list[count]);
+
+	if (ncells > width) {
+	    width = ncells;
 	}
 	count++;
     }
committer Kartik Agaram <vc@akkartik.com> 2020-10-05 11:00:05 -0700 6958' href='/akkartik/mu/commit/html/407print-int32-decimal-right-justified.mu.html?h=main&id=d3a9db3aff54ea485f409eaaef3d8f56ad77f0dc'>d3a9db3a ^
dc5a0acf ^

d3a9db3a ^

372367f5 ^
78357b88 ^
372367f5 ^
372367f5 ^

d3a9db3a ^
78357b88 ^
372367f5 ^
78357b88 ^
d3a9db3a ^


78357b88 ^
d3a9db3a ^




























3350c34a ^
d3a9db3a ^
3350c34a ^
e0b8eddb ^



372367f5 ^
e0b8eddb ^








372367f5 ^
e0b8eddb ^







d3a9db3a ^



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88