Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
a2603188
Commit
a2603188
authored
Sep 03, 1999
by
Kenichi Handa
Browse files
(Faset): Adjust the way to check byte-combining
possibility for the new handling of multibyte sequence.
parent
4659838f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
src/data.c
src/data.c
+8
-7
No files found.
src/data.c
View file @
a2603188
...
...
@@ -1859,13 +1859,14 @@ IDX starts at 0.")
error
(
"Attempt to change byte length of a string"
);
/* We can't accept a change causing byte combining. */
if
((
idxval
>
0
&&
!
CHAR_HEAD_P
(
*
str
)
&&
(
prev_byte
=
string_char_to_byte
(
array
,
idxval
-
1
),
(
prev_byte
+
1
<
idxval_byte
||
(
p
[
-
1
]
>=
0x80
&&
p
[
-
1
]
<
0xA0
))))
||
(
idxval
<
XSTRING
(
array
)
->
size
-
1
&&
(
*
str
>=
0x80
&&
*
str
<
0xA0
)
&&
!
CHAR_HEAD_P
(
p
[
actual_len
])))
if
(
!
ASCII_BYTE_P
(
*
str
)
&&
((
idxval
>
0
&&
!
CHAR_HEAD_P
(
*
str
)
&&
(
prev_byte
=
string_char_to_byte
(
array
,
idxval
-
1
),
BYTES_BY_CHAR_HEAD
(
XSTRING
(
array
)
->
data
[
prev_byte
])
>
idxval_byte
-
prev_byte
))
||
(
idxval
<
XSTRING
(
array
)
->
size
-
1
&&
!
CHAR_HEAD_P
(
p
[
actual_len
])
&&
new_len
<
BYTES_BY_CHAR_HEAD
(
*
str
))))
error
(
"Attempt to change char length of a string"
);
while
(
new_len
--
)
*
p
++
=
*
str
++
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment