projects
/
elisp
/
emacs-canna.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bf04095
)
(mule_strlen): Fix problem in character-indexing emacsen.
author
tomo
<tomo>
Tue, 1 Feb 2000 02:36:25 +0000
(
02:36
+0000)
committer
tomo
<tomo>
Tue, 1 Feb 2000 02:36:25 +0000
(
02:36
+0000)
canna.c
patch
|
blob
|
history
diff --git
a/canna.c
b/canna.c
index
300e5c8
..
f5ce4d1
100644
(file)
--- a/
canna.c
+++ b/
canna.c
@@
-143,7
+143,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char rcs_id[] = "$Id: canna.c,v 1.36 1999-03-02 18:52:41 morioka Exp $";
+static char rcs_id[] = "$Id: canna.c,v 1.37 2000-02-01 02:36:25 tomo Exp $";
#endif
#include <stdio.h>
#endif
#include <stdio.h>
@@
-1580,15
+1580,27
@@
int l;
while((cp < p + l) && (ch = *cp)) {
if ((unsigned char)ch == ISO_CODE_SS2) {
while((cp < p + l) && (ch = *cp)) {
if ((unsigned char)ch == ISO_CODE_SS2) {
+#ifdef STRING_BYTES
+ len++;
+#else
len += 2;
len += 2;
+#endif
cp += 2;
}
else if ((unsigned char)ch == ISO_CODE_SS3) {
cp += 2;
}
else if ((unsigned char)ch == ISO_CODE_SS3) {
+#ifdef STRING_BYTES
+ len++;
+#else
len += 3;
len += 3;
+#endif
cp += 3;
}
else if(ch & 0x80) {
cp += 3;
}
else if(ch & 0x80) {
+#ifdef STRING_BYTES
+ len++;
+#else
len += 3;
len += 3;
+#endif
cp += 2;
}
else {
cp += 2;
}
else {